← Back to PRs

#9259: Fix: Restore explicit glob patterns in package.json files field

by vishaltandale00 open 2026-02-05 02:12 View on GitHub →
stale
## Summary Fixes #9191 - Chrome extension missing from npm package in versions 2026.2.2+ ## Problem The Chrome extension (located in `assets/chrome-extension/`) was not being included in npm packages after commit 6fb2d3d changed the `files` field from explicit glob patterns like `assets/**` to directory paths like `assets/`. ## Root Cause While `assets/` should theoretically include subdirectories according to npm documentation, the explicit glob pattern `assets/**` is more reliable across npm versions and packaging tools. Some npm versions or packaging contexts may not correctly expand `assets/` to include nested subdirectories. ## Solution Restored explicit glob patterns for all directory entries in the `files` field: ```json "files": [ "assets/**", // Was: "assets/" "dist/**", // Was: "dist/" "docs/**", // Was: "docs/" "extensions/**", // Was: "extensions/" "skills/**" // Was: "skills/" ] ``` ## Testing - ✅ Verified glob pattern matches: `minimatch('assets/chrome-extension/manifest.json', 'assets/**')` returns `true` - ✅ Confirmed Chrome extension files exist in `assets/chrome-extension/` - ✅ Change is backward compatible - only makes the glob patterns more explicit ## Impact - ✅ Chrome extension will be included in npm packages again - ✅ All other assets, dist files, docs, extensions, and skills will also be properly included - ✅ Users won't need to downgrade to 2026.2.1 to access the Chrome extension - ✅ No breaking changes - purely additive fix ## Related - Regression introduced in commit 6fb2d3d7d ("feat: remove slop") - User report: https://github.com/openclaw/openclaw/issues/9191 🤖 Generated with Claude Code <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR updates the root `package.json` `files` whitelist to use explicit recursive globs (`assets/**`, `dist/**`, `docs/**`, `extensions/**`, `skills/**`) instead of directory entries (`assets/`, etc.). This directly affects what gets published to npm and restores inclusion of nested content like the Chrome extension under `assets/chrome-extension/`, addressing the regression reported in #9191. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk. - Change is narrowly scoped to npm packaging configuration, uses valid glob patterns, and does not affect runtime code paths; the diff matches the stated intent to restore inclusion of nested asset directories. - No files require special attention <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs