Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No update in Workspace References dependencies for dist/<lib>/package.json when using conventional-commits & projectsRelationship is independent, When only one lib is affected. #26764

Open
1 of 4 tasks
parveen1112 opened this issue Jun 29, 2024 · 0 comments

Comments

@parveen1112
Copy link

parveen1112 commented Jun 29, 2024

Current Behavior

In an independent projects setup with conventional-commits versioning & projectsRelationship": "independent" with workspace dependencies, when

mylib2 package.json

    "dependencies": {
        "mylib": "workspace:^"
    }

mylib2 consumes mylib. Changes only affect mylib2.
nx release is run

then in the /package.json

-   "dependencies": {
        "mylib": "workspace:^"
-   }
+     "dependencies": {
        "mylib": "workspace:^"
+     },

Expected Behavior

in the /package.json, it should always update the workspace dependencies.

-   "dependencies": {
        "mylib": "workspace:^"
-   }
+     "dependencies": {
        "mylib": "<git-tag version>"
+     },

GitHub Repo

https://github.com/parveen1112/nx-changelog-issue-repro

Steps to Reproduce

1The repro is already configured with the appropriate git history to trigger the issue. There is 1 feat for lib2.

Clone the repo
Run:
Use Node version >= 18

corepack enable
pnpm install
pnpm exec nx run-many --target=build --all
pnpm exec nx release --dry-run

You will dist/mylib2/package.json still has workspace dependencies. As its not replaced by version.

Nx Report

 NX   Report complete - copy this into the issue template

Node   : 21.1.0
OS     : darwin-arm64
pnpm   : 9.3.0

nx (global)        : 19.1.1
nx                 : 19.3.0
@nx/js             : 19.3.0
@nx/jest           : 19.3.0
@nx/eslint         : 19.3.0
@nx/eslint-plugin  : 19.3.0
@nx/react          : 19.3.0
@nx/rollup         : 19.3.0
@nx/web            : 19.3.0
@nx/webpack        : 19.3.0
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/rollup/plugin
@nx/eslint/plugin
@nx/jest/plugin
@nx/webpack/plugin

FYI tried with 19.3.2 as well same error. Only fix is with Changelog doesn't have null anymore.

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@parveen1112 parveen1112 changed the title No update in Workspace References dependencies for <dist>/package.json when using conventional-commits & projectsRelationship": "independent" & when only one lib is affected. No update in Workspace References dependencies for dist/<lib>/package.json when using conventional-commits & projectsRelationship is independent, When only one lib is affected. Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant