From b649746066731087bb3967c3ac91970903e576cb Mon Sep 17 00:00:00 2001 From: Augustin C Date: Wed, 8 Feb 2023 23:31:22 +0100 Subject: [PATCH 1/4] Update index.d.ts Doc update attempt, following https://github.com/sveltejs/kit/issues/8948 --- packages/kit/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 647a41125c96..897a0f06ca3b 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -542,8 +542,8 @@ export interface KitConfig { */ version?: { /** - * The current app version string. - * @default Date.now().toString() + * The current app version string. Make sure it's consistent across multiple evaluations. + * @default Date.now().toString() - injected once at build time */ name?: string; /** From eaf098621d9ad4ed37fcefbd9e14ba277813b9fc Mon Sep 17 00:00:00 2001 From: Augustin C Date: Wed, 8 Feb 2023 23:45:18 +0100 Subject: [PATCH 2/4] Update index.d.ts Better formulation --- packages/kit/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 897a0f06ca3b..2e41d8a8c989 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -542,8 +542,8 @@ export interface KitConfig { */ version?: { /** - * The current app version string. Make sure it's consistent across multiple evaluations. - * @default Date.now().toString() - injected once at build time + * The current app version string. Make sure it's consistent across multiple evaluations (which may occur during build). + * @default Date.now().toString() - statically set at build time (i.e., don't use Date.now().toString() in your own config file) */ name?: string; /** From 34fed52f4e784d76b0ce471143dfc60b8f4474ab Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 8 Feb 2023 19:05:20 -0500 Subject: [PATCH 3/4] Update packages/kit/types/index.d.ts --- packages/kit/types/index.d.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/kit/types/index.d.ts b/packages/kit/types/index.d.ts index 2e41d8a8c989..721aa4cbde12 100644 --- a/packages/kit/types/index.d.ts +++ b/packages/kit/types/index.d.ts @@ -542,8 +542,7 @@ export interface KitConfig { */ version?: { /** - * The current app version string. Make sure it's consistent across multiple evaluations (which may occur during build). - * @default Date.now().toString() - statically set at build time (i.e., don't use Date.now().toString() in your own config file) + * The current app version string. If specified, this must be deterministic (e.g. a commit ref rather than `Math.random()` or Date.now().toString()`), otherwise defaults to a timestamp of the build */ name?: string; /** From aa54630e18483f4e94c73d3116c6486c5cb3748a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 8 Feb 2023 19:06:56 -0500 Subject: [PATCH 4/4] changeset --- .changeset/chilly-otters-act.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/chilly-otters-act.md diff --git a/.changeset/chilly-otters-act.md b/.changeset/chilly-otters-act.md new file mode 100644 index 000000000000..0f56c826711e --- /dev/null +++ b/.changeset/chilly-otters-act.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +docs: clarify that `version.name` should be deterministic