-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(version): reify on workspace version change
Adds a minimalistic reify step that updates the installed tree after a version change within one of the configured workspaces when using any of the workspaces config options. It's also possible to use the `--save` config option in order to auto update semver ranges of dependencies declarations accross dependent `package.json` files. Fixes: #3403 Relates to: npm/rfcs#556 Relates to: #3757 Relates to: #4193
- Loading branch information
Showing
10 changed files
with
287 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
/* IMPORTANT | ||
* This snapshot file is auto-generated, but designed for humans. | ||
* It should be checked into source control and tracked carefully. | ||
* Re-generate by setting TAP_SNAPSHOT=1 and running tests. | ||
* Make sure to inspect the output below. Do not ignore changes! | ||
*/ | ||
'use strict' | ||
exports[`test/lib/commands/version.js TAP empty versions workspaces with one arg, all workspaces > must match snapshot 1`] = ` | ||
{ | ||
"name": "workspaces-test", | ||
"version": "1.0.0", | ||
"lockfileVersion": 2, | ||
"requires": true, | ||
"packages": { | ||
"": { | ||
"name": "workspaces-test", | ||
"version": "1.0.0", | ||
"workspaces": [ | ||
"workspace-a", | ||
"workspace-b" | ||
] | ||
}, | ||
"node_modules/workspace-a": { | ||
"resolved": "workspace-a", | ||
"link": true | ||
}, | ||
"node_modules/workspace-b": { | ||
"resolved": "workspace-b", | ||
"link": true | ||
}, | ||
"workspace-a": { | ||
"version": "2.0.0" | ||
}, | ||
"workspace-b": { | ||
"version": "2.0.0" | ||
} | ||
}, | ||
"dependencies": { | ||
"workspace-a": { | ||
"version": "file:workspace-a" | ||
}, | ||
"workspace-b": { | ||
"version": "file:workspace-b" | ||
} | ||
} | ||
} | ||
` | ||
|
||
exports[`test/lib/commands/version.js TAP empty versions workspaces with one arg, all workspaces, saves package.json > must match snapshot 1`] = ` | ||
{ | ||
"name": "workspaces-test", | ||
"version": "1.0.0", | ||
"lockfileVersion": 2, | ||
"requires": true, | ||
"packages": { | ||
"": { | ||
"name": "workspaces-test", | ||
"version": "1.0.0", | ||
"workspaces": [ | ||
"workspace-a", | ||
"workspace-b" | ||
], | ||
"dependencies": { | ||
"workspace-a": "^2.0.0", | ||
"workspace-b": "^2.0.0" | ||
} | ||
}, | ||
"node_modules/workspace-a": { | ||
"resolved": "workspace-a", | ||
"link": true | ||
}, | ||
"node_modules/workspace-b": { | ||
"resolved": "workspace-b", | ||
"link": true | ||
}, | ||
"workspace-a": { | ||
"version": "2.0.0" | ||
}, | ||
"workspace-b": { | ||
"version": "2.0.0" | ||
} | ||
}, | ||
"dependencies": { | ||
"workspace-a": { | ||
"version": "file:workspace-a" | ||
}, | ||
"workspace-b": { | ||
"version": "file:workspace-b" | ||
} | ||
} | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.