Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v7.0.15 #2252

Merged
merged 12 commits into from
Nov 27, 2020
3 changes: 3 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -735,3 +735,6 @@ Vlad GURDIGA <[email protected]>
Sébastien Puech <[email protected]>
Jannis Hell <[email protected]>
Hollow Man <[email protected]>
kai zhu <[email protected]>
Alex Woollam <[email protected]>
Daniel Fischer <[email protected]>
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## 7.0.15 (2020-11-27)

### DEPENDENCIES

* [`00e6028ef`](https://github.com/npm/cli/commit/00e6028ef83bf76eaae10241fd7ba59e39768603)
`@npmcli/[email protected]`
* do not override user-defined shorthand values when saving `package.json`

### BUG FIXES

* [`9c3413fbc`](https://github.com/npm/cli/commit/9c3413fbcb37e79fc0b3d980e0b5810d7961277c)
[#2034](https://github.com/npm/cli/issues/2034)
[#2245](https://github.com/npm/cli/issues/2245)
`npm link <pkg>` should not save `package.json`
([@ruyadorno](https://github.com/ruyadorno))

### DOCUMENTATION

* [`1875347f9`](https://github.com/npm/cli/commit/1875347f9f4f2b50c28fe8857c5533eeebf42da2)
[#2196](https://github.com/npm/cli/issues/2196)
remove doc on obsolete `unsafe-perm` flag
([@kaizhu256](https://github.com/kaizhu256))
* [`f51e50603`](https://github.com/npm/cli/commit/f51e5060340c783a8a00dadd98e5786960caf43f)
[#2200](https://github.com/npm/cli/issues/2200)
`config.md` cleanup
([@alexwoollam](https://github.com/alexwoollam))
* [`997cbdb40`](https://github.com/npm/cli/commit/997cbdb400bcd22e457e8a06b69a7be697cfd66d)
[#2238](https://github.com/npm/cli/issues/2238)
Fix broken link to `package.json` documentation
([@d-fischer](https://github.com/d-fischer))
* [`9da972dc4`](https://github.com/npm/cli/commit/9da972dc44c21cf0e337f1c3fca44eb9df3e40d5)
[#2241](https://github.com/npm/cli/issues/2241)
`npm star` docs cleanup
([@ruyadorno](https://github.com/ruyadorno))

## 7.0.14 (2020-11-23)

### DEPENDENCIES
Expand Down
17 changes: 15 additions & 2 deletions docs/content/commands/npm-star.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,33 @@ description: Mark your favorite packages

```bash
npm star [<pkg>...]
npm unstar [<pkg>...]
```

### Description

"Starring" a package means that you have some interest in it. It's
a vaguely positive way to show that you care.

It's a boolean thing. Starring repeatedly has no additional effect.

### More

There's also these extra commands to help you manage your favorite packages:

#### Unstar

You can also "unstar" a package using [`npm unstar`](/commands/npm-unstar)

"Unstarring" is the same thing, but in reverse.

It's a boolean thing. Starring repeatedly has no additional effect.
#### Listing stars

You can see all your starred packages using [`npm stars`](/commands/npm-stars)

### See Also

* [npm unstar](/commands/npm-unstar)
* [npm stars](/commands/npm-stars)
* [npm view](/commands/npm-view)
* [npm whoami](/commands/npm-whoami)
* [npm adduser](/commands/npm-adduser)
1 change: 1 addition & 0 deletions docs/content/commands/npm-stars.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ you will most certainly enjoy this command.
### See Also

* [npm star](/commands/npm-star)
* [npm unstar](/commands/npm-unstar)
* [npm view](/commands/npm-view)
* [npm whoami](/commands/npm-whoami)
* [npm adduser](/commands/npm-adduser)
37 changes: 37 additions & 0 deletions docs/content/commands/npm-unstar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: npm-unstar
section: 1
description: Remove an item from your favorite packages
---

### Synopsis

```bash
npm unstar [<pkg>...]
```

### Description

"Unstarring" a package is the opposite of [`npm star`](/commands/npm-star),
it removes an item from your list of favorite packages.

### More

There's also these extra commands to help you manage your favorite packages:

#### Star

You can "star" a package using [`npm star`](/commands/npm-star)

#### Listing stars

You can see all your starred packages using [`npm stars`](/commands/npm-stars)

### See Also

* [npm star](/commands/npm-star)
* [npm stars](/commands/npm-stars)
* [npm view](/commands/npm-view)
* [npm whoami](/commands/npm-whoami)
* [npm adduser](/commands/npm-adduser)

4 changes: 2 additions & 2 deletions docs/content/using-npm/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Format `package-lock.json` or `npm-shrinkwrap.json` as a human readable file.
* Type: Boolean

When "true" displays the message at the end of each `npm install`
aknowledging the number of dependencies looking for funding.
acknowledging the number of dependencies looking for funding.
See [`npm fund`](/commands/npm-fund) for details.

#### fetch-retries
Expand Down Expand Up @@ -1096,7 +1096,7 @@ using legacy search endpoint.

If true, success/failure metrics will be reported to the registry stored in
`metrics-registry`. These requests contain the number of successful and
failing runs of the npm CLI and the time period overwhich those counts were
failing runs of the npm CLI and the time period over which those counts were
gathered. No identifying information is included in these requests.

#### shell
Expand Down
6 changes: 2 additions & 4 deletions docs/content/using-npm/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@ npm will default some script values based on package contents.

### User

If npm was invoked with root privileges, then it will change the uid
to the user account or uid specified by the `user` config, which
defaults to `nobody`. Set the `unsafe-perm` flag to run scripts with
root privileges.
When npm is run as root, scripts are always run with the effective uid
and gid of the working directory owner.

### Environment

Expand Down
4 changes: 2 additions & 2 deletions docs/content/using-npm/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ order to add references to packages that should be symlinked into the current

We also refer to these packages being auto-symlinked during `npm install` as a
single **workspace**, meaning it's a nested package within the current local
file system that is explicitly defined in the [`package.json`](/using-npm/package-json)
file system that is explicitly defined in the [`package.json`](/configuring-npm/package-json#workspaces)
`workspaces` configuration.

### Installing workspaces

Workspaces are usually defined via the `workspaces` property of the
[`package.json`](/using-npm/package-json) file, e.g:
[`package.json`](/configuring-npm/package-json#workspaces) file, e.g:

```json
{
Expand Down
9 changes: 9 additions & 0 deletions lib/link.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,23 @@ const linkInstall = async args => {
)
}

// npm link should not save=true by default unless you're
// using any of --save-dev or other types
const save =
Boolean(npm.config.find('save') !== 'default' || npm.flatOptions.saveType)

// create a new arborist instance for the local prefix and
// reify all the pending names as symlinks there
const localArb = new Arborist({
...npm.flatOptions,
path: npm.prefix,
save,
})
await localArb.reify({
...npm.flatOptions,
path: npm.prefix,
add: names.map(l => `file:${resolve(globalTop, 'node_modules', l)}`),
save,
})

await reifyFinish(localArb)
Expand Down
9 changes: 6 additions & 3 deletions lib/rebuild.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
'use strict'

const { resolve } = require('path')
const Arborist = require('@npmcli/arborist')
const npa = require('npm-package-arg')
const semver = require('semver')

const npm = require('./npm.js')
const usageUtil = require('./utils/usage.js')
const { resolve } = require('path')
const output = require('./utils/output.js')
const npa = require('npm-package-arg')
const semver = require('semver')

const cmd = (args, cb) => rebuild(args).then(() => cb()).catch(cb)

Expand Down
11 changes: 7 additions & 4 deletions lib/stars.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
'use strict'

const npm = require('./npm.js')
const fetch = require('npm-registry-fetch')
const log = require('npmlog')
const fetch = require('npm-registry-fetch')

const npm = require('./npm.js')
const output = require('./utils/output.js')
const getIdentity = require('./utils/get-identity.js')
const usageUtil = require('./utils/usage.js')
const usage = usageUtil('stars', 'npm stars [<user>]')
const completion = require('./utils/completion/none.js')

const usage = usageUtil('stars', 'npm stars [<user>]')

const cmd = (args, cb) => stars(args).then(() => cb()).catch(cb)

const stars = (args) => {
return stars_(args).catch(er => {
if (er.code === 'ENEEDAUTH')
log.warn('star', 'auth is required to look up your username')
log.warn('stars', 'auth is required to look up your username')

throw er
})
Expand All @@ -25,6 +27,7 @@ const stars_ = async ([user = getIdentity(npm.flatOptions)]) => {
...npm.flatOptions,
query: { key: `"${await user}"` },
})

if (rows.length === 0)
log.warn('stars', 'user has not starred any packages')

Expand Down
15 changes: 3 additions & 12 deletions node_modules/@npmcli/arborist/lib/arborist/reify.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 48 additions & 0 deletions node_modules/@npmcli/arborist/lib/update-root-package-json.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/@npmcli/arborist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading