Add canonical remix export manifest#11392
Merged
Merged
Conversation
Contributor
Preview Build AvailableA preview build has been created for this PR. You can install it using: pnpm install "remix-run/remix#preview/pr-11392&path:packages/remix"This preview build will be updated automatically as you push new commits. |
87d48ee to
aad3c32
Compare
- Collapse 24 literal entries into 10 (4 patterns + 6 literals)
- Patterns use regex in value + $N capture refs in key, e.g.
"remix/middleware/$1": "@remix-run/([a-z-]+)-middleware"
- Test: every pattern 1 workspace packagematches
- Test: every manifest value is a real export of its package
- Test: all exports of every referenced package are covered
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Load manifest.json at startup - buildSpecifierToRemixPath() expands pattern entries against workspace canonical remix path - In export entry generation, consult the map before falling back to the mechanical `remix/<pkg-short-name>` path - Removes the hard-coded fetch-router/routes special-case (now manifest-driven) - Generated exports now use canonical paths: remix/router, remix/routes, remix/middleware/*, remix/data-table/*, remix/session-storage/*, etc. - Fix manifest.test.ts: use const for module-scope bindings (lint rule) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
remix/router remix/middleware/* remix/data-table/* remix/file-storage/* remix/session-storage/* remix/session-storage/* Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add docs/src/generate/manifest.ts: resolveRemixPath() helper that expands pattern entries and resolves @remix-run/* specifiers to their canonical remix/* import paths, with mechanical fallback remix/ rewrite with resolveRemixPath() in getApiFilePath() - packages.ts: replace mechanical regex in getDocsPackageName() with resolveRemixPath() - docs/src/server/prerender.ts, router.tsx: update remix/fetch-router remix/router Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- buildSpecifierToRemixPath(), readManifest(), readWorkspacePackageNames() all live in one place - generate-remix.ts imports from there (removes local copy) - docs/src/generate/manifest.ts builds the eager Map the same way, exposing resolveRemixPath() as a thin lookup wrapper - manifest.test.ts uses the shared builder; removes expandPatternEntry() Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The utility now returns the full 'remix/...' path so callers don't need to prepend it manually. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All specifiers are @remix-run/pkg or @remix-run/pkg/subpath, so the non-@ branch was dead code. Split on '/' and take the first two parts as the package name, remainder as subpath. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sub-exports are always explicit manifest entries; no subpath fallback needed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consumers now pass packagesDir instead of a pre-scanned name list. readWorkspacePackageNames is removed as a public export. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
buildSpecifierToRemixPath(packagesDir) is now the only call needed. It reads packages/remix/manifest.json itself. readManifest removed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TypeDoc emits @remix-run/fetch-router.routes.Symbol as the full name for symbols in the fetch-router/routes sub-export. getApiFilePath was mapping remix/router, leaving 'routes' as a namespace segment in the path. Fix: after shifting the package name, check if pkg + first namespace segment is a more specific manifest entry. If so, consume that segment and use the specific path (remix/routes) instead. Also exports hasRemixPackage() predicate from manifest.ts for this check. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
remix/data-table/* remix/router - Fix manifest.json middleware regex typo: missing opening bracket Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update README files, skill docs, and demo docs across the repo:
remix/router
remix/middleware/*
remix/data-table/*
remix/file-storage/*
remix/session-storage/*
remix/session-storage/{cookie,fs,memory}
Skipped: docs/build/ (untracked generated output), .changes/ and
CHANGELOG.md (historical records).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add missing session-storage, data-table, and file-storage renames. Organize by category for readability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
router middleware/* data-table/* file-storage/s3 session-storage/* Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ca636dd to
9c5f0ff
Compare
This reverts commit b56a8d8.
Legacy aliases cover old paths. The only intentional change file for this PR is major.remix.update-exports.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Legacy alias entries carry the readmePath and clear it from canonical entries, so READMEs land alongside the old mechanical export files (e.g. cop-middleware/README.md) matching origin/main's structure. Reduces PR diff noise. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The tags weren't surfacing in IDEs, so they added noise without benefit. Renamed the field to legacyAliasOf to keep the intent clear. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Re-sort allExports after pushing legacy aliases so they're interleaved with canonical exports rather than appended at the end. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brophdawg11
commented
May 13, 2026
…ports Stub files now use the sub-package name (e.g. fetch-router.ts) rather than the canonical remix path name (e.g. router.ts). The package.json exports field does the human-readable mapping: './router' -> './src/fetch-router.ts' './fetch-router' -> './src/fetch-router.ts' (legacy alias, same stub) This makes the mapping explicit and readable without needing to open any generated file. Legacy aliases share stubs with their canonical counterparts so no duplicate files are written. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Validates the new export structure end-to-end. Old mechanical paths still work via legacy aliases but bookstore now uses the canonical ones: remix/fetch-router -> remix/router remix/*-middleware -> remix/middleware/* remix/data-table-sqlite -> remix/data-table/sqlite remix/session/fs-storage -> remix/session-storage/fs ... (etc.) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brophdawg11
commented
May 14, 2026
…cyAliases - Replace getRemixRunPackages() with scanPackages() + buildExportsFromManifest() - Remove buildLegacyAliases() and legacyAliasOf field entirely - All exports now driven by manifest.json entries (canonical first, legacy aliases after) - isLegacyAlias() helper replaces legacyAliasPaths Set in change-file logic - Remove buildSpecifierToRemixPath import from generate-remix.ts - Update manifest.test.ts: replace pattern-matching test with format validation test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prefer non-1:1 mapping when 2 remix paths share a specifier. Throw if 3+ paths map to the same specifier. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The remix package's sub-export discovery was creating sidebar entries for legacy alias paths (e.g. remix/fetch-router/routes) in addition to the canonical ones (remix/routes). Skip any remix umbrella sub-export whose mechanical docs path doesn't match the canonical manifest path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…paths Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ckage skill - Add test: 'every @remix-run/* workspace package is referenced in the manifest' - Exclude @remix-run/cli (handled separately by generate-remix) - Update add-package skill step 8 to document manifest.json update requirements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
brophdawg11
commented
May 14, 2026
| "remix/ui/test": "@remix-run/ui/test", | ||
| "remix/ui/theme": "@remix-run/ui/theme", | ||
|
|
||
| "_comment": "Legacy aliases: mechanical paths kept for backwards compatibility. Canonical entries above take precedence.", |
Contributor
Author
There was a problem hiding this comment.
When we're ready to drop these we can just delete these items from the manifest
Contributor
|
The preview branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #11384.
Rewrite
remix/<pkg>exports to use canonical domain-oriented names via a manifest we maintain in the repopackages/remix/manifest.json- new source of truthscripts/utils/manifest.ts- shared utilities used by all three consumers (generate-remix, docs, and tests)generate-remixanddocsupdated to respect the new canonical namesdemos/updated to use the new canonical namesThe manifest is a complete mapping of every remix export we wish to generate - including both "legacy" exports and the new canonical exports. When we are ready to drop legacy exports we just delete them from the manifest.