Skip to content

Commit 4e8a6c5

Browse files
authored
fix: angular release process (#6468)
RELEASE_ALL * fix: make sure there is only one package.json after build * fix: angular release we cannot publish out of the build directory because pnpm doesn't see it as a workspace, so it won't replace workspace dependencies. To fix this, we: - make the publish script point to the root directory (config.js) - make sure our top-level package.json has types and exports and that they point to ./build - make sure to remove the build/package.json after the build script ran * chore: use rimraf * chore: specify files to limit what we include * chore: fix relative workspace dependencies * chore: fix ci.json * fix: package.json path
1 parent 3a60413 commit 4e8a6c5

6 files changed

Lines changed: 332 additions & 117 deletions

File tree

‎.codesandbox/ci.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
"/examples/svelte/basic",
99
"/examples/vue/basic"
1010
],
11-
"packages": ["packages/**", "!packages/angular*", "packages/angular-query-devtools-experimental/build", "packages/angular-query-experimental/build"],
11+
"packages": ["packages/**"],
1212
"node": "18"
1313
}

‎integrations/angular-cli-standalone-17/package.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@angular/common": "^17.0.2",
1111
"@angular/core": "^17.0.2",
1212
"@angular/platform-browser": "^17.0.2",
13-
"@tanstack/angular-query-experimental": "workspace:../../packages/angular-query-experimental/build",
14-
"@tanstack/angular-query-devtools-experimental": "workspace:../../packages/angular-query-devtools-experimental/build",
13+
"@tanstack/angular-query-experimental": "workspace:*",
14+
"@tanstack/angular-query-devtools-experimental": "workspace:*",
1515
"rxjs": "^7.8.1",
1616
"tslib": "^2.6.2",
1717
"zone.js": "^0.14.2"

‎packages/angular-query-devtools-experimental/package.json‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@
1616
},
1717
"type": "module",
1818
"sideEffects": false,
19+
"files": [
20+
"build",
21+
"src"
22+
],
1923
"scripts": {
2024
"clean": "rimraf ./build && rimraf ./coverage",
2125
"test:eslint": "eslint --ext .ts,.tsx ./src",
2226
"test:types": "tsc",
2327
"test:build": "publint --strict",
24-
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json"
28+
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./build/package.json"
2529
},
2630
"dependencies": {
2731
"@tanstack/query-devtools": "workspace:*",
@@ -30,12 +34,25 @@
3034
"devDependencies": {
3135
"@angular/compiler-cli": "^17.0.2",
3236
"@angular/core": "^17.0.2",
33-
"@tanstack/angular-query-experimental": "workspace:../angular-query-experimental/build",
37+
"@tanstack/angular-query-experimental": "workspace:*",
3438
"ng-packagr": "^17.0.0",
3539
"typescript": "5.2.2",
3640
"zone.js": "^0.14.2"
3741
},
3842
"peerDependencies": {
3943
"@angular/core": "^17"
44+
},
45+
"module": "build/fesm2022/tanstack-angular-query-devtools-experimental.mjs",
46+
"types": "build/index.d.ts",
47+
"exports": {
48+
"./package.json": {
49+
"default": "./package.json"
50+
},
51+
".": {
52+
"types": "./build/index.d.ts",
53+
"esm2022": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs",
54+
"esm": "./build/esm2022/tanstack-angular-query-devtools-experimental.mjs",
55+
"default": "./build/fesm2022/tanstack-angular-query-devtools-experimental.mjs"
56+
}
4057
}
4158
}

‎packages/angular-query-experimental/package.json‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@
1616
},
1717
"type": "module",
1818
"sideEffects": false,
19+
"files": [
20+
"build",
21+
"src"
22+
],
1923
"scripts": {
2024
"clean": "rimraf ./build && rimraf ./coverage",
2125
"test:eslint": "eslint --ext .ts,.tsx ./src",
2226
"test:types": "tsc",
2327
"test:lib": "vitest run --coverage",
2428
"test:lib:dev": "vitest watch --coverage",
2529
"test:build": "publint --strict",
26-
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json"
30+
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./build/package.json"
2731
},
2832
"dependencies": {
2933
"@tanstack/query-core": "workspace:*",
@@ -44,5 +48,18 @@
4448
},
4549
"peerDependencies": {
4650
"@angular/core": "^17"
51+
},
52+
"module": "build/fesm2022/tanstack-angular-query-experimental.mjs",
53+
"types": "build/index.d.ts",
54+
"exports": {
55+
"./package.json": {
56+
"default": "./package.json"
57+
},
58+
".": {
59+
"types": "./build/index.d.ts",
60+
"esm2022": "./build/esm2022/tanstack-angular-query-experimental.mjs",
61+
"esm": "./build/esm2022/tanstack-angular-query-experimental.mjs",
62+
"default": "./build/fesm2022/tanstack-angular-query-experimental.mjs"
63+
}
4764
}
4865
}

0 commit comments

Comments
 (0)