summaryrefslogtreecommitdiff
path: root/packages/db
diff options
context:
space:
mode:
Diffstat (limited to 'packages/db')
-rw-r--r--packages/db/CHANGELOG.md15
-rw-r--r--packages/db/package.json2
-rw-r--r--packages/db/src/core/integration/index.ts15
-rw-r--r--packages/db/test/fixtures/ticketing-example/src/layouts/Layout.astro4
-rw-r--r--packages/db/test/fixtures/ticketing-example/tsconfig.json4
-rw-r--r--packages/db/test/local-prod.test.js2
6 files changed, 28 insertions, 14 deletions
diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md
index ad11ec028..204280e7e 100644
--- a/packages/db/CHANGELOG.md
+++ b/packages/db/CHANGELOG.md
@@ -1,5 +1,20 @@
# @astrojs/db
+## 0.14.0-beta.1
+
+### Minor Changes
+
+- [#12008](https://github.com/withastro/astro/pull/12008) [`5608338`](https://github.com/withastro/astro/commit/560833843c6d3ce2b6c6c473ec4ae70e744bf255) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Welcome to the Astro 5 beta! This release has no changes from the latest alpha of this package, but it does bring us one step closer to the final, stable release.
+
+ Starting from this release, no breaking changes will be introduced unless absolutely necessary.
+
+ To learn how to upgrade, check out the [Astro v5.0 upgrade guide in our beta docs site](https://5-0-0-beta.docs.astro.build/en/guides/upgrade-to/v5/).
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @astrojs/studio@0.1.1
+
## 0.14.1
### Patch Changes
diff --git a/packages/db/package.json b/packages/db/package.json
index d9f6b406c..edef3f37c 100644
--- a/packages/db/package.json
+++ b/packages/db/package.json
@@ -1,6 +1,6 @@
{
"name": "@astrojs/db",
- "version": "0.14.1",
+ "version": "0.14.0-beta.1",
"description": "Add libSQL and Astro Studio support to your Astro site",
"license": "MIT",
"repository": {
diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts
index 2a5824c35..b51f98661 100644
--- a/packages/db/src/core/integration/index.ts
+++ b/packages/db/src/core/integration/index.ts
@@ -4,7 +4,7 @@ import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import type { ManagedAppToken } from '@astrojs/studio';
import { LibsqlError } from '@libsql/client';
-import type { AstroConfig, AstroIntegration } from 'astro';
+import type { AstroIntegration } from 'astro';
import { blue, yellow } from 'kleur/colors';
import {
type HMRPayload,
@@ -59,14 +59,13 @@ function astroDBIntegration(): AstroIntegration {
};
let command: 'dev' | 'build' | 'preview' | 'sync';
- let output: AstroConfig['output'] = 'server';
+ let finalBuildOutput: string;
return {
name: 'astro:db',
hooks: {
'astro:config:setup': async ({ updateConfig, config, command: _command, logger }) => {
command = _command;
root = config.root;
- output = config.output;
if (command === 'preview') return;
@@ -105,9 +104,11 @@ function astroDBIntegration(): AstroIntegration {
},
});
},
- 'astro:config:done': async ({ config, injectTypes }) => {
+ 'astro:config:done': async ({ config, injectTypes, buildOutput }) => {
if (command === 'preview') return;
+ finalBuildOutput = buildOutput;
+
// TODO: refine where we load tables
// @matthewp: may want to load tables by path at runtime
const { dbConfig, dependencies, integrationSeedPaths } = await resolveDbConfig(config);
@@ -159,11 +160,7 @@ function astroDBIntegration(): AstroIntegration {
}, 100);
},
'astro:build:start': async ({ logger }) => {
- if (
- !connectToRemote &&
- !databaseFileEnvDefined() &&
- (output === 'server' || output === 'hybrid')
- ) {
+ if (!connectToRemote && !databaseFileEnvDefined() && finalBuildOutput === 'server') {
const message = `Attempting to build without the --remote flag or the ASTRO_DATABASE_FILE environment variable defined. You probably want to pass --remote to astro build.`;
const hint =
'Learn more connecting to Studio: https://docs.astro.build/en/guides/astro-db/#connect-to-astro-studio';
diff --git a/packages/db/test/fixtures/ticketing-example/src/layouts/Layout.astro b/packages/db/test/fixtures/ticketing-example/src/layouts/Layout.astro
index 114216824..482f10462 100644
--- a/packages/db/test/fixtures/ticketing-example/src/layouts/Layout.astro
+++ b/packages/db/test/fixtures/ticketing-example/src/layouts/Layout.astro
@@ -1,5 +1,5 @@
---
-import { ViewTransitions } from 'astro:transitions';
+import { ClientRouter } from 'astro:transitions';
import 'open-props/normalize';
import 'open-props/style';
@@ -19,7 +19,7 @@ const { title } = Astro.props;
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="generator" content={Astro.generator} />
<title>{title}</title>
- <ViewTransitions handleForms />
+ <ClientRouter handleForms />
</head>
<body>
<slot />
diff --git a/packages/db/test/fixtures/ticketing-example/tsconfig.json b/packages/db/test/fixtures/ticketing-example/tsconfig.json
index b7243b92c..2424dae7d 100644
--- a/packages/db/test/fixtures/ticketing-example/tsconfig.json
+++ b/packages/db/test/fixtures/ticketing-example/tsconfig.json
@@ -3,5 +3,7 @@
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react"
- }
+ },
+ "include": [".astro/types.d.ts", "**/*"],
+ "exclude": ["dist"]
}
diff --git a/packages/db/test/local-prod.test.js b/packages/db/test/local-prod.test.js
index 6513aeb08..9bd56dad0 100644
--- a/packages/db/test/local-prod.test.js
+++ b/packages/db/test/local-prod.test.js
@@ -71,7 +71,7 @@ describe('astro:db local database', () => {
it('should throw during the build for hybrid output', async () => {
let fixture2 = await loadFixture({
root: new URL('./fixtures/local-prod/', import.meta.url),
- output: 'hybrid',
+ output: 'static',
adapter: testAdapter(),
});