refactor: Bundle autocertifier-client#3330
Merged
mondoreale merged 8 commits intobundlesfrom Jan 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a Rollup-based bundling workflow for the autocertifier-client package to generate dual CommonJS and ES module outputs alongside bundled TypeScript type definitions.
Key changes:
- New Rollup configuration to bundle JavaScript into CJS and ESM formats
- TypeScript configuration updates to use module preservation and bundler resolution
- Package.json updates to specify dual entry points and restrict distributed files to bundle outputs only
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
packages/autocertifier-client/tsconfig.json |
Adds module: "preserve" and moduleResolution: "bundler" for bundler-oriented compilation |
packages/autocertifier-client/rollup.config.mts |
Introduces Rollup configuration for bundling JS (CJS/ESM) and TypeScript declarations |
packages/autocertifier-client/package.json |
Updates entry points, build scripts, file exports, and adds Rollup-related dependencies |
package-lock.json |
Adds dependencies for Rollup, plugins, tsx, rimraf, and their transitive dependencies |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a2331fb to
158417b
Compare
Let's buy some time and let's not go towards strict ESM for now. Later sure!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new bundling workflow for the
autocertifier-clientpackage, adding Rollup-based builds for both JavaScript and TypeScript types. It also updates the package configuration to support both CommonJS and ES module outputs, improves build script management, and refines the package's file exports for better distribution.Build system integration
rollup.config.mtsfile to bundle both CommonJS (exports.cjs) and ES module (exports.mjs) outputs, as well as generate TypeScript type definitions using Rollup and relevant plugins.tsconfig.jsonto usemodule: preserveandmoduleResolution: bundlerfor compatibility with the new bundling setup.Package configuration improvements
package.jsonto specify bothmain(CommonJS) andmodule(ESM) entry points, and refined thefilesfield to export only the necessary bundle outputs.postbuild,reset-self) and improved the build pipeline to include cleaning up build artifacts and running Rollup after TypeScript compilation.Dependency updates
tsx, andrimrafas development dependencies to support the new build process.