-
Notifications
You must be signed in to change notification settings - Fork 50
[openapi-validator-rulesets] Reduce package size by 88% and require Node 20 #817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
|
@copilot: What about the What about the |
esm folder: It's a build artifact (intermediate step for rollup), not needed in the published package. The original didn't include it. src folder and .js.map: The original package (8.5MB) included Options:
Recommend option 1 (remove .js.map) to match original behavior and minimize size. Which would you prefer? |
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
esm folder: Not needed in the published package. It's a build artifact used by rollup to generate the src folder and .js.map: The original package included I recommend removing |
|
@copilot: While we're here, upgrade the minimum required node version in package.json from 18 to 20. While this may technically be a breaking change, we have a policy of not bumping major or even minor when dropping EOL node versions. Bumping only patch is sufficient. But, do add the change of minimum node version, from 18 to 20, as another changelog entry for the patch version. |
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Implementation Details
The
filesfield in package.json uses a simplified pattern:dist/**- includes all compiled files!dist/**/tests/**and!dist/**/test/**- excludes test directoriesThe package maintains the original behavior of including .js.map files without source files. While this means source maps won't display original source in debuggers, it matches the original package structure and keeps the package size minimal.
The minimum Node.js version has been upgraded from 18 to 20, following the project policy of not requiring major/minor version bumps when dropping EOL Node.js versions.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.