Repository navigation
feat(plugin)!: drop ast/filename, cache rebuilds, fix error lines - #41
Merged
Merged
Conversation
Splits tsconfig so tests are type-checked (tsconfig.json, noEmit) while tsconfig.build.json emits dist, and adds a typecheck step to ci. Moves @types/coffeescript to dependencies because the published .d.ts now references CoffeeScript's option types, and pins esbuild as a devDependency.
- Remove the ast and filename options: ast returned an object esbuild rejects, and filename replaced every file's path in errors/source maps. - Report 1-based error lines (esbuild) instead of CoffeeScript's 0-based. - Cache compiled output per file within a build context; a 301-file rebuild drops from ~2.4s to ~25ms. - Narrow CoffeeScript syntax errors with a type guard instead of casts. BREAKING CHANGE: the ast and filename options are removed.
🦋 Changeset detectedLatest commit: 730a81d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Replace the generic Ultracite boilerplate with repo-specific commands, stack gotchas (esbuild RE2 filters, 1-based lines), structure, code style, git workflow, and always/ask/never boundaries.
Merged
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.
What
Why
pnpm checkfailed after the Ultracite/oxlint migration. Fixing it turned up several plugin bugs: error lines were off by one, two options were broken, and every rebuild recompiled every file.How
Plugin (
src/index.ts)context.rebuild()went from ~2.4s to 22–29ms.location.line1-based, which esbuild expects (CoffeeScript's is 0-based). An error on line 3 used to show as:2:8.ast: it returned an AST object, which esbuild rejects with"contents" must be a string.filename: a plugin-level value replaced every file's path in errors and source maps. Each file's own path is always used now.transpileis now typed from@types/coffeescript(BabelTransformOptions).Tooling
tsconfig.jsontype-checkssrcandtestwithout emitting;tsconfig.build.jsonemitsdist.cinow runstypecheck.require-unicode-regexpis off forsrc/**. esbuildfilters run on Go's RE2, which rejects the(?u)flag group esbuild generates from theuflag (confirmed at runtime).ultracite fix --hook; the old Biome-only--skipflag broke it. Removed the duplicate whole-repopnpm run fixlefthook job.@types/coffeescriptmoved todependencies, since the published.d.tsreferences it.esbuildis now a pinned devDependency.Changes
.changeset/remove-broken-options.mdtypecheckscriptTesting
pnpm run cipasses: check, typecheck, 9 tests, build.context.rebuild().bare: falsetest duplicated the default-options test.Deployment
release.yml, which opens a "Version Packages" PR for 4.0.0. Merging that PR publishes to npm.astis removed only from the TypeScript types. Plain-JS callers who still pass it fail exactly as before.