Skip to content

feat(vercel): skew protection#10761

Merged
ematipico merged 2 commits intomainfrom
feat/skew-protection
May 8, 2024
Merged

feat(vercel): skew protection#10761
ematipico merged 2 commits intomainfrom
feat/skew-protection

Conversation

@ematipico
Copy link
Copy Markdown
Member

@ematipico ematipico commented Apr 11, 2024

Changes

This PR adds the skew protection feature, available on Vercel: https://vercel.com/docs/deployments/skew-protection

Testing

I manually tested using our Astro account and confirmed that I can see the deployment ID header.

Docs

withastro/docs#8188

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 11, 2024

🦋 Changeset detected

Latest commit: c25c148

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: integration Related to any renderer integration (scope) label Apr 11, 2024
@ematipico
Copy link
Copy Markdown
Member Author

!preview skew-protection

@github-actions
Copy link
Copy Markdown
Contributor

Snapshots have been released for the following packages:

  • astro@experimental--skew-protection
  • @astrojs/vercel@experimental--skew-protection
Publish Log
🦋  warn ===============================IMPORTANT!===============================
🦋  warn Packages will be released under the experimental--skew-protection tag
🦋  warn ----------------------------------------------------------------------
🦋  info npm info astro
🦋  info npm info @astrojs/prism
🦋  info npm info @astrojs/rss
🦋  info npm info create-astro
🦋  info npm info @astrojs/db
🦋  info npm info @astrojs/alpinejs
🦋  info npm info @astrojs/lit
🦋  info npm info @astrojs/markdoc
🦋  info npm info @astrojs/mdx
🦋  info npm info @astrojs/node
🦋  info npm info @astrojs/partytown
🦋  info npm info @astrojs/preact
🦋  info npm info @astrojs/react
🦋  info npm info @astrojs/sitemap
🦋  info npm info @astrojs/solid-js
🦋  info npm info @astrojs/svelte
🦋  info npm info @astrojs/tailwind
🦋  info npm info @astrojs/vercel
🦋  info npm info @astrojs/vue
🦋  info npm info @astrojs/internal-helpers
🦋  info npm info @astrojs/markdown-remark
🦋  info npm info @astrojs/telemetry
🦋  info npm info @astrojs/underscore-redirects
🦋  info npm info @astrojs/upgrade
🦋  info astro is being published because our local version (0.0.0-skew-protection-20240412093445) has not been published on npm
🦋  warn @astrojs/prism is not being published because version 3.1.0 is already published on npm
🦋  warn @astrojs/rss is not being published because version 4.0.5 is already published on npm
🦋  warn create-astro is not being published because version 4.8.0 is already published on npm
🦋  warn @astrojs/db is not being published because version 0.10.3 is already published on npm
🦋  warn @astrojs/alpinejs is not being published because version 0.4.0 is already published on npm
🦋  warn @astrojs/lit is not being published because version 4.0.1 is already published on npm
🦋  warn @astrojs/markdoc is not being published because version 0.10.0 is already published on npm
🦋  warn @astrojs/mdx is not being published because version 2.3.0 is already published on npm
🦋  warn @astrojs/node is not being published because version 8.2.5 is already published on npm
🦋  warn @astrojs/partytown is not being published because version 2.0.4 is already published on npm
🦋  warn @astrojs/preact is not being published because version 3.2.0 is already published on npm
🦋  warn @astrojs/react is not being published because version 3.3.0 is already published on npm
🦋  warn @astrojs/sitemap is not being published because version 3.1.2 is already published on npm
🦋  warn @astrojs/solid-js is not being published because version 4.1.0 is already published on npm
🦋  warn @astrojs/svelte is not being published because version 5.4.0 is already published on npm
🦋  warn @astrojs/tailwind is not being published because version 5.1.0 is already published on npm
🦋  info @astrojs/vercel is being published because our local version (0.0.0-skew-protection-20240412093445) has not been published on npm
🦋  warn @astrojs/vue is not being published because version 4.1.0 is already published on npm
🦋  warn @astrojs/internal-helpers is not being published because version 0.4.0 is already published on npm
🦋  warn @astrojs/markdown-remark is not being published because version 5.1.0 is already published on npm
🦋  warn @astrojs/telemetry is not being published because version 3.1.0 is already published on npm
🦋  warn @astrojs/underscore-redirects is not being published because version 0.3.3 is already published on npm
🦋  warn @astrojs/upgrade is not being published because version 0.3.0 is already published on npm
🦋  info Publishing "astro" at "0.0.0-skew-protection-20240412093445"
🦋  info Publishing "@astrojs/vercel" at "0.0.0-skew-protection-20240412093445"
🦋  success packages published successfully:
🦋  astro@0.0.0-skew-protection-20240412093445
🦋  @astrojs/vercel@0.0.0-skew-protection-20240412093445
🦋  Creating git tags...
🦋  New tag:  astro@0.0.0-skew-protection-20240412093445
🦋  New tag:  @astrojs/vercel@0.0.0-skew-protection-20240412093445
Build Log

