-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
Refs: https://github.com/npm/cli/blob/latest/CHANGELOG.md#702-2020-10-16 PR-URL: #35667 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -696,14 +696,29 @@ Naix Geng <[email protected]> | |
Dylan Treisman <[email protected]> | ||
mum-never-proud <[email protected]> | ||
Pablo Cúbico <[email protected]> | ||
Peter Fich <[email protected]> | ||
Maxwell Gerber <[email protected]> | ||
Sean Poulter <[email protected]> | ||
vanishcode <[email protected]> | ||
Timo Sand <[email protected]> | ||
Jean-Charles Sisk <[email protected]> | ||
Martin Packman <[email protected]> | ||
Danielle Adams <[email protected]> | ||
Edward Thomson <[email protected]> | ||
Masafumi Koba <[email protected]> | ||
Gianfranco Costamagna <[email protected]> | ||
Antonio <[email protected]> | ||
Sandra Tatarevićová <[email protected]> | ||
Antoine du Hamel <[email protected]> | ||
Assaf Sapir <[email protected]> | ||
jamesgeorge007 <[email protected]> | ||
Lukas Spieß <[email protected]> | ||
Mickael Jeanroy <[email protected]> | ||
Myles Borins <[email protected]> | ||
Nathan LaFreniere <[email protected]> | ||
Lucio Martinez <[email protected]> | ||
Brian Jenkins <[email protected]> | ||
nlf <[email protected]> | ||
zhaoxuxu <[email protected]> | ||
liuye.adam <[email protected]> | ||
Michaël Zasso <[email protected]> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,67 @@ | ||
## 7.0.2 (2020-10-16) | ||
|
||
### DOCUMENTATION | ||
|
||
* [`9476734b7`](https://github.com/npm/cli/commit/9476734b7d5fa6df80ad17ad277a6bee9a16235c) | ||
[#1967](https://github.com/npm/cli/pull/1967) | ||
add mention to workspaces prepare lifecycle | ||
([@ruyadorno](https://github.com/ruyadorno)) | ||
|
||
### BUG FIXES | ||
|
||
* [`5cf71c689`](https://github.com/npm/cli/commit/5cf71c689bcfcd423405e59d05b7cc5704cb4c02) | ||
[#1971](https://github.com/npm/cli/pull/1971) | ||
owner rm at local pkg not work | ||
([@ShangguanQuail](https://github.com/ShangguanQuail)) | ||
|
||
### DEPENDENCIES | ||
|
||
* [`722b7ae63`](https://github.com/npm/cli/commit/722b7ae63da8b386fe188066dc2dae0121d9353b) | ||
[#1974](https://github.com/npm/cli/pull/1974) | ||
patch node-gyp | ||
([@targos](https://github.com/MylesBorins)) | ||
* [`4ae825c01`](https://github.com/npm/cli/commit/4ae825c01c7ca3031361f9df72594a190c6ed1e4) | ||
[#1976](https://github.com/npm/cli/pull/1976) | ||
patch node-gyp | ||
([@MylesBorins](https://github.com/MylesBorins)) | ||
* [`181eabf13`](https://github.com/npm/cli/commit/181eabf132c823af086380368de73d2f42e5aac1) | ||
`@npmcli/[email protected]` | ||
* fix workspaces `prepare` lifecycle scripts | ||
* fix peer deps overchecks resulting in ERESOLVE | ||
* [`6cc115409`](https://github.com/npm/cli/commit/6cc115409b7eb2df8e11db6232ee3d00e4316a7d) | ||
`[email protected]` | ||
* [`dbf9d6d1f`](https://github.com/npm/cli/commit/dbf9d6d1f060ea43b700409306574396a798127d) | ||
`[email protected]` | ||
|
||
## 7.0.1 (2020-10-15) | ||
|
||
### DOCUMENTATION | ||
|
||
* [`03fca6a3b`](https://github.com/npm/cli/commit/03fca6a3b227f71562863bec7a1de1732bd719f1) | ||
Adds docs on workspaces, explaining its basic concept and how to use it. | ||
([@ruyadorno](https://github.com/ruyadorno)) | ||
|
||
### BUG FIXES | ||
|
||
* [`2ccb63659`](https://github.com/npm/cli/commit/2ccb63659f9a757201658d5d019099b492d04a5b) | ||
[#1951](https://github.com/npm/cli/issues/1951) | ||
[#1956](https://github.com/npm/cli/pull/1956) | ||
Handle errors from audit endpoint appropriately | ||
([@isaacs](https://github.com/isaacs)) | ||
|
||
### DEPENDENCIES | ||
|
||
* [`120e62736`](https://github.com/npm/cli/commit/120e6273604f15a2ce55668dfb2c23d06bf1e06c) | ||
`[email protected]` | ||
* [`6560b8d95`](https://github.com/npm/cli/commit/6560b8d952a613cefbd900186aa38df53bc201d1) | ||
`@npmcli/[email protected]` | ||
* do not drop scope information when fetching scoped package tarballs | ||
* fix cycles/ordering resolution when peer deps require nesting | ||
* [`282a1e008`](https://github.com/npm/cli/commit/282a1e00820b9abfb3465d044b30b2cade107909) | ||
`[email protected]` | ||
* [`b259edcb4`](https://github.com/npm/cli/commit/b259edcb4bac37e6f26d56af5f6666afbda8c126) | ||
`[email protected]` | ||
|
||
## v7.0.0 (2020-10-12) | ||
|
||
### BUG FIXES | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
section: using-npm | ||
title: workspaces | ||
description: Working with workspaces | ||
--- | ||
# scope(7) | ||
|
||
## Workspaces | ||
|
||
### Description | ||
|
||
**Workspaces** is a generic term that refers to the set of features in the | ||
npm cli that provides support to managing multiple packages from your local | ||
files system from within a singular top-level, root package. | ||
|
||
This set of features makes up for a much more streamlined workflow handling | ||
linked packages from the local file system. Automating the linking process | ||
as part of `npm install` and avoiding manually having to use `npm link` in | ||
order to add references to packages that should be symlinked into the current | ||
`node_modules` folder. | ||
|
||
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) | ||
`workspaces` configuration. | ||
|
||
### Installing workspaces | ||
|
||
Workspaces are usually defined via the `workspaces` property of the | ||
[`package.json`](/using-npm/package-json) file, e.g: | ||
|
||
```json | ||
{ | ||
"name": "my-workspaces-powered-project", | ||
"workspaces": [ | ||
"workspace-a" | ||
] | ||
} | ||
``` | ||
|
||
Given the above `package.json` example living at a current working | ||
directory `.` that contains a folder named `workspace-a` that disposes | ||
of a `package.json` inside it, defining a nodejs package, e.g: | ||
|
||
``` | ||
. | ||
+-- package.json | ||
`-- workspace-a | ||
`-- package.json | ||
``` | ||
|
||
The expected result once running `npm install` in this current working | ||
directory `.` is that the folder `workspace-a` will get symlinked to the | ||
`node_modules` folder of the current working dir. | ||
|
||
Below is a post `npm install` example, given that same previous example | ||
structure of files and folders: | ||
|
||
``` | ||
. | ||
+-- node_modules | ||
| `-- workspace-a -> ../workspace-a | ||
+-- package-lock.json | ||
+-- package.json | ||
`-- workspace-a | ||
`-- package.json | ||
``` | ||
|
||
### Using workspaces | ||
|
||
Given the [specifities of how Node.js handles module resolution](https://nodejs.org/dist/latest-v14.x/docs/api/modules.html#modules_all_together) it's possible to consume any defined workspace | ||
by it's declared `package.json` `name`. Continuing from the example defined | ||
above, let's also create a Node.js script that will require the `workspace-a` | ||
example module, e.g: | ||
|
||
``` | ||
// ./workspace-a/index.js | ||
module.exports = 'a' | ||
// ./lib/index.js | ||
const moduleA = require('workspace-a') | ||
console.log(moduleA) // -> a | ||
``` | ||
|
||
When running it with: | ||
|
||
`node lib/index.js` | ||
|
||
This demonstrates how the nature of `node_modules` resolution allows for | ||
**workspaces** to enable a portable workflow for requiring each **workspace** | ||
in such a way that is also easy to [publish](/cli-commands/publish) these | ||
nested workspaces to be consumed elsewhere. | ||
|
||
### See also | ||
|
||
* [npm install](/cli-commands/install) | ||
* [npm publish](/cli-commands/publish) |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.