GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: minify a precompiled check by alexander-akait · Pull Request #235 · webpack/schema-utils Conversation
|
| Size | Load | First call | |
|---|---|---|---|
precompile (current) |
983 KB | 21.0 ms | 4.3 ms |
precompile --minify |
438 KB | 13.2 ms | 3.9 ms |
| webpack's own check | 423 KB | 13.2 ms | 3.7 ms |
The remaining ~15 KB is ucs2length. webpack's check uses .length for minLength, which accepts a single emoji for minLength: 2 where validate rejects it. That's the unsafe direction for a check, so the minified check keeps counting characters the way validate does.
Without --minify, the output is byte-identical to 4.7. Checks already committed, such as minimizer-webpack-plugin's, stay up to date under --check. All of the changes above apply only with --minify.
requires, and the regex written once;enum objects and absolutePath;--minify writes the minified check, and --check with --minify passes on it, while --check without --minify reports it out of date.npm run lint and the full suite (1043 tests) pass. Coverage is 100% statements in cli.js and 99% in precompile.js.Generated by Claude Code
--minify option to precompilation, also available through the precompile API. It generates smaller checks that load faster while preserving validation behavior.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
`schema-utils precompile --minify` and `precompile(schema, { minify: true })`
drop the error objects a check never reports, write the `equal` and
`ucs2length` helpers into the check instead of loading them from
`schema-utils`, keep the `absolutePath` regex in one constant, and minify
with terser, an optional peer dependency.
For webpack's options the check goes from 983 KB to 438 KB and loads in
13ms instead of 21ms, the same as webpack's own tooling/precompile-schemas.js
output, while still counting characters the way `validate` does.
Without --minify the output is byte-identical, so checks generated with
4.6/4.7 stay up to date.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QYPkbvwyRWt2SHgXDoYRdo
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #235 +/- ## ========================================== + Coverage 97.17% 97.21% +0.03% ========================================== Files 13 13 Lines 1204 1220 +16 Branches 465 472 +7 ========================================== + Hits 1170 1186 +16 Misses 32 32 Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
WalkthroughThe precompile API and CLI now support a Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
ee8e9462-fa2b-4ee7-8706-ae4b63d0659epackage-lock.json is excluded by !**/package-lock.json.changeset/precompile-minify.mdREADME.mddeclarations/precompile.d.tspackage.jsonsrc/cli.jssrc/precompile.jstest/helpers/precompiled.jstest/precompile.test.jsIncluded review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The regex removing error objects also matched a schema string or pattern
that only looked like one, such as `\{instancePathx,keyword:y,`, and
changed what it matched. It now needs the assignment and the exact shape
ajv writes. webpack's minified options check is byte-identical.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01QYPkbvwyRWt2SHgXDoYRdo
Use webpack's own JavaScript minifier (webpack 5.112.0 or later, an optional peer) instead of terser, so --minify needs nothing beyond webpack itself. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QYPkbvwyRWt2SHgXDoYRdo
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Just letting you know that the new peer dependency breaks builds that already use a webpack 5.x version older than 5.112. Strictly speaking, this is a breaking change: we should have declared 5.0.0 as a peer dependency. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
This affects users of NestJS v11 which pins
└─┬ @nestjs/[email protected] ├─┬ [email protected] │ └─┬ [email protected] │ ├─┬ [email protected] │ │ ├─┬ [email protected] │ │ │ └── [email protected] deduped │ │ └── [email protected] deduped │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] ├─┬ [email protected] │ └── [email protected] deduped invalid: "^5.112.0" from node_modules/@nestjs/cli/node_modules/webpack/node_modules/schema-utils └─┬ [email protected] ├─┬ [email protected] │ └── [email protected] deduped └── [email protected] deduped npm error code ELSPROBLEMS Opened nestjs/nest-cli#3674 for this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The ^5.112.0 peer range added in #235 broke installs that use an older webpack 5 (e.g. NestJS CLI pins [email protected]): npm reports the peer as invalid even though it is optional. Only precompile with minify needs webpack 5.112.0+, and it already throws a clear error otherwise. Claude-Session: https://claude.ai/code/session_013FhutRAVeDugCL2BfYpLty Co-authored-by: Claude <[email protected]>
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.