Skip to content

fix(create): remove memfs runtime dependency - #501

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/remove-memfs-runtime
Aug 7, 2026
Merged

fix(create): remove memfs runtime dependency#501
tannerlinsley merged 1 commit into
mainfrom
taren/remove-memfs-runtime

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Aug 7, 2026

Copy link
Copy Markdown
Member

Summary

  • reuse the internal worker-safe memory environment for Node create flows
  • keep memfs pinned as a test-only dependency
  • guard the public entrypoint and package manifest against runtime memfs regressions

Why

@tanstack/create's broad memfs runtime range now pulls newly split @jsonjoy.com/fs-* packages into temporary npx installs. Generated apps never use them. The CLI still needs an in-memory environment for add-to-app and custom add-on flows, but it already ships an equivalent internal implementation.

Related: #329, #396, X report

Validation

  • pnpm build
  • pnpm test:unit
  • pnpm test:e2e
  • blank create smoke with install and Git disabled

Summary by CodeRabbit

  • Improvements

    • Reduced the published runtime footprint of @tanstack/create by removing an unnecessary runtime dependency.
    • Updated the in-memory environment handling to reuse the package’s existing environment capabilities.
    • Preserved path handling and application creation behavior while simplifying internal filesystem management.
  • Tests

    • Added coverage confirming the package can be imported without the removed runtime dependency.
    • Verified the dependency is retained only for development and testing.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The create package now reuses the edge memory environment, removes memfs from runtime dependencies, pins it as a development dependency, and adds tests for imports and package metadata.

Changes

Create memory environment

Layer / File(s) Summary
Shared memory environment integration
packages/create/package.json, packages/create/src/environment.ts, packages/create/src/file-helpers.ts
createMemoryEnvironment now delegates to the edge environment with paths resolved from process.cwd(). MemoryEnvironmentOutput is re-exported. memfs moves to pinned development dependencies, and a related comment is clarified.
Dependency regression coverage
packages/create/tests/index.test.ts, .changeset/quiet-files-travel.md
Tests verify dynamic imports and confirm that memfs is only a development dependency. A patch changeset records the package changes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: alemtuzlak

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing memfs from the runtime dependencies of @tanstack/create.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/remove-memfs-runtime

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/create/tests/index.test.ts

Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
The file was not found in any of the provided project(s): packages/create/tests/index.test.ts


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/create/src/environment.ts`:
- Around line 126-128: Update the environment.writeFileBase64 wrapper in
createDefaultEnvironment so base64:: contents are decoded before being passed to
the shared writeFileBase64 implementation, preserving decoded binary bytes in
the memory environment; alternatively, align the edge file helper semantics
consistently while retaining decoded-write behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b01a8ab-13a5-4944-be68-c711c18d7e27

📥 Commits

Reviewing files that changed from the base of the PR and between db108a1 and e4a4ce5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • .changeset/quiet-files-travel.md
  • packages/create/package.json
  • packages/create/src/environment.ts
  • packages/create/src/file-helpers.ts
  • packages/create/tests/index.test.ts

Comment thread packages/create/src/environment.ts
@tannerlinsley
tannerlinsley merged commit 944f20f into main Aug 7, 2026
7 checks passed
@tannerlinsley
tannerlinsley deleted the taren/remove-memfs-runtime branch August 7, 2026 21:57
@github-actions github-actions Bot mentioned this pull request Aug 7, 2026
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