feat(process): implement process.config (#1379) - #1484
Merged
Conversation
proggeramlug
force-pushed
the
fix/1379-process-config
branch
from
May 23, 2026 08:43
a3433d8 to
fdb1ce4
Compare
Node's `process.config` is the build-time config object —
`{ variables, target_defaults }` populated by node-gyp at build
time. Perry was returning a 0 sentinel, so `process.config.variables`
threw on undefined and `Object.keys(process.config)` crashed.
Perry has no gyp file to surface, so the sub-objects are empty. The
shape preserves consumer feature-detection paths
(`process.config?.variables?.target_arch`, etc.).
Lowered in `expr_member.rs` (both bare `process.config` and the
`globalThis.process.config` paths) to an inline `Expr::Object` literal
sitting next to the `release` / `features` arms.
Test fixture force-added (root `.gitignore` shadows the directory
name `config` for top-level binary outputs; the parity test path is
fixed by the issue's repro).
proggeramlug
force-pushed
the
fix/1379-process-config
branch
from
May 23, 2026 08:55
fdb1ce4 to
8ef94bd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Node's
process.configis the build-time config object —{ variables, target_defaults }populated by node-gyp at build time. Perry was returning a 0 sentinel, soprocess.config.variablesthrew on undefined andObject.keys(process.config)crashed.Perry has no gyp file to surface, so the sub-objects are empty — the shape preserves consumer feature-detection paths (
process.config?.variables?.target_arch, etc.).Closes #1379.
Changes
expr_member.rs: both bareprocess.configand theglobalThis.process.configpaths lower to an inlineExpr::Objectliteral sitting next to therelease/featuresarms shipped in #1348 / #1378.Test fixture is force-added to skirt the root
.gitignore's top-levelconfigrule (which targets binary outputs); the parity path is fixed by the issue's repro.Test plan
test-parity/node-suite/process/config/config.tsasserts shape (typeof top-level + sub-objects) — byte-identical tonode --experimental-strip-types.cargo fmt --all -- --checkclean.