Commit Graph

64 Commits

Author SHA1 Message Date
Tim Oxley
65f4cb39f2 Stop optional deps moving into deps on update --save
This probably undesirable behaviour stems from normalize-package-data:

> The values in optionalDependencies get added to dependencies. The
optionalDependencies array is left untouched.

Solution Caveat: regular dependencies that are also optional (does that
even make sense?) will not be updated with --save because there's no
way to detect which optional dependencies aren't also regular
dependencies – we just avoid updating anything optional during --save.
2014-05-11 05:18:46 +08:00
Tim Oxley
cb295989c3 Ensure only matching deps update with update --save*
Issue #4438
2014-05-11 01:55:03 +08:00
Forrest L Norvell
83d68b675f devariadify cache.* 2014-05-07 18:00:51 -07:00
Younghoon Park
9575a23f95 npm outdated --parseable fix 2014-02-16 17:39:35 -08:00
Tim Oxley
d4f6f3ff83 Respect --color settings in outdated.
Fixes #4493
2014-02-16 17:05:16 -08:00
isaacs
5e5e89f4b9 outdated: optimize out an extra HTTP request
While the request to foo/latest will be less data over the wire,
it's also much less likely to be cached by the registry CDN.

This, it's more likely to be a trip to the origin server, which is
much slower than serving out of the CDN.

Additionally, we can then use that data object to check the
versions hash here in outdated.js, rather than doing a full tgz
download and unpack for 'cache.add'.
2014-02-16 16:18:44 -08:00
Evan Lucas
027a33a5c5 Show error to user on npm update
If a dependency is listed in the package.json, but the version does not
exist, show the user an error stating so.

Fixes #1770
2014-02-07 13:31:40 -06:00
Evan You
1d184ef3f4 make outdated work with --depth 2013-12-02 16:06:31 -08:00
Quim Calpe
fd3017fc3e Make npm outdated output prettier.
Fixes #4176. Uses ansicolors, ansistyles, and text-table.
2013-11-26 01:03:45 -05:00
Evan You
0b6c9b7c8c npm outdated --json 2013-11-25 15:54:41 -08:00
Robert Kowalski
5829ecf032 Always update git urls
Do directly an update if a git url is specified in the package.json
For outdated, print wanted=git and latest=git

Additionally, fixing a small, still unknown  bug in update,
regarding the positions of where, latest and req, introduced
by 2f7fd625a0

Fixes #1727
2013-11-25 23:16:32 +01:00
Robert Kowalski
2f7fd625a0 Discover new versions with outdated
Add versions that are not matching the version specified in the
package.json as 'latest', at cost of one request more per package.

Show versions that are specified by the package.json as 'wanted'

Fixes #1428
2013-09-22 02:10:01 -04:00
Jason Diamond
2ce74ff424 include devDependencies in outdated and update 2013-09-07 23:18:00 -04:00
Jon Spencer
4b51122881 update/outdated: don't access missing package info
avoid null dereferences checking the status of a currently installed
package

Fixes #3820, a regression caused by #3798 and #3578
2013-09-04 22:28:33 -07:00
isaacs
2aede97b77 outdated: only test 'from' for urls
If the 'from' value is not a url, then the fact that it changes is not
relevant.  For example 'foo@*' and 'foo@1' and 'foo@' might all point to
the same package.  However, a changed url IS relevant, because it
indicates that it is now a different thing.

