Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes usage of Code component in Vercel #6198

Merged
merged 2 commits into from
Feb 9, 2023
Merged

Fixes usage of Code component in Vercel #6198

merged 2 commits into from
Feb 9, 2023

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Feb 9, 2023

Changes

Testing

  • Created some unit tests for this, so we can better test how we generate options in the future.

Docs

N/A, bug fix

@changeset-bot
Copy link

changeset-bot bot commented Feb 9, 2023

🦋 Changeset detected

Latest commit: d775a57

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Feb 9, 2023
@matthewp
Copy link
Contributor Author

matthewp commented Feb 9, 2023

!preview shiki-vercel

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

 > [email protected] release /home/runner/work/astro/astro > pnpm run build && changeset publish "--tag" "next--shiki-vercel" > [email protected] build /home/runner/work/astro/astro > turbo run build --output-logs=new-only --no-deps --filter=astro --filter=create-astro --filter="@astrojs/*" �[2m• Packages in scope: @astrojs/alpinejs, @astrojs/cloudflare, @astrojs/deno, @astrojs/image, @astrojs/lit, @astrojs/markdown-component, @astrojs/markdown-remark, @astrojs/mdx, @astrojs/netlify, @astrojs/node, @astrojs/partytown, @astrojs/preact, @astrojs/prefetch, @astrojs/prism, @astrojs/react, @astrojs/rss, @astrojs/sitemap, @astrojs/solid-js, @astrojs/svelte, @astrojs/tailwind, @astrojs/telemetry, @astrojs/turbolinks, @astrojs/vercel, @astrojs/vue, @astrojs/webapi, astro, create-astro�[0m �[2m• Running�[0m �[2m�[1mbuild�[0m�[0m �[2min 27 packages�[0m �[2m• Remote computation caching enabled (experimental)�[0m �[35m@astrojs/webapi:build: �[0mcache hit, suppressing output �[2m55ec57606f8aae43�[0m �[34mcreate-astro:build: �[0mcache hit, suppressing output �[2m4620e64dff0127cf�[0m �[33m@astrojs/prism:build: �[0mcache hit, suppressing output �[2m660e83acf6c0adc0�[0m �[36m@astrojs/telemetry:build: �[0mcache hit, suppressing output �[2ma2a006c6fc35e470�[0m �[35m@astrojs/markdown-remark:build: �[0mcache hit, suppressing output �[2m644f96ec6cddf366�[0m �[32mastro:build: �[0mcache miss, executing �[2mb8fd397a678f65bf�[0m �[32mastro:build: �[0m �[32mastro:build: �[0m> [email protected] build /home/runner/work/astro/astro/packages/astro �[32mastro:build: �[0m> pnpm run prebuild && astro-scripts build "src/**/*.ts" && tsc �[32mastro:build: �[0m �[32mastro:build: �[0m �[32mastro:build: �[0m> [email protected] prebuild /home/runner/work/astro/astro/packages/astro �[32mastro:build: �[0m> astro-scripts prebuild --to-string "src/runtime/server/astro-island.ts" "src/runtime/client/{idle,load,media,only,visible}.ts" �[32mastro:build: �[0m �[35m@astrojs/vue:build: �[0mcache miss, executing �[2m6cfad24404dec789�[0m �[36m@astrojs/partytown:build: �[0mcache miss, executing �[2m9de2576654806d44�[0m �[35m@astrojs/netlify:build: �[0mcache miss, executing �[2mfe4555f5f5479d9f�[0m �[34m@astrojs/mdx:build: �[0mcache miss, executing �[2m82c4e2d77155a8d5�[0m �[33m@astrojs/alpinejs:build: �[0mcache miss, executing �[2m05043cd21c190f61�[0m �[34m@astrojs/tailwind:build: �[0mcache miss, executing �[2me0461058125c9f43�[0m �[33m@astrojs/image:build: �[0mcache miss, executing �[2m7110cb3160507332�[0m �[32m@astrojs/turbolinks:build: �[0mcache miss, executing �[2mcc5a44f751ea775a�[0m �[32m@astrojs/vercel:build: �[0mcache miss, executing �[2m2e4ec89ef69e4ce1�[0m �[36m@astrojs/cloudflare:build: �[0mcache miss, executing �[2m8939cd3f9fa4d57d�[0m �[35m@astrojs/netlify:build: �[0m �[35m@astrojs/netlify:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/netlify �[35m@astrojs/netlify:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/netlify:build: �[0m �[36m@astrojs/partytown:build: �[0m �[36m@astrojs/partytown:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/partytown �[36m@astrojs/partytown:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/partytown:build: �[0m �[35m@astrojs/vue:build: �[0m �[35m@astrojs/vue:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/vue �[35m@astrojs/vue:build: �[0m> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc �[35m@astrojs/vue:build: �[0m �[34m@astrojs/mdx:build: �[0m �[34m@astrojs/mdx:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/mdx �[34m@astrojs/mdx:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/mdx:build: �[0m �[32m@astrojs/turbolinks:build: �[0m �[32m@astrojs/turbolinks:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/turbolinks �[32m@astrojs/turbolinks:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/turbolinks:build: �[0m �[34m@astrojs/tailwind:build: �[0m �[34m@astrojs/tailwind:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/tailwind �[34m@astrojs/tailwind:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/tailwind:build: �[0m �[33m@astrojs/alpinejs:build: �[0m �[33m@astrojs/alpinejs:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/alpinejs �[33m@astrojs/alpinejs:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/alpinejs:build: �[0m �[32m@astrojs/vercel:build: �[0m �[32m@astrojs/vercel:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/vercel �[32m@astrojs/vercel:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/vercel:build: �[0m �[33m@astrojs/image:build: �[0m �[33m@astrojs/image:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/image �[33m@astrojs/image:build: �[0m> astro-scripts build "src/**/*.ts" && tsc && pnpm run postbuild �[33m@astrojs/image:build: �[0m �[36m@astrojs/cloudflare:build: �[0m �[36m@astrojs/cloudflare:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/cloudflare �[36m@astrojs/cloudflare:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/cloudflare:build: �[0m �[33m@astrojs/node:build: �[0mcache miss, executing �[2mbe143d1beb2c0074�[0m �[34m@astrojs/lit:build: �[0mcache miss, executing �[2m1d1481389681a619�[0m �[36m@astrojs/preact:build: �[0mcache miss, executing �[2m0a85bcfd9a4bc72e�[0m �[35m@astrojs/rss:build: �[0mcache miss, executing �[2meb80200144aade9c�[0m �[32m@astrojs/react:build: �[0mcache miss, executing �[2m980326ff386edf7b�[0m �[33m@astrojs/svelte:build: �[0mcache miss, executing �[2mdb9957c1e7610cd2�[0m �[33m@astrojs/node:build: �[0m �[33m@astrojs/node:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/node �[33m@astrojs/node:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[33m@astrojs/node:build: �[0m �[34m@astrojs/lit:build: �[0m �[34m@astrojs/lit:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/lit �[34m@astrojs/lit:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/lit:build: �[0m �[34m@astrojs/prefetch:build: �[0mcache miss, executing �[2mecd37c9b399f4be5�[0m �[36m@astrojs/solid-js:build: �[0mcache miss, executing �[2m781abe818b5a880e�[0m �[35m@astrojs/rss:build: �[0m �[35m@astrojs/rss:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/astro-rss �[35m@astrojs/rss:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/rss:build: �[0m �[36m@astrojs/preact:build: �[0m �[36m@astrojs/preact:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/preact �[36m@astrojs/preact:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/preact:build: �[0m �[32m@astrojs/react:build: �[0m �[32m@astrojs/react:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/react �[32m@astrojs/react:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/react:build: �[0m �[35m@astrojs/deno:build: �[0mcache miss, executing �[2m385ebd1286723655�[0m �[33m@astrojs/svelte:build: �[0m �[33m@astrojs/svelte:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/svelte �[33m@astrojs/svelte:build: �[0m> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc �[33m@astrojs/svelte:build: �[0m �[34m@astrojs/prefetch:build: �[0m �[34m@astrojs/prefetch:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/prefetch �[34m@astrojs/prefetch:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[34m@astrojs/prefetch:build: �[0m �[36m@astrojs/solid-js:build: �[0m �[36m@astrojs/solid-js:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/solid �[36m@astrojs/solid-js:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[36m@astrojs/solid-js:build: �[0m �[35m@astrojs/deno:build: �[0m �[35m@astrojs/deno:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/deno �[35m@astrojs/deno:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[35m@astrojs/deno:build: �[0m �[32m@astrojs/sitemap:build: �[0mcache miss, executing �[2md9c9e689b1f57035�[0m �[33m@astrojs/image:build: �[0m �[33m@astrojs/image:build: �[0m> @astrojs/[email protected] postbuild /home/runner/work/astro/astro/packages/integrations/image �[33m@astrojs/image:build: �[0m> astro-scripts copy "src/**/*.wasm" �[33m@astrojs/image:build: �[0m �[32m@astrojs/sitemap:build: �[0m �[32m@astrojs/sitemap:build: �[0m> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/sitemap �[32m@astrojs/sitemap:build: �[0m> astro-scripts build "src/**/*.ts" && tsc �[32m@astrojs/sitemap:build: �[0m Tasks: 26 successful, 26 total Cached: 5 cached, 26 total Time: 1m17.094s Package �[36m"@astrojs/markdown-remark"�[39m must depend on the current version of �[36m"astro"�[39m: �[32m"0.0.0-shiki-vercel-20230209184129"�[39m vs �[31m"^2.0.2"�[39m 🦋 �[33mwarn�[39m �[31m===============================IMPORTANT!===============================�[39m 🦋 �[33mwarn�[39m Packages will be released under the next--shiki-vercel tag 🦋 �[33mwarn�[39m �[31m----------------------------------------------------------------------�[39m 🦋 �[36minfo�[39m npm info astro 🦋 �[36minfo�[39m npm info @astrojs/prism 🦋 �[36minfo�[39m npm info @astrojs/rss 🦋 �[36minfo�[39m npm info create-astro 🦋 �[36minfo�[39m npm info @astrojs/alpinejs 🦋 �[36minfo�[39m npm info @astrojs/cloudflare 🦋 �[36minfo�[39m npm info @astrojs/deno 🦋 �[36minfo�[39m npm info @astrojs/image 🦋 �[36minfo�[39m npm info @astrojs/lit 🦋 �[36minfo�[39m npm info @astrojs/mdx 🦋 �[36minfo�[39m npm info @astrojs/netlify 🦋 �[36minfo�[39m npm info @astrojs/node 🦋 �[36minfo�[39m npm info @astrojs/partytown 🦋 �[36minfo�[39m npm info @astrojs/preact 🦋 �[36minfo�[39m npm info @astrojs/prefetch 🦋 �[36minfo�[39m npm info @astrojs/react 🦋 �[36minfo�[39m npm info @astrojs/sitemap 🦋 �[36minfo�[39m npm info @astrojs/solid-js 🦋 �[36minfo�[39m npm info @astrojs/svelte 🦋 �[36minfo�[39m npm info @astrojs/tailwind 🦋 �[36minfo�[39m npm info @astrojs/turbolinks 🦋 �[36minfo�[39m npm info @astrojs/vercel 🦋 �[36minfo�[39m npm info @astrojs/vue 🦋 �[36minfo�[39m npm info @astrojs/markdown-component 🦋 �[36minfo�[39m npm info @astrojs/markdown-remark 🦋 �[36minfo�[39m npm info @astrojs/telemetry 🦋 �[36minfo�[39m npm info @astrojs/webapi 🦋 �[36minfo�[39m astro is being published because our local version (0.0.0-shiki-vercel-20230209184129) has not been published on npm 🦋 �[33mwarn�[39m @astrojs/prism is not being published because version 2.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/rss is not being published because version 2.1.0 is already published on npm 🦋 �[33mwarn�[39m create-astro is not being published because version 3.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/alpinejs is not being published because version 0.1.3 is already published on npm 🦋 �[33mwarn�[39m @astrojs/cloudflare is not being published because version 6.1.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/deno is not being published because version 4.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/image is not being published because version 0.14.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/lit is not being published because version 1.2.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/mdx is not being published because version 0.16.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/netlify is not being published because version 2.1.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/node is not being published because version 5.0.3 is already published on npm 🦋 �[33mwarn�[39m @astrojs/partytown is not being published because version 1.0.3 is already published on npm 🦋 �[33mwarn�[39m @astrojs/preact is not being published because version 2.0.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/prefetch is not being published because version 0.1.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/react is not being published because version 2.0.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/sitemap is not being published because version 1.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/solid-js is not being published because version 2.0.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/svelte is not being published because version 2.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/tailwind is not being published because version 3.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/turbolinks is not being published because version 0.1.5 is already published on npm 🦋 �[33mwarn�[39m @astrojs/vercel is not being published because version 3.1.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/vue is not being published because version 2.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/markdown-component is not being published because version 1.0.2 is already published on npm 🦋 �[33mwarn�[39m @astrojs/markdown-remark is not being published because version 2.0.1 is already published on npm 🦋 �[33mwarn�[39m @astrojs/telemetry is not being published because version 2.0.0 is already published on npm 🦋 �[33mwarn�[39m @astrojs/webapi is not being published because version 2.0.0 is already published on npm 🦋 �[36minfo�[39m Publishing �[36m"astro"�[39m at �[32m"0.0.0-shiki-vercel-20230209184129"�[39m 🦋 �[32msuccess�[39m packages published successfully: 🦋 [email protected] 🦋 Creating git tag... 🦋 New tag: [email protected]

@matthewp
Copy link
Contributor Author

matthewp commented Feb 9, 2023

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, but would love to hear more about how this fix works

packages/astro/components/Shiki.js Show resolved Hide resolved
@matthewp matthewp merged commit a9bdd9c into main Feb 9, 2023
@matthewp matthewp deleted the vercel-shiki-fix branch February 9, 2023 19:22
@astrobot-houston astrobot-houston mentioned this pull request Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vercel adapter doesn't work with <Code /> component
2 participants