Skip to content

Commit a77cc30

Browse files
authored
Merge pull request #3 from nedhmn/feature/lint-ci
Feature/lint ci
2 parents 0e3830c + ce994c1 commit a77cc30

File tree

5 files changed

+82
-7
lines changed

5 files changed

+82
-7
lines changed

.github/workflows/lint.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Lint
2+
3+
# Github actions for Turborepos
4+
# ref: https://turborepo.com/docs/guides/ci-vendors/github-actions
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
types: ["opened", "synchronize"]
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
lint:
16+
timeout-minutes: 15
17+
runs-on: ubuntu-latest
18+
19+
# Turborepo remote cache
20+
# ref: https://turborepo.com/docs/guides/ci-vendors/github-actions#remote-caching
21+
22+
env:
23+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
24+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
25+
26+
steps:
27+
- name: Check out code
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 2
31+
32+
- uses: pnpm/action-setup@v3
33+
with:
34+
version: 9
35+
36+
- name: Setup Node.js environment
37+
uses: actions/setup-node@v4
38+
with:
39+
node-version: 22
40+
cache: "pnpm"
41+
42+
- name: Install dependencies
43+
run: pnpm install
44+
45+
- name: Lint
46+
run: pnpm lint
47+
48+
# Need to build before "check-types" for export types to be available
49+
50+
- name: Build
51+
run: pnpm build
52+
53+
- name: Check types
54+
run: pnpm check-types

packages/embeddings/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,14 @@
1010
"#*": "./src/*"
1111
},
1212
"exports": {
13-
".": "./dist/index.js",
14-
"./openai": "./dist/openai.js"
13+
".": {
14+
"import": "./dist/index.js",
15+
"types": "./dist/index.d.ts"
16+
},
17+
"./openai": {
18+
"import": "./dist/openai.js",
19+
"types": "./dist/openai.d.ts"
20+
}
1521
},
1622
"scripts": {
1723
"build": "tsc",

packages/pinecone/package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@
1010
"#*": "./src/*"
1111
},
1212
"exports": {
13-
".": "./dist/index.js",
14-
"./types": "./dist/types.js",
15-
"./upsert": "./dist/upsert.js"
13+
".": {
14+
"import": "./dist/index.js",
15+
"types": "./dist/index.d.ts"
16+
},
17+
"./types": {
18+
"import": "./dist/types.js",
19+
"types": "./dist/types.d.ts"
20+
},
21+
"./upsert": {
22+
"import": "./dist/upsert.js",
23+
"types": "./dist/upsert.d.ts"
24+
}
1625
},
1726
"scripts": {
1827
"build": "tsc",

packages/ui/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
],
77
"exports": {
88
"./styles.css": "./dist/index.css",
9-
"./*": "./dist/*.js"
9+
"./*": {
10+
"import": "./dist/*.js",
11+
"types": "./dist/*.d.ts"
12+
}
1013
},
1114
"sideEffects": [
1215
"**/*.css"

packages/utils/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"dist"
88
],
99
"exports": {
10-
".": "./dist/index.js"
10+
".": {
11+
"import": "./dist/index.js",
12+
"types": "./dist/index.d.ts"
13+
}
1114
},
1215
"scripts": {
1316
"build": "tsc",

0 commit comments

Comments
 (0)