> root@0.0.0 build /home/runner/work/astro/astro
> turbo run build --filter=astro --filter=create-astro --filter="@astrojs/*" --filter="@benchmark/*"

• Packages in scope: @astrojs/alpinejs, @astrojs/cloudflare, @astrojs/db, @astrojs/internal-helpers, @astrojs/lit, @astrojs/markdoc, @astrojs/markdown-remark, @astrojs/mdx, @astrojs/netlify, @astrojs/node, @astrojs/partytown, @astrojs/preact, @astrojs/prism, @astrojs/react, @astrojs/rss, @astrojs/sitemap, @astrojs/solid-js, @astrojs/svelte, @astrojs/tailwind, @astrojs/telemetry, @astrojs/underscore-redirects, @astrojs/upgrade, @astrojs/vercel, @astrojs/vue, @benchmark/timer, astro, create-astro
• Running build in 27 packages
• Remote caching enabled
::group::@astrojs/prism:build
cache hit, suppressing logs e61ce24fcd0cfb9c
::endgroup::
::group::create-astro:build
cache hit, suppressing logs 5130f60315f269d4
::endgroup::
::group::@astrojs/telemetry:build
cache hit, suppressing logs 349162f8a5154734
::endgroup::
::group::@astrojs/upgrade:build
cache hit, suppressing logs 76169798a57287d9
::endgroup::
::group::@astrojs/internal-helpers:build
cache hit, suppressing logs da82f9152f39065d
::endgroup::
::group::@astrojs/markdown-remark:build
cache hit, suppressing logs 7b10e4281270ac01
::endgroup::
::group::astro:build
cache miss, executing 56a0ac5655fe9ebb

> astro@0.0.0-skew-protection-20240412093445 build /home/runner/work/astro/astro/packages/astro
> pnpm run prebuild && astro-scripts build "src/**/*.{ts,js}" && tsc && pnpm run postbuild


> astro@0.0.0-skew-protection-20240412093445 prebuild /home/runner/work/astro/astro/packages/astro
> astro-scripts prebuild --to-string "src/runtime/server/astro-island.ts" "src/runtime/client/{idle,load,media,only,visible}.ts"


> astro@0.0.0-skew-protection-20240412093445 postbuild /home/runner/work/astro/astro/packages/astro
> astro-scripts copy "src/**/*.astro" && astro-scripts copy "src/**/*.wasm"

::endgroup::
::group::@astrojs/lit:build
cache miss, executing 9077f147165d1922

> @astrojs/lit@4.0.1 build /home/runner/work/astro/astro/packages/integrations/lit
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/partytown:build
cache miss, executing 974f11f448db718a

> @astrojs/partytown@2.0.4 build /home/runner/work/astro/astro/packages/integrations/partytown
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/alpinejs:build
cache miss, executing a25c61e660731e8b

> @astrojs/alpinejs@0.4.0 build /home/runner/work/astro/astro/packages/integrations/alpinejs
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/rss:build
cache miss, executing 30e48c659d7e3152

> @astrojs/rss@4.0.5 build /home/runner/work/astro/astro/packages/astro-rss
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@benchmark/timer:build
cache miss, executing e45c16ab0b9393a2

