From 8df6f9899dc5c926b740c0d0e6b133c322cfca6b Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Fri, 17 Apr 2026 02:26:46 -0400 Subject: [PATCH 1/2] fix(sv): scope @deprecated tag to legacy create(cwd, options) overload The JSDoc @deprecated on the first overload caused editors to mark the entire create export as deprecated, including the supported create({ cwd, ...options }) call. Reorder the overloads so the non-deprecated signature comes first; editors now strike through only the legacy positional form. Closes #1063 --- .changeset/fix-create-deprecation-scope.md | 13 +++++++++++++ packages/sv/api-surface.md | 2 +- packages/sv/src/index.ts | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/fix-create-deprecation-scope.md diff --git a/.changeset/fix-create-deprecation-scope.md b/.changeset/fix-create-deprecation-scope.md new file mode 100644 index 000000000..6ffebe127 --- /dev/null +++ b/.changeset/fix-create-deprecation-scope.md @@ -0,0 +1,13 @@ +--- +"sv": patch +--- + +fix: scope `@deprecated` tag to the legacy `create(cwd, options)` overload + +The JSDoc `@deprecated` on the first overload signature caused editors to +mark the entire `create` export as deprecated, including the supported +`create({ cwd, ...options })` call. Reorder the overloads so the +non-deprecated signature comes first; editors now only strike through the +legacy positional form. + +Closes #1063 diff --git a/packages/sv/api-surface.md b/packages/sv/api-surface.md index a08e7098e..80fc27601 100644 --- a/packages/sv/api-surface.md +++ b/packages/sv/api-surface.md @@ -21,9 +21,9 @@ type FileType = { condition?: ConditionDefinition; content: (editor: FileEditor) => string; }; +declare function create(options: Options): void; /** @deprecated use `create({ cwd, ...options })` instead. */ declare function create(cwd: string, options: Omit): void; -declare function create(options: Options): void; export { type Addon, type AddonDefinition, diff --git a/packages/sv/src/index.ts b/packages/sv/src/index.ts index 7d99276e8..1820ded59 100644 --- a/packages/sv/src/index.ts +++ b/packages/sv/src/index.ts @@ -3,9 +3,9 @@ import { create as _create, type Options as CreateOptions } from './create/index export type { TemplateType, LanguageType } from './create/index.ts'; +export function create(options: CreateOptions): void; /** @deprecated use `create({ cwd, ...options })` instead. */ export function create(cwd: string, options: Omit): void; -export function create(options: CreateOptions): void; export function create( cwdOrOptions: string | CreateOptions, legacyOptions?: Omit From 2f5cd90b74cc7bbd4707484f02254c4d0f5831db Mon Sep 17 00:00:00 2001 From: jycouet Date: Fri, 17 Apr 2026 18:16:26 +0200 Subject: [PATCH 2/2] oneliner changelog --- .changeset/fix-create-deprecation-scope.md | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.changeset/fix-create-deprecation-scope.md b/.changeset/fix-create-deprecation-scope.md index 6ffebe127..b49ea02a2 100644 --- a/.changeset/fix-create-deprecation-scope.md +++ b/.changeset/fix-create-deprecation-scope.md @@ -1,13 +1,5 @@ --- -"sv": patch +'sv': patch --- -fix: scope `@deprecated` tag to the legacy `create(cwd, options)` overload - -The JSDoc `@deprecated` on the first overload signature caused editors to -mark the entire `create` export as deprecated, including the supported -`create({ cwd, ...options })` call. Reorder the overloads so the -non-deprecated signature comes first; editors now only strike through the -legacy positional form. - -Closes #1063 +fix(sv): scope `@deprecated` tag to the legacy `create(cwd, options)` overload only