Skip to content

Commit 70d2901

Browse files
committed
fix(release): drop per-package prepublishOnly to avoid parallel build race
Each package's `prepublishOnly` ran `reset && build` during `changeset publish`. Because publishes happen in parallel, `@xstyled/system`'s `rm -rf dist` raced with the dependent packages' rebuilds, causing TS2307 for `@xstyled/system` in `@xstyled/emotion` and `@xstyled/styled-components` .d.ts generation. The workspace-level `release` script already runs `pnpm run build` before `changeset publish`, so the per-package hook was redundant.
1 parent d46497b commit 70d2901

7 files changed

Lines changed: 7 additions & 14 deletions

File tree

‎packages/babel-preset-emotion-css-prop/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"license": "MIT",
1111
"scripts": {
1212
"reset": "rm -rf dist",
13-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
14-
"prepublishOnly": "npm run reset && npm run build"
13+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
1514
},
1615
"homepage": "https://xstyled.dev",
1716
"repository": "https://github.com/gregberge/xstyled/tree/master/packages/babel-preset-emotion-css-prop",

‎packages/core/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"license": "MIT",
1919
"scripts": {
2020
"reset": "rm -rf dist",
21-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
22-
"prepublishOnly": "npm run reset && npm run build"
21+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
2322
},
2423
"homepage": "https://xstyled.dev",
2524
"repository": "https://github.com/gregberge/xstyled/tree/master/packages/core",

‎packages/emotion/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"license": "MIT",
2626
"scripts": {
2727
"reset": "rm -rf dist",
28-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
29-
"prepublishOnly": "npm run reset && npm run build"
28+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
3029
},
3130
"publishConfig": {
3231
"access": "public"

‎packages/prop-types/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
"license": "MIT",
2828
"scripts": {
2929
"reset": "rm -rf dist",
30-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
31-
"prepublishOnly": "npm run reset && npm run build"
30+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
3231
},
3332
"homepage": "https://xstyled.dev",
3433
"repository": "https://github.com/gregberge/xstyled/tree/master/packages/prop-types",

‎packages/styled-components/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"license": "MIT",
2626
"scripts": {
2727
"reset": "rm -rf dist",
28-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
29-
"prepublishOnly": "npm run reset && npm run build"
28+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
3029
},
3130
"publishConfig": {
3231
"access": "public"

‎packages/system/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
"license": "MIT",
2727
"scripts": {
2828
"reset": "rm -rf dist",
29-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
30-
"prepublishOnly": "npm run reset && npm run build"
29+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
3130
},
3231
"homepage": "https://xstyled.dev",
3332
"repository": "https://github.com/gregberge/xstyled/tree/master/packages/system",

‎packages/util/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
"license": "MIT",
1919
"scripts": {
2020
"reset": "rm -rf dist",
21-
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js",
22-
"prepublishOnly": "npm run reset && npm run build"
21+
"build": "../../node_modules/.bin/rollup -c ../../build/rollup.config.js"
2322
},
2423
"homepage": "https://xstyled.dev",
2524
"repository": "https://github.com/gregberge/xstyled/tree/master/packages/util",

0 commit comments

Comments
 (0)