-
Notifications
You must be signed in to change notification settings - Fork 975
Suggestion: Allow only patch updates on package.json #11493
Conversation
@@ -84,111 +84,111 @@ | |||
"homepage": "https://www.brave.com/", | |||
"dependencies": { | |||
"acorn": "3.2.0", | |||
"ad-block": "^3.0.5", | |||
"ad-block": "~3.0.5", |
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.
"bat-client": "^1.0.5", | ||
"bat-publisher": "^1.0.2", | ||
"bignumber.js": "^4.0.4", | ||
"async": "~2.5.0", |
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.
"bat-publisher": "^1.0.2", | ||
"bignumber.js": "^4.0.4", | ||
"async": "~2.5.0", | ||
"bat-balance": "~1.0.1", |
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.
"bignumber.js": "^4.0.4", | ||
"async": "~2.5.0", | ||
"bat-balance": "~1.0.1", | ||
"bat-client": "~1.0.5", |
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.
"async": "~2.5.0", | ||
"bat-balance": "~1.0.1", | ||
"bat-client": "~1.0.5", | ||
"bat-publisher": "~1.0.2", |
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.
bat-publisher@1.0.2
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L772
"bat-balance": "~1.0.1", | ||
"bat-client": "~1.0.5", | ||
"bat-publisher": "~1.0.2", | ||
"bignumber.js": "~4.0.4", |
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.
bignumber.js@4.0.4
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L794
"clipboard-copy": "^1.0.0", | ||
"compare-versions": "^3.0.1", | ||
"electron-localshortcut": "^0.6.0", | ||
"clipboard-copy": "~1.2.0", |
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.
clipboard-copy@1.2.0
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L827
"compare-versions": "^3.0.1", | ||
"electron-localshortcut": "^0.6.0", | ||
"clipboard-copy": "~1.2.0", | ||
"compare-versions": "~3.1.0", |
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.
compare-versions@3.1.0
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L827
"electron-localshortcut": "^0.6.0", | ||
"clipboard-copy": "~1.2.0", | ||
"compare-versions": "~3.1.0", | ||
"electron-localshortcut": "~0.6.1", |
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.
electron-localshortcut@0.6.1
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L1386
"electron-squirrel-startup": "brave/electron-squirrel-startup", | ||
"emoji-regex": "^6.5.1", | ||
"emoji-regex": "~6.5.1", |
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.
"file-loader": "0.11.2", | ||
"font-awesome": "^4.5.0", | ||
"font-awesome": "~4.7.0", |
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.
font-awesome@4.7.0
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L1541
"fs-extra": "^2.1.2", | ||
"immutable": "^3.7.5", | ||
"immutablediff": "^0.4.2", | ||
"fs-extra": "~2.1.2", |
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.
"immutable": "^3.7.5", | ||
"immutablediff": "^0.4.2", | ||
"fs-extra": "~2.1.2", | ||
"immutable": "~3.8.1", |
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.
"immutablediff": "^0.4.2", | ||
"fs-extra": "~2.1.2", | ||
"immutable": "~3.8.1", | ||
"immutablediff": "~0.4.4", |
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.
immutablediff@0.4.4
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L1737
"immutablepatch": "brave/immutable-js-patch", | ||
"l20n": "^3.5.1", | ||
"lru-cache": "^1.0.0", | ||
"l20n": "~3.5.1", |
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.
"l20n": "^3.5.1", | ||
"lru-cache": "^1.0.0", | ||
"l20n": "~3.5.1", | ||
"lru-cache": "~1.1.1", |
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.
"prettier-bytes": "^1.0.3", | ||
"prop-types": "^15.5.6", | ||
"punycode": "^2.0.0", | ||
"niceware": "~1.0.4", |
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.
"prop-types": "^15.5.6", | ||
"punycode": "^2.0.0", | ||
"niceware": "~1.0.4", | ||
"parse-torrent": "~5.8.3", |
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.
parse-torrent@5.8.3
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2208
"punycode": "^2.0.0", | ||
"niceware": "~1.0.4", | ||
"parse-torrent": "~5.8.3", | ||
"prettier-bytes": "~1.0.4", |
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.
prettier-bytes@1.0.4
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2240
"niceware": "~1.0.4", | ||
"parse-torrent": "~5.8.3", | ||
"prettier-bytes": "~1.0.4", | ||
"prop-types": "~15.6.0", |
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.
"parse-torrent": "~5.8.3", | ||
"prettier-bytes": "~1.0.4", | ||
"prop-types": "~15.6.0", | ||
"punycode": "~2.1.0", |
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.
"react-dom": "^15.5.4", | ||
"string.prototype.endswith": "^0.2.0", | ||
"string.prototype.startswith": "^0.2.0", | ||
"react": "~15.6.2", |
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.
"string.prototype.endswith": "^0.2.0", | ||
"string.prototype.startswith": "^0.2.0", | ||
"react": "~15.6.2", | ||
"react-dnd": "~2.5.1", |
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.
"string.prototype.startswith": "^0.2.0", | ||
"react": "~15.6.2", | ||
"react-dnd": "~2.5.1", | ||
"react-dnd-html5-backend": "~2.5.1", |
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.
react-dnd-html5-backend@2.5.1
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2294
"react": "~15.6.2", | ||
"react-dnd": "~2.5.1", | ||
"react-dnd-html5-backend": "~2.5.1", | ||
"react-dom": "~15.6.2", |
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.
"mockery": "~2.1.0", | ||
"muon-winstaller": "~2.5.5", | ||
"ncp": "~2.0.0", | ||
"node-gyp": "~3.6.2", |
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.
"node-libs-browser": "~2.0.0", | ||
"node-static": "^0.7.7", | ||
"nsp": "^2.2.0", | ||
"node-static": "~0.7.10", |
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.
node-static@0.7.10
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2152
"node-static": "^0.7.7", | ||
"nsp": "^2.2.0", | ||
"node-static": "~0.7.10", | ||
"nsp": "~2.8.0", |
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.
"react-test-renderer": "^15.5.4", | ||
"request": "^2.81.0", | ||
"sinon": "^1.17.6", | ||
"pre-push": "~0.1.1", |
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.
"request": "^2.81.0", | ||
"sinon": "^1.17.6", | ||
"pre-push": "~0.1.1", | ||
"react-addons-perf": "~15.4.2", |
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.
react-addons-perf@15.4.2
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2275
"sinon": "^1.17.6", | ||
"pre-push": "~0.1.1", | ||
"react-addons-perf": "~15.4.2", | ||
"react-addons-test-utils": "~15.6.2", |
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.
react-addons-test-utils@15.6.2
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2278
"pre-push": "~0.1.1", | ||
"react-addons-perf": "~15.4.2", | ||
"react-addons-test-utils": "~15.6.2", | ||
"react-test-renderer": "~15.6.2", |
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.
react-test-renderer@15.6.2
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2301
"react-addons-perf": "~15.4.2", | ||
"react-addons-test-utils": "~15.6.2", | ||
"react-test-renderer": "~15.6.2", | ||
"request": "~2.82.0", |
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.
"react-addons-test-utils": "~15.6.2", | ||
"react-test-renderer": "~15.6.2", | ||
"request": "~2.82.0", | ||
"sinon": "~1.17.7", |
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.
"spectron": "brave/spectron#chromium60", | ||
"standard": "9.0.0", | ||
"style-loader": "~0.18.2", | ||
"uglifyjs-webpack-plugin": "^1.0.0-beta.2", | ||
"uuid": "^3.0.1", | ||
"uglifyjs-webpack-plugin": "~1.0.0-beta.2", |
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.
uglifyjs-webpack-plugin@1.0.0-beta.2
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L2743
"uglifyjs-webpack-plugin": "^1.0.0-beta.2", | ||
"uuid": "^3.0.1", | ||
"uglifyjs-webpack-plugin": "~1.0.0-beta.2", | ||
"uuid": "~3.1.0", |
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.
"webdriverio": "4.7.1", | ||
"webpack": "~3.4.1", | ||
"webpack-dev-server": "~2.6.1", | ||
"webpack-notifier": "^1.2.1", | ||
"xml2js": "^0.4.15" | ||
"webpack-notifier": "~1.5.0", |
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.
webpack-notifier@1.5.0
on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16#file-npm-txt-L3646
"webpack-notifier": "^1.2.1", | ||
"xml2js": "^0.4.15" | ||
"webpack-notifier": "~1.5.0", | ||
"xml2js": "~0.4.19" |
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.
If we do this, then we could use an automated service like https://greenkeeper.io/ which monitors npm dependencies, then sends PRs when each npm dependency has a new minor / major version, allowing our tests to run with only that update |
I'm not sure this will have much of an effect, we have a I think |
I understood just now what Still I am not sure why #11454 (PR #11453) has happened then. If the package were not updated automatically, the tests would have not broken on Travis, haven't they? |
oh wow. I looked into this a little more (thanks for the stackoverflow link, found this via a comment) and it turns out there is an NPM issue discussing a change around
Perhaps this led to the issues you mentioned? I just tested a clean |
Closing for now to see if another issue would happen after upgrading npm version. |
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.
I think closing this is the correct action
We should always be using the package-lock.json file. We should never be removing this file... in the cases where we need to update a specific package, you can simply npm install package_name@new_version_here --save
and it'll update the package, update package.json, and also update the package-lock.json
This PR wouldn't be adding any value, unfortunately. It would make a difference if folks deleted the package-lock.json when upgrading a package... but that should not be happening
This PR replaces carets with tildes to allow only patch updates on package.json.
Because of minor updates a nasty bug like #11454 and #10029 sometimes happens, which is hard to find what introduced them (there seems to be almost no way of detecting it automatically). The thing is that semver is just a norm and developers can regard an update as a patch mistakenly, where it actually is a minor update.
Forcing only patch updates is one step to remove semver, which introduces a security risk as well. IMHO, major / minor updates should be done via PR to merge the change after it is verified via Travis tests result that nothing should get corrupted due to that update, locally and remotely.
This PR is based on https://gist.github.com/luixxiul/1cf8689da05e509d45176588730e5a16 which you should get with
npm list
on 7de1673. I added comments to each update, referring to that gist, to make it easy to review.As long as the packages.json is not manually updated, this PR should be valid.
Closes #11458
Auditors:
Test Plan:
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
Tests