Skip to content

Conversation

@mondoreale
Copy link
Contributor

This pull request introduces a new bundling workflow for the autocertifier-client package, 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

  • Added a new rollup.config.mts file to bundle both CommonJS (exports.cjs) and ES module (exports.mjs) outputs, as well as generate TypeScript type definitions using Rollup and relevant plugins.
  • Updated tsconfig.json to use module: preserve and moduleResolution: bundler for compatibility with the new bundling setup.

Package configuration improvements

  • Modified package.json to specify both main (CommonJS) and module (ESM) entry points, and refined the files field to export only the necessary bundle outputs.
  • Added new build scripts (postbuild, reset-self) and improved the build pipeline to include cleaning up build artifacts and running Rollup after TypeScript compilation.

Dependency updates

  • Added Rollup, plugins for node resolution and type definitions, tsx, and rimraf as development dependencies to support the new build process.

@mondoreale mondoreale marked this pull request as ready for review January 6, 2026 17:01
@mondoreale mondoreale requested a review from Copilot January 6, 2026 17:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mondoreale mondoreale force-pushed the bundle-autocertifier-client branch from a2331fb to 158417b Compare January 6, 2026 21:35
Let's buy some time and let's not go towards strict ESM for now. Later sure!
@github-actions github-actions bot added the utils label Jan 6, 2026
@mondoreale mondoreale merged commit e9c757c into bundles Jan 6, 2026
21 checks passed
@mondoreale mondoreale deleted the bundle-autocertifier-client branch January 6, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants