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

feat: log a warning message if a page is being prerendered with runtime environment variables #10805

Closed
wants to merge 5 commits into from

Conversation

baterson
Copy link

@baterson baterson commented Sep 29, 2023

closes #10008

Log a Warning message if a page is being prerendered with the runtime environment variables to prevent possible mistakes and leaking private data from env


  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

@changeset-bot
Copy link

changeset-bot bot commented Sep 29, 2023

⚠️ No Changeset found

Latest commit: 4a7d9ae

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kit-default-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2023 9:11am

@vercel
Copy link

vercel bot commented Oct 4, 2023

Someone is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@baterson baterson changed the title Throw an error if a page is being prerendered with the runtime environment variables module (#10737) Log a Warning message if a page is being prerendered with the runtime environment variables module (#10737) Oct 4, 2023
@baterson baterson marked this pull request as ready for review October 4, 2023 09:46
@eltigerchino eltigerchino changed the title Log a Warning message if a page is being prerendered with the runtime environment variables module (#10737) feat: log a warning message if a page is being prerendered with runtime environment variables (#10737) Oct 5, 2023
@eltigerchino eltigerchino changed the title feat: log a warning message if a page is being prerendered with runtime environment variables (#10737) feat: log a warning message if a page is being prerendered with runtime environment variables Oct 10, 2023
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
@Rich-Harris
Copy link
Member

closing in favour of #11277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

$env/dynamic/public becomes $env/static/public for pre-rendered pages, breaking app and exposing information
3 participants