0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-02-03 22:29:08 -05:00

Merge branch 'main' into fix-all-pages-key

This commit is contained in:
Goulven CLEC'H 2024-04-27 11:52:53 +02:00 committed by GitHub
commit cfec229091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 54 additions and 34 deletions

View file

@ -0,0 +1,7 @@
---
"@astrojs/db": patch
---
Improves the typing of the `asDrizzleTable()` utility
Fixes a type error when passing the output of `defineTable()` to the utility and returns a more detailed type inferred from the columns of the passed table config.

View file

@ -11,5 +11,5 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = false
[{.*,*.md,*.json,*.toml,*.yml,}]
[{.*,*.md,*.json,*.toml,*.yml,*.json5}]
indent_style = space

View file

@ -4,7 +4,8 @@
"config:recommended",
"schedule:weekly",
"group:allNonMajor",
":disablePeerDependencies",
":disablePeerDependencies",
"regexManagers:biomeVersions"
],
"labels": ["dependencies"],
"rangeStrategy": "bump",

View file

@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.4/schema.json",
"$schema": "https://biomejs.dev/schemas/1.7.1/schema.json",
"files": {
"ignore": [
"vendor",

View file

@ -53,7 +53,7 @@
},
"devDependencies": {
"@astrojs/check": "^0.5.10",
"@biomejs/biome": "1.6.4",
"@biomejs/biome": "1.7.1",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@eslint/eslintrc": "^3.0.2",

View file

@ -8,7 +8,7 @@ import {
sqliteTable,
text,
} from 'drizzle-orm/sqlite-core';
import { type DBColumn, type DBTable } from '../core/types.js';
import type { DBColumn, DBTable } from '../core/types.js';
import { type SerializedSQL, isSerializedSQL } from './types.js';
import { pathToFileURL } from './utils.js';

View file

@ -1,2 +1,14 @@
export { defineDbIntegration } from './core/utils.js';
export { asDrizzleTable } from './runtime/index.js';
import { tableSchema } from './core/schemas.js';
import type { ColumnsConfig, TableConfig } from './core/types.js';
import { type Table, asDrizzleTable as internal_asDrizzleTable } from './runtime/index.js';
export function asDrizzleTable<
TableName extends string = string,
TColumns extends ColumnsConfig = ColumnsConfig,
>(name: TableName, tableConfig: TableConfig<TColumns>) {
return internal_asDrizzleTable(name, tableSchema.parse(tableConfig)) as Table<
TableName,
TColumns
>;
}

56
pnpm-lock.yaml generated
View file

@ -22,8 +22,8 @@ importers:
specifier: ^0.5.10
version: 0.5.10(prettier-plugin-astro@0.13.0)(prettier@3.2.5)(typescript@5.4.5)
'@biomejs/biome':
specifier: 1.6.4
version: 1.6.4
specifier: 1.7.1
version: 1.7.1
'@changesets/changelog-github':
specifier: ^0.5.0
version: 0.5.0
@ -6052,24 +6052,24 @@ packages:
'@babel/helper-validator-identifier': 7.22.20
to-fast-properties: 2.0.0
/@biomejs/biome@1.6.4:
resolution: {integrity: sha512-3groVd2oWsLC0ZU+XXgHSNbq31lUcOCBkCcA7sAQGBopHcmL+jmmdoWlY3S61zIh+f2mqQTQte1g6PZKb3JJjA==}
/@biomejs/biome@1.7.1:
resolution: {integrity: sha512-wb2UNoFXcgaMdKXKT5ytsYntaogl2FSTjDt20CZynF3v7OXQUcIpTrr+be3XoOGpoZRj3Ytq9TSpmplUREXmeA==}
engines: {node: '>=14.21.3'}
hasBin: true
requiresBuild: true
optionalDependencies:
'@biomejs/cli-darwin-arm64': 1.6.4
'@biomejs/cli-darwin-x64': 1.6.4
'@biomejs/cli-linux-arm64': 1.6.4
'@biomejs/cli-linux-arm64-musl': 1.6.4
'@biomejs/cli-linux-x64': 1.6.4
'@biomejs/cli-linux-x64-musl': 1.6.4
'@biomejs/cli-win32-arm64': 1.6.4
'@biomejs/cli-win32-x64': 1.6.4
'@biomejs/cli-darwin-arm64': 1.7.1
'@biomejs/cli-darwin-x64': 1.7.1
'@biomejs/cli-linux-arm64': 1.7.1
'@biomejs/cli-linux-arm64-musl': 1.7.1
'@biomejs/cli-linux-x64': 1.7.1
'@biomejs/cli-linux-x64-musl': 1.7.1
'@biomejs/cli-win32-arm64': 1.7.1
'@biomejs/cli-win32-x64': 1.7.1
dev: true
/@biomejs/cli-darwin-arm64@1.6.4:
resolution: {integrity: sha512-2WZef8byI9NRzGajGj5RTrroW9BxtfbP9etigW1QGAtwu/6+cLkdPOWRAs7uFtaxBNiKFYA8j/BxV5zeAo5QOQ==}
/@biomejs/cli-darwin-arm64@1.7.1:
resolution: {integrity: sha512-qfLrIIB58dkgiY/1tgG6fSCBK22PZaSIf6blweZBsG6iMij05mEuJt50ne+zPnNFNUmt8t43NC/qOXT3iFHQBA==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [darwin]
@ -6077,8 +6077,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-darwin-x64@1.6.4:
resolution: {integrity: sha512-uo1zgM7jvzcoDpF6dbGizejDLCqNpUIRkCj/oEK0PB0NUw8re/cn1EnxuOLZqDpn+8G75COLQTOx8UQIBBN/Kg==}
/@biomejs/cli-darwin-x64@1.7.1:
resolution: {integrity: sha512-OGeyNsEcp5VnKbF9/TBjPCTHNEOm7oHegEve07U3KZmzqfpw2Oe3i9DVW8t6vvj1TYbrwWYCld25H34kBDY7Vg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [darwin]
@ -6086,8 +6086,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-linux-arm64-musl@1.6.4:
resolution: {integrity: sha512-Hp8Jwt6rjj0wCcYAEN6/cfwrrPLLlGOXZ56Lei4Pt4jy39+UuPeAVFPeclrrCfxyL1wQ2xPrhd/saTHSL6DoJg==}
/@biomejs/cli-linux-arm64-musl@1.7.1:
resolution: {integrity: sha512-giH0/CzLOJ+wbxLxd5Shnr5xQf5fGnTRWLDe3lzjaF7IplVydNCEeZJtncB01SvyA6DAFJsvQ4LNxzAOQfEVCg==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
@ -6095,8 +6095,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-linux-arm64@1.6.4:
resolution: {integrity: sha512-wAOieaMNIpLrxGc2/xNvM//CIZg7ueWy3V5A4T7gDZ3OL/Go27EKE59a+vMKsBCYmTt7jFl4yHz0TUkUbodA/w==}
/@biomejs/cli-linux-arm64@1.7.1:
resolution: {integrity: sha512-MQDf5wErj1iBvlcxCyOa0XqZYN8WJrupVgbNnqhntO3yVATg8GxduVUn1fDSaolznkDRsj7Pz3Xu1esBFwvfmg==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
@ -6104,8 +6104,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-linux-x64-musl@1.6.4:
resolution: {integrity: sha512-wqi0hr8KAx5kBO0B+m5u8QqiYFFBJOSJVSuRqTeGWW+GYLVUtXNidykNqf1JsW6jJDpbkSp2xHKE/bTlVaG2Kg==}
/@biomejs/cli-linux-x64-musl@1.7.1:
resolution: {integrity: sha512-ySNDtPhsLxU125IFHHAxfpoHBpkM56s4mEXeO70GZtgZay/o1h8IUPWCWf5Z7gKgc4jwgYN1U1U9xabI3hZVAg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
@ -6113,8 +6113,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-linux-x64@1.6.4:
resolution: {integrity: sha512-qTWhuIw+/ePvOkjE9Zxf5OqSCYxtAvcTJtVmZT8YQnmY2I62JKNV2m7tf6O5ViKZUOP0mOQ6NgqHKcHH1eT8jw==}
/@biomejs/cli-linux-x64@1.7.1:
resolution: {integrity: sha512-3wmCsGcC3KZ4pfTknXHfyMMlXPMhgfXVAcG5GlrR+Tq2JGiAw0EUydaLpsSBEbcG7IxH6OiUZEJZ95kAycCHBA==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
@ -6122,8 +6122,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-win32-arm64@1.6.4:
resolution: {integrity: sha512-Wp3FiEeF6v6C5qMfLkHwf4YsoNHr/n0efvoC8jCKO/kX05OXaVExj+1uVQ1eGT7Pvx0XVm/TLprRO0vq/V6UzA==}
/@biomejs/cli-win32-arm64@1.7.1:
resolution: {integrity: sha512-8hIDakEqZn0i6+388noYKdZ0ZrovTwnvMU/Qp/oJou0G7EPVdXupOe0oxiQSdRN0W7f6CS/yjPCYuVGzDG6r0g==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [win32]
@ -6131,8 +6131,8 @@ packages:
dev: true
optional: true
/@biomejs/cli-win32-x64@1.6.4:
resolution: {integrity: sha512-mz183Di5hTSGP7KjNWEhivcP1wnHLGmOxEROvoFsIxMYtDhzJDad4k5gI/1JbmA0xe4n52vsgqo09tBhrMT/Zg==}
/@biomejs/cli-win32-x64@1.7.1:
resolution: {integrity: sha512-3W9k3uH6Ea6VOpAS9xkkAlS0LTfnGQjmIUCegZ8SDtK2NgJ1gO+qdEkGJb0ltahusFTN1QxJ107dM7ASA9IUEg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [win32]