Skip to content

Commit

Permalink
Merge pull request #469 from ForgeRock/add-sideeffects
Browse files Browse the repository at this point in the history
chore: fix-side-effects
  • Loading branch information
ryanbas21 authored Oct 9, 2024
2 parents d8795d9 + 71e3714 commit e99a643
Show file tree
Hide file tree
Showing 6 changed files with 2,814 additions and 33 deletions.
5 changes: 4 additions & 1 deletion e2e/autoscript-suites/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"tags": [],
"targets": {
"e2e": {
"dependsOn": ["javascript-sdk:build", "ping-protect:build"],
"options": {},
"configurations": {
"ui": {
Expand All @@ -15,6 +14,10 @@
}
}
},
"cbt": {
"command": "pnpm browserstack-node-sdk playwright test --config ./e2e/autoscript-suites/playwright.config.cbt.ts",
"cwd": "e2e/autoscript-suites"
},
"lint": {
"options": {
"fix": true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
},
"packageManager": "[email protected]+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e",
"dependencies": {
"browserstack-node-sdk": "1.34.17",
"nx-cloud": "^19.1.0"
},
"pnpm": {
Expand Down
11 changes: 6 additions & 5 deletions packages/javascript-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"homepage": "https://github.com/ForgeRock/forgerock-javascript-sdk#readme",
"main": "./dist/index.js",
"module": "./dist/index.js",
"sideEffects": false,
"exports": {
".": {
"import": {
Expand All @@ -27,14 +28,14 @@
"default": "./dist/index.cjs"
}
},
"./src/*": {
"./src/": {
"import": {
"types": "./dist/*/*.d.ts",
"default": "./dist/*/*.js"
"types": "./dist/*.d.ts",
"default": "./dist/*.js"
},
"require": {
"types": "./dist/*/*.d.cts",
"default": "./dist/*/*.cjs"
"types": "./dist/*.d.cts",
"default": "./dist/*.cjs"
}
}
},
Expand Down
10 changes: 6 additions & 4 deletions packages/javascript-sdk/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ export default defineConfig({
dts({
declarationOnly: false,
entryRoot: 'src',
rollupTypes: true,
rollupTypes: false,
tsconfigPath: './tsconfig.lib.json',
afterBuild: () => {
copyFileSync('dist/index.ts.d.ts', 'dist/index.d.cts');
copyFileSync('dist/index.ts.d.ts', 'dist/index.d.ts');
afterBuild: (map) => {
const files = map.keys();
for (const file of files) {
copyFileSync(file, file.replace('d.ts', 'd.cts'));
}
},
}),
],
Expand Down
1 change: 1 addition & 0 deletions packages/ping-protect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"url": "git+https://github.com:ForgeRock/forgerock-javascript-sdk.git",
"directory": "packages/ping-protect"
},
"sideEffects": ["./dist/lib/ping-signals-sdk.js"],
"exports": {
".": {
"types": "./dist/index.ts.d.ts",
Expand Down
Loading

0 comments on commit e99a643

Please sign in to comment.