-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changes - A batch update is attempted for all **non-breaking** updates according to semver - All **breaking** updates are still performed in a sequential manner - If the batch update fails, the failed update tasks are performed sequentially to find out, which module was breaking - During a rollback, the next module update is installed in parallel - The `package.json` is now written in the end after the whole operation - The updtr tries to preserve the semver range style. If the style can not be preserved, it falls back to caret ranges. - This behavior can be changed by specifying a `--save` option - By specifying the `update-to=non-breaking` option, you can now choose to install non-breaking updates. It replaces the old `--wanted` flag - Re-design of the default reporter (it's now called `dense`) - Missing dependencies are now installed automatically before running `npm outdated` ### Fixes - Fixes #14 #47 #46 #13 #51 #58 - Provides a workaround for #48 by sorting all dependencies BREAKING CHANGE: New and changed CLI options ``` --use, -u Specify the package manager to use [choices: "npm", "yarn"] [default: "npm"] --exclude, --ex Space separated list of module names that should not be updated [array] --update-to, --to Specify which updates you want to install [choices: "latest", "non-breaking", "wanted"] [default: "latest"] --save, -s Specify how updated versions should be saved to the package.json [choices: "smart", "caret", "exact"] [default: "smart"] --reporter, -r Choose a reporter for the console output [choices: "dense", "none"] [default: "dense"] --test, -t Specify a custom test command. Surround with quotes. --test-stdout, --out Show test stdout if the update fails [boolean] --registry, --reg Specify a custom registry to use --version Show version number [boolean] --help Show help [boolean] ```
- Loading branch information
Showing
129 changed files
with
9,184 additions
and
2,219 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"env": { | ||
"development": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": "current" | ||
} | ||
] | ||
] | ||
}, | ||
"test": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": "current" | ||
} | ||
] | ||
] | ||
}, | ||
"production": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"targets": { | ||
"node": 4 | ||
}, | ||
"modules": false | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"plugins": [ | ||
"transform-runtime", | ||
"transform-object-rest-spread", | ||
"external-helpers" | ||
], | ||
"sourceMaps": "inline", | ||
"retainLines": true | ||
} |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"peerigon/base", | ||
"peerigon/es5" | ||
"peerigon/base" | ||
], | ||
"env": { | ||
"node": true | ||
|
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,19 +1,16 @@ | ||
language: node_js | ||
node_js: | ||
- "7" | ||
- "6" | ||
- "5" | ||
- "4" | ||
- "0.12" | ||
- "0.10" | ||
|
||
install: | ||
- npm install | ||
os: | ||
- linux | ||
node_js: | ||
- 7 | ||
- 6 | ||
- 4 | ||
|
||
script: | ||
- npm test | ||
- npm install | ||
- npm install -g yarn | ||
- npm test | ||
|
||
after_success: | ||
- npm install -g istanbul | ||
- npm install coveralls | ||
- istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage | ||
- bash <(curl -s https://codecov.io/bash) |
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,42 @@ | ||
{ | ||
// Use IntelliSense to learn about possible Node.js debug attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Bin", | ||
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/babel-node", | ||
"runtimeArgs": [ | ||
"--harmony_async_await" | ||
], | ||
"program": "${workspaceRoot}/src/bin/index.js" | ||
}, | ||
{ | ||
"name": "Current test", | ||
"type": "node", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | ||
"stopOnEntry": false, | ||
"args": [ | ||
"${file}", | ||
"--runInBand" | ||
], | ||
"cwd": "${workspaceRoot}", | ||
"preLaunchTask": null, | ||
"runtimeExecutable": null, | ||
"runtimeArgs": [ | ||
"--harmony_async_await", | ||
"--nolazy" | ||
], | ||
"env": { | ||
"NODE_ENV": "test" | ||
}, | ||
"externalConsole": false, | ||
"sourceMaps": true, | ||
"outDir": null | ||
} | ||
] | ||
} |
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,18 @@ | ||
environment: | ||
matrix: | ||
- nodejs_version: 7 | ||
- nodejs_version: 6 | ||
# Node 4 doesn't work because of an AppVeyor bug | ||
# - nodejs_version: 4 | ||
|
||
install: | ||
- ps: Install-Product node $env:nodejs_version | ||
- npm install | ||
|
||
test_script: | ||
- npm install -g yarn | ||
- node --version | ||
- npm --version | ||
- npm test | ||
|
||
build: off |
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 |
---|---|---|
@@ -1,40 +1,3 @@ | ||
#!/usr/bin/env node | ||
|
||
var program = require("commander"); | ||
var updtr = require("../lib"); | ||
var pkg = require("../package.json"); | ||
var reporters = Object.keys(updtr.reporters); | ||
|
||
program | ||
.version(pkg.version) | ||
.description(pkg.description) | ||
.option("-R, --reporter <reporter>", "choose reporter: " + reporters.join(", "), "default") | ||
.option("-w, --wanted", "updates to wanted version specified in package.json instead of the modules latest version") | ||
.option("-t, --test <test>", "change the command for the tests") | ||
.option("-e, --exclude <exclude>", "exclude modules comma seperated, e.g. updtr --exclude module1,module2") | ||
.option("--test-stdout", "shows stdout if your test command fails") | ||
.option("--save-exact", "save exact module version") | ||
.option("--registry", "change registry"); | ||
|
||
program.parse(process.argv); | ||
|
||
if (program.reporter in updtr.reporters === false) { | ||
console.log(program.reporter + " is not a reporter."); | ||
console.log("Available reporters: " + reporters.join(", ")); | ||
process.exit(1); | ||
} | ||
|
||
updtr.run({ | ||
cwd: process.cwd(), | ||
reporter: updtr.reporters[program.reporter], | ||
wanted: program.wanted, | ||
testCmd: program.test, | ||
exclude: program.exclude, | ||
testStdout: program.testStdout, | ||
saveExact: program.saveExact, | ||
registry: program.registry | ||
}, function (err) { | ||
if (err) { | ||
throw err; | ||
} | ||
}); | ||
require("../dist"); // eslint-disable-line |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.