Update pkg

Change-type: patch
This commit is contained in:
Pagan Gazzard 2021-12-24 16:01:30 +00:00
parent 92b86330a0
commit 008972b3d3
8 changed files with 83 additions and 91 deletions

View File

@ -96,6 +96,7 @@ async function diffPkgOutput(pkgOut: string) {
'> pkg@', '> pkg@',
'> Fetching base Node.js binaries', '> Fetching base Node.js binaries',
' fetched-', ' fetched-',
'prebuild-install WARN install No prebuilt binaries found',
]; ];
const modulesRE = const modulesRE =
process.platform === 'win32' process.platform === 'win32'
@ -322,6 +323,10 @@ async function signFilesForNotarization() {
if (!item.stats.isFile()) { if (!item.stats.isFile()) {
return; return;
} }
if (path.basename(item.path).endsWith('.node.bak')) {
console.log('Removing pkg .node.bak file', item.path);
fs.unlinkSync(item.path);
}
if ( if (
path.basename(item.path).endsWith('.zip') && path.basename(item.path).endsWith('.zip') &&
path.dirname(item.path).includes('test') path.dirname(item.path).includes('test')

60
npm-shrinkwrap.json generated
View File

@ -1093,15 +1093,15 @@
} }
}, },
"@babel/parser": { "@babel/parser": {
"version": "7.11.3", "version": "7.13.12",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.11.3.tgz", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.12.tgz",
"integrity": "sha512-REo8xv7+sDxkKvoxEywIdsNFiZLybwdI7hcT5uEPyQrSMB4YQ973BfC9OOrD/81MaIjh6UxdulIQXkjmiH3PcA==", "integrity": "sha512-4T7Pb244rxH24yR116LAuJ+adxXXnHhZaLJjegJVKSdoNCe4x1eDBaud5YIcQFcqzsaD5BHvJw5BQ0AZapdCRw==",
"dev": true "dev": true
}, },
"@babel/runtime": { "@babel/runtime": {
"version": "7.11.2", "version": "7.13.10",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz",
"integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==",
"dev": true, "dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
@ -6225,12 +6225,6 @@
"yargs": "^16.1.0" "yargs": "^16.1.0"
}, },
"dependencies": { "dependencies": {
"@babel/parser": {
"version": "7.16.4",
"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz",
"integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==",
"dev": true
},
"arrify": { "arrify": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
@ -14134,13 +14128,13 @@
} }
}, },
"pkg": { "pkg": {
"version": "4.4.9", "version": "4.5.1",
"resolved": "https://registry.npmjs.org/pkg/-/pkg-4.4.9.tgz", "resolved": "https://registry.npmjs.org/pkg/-/pkg-4.5.1.tgz",
"integrity": "sha512-FK4GqHtcCY2PPPVaKViU0NyRzpo6gCS7tPKN5b7AkElqjAOCH1bsRKgohEnxThr6DWfTGByGqba2YHGR/BqbmA==", "integrity": "sha512-UXKL88jGQ+FD4//PyrFeRcqurVQ3BVIfUNaEU9cXY24EJz08JyBj85qrGh0CFGvyzNb1jpwHOnns5Sw0M5H92Q==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/parser": "^7.9.4", "@babel/parser": "7.13.12",
"@babel/runtime": "^7.9.2", "@babel/runtime": "7.13.10",
"chalk": "^3.0.0", "chalk": "^3.0.0",
"escodegen": "^1.14.1", "escodegen": "^1.14.1",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",
@ -14148,7 +14142,8 @@
"into-stream": "^5.1.1", "into-stream": "^5.1.1",
"minimist": "^1.2.5", "minimist": "^1.2.5",
"multistream": "^2.1.1", "multistream": "^2.1.1",
"pkg-fetch": "^2.6.9", "pkg-fetch": "2.6.9",
"prebuild-install": "6.0.1",
"progress": "^2.0.3", "progress": "^2.0.3",
"resolve": "^1.15.1", "resolve": "^1.15.1",
"stream-meter": "^1.0.4" "stream-meter": "^1.0.4"
@ -14174,6 +14169,29 @@
"graceful-fs": "^4.1.6" "graceful-fs": "^4.1.6"
} }
}, },
"prebuild-install": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-6.0.1.tgz",
"integrity": "sha512-7GOJrLuow8yeiyv75rmvZyeMGzl8mdEX5gY69d6a6bHWmiPevwqFw+tQavhK0EYMaSg3/KD24cWqeQv1EWsqDQ==",
"dev": true,
"requires": {
"detect-libc": "^1.0.3",
"expand-template": "^2.0.3",
"github-from-package": "0.0.0",
"minimist": "^1.2.3",
"mkdirp-classic": "^0.5.3",
"napi-build-utils": "^1.0.1",
"node-abi": "^2.7.0",
"noop-logger": "^0.1.1",
"npmlog": "^4.0.1",
"pump": "^3.0.0",
"rc": "^1.2.7",
"simple-get": "^3.0.3",
"tar-fs": "^2.0.0",
"tunnel-agent": "^0.6.0",
"which-pm-runs": "^1.0.0"
}
},
"universalify": { "universalify": {
"version": "0.1.2", "version": "0.1.2",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
@ -15299,9 +15317,9 @@
} }
}, },
"regenerator-runtime": { "regenerator-runtime": {
"version": "0.13.7", "version": "0.13.9",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==",
"dev": true "dev": true
}, },
"regex-not": { "regex-not": {

View File

@ -184,7 +184,7 @@
"mock-require": "^3.0.3", "mock-require": "^3.0.3",
"nock": "^13.2.1", "nock": "^13.2.1",
"parse-link-header": "^1.0.1", "parse-link-header": "^1.0.1",
"pkg": "^4.4.9", "pkg": "^4.5.1",
"publish-release": "^1.6.1", "publish-release": "^1.6.1",
"rewire": "^5.0.0", "rewire": "^5.0.0",
"simple-git": "^2.48.0", "simple-git": "^2.48.0",

View File

@ -1,37 +0,0 @@
diff --git a/node_modules/pkg/lib-es5/packer.js b/node_modules/pkg/lib-es5/packer.js
index 7295bb6..76805a3 100644
--- a/node_modules/pkg/lib-es5/packer.js
+++ b/node_modules/pkg/lib-es5/packer.js
@@ -128,6 +128,7 @@ function _default({
const newStat = Object.assign({}, value);
newStat.isFileValue = value.isFile();
newStat.isDirectoryValue = value.isDirectory();
+ newStat.isSocketValue = value.isSocket();
const buffer = Buffer.from(JSON.stringify(newStat));
stripes.push({
snap,
diff --git a/node_modules/pkg/prelude/bootstrap.js b/node_modules/pkg/prelude/bootstrap.js
index 0d19f1d..db69015 100644
--- a/node_modules/pkg/prelude/bootstrap.js
+++ b/node_modules/pkg/prelude/bootstrap.js
@@ -925,8 +925,10 @@ function payloadFileSync (pointer) {
var isFileValue = s.isFileValue;
var isDirectoryValue = s.isDirectoryValue;
+ var isSocketValue = s.isSocketValue;
delete s.isFileValue;
delete s.isDirectoryValue;
+ delete s.isSocketValue;
s.isFile = function () {
return isFileValue;
@@ -934,6 +936,9 @@ function payloadFileSync (pointer) {
s.isDirectory = function () {
return isDirectoryValue;
};
+ s.isSocket = function () {
+ return isSocketValue;
+ };
s.isSymbolicLink = function () {
return false;
};

View File

@ -0,0 +1,38 @@
diff --git a/node_modules/pkg/prelude/bootstrap.js b/node_modules/pkg/prelude/bootstrap.js
index b87902f..58cb7bc 100644
--- a/node_modules/pkg/prelude/bootstrap.js
+++ b/node_modules/pkg/prelude/bootstrap.js
@@ -1220,19 +1220,20 @@ function payloadFileSync(pointer) {
// promises ////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////////
- if (fs.promises !== undefined) {
- var util = require('util');
- fs.promises.open = util.promisify(fs.open);
- fs.promises.read = util.promisify(fs.read);
- fs.promises.write = util.promisify(fs.write);
- fs.promises.readFile = util.promisify(fs.readFile);
- fs.promises.readdir = util.promisify(fs.readdir);
- fs.promises.realpath = util.promisify(fs.realpath);
- fs.promises.stat = util.promisify(fs.stat);
- fs.promises.lstat = util.promisify(fs.lstat);
- fs.promises.fstat = util.promisify(fs.fstat);
- fs.promises.access = util.promisify(fs.access);
- }
+ // Disable fs.promises patching as eg `fs.promises.open` returns an object not a number like a promisified `fs.open` returns
+ // if (fs.promises !== undefined) {
+ // var util = require('util');
+ // fs.promises.open = util.promisify(fs.open);
+ // fs.promises.read = util.promisify(fs.read);
+ // fs.promises.write = util.promisify(fs.write);
+ // fs.promises.readFile = util.promisify(fs.readFile);
+ // fs.promises.readdir = util.promisify(fs.readdir);
+ // fs.promises.realpath = util.promisify(fs.realpath);
+ // fs.promises.stat = util.promisify(fs.stat);
+ // fs.promises.lstat = util.promisify(fs.lstat);
+ // fs.promises.fstat = util.promisify(fs.fstat);
+ // fs.promises.access = util.promisify(fs.access);
+ // }
// ///////////////////////////////////////////////////////////////
// INTERNAL //////////////////////////////////////////////////////

View File

@ -24,10 +24,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/open/xdg-open %1: node_modules/open/xdg-open
%2: path-to-executable/xdg-open %2: path-to-executable/xdg-open
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/@ronomon/direct-io/binding.node
%2: path-to-executable/binding.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node %1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node
@ -100,18 +96,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/win32.bat %1: node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat %2: path-to-executable/drivelist/win32.bat
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/fsevents/fsevents.node
%2: path-to-executable/fsevents.node
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/fsevents/fsevents.node
%2: path-to-executable/fsevents.node
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/xxhash/build/Release/hash.node
%2: path-to-executable/hash.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open %1: node_modules/opn/xdg-open

View File

@ -24,10 +24,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/open/xdg-open %1: node_modules/open/xdg-open
%2: path-to-executable/xdg-open %2: path-to-executable/xdg-open
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/@ronomon/direct-io/binding.node
%2: path-to-executable/binding.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node %1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node
@ -100,10 +96,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/win32.bat %1: node_modules/drivelist/scripts/win32.bat
%2: path-to-executable/drivelist/win32.bat %2: path-to-executable/drivelist/win32.bat
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules/xxhash/build/Release/hash.node
%2: path-to-executable/hash.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open %1: node_modules/opn/xdg-open

View File

@ -24,10 +24,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules\open\xdg-open %1: node_modules\open\xdg-open
%2: path-to-executable/xdg-open %2: path-to-executable/xdg-open
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules\@ronomon\direct-io\binding.node
%2: path-to-executable/binding.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules\etcher-sdk\node_modules\drivelist\build\Release\drivelist.node %1: node_modules\etcher-sdk\node_modules\drivelist\build\Release\drivelist.node
@ -100,10 +96,6 @@
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules\drivelist\scripts\win32.bat %1: node_modules\drivelist\scripts\win32.bat
%2: path-to-executable/drivelist/win32.bat %2: path-to-executable/drivelist/win32.bat
> Warning Cannot include addon %1 into executable.
The addon must be distributed with executable as %2.
%1: node_modules\xxhash\build\Release\hash.node
%2: path-to-executable/hash.node
> Warning Cannot include file %1 into executable. > Warning Cannot include file %1 into executable.
The file must be distributed with executable as %2. The file must be distributed with executable as %2.
%1: node_modules\opn\xdg-open %1: node_modules\opn\xdg-open