@npmcli/config 8.3.2 → 8.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/definitions/definitions.js +7 -4
- package/lib/index.js +4 -4
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@ const { join } = require('node:path')
|
|
|
7
7
|
const isWindows = process.platform === 'win32'
|
|
8
8
|
|
|
9
9
|
// used by cafile flattening to flatOptions.ca
|
|
10
|
-
const { readFileSync } = require('fs')
|
|
10
|
+
const { readFileSync } = require('node:fs')
|
|
11
11
|
const maybeReadFile = file => {
|
|
12
12
|
try {
|
|
13
13
|
return readFileSync(file, 'utf8')
|
|
@@ -61,7 +61,7 @@ const editor = process.env.EDITOR ||
|
|
|
61
61
|
const shell = isWindows ? process.env.ComSpec || 'cmd'
|
|
62
62
|
: process.env.SHELL || 'sh'
|
|
63
63
|
|
|
64
|
-
const { networkInterfaces } = require('os')
|
|
64
|
+
const { networkInterfaces } = require('node:os')
|
|
65
65
|
const getLocalAddresses = () => {
|
|
66
66
|
try {
|
|
67
67
|
return Object.values(networkInterfaces()).map(
|
|
@@ -2012,11 +2012,14 @@ const definitions = {
|
|
|
2012
2012
|
If you ask npm to install a package and don't tell it a specific version,
|
|
2013
2013
|
then it will install the specified tag.
|
|
2014
2014
|
|
|
2015
|
-
|
|
2016
|
-
tag\` command, if no explicit tag is given.
|
|
2015
|
+
It is the tag added to the package@version specified in the
|
|
2016
|
+
\`npm dist-tag add\` command, if no explicit tag is given.
|
|
2017
2017
|
|
|
2018
2018
|
When used by the \`npm diff\` command, this is the tag used to fetch the
|
|
2019
2019
|
tarball that will be compared with the local files by default.
|
|
2020
|
+
|
|
2021
|
+
If used in the \`npm publish\` command, this is the tag that will be
|
|
2022
|
+
added to the package submitted to the registry.
|
|
2020
2023
|
`,
|
|
2021
2024
|
flatten (key, obj, flatOptions) {
|
|
2022
2025
|
flatOptions.defaultTag = obj[key]
|
package/lib/index.js
CHANGED
|
@@ -13,7 +13,7 @@ const {
|
|
|
13
13
|
unlink,
|
|
14
14
|
stat,
|
|
15
15
|
mkdir,
|
|
16
|
-
} = require('fs/promises')
|
|
16
|
+
} = require('node:fs/promises')
|
|
17
17
|
|
|
18
18
|
const fileExists = (...p) => stat(resolve(...p))
|
|
19
19
|
.then((st) => st.isFile())
|
|
@@ -669,12 +669,12 @@ class Config {
|
|
|
669
669
|
}
|
|
670
670
|
|
|
671
671
|
if (this.localPrefix && hasPackageJson) {
|
|
672
|
-
const
|
|
672
|
+
const pkgJson = require('@npmcli/package-json')
|
|
673
673
|
// if we already set localPrefix but this dir has a package.json
|
|
674
674
|
// then we need to see if `p` is a workspace root by reading its package.json
|
|
675
675
|
// however, if reading it fails then we should just move on
|
|
676
|
-
const pkg = await
|
|
677
|
-
if (!pkg) {
|
|
676
|
+
const { content: pkg } = await pkgJson.normalize(p).catch(() => ({ content: {} }))
|
|
677
|
+
if (!pkg?.workspaces) {
|
|
678
678
|
continue
|
|
679
679
|
}
|
|
680
680
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@npmcli/config",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.4",
|
|
4
4
|
"files": [
|
|
5
5
|
"bin/",
|
|
6
6
|
"lib/"
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@npmcli/map-workspaces": "^3.0.2",
|
|
40
|
+
"@npmcli/package-json": "^5.1.1",
|
|
40
41
|
"ci-info": "^4.0.0",
|
|
41
42
|
"ini": "^4.1.2",
|
|
42
43
|
"nopt": "^7.2.1",
|
|
43
44
|
"proc-log": "^4.2.0",
|
|
44
|
-
"read-package-json-fast": "^3.0.2",
|
|
45
45
|
"semver": "^7.3.5",
|
|
46
46
|
"walk-up-path": "^3.0.1"
|
|
47
47
|
},
|