Skip to content

Replace ncc with tsup for build process#15

Merged
gabrielrufino merged 4 commits intomainfrom
copilot/fix-5e28d5de-1bbe-4042-9be2-cf7fd795ecaa
Aug 2, 2025
Merged

Replace ncc with tsup for build process#15
gabrielrufino merged 4 commits intomainfrom
copilot/fix-5e28d5de-1bbe-4042-9be2-cf7fd795ecaa

Conversation

Copy link
Contributor

Copilot AI commented Aug 2, 2025

This PR migrates the build system from @vercel/ncc to tsup for bundling the TypeScript GitHub Action.

Changes Made

  • Replaced bundler: Removed @vercel/ncc and added tsup as the build tool
  • Updated build script: Simplified from ncc build src/index.ts -o dist to just tsup
  • Added configuration: Created tsup.config.ts with proper bundling settings for GitHub Actions
  • Maintained compatibility: The output remains a single bundled JavaScript file in dist/index.js

Benefits

  • Faster builds: tsup is built on esbuild and provides significantly faster build times
  • Modern tooling: tsup is actively maintained and provides better TypeScript support
  • Smaller output: The bundled file is now 933KB vs 1431KB with ncc
  • Better configuration: Declarative config file instead of command-line arguments

Technical Details

The tsup configuration ensures all dependencies (@actions/core, @actions/github, @faker-js/faker) are bundled into a single file, maintaining GitHub Actions compatibility. The output format remains CommonJS as required by the GitHub Actions runtime.

The build process continues to work exactly as before - npm run build produces the same dist/index.js file that the action.yml references.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits August 2, 2025 15:35
Co-authored-by: gabrielrufino <31759891+gabrielrufino@users.noreply.github.com>
Co-authored-by: gabrielrufino <31759891+gabrielrufino@users.noreply.github.com>
Copilot AI changed the title [WIP] - Troque o uso do ncc pelo tsup - Garanta que fez o build Replace ncc with tsup for build process Aug 2, 2025
Copilot AI requested a review from gabrielrufino August 2, 2025 15:40
@gabrielrufino gabrielrufino requested a review from Copilot August 2, 2025 15:40
Copy link

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 migrates the build system from @vercel/ncc to tsup for bundling the TypeScript GitHub Action, providing faster builds and better modern tooling support.

  • Replaced @vercel/ncc with tsup as the bundling tool
  • Added declarative configuration via tsup.config.ts
  • Simplified build script from complex command-line arguments to just tsup

Reviewed Changes

Copilot reviewed 2 out of 4 changed files in this pull request and generated no comments.

File Description
tsup.config.ts New configuration file defining bundling settings for GitHub Actions compatibility
package.json Updated build script and dependencies to use tsup instead of ncc
Comments suppressed due to low confidence (1)

package.json:17

  • The tsup version ^8.3.5 may not exist. As of my knowledge cutoff in January 2025, the latest stable version of tsup was around 8.0.x. Please verify this version exists or use a known stable version like ^8.0.2.
    "tsup": "^8.3.5",

@gabrielrufino gabrielrufino marked this pull request as ready for review August 2, 2025 15:44
@gabrielrufino gabrielrufino merged commit a39b0ae into main Aug 2, 2025
7 checks passed
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.

3 participants