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
the folder pkgDir may refer to a dist folder that is created in prePublishOnly phase and doesn't exist yet.
pkgDir should not be necessary in the type of scenario that it sounds like you are describing. instead, the built files should be included either through files in the package.json or by making sure they are not included in the .npmignore file. defining main or exports in the package.json helps the consumer use the files without worrying about which directory that the files are located in. i maintain many packages that have a build step like this, triggered by prepack (which i recommend over prePublishOnly) and have never needed to define pkgRoot
This discussion was converted from issue #2453 on June 06, 2022 18:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Current behavior
the package
@semantic-release/npm
checks for the existence of${pkgDir}/package.json
file before performing a releasethe folder
pkgDir
may refer to a dist folder that is created inprePublishOnly
phase and doesn't exist yet.building the project everytime before running semantic-release is overkilling.
minimal repreoduction
run
cd package && npm run release
don't forget to set
NPM_TOKEN
Expected behavior
check for
${pkgDir}/package.json
after running allpre
hooks, i.e just before runningpuplish
and afterprePublishOnly
andprepack
Environment
Beta Was this translation helpful? Give feedback.
All reactions