-
Notifications
You must be signed in to change notification settings - Fork 297
Support "apm install --package-lock-only" #814
base: master
Are you sure you want to change the base?
Conversation
Trying this out in atom/atom, it looks like npm is normalizing diff --git a/package.json b/package.json
index cce9107ba..5916b793b 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
"@atom/nsfw": "^1.0.18",
"@atom/source-map-support": "^0.3.4",
"@atom/watcher": "1.0.8",
- "about": "file:packages/about",
+ "about": "file:./packages/about",
"archive-view": "https://www.atom.io/api/packages/archive-view/versions/0.65.1/tarball",
"async": "0.2.6",
"atom-dark-syntax": "https://www.atom.io/api/packages/atom-dark-syntax/versions/0.29.1/tarball",
@@ -130,7 +130,7 @@
"one-dark-syntax": "https://www.atom.io/api/packages/one-dark-syntax/versions/1.8.4/tarball",
"one-dark-ui": "https://www.atom.io/api/packages/one-dark-ui/versions/1.12.5/tarball",
"one-light-syntax": "https://www.atom.io/api/packages/one-light-syntax/versions/1.8.4/tarball",
- "one-light-ui": "file:packages/one-light-ui",
+ "one-light-ui": "file:./packages/one-light-ui",
"oniguruma": "6.2.1",
"open-on-github": "https://www.atom.io/api/packages/open-on-github/versions/1.3.1/tarball",
"package-generator": "https://www.atom.io/api/packages/package-generator/versions/1.3.0/tarball", |
Hacky as hell but it works:
|
So what if we instead changed The only change in our code would be looking for |
👍 I've replace the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, looks great!
Hmm looks like we have some flakes lurking in here. Starting and stopping the express server we use to mock npm.org and atom.io for specs is asynchronous, but not all of the tests treat it as such, which means that the server can randomly fail to start because port 3000 isn't free any more. Maybe I'll tidy that up later if I get the chance 🤔 |
Hmm this branch is still failing (consistently, for me) with an EADDRINUSE. I wonder if that's the external symptom from a different failure... ? Our Jasmine setup makes it really hard to tell which test is actually failing 🤔 |
npm install
supports a--package-lock-only
option. If provided,node_modules/
is left untouched, and npm only creates or updates thepackage-lock.json
file to reflect the current state ofpackage.json
. This is useful for making quick edits to dependency ranges without having to do a full install of a large project (like Atom).Remaining work
--package-lock-only
flag.--package-lock-only
to thenpm install
command forked for non-packageDependencies.