Skip to content

chore: deprecate legacy Builder API#3758

Open
bartlomieju wants to merge 2 commits into
mainfrom
chore/deprecate-builder-api
Open

chore: deprecate legacy Builder API#3758
bartlomieju wants to merge 2 commits into
mainfrom
chore/deprecate-builder-api

Conversation

@bartlomieju
Copy link
Copy Markdown
Contributor

Summary

  • Adds @deprecated JSDoc tags to all public exports from @fresh/core/dev (Builder, BuildOptions, ResolvedBuildConfig, OnTransformArgs, OnTransformOptions, TransformFn)
  • Adds @deprecated JSDoc tags to @fresh/plugin-tailwind and @fresh/plugin-tailwind-v3 exports
  • Updates --builder flag in @fresh/init help text to show "(Deprecated)"
  • Prints a warning when --builder flag is used during init

All deprecation notices point users to the Vite plugin as the replacement.

Closes #3635

Test plan

  • Verify IDE shows deprecation strikethrough on Builder, BuildOptions, etc. when imported from fresh/dev
  • Run deno run -A jsr:@fresh/init --builder . and verify deprecation warning is printed
  • Type checks pass

🤖 Generated with Claude Code

bartlomieju and others added 2 commits April 8, 2026 19:34
Adds @deprecated JSDoc tags to all public exports in:
- @fresh/core/dev (Builder, BuildOptions, ResolvedBuildConfig, etc.)
- @fresh/plugin-tailwind (tailwind function, TailwindPluginOptions)
- @fresh/plugin-tailwind-v3 (all exports)

Also marks the --builder flag in @fresh/init as deprecated in help
text and prints a warning when it's used.

Closes #3635

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@lunadogbot lunadogbot left a comment

Choose a reason for hiding this comment

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

Scope is clean: JSDoc @deprecated on Builder, the five re-exported types, both Tailwind tailwind() entrypoints, and a runtime warning + help-text marker for --builder in @fresh/init. Lockfile untouched. Closes #3635. CI green; the failing deploy/deno/fresh preview is unrelated to a docstring/console-warn change and the sibling deploy/deno/denoland-fresh deploy is green.

One thing worth a follow-up: www/dev.ts:3 and packages/init/src/init.ts:559 still import { Builder } from "fresh/dev", so the docs site and the init scaffolder will themselves emit deprecation warnings in IDEs after this lands. The init.ts import is required by the --builder codegen path so that one can stay; www/ is the natural candidate to migrate next (or // deno-lint-ignore deprecation if migration is deferred).

  • nit: the runtime warning at packages/init/src/init.ts:148 says "Use Vite instead (the default)" but doesn't point at the migration docs — a link would save users a search.
  • nit: the test-plan items in the PR body are unchecked; worth running deno run -A jsr:@fresh/init --builder . once before merging to confirm the warning renders the way you want.

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.

Deprecation of the legacy Builder API

2 participants