> @benchmark/timer@0.0.0 build /home/runner/work/astro/astro/benchmark/packages/timer
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/preact:build
cache miss, executing bbd7803d1b71b74d

> @astrojs/preact@3.2.0 build /home/runner/work/astro/astro/packages/integrations/preact
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/node:build
cache miss, executing 48b31c0c81f55869

> @astrojs/node@8.2.5 build /home/runner/work/astro/astro/packages/integrations/node
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/tailwind:build
cache miss, executing cea335f8c40a50ca

> @astrojs/tailwind@5.1.0 build /home/runner/work/astro/astro/packages/integrations/tailwind
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/mdx:build
cache miss, executing 0a517bb6077f6f2a

> @astrojs/mdx@2.3.0 build /home/runner/work/astro/astro/packages/integrations/mdx
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/svelte:build
cache miss, executing 1f48ced8332572db

> @astrojs/svelte@5.4.0 build /home/runner/work/astro/astro/packages/integrations/svelte
> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc

::endgroup::
::group::@astrojs/underscore-redirects:build
cache miss, executing d7f4d4a5e8e562c7

> @astrojs/underscore-redirects@0.3.3 build /home/runner/work/astro/astro/packages/underscore-redirects
> astro-scripts build "src/**/*.ts" && tsc -p tsconfig.json

::endgroup::
::group::@astrojs/solid-js:build
cache miss, executing 621379e26a0e2c9f

> @astrojs/solid-js@4.1.0 build /home/runner/work/astro/astro/packages/integrations/solid
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/react:build
cache miss, executing 8ee5a380e100ab05

> @astrojs/react@3.3.0 build /home/runner/work/astro/astro/packages/integrations/react
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/vercel:build
cache miss, executing d44aa6ac4be62518

> @astrojs/vercel@0.0.0-skew-protection-20240412093445 build /home/runner/work/astro/astro/packages/integrations/vercel
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/vue:build
cache miss, executing a1377a5867b93bf1

> @astrojs/vue@4.1.0 build /home/runner/work/astro/astro/packages/integrations/vue
> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc

::endgroup::
::group::@astrojs/markdoc:build
cache miss, executing 089b3adee12bd769

> @astrojs/markdoc@0.10.0 build /home/runner/work/astro/astro/packages/integrations/markdoc
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/sitemap:build
cache miss, executing dc994c385db75e55

> @astrojs/sitemap@3.1.2 build /home/runner/work/astro/astro/packages/integrations/sitemap
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/db:build
cache miss, executing e5b105445fe4af44

> @astrojs/db@0.10.3 build /home/runner/work/astro/astro/packages/db
> astro-scripts build "src/**/*.ts" && tsc && pnpm types:virtual


> @astrojs/db@0.10.3 types:virtual /home/runner/work/astro/astro/packages/db
> tsc -p ./tsconfig.virtual.json

::endgroup::

 Tasks:    25 successful, 25 total
Cached:    6 cached, 25 total
  Time:    46.41s 

@ematipico ematipico marked this pull request as ready for review April 26, 2024 14:51
Copy link
Copy Markdown
Contributor

@matthewp matthewp left a comment

Choose a reason for hiding this comment

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

lgtm

@ematipico
Copy link
Copy Markdown
Member Author

Docs are up too, and I notified Sarah. I suppose we can ship it with Astro 4.8

@ematipico ematipico merged commit f0acd30 into main May 8, 2024
@ematipico ematipico deleted the feat/skew-protection branch May 8, 2024 14:05
@astrobot-houston astrobot-houston mentioned this pull request May 8, 2024
ematipico added a commit that referenced this pull request Feb 6, 2025
* feat(vercel): skew protection

* feat(vercel): skew protection
github-merge-queue bot pushed a commit to vercel/vercel that referenced this pull request Jul 7, 2025
Adds support for [Vercel Skew
Protection](https://vercel.com/docs/skew-protection#supported-frameworks)
for React Router v7, with similar implementation as
[Astro](withastro/astro#10761).

Requested by @dieDeMiguel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants