From 9c368e45b1d36398fc960d02e192090cc3ecb110 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Wed, 26 Jul 2023 09:07:09 +0100 Subject: [PATCH] address feedback --- .changeset/odd-books-live.md | 23 +++ packages/astro/src/@types/astro.ts | 139 ++++++++---------- packages/astro/src/core/logger/core.ts | 2 +- packages/astro/src/integrations/index.ts | 114 +++++++-------- pnpm-lock.yaml | 177 +++++++++++++---------- 5 files changed, 240 insertions(+), 215 deletions(-) create mode 100644 .changeset/odd-books-live.md diff --git a/.changeset/odd-books-live.md b/.changeset/odd-books-live.md new file mode 100644 index 0000000000000..40f0d7c1762a2 --- /dev/null +++ b/.changeset/odd-books-live.md @@ -0,0 +1,23 @@ +--- +'astro': minor +--- + +Integrations can now log messages using Astro’s built-in logger. + +The logger is available to all hooks as an additional parameter: + +```ts +import {AstroIntegration} from "./astro"; + +// integration.js +export function myIntegration(): AstroIntegration { + return { + name: "my-integration", + hooks: { + "astro:config:done": ({ logger }) => { + logger.info("Configure integration..."); + } + } + } +} +``` diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 4d74125e89478..b59a57a264298 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -1857,87 +1857,70 @@ export interface AstroIntegration { name: string; /** The different hooks available to extend. */ hooks: { - 'astro:config:setup'?: ( - options: { - config: AstroConfig; - command: 'dev' | 'build' | 'preview'; - isRestart: boolean; - updateConfig: (newConfig: Record) => void; - addRenderer: (renderer: AstroRenderer) => void; - addWatchFile: (path: URL | string) => void; - injectScript: (stage: InjectedScriptStage, content: string) => void; - injectRoute: (injectRoute: InjectedRoute) => void; - addClientDirective: (directive: ClientDirectiveConfig) => void; - // TODO: Add support for `injectElement()` for full HTML element injection, not just scripts. - // This may require some refactoring of `scripts`, `styles`, and `links` into something - // more generalized. Consider the SSR use-case as well. - // injectElement: (stage: vite.HtmlTagDescriptor, element: string) => void; - }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:config:done'?: ( - options: { - config: AstroConfig; - setAdapter: (adapter: AstroAdapter) => void; - }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:server:setup'?: ( - options: { server: vite.ViteDevServer }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:server:start'?: ( - options: { address: AddressInfo }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:server:done'?: (bag: AstroIntegrationBag) => void | Promise; - 'astro:build:ssr'?: ( - options: { - manifest: SerializedSSRManifest; - /** - * This maps a {@link RouteData} to an {@link URL}, this URL represents - * the physical file you should import. - */ - entryPoints: Map; - /** - * File path of the emitted middleware - */ - middlewareEntryPoint: URL | undefined; - }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:build:start'?: (bag: AstroIntegrationBag) => void | Promise; - 'astro:build:setup'?: ( - options: { - vite: vite.InlineConfig; - pages: Map; - target: 'client' | 'server'; - updateConfig: (newConfig: vite.InlineConfig) => void; - }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:build:generated'?: ( - options: { dir: URL }, - bag: AstroIntegrationBag - ) => void | Promise; - 'astro:build:done'?: ( - options: { - pages: { pathname: string }[]; - dir: URL; - routes: RouteData[]; - }, - bag: AstroIntegrationBag - ) => void | Promise; + 'astro:config:setup'?: (options: { + config: AstroConfig; + command: 'dev' | 'build' | 'preview'; + isRestart: boolean; + updateConfig: (newConfig: Record) => void; + addRenderer: (renderer: AstroRenderer) => void; + addWatchFile: (path: URL | string) => void; + injectScript: (stage: InjectedScriptStage, content: string) => void; + injectRoute: (injectRoute: InjectedRoute) => void; + addClientDirective: (directive: ClientDirectiveConfig) => void; + logger: AstroIntegrationLogger; + // TODO: Add support for `injectElement()` for full HTML element injection, not just scripts. + // This may require some refactoring of `scripts`, `styles`, and `links` into something + // more generalized. Consider the SSR use-case as well. + // injectElement: (stage: vite.HtmlTagDescriptor, element: string) => void; + }) => void | Promise; + 'astro:config:done'?: (options: { + config: AstroConfig; + setAdapter: (adapter: AstroAdapter) => void; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:server:setup'?: (options: { + server: vite.ViteDevServer; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:server:start'?: (options: { + address: AddressInfo; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:server:done'?: (options: { logger: AstroIntegrationLogger }) => void | Promise; + 'astro:build:ssr'?: (options: { + manifest: SerializedSSRManifest; + /** + * This maps a {@link RouteData} to an {@link URL}, this URL represents + * the physical file you should import. + */ + entryPoints: Map; + /** + * File path of the emitted middleware + */ + middlewareEntryPoint: URL | undefined; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:build:start'?: (options: { logger: AstroIntegrationLogger }) => void | Promise; + 'astro:build:setup'?: (options: { + vite: vite.InlineConfig; + pages: Map; + target: 'client' | 'server'; + updateConfig: (newConfig: vite.InlineConfig) => void; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:build:generated'?: (options: { + dir: URL; + logger: AstroIntegrationLogger; + }) => void | Promise; + 'astro:build:done'?: (options: { + pages: { pathname: string }[]; + dir: URL; + routes: RouteData[]; + logger: AstroIntegrationLogger; + }) => void | Promise; }; } -/** - * A set of utilities that are passed at each hook - */ -export type AstroIntegrationBag = { - logger: AstroIntegrationLogger; -}; - export type MiddlewareNext = () => Promise; export type MiddlewareHandler = ( context: APIContext, diff --git a/packages/astro/src/core/logger/core.ts b/packages/astro/src/core/logger/core.ts index 3395b8d1a4392..e5d0aee1f0c57 100644 --- a/packages/astro/src/core/logger/core.ts +++ b/packages/astro/src/core/logger/core.ts @@ -157,7 +157,7 @@ export class AstroIntegrationLogger { } /** - * Creates a new logger instances with a new label, but the same log options. + * Creates a new logger instance with a new label, but the same log options. */ fork(label: string): AstroIntegrationLogger { return new AstroIntegrationLogger(this.options, label); diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index c948959483732..d54ac38037c8a 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -5,6 +5,7 @@ import { fileURLToPath } from 'node:url'; import type { InlineConfig, ViteDevServer } from 'vite'; import type { AstroConfig, + AstroIntegration, AstroRenderer, AstroSettings, ContentEntryType, @@ -38,16 +39,16 @@ async function withTakingALongTimeMsg({ return result; } -// Internally used to store instances of loggers. -const Loggers = new Map(); +// Used internally to store instances of loggers. +const Loggers = new WeakMap(); -function getLogger(adapterName: string, logging: LogOptions) { - if (Loggers.has(adapterName)) { +function getLogger(integration: AstroIntegration, logging: LogOptions) { + if (Loggers.has(integration)) { // SAFETY: we check the existence in the if block - return Loggers.get(adapterName)!; + return Loggers.get(integration)!; } - const logger = new AstroIntegrationLogger(logging, adapterName); - Loggers.set(adapterName, logger); + const logger = new AstroIntegrationLogger(logging, integration.name); + Loggers.set(integration, logger); return logger; } @@ -85,7 +86,7 @@ export async function runHookConfigSetup({ * ``` */ if (integration.hooks?.['astro:config:setup']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); const hooks: HookParameters<'astro:config:setup'> = { config: updatedConfig, @@ -122,6 +123,7 @@ export async function runHookConfigSetup({ } addedClientDirectives.set(name, buildClientDirectiveEntrypoint(name, entrypoint)); }, + logger, }; // --- @@ -159,7 +161,7 @@ export async function runHookConfigSetup({ await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:config:setup'](hooks, { logger }), + hookResult: integration.hooks['astro:config:setup'](hooks), logging, }); @@ -182,24 +184,22 @@ export async function runHookConfigDone({ logging: LogOptions; }) { for (const integration of settings.config.integrations) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); if (integration?.hooks?.['astro:config:done']) { await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:config:done']( - { - config: settings.config, - setAdapter(adapter) { - if (settings.adapter && settings.adapter.name !== adapter.name) { - throw new Error( - `Integration "${integration.name}" conflicts with "${settings.adapter.name}". You can only configure one deployment integration.` - ); - } - settings.adapter = adapter; - }, + hookResult: integration.hooks['astro:config:done']({ + config: settings.config, + setAdapter(adapter) { + if (settings.adapter && settings.adapter.name !== adapter.name) { + throw new Error( + `Integration "${integration.name}" conflicts with "${settings.adapter.name}". You can only configure one deployment integration.` + ); + } + settings.adapter = adapter; }, - { logger } - ), + logger, + }), logging, }); } @@ -217,10 +217,10 @@ export async function runHookServerSetup({ }) { for (const integration of config.integrations) { if (integration?.hooks?.['astro:server:setup']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:server:setup']({ server }, { logger }), + hookResult: integration.hooks['astro:server:setup']({ server, logger }), logging, }); } @@ -237,12 +237,12 @@ export async function runHookServerStart({ logging: LogOptions; }) { for (const integration of config.integrations) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); if (integration?.hooks?.['astro:server:start']) { await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:server:start']({ address }, { logger }), + hookResult: integration.hooks['astro:server:start']({ address, logger }), logging, }); } @@ -257,7 +257,7 @@ export async function runHookServerDone({ logging: LogOptions; }) { for (const integration of config.integrations) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); if (integration?.hooks?.['astro:server:done']) { await withTakingALongTimeMsg({ @@ -278,7 +278,7 @@ export async function runHookBuildStart({ }) { for (const integration of config.integrations) { if (integration?.hooks?.['astro:build:start']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); await withTakingALongTimeMsg({ name: integration.name, @@ -306,21 +306,19 @@ export async function runHookBuildSetup({ for (const integration of config.integrations) { if (integration?.hooks?.['astro:build:setup']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:build:setup']( - { - vite, - pages, - target, - updateConfig: (newConfig) => { - updatedConfig = mergeConfig(updatedConfig, newConfig); - }, + hookResult: integration.hooks['astro:build:setup']({ + vite, + pages, + target, + updateConfig: (newConfig) => { + updatedConfig = mergeConfig(updatedConfig, newConfig); }, - { logger } - ), + logger, + }), logging, }); } @@ -346,18 +344,16 @@ export async function runHookBuildSsr({ }: RunHookBuildSsr) { for (const integration of config.integrations) { if (integration?.hooks?.['astro:build:ssr']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:build:ssr']( - { - manifest, - entryPoints, - middlewareEntryPoint, - }, - { logger } - ), + hookResult: integration.hooks['astro:build:ssr']({ + manifest, + entryPoints, + middlewareEntryPoint, + logger, + }), logging, }); } @@ -374,12 +370,12 @@ export async function runHookBuildGenerated({ const dir = isServerLikeOutput(config) ? config.build.client : config.outDir; for (const integration of config.integrations) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); if (integration?.hooks?.['astro:build:generated']) { await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:build:generated']({ dir }, { logger }), + hookResult: integration.hooks['astro:build:generated']({ dir, logger }), logging, }); } @@ -399,18 +395,16 @@ export async function runHookBuildDone({ config, pages, routes, logging }: RunHo for (const integration of config.integrations) { if (integration?.hooks?.['astro:build:done']) { - const logger = getLogger(integration.name, logging); + const logger = getLogger(integration, logging); await withTakingALongTimeMsg({ name: integration.name, - hookResult: integration.hooks['astro:build:done']( - { - pages: pages.map((p) => ({ pathname: p })), - dir, - routes, - }, - { logger } - ), + hookResult: integration.hooks['astro:build:done']({ + pages: pages.map((p) => ({ pathname: p })), + dir, + routes, + logger, + }), logging, }); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0657a76cb26bf..ef440221ebbec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,13 +32,13 @@ importers: version: 18.16.18 '@typescript-eslint/eslint-plugin': specifier: 6.0.0 - version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.0.2) + version: 6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.1.6) '@typescript-eslint/parser': specifier: 6.0.0 - version: 6.0.0(eslint@8.43.0)(typescript@5.0.2) + version: 6.0.0(eslint@8.43.0)(typescript@5.1.6) esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 eslint: specifier: ^8.43.0 version: 8.43.0 @@ -70,8 +70,8 @@ importers: specifier: ^1.10.3 version: 1.10.3 typescript: - specifier: ~5.0.2 - version: 5.0.2 + specifier: ~5.1.6 + version: 5.1.6 benchmark: dependencies: @@ -564,11 +564,11 @@ importers: specifier: ^1.3.0 version: 1.3.0 esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 estree-walker: - specifier: 3.0.0 - version: 3.0.0 + specifier: ^3.0.3 + version: 3.0.3 execa: specifier: ^6.1.0 version: 6.1.0 @@ -3645,8 +3645,8 @@ importers: specifier: ^4.20230518.0 version: 4.20230518.0 esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 tiny-glob: specifier: ^0.2.9 version: 0.2.9 @@ -4021,8 +4021,8 @@ importers: specifier: ^0.3.0 version: 0.3.0 esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 github-slugger: specifier: ^2.0.0 version: 2.0.0 @@ -4301,7 +4301,7 @@ importers: version: 10.1.0 remark-shiki-twoslash: specifier: ^3.1.3 - version: 3.1.3(typescript@5.0.2) + version: 3.1.3(typescript@5.1.6) remark-toc: specifier: ^8.0.1 version: 8.0.1 @@ -4450,8 +4450,8 @@ importers: specifier: ^1.6.0 version: 1.6.0 esbuild: - specifier: ^0.15.18 - version: 0.15.18 + specifier: ^0.18.16 + version: 0.18.16 devDependencies: '@netlify/edge-functions': specifier: ^2.0.0 @@ -4864,7 +4864,7 @@ importers: version: 2.4.2(svelte@3.59.1)(vite@4.4.6) svelte2tsx: specifier: ^0.6.15 - version: 0.6.15(svelte@3.59.1)(typescript@5.0.2) + version: 0.6.15(svelte@3.59.1)(typescript@5.1.6) devDependencies: astro: specifier: workspace:* @@ -4932,8 +4932,8 @@ importers: specifier: ^0.22.6 version: 0.22.6 esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 fast-glob: specifier: ^3.2.12 version: 3.2.12 @@ -5409,7 +5409,7 @@ importers: version: 13.3.0(rollup@2.79.1) '@rollup/plugin-typescript': specifier: ^8.5.0 - version: 8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@5.0.2) + version: 8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@5.1.6) '@types/chai': specifier: ^4.3.5 version: 4.3.5 @@ -5441,8 +5441,8 @@ importers: specifier: ^2.5.3 version: 2.5.3 typescript: - specifier: ~5.0.2 - version: 5.0.2 + specifier: ~5.1.6 + version: 5.1.6 urlpattern-polyfill: specifier: ^1.0.0-rc5 version: 1.0.0-rc5 @@ -5456,8 +5456,8 @@ importers: specifier: ^5.0.2 version: 5.0.2 esbuild: - specifier: ^0.17.19 - version: 0.17.19 + specifier: ^0.18.16 + version: 0.18.16 globby: specifier: ^12.2.0 version: 12.2.0 @@ -5482,7 +5482,7 @@ importers: version: 7.0.0 esbuild-plugin-copy: specifier: ^2.1.1 - version: 2.1.1(esbuild@0.17.19) + version: 2.1.1(esbuild@0.18.16) execa: specifier: ^6.1.0 version: 6.1.0 @@ -7553,6 +7553,7 @@ packages: cpu: [arm64] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-arm64@0.18.16: @@ -7578,6 +7579,7 @@ packages: cpu: [arm] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-arm@0.18.16: @@ -7594,6 +7596,7 @@ packages: cpu: [x64] os: [android] requiresBuild: true + dev: false optional: true /@esbuild/android-x64@0.18.16: @@ -7610,6 +7613,7 @@ packages: cpu: [arm64] os: [darwin] requiresBuild: true + dev: false optional: true /@esbuild/darwin-arm64@0.18.16: @@ -7626,6 +7630,7 @@ packages: cpu: [x64] os: [darwin] requiresBuild: true + dev: false optional: true /@esbuild/darwin-x64@0.18.16: @@ -7642,6 +7647,7 @@ packages: cpu: [arm64] os: [freebsd] requiresBuild: true + dev: false optional: true /@esbuild/freebsd-arm64@0.18.16: @@ -7658,6 +7664,7 @@ packages: cpu: [x64] os: [freebsd] requiresBuild: true + dev: false optional: true /@esbuild/freebsd-x64@0.18.16: @@ -7674,6 +7681,7 @@ packages: cpu: [arm64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-arm64@0.18.16: @@ -7690,6 +7698,7 @@ packages: cpu: [arm] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-arm@0.18.16: @@ -7706,6 +7715,7 @@ packages: cpu: [ia32] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-ia32@0.18.16: @@ -7731,6 +7741,7 @@ packages: cpu: [loong64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-loong64@0.18.16: @@ -7747,6 +7758,7 @@ packages: cpu: [mips64el] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-mips64el@0.18.16: @@ -7763,6 +7775,7 @@ packages: cpu: [ppc64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-ppc64@0.18.16: @@ -7779,6 +7792,7 @@ packages: cpu: [riscv64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-riscv64@0.18.16: @@ -7795,6 +7809,7 @@ packages: cpu: [s390x] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-s390x@0.18.16: @@ -7811,6 +7826,7 @@ packages: cpu: [x64] os: [linux] requiresBuild: true + dev: false optional: true /@esbuild/linux-x64@0.18.16: @@ -7827,6 +7843,7 @@ packages: cpu: [x64] os: [netbsd] requiresBuild: true + dev: false optional: true /@esbuild/netbsd-x64@0.18.16: @@ -7843,6 +7860,7 @@ packages: cpu: [x64] os: [openbsd] requiresBuild: true + dev: false optional: true /@esbuild/openbsd-x64@0.18.16: @@ -7859,6 +7877,7 @@ packages: cpu: [x64] os: [sunos] requiresBuild: true + dev: false optional: true /@esbuild/sunos-x64@0.18.16: @@ -7875,6 +7894,7 @@ packages: cpu: [arm64] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-arm64@0.18.16: @@ -7891,6 +7911,7 @@ packages: cpu: [ia32] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-ia32@0.18.16: @@ -7907,6 +7928,7 @@ packages: cpu: [x64] os: [win32] requiresBuild: true + dev: false optional: true /@esbuild/win32-x64@0.18.16: @@ -8119,7 +8141,7 @@ packages: estree-util-build-jsx: 2.2.2 estree-util-is-identifier-name: 2.1.0 estree-util-to-js: 1.2.0 - estree-walker: 3.0.0 + estree-walker: 3.0.3 hast-util-to-estree: 2.3.2 markdown-extensions: 1.1.1 periscopic: 3.1.0 @@ -8642,7 +8664,7 @@ packages: rollup: 3.20.1 dev: false - /@rollup/plugin-typescript@8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@5.0.2): + /@rollup/plugin-typescript@8.5.0(rollup@2.79.1)(tslib@2.5.3)(typescript@5.1.6): resolution: {integrity: sha512-wMv1/scv0m/rXx21wD2IsBbJFba8wGF3ErJIr6IKRfRj49S85Lszbxb4DCo8iILpluTjk2GAAu9CoZt4G3ppgQ==} engines: {node: '>=8.0.0'} peerDependencies: @@ -8659,7 +8681,7 @@ packages: resolve: 1.22.2 rollup: 2.79.1 tslib: 2.5.3 - typescript: 5.0.2 + typescript: 5.1.6 dev: true /@rollup/pluginutils@3.1.0(rollup@2.79.1): @@ -9161,7 +9183,7 @@ packages: /@types/yargs-parser@21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.0.2): + /@typescript-eslint/eslint-plugin@6.0.0(@typescript-eslint/parser@6.0.0)(eslint@8.43.0)(typescript@5.1.6): resolution: {integrity: sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -9173,10 +9195,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 6.0.0(eslint@8.43.0)(typescript@5.0.2) + '@typescript-eslint/parser': 6.0.0(eslint@8.43.0)(typescript@5.1.6) '@typescript-eslint/scope-manager': 6.0.0 - '@typescript-eslint/type-utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2) - '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2) + '@typescript-eslint/type-utils': 6.0.0(eslint@8.43.0)(typescript@5.1.6) + '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.1.6) '@typescript-eslint/visitor-keys': 6.0.0 debug: 4.3.4 eslint: 8.43.0 @@ -9186,13 +9208,13 @@ packages: natural-compare: 1.4.0 natural-compare-lite: 1.4.0 semver: 7.5.3 - ts-api-utils: 1.0.1(typescript@5.0.2) - typescript: 5.0.2 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@6.0.0(eslint@8.43.0)(typescript@5.0.2): + /@typescript-eslint/parser@6.0.0(eslint@8.43.0)(typescript@5.1.6): resolution: {integrity: sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -9204,11 +9226,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.0.0 '@typescript-eslint/types': 6.0.0 - '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2) + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) '@typescript-eslint/visitor-keys': 6.0.0 debug: 4.3.4 eslint: 8.43.0 - typescript: 5.0.2 + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -9221,7 +9243,7 @@ packages: '@typescript-eslint/visitor-keys': 6.0.0 dev: true - /@typescript-eslint/type-utils@6.0.0(eslint@8.43.0)(typescript@5.0.2): + /@typescript-eslint/type-utils@6.0.0(eslint@8.43.0)(typescript@5.1.6): resolution: {integrity: sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -9231,12 +9253,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2) - '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.0.2) + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) + '@typescript-eslint/utils': 6.0.0(eslint@8.43.0)(typescript@5.1.6) debug: 4.3.4 eslint: 8.43.0 - ts-api-utils: 1.0.1(typescript@5.0.2) - typescript: 5.0.2 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -9246,7 +9268,7 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.0.0(typescript@5.0.2): + /@typescript-eslint/typescript-estree@6.0.0(typescript@5.1.6): resolution: {integrity: sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -9261,13 +9283,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.0.2) - typescript: 5.0.2 + ts-api-utils: 1.0.1(typescript@5.1.6) + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@6.0.0(eslint@8.43.0)(typescript@5.0.2): + /@typescript-eslint/utils@6.0.0(eslint@8.43.0)(typescript@5.1.6): resolution: {integrity: sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -9278,7 +9300,7 @@ packages: '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.0.0 '@typescript-eslint/types': 6.0.0 - '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.0.2) + '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) eslint: 8.43.0 eslint-scope: 5.1.1 semver: 7.5.4 @@ -11449,14 +11471,14 @@ packages: dev: false optional: true - /esbuild-plugin-copy@2.1.1(esbuild@0.17.19): + /esbuild-plugin-copy@2.1.1(esbuild@0.18.16): resolution: {integrity: sha512-Bk66jpevTcV8KMFzZI1P7MZKZ+uDcrZm2G2egZ2jNIvVnivDpodZI+/KnpL3Jnap0PBdIHU7HwFGB8r+vV5CVw==} peerDependencies: esbuild: '>= 0.14.0' dependencies: chalk: 4.1.2 chokidar: 3.5.3 - esbuild: 0.17.19 + esbuild: 0.18.16 fs-extra: 10.1.0 globby: 11.1.0 dev: true @@ -11619,6 +11641,7 @@ packages: '@esbuild/win32-arm64': 0.17.19 '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + dev: false /esbuild@0.18.16: resolution: {integrity: sha512-1xLsOXrDqwdHxyXb/x/SOyg59jpf/SH7YMvU5RNSU7z3TInaASNJWNFJ6iRvLvLETZMasF3d1DdZLg7sgRimRQ==} @@ -11849,7 +11872,7 @@ packages: dependencies: '@types/estree-jsx': 1.0.0 estree-util-is-identifier-name: 2.1.0 - estree-walker: 3.0.0 + estree-walker: 3.0.3 dev: false /estree-util-is-identifier-name@2.1.0: @@ -11881,8 +11904,10 @@ packages: /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - /estree-walker@3.0.0: - resolution: {integrity: sha512-s6ceX0NFiU/vKPiKvFdR83U1Zffu7upwZsGwpoqfg5rbbq1l50WQ5hCeIvM6E6oD4shUHCYMsiFPns4Jk0YfMQ==} + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.1 dev: false /esutils@2.0.3: @@ -14575,12 +14600,12 @@ packages: typescript: 5.0.2 dev: false - /network-information-types@0.1.1(typescript@5.0.4): + /network-information-types@0.1.1(typescript@5.1.6): resolution: {integrity: sha512-mLXNafJYOkiJB6IlF727YWssTRpXitR+tKSLyA5VAdBi3SOvLf5gtizHgxf241YHPWocnAO/fAhVrB/68tPHDw==} peerDependencies: typescript: '>= 3.0.0' dependencies: - typescript: 5.0.4 + typescript: 5.1.6 dev: false /nice-try@1.0.5: @@ -15123,7 +15148,7 @@ packages: resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} dependencies: '@types/estree': 1.0.1 - estree-walker: 3.0.0 + estree-walker: 3.0.3 is-reference: 3.0.1 dev: false @@ -16129,7 +16154,7 @@ packages: mdast-util-to-hast: 12.3.0 unified: 10.1.2 - /remark-shiki-twoslash@3.1.3(typescript@5.0.2): + /remark-shiki-twoslash@3.1.3(typescript@5.1.6): resolution: {integrity: sha512-4e8OH3ySOCw5wUbDcPszokOKjKuebOqlP2WlySvC7ITBOq27BiGsFlq+FNWhxppZ+JzhTWah4gQrnMjX3KDbAQ==} peerDependencies: typescript: '>3' @@ -16140,9 +16165,9 @@ packages: fenceparser: 1.1.1 regenerator-runtime: 0.13.11 shiki: 0.10.1 - shiki-twoslash: 3.1.2(typescript@5.0.2) + shiki-twoslash: 3.1.2(typescript@5.1.6) tslib: 2.1.0 - typescript: 5.0.2 + typescript: 5.1.6 unist-util-visit: 2.0.3 transitivePeerDependencies: - supports-color @@ -16547,7 +16572,7 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /shiki-twoslash@3.1.2(typescript@5.0.2): + /shiki-twoslash@3.1.2(typescript@5.1.6): resolution: {integrity: sha512-JBcRIIizi+exIA/OUhYkV6jtyeZco0ykCkIRd5sgwIt1Pm4pz+maoaRZpm6SkhPwvif4fCA7xOtJOykhpIV64Q==} peerDependencies: typescript: '>3' @@ -16556,7 +16581,7 @@ packages: '@typescript/vfs': 1.3.4 fenceparser: 1.1.1 shiki: 0.10.1 - typescript: 5.0.2 + typescript: 5.1.6 transitivePeerDependencies: - supports-color dev: true @@ -17011,7 +17036,7 @@ packages: svelte: 3.59.1 dev: false - /svelte2tsx@0.6.15(svelte@3.59.1)(typescript@5.0.2): + /svelte2tsx@0.6.15(svelte@3.59.1)(typescript@5.1.6): resolution: {integrity: sha512-+j6RmA3g5pPs1DHa/rdzJjjhZuCfWx0IbNPaR99A2bvOSPPY6BlVkBGU0urI+DGcWHhYEG28Flo942KqlAkpEQ==} peerDependencies: svelte: ^3.55 || ^4.0 @@ -17023,7 +17048,7 @@ packages: dedent-js: 1.0.1 pascal-case: 3.1.2 svelte: 3.59.1 - typescript: 5.0.2 + typescript: 5.1.6 dev: false /svelte@3.59.1: @@ -17268,13 +17293,13 @@ packages: /trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} - /ts-api-utils@1.0.1(typescript@5.0.2): + /ts-api-utils@1.0.1(typescript@5.1.6): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.0.2 + typescript: 5.1.6 dev: true /ts-interface-checker@0.1.13: @@ -17473,12 +17498,12 @@ packages: resolution: {integrity: sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==} engines: {node: '>=12.20'} hasBin: true + dev: false - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} + /typescript@5.1.6: + resolution: {integrity: sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==} + engines: {node: '>=14.17'} hasBin: true - dev: false /ufo@1.1.2: resolution: {integrity: sha512-TrY6DsjTQQgyS3E3dBaOXf0TpPD8u9FVrVYmKVegJuFw51n/YB9XPt+U6ydzFG5ZIN7+DIjPbNmXoBj9esYhgQ==} @@ -18667,7 +18692,7 @@ packages: id: file:packages/astro name: astro version: 2.9.3 - engines: {node: '>=16.12.0', npm: '>=6.14.0'} + engines: {node: '>=18.14.1', npm: '>=6.14.0'} hasBin: true peerDependencies: sharp: '>=0.31.0' @@ -18701,8 +18726,8 @@ packages: devalue: 4.3.2 diff: 5.1.0 es-module-lexer: 1.3.0 - esbuild: 0.17.19 - estree-walker: 3.0.0 + esbuild: 0.18.16 + estree-walker: 3.0.3 execa: 6.1.0 fast-glob: 3.2.12 github-slugger: 2.0.0 @@ -18712,7 +18737,7 @@ packages: kleur: 4.1.5 magic-string: 0.27.0 mime: 3.0.0 - network-information-types: 0.1.1(typescript@5.0.4) + network-information-types: 0.1.1(typescript@5.1.6) ora: 6.3.1 p-limit: 4.0.0 path-to-regexp: 6.2.1 @@ -18725,7 +18750,7 @@ packages: string-width: 5.1.2 strip-ansi: 7.1.0 tsconfig-resolver: 3.0.1 - typescript: 5.0.4 + typescript: 5.1.6 unist-util-visit: 4.1.2 vfile: 5.3.7 vite: 4.4.6(@types/node@18.16.18)(sass@1.63.4) @@ -18787,7 +18812,7 @@ packages: '@astrojs/webapi': 2.2.0 '@netlify/functions': 1.6.0 astro: file:packages/astro(@types/node@18.16.18) - esbuild: 0.15.18 + esbuild: 0.18.16 dev: false file:packages/integrations/vercel(astro@2.9.3): @@ -18803,7 +18828,7 @@ packages: '@vercel/analytics': 0.1.11 '@vercel/nft': 0.22.6 astro: file:packages/astro(@types/node@18.16.18) - esbuild: 0.17.19 + esbuild: 0.18.16 fast-glob: 3.2.12 set-cookie-parser: 2.6.0 web-vitals: 3.3.2