Draft
Add CI check to enforce files field on all published packages#2288
files field on all published packages#2288Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent-Logs-Url: https://github.com/farm-fe/farm/sessions/1077f71f-47a1-437a-9b10-db30a6f653d1 Co-authored-by: wre232114 <8372439+wre232114@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add CI check for Rust and JS plugins and published packages
Add CI check to enforce Mar 31, 2026
files field on all published packages
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.
Without a
filesfield, npm publishes everything not in.npmignore, risking accidental inclusion of source, configs, or other unintended files. Several packages were missing this field entirely.New CI check
scripts/check-package-files.mjs— validates on every PR:filesmust includeindex.js+index.d.ts; all source-file entries must exist on disknpm/<abi>/):filesmust includeindex.farmpackages/*:filesmust be defined and non-empty (private packages skipped)Runs via
.github/workflows/check-package-files.yaml— lightweight, no build required.Package fixes
packages/create-farmfiles: ["create-farm.js", "index.js", "index.d.ts"]packages/runtime-plugin-hmrfiles: ["dist"]js-plugins/qiankunfiles: ["dist"]js-plugins/tailwindcssfiles: ["dist"]rust-plugins/replace-dirnamefunc.jsfromfiles— file doesn't exist and isn't referenced in exports