fix: use native require cache of loaded entries only (v1) #1768
Annotations
6 errors and 1 warning
Run pnpm vitest run --coverage:
test/fixtures.test.ts#L49
Error: Snapshot `fixtures > error-parse > stderr 1` mismatched
- Expected
+ Received
@@ -4,14 +4,12 @@
Error: ParseError: `import` can only be used in `import
<cwd>/index.ts
at Object.<anonymous> (<root>/bin/jiti)
at Module._compile (internal/modules/cjs/loader)
- at Object..js (internal/modules/cjs/loader)
+ at Module._extensions..js (internal/modules/cjs/loader)
at Module.load (internal/modules/cjs/loader)
- at Function._load (internal/modules/cjs/loader)
- at TracingChannel.traceSync (node:diagnostics_channel)
- at wrapModuleLoad (internal/modules/cjs/loader)
+ at Module._load (internal/modules/cjs/loader)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main)
at internal/main/run_main_module
Node.js v<version>"
❯ test/fixtures.test.ts:49:37
|
Run pnpm vitest run --coverage:
test/fixtures.test.ts#L49
Error: Snapshot `fixtures > error-runtime > stderr 1` mismatched
- Expected
+ Received
@@ -9,15 +9,13 @@
at <cwd>/index.ts
at evalModule (<root>/dist/jiti)
at jiti (<root>/dist/jiti)
at Object.<anonymous> (<root>/bin/jiti)
at Module._compile (internal/modules/cjs/loader)
- at Object..js (internal/modules/cjs/loader)
+ at Module._extensions..js (internal/modules/cjs/loader)
at Module.load (internal/modules/cjs/loader)
- at Function._load (internal/modules/cjs/loader)
- at TracingChannel.traceSync (node:diagnostics_channel)
- at wrapModuleLoad (internal/modules/cjs/loader)
+ at Module._load (internal/modules/cjs/loader)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main)
at internal/main/run_main_module {
code: 'ERR_INVALID_ARG_TYPE'
}
❯ test/fixtures.test.ts:49:37
|
Run pnpm vitest run --coverage:
test/fixtures.test.ts#L57
Error: Snapshot `fixtures > esm > stdout 1` mismatched
- Expected
+ Received
@@ -9,14 +9,12 @@
'at <cwd>/index.js',
'at evalModule (<root>/dist/jiti)',
'at jiti (<root>/dist/jiti)',
'at Object.<anonymous> (<root>/bin/jiti)',
'at Module._compile (internal/modules/cjs/loader)',
- 'at Object..js (internal/modules/cjs/loader)',
+ 'at Module._extensions..js (internal/modules/cjs/loader)',
'at Module.load (internal/modules/cjs/loader)',
- 'at Function._load (internal/modules/cjs/loader)',
- 'at TracingChannel.traceSync (node:diagnostics_channel)',
- 'at wrapModuleLoad (internal/modules/cjs/loader)',
+ 'at Module._load (internal/modules/cjs/loader)',
'at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main)',
'at internal/main/run_main_module'
]
}"
❯ test/fixtures.test.ts:57:35
|
Run pnpm vitest run --coverage:
test/fixtures.test.ts#L57
Error: Snapshot `fixtures > mixed > stdout 1` mismatched
❯ test/fixtures.test.ts:57:35
|
Run pnpm vitest run --coverage:
test/fixtures.test.ts#L51
Error: Snapshot `fixtures > require-esm > require-esm-stderr 1` mismatched
- Expected
+ Received
- "(node:43074) ExperimentalWarning: CommonJS module <cwd>/index.cjs is loading ES Module <cwd>/_dist/esm.js using require().
- Support for loading ES Module in require() is an experimental feature and might change at any time
- (Use `node --trace-warnings ...` to show where the warning was created)"
+ ""
❯ test/fixtures.test.ts:51:37
|
Run pnpm vitest run --coverage
Process completed with exit code 1.
|
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
Loading