mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Merge branch 'main' into next
This commit is contained in:
commit
b75758f883
110 changed files with 1252 additions and 1128 deletions
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Support passing the values `Infinity` and `-Infinity` as island props.
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'@astrojs/vue': patch
|
||||
---
|
||||
|
||||
Fixes a case where IDs generated by `useId()` (introduced in Vue 3.5) would not be unique between islands
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
'create-astro': patch
|
||||
'@astrojs/upgrade': patch
|
||||
'astro': patch
|
||||
'@astrojs/db': patch
|
||||
---
|
||||
|
||||
Removes the `strip-ansi` dependency in favor of the native Node API
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Clear content layer cache when astro version changes
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
"astro": patch
|
||||
---
|
||||
|
||||
Updates Vite links to use their new domain
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Allows special characters in Action names
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fixes missing `body` property on CollectionEntry types for content layer entries
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Adds a helpful error when attempting to render an undefined collection entry
|
|
@ -13,7 +13,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/mdx": "^4.0.0-beta.2",
|
||||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@astrojs/sitemap": "^3.2.0",
|
||||
"astro": "^5.0.0-beta.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
"@astrojs/react": "^3.6.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"vitest": "^2.1.1"
|
||||
"vitest": "^2.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
"@astrojs/solid-js": "^4.4.2",
|
||||
"@astrojs/svelte": "^6.0.0-beta.0",
|
||||
"@astrojs/vue": "^5.0.0-beta.0",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
"@astrojs/preact": "^3.5.3",
|
||||
"@preact/signals": "^1.3.0",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@astrojs/react": "^3.6.2",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "^5.0.0-beta.0",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"@astrojs/tailwind": "^5.1.1",
|
||||
"@fortawesome/fontawesome-free": "^6.6.0",
|
||||
"@tailwindcss/forms": "^0.5.9",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"postcss": "^8.4.47",
|
||||
|
|
|
@ -14,6 +14,6 @@
|
|||
"@astrojs/mdx": "^4.0.0-beta.2",
|
||||
"@astrojs/preact": "^3.5.3",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
"@nanostores/preact": "^0.5.2",
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"nanostores": "^0.11.3",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"astro": "^5.0.0-beta.3",
|
||||
"vitest": "^2.1.1"
|
||||
"vitest": "^2.1.2"
|
||||
}
|
||||
}
|
||||
|
|
10
package.json
10
package.json
|
@ -52,21 +52,21 @@
|
|||
"astro-benchmark": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@biomejs/biome": "1.8.3",
|
||||
"@changesets/changelog-github": "^0.5.0",
|
||||
"@changesets/cli": "^2.27.8",
|
||||
"@changesets/cli": "^2.27.9",
|
||||
"@types/node": "^18.17.8",
|
||||
"esbuild": "^0.21.5",
|
||||
"eslint": "^9.11.1",
|
||||
"eslint": "^9.12.0",
|
||||
"eslint-plugin-regexp": "^2.6.0",
|
||||
"globby": "^14.0.2",
|
||||
"only-allow": "^1.2.1",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"turbo": "^2.1.2",
|
||||
"turbo": "^2.1.3",
|
||||
"typescript": "~5.6.2",
|
||||
"typescript-eslint": "^8.7.0"
|
||||
"typescript-eslint": "^8.8.0"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
|
|
|
@ -365,6 +365,26 @@
|
|||
|
||||
- [#11974](https://github.com/withastro/astro/pull/11974) [`60211de`](https://github.com/withastro/astro/commit/60211defbfb2992ba17d1369e71c146d8928b09a) Thanks [@ascorbic](https://github.com/ascorbic)! - Exports the `RenderResult` type
|
||||
|
||||
## 4.15.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#12121](https://github.com/withastro/astro/pull/12121) [`2490ceb`](https://github.com/withastro/astro/commit/2490cebdb93f13ee552cffa72b2e274d64e6b4a7) Thanks [@ascorbic](https://github.com/ascorbic)! - Support passing the values `Infinity` and `-Infinity` as island props.
|
||||
|
||||
- [#12118](https://github.com/withastro/astro/pull/12118) [`f47b347`](https://github.com/withastro/astro/commit/f47b347da899c6e1dcd0b2e7887f7fce6ec8e270) Thanks [@Namchee](https://github.com/Namchee)! - Removes the `strip-ansi` dependency in favor of the native Node API
|
||||
|
||||
- [#12126](https://github.com/withastro/astro/pull/12126) [`6e1dfeb`](https://github.com/withastro/astro/commit/6e1dfeb76bec09d24928bab798c6ad3280f42e84) Thanks [@ascorbic](https://github.com/ascorbic)! - Clear content layer cache when astro version changes
|
||||
|
||||
- [#12117](https://github.com/withastro/astro/pull/12117) [`a46839a`](https://github.com/withastro/astro/commit/a46839a5c818b7de63c36d0c7e27f1a8f3b773dc) Thanks [@ArmandPhilippot](https://github.com/ArmandPhilippot)! - Updates Vite links to use their new domain
|
||||
|
||||
- [#12124](https://github.com/withastro/astro/pull/12124) [`499fbc9`](https://github.com/withastro/astro/commit/499fbc91a6bdad8c86ff13a8caf1fa09433796b9) Thanks [@ascorbic](https://github.com/ascorbic)! - Allows special characters in Action names
|
||||
|
||||
- [#12123](https://github.com/withastro/astro/pull/12123) [`b8673df`](https://github.com/withastro/astro/commit/b8673df51c6cc4ce6a288f8eb609b7a438a07d82) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fixes missing `body` property on CollectionEntry types for content layer entries
|
||||
|
||||
- [#12132](https://github.com/withastro/astro/pull/12132) [`de35daa`](https://github.com/withastro/astro/commit/de35daa8517555c1b9c72bc7fe9cc955c4997a83) Thanks [@jcayzac](https://github.com/jcayzac)! - Updates the [`cookie`](https://npmjs.com/package/cookie) dependency to avoid the [CVE 2024-47764](https://nvd.nist.gov/vuln/detail/CVE-2024-47764) vulnerability.
|
||||
|
||||
- [#12113](https://github.com/withastro/astro/pull/12113) [`a54e520`](https://github.com/withastro/astro/commit/a54e520d3c139fa123e7029c5933951b5c7f5a39) Thanks [@ascorbic](https://github.com/ascorbic)! - Adds a helpful error when attempting to render an undefined collection entry
|
||||
|
||||
## 4.15.11
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/db": "workspace:*",
|
||||
"@astrojs/node": "^8.3.4",
|
||||
"@astrojs/react": "workspace:*",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/db": "workspace:*",
|
||||
"@astrojs/node": "^8.3.4",
|
||||
"@astrojs/react": "workspace:*",
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@e2e/astro-linked-lib": "link:../_deps/astro-linked-lib",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"sass": "^1.79.4",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@
|
|||
"dependencies": {
|
||||
"@webcomponents/template-shadowroot": "^0.2.1",
|
||||
"lit": "^3.2.0",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "astro dev"
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10",
|
||||
"vue": "^3.5.11",
|
||||
"solid-js": "^1.9.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
"@astrojs/internal-helpers": "workspace:*",
|
||||
"@astrojs/markdown-remark": "workspace:*",
|
||||
"@astrojs/telemetry": "workspace:*",
|
||||
"@babel/types": "^7.25.6",
|
||||
"@babel/types": "^7.25.7",
|
||||
"@oslojs/encoding": "^1.1.0",
|
||||
"@rollup/pluginutils": "^5.1.2",
|
||||
"@types/cookie": "^0.6.0",
|
||||
|
@ -137,7 +137,7 @@
|
|||
"ci-info": "^4.0.0",
|
||||
"clsx": "^2.1.1",
|
||||
"common-ancestor-path": "^1.0.1",
|
||||
"cookie": "^0.6.0",
|
||||
"cookie": "^0.7.2",
|
||||
"cssesc": "^3.0.0",
|
||||
"debug": "^4.3.7",
|
||||
"deterministic-object-hash": "^2.0.2",
|
||||
|
@ -167,7 +167,7 @@
|
|||
"prompts": "^2.4.2",
|
||||
"rehype": "^13.0.2",
|
||||
"semver": "^7.6.3",
|
||||
"shiki": "^1.21.0",
|
||||
"shiki": "^1.22.0",
|
||||
"string-width": "^7.2.0",
|
||||
"tinyexec": "^0.3.0",
|
||||
"tsconfck": "^3.1.3",
|
||||
|
@ -187,7 +187,7 @@
|
|||
"sharp": "^0.33.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@playwright/test": "^1.47.2",
|
||||
"@types/aria-query": "^5.0.4",
|
||||
"@types/common-ancestor-path": "^1.0.2",
|
||||
|
@ -207,17 +207,17 @@
|
|||
"cheerio": "1.0.0",
|
||||
"eol": "^0.10.0",
|
||||
"execa": "^8.0.1",
|
||||
"expect-type": "^0.20.0",
|
||||
"expect-type": "^1.0.0",
|
||||
"mdast-util-mdx": "^3.0.0",
|
||||
"mdast-util-mdx-jsx": "^3.1.3",
|
||||
"memfs": "^4.12.0",
|
||||
"node-mocks-http": "^1.16.0",
|
||||
"node-mocks-http": "^1.16.1",
|
||||
"parse-srcset": "^1.0.2",
|
||||
"rehype-autolink-headings": "^7.1.0",
|
||||
"rehype-slug": "^6.0.0",
|
||||
"rehype-toc": "^3.0.2",
|
||||
"remark-code-titles": "^0.1.2",
|
||||
"rollup": "^4.22.5",
|
||||
"rollup": "^4.24.0",
|
||||
"sass": "^1.79.4",
|
||||
"undici": "^6.19.8",
|
||||
"unified": "^11.0.5",
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/react": "workspace:*",
|
||||
"@performance/utils": "workspace:*",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"@astrojs/markdoc": "workspace:*",
|
||||
"@astrojs/react": "workspace:*",
|
||||
"@performance/utils": "workspace:*",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/react": "workspace:*",
|
||||
"@performance/utils": "workspace:*",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -10,6 +10,6 @@
|
|||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,11 +9,11 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@test/component-library-shared": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"svelte": "^4.2.19"
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/markdoc": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
"@astrojs/svelte": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
"astro": "workspace:*"
|
||||
},
|
||||
"dependencies": {
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
"postcss": "^8.4.47",
|
||||
"solid-js": "^1.9.1",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"postcss-preset-env": "^10.0.5"
|
||||
"postcss-preset-env": "^10.0.6"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@test/react-lib": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@preact/signals": "1.3.0",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"dependencies": {
|
||||
"@astrojs/react": "workspace:*",
|
||||
"@test/ssr-prerender-chunks-test-adapter": "link:./deps/test-adapter",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/preact": "workspace:",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@astrojs/react": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1",
|
||||
"preact": "^10.24.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/preact": "workspace:*",
|
||||
"@test/static-build-pkg": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
"dependencies": {
|
||||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
"@astrojs/vue": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"svelte": "^4.2.19",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
# create-astro
|
||||
|
||||
## 4.9.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#12118](https://github.com/withastro/astro/pull/12118) [`f47b347`](https://github.com/withastro/astro/commit/f47b347da899c6e1dcd0b2e7887f7fce6ec8e270) Thanks [@Namchee](https://github.com/Namchee)! - Removes the `strip-ansi` dependency in favor of the native Node API
|
||||
|
||||
## 4.9.0
|
||||
|
||||
### Minor Changes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "create-astro",
|
||||
"version": "4.9.0",
|
||||
"version": "4.9.1",
|
||||
"type": "module",
|
||||
"author": "withastro",
|
||||
"license": "MIT",
|
||||
|
|
|
@ -24,6 +24,16 @@
|
|||
- Updated dependencies []:
|
||||
- @astrojs/studio@0.1.1
|
||||
|
||||
## 0.14.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#12118](https://github.com/withastro/astro/pull/12118) [`f47b347`](https://github.com/withastro/astro/commit/f47b347da899c6e1dcd0b2e7887f7fce6ec8e270) Thanks [@Namchee](https://github.com/Namchee)! - Removes the `strip-ansi` dependency in favor of the native Node API
|
||||
|
||||
- [#12089](https://github.com/withastro/astro/pull/12089) [`6e06e6e`](https://github.com/withastro/astro/commit/6e06e6ed4f1c983f842527d7e3561a45a4407777) Thanks [@Fryuni](https://github.com/Fryuni)! - Fixes initial schema push for local file and in-memory libSQL DB
|
||||
|
||||
- [#12089](https://github.com/withastro/astro/pull/12089) [`6e06e6e`](https://github.com/withastro/astro/commit/6e06e6ed4f1c983f842527d7e3561a45a4407777) Thanks [@Fryuni](https://github.com/Fryuni)! - Fixes relative local libSQL db URL
|
||||
|
||||
## 0.14.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { stripVTControlCharacters } from 'node:util';
|
||||
import { LibsqlError } from '@libsql/client';
|
||||
import deepDiff from 'deep-diff';
|
||||
import { sql } from 'drizzle-orm';
|
||||
import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core';
|
||||
|
@ -450,10 +451,22 @@ async function getDbCurrentSnapshot(
|
|||
);
|
||||
|
||||
return JSON.parse(res.snapshot);
|
||||
} catch (error: any) {
|
||||
if (error.code === 'SQLITE_UNKNOWN') {
|
||||
} catch (error) {
|
||||
// Don't handle errors that are not from libSQL
|
||||
if (
|
||||
error instanceof LibsqlError &&
|
||||
// If the schema was never pushed to the database yet the table won't exist.
|
||||
// Treat a missing snapshot table as an empty table.
|
||||
|
||||
// When connecting to a remote database in that condition
|
||||
// the query will fail with the following error code and message.
|
||||
((error.code === 'SQLITE_UNKNOWN' &&
|
||||
error.message === 'SQLITE_UNKNOWN: SQLite error: no such table: _astro_db_snapshot') ||
|
||||
// When connecting to a local or in-memory database that does not have a snapshot table yet
|
||||
// the query will fail with the following error code and message.
|
||||
(error.code === 'SQLITE_ERROR' &&
|
||||
error.message === 'SQLITE_ERROR: no such table: _astro_db_snapshot'))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -168,10 +168,14 @@ export function getStudioVirtualModContents({
|
|||
function dbUrlArg() {
|
||||
const dbStr = JSON.stringify(dbInfo.url);
|
||||
|
||||
// Allow overriding, mostly for testing
|
||||
return dbInfo.type === 'studio'
|
||||
? `import.meta.env.ASTRO_STUDIO_REMOTE_DB_URL ?? ${dbStr}`
|
||||
: `import.meta.env.ASTRO_DB_REMOTE_URL ?? ${dbStr}`;
|
||||
if (isBuild) {
|
||||
// Allow overriding, mostly for testing
|
||||
return dbInfo.type === 'studio'
|
||||
? `import.meta.env.ASTRO_STUDIO_REMOTE_DB_URL ?? ${dbStr}`
|
||||
: `import.meta.env.ASTRO_DB_REMOTE_URL ?? ${dbStr}`;
|
||||
} else {
|
||||
return dbStr;
|
||||
}
|
||||
}
|
||||
|
||||
return `
|
||||
|
|
|
@ -53,17 +53,38 @@ export function createRemoteDatabaseClient(options: RemoteDbClientOptions) {
|
|||
|
||||
return options.dbType === 'studio'
|
||||
? createStudioDatabaseClient(options.appToken, remoteUrl)
|
||||
: createRemoteLibSQLClient(options.appToken, remoteUrl);
|
||||
: createRemoteLibSQLClient(options.appToken, remoteUrl, options.remoteUrl.toString());
|
||||
}
|
||||
|
||||
function createRemoteLibSQLClient(appToken: string, remoteDbURL: URL) {
|
||||
function createRemoteLibSQLClient(appToken: string, remoteDbURL: URL, rawUrl: string) {
|
||||
const options: Partial<LibSQLConfig> = Object.fromEntries(remoteDbURL.searchParams.entries());
|
||||
remoteDbURL.search = '';
|
||||
|
||||
let url = remoteDbURL.toString();
|
||||
if (remoteDbURL.protocol === 'memory:') {
|
||||
// libSQL expects a special string in place of a URL
|
||||
// for in-memory DBs.
|
||||
url = ':memory:';
|
||||
} else if (
|
||||
remoteDbURL.protocol === 'file:' &&
|
||||
remoteDbURL.pathname.startsWith('/') &&
|
||||
!rawUrl.startsWith('file:/')
|
||||
) {
|
||||
// libSQL accepts relative and absolute file URLs
|
||||
// for local DBs. This doesn't match the URL specification.
|
||||
// Parsing `file:some.db` and `file:/some.db` should yield
|
||||
// the same result, but libSQL interprets the former as
|
||||
// a relative path, and the latter as an absolute path.
|
||||
// This detects when such a conversion happened during parsing
|
||||
// and undoes it so that the URL given to libSQL is the
|
||||
// same as given by the user.
|
||||
url = 'file:' + remoteDbURL.pathname.substring(1);
|
||||
}
|
||||
|
||||
const client = createClient({
|
||||
...options,
|
||||
authToken: appToken,
|
||||
url: remoteDbURL.protocol === 'memory:' ? ':memory:' : remoteDbURL.toString(),
|
||||
url,
|
||||
});
|
||||
return drizzleLibsql(client);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ describe('astro:db', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('development', () => {
|
||||
describe({ skip: process.platform === 'darwin' }, 'development', () => {
|
||||
let devServer;
|
||||
|
||||
before(async () => {
|
||||
|
@ -94,7 +94,7 @@ describe('astro:db', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('development --remote', () => {
|
||||
describe({ skip: process.platform === 'darwin' }, 'development --remote', () => {
|
||||
let devServer;
|
||||
let remoteDbServer;
|
||||
|
||||
|
|
10
packages/db/test/fixtures/libsql-remote/astro.config.ts
vendored
Normal file
10
packages/db/test/fixtures/libsql-remote/astro.config.ts
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import db from '@astrojs/db';
|
||||
import { defineConfig } from 'astro/config';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [db()],
|
||||
devToolbar: {
|
||||
enabled: false,
|
||||
},
|
||||
});
|
13
packages/db/test/fixtures/libsql-remote/db/config.ts
vendored
Normal file
13
packages/db/test/fixtures/libsql-remote/db/config.ts
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { column, defineDb, defineTable } from 'astro:db';
|
||||
|
||||
const User = defineTable({
|
||||
columns: {
|
||||
id: column.text({ primaryKey: true, optional: false }),
|
||||
username: column.text({ optional: false, unique: true }),
|
||||
password: column.text({ optional: false }),
|
||||
},
|
||||
});
|
||||
|
||||
export default defineDb({
|
||||
tables: { User },
|
||||
});
|
7
packages/db/test/fixtures/libsql-remote/db/seed.ts
vendored
Normal file
7
packages/db/test/fixtures/libsql-remote/db/seed.ts
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { User, db } from 'astro:db';
|
||||
|
||||
export default async function () {
|
||||
await db.batch([
|
||||
db.insert(User).values([{ id: 'mario', username: 'Mario', password: 'itsame' }]),
|
||||
]);
|
||||
}
|
14
packages/db/test/fixtures/libsql-remote/package.json
vendored
Normal file
14
packages/db/test/fixtures/libsql-remote/package.json
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "@test/db-libsql-remote",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/db": "workspace:*",
|
||||
"astro": "workspace:*"
|
||||
}
|
||||
}
|
11
packages/db/test/fixtures/libsql-remote/src/pages/index.astro
vendored
Normal file
11
packages/db/test/fixtures/libsql-remote/src/pages/index.astro
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
/// <reference path="../../.astro/db-types.d.ts" />
|
||||
import { User, db } from 'astro:db';
|
||||
|
||||
const users = await db.select().from(User);
|
||||
---
|
||||
|
||||
<h2>Users</h2>
|
||||
<ul class="users-list">
|
||||
{users.map((user) => <li>{user.name}</li>)}
|
||||
</ul>
|
|
@ -10,11 +10,11 @@
|
|||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/check": "^0.9.4",
|
||||
"@astrojs/db": "workspace:*",
|
||||
"@astrojs/node": "^8.3.4",
|
||||
"@astrojs/react": "^3.6.2",
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"open-props": "^1.7.6",
|
||||
|
|
77
packages/db/test/libsql-remote.test.js
Normal file
77
packages/db/test/libsql-remote.test.js
Normal file
|
@ -0,0 +1,77 @@
|
|||
import assert from 'node:assert/strict';
|
||||
import { rm } from 'node:fs/promises';
|
||||
import { relative } from 'node:path';
|
||||
import { after, before, describe, it } from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import testAdapter from '../../astro/test/test-adapter.js';
|
||||
import { loadFixture } from '../../astro/test/test-utils.js';
|
||||
import { clearEnvironment, initializeRemoteDb } from './test-utils.js';
|
||||
|
||||
describe('astro:db local database', () => {
|
||||
let fixture;
|
||||
before(async () => {
|
||||
fixture = await loadFixture({
|
||||
root: new URL('./fixtures/libsql-remote/', import.meta.url),
|
||||
output: 'server',
|
||||
adapter: testAdapter(),
|
||||
});
|
||||
});
|
||||
|
||||
describe('build --remote with local libSQL file (absolute path)', () => {
|
||||
before(async () => {
|
||||
clearEnvironment();
|
||||
|
||||
const absoluteFileUrl = new URL('./fixtures/libsql-remote/dist/absolute.db', import.meta.url);
|
||||
// Remove the file if it exists to avoid conflict between test runs
|
||||
await rm(absoluteFileUrl, { force: true });
|
||||
|
||||
process.env.ASTRO_INTERNAL_TEST_REMOTE = true;
|
||||
process.env.ASTRO_DB_REMOTE_URL = absoluteFileUrl.toString();
|
||||
await fixture.build();
|
||||
await initializeRemoteDb(fixture.config);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
delete process.env.ASTRO_INTERNAL_TEST_REMOTE;
|
||||
delete process.env.ASTRO_DB_REMOTE_URL;
|
||||
});
|
||||
|
||||
it('Can render page', async () => {
|
||||
const app = await fixture.loadTestAdapterApp();
|
||||
const request = new Request('http://example.com/');
|
||||
const response = await app.render(request);
|
||||
assert.equal(response.status, 200);
|
||||
});
|
||||
});
|
||||
|
||||
describe('build --remote with local libSQL file (relative path)', () => {
|
||||
before(async () => {
|
||||
clearEnvironment();
|
||||
|
||||
const absoluteFileUrl = new URL('./fixtures/libsql-remote/dist/relative.db', import.meta.url);
|
||||
const prodDbPath = relative(
|
||||
fileURLToPath(fixture.config.root),
|
||||
fileURLToPath(absoluteFileUrl),
|
||||
);
|
||||
// Remove the file if it exists to avoid conflict between test runs
|
||||
await rm(prodDbPath, { force: true });
|
||||
|
||||
process.env.ASTRO_INTERNAL_TEST_REMOTE = true;
|
||||
process.env.ASTRO_DB_REMOTE_URL = `file:${prodDbPath}`;
|
||||
await fixture.build();
|
||||
await initializeRemoteDb(fixture.config);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
delete process.env.ASTRO_INTERNAL_TEST_REMOTE;
|
||||
delete process.env.ASTRO_DB_REMOTE_URL;
|
||||
});
|
||||
|
||||
it('Can render page', async () => {
|
||||
const app = await fixture.loadTestAdapterApp();
|
||||
const request = new Request('http://example.com/');
|
||||
const response = await app.render(request);
|
||||
assert.equal(response.status, 200);
|
||||
});
|
||||
});
|
||||
});
|
|
@ -64,6 +64,23 @@ export async function setupRemoteDbServer(astroConfig) {
|
|||
};
|
||||
}
|
||||
|
||||
export async function initializeRemoteDb(astroConfig) {
|
||||
await cli({
|
||||
config: astroConfig,
|
||||
flags: {
|
||||
_: [undefined, 'astro', 'db', 'push'],
|
||||
remote: true,
|
||||
},
|
||||
});
|
||||
await cli({
|
||||
config: astroConfig,
|
||||
flags: {
|
||||
_: [undefined, 'astro', 'db', 'execute', 'db/seed.ts'],
|
||||
remote: true,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the environment variables related to Astro DB and Astro Studio.
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/markdoc": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
"remark-rehype": "^11.1.1",
|
||||
"remark-shiki-twoslash": "^3.1.3",
|
||||
"remark-toc": "^9.0.0",
|
||||
"shiki": "^1.21.0",
|
||||
"shiki": "^1.22.0",
|
||||
"unified": "^11.0.5",
|
||||
"vite": "6.0.0-beta.2"
|
||||
},
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
"@astrojs/mdx": "workspace:*",
|
||||
"@astrojs/preact": "workspace:*",
|
||||
"astro": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
"dev": "astro-scripts dev \"src/**/*.ts\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/plugin-transform-react-jsx": "^7.25.2",
|
||||
"@babel/plugin-transform-react-jsx-development": "^7.24.7",
|
||||
"@babel/plugin-transform-react-jsx": "^7.25.7",
|
||||
"@babel/plugin-transform-react-jsx-development": "^7.25.7",
|
||||
"@preact/preset-vite": "2.8.2",
|
||||
"@preact/signals": "^1.3.0",
|
||||
"babel-plugin-transform-hook-names": "^1.0.2",
|
||||
|
@ -45,7 +45,7 @@
|
|||
"devDependencies": {
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
"preact": "^10.24.1"
|
||||
"preact": "^10.24.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"preact": "^10.6.5"
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
"ultrahtml": "^1.5.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.10",
|
||||
"@types/react": "^18.3.11",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"astro": "workspace:*",
|
||||
"astro-scripts": "workspace:*",
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
"astro": "workspace:*",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"vue": "^3.5.10"
|
||||
"vue": "^3.5.11"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,12 @@
|
|||
- Updated dependencies [[`b6fbdaa`](https://github.com/withastro/astro/commit/b6fbdaa94a9ecec706a99e1938fbf5cd028c72e0), [`89bab1e`](https://github.com/withastro/astro/commit/89bab1e70786123fbe933a9d7a1b80c9334dcc5f), [`d74617c`](https://github.com/withastro/astro/commit/d74617cbd3278feba05909ec83db2d73d57a153e), [`e90f559`](https://github.com/withastro/astro/commit/e90f5593d23043579611452a84b9e18ad2407ef9), [`2df49a6`](https://github.com/withastro/astro/commit/2df49a6fb4f6d92fe45f7429430abe63defeacd6), [`8a53517`](https://github.com/withastro/astro/commit/8a5351737d6a14fc55f1dafad8f3b04079e81af6)]:
|
||||
- astro@5.0.0-alpha.0
|
||||
|
||||
## 5.7.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [#12129](https://github.com/withastro/astro/pull/12129) [`5bc6223`](https://github.com/withastro/astro/commit/5bc6223b1200baba9679a4dafea79c73486c275d) Thanks [@martrapp](https://github.com/martrapp)! - Fixes an Reference Error that occurred during client transitions
|
||||
|
||||
## 5.7.1
|
||||
|
||||
### Patch Changes
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue