From 24bc1690700709392b2c0c60222e885fc54b145a Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 5 Mar 2024 11:44:19 -0800 Subject: [PATCH 01/45] add back data loss confirmation handling (#10330) --- packages/db/package.json | 1 + .../db/src/core/cli/commands/push/index.ts | 12 +++++- .../db/src/core/cli/commands/verify/index.ts | 27 +++++++++++-- packages/db/src/core/cli/migration-queries.ts | 38 ++++++++++--------- .../fixtures/ticketing-example/db/config.ts | 2 + pnpm-lock.yaml | 3 ++ 6 files changed, 61 insertions(+), 22 deletions(-) diff --git a/packages/db/package.json b/packages/db/package.json index 2533aed5b995..a9341a4d5002 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -74,6 +74,7 @@ "open": "^10.0.3", "ora": "^7.0.1", "prompts": "^2.4.2", + "strip-ansi": "^7.1.0", "yargs-parser": "^21.1.1", "zod": "^3.22.4" }, diff --git a/packages/db/src/core/cli/commands/push/index.ts b/packages/db/src/core/cli/commands/push/index.ts index 59c3a014c201..f7359a8b3b51 100644 --- a/packages/db/src/core/cli/commands/push/index.ts +++ b/packages/db/src/core/cli/commands/push/index.ts @@ -6,9 +6,11 @@ import { getRemoteDatabaseUrl } from '../../../utils.js'; import { createCurrentSnapshot, createEmptySnapshot, + formatDataLossMessage, getMigrationQueries, getProductionCurrentSnapshot, } from '../../migration-queries.js'; +import { red } from 'kleur/colors'; export async function cmd({ dbConfig, @@ -24,7 +26,7 @@ export async function cmd({ const productionSnapshot = await getProductionCurrentSnapshot({ appToken: appToken.token }); const currentSnapshot = createCurrentSnapshot(dbConfig); const isFromScratch = isForceReset || JSON.stringify(productionSnapshot) === '{}'; - const { queries: migrationQueries } = await getMigrationQueries({ + const { queries: migrationQueries, confirmations } = await getMigrationQueries({ oldSnapshot: isFromScratch ? createEmptySnapshot() : productionSnapshot, newSnapshot: currentSnapshot, }); @@ -35,6 +37,14 @@ export async function cmd({ } else { console.log(`Database schema is out of date.`); } + + if (isForceReset) { + console.log(`Force-pushing to the database. All existing data will be erased.`); + } else if (confirmations.length > 0) { + console.log('\n' + formatDataLossMessage(confirmations) + '\n'); + throw new Error('Exiting.'); + } + if (isDryRun) { console.log('Statements:', JSON.stringify(migrationQueries, undefined, 2)); } else { diff --git a/packages/db/src/core/cli/commands/verify/index.ts b/packages/db/src/core/cli/commands/verify/index.ts index 55e45c3782ff..4bf8683b9dcc 100644 --- a/packages/db/src/core/cli/commands/verify/index.ts +++ b/packages/db/src/core/cli/commands/verify/index.ts @@ -5,6 +5,7 @@ import type { DBConfig } from '../../../types.js'; import { createCurrentSnapshot, createEmptySnapshot, + formatDataLossMessage, getMigrationQueries, getProductionCurrentSnapshot, } from '../../migration-queries.js'; @@ -17,21 +18,39 @@ export async function cmd({ dbConfig: DBConfig; flags: Arguments; }) { + const isJson = flags.json; const appToken = await getManagedAppTokenOrExit(flags.token); const productionSnapshot = await getProductionCurrentSnapshot({ appToken: appToken.token }); const currentSnapshot = createCurrentSnapshot(dbConfig); - const { queries: migrationQueries } = await getMigrationQueries({ + const { queries: migrationQueries, confirmations } = await getMigrationQueries({ oldSnapshot: JSON.stringify(productionSnapshot) !== '{}' ? productionSnapshot : createEmptySnapshot(), newSnapshot: currentSnapshot, }); + const result = { exitCode: 0, message: '', code: '', data: undefined as unknown }; if (migrationQueries.length === 0) { - console.log(`Database schema is up to date.`); + result.code = 'MATCH'; + result.message = `Database schema is up to date.`; } else { - console.log(`Database schema is out of date.`); - console.log(`Run 'astro db push' to push up your latest changes.`); + result.code = 'NO_MATCH'; + result.message = `Database schema is out of date.\nRun 'astro db push' to push up your latest changes.`; + } + + + if (confirmations.length > 0) { + result.code = 'DATA_LOSS'; + result.exitCode = 1; + result.data = confirmations; + result.message = formatDataLossMessage(confirmations, !isJson); + } + + if (isJson) { + console.log(JSON.stringify(result)); + } else { + console.log(result.message); } await appToken.destroy(); + process.exit(result.exitCode); } diff --git a/packages/db/src/core/cli/migration-queries.ts b/packages/db/src/core/cli/migration-queries.ts index 09984b8c6670..f1b1047cb74c 100644 --- a/packages/db/src/core/cli/migration-queries.ts +++ b/packages/db/src/core/cli/migration-queries.ts @@ -1,3 +1,4 @@ +import stripAnsi from 'strip-ansi'; import deepDiff from 'deep-diff'; import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core'; import * as color from 'kleur/colors'; @@ -147,21 +148,12 @@ export async function getCollectionChangeQueries({ if (dataLossCheck.dataLoss) { const { reason, columnName } = dataLossCheck; const reasonMsgs: Record = { - 'added-required': `New column ${color.bold( + 'added-required': `You added new required column '${color.bold( collectionName + '.' + columnName - )} is required with no default value.\nThis requires deleting existing data in the ${color.bold( - collectionName - )} collection.`, - 'added-unique': `New column ${color.bold( + )}' with no default value.\n This cannot be executed on an existing table.`, + 'updated-type': `Updating existing column ${color.bold( collectionName + '.' + columnName - )} is marked as unique.\nThis requires deleting existing data in the ${color.bold( - collectionName - )} collection.`, - 'updated-type': `Updated column ${color.bold( - collectionName + '.' + columnName - )} cannot convert data to new column data type.\nThis requires deleting existing data in the ${color.bold( - collectionName - )} collection.`, + )} to a new type that cannot be handled automatically.`, }; confirmations.push(reasonMsgs[reason]); } @@ -319,7 +311,7 @@ function canAlterTableDropColumn(column: DBColumn) { return true; } -type DataLossReason = 'added-required' | 'added-unique' | 'updated-type'; +type DataLossReason = 'added-required' | 'updated-type'; type DataLossResponse = | { dataLoss: false } | { dataLoss: true; columnName: string; reason: DataLossReason }; @@ -335,9 +327,6 @@ function canRecreateTableWithoutDataLoss( if (!a.schema.optional && !hasDefault(a)) { return { dataLoss: true, columnName, reason: 'added-required' }; } - if (!a.schema.optional && a.schema.unique) { - return { dataLoss: true, columnName, reason: 'added-unique' }; - } } for (const [columnName, u] of Object.entries(updated)) { if (u.old.type !== u.new.type && !canChangeTypeWithoutQuery(u.old, u.new)) { @@ -454,3 +443,18 @@ export function createCurrentSnapshot({ tables = {} }: DBConfig): DBSnapshot { export function createEmptySnapshot(): DBSnapshot { return { experimentalVersion: 1, schema: {} }; } + +export function formatDataLossMessage(confirmations: string[], isColor = true): string { + const messages = []; + messages.push(color.red('✖ We found some schema changes that cannot be handled automatically:')); + messages.push(``); + messages.push(...confirmations.map((m, i) => color.red(` (${i + 1}) `) + m)); + messages.push(``); + messages.push(`To resolve, revert these changes or update your schema, and re-run the command.`); + messages.push(`You may also run 'astro db push --force-reset' to ignore all warnings and force-push your local database schema to production instead. All data will be lost and the database will be reset.`); + let finalMessage = messages.join('\n'); + if (!isColor) { + finalMessage = stripAnsi(finalMessage); + } + return finalMessage; +} diff --git a/packages/db/test/fixtures/ticketing-example/db/config.ts b/packages/db/test/fixtures/ticketing-example/db/config.ts index f8148eaed305..09ed4d27375c 100644 --- a/packages/db/test/fixtures/ticketing-example/db/config.ts +++ b/packages/db/test/fixtures/ticketing-example/db/config.ts @@ -10,6 +10,8 @@ const Event = defineTable({ ticketPrice: column.number(), date: column.date(), location: column.text(), + author3: column.text(), + author4: column.text(), }, }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 86f8068c8c08..9a2a8b6bede1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3841,6 +3841,9 @@ importers: prompts: specifier: ^2.4.2 version: 2.4.2 + strip-ansi: + specifier: ^7.1.0 + version: 7.1.0 yargs-parser: specifier: ^21.1.1 version: 21.1.1 From e1477bb3d6287f4184db639ad553fce5bfb259fc Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 5 Mar 2024 19:45:27 +0000 Subject: [PATCH 02/45] [ci] format --- packages/db/src/core/cli/commands/push/index.ts | 4 ++-- packages/db/src/core/cli/commands/verify/index.ts | 5 ++--- packages/db/src/core/cli/migration-queries.ts | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/db/src/core/cli/commands/push/index.ts b/packages/db/src/core/cli/commands/push/index.ts index f7359a8b3b51..3e08de7b916c 100644 --- a/packages/db/src/core/cli/commands/push/index.ts +++ b/packages/db/src/core/cli/commands/push/index.ts @@ -1,4 +1,5 @@ import type { AstroConfig } from 'astro'; +import { red } from 'kleur/colors'; import type { Arguments } from 'yargs-parser'; import { getManagedAppTokenOrExit } from '../../../tokens.js'; import { type DBConfig, type DBSnapshot } from '../../../types.js'; @@ -10,7 +11,6 @@ import { getMigrationQueries, getProductionCurrentSnapshot, } from '../../migration-queries.js'; -import { red } from 'kleur/colors'; export async function cmd({ dbConfig, @@ -44,7 +44,7 @@ export async function cmd({ console.log('\n' + formatDataLossMessage(confirmations) + '\n'); throw new Error('Exiting.'); } - + if (isDryRun) { console.log('Statements:', JSON.stringify(migrationQueries, undefined, 2)); } else { diff --git a/packages/db/src/core/cli/commands/verify/index.ts b/packages/db/src/core/cli/commands/verify/index.ts index 4bf8683b9dcc..a83194599fe4 100644 --- a/packages/db/src/core/cli/commands/verify/index.ts +++ b/packages/db/src/core/cli/commands/verify/index.ts @@ -37,8 +37,7 @@ export async function cmd({ result.message = `Database schema is out of date.\nRun 'astro db push' to push up your latest changes.`; } - - if (confirmations.length > 0) { + if (confirmations.length > 0) { result.code = 'DATA_LOSS'; result.exitCode = 1; result.data = confirmations; @@ -48,7 +47,7 @@ export async function cmd({ if (isJson) { console.log(JSON.stringify(result)); } else { - console.log(result.message); + console.log(result.message); } await appToken.destroy(); diff --git a/packages/db/src/core/cli/migration-queries.ts b/packages/db/src/core/cli/migration-queries.ts index f1b1047cb74c..130b538894ff 100644 --- a/packages/db/src/core/cli/migration-queries.ts +++ b/packages/db/src/core/cli/migration-queries.ts @@ -1,8 +1,8 @@ -import stripAnsi from 'strip-ansi'; import deepDiff from 'deep-diff'; import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core'; import * as color from 'kleur/colors'; import { customAlphabet } from 'nanoid'; +import stripAnsi from 'strip-ansi'; import { hasPrimaryKey } from '../../runtime/index.js'; import { getCreateIndexQueries, @@ -451,7 +451,9 @@ export function formatDataLossMessage(confirmations: string[], isColor = true): messages.push(...confirmations.map((m, i) => color.red(` (${i + 1}) `) + m)); messages.push(``); messages.push(`To resolve, revert these changes or update your schema, and re-run the command.`); - messages.push(`You may also run 'astro db push --force-reset' to ignore all warnings and force-push your local database schema to production instead. All data will be lost and the database will be reset.`); + messages.push( + `You may also run 'astro db push --force-reset' to ignore all warnings and force-push your local database schema to production instead. All data will be lost and the database will be reset.` + ); let finalMessage = messages.join('\n'); if (!isColor) { finalMessage = stripAnsi(finalMessage); From 50215ae7317e7deadbc889123a7c749e653524a5 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Tue, 5 Mar 2024 16:43:24 -0600 Subject: [PATCH 03/45] [ci] set `--tag` on release (#10323) * chore(ci): set --tag on release * chore: revert deletion * fix: ignore job on forks --- .github/workflows/release.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eb5cd362e54b..7a9e8d6cb06e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,8 @@ env: jobs: changelog: - name: Changelog PR or Release if: ${{ github.repository_owner == 'withastro' }} + name: Changelog PR or Release runs-on: ubuntu-latest permissions: contents: write @@ -43,14 +43,32 @@ jobs: - name: Build Packages run: pnpm run build + + - name: Set PUBLISH_FLAGS variable + id: tag + run: | + BRANCH_NAME="${GITHUB_REF##*/}" + if [ "$BRANCH_NAME" = "main" ]; then + # do not set any flags (`latest` is the default) + echo "PUBLISH_FLAGS=" >> $GITHUB_ENV + elif [ "$BRANCH_NAME" = "next" ]; then + # just use `--tag next` + echo "PUBLISH_FLAGS=--tag next" >> $GITHUB_ENV + else + # extract the integer prefix from the branch name + VERSION_NUMBER="${BRANCH_NAME%%-*}" + # pass a shorthand tag like `--tag v3` + echo "PUBLISH_FLAGS=--tag v$VERSION_NUMBER" >> $GITHUB_ENV + fi - name: Create Release Pull Request or Publish id: changesets uses: changesets/action@v1 with: - # Note: pnpm install after versioning is necessary to refresh lockfile + # Note: Run custom version script which runs pnpm install + # the install step is necessary to refresh lockfile after versioning version: pnpm run version - publish: pnpm exec changeset publish + publish: pnpm exec changeset publish $PUBLISH_FLAGS commit: "[ci] release" title: "[ci] release" env: From d6a6b7dff249bdf0b427a58ff8551e70c5e14ba2 Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 5 Mar 2024 16:20:28 -0800 Subject: [PATCH 04/45] add missing changeset (#10335) --- .changeset/two-coats-smoke.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/two-coats-smoke.md diff --git a/.changeset/two-coats-smoke.md b/.changeset/two-coats-smoke.md new file mode 100644 index 000000000000..ed0e8abc588b --- /dev/null +++ b/.changeset/two-coats-smoke.md @@ -0,0 +1,5 @@ +--- +"@astrojs/db": patch +--- + +Add back confirmation handling on verify and push From dd3935b31cbe637a5354e76706c860848512b658 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:26:25 -0800 Subject: [PATCH 05/45] [ci] release (#10332) Co-authored-by: github-actions[bot] --- .changeset/sharp-scissors-think.md | 5 -- .changeset/slimy-berries-mate.md | 5 -- .changeset/two-coats-smoke.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 +++ packages/astro/package.json | 2 +- packages/db/CHANGELOG.md | 6 +++ packages/db/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 6 +++ packages/integrations/vercel/package.json | 2 +- pnpm-lock.yaml | 54 ++++++++++----------- 37 files changed, 75 insertions(+), 72 deletions(-) delete mode 100644 .changeset/sharp-scissors-think.md delete mode 100644 .changeset/slimy-berries-mate.md delete mode 100644 .changeset/two-coats-smoke.md diff --git a/.changeset/sharp-scissors-think.md b/.changeset/sharp-scissors-think.md deleted file mode 100644 index 60498d2139bf..000000000000 --- a/.changeset/sharp-scissors-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. diff --git a/.changeset/slimy-berries-mate.md b/.changeset/slimy-berries-mate.md deleted file mode 100644 index ee39a3a4fa2e..000000000000 --- a/.changeset/slimy-berries-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/vercel": patch ---- - -Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error diff --git a/.changeset/two-coats-smoke.md b/.changeset/two-coats-smoke.md deleted file mode 100644 index ed0e8abc588b..000000000000 --- a/.changeset/two-coats-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Add back confirmation handling on verify and push diff --git a/examples/basics/package.json b/examples/basics/package.json index 2bf33b0f4639..ae9e64b6bf43 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 7800f1bc0807..7bb73ad85916 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.1", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/component/package.json b/examples/component/package.json index 24fae7c9cd7c..09a967f078f6 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 214e1096e36b..8727bedcc903 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 020d3137f517..a66caeb28d01 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 5c95a9d47c72..ab39cac8eeb0 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^4.0.1", "@astrojs/svelte": "^5.2.0", "@astrojs/vue": "^4.0.8", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 3b0ea56f973e..1274059eed5d 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@preact/signals": "^1.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 6de73ac841fe..4c61ad019525 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.10", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.4.11", + "astro": "^4.4.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 0695b641d4bf..abd08068285d 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index abef53b538d9..68d1133c502b 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index ea03a8e83814..309803ed8339 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.0.8", - "astro": "^4.4.11", + "astro": "^4.4.12", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 7bf332ccf27d..c7d235fb0798 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index e80d16965f57..659d679066f6 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index df5fed18e36f..43b12a7dbe02 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.11", + "astro": "^4.4.12", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index e56aa6518359..14c5d81bfd64 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index b130a511b3b7..4c8281a13e49 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index b454a0f0d21d..1596f2e5459d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index ae108833388c..7d9da47956db 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.2.3", "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index 76c4a644c26d..fff0e208e8ef 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11", + "astro": "^4.4.12", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 41285cea54d4..0bd83f9c30a6 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.2.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 4d49a3a7c09c..8bb57e5e7e79 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.9.1", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index f1c3b97e3f90..43ab9fe5641e 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^4.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index d9105d754e3f..be58ebd00612 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index fc942fddf71f..dcf7ff549532 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.1.1", "@astrojs/preact": "^3.1.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 552bd14220b9..e719548ea4cb 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@nanostores/preact": "^0.5.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f990748a431f..234fa0f8a9bc 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.4.11", + "astro": "^4.4.12", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 1d32b67d2622..cf1c92e76dfe 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.4.11", + "astro": "^4.4.12", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 1eae1d763432..edbb12c978e6 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 4.4.12 + +### Patch Changes + +- [#10316](https://github.com/withastro/astro/pull/10316) [`507b4ac246fa95cc31e5f73e863a785cdff92e13`](https://github.com/withastro/astro/commit/507b4ac246fa95cc31e5f73e863a785cdff92e13) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. + ## 4.4.11 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 080248725692..d738aa56e8e4 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.4.11", + "version": "4.4.12", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index c77471c90dc2..491b673e1bb7 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.6.2 + +### Patch Changes + +- [#10335](https://github.com/withastro/astro/pull/10335) [`d6a6b7dff249bdf0b427a58ff8551e70c5e14ba2`](https://github.com/withastro/astro/commit/d6a6b7dff249bdf0b427a58ff8551e70c5e14ba2) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Add back confirmation handling on verify and push + ## 0.6.1 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index a9341a4d5002..2fe4909cf2c1 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.1", + "version": "0.6.2", "description": "", "license": "MIT", "type": "module", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index a7b814fb566e..adf665f29527 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vercel +## 7.3.5 + +### Patch Changes + +- [#10305](https://github.com/withastro/astro/pull/10305) [`29cbb88afd79875a2ad57efe60dcbc4a14672d37`](https://github.com/withastro/astro/commit/29cbb88afd79875a2ad57efe60dcbc4a14672d37) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error + ## 7.3.4 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 97a7edc0e63f..61af57e2c991 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "7.3.4", + "version": "7.3.5", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a2a8b6bede1..a6e9b3b07be4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,7 +134,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/blog: @@ -149,13 +149,13 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.3 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -206,7 +206,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,7 +236,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.19.3) astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -254,7 +254,7 @@ importers: specifier: ^18.2.15 version: 18.2.18 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -269,7 +269,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -281,7 +281,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -293,7 +293,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -305,13 +305,13 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/middleware: @@ -320,7 +320,7 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -366,7 +366,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -384,7 +384,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-markdoc: @@ -393,7 +393,7 @@ importers: specifier: ^0.9.1 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-markdown-plugins: @@ -402,7 +402,7 @@ importers: specifier: ^4.2.1 version: link:../../packages/markdown/remark astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -423,7 +423,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-mdx: @@ -435,7 +435,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/preact astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -450,7 +450,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.5)(preact@10.19.3) astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -471,7 +471,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -489,7 +489,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro vitest: specifier: ^1.3.1 From f2e60a96754ed1d86001fe4d5d3a0c0ef657408d Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Tue, 5 Mar 2024 16:47:15 -0800 Subject: [PATCH 06/45] Revert bad release (#10336) * Revert "[ci] release (#10332)" This reverts commit dd3935b31cbe637a5354e76706c860848512b658. * Revert "[ci] set `--tag` on release (#10323)" This reverts commit 50215ae7317e7deadbc889123a7c749e653524a5. --- .changeset/sharp-scissors-think.md | 5 ++ .changeset/slimy-berries-mate.md | 5 ++ .changeset/two-coats-smoke.md | 5 ++ .github/workflows/release.yml | 24 ++------- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 --- packages/astro/package.json | 2 +- packages/db/CHANGELOG.md | 6 --- packages/db/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 6 --- packages/integrations/vercel/package.json | 2 +- pnpm-lock.yaml | 54 ++++++++++----------- 38 files changed, 75 insertions(+), 96 deletions(-) create mode 100644 .changeset/sharp-scissors-think.md create mode 100644 .changeset/slimy-berries-mate.md create mode 100644 .changeset/two-coats-smoke.md diff --git a/.changeset/sharp-scissors-think.md b/.changeset/sharp-scissors-think.md new file mode 100644 index 000000000000..60498d2139bf --- /dev/null +++ b/.changeset/sharp-scissors-think.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. diff --git a/.changeset/slimy-berries-mate.md b/.changeset/slimy-berries-mate.md new file mode 100644 index 000000000000..ee39a3a4fa2e --- /dev/null +++ b/.changeset/slimy-berries-mate.md @@ -0,0 +1,5 @@ +--- +"@astrojs/vercel": patch +--- + +Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error diff --git a/.changeset/two-coats-smoke.md b/.changeset/two-coats-smoke.md new file mode 100644 index 000000000000..ed0e8abc588b --- /dev/null +++ b/.changeset/two-coats-smoke.md @@ -0,0 +1,5 @@ +--- +"@astrojs/db": patch +--- + +Add back confirmation handling on verify and push diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a9e8d6cb06e..eb5cd362e54b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,8 +20,8 @@ env: jobs: changelog: - if: ${{ github.repository_owner == 'withastro' }} name: Changelog PR or Release + if: ${{ github.repository_owner == 'withastro' }} runs-on: ubuntu-latest permissions: contents: write @@ -43,32 +43,14 @@ jobs: - name: Build Packages run: pnpm run build - - - name: Set PUBLISH_FLAGS variable - id: tag - run: | - BRANCH_NAME="${GITHUB_REF##*/}" - if [ "$BRANCH_NAME" = "main" ]; then - # do not set any flags (`latest` is the default) - echo "PUBLISH_FLAGS=" >> $GITHUB_ENV - elif [ "$BRANCH_NAME" = "next" ]; then - # just use `--tag next` - echo "PUBLISH_FLAGS=--tag next" >> $GITHUB_ENV - else - # extract the integer prefix from the branch name - VERSION_NUMBER="${BRANCH_NAME%%-*}" - # pass a shorthand tag like `--tag v3` - echo "PUBLISH_FLAGS=--tag v$VERSION_NUMBER" >> $GITHUB_ENV - fi - name: Create Release Pull Request or Publish id: changesets uses: changesets/action@v1 with: - # Note: Run custom version script which runs pnpm install - # the install step is necessary to refresh lockfile after versioning + # Note: pnpm install after versioning is necessary to refresh lockfile version: pnpm run version - publish: pnpm exec changeset publish $PUBLISH_FLAGS + publish: pnpm exec changeset publish commit: "[ci] release" title: "[ci] release" env: diff --git a/examples/basics/package.json b/examples/basics/package.json index ae9e64b6bf43..2bf33b0f4639 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 7bb73ad85916..7800f1bc0807 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.1", - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/component/package.json b/examples/component/package.json index 09a967f078f6..24fae7c9cd7c 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 8727bedcc903..214e1096e36b 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index a66caeb28d01..020d3137f517 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.4.12", + "astro": "^4.4.11", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index ab39cac8eeb0..5c95a9d47c72 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^4.0.1", "@astrojs/svelte": "^5.2.0", "@astrojs/vue": "^4.0.8", - "astro": "^4.4.12", + "astro": "^4.4.11", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 1274059eed5d..3b0ea56f973e 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@preact/signals": "^1.2.1", - "astro": "^4.4.12", + "astro": "^4.4.11", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 4c61ad019525..6de73ac841fe 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.10", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.4.12", + "astro": "^4.4.11", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index abd08068285d..0695b641d4bf 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.4.12", + "astro": "^4.4.11", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 68d1133c502b..abef53b538d9 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.12", + "astro": "^4.4.11", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 309803ed8339..ea03a8e83814 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.0.8", - "astro": "^4.4.12", + "astro": "^4.4.11", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index c7d235fb0798..7bf332ccf27d 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 659d679066f6..e80d16965f57 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 43b12a7dbe02..df5fed18e36f 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.12", + "astro": "^4.4.11", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 14c5d81bfd64..e56aa6518359 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 4c8281a13e49..b130a511b3b7 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 1596f2e5459d..b454a0f0d21d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 7d9da47956db..ae108833388c 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.2.3", "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.12", + "astro": "^4.4.11", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index fff0e208e8ef..76c4a644c26d 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12", + "astro": "^4.4.11", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 0bd83f9c30a6..41285cea54d4 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.2.3", - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 8bb57e5e7e79..4d49a3a7c09c 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.9.1", - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 43ab9fe5641e..f1c3b97e3f90 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^4.2.1", - "astro": "^4.4.12", + "astro": "^4.4.11", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index be58ebd00612..d9105d754e3f 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.11" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index dcf7ff549532..fc942fddf71f 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.1.1", "@astrojs/preact": "^3.1.1", - "astro": "^4.4.12", + "astro": "^4.4.11", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index e719548ea4cb..552bd14220b9 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@nanostores/preact": "^0.5.0", - "astro": "^4.4.12", + "astro": "^4.4.11", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 234fa0f8a9bc..f990748a431f 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.4.12", + "astro": "^4.4.11", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index cf1c92e76dfe..1d32b67d2622 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.4.12", + "astro": "^4.4.11", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index edbb12c978e6..1eae1d763432 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,11 +1,5 @@ # astro -## 4.4.12 - -### Patch Changes - -- [#10316](https://github.com/withastro/astro/pull/10316) [`507b4ac246fa95cc31e5f73e863a785cdff92e13`](https://github.com/withastro/astro/commit/507b4ac246fa95cc31e5f73e863a785cdff92e13) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. - ## 4.4.11 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index d738aa56e8e4..080248725692 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.4.12", + "version": "4.4.11", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 491b673e1bb7..c77471c90dc2 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,11 +1,5 @@ # @astrojs/db -## 0.6.2 - -### Patch Changes - -- [#10335](https://github.com/withastro/astro/pull/10335) [`d6a6b7dff249bdf0b427a58ff8551e70c5e14ba2`](https://github.com/withastro/astro/commit/d6a6b7dff249bdf0b427a58ff8551e70c5e14ba2) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Add back confirmation handling on verify and push - ## 0.6.1 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 2fe4909cf2c1..a9341a4d5002 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.2", + "version": "0.6.1", "description": "", "license": "MIT", "type": "module", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index adf665f29527..a7b814fb566e 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,11 +1,5 @@ # @astrojs/vercel -## 7.3.5 - -### Patch Changes - -- [#10305](https://github.com/withastro/astro/pull/10305) [`29cbb88afd79875a2ad57efe60dcbc4a14672d37`](https://github.com/withastro/astro/commit/29cbb88afd79875a2ad57efe60dcbc4a14672d37) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error - ## 7.3.4 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 61af57e2c991..97a7edc0e63f 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "7.3.5", + "version": "7.3.4", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6e9b3b07be4..9a2a8b6bede1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,7 +134,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/blog: @@ -149,13 +149,13 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.3 astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -206,7 +206,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,7 +236,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.19.3) astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -254,7 +254,7 @@ importers: specifier: ^18.2.15 version: 18.2.18 astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -269,7 +269,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -281,7 +281,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -293,7 +293,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -305,13 +305,13 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/middleware: @@ -320,7 +320,7 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -366,7 +366,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -384,7 +384,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/with-markdoc: @@ -393,7 +393,7 @@ importers: specifier: ^0.9.1 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/with-markdown-plugins: @@ -402,7 +402,7 @@ importers: specifier: ^4.2.1 version: link:../../packages/markdown/remark astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -423,7 +423,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro examples/with-mdx: @@ -435,7 +435,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/preact astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -450,7 +450,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.5)(preact@10.19.3) astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -471,7 +471,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -489,7 +489,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.11 version: link:../../packages/astro vitest: specifier: ^1.3.1 From 038201fbaea9a4c040d50df5d90d83b27d3dbc76 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:58:48 -0800 Subject: [PATCH 07/45] [ci] release (#10337) Co-authored-by: github-actions[bot] --- .changeset/sharp-scissors-think.md | 5 -- .changeset/slimy-berries-mate.md | 5 -- .changeset/two-coats-smoke.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 +++ packages/astro/package.json | 2 +- packages/db/CHANGELOG.md | 6 +++ packages/db/package.json | 2 +- packages/integrations/vercel/CHANGELOG.md | 6 +++ packages/integrations/vercel/package.json | 2 +- pnpm-lock.yaml | 54 ++++++++++----------- 37 files changed, 75 insertions(+), 72 deletions(-) delete mode 100644 .changeset/sharp-scissors-think.md delete mode 100644 .changeset/slimy-berries-mate.md delete mode 100644 .changeset/two-coats-smoke.md diff --git a/.changeset/sharp-scissors-think.md b/.changeset/sharp-scissors-think.md deleted file mode 100644 index 60498d2139bf..000000000000 --- a/.changeset/sharp-scissors-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. diff --git a/.changeset/slimy-berries-mate.md b/.changeset/slimy-berries-mate.md deleted file mode 100644 index ee39a3a4fa2e..000000000000 --- a/.changeset/slimy-berries-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/vercel": patch ---- - -Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error diff --git a/.changeset/two-coats-smoke.md b/.changeset/two-coats-smoke.md deleted file mode 100644 index ed0e8abc588b..000000000000 --- a/.changeset/two-coats-smoke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Add back confirmation handling on verify and push diff --git a/examples/basics/package.json b/examples/basics/package.json index 2bf33b0f4639..ae9e64b6bf43 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 7800f1bc0807..7bb73ad85916 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.1", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/component/package.json b/examples/component/package.json index 24fae7c9cd7c..09a967f078f6 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 214e1096e36b..8727bedcc903 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 020d3137f517..a66caeb28d01 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 5c95a9d47c72..ab39cac8eeb0 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^4.0.1", "@astrojs/svelte": "^5.2.0", "@astrojs/vue": "^4.0.8", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 3b0ea56f973e..1274059eed5d 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@preact/signals": "^1.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 6de73ac841fe..4c61ad019525 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.10", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.4.11", + "astro": "^4.4.12", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 0695b641d4bf..abd08068285d 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index abef53b538d9..68d1133c502b 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index ea03a8e83814..309803ed8339 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.0.8", - "astro": "^4.4.11", + "astro": "^4.4.12", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 7bf332ccf27d..c7d235fb0798 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index e80d16965f57..659d679066f6 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index df5fed18e36f..43b12a7dbe02 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.11", + "astro": "^4.4.12", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index e56aa6518359..14c5d81bfd64 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index b130a511b3b7..4c8281a13e49 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index b454a0f0d21d..1596f2e5459d 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index ae108833388c..7d9da47956db 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.2.3", "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index 76c4a644c26d..fff0e208e8ef 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11", + "astro": "^4.4.12", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 41285cea54d4..0bd83f9c30a6 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.2.3", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 4d49a3a7c09c..8bb57e5e7e79 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.9.1", - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index f1c3b97e3f90..43ab9fe5641e 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^4.2.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index d9105d754e3f..be58ebd00612 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.11" + "astro": "^4.4.12" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index fc942fddf71f..dcf7ff549532 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.1.1", "@astrojs/preact": "^3.1.1", - "astro": "^4.4.11", + "astro": "^4.4.12", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 552bd14220b9..e719548ea4cb 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@nanostores/preact": "^0.5.0", - "astro": "^4.4.11", + "astro": "^4.4.12", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f990748a431f..234fa0f8a9bc 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.4.11", + "astro": "^4.4.12", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 1d32b67d2622..cf1c92e76dfe 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.4.11", + "astro": "^4.4.12", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 1eae1d763432..b1082956670d 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 4.4.12 + +### Patch Changes + +- [#10336](https://github.com/withastro/astro/pull/10336) [`f2e60a96754ed1d86001fe4d5d3a0c0ef657408d`](https://github.com/withastro/astro/commit/f2e60a96754ed1d86001fe4d5d3a0c0ef657408d) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Fixes an issue where slotting interactive components within a "client:only" component prevented all component code in the page from running. + ## 4.4.11 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 080248725692..d738aa56e8e4 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.4.11", + "version": "4.4.12", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index c77471c90dc2..36a207923037 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.6.2 + +### Patch Changes + +- [#10336](https://github.com/withastro/astro/pull/10336) [`f2e60a96754ed1d86001fe4d5d3a0c0ef657408d`](https://github.com/withastro/astro/commit/f2e60a96754ed1d86001fe4d5d3a0c0ef657408d) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Add back confirmation handling on verify and push + ## 0.6.1 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index a9341a4d5002..2fe4909cf2c1 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.1", + "version": "0.6.2", "description": "", "license": "MIT", "type": "module", diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index a7b814fb566e..1cace44fad11 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vercel +## 7.3.5 + +### Patch Changes + +- [#10336](https://github.com/withastro/astro/pull/10336) [`f2e60a96754ed1d86001fe4d5d3a0c0ef657408d`](https://github.com/withastro/astro/commit/f2e60a96754ed1d86001fe4d5d3a0c0ef657408d) Thanks [@FredKSchott](https://github.com/FredKSchott)! - Fixes an issue that was preventing the use of `sharp` in some cases and causing a runtime error + ## 7.3.4 ### Patch Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 97a7edc0e63f..61af57e2c991 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "7.3.4", + "version": "7.3.5", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a2a8b6bede1..a6e9b3b07be4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,7 +134,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/blog: @@ -149,13 +149,13 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.3 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -206,7 +206,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,7 +236,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.19.3) astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -254,7 +254,7 @@ importers: specifier: ^18.2.15 version: 18.2.18 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -269,7 +269,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -281,7 +281,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -293,7 +293,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -305,13 +305,13 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/middleware: @@ -320,7 +320,7 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -366,7 +366,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -384,7 +384,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-markdoc: @@ -393,7 +393,7 @@ importers: specifier: ^0.9.1 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-markdown-plugins: @@ -402,7 +402,7 @@ importers: specifier: ^4.2.1 version: link:../../packages/markdown/remark astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -423,7 +423,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro examples/with-mdx: @@ -435,7 +435,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/preact astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -450,7 +450,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.5)(preact@10.19.3) astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -471,7 +471,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -489,7 +489,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.4.11 + specifier: ^4.4.12 version: link:../../packages/astro vitest: specifier: ^1.3.1 From a60861c960bf3d24af9b2784b5b333855c968731 Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Wed, 6 Mar 2024 08:30:45 -0500 Subject: [PATCH 08/45] fix: move db ambient types to separate module (#10340) * fix: move ambient types to separate modue * chore: changeset --- .changeset/dry-pants-act.md | 5 +++++ packages/db/index.d.ts | 6 ++---- packages/db/src/index.ts | 1 - packages/db/virtual.d.ts | 9 +++++++++ 4 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 .changeset/dry-pants-act.md create mode 100644 packages/db/virtual.d.ts diff --git a/.changeset/dry-pants-act.md b/.changeset/dry-pants-act.md new file mode 100644 index 000000000000..a6279685abac --- /dev/null +++ b/.changeset/dry-pants-act.md @@ -0,0 +1,5 @@ +--- +"@astrojs/db": patch +--- + +Ensure `astro:db` types exist in your `db/config.ts` before running type generation. diff --git a/packages/db/index.d.ts b/packages/db/index.d.ts index 81af4fb43cfc..7c0e055b2c9f 100644 --- a/packages/db/index.d.ts +++ b/packages/db/index.d.ts @@ -1,5 +1,3 @@ -export { default, cli } from './dist/index.js'; +import './virtual.js'; -declare module 'astro:db' { - export { defineTable, defineDB, column, sql, NOW, TRUE, FALSE } from './dist/index.js'; -} +export { default, cli } from './dist/index.js'; diff --git a/packages/db/src/index.ts b/packages/db/src/index.ts index 0073f2b33c16..a275433764d3 100644 --- a/packages/db/src/index.ts +++ b/packages/db/src/index.ts @@ -1,4 +1,3 @@ export type { ResolvedCollectionConfig, TableConfig } from './core/types.js'; export { cli } from './core/cli/index.js'; export { integration as default } from './core/integration/index.js'; -export { sql, NOW, TRUE, FALSE, defineDB, defineTable, column } from './runtime/config.js'; diff --git a/packages/db/virtual.d.ts b/packages/db/virtual.d.ts new file mode 100644 index 000000000000..57398d6e6f4e --- /dev/null +++ b/packages/db/virtual.d.ts @@ -0,0 +1,9 @@ +declare module 'astro:db' { + export const sql: typeof import('./dist/runtime/config.js').sql; + export const NOW: typeof import('./dist/runtime/config.js').NOW; + export const TRUE: typeof import('./dist/runtime/config.js').TRUE; + export const FALSE: typeof import('./dist/runtime/config.js').FALSE; + export const column: typeof import('./dist/runtime/config.js').column; + export const defineDB: typeof import('./dist/runtime/config.js').defineDB; + export const defineTable: typeof import('./dist/runtime/config.js').defineTable; +} From 1d9fb15a2d8642ac6c9f2547a213b91019038381 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Wed, 6 Mar 2024 05:53:27 -0800 Subject: [PATCH 09/45] [ci] release (#10341) Co-authored-by: github-actions[bot] --- .changeset/dry-pants-act.md | 5 ----- packages/db/CHANGELOG.md | 6 ++++++ packages/db/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/dry-pants-act.md diff --git a/.changeset/dry-pants-act.md b/.changeset/dry-pants-act.md deleted file mode 100644 index a6279685abac..000000000000 --- a/.changeset/dry-pants-act.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Ensure `astro:db` types exist in your `db/config.ts` before running type generation. diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 36a207923037..72433dfdfbd4 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.6.3 + +### Patch Changes + +- [#10340](https://github.com/withastro/astro/pull/10340) [`a60861c960bf3d24af9b2784b5b333855c968731`](https://github.com/withastro/astro/commit/a60861c960bf3d24af9b2784b5b333855c968731) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Ensure `astro:db` types exist in your `db/config.ts` before running type generation. + ## 0.6.2 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 2fe4909cf2c1..9cff59c87161 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.2", + "version": "0.6.3", "description": "", "license": "MIT", "type": "module", From a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 6 Mar 2024 09:50:02 -0500 Subject: [PATCH 10/45] Fixes loading .ts configs in astro:db (#10342) --- .changeset/dirty-games-jam.md | 6 ++++++ packages/astro/src/core/config/vite-load.ts | 1 + packages/db/src/core/load-file.ts | 2 +- .../fixtures/basics/{astro.config.mjs => astro.config.ts} | 0 4 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/dirty-games-jam.md rename packages/db/test/fixtures/basics/{astro.config.mjs => astro.config.ts} (100%) diff --git a/.changeset/dirty-games-jam.md b/.changeset/dirty-games-jam.md new file mode 100644 index 000000000000..50ea10998a02 --- /dev/null +++ b/.changeset/dirty-games-jam.md @@ -0,0 +1,6 @@ +--- +"astro": patch +"@astrojs/db": patch +--- + +Fixes @astrojs/db loading TS in the fixtures diff --git a/packages/astro/src/core/config/vite-load.ts b/packages/astro/src/core/config/vite-load.ts index 0df11bfd0375..c890bb48d6df 100644 --- a/packages/astro/src/core/config/vite-load.ts +++ b/packages/astro/src/core/config/vite-load.ts @@ -21,6 +21,7 @@ async function createViteServer(root: string, fs: typeof fsType): Promise Date: Wed, 6 Mar 2024 09:37:08 -0600 Subject: [PATCH 11/45] Fix cli package resolution for `@astrojs/db` (#10338) --- packages/astro/src/cli/install-package.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/cli/install-package.ts b/packages/astro/src/cli/install-package.ts index f4e43f968f7b..23699cf34873 100644 --- a/packages/astro/src/cli/install-package.ts +++ b/packages/astro/src/cli/install-package.ts @@ -1,5 +1,6 @@ import { createRequire } from 'node:module'; import { sep } from 'node:path'; +import { pathToFileURL } from 'node:url'; import boxen from 'boxen'; import { execa } from 'execa'; import { bold, cyan, dim, magenta } from 'kleur/colors'; @@ -28,8 +29,8 @@ export async function getPackage( const packageJsonLoc = require.resolve(packageName + '/package.json', { paths: [options.cwd ?? process.cwd()], }); - const packageLoc = packageJsonLoc.replace(`package.json`, 'dist/index.js'); - const packageImport = await import(packageLoc); + const packageLoc = pathToFileURL(packageJsonLoc.replace(`package.json`, 'dist/index.js')); + const packageImport = await import(packageLoc.toString()); return packageImport as T; } await tryResolve(packageName, options.cwd ?? process.cwd()); From c793f194c99ccb43a35b54a47cd8ce47789dfb39 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Wed, 6 Mar 2024 08:07:43 -0800 Subject: [PATCH 12/45] [ci] release (#10344) Co-authored-by: github-actions[bot] --- .changeset/dirty-games-jam.md | 6 --- examples/basics/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 6 +++ packages/astro/package.json | 2 +- packages/db/CHANGELOG.md | 6 +++ packages/db/package.json | 2 +- pnpm-lock.yaml | 54 ++++++++++----------- 33 files changed, 68 insertions(+), 62 deletions(-) delete mode 100644 .changeset/dirty-games-jam.md diff --git a/.changeset/dirty-games-jam.md b/.changeset/dirty-games-jam.md deleted file mode 100644 index 50ea10998a02..000000000000 --- a/.changeset/dirty-games-jam.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"astro": patch -"@astrojs/db": patch ---- - -Fixes @astrojs/db loading TS in the fixtures diff --git a/examples/basics/package.json b/examples/basics/package.json index ae9e64b6bf43..d5d17955172a 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index 7bb73ad85916..33cd414e8577 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -14,6 +14,6 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.1", - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/component/package.json b/examples/component/package.json index 09a967f078f6..955b5872b488 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 8727bedcc903..fa4a3d6b4527 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index a66caeb28d01..4cdd91591bf7 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.4.12", + "astro": "^4.4.13", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index ab39cac8eeb0..e10d3113a6b0 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "^4.0.1", "@astrojs/svelte": "^5.2.0", "@astrojs/vue": "^4.0.8", - "astro": "^4.4.12", + "astro": "^4.4.13", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 1274059eed5d..784f5dc764c9 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@preact/signals": "^1.2.1", - "astro": "^4.4.12", + "astro": "^4.4.13", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 4c61ad019525..504fa8083e33 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.0.10", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.4.12", + "astro": "^4.4.13", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index abd08068285d..6431b1e425fa 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.4.12", + "astro": "^4.4.13", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 68d1133c502b..b2979c024c27 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.12", + "astro": "^4.4.13", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 309803ed8339..eb2a80ba7410 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.0.8", - "astro": "^4.4.12", + "astro": "^4.4.13", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index c7d235fb0798..6e90d88ffcaf 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 659d679066f6..0c407e4fbb47 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 43b12a7dbe02..44ff22dd803c 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.3", - "astro": "^4.4.12", + "astro": "^4.4.13", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 14c5d81bfd64..244a5ba11719 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 4c8281a13e49..16d32b3eab74 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 1596f2e5459d..820da5dbb3a9 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 7d9da47956db..266b530a280e 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.2.3", "@astrojs/svelte": "^5.2.0", - "astro": "^4.4.12", + "astro": "^4.4.13", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index fff0e208e8ef..018de2f2001a 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12", + "astro": "^4.4.13", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 0bd83f9c30a6..2b928b5a7692 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.2.3", - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 8bb57e5e7e79..985e4085c266 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.9.1", - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 43ab9fe5641e..723d8c729d54 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^4.2.1", - "astro": "^4.4.12", + "astro": "^4.4.13", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index be58ebd00612..424ffcdb05b9 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.4.12" + "astro": "^4.4.13" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index dcf7ff549532..1bcfe6150653 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.1.1", "@astrojs/preact": "^3.1.1", - "astro": "^4.4.12", + "astro": "^4.4.13", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index e719548ea4cb..694e8ae1a798 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.1.1", "@nanostores/preact": "^0.5.0", - "astro": "^4.4.12", + "astro": "^4.4.13", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 234fa0f8a9bc..4f64efd05957 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.1.1", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.4.12", + "astro": "^4.4.13", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index cf1c92e76dfe..9592729a7ed5 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.4.12", + "astro": "^4.4.13", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index b1082956670d..b77a60421069 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 4.4.13 + +### Patch Changes + +- [#10342](https://github.com/withastro/astro/pull/10342) [`a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec`](https://github.com/withastro/astro/commit/a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec) Thanks [@matthewp](https://github.com/matthewp)! - Fixes @astrojs/db loading TS in the fixtures + ## 4.4.12 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index d738aa56e8e4..78d5ed94e07e 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.4.12", + "version": "4.4.13", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 72433dfdfbd4..8018da507300 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.6.4 + +### Patch Changes + +- [#10342](https://github.com/withastro/astro/pull/10342) [`a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec`](https://github.com/withastro/astro/commit/a2e9b2b936666b2a4779feb00dcb8ff0ab82c2ec) Thanks [@matthewp](https://github.com/matthewp)! - Fixes @astrojs/db loading TS in the fixtures + ## 0.6.3 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 9cff59c87161..84e03f38fa78 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.3", + "version": "0.6.4", "description": "", "license": "MIT", "type": "module", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6e9b3b07be4..e01985489ec8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,7 +134,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/blog: @@ -149,13 +149,13 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.3 astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -206,7 +206,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,7 +236,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.19.3) astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -254,7 +254,7 @@ importers: specifier: ^18.2.15 version: 18.2.18 astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -269,7 +269,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -281,7 +281,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -293,7 +293,7 @@ importers: specifier: ^4.0.8 version: link:../../packages/integrations/vue astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -305,13 +305,13 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/middleware: @@ -320,7 +320,7 @@ importers: specifier: ^8.2.3 version: link:../../packages/integrations/node astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -333,19 +333,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/ssr: @@ -357,7 +357,7 @@ importers: specifier: ^5.2.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -366,7 +366,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -384,7 +384,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/with-markdoc: @@ -393,7 +393,7 @@ importers: specifier: ^0.9.1 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/with-markdown-plugins: @@ -402,7 +402,7 @@ importers: specifier: ^4.2.1 version: link:../../packages/markdown/remark astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -423,7 +423,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro examples/with-mdx: @@ -435,7 +435,7 @@ importers: specifier: ^3.1.1 version: link:../../packages/integrations/preact astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -450,7 +450,7 @@ importers: specifier: ^0.5.0 version: 0.5.0(nanostores@0.9.5)(preact@10.19.3) astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -471,7 +471,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -489,7 +489,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.4.12 + specifier: ^4.4.13 version: link:../../packages/astro vitest: specifier: ^1.3.1 From 393ad9b2aa9fde45eb14b8b01ff3526063772452 Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Wed, 6 Mar 2024 20:00:22 -0300 Subject: [PATCH 13/45] Include virtual declaration in package (#10350) * Include virtual declaration in package * Update .changeset/good-rats-bathe.md --------- Co-authored-by: Nate Moore --- .changeset/good-rats-bathe.md | 5 +++++ packages/db/package.json | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/good-rats-bathe.md diff --git a/.changeset/good-rats-bathe.md b/.changeset/good-rats-bathe.md new file mode 100644 index 000000000000..5f180cf0ba46 --- /dev/null +++ b/.changeset/good-rats-bathe.md @@ -0,0 +1,5 @@ +--- +"@astrojs/db": patch +--- + +Includes `./virtual.d.ts` file that was previously unpublished diff --git a/packages/db/package.json b/packages/db/package.json index 84e03f38fa78..66ea1d8339a9 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -51,6 +51,7 @@ }, "files": [ "index.d.ts", + "virtual.d.ts", "dist" ], "keywords": [ From e88eeb033749bd6bce8c00e712e207690ae9bf79 Mon Sep 17 00:00:00 2001 From: "Houston (Bot)" <108291165+astrobot-houston@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:54:18 -0800 Subject: [PATCH 14/45] [ci] release (#10351) Co-authored-by: github-actions[bot] --- .changeset/good-rats-bathe.md | 5 ----- packages/db/CHANGELOG.md | 6 ++++++ packages/db/package.json | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 .changeset/good-rats-bathe.md diff --git a/.changeset/good-rats-bathe.md b/.changeset/good-rats-bathe.md deleted file mode 100644 index 5f180cf0ba46..000000000000 --- a/.changeset/good-rats-bathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Includes `./virtual.d.ts` file that was previously unpublished diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index 8018da507300..e54d9d0dc86a 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.6.5 + +### Patch Changes + +- [#10350](https://github.com/withastro/astro/pull/10350) [`393ad9b2aa9fde45eb14b8b01ff3526063772452`](https://github.com/withastro/astro/commit/393ad9b2aa9fde45eb14b8b01ff3526063772452) Thanks [@Fryuni](https://github.com/Fryuni)! - Includes `./virtual.d.ts` file that was previously unpublished + ## 0.6.4 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index 66ea1d8339a9..047843fc312a 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.6.4", + "version": "0.6.5", "description": "", "license": "MIT", "type": "module", From f973aa9110592fa9017bbe84387f22c24a6d7159 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Thu, 7 Mar 2024 11:18:09 +0000 Subject: [PATCH 15/45] fix(toolbar): add anchor element to interactive elements (#10343) * fix(toolbar): add anchor element to interactive elements * chore: apply better logic * add test --- .changeset/tough-moose-prove.md | 5 +++ packages/astro/e2e/dev-toolbar-audits.test.js | 14 ++++++++ .../src/pages/a11y-exceptions.astro | 6 ++++ .../client/dev-toolbar/apps/audit/a11y.ts | 33 ++++++++++++++++++- 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .changeset/tough-moose-prove.md create mode 100644 packages/astro/e2e/fixtures/dev-toolbar/src/pages/a11y-exceptions.astro diff --git a/.changeset/tough-moose-prove.md b/.changeset/tough-moose-prove.md new file mode 100644 index 000000000000..f4d462c09e32 --- /dev/null +++ b/.changeset/tough-moose-prove.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes some false positive in the dev toolbar a11y audits, by adding the `a` element to the list of interactive elements. diff --git a/packages/astro/e2e/dev-toolbar-audits.test.js b/packages/astro/e2e/dev-toolbar-audits.test.js index a9d0dd114d9f..2195aa9f9536 100644 --- a/packages/astro/e2e/dev-toolbar-audits.test.js +++ b/packages/astro/e2e/dev-toolbar-audits.test.js @@ -43,4 +43,18 @@ test.describe('Dev Toolbar - Audits', () => { // Toggle app off await appButton.click(); }); + + test('does not warn for non-interactive element', async ({ page, astro }) => { + await page.goto(astro.resolveUrl('/a11y-exceptions')); + + const toolbar = page.locator('astro-dev-toolbar'); + const appButton = toolbar.locator('button[data-app-id="astro:audit"]'); + await appButton.click(); + + const auditCanvas = toolbar.locator('astro-dev-toolbar-app-canvas[data-app-id="astro:audit"]'); + const auditHighlights = auditCanvas.locator('astro-dev-toolbar-highlight'); + + const count = await auditHighlights.count(); + expect(count).toEqual(0); + }); }); diff --git a/packages/astro/e2e/fixtures/dev-toolbar/src/pages/a11y-exceptions.astro b/packages/astro/e2e/fixtures/dev-toolbar/src/pages/a11y-exceptions.astro new file mode 100644 index 000000000000..0da2c272d363 --- /dev/null +++ b/packages/astro/e2e/fixtures/dev-toolbar/src/pages/a11y-exceptions.astro @@ -0,0 +1,6 @@ +--- + +--- + + + diff --git a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts index 45b94b31f6be..28754310bffa 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/apps/audit/a11y.ts @@ -42,7 +42,25 @@ const a11y_required_attributes = { object: ['title', 'aria-label', 'aria-labelledby'], }; -const interactiveElements = ['button', 'details', 'embed', 'iframe', 'label', 'select', 'textarea']; +const MAYBE_INTERACTIVE = new Map([ + ['a', 'href'], + ['input', 'type'], + ['audio', 'controls'], + ['img', 'usemap'], + ['object', 'usemap'], + ['video', 'controls'], +]); + +const interactiveElements = [ + 'button', + 'details', + 'embed', + 'iframe', + 'label', + 'select', + 'textarea', + ...MAYBE_INTERACTIVE.keys(), +]; const labellableElements = ['input', 'meter', 'output', 'progress', 'select', 'textarea']; @@ -187,6 +205,15 @@ const ariaRoles = new Set( ) ); +function isInteractive(element: Element): boolean { + const attribute = MAYBE_INTERACTIVE.get(element.localName); + if (attribute) { + return element.hasAttribute(attribute); + } + + return true; +} + export const a11y: AuditRuleWithSelector[] = [ { code: 'a11y-accesskey', @@ -434,6 +461,7 @@ export const a11y: AuditRuleWithSelector[] = [ 'Interactive HTML elements like `` and ` `; } + + connectedCallback() { + this.updateStyle(); + } + + updateStyle() { + const style = this.shadowRoot.getElementById('selected-style') as HTMLStyleElement; + + style.innerHTML = ` + button { + --background: var(--${this.buttonStyle}-background); + --border: var(--${this.buttonStyle}-border); + --font-size: var(--${this.size}-font-size); + --padding: var(--${this.size}-padding); + --text-color: var(--${this.buttonStyle}-text); + } + `; + } + + attributeChangedCallback() { + if (this.hasAttribute('size')) this.size = this.getAttribute('size') as ButtonSize; + + if (this.hasAttribute('button-style')) + this.buttonStyle = this.getAttribute('button-style') as ButtonStyle; + } } diff --git a/packages/astro/src/runtime/client/dev-toolbar/ui-library/card.ts b/packages/astro/src/runtime/client/dev-toolbar/ui-library/card.ts index 6d1d5c381b19..82113b21bd6e 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/ui-library/card.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/ui-library/card.ts @@ -1,8 +1,33 @@ +import { settings } from '../settings.js'; + +const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const; + +type CardStyle = (typeof styles)[number]; + export class DevToolbarCard extends HTMLElement { link?: string | undefined | null; clickAction?: () => void | (() => Promise); shadowRoot: ShadowRoot; + _cardStyle: CardStyle = 'purple'; + + get cardStyle() { + return this._cardStyle; + } + + set cardStyle(value) { + if (!styles.includes(value)) { + settings.logger.error( + `Invalid style: ${value}, expected one of ${styles.join(', ')}, got ${value}.` + ); + return; + } + this._cardStyle = value; + this.updateStyle(); + } + + static observedAttributes = ['card-style']; + constructor() { super(); this.shadowRoot = this.attachShadow({ mode: 'open' }); @@ -10,11 +35,51 @@ export class DevToolbarCard extends HTMLElement { this.link = this.getAttribute('link'); } + attributeChangedCallback() { + if (this.hasAttribute('card-style')) + this.cardStyle = this.getAttribute('card-style') as CardStyle; + + this.updateStyle(); + } + + updateStyle() { + const style = this.shadowRoot.getElementById('selected-style'); + + if (style) { + style.innerHTML = ` + :host { + --hover-background: var(--${this.cardStyle}-hover-background); + --hover-border: var(--${this.cardStyle}-hover-border); + } + `; + } + } + connectedCallback() { const element = this.link ? 'a' : this.clickAction ? 'button' : 'div'; this.shadowRoot.innerHTML += ` + <${element}${this.link ? ` href="${this.link}" target="_blank"` : ``} id="astro-overlay-card"> `; + this.updateStyle(); + if (this.clickAction) { this.shadowRoot .getElementById('astro-overlay-card') diff --git a/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts b/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts index 2dbe1a9eb8b0..fa6d06ad9b98 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/ui-library/highlight.ts @@ -1,7 +1,30 @@ -import { type Icon, getIconElement, isDefinedIcon } from './icons.js'; +import { getIconElement, isDefinedIcon, type Icon } from './icons.js'; +import { settings } from '../settings.js'; + +const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const; + +type HighlightStyle = (typeof styles)[number]; export class DevToolbarHighlight extends HTMLElement { icon?: Icon | undefined | null; + _highlightStyle: HighlightStyle = 'purple'; + + get highlightStyle() { + return this._highlightStyle; + } + + set highlightStyle(value) { + if (!styles.includes(value)) { + settings.logger.error( + `Invalid style: ${value}, expected one of ${styles.join(', ')}, got ${value}.` + ); + return; + } + this._highlightStyle = value; + this.updateStyle(); + } + + static observedAttributes = ['highlight-style']; shadowRoot: ShadowRoot; @@ -14,14 +37,33 @@ export class DevToolbarHighlight extends HTMLElement { this.shadowRoot.innerHTML = ` + `; } + updateStyle() { + const style = this.shadowRoot.getElementById('selected-style') as HTMLStyleElement; + style.innerHTML = ` + :host { + --background: var(--${this.highlightStyle}-background); + --border: var(--${this.highlightStyle}-border); + } + `; + } + + attributeChangedCallback() { + if (this.hasAttribute('highlight-style')) + this.highlightStyle = this.getAttribute('highlight-style') as HighlightStyle; + } + connectedCallback() { + this.updateStyle(); + if (this.icon) { let iconContainer = document.createElement('div'); iconContainer.classList.add('icon'); diff --git a/packages/astro/src/runtime/client/dev-toolbar/ui-library/toggle.ts b/packages/astro/src/runtime/client/dev-toolbar/ui-library/toggle.ts index 9b45fb14d78a..7d8cb71bafdb 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/ui-library/toggle.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/ui-library/toggle.ts @@ -1,6 +1,28 @@ +import { settings } from '../settings.js'; + +const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const; + +type ToggleStyle = (typeof styles)[number]; + export class DevToolbarToggle extends HTMLElement { shadowRoot: ShadowRoot; input: HTMLInputElement; + _toggleStyle: ToggleStyle = 'gray'; + + get toggleStyle() { + return this._toggleStyle; + } + + set toggleStyle(value) { + if (!styles.includes(value)) { + settings.logger.error(`Invalid style: ${value}, expected one of ${styles.join(', ')}.`); + return; + } + this._toggleStyle = value; + this.updateStyle(); + } + + static observedAttributes = ['toggle-style']; constructor() { super(); @@ -8,11 +30,37 @@ export class DevToolbarToggle extends HTMLElement { this.shadowRoot.innerHTML = ` + `; this.input = document.createElement('input'); } + attributeChangedCallback() { + if (this.hasAttribute('toggle-style')) + this.toggleStyle = this.getAttribute('toggle-style') as ToggleStyle; + } + + updateStyle() { + const style = this.shadowRoot.getElementById('selected-style') as HTMLStyleElement; + style.innerHTML = ` + :host { + --bg-on: var(--${this.toggleStyle}-bg-on); + --border-off: var(--${this.toggleStyle}-border-off); + --border-on: var(--${this.toggleStyle}-border-on); + } + `; + } + connectedCallback() { this.input.type = 'checkbox'; this.shadowRoot.append(this.input); + this.updateStyle(); } get value() { From 5a9528741fa98d017b269c7e4f013058028bdc5d Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Fri, 8 Mar 2024 18:53:19 +0800 Subject: [PATCH 45/45] Move to shiki and stabilize dual themes support (#10130) * Update to shiki * Stabilize shikiConfig.experimentalThemes * Add changeset * Fix merge issues --- .changeset/curvy-hats-shave.md | 5 ++++ .changeset/thin-chicken-greet.md | 6 ++++ examples/with-mdx/src/pages/index.mdx | 2 +- packages/astro/components/Code.astro | 22 +++++++------- packages/astro/package.json | 4 +-- packages/astro/src/@types/astro.ts | 2 +- packages/astro/src/core/config/schema.ts | 23 +++++++++++---- packages/astro/src/core/errors/dev/vite.ts | 2 +- packages/markdown/remark/package.json | 2 +- packages/markdown/remark/src/index.ts | 2 +- packages/markdown/remark/src/shiki.ts | 9 ++---- packages/markdown/remark/src/types.ts | 8 +++--- packages/markdown/remark/test/shiki.test.js | 2 +- pnpm-lock.yaml | 32 ++++++++++----------- 14 files changed, 70 insertions(+), 51 deletions(-) create mode 100644 .changeset/curvy-hats-shave.md create mode 100644 .changeset/thin-chicken-greet.md diff --git a/.changeset/curvy-hats-shave.md b/.changeset/curvy-hats-shave.md new file mode 100644 index 000000000000..a1488e0786e2 --- /dev/null +++ b/.changeset/curvy-hats-shave.md @@ -0,0 +1,5 @@ +--- +"astro": minor +--- + +Stabilizes `markdown.shikiConfig.experimentalThemes` as `markdown.shikiConfig.themes`. No behaviour changes are made to this option. diff --git a/.changeset/thin-chicken-greet.md b/.changeset/thin-chicken-greet.md new file mode 100644 index 000000000000..a018fd10f268 --- /dev/null +++ b/.changeset/thin-chicken-greet.md @@ -0,0 +1,6 @@ +--- +"@astrojs/markdown-remark": minor +"astro": minor +--- + +Migrates `shikiji` to `shiki` 1.0 diff --git a/examples/with-mdx/src/pages/index.mdx b/examples/with-mdx/src/pages/index.mdx index 13a929624bf8..df0dd47c3a07 100644 --- a/examples/with-mdx/src/pages/index.mdx +++ b/examples/with-mdx/src/pages/index.mdx @@ -18,7 +18,7 @@ Published on: {new Intl.DateTimeFormat('en', {dateStyle: 'long'}).format(publish ## Syntax highlighting -We also support syntax highlighting in MDX out-of-the-box! This example uses our default [Shiki theme](https://github.com/shikijs/shiki). See the [MDX integration docs](https://docs.astro.build/en/guides/integrations-guide/mdx/#syntax-highlighting) for configuration options. +We also support syntax highlighting in MDX out-of-the-box! This example uses the default [Shiki](https://shiki.style) theme. See the [MDX integration docs](https://docs.astro.build/en/guides/integrations-guide/mdx/#syntax-highlighting) for configuration options. ```astro --- diff --git a/packages/astro/components/Code.astro b/packages/astro/components/Code.astro index ab2d88696c6c..a7f6f725aeec 100644 --- a/packages/astro/components/Code.astro +++ b/packages/astro/components/Code.astro @@ -6,8 +6,8 @@ import type { SpecialLanguage, ThemeRegistration, ThemeRegistrationRaw, -} from 'shikiji'; -import { bundledLanguages } from 'shikiji/langs'; +} from 'shiki'; +import { bundledLanguages } from 'shiki/langs'; import { getCachedHighlighter } from '../dist/core/shiki.js'; interface Props { @@ -15,25 +15,25 @@ interface Props { code: string; /** * The language of your code. - * Supports all languages listed here: https://github.com/shikijs/shiki/blob/main/docs/languages.md#all-languages - * Instructions for loading a custom language: https://github.com/shikijs/shiki/blob/main/docs/languages.md#supporting-your-own-languages-with-shiki + * Supports all languages listed here: https://shiki.style/languages + * Instructions for loading a custom language: https://shiki.style/guide/load-lang * * @default "plaintext" */ lang?: BuiltinLanguage | SpecialLanguage | LanguageRegistration; /** * The styling theme. - * Supports all themes listed here: https://github.com/shikijs/shiki/blob/main/docs/themes.md#all-themes - * Instructions for loading a custom theme: https://github.com/shikijs/shiki/blob/main/docs/themes.md#loading-theme + * Supports all themes listed here: https://shiki.style/themes + * Instructions for loading a custom theme: https://shiki.style/guide/load-theme * * @default "github-dark" */ theme?: ThemePresets | ThemeRegistration | ThemeRegistrationRaw; /** * Multiple themes to style with -- alternative to "theme" option. - * Supports all themes found above; see https://github.com/antfu/shikiji#lightdark-dual-themes for more information. + * Supports all themes found above; see https://shiki.style/guide/dual-themes for more information. */ - experimentalThemes?: Record; + themes?: Record; /** * Enable word wrapping. * - true: enabled. @@ -55,12 +55,12 @@ const { code, lang = 'plaintext', theme = 'github-dark', - experimentalThemes = {}, + themes = {}, wrap = false, inline = false, } = Astro.props; -// shiki -> shikiji compat +// shiki 1.0 compat if (typeof lang === 'object') { // `id` renamed to `name` (always override) if ((lang as any).id) { @@ -81,7 +81,7 @@ const highlighter = await getCachedHighlighter({ : lang, ], theme, - experimentalThemes, + themes, wrap, }); diff --git a/packages/astro/package.json b/packages/astro/package.json index d3bb6acd575c..42ee8a741531 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -125,6 +125,7 @@ "@babel/traverse": "^7.23.3", "@babel/types": "^7.23.3", "@medv/finder": "^3.1.0", + "@shikijs/core": "^1.1.2", "@types/babel__core": "^7.20.4", "acorn": "^8.11.2", "aria-query": "^5.3.0", @@ -166,8 +167,7 @@ "rehype": "^13.0.1", "resolve": "^1.22.4", "semver": "^7.5.4", - "shikiji": "^0.9.19", - "shikiji-core": "^0.9.19", + "shiki": "^1.1.2", "string-width": "^7.0.0", "strip-ansi": "^7.1.0", "tsconfck": "^3.0.0", diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 89283ce34a20..932d656e7c58 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -1294,7 +1294,7 @@ export interface AstroUserConfig { * @default `shiki` * @description * Which syntax highlighter to use, if any. - * - `shiki` - use the [Shiki](https://github.com/shikijs/shiki) highlighter + * - `shiki` - use the [Shiki](https://shiki.style) highlighter * - `prism` - use the [Prism](https://prismjs.com/) highlighter * - `false` - do not apply syntax highlighting. * diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index fcfd91639b1b..4c0276ddf7a5 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -5,7 +5,7 @@ import type { ShikiConfig, } from '@astrojs/markdown-remark'; import { markdownConfigDefaults } from '@astrojs/markdown-remark'; -import { type BuiltinTheme, bundledThemes } from 'shikiji'; +import { type BuiltinTheme, bundledThemes } from 'shiki'; import type { AstroUserConfig, ViteUserConfig } from '../../@types/astro.js'; import type { OutgoingHttpHeaders } from 'node:http'; @@ -14,10 +14,10 @@ import { pathToFileURL } from 'node:url'; import { z } from 'zod'; import { appendForwardSlash, prependForwardSlash, removeTrailingForwardSlash } from '../path.js'; -// This import is required to appease TypeScript! +// These imports are required to appease TypeScript! // See https://github.com/withastro/astro/pull/8762 +import '@shikijs/core'; import 'mdast-util-to-hast'; -import 'shikiji-core'; type ShikiLangs = NonNullable; type ShikiTheme = NonNullable; @@ -250,7 +250,7 @@ export const AstroConfigSchema = z.object({ .array() .transform((langs) => { for (const lang of langs) { - // shiki -> shikiji compat + // shiki 1.0 compat if (typeof lang === 'object') { // `id` renamed to `name` (always override) if ((lang as any).id) { @@ -269,17 +269,28 @@ export const AstroConfigSchema = z.object({ .enum(Object.keys(bundledThemes) as [BuiltinTheme, ...BuiltinTheme[]]) .or(z.custom()) .default(ASTRO_CONFIG_DEFAULTS.markdown.shikiConfig.theme!), - experimentalThemes: z + themes: z .record( z .enum(Object.keys(bundledThemes) as [BuiltinTheme, ...BuiltinTheme[]]) .or(z.custom()) ) - .default(ASTRO_CONFIG_DEFAULTS.markdown.shikiConfig.experimentalThemes!), + .default(ASTRO_CONFIG_DEFAULTS.markdown.shikiConfig.themes!), wrap: z.boolean().or(z.null()).default(ASTRO_CONFIG_DEFAULTS.markdown.shikiConfig.wrap!), transformers: z .custom() .array() + .transform((transformers) => { + for (const transformer of transformers) { + // When updating shikiji to shiki, the `token` property was renamed to `span`. + // We apply the compat here for now until the next Astro major. + // TODO: Remove this in Astro 5.0 + if ((transformer as any).token && !('span' in transformer)) { + transformer.span = (transformer as any).token; + } + } + return transformers; + }) .default(ASTRO_CONFIG_DEFAULTS.markdown.shikiConfig.transformers!), }) .default({}), diff --git a/packages/astro/src/core/errors/dev/vite.ts b/packages/astro/src/core/errors/dev/vite.ts index bfdd043a7567..96e53d41c2e7 100644 --- a/packages/astro/src/core/errors/dev/vite.ts +++ b/packages/astro/src/core/errors/dev/vite.ts @@ -1,6 +1,6 @@ import * as fs from 'node:fs'; import { fileURLToPath } from 'node:url'; -import { codeToHtml, createCssVariablesTheme } from 'shikiji'; +import { codeToHtml, createCssVariablesTheme } from 'shiki'; import type { ErrorPayload } from 'vite'; import type { ModuleLoader } from '../../module-loader/index.js'; import { FailedToLoadModuleSSR, InvalidGlob, MdxIntegrationMissingError } from '../errors-data.js'; diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index 2af49fc088c6..98a23930138c 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -44,7 +44,7 @@ "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", "remark-smartypants": "^2.0.0", - "shikiji": "^0.9.19", + "shiki": "^1.1.2", "unified": "^11.0.4", "unist-util-visit": "^5.0.0", "vfile": "^6.0.1" diff --git a/packages/markdown/remark/src/index.ts b/packages/markdown/remark/src/index.ts index 7881614e5dbd..6ab0e5c6765c 100644 --- a/packages/markdown/remark/src/index.ts +++ b/packages/markdown/remark/src/index.ts @@ -34,7 +34,7 @@ export const markdownConfigDefaults: Required = { shikiConfig: { langs: [], theme: 'github-dark', - experimentalThemes: {}, + themes: {}, wrap: false, transformers: [], }, diff --git a/packages/markdown/remark/src/shiki.ts b/packages/markdown/remark/src/shiki.ts index 26ee22bfa854..c0fc798e9830 100644 --- a/packages/markdown/remark/src/shiki.ts +++ b/packages/markdown/remark/src/shiki.ts @@ -1,5 +1,5 @@ import type { Properties } from 'hast'; -import { bundledLanguages, createCssVariablesTheme, getHighlighter } from 'shikiji'; +import { bundledLanguages, createCssVariablesTheme, getHighlighter } from 'shiki'; import { visit } from 'unist-util-visit'; import type { ShikiConfig } from './types.js'; @@ -25,12 +25,10 @@ const cssVariablesTheme = () => export async function createShikiHighlighter({ langs = [], theme = 'github-dark', - experimentalThemes = {}, + themes = {}, wrap = false, transformers = [], }: ShikiConfig = {}): Promise { - const themes = experimentalThemes; - theme = theme === 'css-variables' ? cssVariablesTheme() : theme; const highlighter = await getHighlighter({ @@ -106,11 +104,10 @@ export async function createShikiHighlighter({ } }, root(node) { - if (Object.values(experimentalThemes).length) { + if (Object.values(themes).length) { return; } - // theme.id for shiki -> shikiji compat const themeName = typeof theme === 'string' ? theme : theme.name; if (themeName === 'css-variables') { // Replace special color tokens to CSS variables diff --git a/packages/markdown/remark/src/types.ts b/packages/markdown/remark/src/types.ts index 69e6d52009f7..1fb89316d60e 100644 --- a/packages/markdown/remark/src/types.ts +++ b/packages/markdown/remark/src/types.ts @@ -4,10 +4,10 @@ import type { Options as RemarkRehypeOptions } from 'remark-rehype'; import type { BuiltinTheme, LanguageRegistration, - ShikijiTransformer, + ShikiTransformer, ThemeRegistration, ThemeRegistrationRaw, -} from 'shikiji'; +} from 'shiki'; import type * as unified from 'unified'; import type { VFile } from 'vfile'; @@ -38,9 +38,9 @@ export type ThemePresets = BuiltinTheme | 'css-variables'; export interface ShikiConfig { langs?: LanguageRegistration[]; theme?: ThemePresets | ThemeRegistration | ThemeRegistrationRaw; - experimentalThemes?: Record; + themes?: Record; wrap?: boolean | null; - transformers?: ShikijiTransformer[]; + transformers?: ShikiTransformer[]; } export interface AstroMarkdownOptions { diff --git a/packages/markdown/remark/test/shiki.test.js b/packages/markdown/remark/test/shiki.test.js index 2fb40c217c43..c6044b019d8e 100644 --- a/packages/markdown/remark/test/shiki.test.js +++ b/packages/markdown/remark/test/shiki.test.js @@ -13,7 +13,7 @@ describe('shiki syntax highlighting', () => { it('supports light/dark themes', async () => { const processor = await createMarkdownProcessor({ shikiConfig: { - experimentalThemes: { + themes: { light: 'github-light', dark: 'github-dark', }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa4ceb9e3bab..e32f61f2b0a3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -530,6 +530,9 @@ importers: '@medv/finder': specifier: ^3.1.0 version: 3.1.0 + '@shikijs/core': + specifier: ^1.1.2 + version: 1.1.2 '@types/babel__core': specifier: ^7.20.4 version: 7.20.5 @@ -653,12 +656,9 @@ importers: semver: specifier: ^7.5.4 version: 7.5.4 - shikiji: - specifier: ^0.9.19 - version: 0.9.19 - shikiji-core: - specifier: ^0.9.19 - version: 0.9.19 + shiki: + specifier: ^1.1.2 + version: 1.1.2 string-width: specifier: ^7.0.0 version: 7.0.0 @@ -5236,9 +5236,9 @@ importers: remark-smartypants: specifier: ^2.0.0 version: 2.0.0 - shikiji: - specifier: ^0.9.19 - version: 0.9.19 + shiki: + specifier: ^1.1.2 + version: 1.1.2 unified: specifier: ^11.0.4 version: 11.0.4 @@ -7590,6 +7590,10 @@ packages: requiresBuild: true optional: true + /@shikijs/core@1.1.2: + resolution: {integrity: sha512-ERVzNQz88ZkDqUpWeC57Kp+Kmx5RjqeDBR1M8AGWGom4yrkITiTfXCGmjchlDSw12MhDTuPYR4HVFW8uT61RaQ==} + dev: false + /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: false @@ -15025,14 +15029,10 @@ packages: vscode-textmate: 5.2.0 dev: true - /shikiji-core@0.9.19: - resolution: {integrity: sha512-AFJu/vcNT21t0e6YrfadZ+9q86gvPum6iywRyt1OtIPjPFe25RQnYJyxHQPMLKCCWA992TPxmEmbNcOZCAJclw==} - dev: false - - /shikiji@0.9.19: - resolution: {integrity: sha512-Kw2NHWktdcdypCj1GkKpXH4o6Vxz8B8TykPlPuLHOGSV8VkhoCLcFOH4k19K4LXAQYRQmxg+0X/eM+m2sLhAkg==} + /shiki@1.1.2: + resolution: {integrity: sha512-qNzFwTv5uhEDNUIwp7wHjsrffVeLbmOgWnM5mZZhoiz7G2qAUvqVfUzuWfieD45/YAKipzCtdV9SndacKtABow==} dependencies: - shikiji-core: 0.9.19 + '@shikijs/core': 1.1.2 dev: false /side-channel@1.0.4: