Skip to content

fix(ext/node): add host_arch to process.config.variables#32265

Merged
bartlomieju merged 3 commits intodenoland:mainfrom
bartlomieju:fix/process-config-host-arch
Feb 24, 2026
Merged

fix(ext/node): add host_arch to process.config.variables#32265
bartlomieju merged 3 commits intodenoland:mainfrom
bartlomieju:fix/process-config-host-arch

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Summary

  • Adds host_arch property to process.config.variables to match Node.js behavior
  • Changes process.config to use a lazy getter so arch is available at access time (not during snapshot creation)
  • Fixes packages like neo4j-driver that access process.config.variables.host_arch

Closes #27556

Test plan

  • Added assertion in tests/unit_node/process_test.ts that process.config.variables.host_arch === process.arch
  • Verified neo4j-driver@5.27.0 loads and creates a driver without crashing
  • Dev build succeeds (snapshot creation works with lazy getter)

🤖 Generated with Claude Code

bartlomieju and others added 3 commits February 22, 2026 15:17
Adds `host_arch` property to `process.config.variables` to match Node.js
behavior. This fixes packages like `neo4j-driver` that access
`process.config.variables.host_arch` and crash with a TypeError.

Closes denoland#27556

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The getter was creating a new frozen object on every access, causing
`Object(process.config) === process.config` to fail in node compat tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@bartlomieju bartlomieju merged commit f6a619f into denoland:main Feb 24, 2026
110 checks passed
@bartlomieju bartlomieju deleted the fix/process-config-host-arch branch February 24, 2026 06:57
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.

Cannot read properties of undefined (reading 'variables') => process.config

3 participants