Skip to content

Commit 607adda

Browse files
authored
scripts[patch]: Add .js extension to build script (#5536)
* scripts[patch]: Add .js extension to build script * cr * yarn.lock * commit it
1 parent 3ae84b6 commit 607adda

File tree

8 files changed

+20
-14
lines changed

8 files changed

+20
-14
lines changed

‎libs/langchain-scripts/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ check_broken_links.d.cts
1717
node_modules
1818
dist
1919
.yarn
20+
!bin/build.js
File renamed without changes.

‎libs/langchain-scripts/langchain.config.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ export const config = {
2121
cjsSource: "./dist-cjs",
2222
cjsDestination: "./dist",
2323
abs,
24-
}
24+
additionalGitignorePaths: ["!bin/build.js"]
25+
}

‎libs/langchain-scripts/package.json‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
},
1515
"homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-scripts/",
1616
"bin": {
17-
"lc-build": "bin/build"
17+
"lc-build": "bin/build.js"
1818
},
1919
"scripts": {
2020
"build": "yarn clean && yarn build:esm && yarn build:cjs && yarn build:scripts",
@@ -26,17 +26,17 @@
2626
"lint:dpdm": "dpdm --exit-code circular:1 --no-warning --no-tree src/*.ts src/**/*.ts",
2727
"lint": "yarn lint:eslint && yarn lint:dpdm",
2828
"lint:fix": "yarn lint:eslint --fix && yarn lint:dpdm",
29-
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 node ./bin/build --config ./langchain.config.js --create-entrypoints --pre",
29+
"clean": "rimraf .turbo/ dist/ && NODE_OPTIONS=--max-old-space-size=4096 node ./bin/build.js --config ./langchain.config.js --create-entrypoints --pre",
3030
"prepack": "yarn build",
3131
"test": "NODE_OPTIONS=--experimental-vm-modules jest --testPathIgnorePatterns=\\.int\\.test.ts --testTimeout 30000 --maxWorkers=50%",
3232
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --testPathIgnorePatterns=\\.int\\.test.ts",
3333
"test:single": "NODE_OPTIONS=--experimental-vm-modules yarn run jest --config jest.config.cjs --testTimeout 100000",
3434
"test:int": "NODE_OPTIONS=--experimental-vm-modules jest --testPathPattern=\\.int\\.test.ts --testTimeout 100000 --maxWorkers=50%",
3535
"format": "prettier --write \"src\"",
3636
"format:check": "prettier --check \"src\"",
37-
"move-cjs-to-dist": "node ./bin/build --config ./langchain.config.js --move-cjs-dist",
38-
"create-entrypoints": "node ./bin/build --config ./langchain.config.js --create-entrypoints",
39-
"check-tree-shaking": "node ./bin/build --config ./langchain.config.js --tree-shaking"
37+
"move-cjs-to-dist": "node ./bin/build.js --config ./langchain.config.js --move-cjs-dist",
38+
"create-entrypoints": "node ./bin/build.js --config ./langchain.config.js --create-entrypoints",
39+
"check-tree-shaking": "node ./bin/build.js --config ./langchain.config.js --tree-shaking"
4040
},
4141
"author": "LangChain",
4242
"license": "MIT",

‎libs/langchain-scripts/tsconfig.cjs.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"node_modules",
88
"dist",
99
"docs",
10-
"**/tests"
10+
"**/tests",
11+
"bin/"
1112
]
1213
}

‎libs/langchain-scripts/tsconfig.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"exclude": [
3030
"node_modules",
3131
"dist",
32-
"docs"
32+
"docs",
33+
"bin/"
3334
]
3435
}

‎turbo.json‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44
"pipeline": {
55
"@langchain/scripts#build": {
66
"outputs": [
7-
"./libs/langchain-scripts/dist/**",
7+
"dist/**",
88
"*.js",
99
"*.cjs",
1010
"*.d.ts"
1111
],
1212
"inputs": [
13-
"./libs/langchain-scripts/src/",
14-
"./libs/langchain-scripts/scripts/**",
15-
"./libs/langchain-scripts/package.json",
16-
"./libs/langchain-scripts/tsconfig.json"
13+
"src/*",
14+
"src/**/*",
15+
"scripts/*",
16+
"package.json",
17+
"tsconfig.json",
18+
"bin/*"
1719
]
1820
},
1921
"@langchain/core#build": {

‎yarn.lock‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10113,7 +10113,7 @@ __metadata:
1011310113
ts-morph: ^21.0.1
1011410114
typescript: ^5.4.5
1011510115
bin:
10116-
lc-build: bin/build
10116+
lc-build: bin/build.js
1011710117
languageName: unknown
1011810118
linkType: soft
1011910119

0 commit comments

Comments
 (0)