-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] Pinned dependencies does not get packed up from workspace #3940
Comments
@darcyclarke @isaacs Should we treat workspaces like a local registry? I'm leaning toward yes. This way, publishing a root package with spec'd dependencies that are a workspace will work for local dev and after being published when workspaces aren't vendored. |
Environment
Additionally, I'm using lerna 4 (with hoisting) to update versions of WorkaroundsDeleting and rebuilding the |
|
didn't experience this issue on latest npm version (currently 8.5.1), so this might've been silently resolved and it's safe to close this issue? |
If this isn't the same underlying problem, please let me know and I will open a new issue. When running $ npm -v
9.5.1 $ npm init --yes
$ npm init -w ./packages/a --yes
$ npm init -w ./packages/b --yes
$ npm i --save b -w ./packages/a/
$ npm --workspaces --no-git-tag-version version major $ cat packages/*/package.json {
"name": "a",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"b": "^1.0.0"
}
}
{
"name": "b",
"version": "2.0.0",
"description": "",
"main": "index.js",
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
} And, yes, package-lock is also not updated cat package-lock.json {
"name": "xworkspaces",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "xworkspaces",
"version": "1.0.0",
"license": "ISC",
"workspaces": [
"packages/a",
"packages/b"
]
},
"node_modules/a": {
"resolved": "packages/a",
"link": true
},
"node_modules/b": {
"resolved": "packages/b",
"link": true
},
"packages/a": {
"version": "2.0.0",
"license": "ISC",
"dependencies": {
"b": "^1.0.0"
}
},
"packages/b": {
"version": "2.0.0",
"license": "ISC",
"devDependencies": {}
}
}
} I also tried, unsuccessfully, to get this working on the latest 8.x.x release, If anyone has a clever workaround, please lmk. I'm trying to move away from |
Is there an existing issue for this?
Current Behavior
Expected Behavior
It prioritises the package from the workspaces over the NPM registry
Steps To Reproduce
See here for a small repro https://github.com/mxschmitt/npm-bump-version-etarget and instructions.
Relates #3403 but this one is only about updating, mine is about installing.
Environment
The text was updated successfully, but these errors were encountered: