Skip to content

Scope React Native brace-expansion override#1545

Merged
ChiragAgg5k merged 1 commit into
unity-client-sdk-continuedfrom
fix/react-native-brace-expansion-scope
May 19, 2026
Merged

Scope React Native brace-expansion override#1545
ChiragAgg5k merged 1 commit into
unity-client-sdk-continuedfrom
fix/react-native-brace-expansion-scope

Conversation

@ChiragAgg5k
Copy link
Copy Markdown
Member

@ChiragAgg5k ChiragAgg5k commented May 19, 2026

What

  • Scope the React Native brace-expansion override to glob instead of applying it globally
  • Regenerate the React Native package lock template
  • Preserve serve-handler's nested CommonJS-compatible brace-expansion@1.1.14

Testing

  • python3 -m json.tool templates/react-native/package.json.twig
  • python3 -m json.tool templates/react-native/package-lock.json.twig
  • composer lint-twig
  • docker run --rm -v :/app -w /app php:8.3-cli php example.php react-native

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 19, 2026

Greptile Summary

This PR narrows the brace-expansion npm override from a global rule to one scoped under glob, preventing the override from forcing serve-handler onto the ESM-only brace-expansion@5.x it cannot use. The lock file is regenerated accordingly.

  • package.json.twig: replaces "brace-expansion": "^5.0.6" at the top-level overrides with a nested glob object ("." pins glob itself to ^13, brace-expansion beneath it pins the transitive dep to ^5.0.6). This is the correct npm overrides syntax for scoping a transitive dependency to a single parent.
  • package-lock.json.twig: top-level brace-expansion@5/balanced-match@4 entries gain "peer": true (they are now only reachable via a peer-dep chain through expo→glob), and three new nested entries under serve-handler (brace-expansion@1.1.14, balanced-match@1.0.2, concat-map@0.0.1) restore the CommonJS-compatible version that serve-handler requires.

Confidence Score: 5/5

Safe to merge; the change is a targeted, well-contained dependency-resolution fix with no production code altered.

Both the package.json.twig override scoping (using the npm-documented . self-reference syntax) and the corresponding lock file regeneration are consistent and correct. serve-handler regains its own brace-expansion@1.1.14 tree, and glob continues to resolve brace-expansion@5. No logic or generated-SDK code is affected.

No files require special attention.

Important Files Changed

Filename Overview
templates/react-native/package.json.twig Scopes the brace-expansion override to only apply within glob's dependency tree, removing the global override that was inadvertently forcing serve-handler onto an incompatible ESM-only version.
templates/react-native/package-lock.json.twig Lock file regenerated to reflect the scoped override: top-level brace-expansion@5 and balanced-match@4 are now marked peer, and serve-handler gets its own nested brace-expansion@1.1.14 + balanced-match@1.0.2 + concat-map@0.0.1 entries.

Reviews (1): Last reviewed commit: "Fix React Native brace-expansion overrid..." | Re-trigger Greptile

@ChiragAgg5k ChiragAgg5k merged commit c7601f5 into unity-client-sdk-continued May 19, 2026
56 checks passed
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.

1 participant