MACRO Global Object

Description

Compile-time-inlined global object that Bun's bundler substitutes into the source during builds. Holds three fields: VERSION (package.json version), PACKAGE_URL (npm name, typically '@anthropic-ai/claude-code'), and ISSUES_EXPLAINER (issue-tracker URL/instructions). Without the bundler, references fail at runtime. Some files guard with typeof MACRO !== 'undefined' but most don't — requires a runtime shim (src/shims/macro.ts) that reads package.json at startup and installs MACRO on globalThis before app code runs.

Key claims

Relations

Sources

src-20260420-33991f80c88d