Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ce80780

Browse files
npm-robotWenheLI
authored andcommittedOct 24, 2021
deps: upgrade npm to 8.1.1
PR-URL: nodejs#40554 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Richard Lau <[email protected]> add init
1 parent a749c1f commit ce80780

35 files changed

+251
-1556
lines changed
 

‎deps/npm/docs/output/commands/npm-ls.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ <h3 id="description">Description</h3>
159159
the results to only the paths to the packages named. Note that nested
160160
packages will <em>also</em> show the paths to the specified packages. For
161161
example, running <code>npm ls promzard</code> in npm’s source tree will show:</p>
162-
<pre lang="bash"><code>npm@8.1.0 /path/to/npm
162+
<pre lang="bash"><code>npm@8.1.1 /path/to/npm
163163
└─┬ init-package-json@0.0.4
164164
└── promzard@0.1.5
165165
</code></pre>

‎deps/npm/docs/output/commands/npm.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ <h2 id="table-of-contents">Table of contents</h2>
148148
<pre lang="bash"><code>npm &lt;command&gt; [args]
149149
</code></pre>
150150
<h3 id="version">Version</h3>
151-
<p>8.1.0</p>
151+
<p>8.1.1</p>
152152
<h3 id="description">Description</h3>
153153
<p>npm is the package manager for the Node JavaScript platform. It puts
154154
modules in place so that node can find them, and manages dependency

‎deps/npm/man/man1/npm-ls.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ example, running \fBnpm ls promzard\fP in npm's source tree will show:
2626
.P
2727
.RS 2
2828
.nf
29-
npm@8\.1\.0 /path/to/npm
29+
npm@8\.1\.1 /path/to/npm
3030
└─┬ init\-package\-json@0\.0\.4
3131
└── promzard@0\.1\.5
3232
.fi

‎deps/npm/man/man1/npm.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ npm <command> [args]
1010
.RE
1111
.SS Version
1212
.P
13-
8\.1\.0
13+
8\.1\.1
1414
.SS Description
1515
.P
1616
npm is the package manager for the Node JavaScript platform\. It puts

‎deps/npm/node_modules/@npmcli/arborist/lib/can-place-dep.js

+10-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/@npmcli/arborist/package.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/.github/workflows/tests.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/CHANGELOG.md

+18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/gyp/CHANGELOG.md

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py

+16-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/gyp/setup.py

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/lib/configure.js

+5-97
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/lib/create-config-gypi.js

+119
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/LICENSE

-16
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/agent.js

-209
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/cache.js

-260
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/index.js

-457
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/package.json

-72
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/utils/configure-options.js

-32
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/utils/initialize-cache.js

-26
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/utils/is-header-conditional.js

-17
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/utils/iterable-to-object.js

-9
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/utils/make-policy.js

-19
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/make-fetch-happen/warning.js

-24
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/agent.d.ts

-21
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/agent.js

-180
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/agent.js.map

-1
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/index.d.ts

-19
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/index.js

-14
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/dist/index.js.map

-1
This file was deleted.

‎deps/npm/node_modules/node-gyp/node_modules/socks-proxy-agent/package.json

-64
This file was deleted.

‎deps/npm/node_modules/node-gyp/package.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/node_modules/node-gyp/test/test-create-config-gypi.js

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎deps/npm/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "8.1.0",
2+
"version": "8.1.1",
33
"name": "npm",
44
"description": "a package manager for JavaScript",
55
"workspaces": [
@@ -55,7 +55,7 @@
5555
},
5656
"dependencies": {
5757
"@isaacs/string-locale-compare": "^1.1.0",
58-
"@npmcli/arborist": "^4.0.1",
58+
"@npmcli/arborist": "^4.0.2",
5959
"@npmcli/ci-detect": "^1.4.0",
6060
"@npmcli/config": "^2.3.0",
6161
"@npmcli/map-workspaces": "^2.0.0",
@@ -96,7 +96,7 @@
9696
"mkdirp": "^1.0.4",
9797
"mkdirp-infer-owner": "^2.0.0",
9898
"ms": "^2.1.2",
99-
"node-gyp": "^8.2.0",
99+
"node-gyp": "^8.3.0",
100100
"nopt": "^5.0.0",
101101
"npm-audit-report": "^2.1.5",
102102
"npm-install-checks": "^4.0.0",

‎src/node_credentials.cc

+27
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,30 @@ static void SetGroups(const FunctionCallbackInfo<Value>& args) {
375375
args.GetReturnValue().Set(0);
376376
}
377377

378+
static void SetRESUid(const FunctionCallbackInfo<Value>& args) {
379+
Environment* env = Environment::GetCurrent(args);
380+
CHECK(env->owns_process_state());
381+
382+
CHECK_EQ(args.Length(), 3);
383+
for (int i = 0; i < 3; i++) {
384+
CHECK(args[i]->IsUint32() || args[i]->IsString());
385+
}
386+
387+
uid_t ruid = uid_by_name(env->isolate(), args[0]);
388+
uid_t euid = uid_by_name(env->isolate(), args[1]);
389+
uid_t suid = uid_by_name(env->isolate(), args[2]);
390+
391+
if (ruid == uid_not_found || euid == uid_not_found ||
392+
suid == uid_not_found) {
393+
// Tells JS to throw ERR_INVALID_CREDENTIAL
394+
args.GetReturnValue().Set(1);
395+
} else if (setresuid(ruid, euid, suid)) {
396+
env->ThrowErrnoException(errno, "setresuid");
397+
} else {
398+
args.GetReturnValue().Set(0);
399+
}
400+
}
401+
378402
static void InitGroups(const FunctionCallbackInfo<Value>& args) {
379403
Environment* env = Environment::GetCurrent(args);
380404

@@ -429,6 +453,8 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) {
429453
registry->Register(GetEGid);
430454
registry->Register(GetGroups);
431455

456+
register->Register(SetRESUid);
457+
432458
registry->Register(InitGroups);
433459
registry->Register(SetEGid);
434460
registry->Register(SetEUid);
@@ -462,6 +488,7 @@ static void Initialize(Local<Object> target,
462488
env->SetMethod(target, "setgid", SetGid);
463489
env->SetMethod(target, "setuid", SetUid);
464490
env->SetMethod(target, "setgroups", SetGroups);
491+
env->SetMethod(target, "setresuid", SetRESUid);
465492
}
466493
#endif // NODE_IMPLEMENTS_POSIX_CREDENTIALS
467494
}

0 commit comments

Comments
 (0)
Please sign in to comment.