Skip to content

Commit 6f3b1d2

Browse files
committed
fix(export): add export field on package.json
1 parent 454f101 commit 6f3b1d2

File tree

11 files changed

+2025
-277
lines changed

11 files changed

+2025
-277
lines changed

examples/nodejs-minimal/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
"license": "Apache-2.0",
77
"scripts": {
88
"build": "tsc -p ./tsconfig.json",
9+
"typecheck": "tsc --noEmit",
910
"start": "node ./dist/index"
1011
},
1112
"dependencies": {
12-
"@scaleway/configuration-loader": "^1.0",
13-
"@scaleway/sdk": "^2.0"
13+
"@scaleway/configuration-loader": "workspace:*",
14+
"@scaleway/sdk": "workspace:*"
1415
},
1516
"devDependencies": {
1617
"@types/node": "20.11.19",

examples/nodejs-minimal/pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/nodejs-minimal/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"compilerOptions": {
3+
"rootDir": "src",
34
"module": "ESNext",
45
"moduleResolution": "Bundler",
56
"target": "ES2022",

examples/serverless-function-minimal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@scaleway/sdk": "^2.0"
1414
},
1515
"devDependencies": {
16-
"serverless-scaleway-functions": "0.4.10",
16+
"serverless-scaleway-functions": "0.4.12",
1717
"@types/node": "20.11.19",
1818
"typescript": "5.5.4"
1919
}

examples/serverless-function-minimal/pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/serverless-function-minimal/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"compilerOptions": {
3-
"module": "ESNext",
4-
"moduleResolution": "Bundler",
3+
"rootDir": "src",
4+
"module": "NodeNext",
5+
"moduleResolution": "NodeNext",
56
"target": "ES2022",
67
"outDir": "./dist",
78
"strict": true,

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,27 +47,27 @@
4747
"@commitlint/cli": "19.5.0",
4848
"@commitlint/config-conventional": "19.5.0",
4949
"@scaleway/eslint-config-react": "3.18.4",
50-
"@vitest/coverage-istanbul": "2.0.5",
51-
"@vitest/coverage-v8": "2.0.5",
52-
"@vitest/ui": "2.0.5",
50+
"@vitest/coverage-istanbul": "2.1.3",
51+
"@vitest/coverage-v8": "2.1.3",
52+
"@vitest/ui": "2.1.3",
5353
"babel-plugin-annotate-pure-calls": "0.4.0",
5454
"browserslist": "4.23.3",
5555
"cross-env": "7.0.3",
5656
"cross-fetch": "4.0.0",
5757
"cz-conventional-changelog": "3.3.0",
58-
"esbuild-plugin-browserslist": "0.14.0",
58+
"esbuild-plugin-browserslist": "0.15.0",
5959
"eslint": "8.57.0",
6060
"eslint-plugin-tsdoc": "0.3.0",
6161
"husky": "9.1.6",
62-
"jsdom": "25.0.0",
62+
"jsdom": "25.0.1",
6363
"lerna": "8.1.8",
6464
"lint-staged": "15.2.10",
65-
"prettier": "3.3.2",
65+
"prettier": "3.3.3",
6666
"read-pkg": "9.0.1",
6767
"typedoc": "0.26.6",
68-
"typescript": "5.5.4",
69-
"vite": "5.4.6",
70-
"vitest": "2.0.5"
68+
"typescript": "5.6.3",
69+
"vite": "5.4.10",
70+
"vitest": "2.1.3"
7171
},
7272
"packageManager": "[email protected]"
7373
}

packages/clients/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@
88
"cloud",
99
"sdk"
1010
],
11+
"type": "module",
1112
"main": "dist/index.cjs",
1213
"module": "dist/index.js",
1314
"types": "dist/index.d.ts",
15+
"exports": {
16+
".": {
17+
"types": "./dist/index.d.ts",
18+
"node": "./dist/index.cjs",
19+
"default": "./dist/index.js"
20+
}
21+
},
1422
"scripts": {
23+
"publint":"npx publint",
1524
"version": "./scripts/update-constants-file.sh",
1625
"typecheck": "tsc --noEmit",
1726
"type:generate": "tsc --declaration -p tsconfig.build.json",
@@ -26,13 +35,12 @@
2635
},
2736
"repository": {
2837
"type": "git",
29-
"url": "https://github.com/scaleway/scaleway-sdk-js",
38+
"url": "git+https://github.com/scaleway/scaleway-sdk-js.git",
3039
"directory": "packages/clients"
3140
},
3241
"engines": {
3342
"node": ">=18.0"
3443
},
35-
"type": "module",
3644
"dependencies": {
3745
"@scaleway/random-name": "5.1.0"
3846
},

packages/configuration-loader/package.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,33 @@
33
"version": "1.0.5",
44
"license": "Apache-2.0",
55
"description": "Load configuration via file or environment for NodeJS.",
6-
"main": "dist/index.cjs",
7-
"module": "dist/index.js",
8-
"types": "dist/index.d.ts",
96
"publishConfig": {
107
"access": "public"
118
},
129
"repository": {
1310
"type": "git",
14-
"url": "https://github.com/scaleway/scaleway-sdk-js",
11+
"url": "git+https://github.com/scaleway/scaleway-sdk-js.git",
1512
"directory": "packages/configuration-loader"
1613
},
14+
"files": [
15+
"dist"
16+
],
1717
"engines": {
18-
"node": ">=14.13"
18+
"node": ">=18.0"
1919
},
2020
"type": "module",
21+
"main": "dist/index.cjs",
22+
"module": "dist/index.js",
23+
"types": "dist/index.d.ts",
24+
"exports": {
25+
".": {
26+
"types": "./dist/index.d.ts",
27+
"node": "./dist/index.cjs",
28+
"default": "./dist/index.js"
29+
}
30+
},
2131
"scripts": {
32+
"publint":"npx publint",
2233
"typecheck": "tsc --noEmit",
2334
"type:generate": "tsc --declaration -p tsconfig.build.json",
2435
"build": "vite build --config ../../vite.config.ts && pnpm run type:generate",

0 commit comments

Comments
 (0)