Describe the bug
This is very minor difference, so it's not likely this matters for any users, but putting here for the record.
import { repro2Dep } from "./repro2-dep.js"
repro2Dep();
export function repro2Dep() {
Error.stackTraceLimit = 2;
console.trace("__TEST__");
}
On Node:
repro2Dep();
^ at repro2.js:3:1
On Vite runnerImport:
repro2Dep();
^ at repro2.js:3:10
For the context, this is discovered while testing oxc module runner transform in vitest-dev/vitest#7646. Oxc also has some inconsistencies in some cases, but the same repro here at least matches with NodeJs.
I added more examples in the repro below and I feel Node itself also has some inconsistency when pointing a column when it comes to (0, ...)() style calls. I wonder if all runtimes (v8, firefox, webkit) would even match each other 🤔
Reproduction
https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/oxc-source-map-call-stack-column?file=README.md
Steps to reproduce
Stackblitz has some issue with stack rewriting, so download and test it locally.
$ node repro2.js
Trace: __TEST__
at repro2Dep (file:///dir/repro2-dep.js:3:11)
at file:///dir/repro2.js:3:1
Trace: __TEST__
at repro2Dep (file:///dir/repro2-dep.js:3:11)
at file:///dir/repro2.js:5:15
$ node vite.js repro2.js
Trace: __TEST__
at repro2Dep (/dir/repro2-dep.js:3:11)
at eval (/dir/repro2.js:3:10) <-- ❓❓❓
Trace: __TEST__
at repro2Dep (/dir/repro2-dep.js:3:11)
at eval (/dir/repro2.js:5:15)
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
vite: ^6.2.1 => 6.2.1
Used Package Manager
npm
Logs
No response
Validations
Describe the bug
This is very minor difference, so it's not likely this matters for any users, but putting here for the record.
On Node:
On Vite
runnerImport:For the context, this is discovered while testing oxc module runner transform in vitest-dev/vitest#7646. Oxc also has some inconsistencies in some cases, but the same repro here at least matches with NodeJs.
I added more examples in the repro below and I feel Node itself also has some inconsistency when pointing a column when it comes to
(0, ...)()style calls. I wonder if all runtimes (v8, firefox, webkit) would even match each other 🤔Reproduction
https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/oxc-source-map-call-stack-column?file=README.md
Steps to reproduce
Stackblitz has some issue with stack rewriting, so download and test it locally.
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vite: ^6.2.1 => 6.2.1Used Package Manager
npm
Logs
No response
Validations