Skip to content

Declare date-fns in base, which imports it - #6220

Merged
backspace merged 1 commit into
mainfrom
base-declare-date-fns
Sep 21, 2026
Merged

backspace merged 1 commit into
mainfrom
base-declare-date-fns

Conversation

@backspace

Copy link
Copy Markdown
Contributor

packages/base/date.gts and datetime.gts both import { … } from 'date-fns', and packages/base/package.json never declared it.

Nothing is broken today. The host shims date-fns on the virtual network (externals.ts), so a base module fetched from the realm resolves it at runtime through the shim. But pnpm links only declared dependencies, so date-fns is absent from packages/base/node_modules, and anything resolving base's imports at build time rather than runtime cannot find it.

That is the same class of gap as ember-provide-consume-context in #6183: a manifest that does not describe what the package actually imports, masked by a runtime mechanism.

Why now

It blocks two modules in CS-13056. Serving date/datetime from the host bundle compiles base's source against base's own dependencies, and the build fails with:

Rolldown failed to resolve import "date-fns" from "packages/base/datetime.gts"

Declaring it is a prerequisite for that work and stands on its own regardless.

Effect

None at runtime. The catalog already pins date-fns, every existing importer resolves to 2.30.0, and base now joins them — the entire lockfile diff is three added lines under packages/base. packages/host, packages/runtime-common and packages/realm-server all still resolve to 2.30.0, unchanged.

🤖 Generated with Claude Code

`date.gts` and `datetime.gts` import `date-fns`, and `packages/base` never
declared it. It works today because the host shims `date-fns` on the
virtual network, so base modules fetched from the realm resolve it at
runtime — but pnpm links only declared dependencies, so the package is
absent from `packages/base/node_modules` and anything resolving base's
imports at build time cannot find it.

Declaring it through the catalog costs nothing: every importer already
resolves to 2.30.0 and this one joins them, which is the whole lockfile
diff. Same manifest-honesty gap as ember-provide-consume-context.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-21T10:27:25.759178Z d895492 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Host Test Results

    1 files      1 suites   2h 41m 54s ⏱️
4 917 tests 4 903 ✅ 14 💤 0 ❌
4 932 runs  4 918 ✅ 14 💤 0 ❌

Results for commit d895492.

Realm Server Test Results

    1 files    244 suites   1h 33m 23s ⏱️
3 618 tests 3 618 ✅ 0 💤 0 ❌
3 669 runs  3 669 ✅ 0 💤 0 ❌

Results for commit d895492.

@backspace
backspace requested a review from a team September 21, 2026 11:05
@backspace
backspace merged commit 773d880 into main Sep 21, 2026
76 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.

2 participants