Repository navigation
feat: accept a precompiled check in the worker's getOptions - #261
alexander-akait wants to merge 2 commits into
Conversation
webpack's getOptions(schema, check) skips the schema when the check passes (webpack/webpack#22745). The worker reimplements getOptions, so a loader running under thread-loader kept compiling its schema. It now takes the same second argument; a failing check still validates fully. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYPkbvwyRWt2SHgXDoYRdo
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe loader-context Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #261 +/- ##
=======================================
Coverage 14.75% 14.75%
=======================================
Files 9 9
Lines 732 732
Branches 166 166
=======================================
Hits 108 108
Misses 543 543
Partials 81 81 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
fast-uri <= 3.1.7 has high severity advisories (GHSA-v2hh-gcrm-f6hx and others), which fail `npm audit --omit=dev` in the lint job. 3.1.8 is within ajv's ^3.0.1 range, so only the lockfile changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYPkbvwyRWt2SHgXDoYRdo
|
The lint job's Generated by Claude Code |
Summary
webpack/webpack#22745 adds an optional second argument to
this.getOptions:this.getOptions(schema, check). When the precompiled check passes, webpack skips the schema, soschema-utilsand ajv aren't loaded. Loaders are starting to pass it (webpack/coffee-loader#240, webpack/postcss-loader#746).The worker reimplements
getOptions, so a loader running under thread-loader would still compile its schema in every worker. The worker'sgetOptionsnow takes the same second argument:Tests
test/options-check.test.jsruns a loader through a real worker:src/worker.js.npm run lintand the full suite (17 tests, 6 snapshots) pass locally.Generated by Claude Code
Summary by CodeRabbit