Skip to content

Bump immutable from 3.8.3 to 4.3.9 - #192

Merged
celiac747 merged 1 commit into
mainfrom
celiac747-bump-immutable-4-3-9
Sep 1, 2026
Merged

Bump immutable from 3.8.3 to 4.3.9#192
celiac747 merged 1 commit into
mainfrom
celiac747-bump-immutable-4-3-9

Conversation

@celiac747

Copy link
Copy Markdown
Contributor

Summary

Bumps the root immutable resolution from 3.8.3 to 4.3.9.

immutable is not a direct dependency of any package — it is a transitive dependency of relay-compiler@12 / @ardatan/relay-compiler@12 (used by packages/nova-graphql-compiler), pinned through the root resolutions block.

Why the resolution bump alone isn't enough

immutable v4 changed Map#toArray() to return [key, value] entry pairs instead of values, which silently breaks relay-compiler v12 codegen (it produces malformed/empty schema input rather than erroring). To keep relay-compiler v12 working under immutable v4, both copies are patched to use valueSeq().toArray():

  • lib/core/CompilerContext.jsdocuments(): this._documents.toArray()this._documents.valueSeq().toArray()
  • lib/codegen/CodegenRunner.jsbaseDocuments.toArray()baseDocuments.valueSeq().toArray()

This mirrors the fix in microsoft/graphitation PR #720. Patches are applied via Yarn berry's native patch: protocol (.yarn/patches/*.patch + resolutions wiring).

Changes

  • package.json: resolutions.immutable ^3.8.3^4.3.9, plus patch: resolution entries for relay-compiler@npm:^12.0.0 and @ardatan/relay-compiler@npm:12.0.0.
  • yarn.lock: immutable now resolves to 4.3.9 (no 3.8.3 entry remains).
  • .yarn/patches/relay-compiler-npm-12.0.0-*.patch and .yarn/patches/@ardatan-relay-compiler-npm-12.0.0-*.patch.

No beachball changefile — immutable is a resolution, not a published dependency of these packages.

Validation

  • yarn install --immutable passes.
  • On-disk CompilerContext.js and CodegenRunner.js for both relay-compiler and @ardatan/relay-compiler contain valueSeq().toArray().
  • yarn lage build ✓ and yarn lage test ✓ (all green).
  • nova-graphql-compiler relay codegen test passes end-to-end (generates Example_feedbackFragment.graphql.ts), confirming relay-compiler v12 works correctly under immutable v4.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Bump the root immutable resolution to 4.3.9. immutable v4 changed Map#toArray() to return [key, value] entry pairs instead of values, which silently breaks relay-compiler v12 codegen. Patch both relay-compiler@12 and @ardatan/relay-compiler@12 to use valueSeq().toArray() in CompilerContext.documents() and CodegenRunner, matching microsoft/graphitation PR #720.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@celiac747
celiac747 force-pushed the celiac747-bump-immutable-4-3-9 branch from dfa5f45 to 5c889c4 Compare September 1, 2026 09:37
@celiac747
celiac747 merged commit d6328a4 into main Sep 1, 2026
5 checks passed
@celiac747
celiac747 deleted the celiac747-bump-immutable-4-3-9 branch September 1, 2026 12:41
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.

2 participants