You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"scripts": {
"build": "npm run build.job1 && npm run build.job2 && npm run build.job3",
"build.job1": "echo job 1",
"build.job2": "rollup -c --bundleConfigAsCjs",
"build.job3": "echo job 2",
"prepublishOnly": "npm run build"
}
It's expected that all build jobs (1, 2, 3) are executed and terminated correctly when calling npm run build or when they are called as part of npm's publishing lifecycle through prepublishOnly.
Actual Behaviour
Starting with version 3.21.3 we notice some unexpected behavior.
All build jobs (1, 2, 3) are running and terminated as expected when running them with npm run build directly.
Though when their execution is part of the prepublishOnly lifecycle, things are getting odd:
npm run build.job3 is never called
npm is publishing the package too early. The process is kicked off the moment npm run build.job2 (which is executing rollup) seems to have finished its job but somehow hasn't terminated correctly
I've tried to create a reproduction example but without the whole npm ecosystem set up with a package that actually can be published, it's quite hard to create such case.
I'm happy to ramp up a whole setup if needed to inspect this issue in more depth. Buth maybe the behavior I described does already ring a bell 🤞
The text was updated successfully, but these errors were encountered:
Rollup Version
3.21.3
Operating System (or Browser)
Mac OS
Node Version (if applicable)
16
Link To Reproduction
https://stackblitz.com/edit/node-7qf5yb?file=package.json,rollup.config.js,index.js
Expected Behaviour
Given npm scripts that are structured like this:
It's expected that all build jobs (1, 2, 3) are executed and terminated correctly when calling
npm run build
or when they are called as part of npm's publishing lifecycle throughprepublishOnly
.Actual Behaviour
Starting with version 3.21.3 we notice some unexpected behavior.
All build jobs (1, 2, 3) are running and terminated as expected when running them with
npm run build
directly.Though when their execution is part of the
prepublishOnly
lifecycle, things are getting odd:npm run build.job3
is never callednpm run build.job2
(which is executing rollup) seems to have finished its job but somehow hasn't terminated correctlyI've tried to create a reproduction example but without the whole npm ecosystem set up with a package that actually can be published, it's quite hard to create such case.
I'm happy to ramp up a whole setup if needed to inspect this issue in more depth. Buth maybe the behavior I described does already ring a bell 🤞
The text was updated successfully, but these errors were encountered: