Skip to content

refactor: switch to tsc esm build#12

Merged
iHildy merged 3 commits into
mainfrom
refactor/tsc-esm-build
Dec 31, 2025
Merged

refactor: switch to tsc esm build#12
iHildy merged 3 commits into
mainfrom
refactor/tsc-esm-build

Conversation

@iHildy

@iHildy iHildy commented Dec 31, 2025

Copy link
Copy Markdown
Owner

Summary

Merges refactor that switches the project build to tsc for an ES module (ESM) build, updates imports to use .js extensions, and adjusts config and metadata accordingly.

Changes

  • Build pipeline migrated from bun-based build to tsc with ES module support;bun-based step removed
  • Imports updated to use .js extensions across src/index.ts and sync modules
  • Type imports updated to .js counterparts (config.ts/paths.ts/errors.ts → .js equivalents)
  • tsconfig.build.json extended for ESNext modules, Bundler resolution, and test exclusion
  • package.json updated: files -> ["dist"], build script simplified to tsc + copy
  • .mise task build updated to align with new tsc-based workflow
  • Minor refactor in service flow removing certain initial-sync steps (commented/disabled lines)

Testing

  • Build: run the project build (e.g., mise run build or bun run build) and verify a new dist/ directory appears
  • Verify imports: ensure all modules import with .js extensions at runtime
  • Tests: run the test suite (e.g., mise run test or bun test) to confirm no regressions
  • sanity check: confirm src/command is copied to dist/command as before

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @iHildy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the project's build infrastructure by transitioning from a Bun-centric build process to a standard TypeScript compiler (tsc) workflow for producing ES modules. This change aims to simplify the build pipeline, enhance compatibility with modern JavaScript environments, and standardize module resolution by updating all internal imports to use .js extensions. The updated configuration ensures a cleaner, more maintainable build output.

Highlights

  • Build System Migration: The project's build process has been migrated from a Bun-based build to using the TypeScript compiler (tsc) for generating ES modules.
  • ESM Import Updates: All internal module imports within the src/ directory have been updated to use .js file extensions, aligning with ES module conventions for runtime resolution.
  • Simplified Build Scripts: The build scripts in package.json and .mise/tasks/build have been streamlined to solely rely on tsc for compilation, removing the previous bun build step.
  • TypeScript Configuration Enhancements: tsconfig.build.json has been updated to configure tsc for ESNext module output, Bundler module resolution, and to explicitly exclude test files from the build.
  • Service Flow Refinement: Minor cleanup in src/sync/service.ts by removing commented-out or redundant initial synchronization steps.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the build process to use tsc for generating ES modules. This is a good step towards modernizing the project's build pipeline. The changes are consistent across the codebase, with build scripts, TypeScript configuration, and import paths all updated to support the new ESM-based build. I've noticed one critical configuration issue in tsconfig.build.json that needs to be addressed. Apart from that, the refactoring is well-executed.

Comment thread tsconfig.build.json Outdated
@jules-relay

jules-relay Bot commented Dec 31, 2025

Copy link
Copy Markdown

🤖 Review Jules Relay

I found 1 Gemini suggestion so far.

Type /relay batch to send all suggestions to Jules.

iHildy and others added 2 commits December 31, 2025 01:44
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@iHildy iHildy merged commit 3e0966e into main Dec 31, 2025
3 checks passed
@iHildy iHildy deleted the refactor/tsc-esm-build branch December 31, 2025 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant