Skip to content

Commit

Permalink
Merge pull request #125 from npm/latest
Browse files Browse the repository at this point in the history
Create a new pull request by comparing changes across two branches
  • Loading branch information
GulajavaMinistudio committed Aug 23, 2024
2 parents 45717e3 + e674987 commit 0279059
Show file tree
Hide file tree
Showing 65 changed files with 4,220 additions and 612 deletions.
7 changes: 5 additions & 2 deletions docs/lib/content/configuring-npm/npmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Environment variables can be replaced using `${VARIABLE_NAME}`. For
example:

```bash
prefix = ${HOME}/.npm-packages
cache = ${HOME}/.npm-packages
```

Each of these files is loaded, and config options are resolved in priority
Expand Down Expand Up @@ -120,10 +120,13 @@ _authToken=MYTOKEN
@myorg:registry=https://somewhere-else.com/myorg
@another:registry=https://somewhere-else.com/another
//registry.npmjs.org/:_authToken=MYTOKEN
; would apply to both @myorg and @another
; //somewhere-else.com/:_authToken=MYTOKEN
//somewhere-else.com/:_authToken=MYTOKEN
; would apply only to @myorg
//somewhere-else.com/myorg/:_authToken=MYTOKEN1
; would apply only to @another
//somewhere-else.com/another/:_authToken=MYTOKEN2
```
Expand Down
4 changes: 3 additions & 1 deletion docs/lib/content/configuring-npm/package-json.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ See [semver](https://github.com/npm/node-semver#versions) for more details about
* `tag` A specific version tagged and published as `tag` See [`npm
dist-tag`](/commands/npm-dist-tag)
* `path/path/path` See [Local Paths](#local-paths) below
* `npm:@scope/pkg@version` Custom alias for a pacakge See [`package-spec`](/using-npm/package-spec#aliases)

For example, these are all valid:

Expand All @@ -634,7 +635,8 @@ For example, these are all valid:
"two": "2.x",
"thr": "3.3.x",
"lat": "latest",
"dyl": "file:../dyl"
"dyl": "file:../dyl",
"kpg": "npm:pkg@1.0.0"
}
}
```
Expand Down
7 changes: 6 additions & 1 deletion lib/commands/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ class Publish extends BaseCommand {
await this.#publish(args)
}

