Skip to content

Fix bundled plugin package metadata#498

Merged
Fryuni merged 2 commits into
masterfrom
fix-deps-bundle
May 25, 2026
Merged

Fix bundled plugin package metadata#498
Fryuni merged 2 commits into
masterfrom
fix-deps-bundle

Conversation

@Fryuni
Copy link
Copy Markdown
Member

@Fryuni Fryuni commented May 25, 2026

Summary

Fix the published bundle so bundled plugin metadata is self-contained instead of resolving a sibling package.json at runtime. This prevents plugins like eslint-plugin-import-x from reading @croct/eslint-plugin's package metadata, or failing when the expected package file is absent.

Changes

  • Move eslint-plugin-import-x into runtime dependencies so the package graph matches the bundled code path.
  • Add a tsdown/Rolldown plugin that uses the transform AST to inline relative package.json require calls from bundled dependencies.
  • Add a regression test that builds the published bundle in an isolated package layout and verifies import-x metadata still points to eslint-plugin-import-x.

Testing

  • npm run lint
  • npm run validate
  • npm test -- --runInBand

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 25, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@croct/eslint-plugin@498

commit: 567e808

@Fryuni Fryuni merged commit 3e3aa8f into master May 25, 2026
7 checks passed
@Fryuni Fryuni deleted the fix-deps-bundle branch May 25, 2026 20: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