@@ -7,34 +7,34 @@ We use this to allow node's 'fs' module to read from ASAR files as if they were
7
7
a real filesystem.
8
8
9
9
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
10
- index 07c6d5e9351a96aeca1179c20287dc3fb7ec1eab..13ea68c96fd415f976aab0f291a1b7c688db1c58 100644
10
+ index 7a773d5208e250abd8b0efb6dde66c45060bbee4..45e38ca0a122e3b1c5d8d59865f9610c19bdbd54 100644
11
11
--- a/lib/internal/bootstrap/node.js
12
12
+++ b/lib/internal/bootstrap/node.js
13
- @@ -101 ,6 +101 ,10 @@ process.domain = null;
13
+ @@ -134 ,6 +134 ,10 @@ process.domain = null;
14
14
}
15
15
process._exiting = false;
16
16
17
17
+ // NOTE: Electron deletes this references before user code runs so that
18
18
+ // internalBinding is not leaked to user code.
19
19
+ process.internalBinding = internalBinding;
20
20
+
21
- // TODO(@jasnell): Once this has gone through one full major
22
- // release cycle, remove the Proxy and setter and update the
23
- // getter to either return a read-only object or always return
21
+ // process.config is serialized config.gypi
22
+ const binding = internalBinding('builtins');
23
+
24
24
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
25
- index 4aa672675b5cf16b609d81d360e8be8c1a345bd8..001343b74ce236f89dca030c0fc9dd0299df0b39 100644
25
+ index 3161afa33889f1682a1689e76fbcadc397f4b01c..84fea979d482d3d5cacfad4b09237e6345675cad 100644
26
26
--- a/lib/internal/modules/cjs/loader.js
27
27
+++ b/lib/internal/modules/cjs/loader.js
28
- @@ -94 ,7 +94 ,7 @@ const fs = require('fs');
28
+ @@ -91 ,7 +91 ,7 @@ const fs = require('fs');
29
29
const internalFS = require('internal/fs/utils');
30
30
const path = require('path');
31
31
const { sep } = path;
32
32
- const { internalModuleStat } = internalBinding('fs');
33
33
+ const internalFsBinding = internalBinding('fs');
34
- const packageJsonReader = require('internal/modules/package_json_reader');
35
34
const { safeGetenv } = internalBinding('credentials');
36
35
const {
37
- @@ -190,7 +190,7 @@ function stat(filename) {
36
+ privateSymbols: {
37
+ @@ -182,7 +182,7 @@ function stat(filename) {
38
38
const result = statCache.get(filename);
39
39
if (result !== undefined) return result;
40
40
}
@@ -44,24 +44,24 @@ index 4aa672675b5cf16b609d81d360e8be8c1a345bd8..001343b74ce236f89dca030c0fc9dd02
44
44
// Only set cache when `internalModuleStat(filename)` succeeds.
45
45
statCache.set(filename, result);
46
46
diff --git a/lib/internal/modules/package_json_reader.js b/lib/internal/modules/package_json_reader.js
47
- index bb175d0df54c043075103dd394fd1f52c911e8dd..09ced1246cb6a8c2df764893c077177d23cb0414 100644
47
+ index c6377faae6f5a827fc9b5c271ebc85f2df2f7177..8143e83ee39a03871642cfd6e7b8671fc4c3454d 100644
48
48
--- a/lib/internal/modules/package_json_reader.js
49
49
+++ b/lib/internal/modules/package_json_reader.js
50
- @@ -1 ,7 +1 ,7 @@
51
- 'use strict';
52
-
53
- const { SafeMap } = primordials ;
50
+ @@ -8 ,7 +8 ,7 @@ const {
51
+ const {
52
+ ERR_INVALID_PACKAGE_CONFIG,
53
+ } = require('internal/errors').codes ;
54
54
- const { internalModuleReadJSON } = internalBinding('fs');
55
55
+ const internalFsBinding = internalBinding('fs');
56
- const { pathToFileURL } = require('url');
57
56
const { toNamespacedPath } = require('path');
57
+ const { kEmptyObject } = require('internal/util');
58
58
59
- @@ -18 ,7 +18 ,7 @@ function read(jsonPath) {
60
- return cache.get(jsonPath);
61
- }
62
-
63
- - const { 0: string, 1: containsKeys } = internalModuleReadJSON(
64
- + const { 0: string, 1: containsKeys } = internalFsBinding.internalModuleReadJSON(
59
+ @@ -48 ,7 +48 ,7 @@ function read(jsonPath, { base, specifier, isESM } = kEmptyObject ) {
60
+ const {
61
+ 0: string,
62
+ 1: containsKeys,
63
+ - } = internalModuleReadJSON(
64
+ + } = internalFsBinding.internalModuleReadJSON(
65
65
toNamespacedPath(jsonPath),
66
66
);
67
- const result = { string, containsKeys };
67
+ const result = {
0 commit comments