Skip to content

fix(@formatjs/unplugin): evaluate local message constants with OXC - #7686

Merged
longlho merged 4 commits into
formatjs:mainfrom
longlho:codex/fix-unplugin-constants
Oct 25, 2026
Merged

longlho merged 4 commits into
formatjs:mainfrom
longlho:codex/fix-unplugin-constants

Conversation

@longlho

@longlho longlho commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Resolve local const message fields using OXC semantic analysis and native constant evaluation through the existing CLI binding. Removes the JavaScript scope walker; preserves shadowing, shorthand fields, source maps, and the literal fast path.

Adds @formatjs/cli-lib/static-evaluation. Bazel resolves the native addon through @bazel/runfiles; published packages load the matching native npm package. No custom native-path environment variable. Imports, mutable/destructured bindings, cycles, and runtime values remain unresolved. Supported platforms are documented.

Fixes #7682.

Validation: 22 Bazel targets passed for native evaluation; 21 affected targets passed after the runfiles change, including changed-directory and manifest-only loading, five bundlers, package/type checks, and Babel conformance. All commit hooks passed.

@longlho longlho changed the title fix(@formatjs/unplugin): resolve local string constants fix(@formatjs/unplugin): evaluate local message constants with OXC Oct 25, 2026
@longlho
longlho merged commit e5b666b into formatjs:main Oct 25, 2026
17 checks passed
@longlho
longlho deleted the codex/fix-unplugin-constants branch October 25, 2026 22:46
longlho pushed a commit that referenced this pull request Oct 27, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>formatjs_cli: 1.8.3</summary>

