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

C3: Relax validation for existing scripts #4177

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

jculvey
Copy link
Contributor

@jculvey jculvey commented Oct 13, 2023

What this PR solves / how to test:

In a previous PR we made project validation a little more strict so that it conforms to the pages project API. However, this could mean that users with existing workers scripts won't be able to retain a name they used previously. This PR relaxes the validation for that one particular use case.

I also found an issue with processArgument where we weren't actually crashing on invalid arguments passed via the command line.

Associated docs issue(s)/PR(s):

  • [insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

Reviewer is to perform the following, as applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@jculvey jculvey requested review from a team as code owners October 13, 2023 15:42
@changeset-bot
Copy link

changeset-bot bot commented Oct 13, 2023

🦋 Changeset detected

Latest commit: ceb1b3b

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

This PR includes changesets to release 1 package
Name Type
create-cloudflare Patch

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
Copy link
Contributor

github-actions bot commented Oct 13, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6513026833/npm-package-wrangler-4177

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6513026833/npm-package-wrangler-4177

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6513026833/npm-package-wrangler-4177 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/6513026833/npm-package-cloudflare-pages-shared-4177

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.13.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare 3.20231010.0 3.20231010.0
workerd 1.20231010.0 1.20231010.0
workerd --version 1.20231010.0 2023-10-10

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

packages/create-cloudflare/src/__tests__/common.test.ts Outdated Show resolved Hide resolved
packages/create-cloudflare/src/common.ts Outdated Show resolved Hide resolved
@jculvey jculvey merged commit 2162501 into main Oct 13, 2023
24 checks passed
@jculvey jculvey deleted the c3-relax-validation-for-existing-scripts branch October 13, 2023 21:13
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.

2 participants