Skip to content

fix: add missing worker/ to files field#610

Merged
yaacov merged 1 commit intoyaacov:mainfrom
Dennis-SEG:fix/add-worker-to-files-field
Mar 20, 2026
Merged

fix: add missing worker/ to files field#610
yaacov merged 1 commit intoyaacov:mainfrom
Dennis-SEG:fix/add-worker-to-files-field

Conversation

@Dennis-SEG
Copy link
Copy Markdown
Contributor

@Dennis-SEG Dennis-SEG commented Mar 20, 2026

Summary

  • Adds "worker" to the files array in package.json

Problem

v8.0.24 introduced a files field in package.json but omitted the worker/ directory. Since apis/worker.js requires ../worker/index, the package fails at load time:

Error: Cannot find module '../worker/index'

This breaks all dependents using ^8.x ranges.

v8.0.23: worker/index.js included (no files field, so everything was packaged)
v8.0.24: worker/index.js missing (new files field doesn't list worker)

Fix

One-line change: add "worker" to the files array.

Fixes #609

Summary by CodeRabbit

  • Chores
    • Updated package distribution to include the worker directory alongside core package files.

The worker/ directory is required by apis/worker.js (require('../worker/index'))
but was omitted from the files field, causing v8.0.24 to fail at require time:

  Error: Cannot find module '../worker/index'

This breaks all dependents using ^8.x ranges.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 06738109-3d8e-46d8-bc17-212c3e365a6e

📥 Commits

Reviewing files that changed from the base of the PR and between e6172a6 and 9f34744.

📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Updated package.json to include the worker directory in the files array, ensuring the directory is bundled when the package is published to npm, resolving a module resolution error in v8.0.24.

Changes

Cohort / File(s) Summary
Package Configuration
package.json
Added "worker" entry to the files array to include the worker directory in the npm package distribution, fixing a missing module error.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A worker was lost in the digital fray,
Hidden from packages, tucked far away,
But one tiny line in the config so neat,
Brought the worker back home—now the fix is complete! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the missing worker/ directory to the files field in package.json to fix the module-not-found error.
Linked Issues check ✅ Passed The pull request directly addresses the coding requirement from issue #609 by adding 'worker' to the files array in package.json, which resolves the module-not-found error and restores the worker/ directory to the published package.
Out of Scope Changes check ✅ Passed The change is narrowly scoped to the stated objective: a single addition of 'worker' to the files array in package.json with no extraneous modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

@yaacov yaacov merged commit e241e09 into yaacov:main Mar 20, 2026
4 checks passed
@yaacov
Copy link
Copy Markdown
Owner

yaacov commented Mar 20, 2026

@Dennis-SEG nice, thank you for the fast fix !

@yaacov
Copy link
Copy Markdown
Owner

yaacov commented Mar 20, 2026

@Dennis-SEG
Copy link
Copy Markdown
Contributor Author

You're welcome.

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.

v8.0.24: worker/ directory missing from npm package (files field incomplete)

2 participants