Skip to content

Commit

Permalink
Update pkg
Browse files Browse the repository at this point in the history
Change-type: patch
  • Loading branch information
Page- committed Dec 30, 2021
1 parent a80f676 commit 3d0762c
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 91 deletions.
1 change: 1 addition & 0 deletions automation/build-bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ async function diffPkgOutput(pkgOut: string) {
'> pkg@',
'> Fetching base Node.js binaries',
' fetched-',
'prebuild-install WARN install No prebuilt binaries found',
];
const modulesRE =
process.platform === 'win32'
Expand Down
60 changes: 39 additions & 21 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"mock-require": "^3.0.3",
"nock": "^13.2.1",
"parse-link-header": "^1.0.1",
"pkg": "^4.4.9",
"pkg": "^4.5.1",
"publish-release": "^1.6.1",
"rewire": "^5.0.0",
"simple-git": "^2.48.0",
Expand Down
37 changes: 0 additions & 37 deletions patches/all/pkg+4.4.9.dev.patch

This file was deleted.

38 changes: 38 additions & 0 deletions patches/all/pkg+4.5.1.dev.patch
Original file line number Diff line number Diff line change
@@ -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 //////////////////////////////////////////////////////
16 changes: 0 additions & 16 deletions tests/test-data/pkg/expected-warnings-darwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
The file must be distributed with executable as %2.
%1: node_modules/open/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.
The file must be distributed with executable as %2.
%1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node
Expand Down Expand Up @@ -100,18 +96,6 @@
The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/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.
The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open
Expand Down
8 changes: 0 additions & 8 deletions tests/test-data/pkg/expected-warnings-linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
The file must be distributed with executable as %2.
%1: node_modules/open/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.
The file must be distributed with executable as %2.
%1: node_modules/etcher-sdk/node_modules/drivelist/build/Release/drivelist.node
Expand Down Expand Up @@ -100,10 +96,6 @@
The file must be distributed with executable as %2.
%1: node_modules/drivelist/scripts/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.
The file must be distributed with executable as %2.
%1: node_modules/opn/xdg-open
Expand Down
8 changes: 0 additions & 8 deletions tests/test-data/pkg/expected-warnings-win32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
The file must be distributed with executable as %2.
%1: node_modules\open\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.
The file must be distributed with executable as %2.
%1: node_modules\etcher-sdk\node_modules\drivelist\build\Release\drivelist.node
Expand Down Expand Up @@ -100,10 +96,6 @@
The file must be distributed with executable as %2.
%1: node_modules\drivelist\scripts\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.
The file must be distributed with executable as %2.
%1: node_modules\opn\xdg-open
Expand Down

0 comments on commit 3d0762c

Please sign in to comment.