async execWorkspaces () {
async execWorkspaces (args) {
const useWorkspaces = args.length === 0 || args.includes('.')
if (!useWorkspaces) {
log.warn('Ignoring workspaces for specified package(s)')
return this.exec(args)
}
await this.setWorkspaces()

for (const [name, workspace] of this.workspaces.entries()) {
Expand Down
3 changes: 0 additions & 3 deletions node_modules/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@
!/mute-stream
!/negotiator
!/node-gyp
!/node-gyp/node_modules/
/node-gyp/node_modules/*
!/node-gyp/node_modules/proc-log
!/nopt
!/normalize-package-data
!/npm-audit-report
Expand Down
1 change: 0 additions & 1 deletion node_modules/cacache/lib/entry-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const { moveFile } = require('@npmcli/fs')
const pMap = require('p-map')
const lsStreamConcurrency = 5


module.exports.NotFoundError = class NotFoundError extends Error {
constructor (cache, key) {
super(`No cache entry for ${key} found in ${cache}`)
Expand Down
2 changes: 1 addition & 1 deletion node_modules/cacache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cacache",
"version": "18.0.3",
"version": "18.0.4",
"cache-version": {
"content": "2",
"index": "5"
Expand Down
2 changes: 1 addition & 1 deletion node_modules/debug/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "debug",
"version": "4.3.5",
"version": "4.3.6",
"repository": {
"type": "git",
"url": "git://github.com/debug-js/debug.git"
Expand Down
4 changes: 3 additions & 1 deletion node_modules/debug/src/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,16 @@ function useColors() {
return false;
}

let m;

// Is webkit? http://stackoverflow.com/a/16459606/376773
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
// Is firebug? http://stackoverflow.com/a/398120/376773
(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
// Is firefox >= v31?
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
// Double check webkit in userAgent just in case we are in a worker
(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}
Expand Down
6 changes: 4 additions & 2 deletions node_modules/foreground-child/dist/commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,17 @@ function foregroundChild(...fgArgs) {
};
const removeOnExit = (0, signal_exit_1.onExit)(childHangup);
(0, proxy_signals_js_1.proxySignals)(child);
(0, watchdog_js_1.watchdog)(child);
const dog = (0, watchdog_js_1.watchdog)(child);
let done = false;
child.on('close', async (code, signal) => {
/* c8 ignore start */
if (done)
return;
/* c8 ignore stop */
done = true;
const result = cleanup(code, signal);
const result = cleanup(code, signal, {
watchdogPid: dog.pid,
});
const res = isPromise(result) ? await result : result;
removeOnExit();
if (res === false)
Expand Down
6 changes: 4 additions & 2 deletions node_modules/foreground-child/dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,17 @@ export function foregroundChild(...fgArgs) {
};
const removeOnExit = onExit(childHangup);
proxySignals(child);
watchdog(child);
const dog = watchdog(child);
let done = false;
child.on('close', async (code, signal) => {
/* c8 ignore start */
if (done)
return;
/* c8 ignore stop */
done = true;
const result = cleanup(code, signal);
const result = cleanup(code, signal, {
watchdogPid: dog.pid,
});
const res = isPromise(result) ? await result : result;
removeOnExit();
if (res === false)
Expand Down
2 changes: 1 addition & 1 deletion node_modules/foreground-child/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "foreground-child",
"version": "3.2.1",
"version": "3.3.0",
"description": "Run a child as if it's the foreground process. Give it stdio. Exit when it exits.",
"main": "./dist/commonjs/index.js",
"types": "./dist/commonjs/index.d.ts",
Expand Down
12 changes: 6 additions & 6 deletions node_modules/glob/dist/commonjs/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.globIterate = exports.globIterateSync = exports.globSync = exports.globStream = exports.globStreamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0;
exports.glob = exports.sync = exports.iterate = exports.iterateSync = exports.stream = exports.streamSync = exports.Ignore = exports.hasMagic = exports.Glob = exports.unescape = exports.escape = void 0;
exports.globStreamSync = globStreamSync;
exports.globStream = globStream;
exports.globSync = globSync;
exports.globIterateSync = globIterateSync;
exports.globIterate = globIterate;
const minimatch_1 = require("minimatch");
const glob_js_1 = require("./glob.js");
const has_magic_js_1 = require("./has-magic.js");
Expand All @@ -16,26 +21,21 @@ Object.defineProperty(exports, "Ignore", { enumerable: true, get: function () {
function globStreamSync(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).streamSync();
}
exports.globStreamSync = globStreamSync;
function globStream(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).stream();
}
exports.globStream = globStream;
function globSync(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).walkSync();
}
exports.globSync = globSync;
async function glob_(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).walk();
}
function globIterateSync(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).iterateSync();
}
exports.globIterateSync = globIterateSync;
function globIterate(pattern, options = {}) {
return new glob_js_1.Glob(pattern, options).iterate();
}
exports.globIterate = globIterate;
// aliases: glob.sync.stream() glob.stream.sync() glob.sync() etc
exports.streamSync = globStreamSync;
exports.stream = Object.assign(globStream, { sync: globStreamSync });
Expand Down
9 changes: 5 additions & 4 deletions node_modules/glob/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (https://blog.izs.me/)",
"publishConfig": {
"tag": "legacy-v10"
},
"name": "glob",
"description": "the most correct and second fastest glob implementation in JavaScript",
"version": "10.4.2",
"version": "10.4.5",
"type": "module",
"tshy": {
"main": true,
Expand Down Expand Up @@ -92,7 +95,5 @@
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
"engines": {
"node": ">=16 || 14 >=14.18"
}
"module": "./dist/esm/index.js"
}
4 changes: 2 additions & 2 deletions node_modules/jackspeak/dist/commonjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ class Jack {
cause = { name: field, found: value, validOptions: validOptions };
}
if (valid && !valid(value)) {
cause ??= { name: field, found: value };
cause = cause || { name: field, found: value };
}
if (cause) {
throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause });
Expand Down Expand Up @@ -565,7 +565,7 @@ class Jack {
};
}
if (config.validate && !config.validate(value)) {
cause ??= { name: field, found: value };
cause = cause || { name: field, found: value };
}
if (cause) {
throw new Error(`Invalid config value for ${field}: ${value}`, {
Expand Down
4 changes: 2 additions & 2 deletions node_modules/jackspeak/dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export class Jack {
cause = { name: field, found: value, validOptions: validOptions };
}
if (valid && !valid(value)) {
cause ??= { name: field, found: value };
cause = cause || { name: field, found: value };
}
if (cause) {
throw new Error(`Invalid value provided for --${field}: ${JSON.stringify(value)}`, { cause });
Expand Down Expand Up @@ -557,7 +557,7 @@ export class Jack {
};
}
if (config.validate && !config.validate(value)) {
cause ??= { name: field, found: value };
cause = cause || { name: field, found: value };
}
if (cause) {
throw new Error(`Invalid config value for ${field}: ${value}`, {
Expand Down
8 changes: 4 additions & 4 deletions node_modules/jackspeak/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "jackspeak",
"version": "3.4.0",
"publishConfig": {
"tag": "v3-legacy"
},
"version": "3.4.3",
"description": "A very strict and proper argument parser.",
"tshy": {
"main": true,
Expand Down Expand Up @@ -66,9 +69,6 @@
"dependencies": {
"@isaacs/cliui": "^8.0.2"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
Expand Down
Loading

0 comments on commit 0279059

Please sign in to comment.