-
Notifications
You must be signed in to change notification settings - Fork 933
fix(config-lerna-scopes): remove deprecated @lerna/project dependency #4284
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
fix(config-lerna-scopes): remove deprecated @lerna/project dependency #4284
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
Is this a breaking change for anyone who is using lerna below v8? |
Yes, it will be a breaking change for lerna < 8.2.0 - I've added the necessary commit body in 22f0930 edit: sadly it's < 8.2.0 as the change within lerna was required |
@escapedcat By looking at the current Would this be a better option? Let me know what you think. |
tbh I don't mind a breaking change. On the other hand it has 26k weekly downloads. So people might still use it with an older lerna version? If that's feasible and not too much work for you. |
f412600
to
f88e039
Compare
2deda6d
to
f265215
Compare
@escapedcat the PR is ready for review and now contains full backwards compatibility with an informational hint that users who are actively using native workspaces should transition to the previously introduced I also updated the documentation to reflect the change and include the hint as well. |
Thanks @janbiasi ! Amazing work |
f265215
to
7a6902f
Compare
@escapedcat done :) |
Running into an issue that I think I've seen before when I tried to update lerna. You got any idea how to solve this? Using node 18.20.7 locally yarn run publish
yarn run v1.22.22
$ lerna publish --conventional-commits
lerna notice cli v8.2.1
lerna ERR! MultipleProjectsWithSameNameError: The following projects are defined in multiple locations:
lerna ERR! - a:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/basic/nx/a
lerna ERR! - nx/a
lerna ERR! - b:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/basic/nx/b
lerna ERR! - nx/b
lerna ERR! - c:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx14/nx/c
lerna ERR! - nx/c
lerna ERR! - d:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx14/nx/d
lerna ERR! - nx/d
lerna ERR! - e:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx15/nx/e
lerna ERR! - nx/e
lerna ERR! - f:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx15/nx/f
lerna ERR! - nx/f
lerna ERR! - g:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx17/nx/g
lerna ERR! - nx/g
lerna ERR! - h:
lerna ERR! - @commitlint/config-nx-scopes/fixtures/nx17/nx/h
lerna ERR! - nx/h
lerna ERR!
lerna ERR! To fix this, set a unique name for each project in a project.json inside the project's root. If the project does not currently have a project.json, you can create one that contains only a name.
lerna ERR! at validateAndNormalizeProjectRootMap (/Users/user/data/src/commitlint/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:455:15)
lerna ERR! at mergeCreateNodesResults (/Users/user/data/src/commitlint/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:341:9)
lerna ERR! at /Users/user/data/src/commitlint/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:285:85
lerna ERR! at async buildProjectGraphAndSourceMapsWithoutDaemon (/Users/user/data/src/commitlint/node_modules/nx/src/project-graph/project-graph.js:87:31)
lerna ERR! at async createProjectGraphAndSourceMapsAsync (/Users/user/data/src/commitlint/node_modules/nx/src/project-graph/project-graph.js:271:25)
lerna ERR! at async createProjectGraphAsync (/Users/user/data/src/commitlint/node_modules/nx/src/project-graph/project-graph.js:219:39)
lerna ERR! at async detectProjects (/Users/user/data/src/commitlint/node_modules/lerna/dist/index.js:3000:25)
lerna ERR! lerna Failed to process project graph.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
@escapedcat I'm not too familiar with NX, but it seems like that the fixtures are duplicated packages in terms of how NX resolves or identifies packages (via nx config file and package.json). You could try to disable nx usage within the |
No worries, not in a rush here. Could also tag the nx related person in here. |
@escapedcat I think I found a solution, but I'm not 100% sure if it doesn't brick something else; if we add an
Tested the change with Relates to nrwl/nx#20959 |
You mean like this? |
@escapedcat Yes, looks good to me :) |
Prerequisites
Description
Please see the long explanation in #4262
Motivation and Context
Solves vulnerability issues and removes deprecated peer dependency requirement.
Usage examples
No changes
How Has This Been Tested?
Unit tests within the project
Types of changes
Checklist: