Commit 5a437bd
Fix missing plugin.js in published package (v2.1.2) (#85)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
### Problem
After the Yarn migration (#69) and the v2.1.1 release (#83), downstream
consumers get:
```
Error: Cannot find module './plugin'
Require stack:
- node_modules/@foxglove/eslint-plugin/index.js
```
### Root cause
`index.js` requires `./plugin`, but `plugin.js` is not included in the
published npm package.
The `files` array in `package.json` uses `"**/*.js"` to include
JavaScript files. While npm treats this glob as matching all `.js` files
including those at the root, Yarn 4's `pack` command does not match
root-level files with `**/*.js`. As a result:
- `index.js` is included because it's the `main` entry point (always
auto-included by npm/yarn)
- `configs/*.js` and `rules/*.js` are included because they're in
subdirectories
- `plugin.js` at the root is **not** matched and silently excluded
### Fix
Add `plugin.js` explicitly to the `files` array so it is always included
in the published package regardless of glob behavior differences between
package managers.
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a
href="https://cursor.com/agents/bc-1ca496a4-ff18-4ef8-baf9-3a9b960da71d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-1ca496a4-ff18-4ef8-baf9-3a9b960da71d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>1 parent 6cb8669 commit 5a437bd
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
0 commit comments