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
Based on the documentation here, I have configured a workspace containing 3 libraries. lib-a, lib-b and lib-c. lib-c depends on both lib-a and lib-b using file protocol to link local dependencies. The tsc executor has been configured to write build output to the centralized dist directory in the root of the repo. Nx release has been configured with a custom packageRoot for both the version generator and the nx-release-publish executor.
Now, when we make a change to lib-a and run nx release only the version for lib-a is resolved. The untouched lib-b remains referenced using the file protocol. Which causes the publish step of nx release to fail.
Expected Behavior
nx release version should resolve either the current or bumped version for:
all directly touched projects (bumped version)
all projected on which the touched projects depend (the current version)
So that the generated package.json for touched projects never contains local dependency protocols.
npx nx release # will fail because generated (and versioned) `package.json` for `lib-c` will contain local dependency protocals to reference `lib-a` and `lib-b`.
npx nx release # still fails, but now the version for `lib-a` was actually resolved in the generated package.json file for `lib-c` but the untouched `lib-b` is still reference using the file protocal.
Current Behavior
Based on the documentation here, I have configured a workspace containing 3 libraries.
lib-a
,lib-b
andlib-c
.lib-c
depends on bothlib-a
andlib-b
using file protocol to link local dependencies. The tsc executor has been configured to write build output to the centralizeddist
directory in the root of the repo. Nx release has been configured with a custompackageRoot
for both theversion
generator and thenx-release-publish
executor.lib-c/package.json
Now, when we make a change to
lib-a
and runnx release
only the version forlib-a
is resolved. The untouchedlib-b
remains referenced using the file protocol. Which causes the publish step ofnx release
to fail.Expected Behavior
nx release version
should resolve either the current or bumped version for:So that the generated
package.json
for touched projects never contains local dependency protocols.GitHub Repo
https://github.com/thdk/nx-repro-release-local-dependency-protocol-npm-3/tree/v2/custom-dist-dir-for-packages
Steps to Reproduce
create workspace
navigate to new workspace
cd nx-release-cc-versioning-different-project-root
install nx and dependencies
generate libs
add
@thdk/lib-a
and@thdk/lib-b
as dependencies for@thdk/lib-c
.configure nx release in nx.json
start local verdaccio registry
add a file to lib-c
touch libs/lib-c/src/feature-1.txt git add lib/lib-c/src/feature-2.txt git commit -m 'feat: add feature 1'
release
npx nx release # will fail because generated (and versioned) `package.json` for `lib-c` will contain local dependency protocals to reference `lib-a` and `lib-b`.
add a file to lib-a
touch libs/lib-a/src/feature-1.txt git add lib/lib-a/src/feature-2.txt git commit -m 'feat(lib-a): add feature 1'
release
npx nx release # still fails, but now the version for `lib-a` was actually resolved in the generated package.json file for `lib-c` but the untouched `lib-b` is still reference using the file protocal.
Nx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: