Skip to content

feat(process): implement process.execArgv (#1349) - #1468

Merged
proggeramlug merged 1 commit into
mainfrom
fix/1349-process-exec-argv
May 23, 2026
Merged

feat(process): implement process.execArgv (#1349)#1468
proggeramlug merged 1 commit into
mainfrom
fix/1349-process-exec-argv

Conversation

@proggeramlug

Copy link
Copy Markdown
Contributor

Summary

Node's process.execArgv is the array of CLI flags the interpreter was started with. Perry was returning the property as a 0 sentinel, so:

  • Array.isArray(process.execArgv) returned false
  • .length / iteration crashed with type errors

Perry binaries are AOT — there's no runtime flag list to forward — so the empty array is the correct shape. Closes #1349.

Changes

expr_member.rs: both the bare process.execArgv and the globalThis.process.execArgv paths now lower to Expr::Array(Vec::new()), sitting next to the existing argv / versions / IPC-undefined arms.

Test plan

  • test-parity/node-suite/process/exec-argv/exec-argv.ts asserts shape (Array.isArray + every-string + length type) so it stays parity-clean regardless of which flags Node was invoked with.
  • Byte-identical to node --experimental-strip-types.
  • cargo fmt --all -- --check clean.

Node's `process.execArgv` is the array of CLI flags the interpreter was
started with. Perry was returning the property as a 0 sentinel, so
`Array.isArray(process.execArgv)` was `false` and any `.length` /
iteration crashed. Perry binaries are AOT — there's no runtime flag
list to forward — so the empty array is the correct shape.

Lowered in `expr_member.rs` (both the bare `process.execArgv` and the
`globalThis.process.execArgv` paths) to `Expr::Array(Vec::new())`.

Test: test-parity/node-suite/process/exec-argv/exec-argv.ts asserts
shape (Array.isArray + every-string + length type) so it stays parity-
clean regardless of which flags Node was invoked with.
@proggeramlug
proggeramlug merged commit f41d66d into main May 23, 2026
9 checks passed
@proggeramlug
proggeramlug deleted the fix/1349-process-exec-argv branch May 23, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

node:process — implement process.execArgv

1 participant