wix-incubator / lerna-script

Lerna addon for adding custom tasks
MIT License
164 stars 13 forks source link

dependencies:latest does not work with ranges #430

Open Enrice opened 3 years ago

Enrice commented 3 years ago

Hi.

I stumbled upon a major issue. Managed dependencies work with fixed versions only, not ranges. I tried to run deps:latest on lerna-script itself, and got the following:

C:\dev\tools\nodejs\node.exe C:\dev\tools\nodejs\node_modules\npm\bin\npm-cli.js run deps:latest --scripts-prepend-node-path=auto

> lerna-script-modules@1.0.0 deps:latest C:\dev\git\lerna-script
> lerna-script deps:latest

info lerna-script executing task: "deps:latest"
info latest checking for latest dependencies
ERR! lerna-script TypeError: Invalid Version: ^15.0.0
ERR! lerna-script     at new SemVer (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\classes\semver.js:41:13)
ERR! lerna-script     at compare (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\compare.js:3:3)
ERR! lerna-script     at eq (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\eq.js:2:29)
ERR! lerna-script     at diff (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\diff.js:5:7)
ERR! lerna-script     at C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:85:66
ERR! lerna-script     at Array.map (<anonymous>)
ERR! lerna-script     at createChoicesList (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:83:6)
ERR! lerna-script     at C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:48:27
ERR! lerna-script     at tryCatcher (C:\dev\git\lerna-script\node_modules\bluebird\js\release\util.js:16:23)
ERR! lerna-script     at Promise._settlePromiseFromHandler (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:547:31)
ERR! lerna-script     at Promise._settlePromise (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:604:18)
ERR! lerna-script     at Promise._settlePromise0 (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:649:10)
ERR! lerna-script     at Promise._settlePromises (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:729:18)
ERR! lerna-script     at Promise._fulfill (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:673:18)
ERR! lerna-script     at PromiseArray._resolve (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise_array.js:127:19)
ERR! lerna-script     at PromiseArray._promiseFulfilled (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise_array.js:145:14)
ERR! lerna-script  Task "deps:latest" failed. TypeError: Invalid Version: ^15.0.0
ERR! lerna-script     at new SemVer (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\classes\semver.js:41:13)
ERR! lerna-script     at compare (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\compare.js:3:3)
ERR! lerna-script     at eq (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\eq.js:2:29)
ERR! lerna-script     at diff (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\node_modules\semver\functions\diff.js:5:7)
ERR! lerna-script     at C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:85:66
ERR! lerna-script     at Array.map (<anonymous>)
ERR! lerna-script     at createChoicesList (C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:83:6)
ERR! lerna-script     at C:\dev\git\lerna-script\node_modules\lerna-script-tasks-dependencies\lib\latest.js:48:27
ERR! lerna-script     at tryCatcher (C:\dev\git\lerna-script\node_modules\bluebird\js\release\util.js:16:23)
ERR! lerna-script     at Promise._settlePromiseFromHandler (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:547:31)
ERR! lerna-script     at Promise._settlePromise (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:604:18)
ERR! lerna-script     at Promise._settlePromise0 (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:649:10)
ERR! lerna-script     at Promise._settlePromises (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:729:18)
ERR! lerna-script     at Promise._fulfill (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise.js:673:18)
ERR! lerna-script     at PromiseArray._resolve (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise_array.js:127:19)
ERR! lerna-script     at PromiseArray._promiseFulfilled (C:\dev\git\lerna-script\node_modules\bluebird\js\release\promise_array.js:145:14) {
ERR! lerna-script   stack: 'TypeError: Invalid Version: ^15.0.0\n' +
ERR! lerna-script     '    at new SemVer (C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\node_modules\\semver\\classes\\sem
ver.js:41:13)\n' +
ERR! lerna-script     '    at compare (C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\node_modules\\semver\\functions\\comp
are.js:3:3)\n' +
ERR! lerna-script     '    at eq (C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\node_modules\\semver\\functions\\eq.js:2:2
9)\n' +
ERR! lerna-script     '    at diff (C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\node_modules\\semver\\functions\\diff.js
:5:7)\n' +
ERR! lerna-script     '    at C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\lib\\latest.js:85:66\n' +
ERR! lerna-script     '    at Array.map (<anonymous>)\n' +
ERR! lerna-script     '    at createChoicesList (C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\lib\\latest.js:83:6)\n' +
ERR! lerna-script     '    at C:\\dev\\git\\lerna-script\\node_modules\\lerna-script-tasks-dependencies\\lib\\latest.js:48:27\n' +
ERR! lerna-script     '    at tryCatcher (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\util.js:16:23)\n' +
ERR! lerna-script     '    at Promise._settlePromiseFromHandler (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise.js:547:31)\n'
 +
ERR! lerna-script     '    at Promise._settlePromise (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise.js:604:18)\n' +
ERR! lerna-script     '    at Promise._settlePromise0 (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise.js:649:10)\n' +
ERR! lerna-script     '    at Promise._settlePromises (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise.js:729:18)\n' +
ERR! lerna-script     '    at Promise._fulfill (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise.js:673:18)\n' +
ERR! lerna-script     '    at PromiseArray._resolve (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise_array.js:127:19)\n' +
ERR! lerna-script     '    at PromiseArray._promiseFulfilled (C:\\dev\\git\\lerna-script\\node_modules\\bluebird\\js\\release\\promise_array.js:145:14)
'
ERR! lerna-script }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lerna-script-modules@1.0.0 deps:latest: `lerna-script deps:latest`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lerna-script-modules@1.0.0 deps:latest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     [omitted]

Process finished with exit code 1

Please look into this.