How to check for outdated dependencies in packages.
See original GitHub issueI am trying to convert our existing projects into a Lerna project. so I have created all packages for different repositories and setup all tools and config for my project. everything is working fine.
I want to know how to list all dependencies in my packages that are outdated. I wish to keep my project up to date with all new updates.
Expected Behavior
I want to run npm outdated
or any lerna command which lists all dependencies that have changed/updated.
Current Behavior
when i run npm outdated
or lerna exec npm outdated
in my local package it obviously fails because i am using local packages which is not there in npm repo … (react-elements-md is my local package)
npm ERR! code E404
npm ERR! 404 Not found : react-elements-md
npm ERR! 404
npm ERR! 404 'react-elements-md' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/akashtalreja/.npm/_logs/2018-07-16T14_43_51_022Z-debug.log
lerna ERR! exec Errored while executing 'npm outdated' in 'react-redux-sagas'
lerna ERR! execute callback with error
lerna ERR! Error: Command failed: npm outdated
lerna ERR! at Promise.all.then.arr (/usr/local/lib/node_modules/lerna/node_modules/execa/index.js:236:11)
lerna ERR! at <anonymous>
{ Error: Command failed: npm outdated
at Promise.all.then.arr (/usr/local/lib/node_modules/lerna/node_modules/execa/index.js:236:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
code: 1,
killed: false,
stdout: null,
stderr: null,
failed: true,
signal: null,
cmd: 'npm outdated',
timedOut: false,
exitCode: 1 }
Possible Solution
possible solution i can think of some command like lerna outdated
which would list down the dependencies in a package that can updated.
Steps to Reproduce (for bugs)
hit npm outdated
in any package that used your local packages
am i missing something ? it looks quite simple there must be a way to update npm dependencies. and keep your project updated. i also read in some issue @evocateur mentioning "If you're never publishing packages to a registry (public or private), I don't recommend using lerna. There is no shame in relative path imports." . . since i am not going to publish anyway, should i really use lerna in my project ?
Executable | Version |
---|---|
lerna --version |
2.11.0 |
npm --version |
6.2.0 |
yarn --version |
1.6.0 |
node --version |
9.6.1 |
| OS | Version | | macOS High Sierra | 10.13.3-= |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:15 (1 by maintainers)
I use
lerna exec yarn outdated
or justyarn outdated
. also there are some aspects with using yarn workspaces - https://github.com/yarnpkg/yarn/issues/3859#issuecomment-441000287I’m using
lerna@3
Seems to do what you’d expect.