#9259: Fix: Restore explicit glob patterns in package.json files field
stale
Cluster:
Browser Extension Fixes
## 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
#9796: fix(cli): correct fallback path for bundled Chrome extension (#9772)
by lailoo · 2026-02-05
82.8%
#9398: Fix browser extension install path calculation
by vishaltandale00 · 2026-02-05
79.6%
#10589: fix: chrome extension install fails in bundled dist layout
by joetomasone · 2026-02-06
79.3%
#10937: fix(browser): correct fallback path for bundled Chrome extension
by dddabtc · 2026-02-07
79.2%
#13585: fix: .gitignore `.tgz` → `*.tgz` glob pattern
by carrotRakko · 2026-02-10
75.8%
#20055: fix(plugins): strip workspace:* dev-deps before npm install
by openperf · 2026-02-18
75.4%
#11454: fix(plugins): remove workspace:* from extension dependencies
by AnonO6 · 2026-02-07
75.0%
#3973: fix: enhance npm package integrity checks and include critical files
by YeSuX · 2026-01-29
74.7%
#8988: fix: resolve security vulnerabilities in dependencies
by fotorpics · 2026-02-04
74.0%
#11415: Update package.json metadata for npm discoverability
by PythonUser42 · 2026-02-07
73.7%