Skip to content

Modernize tooling, improve plugin, and update CI#39

Merged
johnie merged 13 commits intomasterfrom
feature/updates-2026-04-09
Apr 9, 2026
Merged

Modernize tooling, improve plugin, and update CI#39
johnie merged 13 commits intomasterfrom
feature/updates-2026-04-09

Conversation

@johnie
Copy link
Copy Markdown
Owner

@johnie johnie commented Apr 9, 2026

What

Modernizes the esbuild-coffeescript plugin with bug fixes, expanded tests, improved type safety, updated tooling (ultracite, lefthook), and streamlined CI workflows.

Why

The plugin had several bugs (broken inlineMap, incorrect error lineText, missing literate CoffeeScript auto-detection) and the CI setup used outdated action versions with duplicated test runs. The project also lacked automated code quality tooling.

How

Fixes plugin bugs and adds literate CoffeeScript support. Adds ultracite + lefthook for automated formatting/linting. Updates GitHub Actions to latest versions and removes redundant workflow jobs. Bumps Node to 24.14.1 and modernizes tsconfig.

Changes

  • Fix inlineMap option to correctly pass through to CoffeeScript compiler
  • Fix error lineText to report the correct line instead of the entire source
  • Add auto-detection of .litcoffee files without requiring literate: true
  • Add safer error handling with validation of CoffeeScript error properties
  • Export Options type for consumer type-checking
  • Expand test suite from 4 to 10 tests
  • Add ultracite + lefthook for pre-commit formatting/linting
  • Update GitHub Actions to v5/v6, use .nvmrc for node version
  • Remove duplicate test job from release workflow
  • Bump Node to v24.14.1 and modernize tsconfig for nodenext

Testing

  • Unit tests expanded from 4 to 10 covering inlineMap, literate CoffeeScript, error handling, and Options export
  • CI pipeline validates via pnpm run ci (check + test + build)

Deployment

  • CI workflow changes: actions updated to v6/v5, duplicate test job removed from release workflow
  • Release workflow now relies on pnpm run release (which runs full CI) instead of a separate test job

johnie added 12 commits April 9, 2026 15:06
Replace direct biome scripts (format, lint) with ultracite check/fix.
Upgrade devDependencies and add ultracite + lefthook.
Use named imports for path and coffeescript, move regex to top level.
Branch condition in release workflow checked for main instead of master,
preventing the release job from ever running. Also added missing release
script and changesets dependencies.
Export Options interface, replace omit utility with destructuring, guard
catch clause with runtime check, fix lineText to extract error line
instead of full source, fix inlineMap being incorrectly remapped to
sourceMap, and auto-detect literate mode from .litcoffee extension.
Add tests for default options, bare:false IIFE, header option, inlineMap
source maps, litcoffee auto-detection, and error location accuracy.
Replace String.fromCodePoint with TextDecoder, use rejects.toThrow for
error test, remove unused generic.coffee fixture.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 9, 2026

🦋 Changeset detected

Latest commit: d6bf36f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
esbuild-coffeescript Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@johnie johnie merged commit 354ca72 into master Apr 9, 2026
1 check passed
@johnie johnie deleted the feature/updates-2026-04-09 branch April 9, 2026 13:49
@johnie johnie mentioned this pull request Apr 9, 2026
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