Fixes #3798, a regression caused by #3578.
2013-08-23 14:12:15 -07:00
Matt Lunn
dcef57f64b Treat dep. as outdated if its _from changes
This is per Isaacs comment in #1727
2013-08-14 18:31:03 -04:00
isaacs
b8db927278 Update everything to work with semver@2 2013-06-20 14:01:21 -07:00
Matt Lunn
54e0f439cd Use git repo or tarball as update source 2013-06-17 08:07:43 -07:00
isaacs
9f291bc3e7 readdir more carefully
This is another check against the kind of error that led to #3065
2013-01-18 14:14:43 -08:00
Carl Lange
e4e0019dff added ENOTDIR check anywhere readJson is used 2013-01-18 14:06:41 -08:00
isaacs
00f781f6dc Crash on readJson errors other than ENOENT 2012-12-27 17:25:53 -08:00
Don Park
8375a50acf fix commands using outdated command, like npm update 2012-07-19 10:32:04 -07:00
isaacs
1977584a97 Replace lib/utils/output.js with console.log 2012-07-16 13:28:37 -07:00
Don Park
03666c2b6d fix broken outdated cmd #2557 2012-07-15 10:38:04 -07:00
isaacs
e6a7e44bfd Fix the 'cb never called' error from 'oudated' 2012-06-17 11:39:58 -07:00
isaacs
0892bab008 Replace relativize with path.relative 2012-06-11 20:54:39 -07:00
isaacs
99110432e5 Use read-package-json dep 2012-06-11 12:06:56 -07:00
isaacs
2568e40a39 Replace the log util with npmlog module
This feels so good.  lib/utils/log.js is the worst kind of
glue code that keeps the npm project from being properly
abstracted into independent pieces.

In the process, also cleaned up a lot of unproductive logging,
and made the npm-debug.log generated on errors be a bit more
easy to read.
2012-06-06 14:56:35 -07:00
isaacs
b09834a4be Add XXX comments regarding --json support 2012-02-24 18:13:10 -08:00
isaacs
2e45745967 Close #1582 Make prefixes better on windows
1. Make prefixes and paths more windows-like on windows.
2. Abstract out all path-munging behavior to lib/npm.js where it belongs.
2011-10-21 18:34:22 -07:00
isaacs
4eb8f6b7bf Avoid accidentally opening npm.js with WSH 2011-10-14 14:06:12 -07:00
isaacs
645cef3e77 Put .js on filenames 2011-08-06 13:51:59 -07:00
isaacs
157fbb1030 Use asyncMap from slide module 2011-07-20 02:48:53 -07:00
isaacs
98b6a1070a Abstract out graceful-fs 2011-07-20 01:58:33 -07:00
isaacs
23fab36536 #817 Update adds missing deps, and downgrades if necessary 2011-04-18 17:49:09 -07:00
isaacs
6bf81ec671 Closes GH-742 Update regression
changed the output of 'outdated' command to be more useful,
but that broke 'update'.  Fixed.
2011-03-23 10:23:41 -07:00
isaacs
f8546b4627 proper semver, and report folder properly 2011-03-21 18:03:21 -07:00
isaacs
b04cb44f03 Closes GH-734 Newer things must be newer to count 2011-03-21 16:31:01 -07:00
isaacs
660caf659e use abstracted completion functions 2011-03-21 15:56:13 -07:00
isaacs
9f71be3cef Completion for outdated 2011-03-21 15:56:11 -07:00
isaacs
12d26dad7f typo in outdated 2011-03-21 15:56:11 -07:00
isaacs
7d81a1366f remove unnecessary stuff re GH-710 2011-03-21 15:56:09 -07:00
isaacs
cf7f86c100 Fix GH-710 error on outdated if error is not a 404 2011-03-21 15:56:08 -07:00
isaacs
e0328481d9 typo 2011-03-21 15:56:02 -07:00
isaacs
b6d75d8365 Terseness. simplify "prefix" config and output cmd. 2011-03-21 15:56:00 -07:00
isaacs
9090cc49a9 make outdated/update work with linked pkgs 2011-03-21 15:56:00 -07:00
isaacs
a3a71f36f7 Don't fetch for .bin and whatnot 2011-03-21 15:55:51 -07:00
isaacs
a3415c47b8 Handle cases where there are no dependencies 2011-03-21 15:55:50 -07:00
isaacs
4a34f5ed72 outdated check 2011-03-21 15:55:50 -07:00
isaacs
3030e726e7 Closes GH-660 undefined log message 2011-03-01 09:00:07 -08:00