##
[1.8.3](formatjs_cli_v1.8.2...formatjs_cli_v1.8.3)
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))
* **deps:** update oxc to 0.154
([#7659](#7659))
([2accd15](2accd15))
* **deps:** update ruff to v0.17.1
([#7672](#7672))
([21837f2](21837f2))
</details>

<details><summary>@formatjs/cli: 6.16.36</summary>

##
[6.16.36](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Dependencies

* The following workspace dependencies were updated
  * optionalDependencies
    * @formatjs/cli-native-darwin-arm64 bumped to 1.1.30
    * @formatjs/cli-native-linux-arm64 bumped to 1.2.30
    * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.28
    * @formatjs/cli-native-linux-x64 bumped to 1.1.30
    * @formatjs/cli-native-linux-x64-musl bumped to 1.0.28
    * @formatjs/cli-native-win32-x64 bumped to 1.1.31
</details>

<details><summary>@formatjs/cli-lib: 10.0.12</summary>

##
[10.0.12](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))


### Dependencies

* The following workspace dependencies were updated
  * optionalDependencies
    * @formatjs/cli-native-darwin-arm64 bumped to 1.1.30
    * @formatjs/cli-native-linux-arm64 bumped to 1.2.30
    * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.28
    * @formatjs/cli-native-linux-x64 bumped to 1.1.30
    * @formatjs/cli-native-linux-x64-musl bumped to 1.0.28
    * @formatjs/cli-native-win32-x64 bumped to 1.1.31
</details>

<details><summary>@formatjs/cli-native-darwin-arm64: 1.1.30</summary>

##
[1.1.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-arm64: 1.2.30</summary>

##
[1.2.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-arm64-musl:
1.0.28</summary>

##
[1.0.28](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-x64: 1.1.30</summary>

##
[1.1.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-x64-musl: 1.0.28</summary>

##
[1.0.28](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-win32-x64: 1.1.31</summary>

##
[1.1.31](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/editor: 1.8.0</summary>

##
[1.8.0](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Features

* **@formatjs/editor:** project and source models for multi-workspace
editors ([#7706](#7706))
([2cd0705](2cd0705))
</details>

<details><summary>@formatjs/unplugin: 1.2.15</summary>

##
[1.2.15](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @formatjs/cli-lib bumped to 10.0.12
</details>

<details><summary>babel-plugin-formatjs: 13.0.9</summary>

##
[13.0.9](https://github.com/formatjs/formatjs/compare/[email protected]@13.0.9)
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))
</details>

<details><summary>react-intl: 12.1.6</summary>

##
[12.1.6](https://github.com/formatjs/formatjs/compare/[email protected]@12.1.6)
(2026-10-27)


### Bug Fixes

* **deps:** update formatjs monorepo
([#7710](#7710))
([d800cee](d800cee))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
longlho pushed a commit that referenced this pull request Oct 28, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>formatjs_cli: 1.8.3</summary>

##
[1.8.3](formatjs_cli_v1.8.2...formatjs_cli_v1.8.3)
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))
* **deps:** update oxc to 0.154
([#7659](#7659))
([2accd15](2accd15))
* **deps:** update ruff to v0.17.1
([#7672](#7672))
([21837f2](21837f2))
</details>

<details><summary>@formatjs/cli: 6.16.36</summary>

##
[6.16.36](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Dependencies

* The following workspace dependencies were updated
  * optionalDependencies
    * @formatjs/cli-native-darwin-arm64 bumped to 1.1.30
    * @formatjs/cli-native-linux-arm64 bumped to 1.2.30
    * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.28
    * @formatjs/cli-native-linux-x64 bumped to 1.1.30
    * @formatjs/cli-native-linux-x64-musl bumped to 1.0.28
    * @formatjs/cli-native-win32-x64 bumped to 1.1.31
</details>

<details><summary>@formatjs/cli-lib: 10.0.12</summary>

##
[10.0.12](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))


### Dependencies

* The following workspace dependencies were updated
  * optionalDependencies
    * @formatjs/cli-native-darwin-arm64 bumped to 1.1.30
    * @formatjs/cli-native-linux-arm64 bumped to 1.2.30
    * @formatjs/cli-native-linux-arm64-musl bumped to 1.0.28
    * @formatjs/cli-native-linux-x64 bumped to 1.1.30
    * @formatjs/cli-native-linux-x64-musl bumped to 1.0.28
    * @formatjs/cli-native-win32-x64 bumped to 1.1.31
</details>

<details><summary>@formatjs/cli-native-darwin-arm64: 1.1.30</summary>

##
[1.1.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-arm64: 1.2.30</summary>

##
[1.2.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-arm64-musl:
1.0.28</summary>

##
[1.0.28](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-x64: 1.1.30</summary>

##
[1.1.30](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-linux-x64-musl: 1.0.28</summary>

##
[1.0.28](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/cli-native-win32-x64: 1.1.31</summary>

##
[1.1.31](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)
</details>

<details><summary>@formatjs/editor: 1.8.0</summary>

##
[1.8.0](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Features

* **@formatjs/editor:** project and source models for multi-workspace
editors ([#7706](#7706))
([2cd0705](2cd0705))
</details>

<details><summary>@formatjs/unplugin: 1.2.15</summary>

##
[1.2.15](https://github.com/formatjs/formatjs/compare/@formatjs/[email protected]...@formatjs/[email protected])
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * @formatjs/cli-lib bumped to 10.0.12
</details>

<details><summary>babel-plugin-formatjs: 13.0.9</summary>

##
[13.0.9](https://github.com/formatjs/formatjs/compare/[email protected]@13.0.9)
(2026-10-27)


### Bug Fixes

* **@formatjs/unplugin:** evaluate local message constants with OXC
([#7686](#7686))
([e5b666b](e5b666b))
</details>

<details><summary>react-intl: 12.1.6</summary>

##
[12.1.6](https://github.com/formatjs/formatjs/compare/[email protected]@12.1.6)
(2026-10-27)


### Bug Fixes

* **deps:** update formatjs monorepo
([#7710](#7710))
([d800cee](d800cee))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

@formatjs/unplugin silently skips constant-backed defaultMessage values supported by babel-plugin-formatjs

1 participant