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

use es2022 instead of es2020 #9293

Merged
merged 1 commit into from
Mar 3, 2023
Merged

use es2022 instead of es2020 #9293

merged 1 commit into from
Mar 3, 2023

Conversation

Rich-Harris
Copy link
Member

closes #8980

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • 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:.

@Conduitry
Copy link
Member

We don't need to worry about this being breaking for anyone? All Cloudflare projects are continuously updated to the latest version of their JS engine? There's no setting in their dashboard for this, and projects don't default to staying on the then-latest version when they were originally created?

@Rich-Harris
Copy link
Member Author

Am basing this on cloudflare/workers-sdk#2720. The runtime is kept up to date for all workers. If somehow this did cause a problem for somewhere (and I'm not sure how it could, given what we know) the worker would fail to deploy — it wouldn't cause failures in production

@dummdidumm
Copy link
Member

I read that doc as "set a compatibility date in your config and workers will not upgrade beyond that", which means changing the build target likely affects some people.

@Rich-Harris
Copy link
Member Author

Cloudflare regularly updates the Workers runtime. These updates apply to all Workers globally

They update the runtime, but they preserve old bugs

@dummdidumm
Copy link
Member

dummdidumm commented Mar 3, 2023

Mhm ok I read it as "runtime is part of the thing you pin", not "code on top of the runtime is what you pin", but maybe that's just me misreading it.

@Rich-Harris
Copy link
Member Author

When it comes to syntax, it's the engine that matters, rather than the runtime, and IIUC workers always run on a recent version of V8 (because of security, and because of the economies of scale from being able to run many workers in a single process regardless of when they were first created). I'm pretty confident this change is safe. If not, we'll find out very soon!

@Rich-Harris Rich-Harris merged commit 9e9a10f into master Mar 3, 2023
@Rich-Harris Rich-Harris deleted the gh-8980 branch March 3, 2023 20:25
@github-actions github-actions bot mentioned this pull request Mar 3, 2023
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.

[feature] adapter-cloudflare: make build target configurable
3 participants