File tree Expand file tree Collapse file tree 20 files changed +376
-299
lines changed
.aspect/rules/external_repository_action_cache Expand file tree Collapse file tree 20 files changed +376
-299
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,6 @@ npm/private/test/package.json=322962683
3232npm/private/test/vendored/is-odd/package.json=1041695223
3333npm/private/test/vendored/lodash-4.17.21.tgz=-1206623349
3434npm/private/test/vendored/semver-max/package.json=578664053
35- package.json=1068891966
36- pnpm-lock.yaml=1390701932
35+ package.json=234760749
36+ pnpm-lock.yaml=43430792
3737pnpm-workspace.yaml=-2039776064
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ const util = require("util");
4747// es modules
4848const fs = require ( 'node:fs' ) ;
4949const url = require ( 'node:url' ) ;
50+ const esmModule = require ( 'node:module' ) ;
5051const HOP_NON_LINK = Symbol . for ( 'HOP NON LINK' ) ;
5152const HOP_NOT_FOUND = Symbol . for ( 'HOP NOT FOUND' ) ;
5253const PATCHED_FS_METHODS = [
@@ -747,12 +748,18 @@ function patcher(roots) {
747748 }
748749 }
749750 }
751+ // Sync the esm modules to use the now patched fs cjs module.
752+ // See: https://nodejs.org/api/esm.html#builtin-modules
753+ esmModule . syncBuiltinESMExports ( ) ;
750754 return function revertPatch ( ) {
751755 Object . assign ( fs , fs . _unpatched ) ;
752756 delete fs . _unpatched ;
753757 if ( unpatchPromises ) {
754758 unpatchPromises ( ) ;
755759 }
760+ // Sync the esm modules to use the now patched fs cjs module.
761+ // See: https://nodejs.org/api/esm.html#builtin-modules
762+ esmModule . syncBuiltinESMExports ( ) ;
756763 } ;
757764}
758765// =========================================================================
Original file line number Diff line number Diff line change 3535 JS_BINARY__PATCH_NODE_FS != '0' &&
3636 JS_BINARY__FS_PATCH_ROOTS
3737) {
38- const module = require ( 'node:module' )
3938 const roots = JS_BINARY__FS_PATCH_ROOTS . split ( ':' )
4039 if ( JS_BINARY__LOG_DEBUG ) {
4140 console . error (
4241 `DEBUG: ${ JS_BINARY__LOG_PREFIX } : node fs patches will be applied with roots: ${ roots } `
4342 )
4443 }
4544 patchfs ( roots )
46-
47- // Sync the esm modules to use the now patched fs cjs module.
48- // See: https://nodejs.org/api/esm.html#builtin-modules
49- module . syncBuiltinESMExports ( )
5045}
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type Dirent = any
3030// es modules
3131const fs = require ( 'node:fs' ) as any
3232const url = require ( 'node:url' ) as typeof UrlType
33+ const esmModule = require ( 'node:module' )
3334
3435const HOP_NON_LINK = Symbol . for ( 'HOP NON LINK' )
3536const HOP_NOT_FOUND = Symbol . for ( 'HOP NOT FOUND' )
@@ -857,13 +858,21 @@ export function patcher(roots: string[]): () => void {
857858 }
858859 }
859860
861+ // Sync the esm modules to use the now patched fs cjs module.
862+ // See: https://nodejs.org/api/esm.html#builtin-modules
863+ esmModule . syncBuiltinESMExports ( )
864+
860865 return function revertPatch ( ) {
861866 Object . assign ( fs , fs . _unpatched )
862867 delete fs . _unpatched
863868
864869 if ( unpatchPromises ) {
865870 unpatchPromises ( )
866871 }
872+
873+ // Sync the esm modules to use the now patched fs cjs module.
874+ // See: https://nodejs.org/api/esm.html#builtin-modules
875+ esmModule . syncBuiltinESMExports ( )
867876 }
868877}
869878
Original file line number Diff line number Diff line change 1- a4232a52470e03fc555dfc1bd5a6e83090a71bccad58eb45fbc55f780f84df1e js/private/test/image/cksum_node
1+ 41a1bc481e704b8776af2de8fd24cab6252e326096e84d27df15dd39dec727c3 js/private/test/image/cksum_node
2252836a988c8ac815b4a3b70fa3a3acec67b851699fa989694cef4cc1fa53de96 js/private/test/image/cksum_package_store_3p
33642b308a0561fb51dfd96d08d74a4ec419c9d2ca501cfa1002a49c8e25fbe4c2 js/private/test/image/cksum_package_store_1p
445d45f32dacf0b83e26c33d4e1017c694e79eaff29b8ecc336f9ea8fdee870d45 js/private/test/image/cksum_node_modules
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.
88drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/
99drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/
1010drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/node-patches/
11- -r-xr-xr-x 0 0 0 34161 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
12- -r-xr-xr-x 0 0 0 1664 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
11+ -r-xr-xr-x 0 0 0 34545 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
12+ -r-xr-xr-x 0 0 0 1460 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
1313drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/
1414drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/
1515drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/nodejs/
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runf
77drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/
88drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/
99drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/
10- -r-xr-xr-x 0 100 0 34161 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
11- -r-xr-xr-x 0 100 0 1664 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
10+ -r-xr-xr-x 0 100 0 34545 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
11+ -r-xr-xr-x 0 100 0 1460 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
1212drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/
1313drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/
1414drwxr-xr-x 0 100 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/nodejs/
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runf
77drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/
88drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/
99drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/
10- -r-xr-xr-x 0 0 0 34161 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
11- -r-xr-xr-x 0 0 0 1664 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
10+ -r-xr-xr-x 0 0 0 34545 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/fs.cjs
11+ -r-xr-xr-x 0 0 0 1460 Jan 1 1970 ./js/private/test/image/bin.runfiles/_main/js/private/node-patches/register.cjs
1212drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/
1313drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/
1414drwxr-xr-x 0 0 0 0 Jan 1 1970 ./js/private/test/image/bin.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/nodejs/
Original file line number Diff line number Diff line change @@ -9,4 +9,4 @@ drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_
99drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/
1010drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/
1111drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/
12- -r-xr-xr-x 0 0 0 34161 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/fs.cjs
12+ -r-xr-xr-x 0 0 0 34545 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/fs.cjs
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_
99drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/
1010drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/
1111drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/
12- -r-xr-xr-x 0 0 0 1664 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/register.cjs
12+ -r-xr-xr-x 0 0 0 1460 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/_main/js/private/node-patches/register.cjs
1313drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/rules_nodejs~~node~nodejs_linux_amd64/
1414drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/
1515drwxr-xr-x 0 0 0 0 Jan 1 1970 ./app/js/private/test/image/non_ascii/bin2.runfiles/rules_nodejs~~node~nodejs_linux_amd64/bin/nodejs/
You can’t perform that action at this time.
0 commit comments