From ae8a012a7b6884a03c50494332ee37b4505c2c3b Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Thu, 12 Jan 2023 22:46:56 +0800 Subject: [PATCH] Handle compiler breaking change (#5803) --- .changeset/dull-rabbits-relax.md | 5 + .npmrc | 2 - package.json | 3 + packages/astro/package.json | 2 +- packages/astro/src/core/compile/compile.ts | 22 +- .../astro/src/runtime/server/astro-global.ts | 9 +- packages/astro/src/vite-plugin-astro/hmr.ts | 57 ++- packages/astro/src/vite-plugin-astro/index.ts | 1 + .../fixtures/third-party-astro/package.json | 2 +- .../test/units/compile/invalid-css.test.js | 7 +- .../units/vite-plugin-astro/compile.test.js | 3 +- pnpm-lock.yaml | 324 ++---------------- 12 files changed, 109 insertions(+), 328 deletions(-) create mode 100644 .changeset/dull-rabbits-relax.md diff --git a/.changeset/dull-rabbits-relax.md b/.changeset/dull-rabbits-relax.md new file mode 100644 index 000000000000..03bf99dac03f --- /dev/null +++ b/.changeset/dull-rabbits-relax.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Upgrade compiler and handle breaking changes diff --git a/.npmrc b/.npmrc index 28128c1daa06..f44bad2825c8 100644 --- a/.npmrc +++ b/.npmrc @@ -10,7 +10,5 @@ public-hoist-pattern[]=github-slugger # Vite's esbuild optimizer has trouble optimizing `@astrojs/lit/client-shim.js` # which imports this dependency. public-hoist-pattern[]=@webcomponents/template-shadowroot -# On Windows, `svelte-preprocess` can't import `svelte/compiler`. Might be a pnpm bug. -public-hoist-pattern[]=svelte # There's a lit dependency duplication somewhere causing multiple Lit versions error. public-hoist-pattern[]=*lit* diff --git a/package.json b/package.json index 03e71b8c9457..f119d34d0598 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,9 @@ "react", "react-dom", "@types/react" + ], + "allowAny": [ + "astro" ] }, "patchedDependencies": { diff --git a/packages/astro/package.json b/packages/astro/package.json index b73779f8c608..90f9aa0c1d2a 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -109,7 +109,7 @@ "test:e2e:match": "playwright test -g" }, "dependencies": { - "@astrojs/compiler": "^0.31.4", + "@astrojs/compiler": "^0.32.0", "@astrojs/language-server": "^0.28.3", "@astrojs/markdown-remark": "^2.0.0-beta.1", "@astrojs/telemetry": "^1.0.1", diff --git a/packages/astro/src/core/compile/compile.ts b/packages/astro/src/core/compile/compile.ts index 9e52e1473d36..7e8dc8a31927 100644 --- a/packages/astro/src/core/compile/compile.ts +++ b/packages/astro/src/core/compile/compile.ts @@ -3,6 +3,8 @@ import type { ResolvedConfig } from 'vite'; import type { AstroConfig } from '../../@types/astro'; import { transform } from '@astrojs/compiler'; +import { fileURLToPath } from 'url'; +import { normalizePath } from 'vite'; import { AggregateError, AstroError, CompilerError } from '../errors/errors.js'; import { AstroErrorData } from '../errors/index.js'; import { resolvePath } from '../util.js'; @@ -35,15 +37,11 @@ export async function compile({ // use `sourcemap: "both"` so that sourcemap is included in the code // result passed to esbuild, but also available in the catch handler. transformResult = await transform(source, { - moduleId: filename, - pathname: filename, - projectRoot: astroConfig.root.toString(), - site: astroConfig.site?.toString(), - sourcefile: filename, + filename, + normalizedFilename: normalizeFilename(filename, astroConfig.root), sourcemap: 'both', internalURL: 'astro/server/index.js', - // TODO: baseline flag - experimentalStaticExtraction: true, + astroGlobalArgs: JSON.stringify(astroConfig.site), preprocessStyle: createStylePreprocessor({ filename, viteConfig, @@ -111,3 +109,13 @@ function handleCompileResultErrors(result: TransformResult, cssTransformErrors: } } } + +function normalizeFilename(filename: string, root: URL) { + const normalizedFilename = normalizePath(filename); + const normalizedRoot = normalizePath(fileURLToPath(root)); + if (normalizedFilename.startsWith(normalizedRoot)) { + return normalizedFilename.slice(normalizedRoot.length - 1); + } else { + return normalizedFilename; + } +} diff --git a/packages/astro/src/runtime/server/astro-global.ts b/packages/astro/src/runtime/server/astro-global.ts index 3182026bf35b..7ed51132239d 100644 --- a/packages/astro/src/runtime/server/astro-global.ts +++ b/packages/astro/src/runtime/server/astro-global.ts @@ -17,13 +17,8 @@ function createAstroGlobFn() { } // This is used to create the top-level Astro global; the one that you can use -// Inside of getStaticPaths. -// TODO: remove `_filePathname` and `_projectRootStr` from the compiler -export function createAstro( - _filePathname: string, - site: string | undefined, - _projectRootStr: string -): AstroGlobalPartial { +// inside of getStaticPaths. See the `astroGlobalArgs` option for parameter type. +export function createAstro(site: string | undefined): AstroGlobalPartial { return { site: site ? new URL(site) : undefined, generator: `Astro v${ASTRO_VERSION}`, diff --git a/packages/astro/src/vite-plugin-astro/hmr.ts b/packages/astro/src/vite-plugin-astro/hmr.ts index dbee93b495fd..ff972d660e99 100644 --- a/packages/astro/src/vite-plugin-astro/hmr.ts +++ b/packages/astro/src/vite-plugin-astro/hmr.ts @@ -1,7 +1,12 @@ import { fileURLToPath } from 'node:url'; import type { HmrContext, ModuleNode } from 'vite'; import type { AstroConfig } from '../@types/astro'; -import { cachedCompilation, invalidateCompilation, isCached } from '../core/compile/index.js'; +import { + cachedCompilation, + CompileResult, + invalidateCompilation, + isCached, +} from '../core/compile/index.js'; import type { LogOptions } from '../core/logger/core.js'; import { info } from '../core/logger/core.js'; import * as msg from '../core/messages.js'; @@ -17,32 +22,24 @@ export interface HandleHotUpdateOptions { config: AstroConfig; logging: LogOptions; compile: () => ReturnType; + source: string; } export async function handleHotUpdate( ctx: HmrContext, - { config, logging, compile }: HandleHotUpdateOptions + { config, logging, compile, source }: HandleHotUpdateOptions ) { let isStyleOnlyChange = false; if (ctx.file.endsWith('.astro') && isCached(config, ctx.file)) { // Get the compiled result from the cache const oldResult = await compile(); - // But we also need a fresh, uncached result to compare it to + // Skip HMR if source isn't changed + if (oldResult.source === source) return []; + // Invalidate to get fresh, uncached result to compare it to invalidateCompilation(config, ctx.file); const newResult = await compile(); - // If the hashes are identical, we assume only styles have changed - if (oldResult.scope === newResult.scope) { + if (isStyleOnlyChanged(oldResult, newResult)) { isStyleOnlyChange = true; - // All styles are the same, we can skip an HMR update - const styles = new Set(newResult.css); - for (const style of oldResult.css) { - if (styles.has(style)) { - styles.delete(style); - } - } - if (styles.size === 0) { - return []; - } } } else { invalidateCompilation(config, ctx.file); @@ -134,3 +131,33 @@ export async function handleHotUpdate( return mods; } + +function isStyleOnlyChanged(oldResult: CompileResult, newResult: CompileResult) { + return ( + normalizeCode(oldResult.code) === normalizeCode(newResult.code) && + !isArrayEqual(oldResult.css, newResult.css) + ); +} + +const astroStyleImportRE = /import\s*"[^"]+astro&type=style[^"]+";/g; +const sourceMappingUrlRE = /\/\/# sourceMappingURL=[^ ]+$/gm; + +/** + * Remove style-related code and sourcemap from the final astro output so they + * can be compared between non-style code + */ +function normalizeCode(code: string) { + return code.replace(astroStyleImportRE, '').replace(sourceMappingUrlRE, '').trim(); +} + +function isArrayEqual(a: any[], b: any[]) { + if (a.length !== b.length) { + return false; + } + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +} diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index 62f6a1627b81..765c7a3515ad 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -179,6 +179,7 @@ export default function astro({ settings, logging }: AstroPluginOptions): vite.P config, logging, compile, + source: compileProps.source, }); }, }; diff --git a/packages/astro/test/fixtures/third-party-astro/package.json b/packages/astro/test/fixtures/third-party-astro/package.json index f5bfdb768a87..26e11aefdd6f 100644 --- a/packages/astro/test/fixtures/third-party-astro/package.json +++ b/packages/astro/test/fixtures/third-party-astro/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "dependencies": { - "astro": "^1.0.0", + "astro": "workspace:*", "astro-embed": "^0.1.1" } } diff --git a/packages/astro/test/units/compile/invalid-css.test.js b/packages/astro/test/units/compile/invalid-css.test.js index 1aa50107097d..6be17620a580 100644 --- a/packages/astro/test/units/compile/invalid-css.test.js +++ b/packages/astro/test/units/compile/invalid-css.test.js @@ -2,6 +2,7 @@ import { resolveConfig } from 'vite'; import { expect } from 'chai'; import { cachedCompilation } from '../../../dist/core/compile/index.js'; import { AggregateError } from '../../../dist/core/errors/index.js'; +import { pathToFileURL } from 'url'; describe('astro/src/core/compile', () => { describe('Invalid CSS', () => { @@ -9,9 +10,9 @@ describe('astro/src/core/compile', () => { let error; try { let r = await cachedCompilation({ - astroConfig: /** @type {any} */ ({ - root: '/', - }), + astroConfig: { + root: pathToFileURL('/'), + }, viteConfig: await resolveConfig({ configFile: false }, 'serve'), filename: '/src/pages/index.astro', source: ` diff --git a/packages/astro/test/units/vite-plugin-astro/compile.test.js b/packages/astro/test/units/vite-plugin-astro/compile.test.js index 7f3eb20d7edb..1c1d53baca23 100644 --- a/packages/astro/test/units/vite-plugin-astro/compile.test.js +++ b/packages/astro/test/units/vite-plugin-astro/compile.test.js @@ -2,6 +2,7 @@ import { expect } from 'chai'; import { resolveConfig } from 'vite'; import { cachedFullCompilation } from '../../../dist/vite-plugin-astro/compile.js'; import { init, parse } from 'es-module-lexer'; +import { pathToFileURL } from 'url'; const viteConfig = await resolveConfig({ configFile: false }, 'serve'); @@ -12,7 +13,7 @@ const viteConfig = await resolveConfig({ configFile: false }, 'serve'); async function compile(source, id) { return await cachedFullCompilation({ compileProps: { - astroConfig: { root: '/', base: '/' }, + astroConfig: { root: pathToFileURL('/'), base: '/' }, viteConfig, filename: id, source, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0cf1e85b97c2..1f05719e1e33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -385,7 +385,7 @@ importers: packages/astro: specifiers: - '@astrojs/compiler': ^0.31.4 + '@astrojs/compiler': ^0.32.0 '@astrojs/language-server': ^0.28.3 '@astrojs/markdown-remark': ^2.0.0-beta.1 '@astrojs/telemetry': ^1.0.1 @@ -475,7 +475,7 @@ importers: yargs-parser: ^21.0.1 zod: ^3.17.3 dependencies: - '@astrojs/compiler': 0.31.4 + '@astrojs/compiler': 0.32.0 '@astrojs/language-server': 0.28.3 '@astrojs/markdown-remark': link:../markdown/remark '@astrojs/telemetry': link:../telemetry @@ -2471,11 +2471,11 @@ importers: packages/astro/test/fixtures/third-party-astro: specifiers: - astro: ^1.0.0 + astro: workspace:* astro-embed: ^0.1.1 dependencies: - astro: 1.9.1 - astro-embed: 0.1.3_astro@1.9.1 + astro: link:../../.. + astro-embed: 0.1.3_astro@packages+astro packages/astro/test/fixtures/type-imports: specifiers: @@ -3774,46 +3774,46 @@ packages: leven: 3.1.0 dev: false - /@astro-community/astro-embed-integration/0.1.2_astro@1.9.1: + /@astro-community/astro-embed-integration/0.1.2_astro@packages+astro: resolution: {integrity: sha512-ONBDHkOUZ7ssQNzRc5XRZtBBJR0zC68Gm2FCm5w6fxxciDkRkU9Zn9BSssgaNrLPfsXycxFLtQZT3dX9ZPsAxw==} peerDependencies: - astro: ^1.0.0-beta.10 + astro: '*' dependencies: - '@astro-community/astro-embed-twitter': 0.1.3_astro@1.9.1 - '@astro-community/astro-embed-vimeo': 0.1.1_astro@1.9.1 - '@astro-community/astro-embed-youtube': 0.2.1_astro@1.9.1 - astro: 1.9.1 + '@astro-community/astro-embed-twitter': 0.1.3_astro@packages+astro + '@astro-community/astro-embed-vimeo': 0.1.1_astro@packages+astro + '@astro-community/astro-embed-youtube': 0.2.1_astro@packages+astro + astro: link:packages/astro unist-util-select: 4.0.2 dev: false - /@astro-community/astro-embed-twitter/0.1.3_astro@1.9.1: + /@astro-community/astro-embed-twitter/0.1.3_astro@packages+astro: resolution: {integrity: sha512-lcOBnzhczNrngkafzD+8BGKiK8oJvahg3/QUuWgueNwHRU8C+18brdxKc1i4ttZWgAt1A5u+jx21Tc4bquMUzg==} peerDependencies: - astro: ^1.0.0-beta.10 + astro: '*' dependencies: '@astro-community/astro-embed-utils': 0.0.3 - astro: 1.9.1 + astro: link:packages/astro dev: false /@astro-community/astro-embed-utils/0.0.3: resolution: {integrity: sha512-hXwSMtSAL3V9fnFHps+/CoDIJst26U/qSdI7srIQ8GPmFqdbcqJd/qOqYzGezAR/qTM8gmTjDCGOuVI0Z+xT3Q==} dev: false - /@astro-community/astro-embed-vimeo/0.1.1_astro@1.9.1: + /@astro-community/astro-embed-vimeo/0.1.1_astro@packages+astro: resolution: {integrity: sha512-M7ALKJkH8NDJFY+onsKvlxq7Lpj6FQm90W/+0cGilrdWkKBAYPVLApnkAcUf2strg/4cQ2otZekXI6uvU4ruzg==} peerDependencies: - astro: ^1.0.0-beta.10 + astro: '*' dependencies: - astro: 1.9.1 + astro: link:packages/astro lite-vimeo-embed: 0.1.0 dev: false - /@astro-community/astro-embed-youtube/0.2.1_astro@1.9.1: + /@astro-community/astro-embed-youtube/0.2.1_astro@packages+astro: resolution: {integrity: sha512-yO2u9MCDQwxRYnZixYcRbBU/QrrBI+69GLDh9W+M/dsgmSZxtZY4kG00ewmC+Lr0JCLteaxz2iSY1U61+WNfEw==} peerDependencies: - astro: ^1.0.0-beta.10 + astro: '*' dependencies: - astro: 1.9.1 + astro: link:packages/astro lite-youtube-embed: 0.2.0 dev: false @@ -3828,6 +3828,10 @@ packages: /@astrojs/compiler/0.31.4: resolution: {integrity: sha512-6bBFeDTtPOn4jZaiD3p0f05MEGQL9pw2Zbfj546oFETNmjJFWO3nzHz6/m+P53calknCvyVzZ5YhoBLIvzn5iw==} + /@astrojs/compiler/0.32.0: + resolution: {integrity: sha512-QL5qMGkfsC1/kDjJF4RRagz8/hACBUb19cHWrQ8AROphS42qXM6JhoO1Og5FohV3p2VfT5CdEJspn4uNsgZvmw==} + dev: false + /@astrojs/language-server/0.28.3: resolution: {integrity: sha512-fPovAX/X46eE2w03jNRMpQ7W9m2mAvNt4Ay65lD9wl1Z5vIQYxlg7Enp9qP225muTr4jSVB5QiLumFJmZMAaVA==} hasBin: true @@ -3846,80 +3850,12 @@ packages: vscode-uri: 3.0.7 dev: false - /@astrojs/markdown-remark/1.2.0: - resolution: {integrity: sha512-Cb+uhSuukyfERknfJ8K4iJLeKJaiZWi1BTwPS4fzw0bc9kGKe5VeTRzd2E25+vaMnRTk0tN/y6QfYEMMN3Q97g==} - dependencies: - '@astrojs/micromark-extension-mdx-jsx': 1.0.3 - '@astrojs/prism': 1.0.2 - acorn: 8.8.1 - acorn-jsx: 5.3.2_acorn@8.8.1 - github-slugger: 1.5.0 - hast-util-to-html: 8.0.4 - import-meta-resolve: 2.2.1 - mdast-util-from-markdown: 1.2.0 - mdast-util-mdx-expression: 1.3.1 - mdast-util-mdx-jsx: 1.2.0 - micromark-extension-mdx-expression: 1.0.3 - micromark-extension-mdx-md: 1.0.0 - micromark-util-combine-extensions: 1.0.0 - rehype-raw: 6.1.1 - rehype-stringify: 9.0.3 - remark-gfm: 3.0.1 - remark-parse: 10.0.1 - remark-rehype: 10.1.0 - remark-smartypants: 2.0.0 - shiki: 0.11.1 - unified: 10.1.2 - unist-util-map: 3.1.2 - unist-util-visit: 4.1.1 - vfile: 5.3.6 - transitivePeerDependencies: - - supports-color - dev: false - - /@astrojs/micromark-extension-mdx-jsx/1.0.3: - resolution: {integrity: sha512-O15+i2DGG0qb1R/1SYbFXgOKDGbYdV8iJMtuboVb1S9YFQfMOJxaCMco0bhXQI7PmZcQ4pZWIjT5oZ64dXUtRA==} - dependencies: - '@types/acorn': 4.0.6 - estree-util-is-identifier-name: 2.0.1 - micromark-factory-mdx-expression: 1.0.6 - micromark-factory-space: 1.0.0 - micromark-util-character: 1.1.0 - micromark-util-symbol: 1.0.1 - micromark-util-types: 1.0.2 - uvu: 0.5.6 - vfile-message: 3.1.3 - dev: false - /@astrojs/node/1.1.0: resolution: {integrity: sha512-4KkCEFYtmTUSvU49UZSJD/VQfD/oKzf0ld8COjFW1pxfquBgvevLxRVpYLRanZB20L3c8/xyyQpDq7zMSMqQrg==} dependencies: '@astrojs/webapi': 1.1.1 dev: false - /@astrojs/prism/1.0.2: - resolution: {integrity: sha512-o3cUVoAuALDqdN5puNlsN2eO4Yi1kDh68YO8V7o6U4Ts+J/mMayzlJ7JsgYAmob0xrf/XnADVgu8khfMv/w3uA==} - engines: {node: ^14.18.0 || >=16.12.0} - dependencies: - prismjs: 1.29.0 - dev: false - - /@astrojs/telemetry/1.0.1: - resolution: {integrity: sha512-SJVfZHp00f8VZsT1fsx1+6acJGUNt/84xZytV5znPzzNE8RXjlE0rv03llgTsEeUHYZc6uJah91jNojS7RldFg==} - engines: {node: ^14.18.0 || >=16.12.0} - dependencies: - ci-info: 3.7.1 - debug: 4.3.4 - dlv: 1.1.3 - dset: 3.1.2 - is-docker: 3.0.0 - is-wsl: 2.2.0 - node-fetch: 3.3.0 - which-pm-runs: 1.1.0 - transitivePeerDependencies: - - supports-color - dev: false - /@astrojs/webapi/1.1.1: resolution: {integrity: sha512-yeUvP27PoiBK/WCxyQzC4HLYZo4Hg6dzRd/dTsL50WGlAQVCwWcqzVJrIZKvzNDNaW/fIXutZTmdj6nec0PIGg==} dependencies: @@ -6609,15 +6545,6 @@ packages: escalade: 3.1.1 dev: false - /@proload/plugin-tsm/0.2.1_@proload+core@0.3.3: - resolution: {integrity: sha512-Ex1sL2BxU+g8MHdAdq9SZKz+pU34o8Zcl9PHWo2WaG9hrnlZme607PU6gnpoAYsDBpHX327+eu60wWUk+d/b+A==} - peerDependencies: - '@proload/core': ^0.3.2 - dependencies: - '@proload/core': 0.3.3 - tsm: 2.3.0 - dev: false - /@rollup/plugin-alias/3.1.9_rollup@2.79.1: resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} engines: {node: '>=8.0.0'} @@ -6919,12 +6846,6 @@ packages: resolution: {integrity: sha512-OyiZ3jEKu7RtGO1yp9oOdK0cTwZ/10oE9PDJ6fyN3r9T5wkyOcvr6awdugjYdqF6KVO5eUvt7jx7rk2Eylufow==} dev: true - /@types/estree-jsx/0.0.1: - resolution: {integrity: sha512-gcLAYiMfQklDCPjQegGn0TBAn9it05ISEsEhlKQUddIk7o2XDokOcTN7HBO8tznM0D9dGezvHEfRZBfZf6me0A==} - dependencies: - '@types/estree': 1.0.0 - dev: false - /@types/estree-jsx/1.0.0: resolution: {integrity: sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ==} dependencies: @@ -6975,6 +6896,7 @@ packages: /@types/html-escaper/3.0.0: resolution: {integrity: sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==} + dev: true /@types/http-cache-semantics/4.0.1: resolution: {integrity: sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==} @@ -7865,107 +7787,21 @@ packages: tslib: 2.4.1 dev: true - /ast-types/0.14.2: - resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} - engines: {node: '>=4'} - dependencies: - tslib: 2.4.1 - dev: false - /astring/1.8.4: resolution: {integrity: sha512-97a+l2LBU3Op3bBQEff79i/E4jMD2ZLFD8rHx9B6mXyB2uQwhJQYfiDqUwtfjF4QA1F2qs//N6Cw8LetMbQjcw==} hasBin: true dev: false - /astro-embed/0.1.3_astro@1.9.1: + /astro-embed/0.1.3_astro@packages+astro: resolution: {integrity: sha512-ztKlhFdUqlSlE5frybHLHQILsgBLnlcN2PejtkYEaIZHvysteiniT6Rg1o08z7+0FIt/KVE+8L/Y5g3ufFWdPg==} peerDependencies: - astro: ^1.0.0-beta.10 + astro: '*' dependencies: - '@astro-community/astro-embed-integration': 0.1.2_astro@1.9.1 - '@astro-community/astro-embed-twitter': 0.1.3_astro@1.9.1 - '@astro-community/astro-embed-vimeo': 0.1.1_astro@1.9.1 - '@astro-community/astro-embed-youtube': 0.2.1_astro@1.9.1 - astro: 1.9.1 - dev: false - - /astro/1.9.1: - resolution: {integrity: sha512-aQ6rvAP4w4VCgipVYA/zPmnkuTbFrMZ/+x/sAv2W1uJHWU2iQmrVRrrjUFJl+i1TuYYlHAuC2vKK7aRyXCjD4A==} - engines: {node: ^14.18.0 || >=16.12.0, npm: '>=6.14.0'} - hasBin: true - dependencies: - '@astrojs/compiler': 0.31.4 - '@astrojs/language-server': 0.28.3 - '@astrojs/markdown-remark': 1.2.0 - '@astrojs/telemetry': 1.0.1 - '@astrojs/webapi': 1.1.1 - '@babel/core': 7.20.12 - '@babel/generator': 7.20.7 - '@babel/parser': 7.20.7 - '@babel/plugin-transform-react-jsx': 7.20.7_@babel+core@7.20.12 - '@babel/traverse': 7.20.12 - '@babel/types': 7.20.7 - '@proload/core': 0.3.3 - '@proload/plugin-tsm': 0.2.1_@proload+core@0.3.3 - '@types/babel__core': 7.1.20 - '@types/html-escaper': 3.0.0 - '@types/yargs-parser': 21.0.0 - acorn: 8.8.1 - boxen: 6.2.1 - ci-info: 3.7.1 - common-ancestor-path: 1.0.1 - cookie: 0.5.0 - debug: 4.3.4 - deepmerge-ts: 4.2.2 - devalue: 4.2.1 - diff: 5.1.0 - es-module-lexer: 1.1.0 - estree-walker: 3.0.2 - execa: 6.1.0 - fast-glob: 3.2.12 - github-slugger: 2.0.0 - gray-matter: 4.0.3 - html-entities: 2.3.3 - html-escaper: 3.0.3 - import-meta-resolve: 2.2.1 - kleur: 4.1.5 - magic-string: 0.27.0 - mime: 3.0.0 - ora: 6.1.2 - path-browserify: 1.0.1 - path-to-regexp: 6.2.1 - postcss: 8.4.21 - postcss-load-config: 3.1.4_postcss@8.4.21 - preferred-pm: 3.0.3 - prompts: 2.4.2 - recast: 0.20.5 - rehype: 12.0.1 - resolve: 1.22.1 - rollup: 2.79.1 - semver: 7.3.8 - shiki: 0.11.1 - sirv: 2.0.2 - slash: 4.0.0 - string-width: 5.1.2 - strip-ansi: 7.0.1 - supports-esm: 1.0.0 - tsconfig-resolver: 3.0.1 - typescript: 4.9.4 - unist-util-visit: 4.1.1 - vfile: 5.3.6 - vite: 3.2.5 - vitefu: 0.2.4_vite@3.2.5 - yargs-parser: 21.1.1 - zod: 3.20.2 - transitivePeerDependencies: - - '@types/node' - - less - - sass - - stylus - - sugarss - - supports-color - - terser - - ts-node + '@astro-community/astro-embed-integration': 0.1.2_astro@packages+astro + '@astro-community/astro-embed-twitter': 0.1.3_astro@packages+astro + '@astro-community/astro-embed-vimeo': 0.1.1_astro@packages+astro + '@astro-community/astro-embed-youtube': 0.2.1_astro@packages+astro + astro: link:packages/astro dev: false /async-sema/3.1.1: @@ -11533,19 +11369,6 @@ packages: transitivePeerDependencies: - supports-color - /mdast-util-mdx-jsx/1.2.0: - resolution: {integrity: sha512-5+ot/kfxYd3ChgEMwsMUO71oAfYjyRI3pADEK4I7xTmWLGQ8Y7ghm1CG36zUoUvDPxMlIYwQV/9DYHAUWdG4dA==} - dependencies: - '@types/estree-jsx': 0.0.1 - '@types/mdast': 3.0.10 - mdast-util-to-markdown: 1.5.0 - parse-entities: 4.0.0 - stringify-entities: 4.0.3 - unist-util-remove-position: 4.0.1 - unist-util-stringify-position: 3.0.2 - vfile-message: 3.1.3 - dev: false - /mdast-util-mdx-jsx/2.1.0: resolution: {integrity: sha512-KzgzfWMhdteDkrY4mQtyvTU5bc/W4ppxhe9SzelO6QUUiwLAM+Et2Dnjjprik74a336kHdo0zKm7Tp+n6FFeRg==} dependencies: @@ -12660,6 +12483,7 @@ packages: /path-browserify/1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true /path-exists/3.0.0: resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} @@ -13410,16 +13234,6 @@ packages: /reading-time/1.5.0: resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==} - /recast/0.20.5: - resolution: {integrity: sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==} - engines: {node: '>= 4'} - dependencies: - ast-types: 0.14.2 - esprima: 4.0.1 - source-map: 0.6.1 - tslib: 2.4.1 - dev: false - /redent/3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -14061,15 +13875,6 @@ packages: totalist: 1.1.0 dev: false - /sirv/2.0.2: - resolution: {integrity: sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w==} - engines: {node: '>= 10'} - dependencies: - '@polka/url': 1.0.0-next.21 - mrmime: 1.0.1 - totalist: 3.0.0 - dev: false - /sisteransi/1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} dev: false @@ -14594,11 +14399,6 @@ packages: engines: {node: '>=6'} dev: false - /totalist/3.0.0: - resolution: {integrity: sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw==} - engines: {node: '>=6'} - dev: false - /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -14661,14 +14461,6 @@ packages: /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - /tsm/2.3.0: - resolution: {integrity: sha512-++0HFnmmR+gMpDtKTnW3XJ4yv9kVGi20n+NfyQWB9qwJvTaIWY9kBmzek2YUQK5APTQ/1DTrXmm4QtFPmW9Rzw==} - engines: {node: '>=12'} - hasBin: true - dependencies: - esbuild: 0.15.18 - dev: false - /tsutils/3.21.0_typescript@4.7.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -14993,12 +14785,6 @@ packages: /unist-util-is/5.1.1: resolution: {integrity: sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==} - /unist-util-map/3.1.2: - resolution: {integrity: sha512-WLA2R6x/UaopedG2poaWLShf5LCi+BNa6mMkACdjft23PHou4v85PvZItjbO2XgXvukMP365PlL/DrbuMgr3eg==} - dependencies: - '@types/unist': 2.0.6 - dev: false - /unist-util-modify-children/3.1.0: resolution: {integrity: sha512-L0UizdncPZ1NIwpmkwFdLo2NaK2Eb5LU/vaQ7lZGkAaOBZfsHp+8T/gVWPVmmMO1hj6gc+XeMoytut8jr7fdyA==} dependencies: @@ -15240,39 +15026,6 @@ packages: - supports-color dev: false - /vite/3.2.5: - resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==} - engines: {node: ^14.18.0 || >=16.0.0} - hasBin: true - peerDependencies: - '@types/node': '>= 14' - less: '*' - sass: '*' - stylus: '*' - sugarss: '*' - terser: ^5.4.0 - peerDependenciesMeta: - '@types/node': - optional: true - less: - optional: true - sass: - optional: true - stylus: - optional: true - sugarss: - optional: true - terser: - optional: true - dependencies: - esbuild: 0.15.18 - postcss: 8.4.21 - resolve: 1.22.1 - rollup: 2.79.1 - optionalDependencies: - fsevents: 2.3.2 - dev: false - /vite/3.2.5_@types+node@18.11.18: resolution: {integrity: sha512-4mVEpXpSOgrssFZAOmGIr85wPHKvaDAcXqxVxVRZhljkJOMZi1ibLibzjLHzJvcok8BMguLc7g1W6W/GqZbLdQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -15416,17 +15169,6 @@ packages: optional: true dev: false - /vitefu/0.2.4_vite@3.2.5: - resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} - peerDependencies: - vite: ^3.0.0 || ^4.0.0 - peerDependenciesMeta: - vite: - optional: true - dependencies: - vite: 3.2.5 - dev: false - /vitefu/0.2.4_vite@4.0.4: resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==} peerDependencies: