-
Notifications
You must be signed in to change notification settings - Fork 984
[C3 + wrangler] wrangler init … -y
delegates to C3 without prompts (respects the -y
flag)
#3359
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
Conversation
🦋 Changeset detectedLatest commit: 736ec96 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
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/5221030979/npm-package-wrangler-3359 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3359/npm-package-wrangler-3359 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5221030979/npm-package-wrangler-3359 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5221030979/npm-package-cloudflare-pages-shared-3359 Note that these links will no longer work once the GitHub Actions artifact expires. |
wrangler init ... -y
delegates to C3 without prompts (respects the -y
flag)wrangler init … -y
delegates to C3 without prompts (respects the -y
flag)
when delegating to c3 with --wrangler-defaults
Codecov Report
@@ Coverage Diff @@
## main #3359 +/- ##
==========================================
+ Coverage 75.43% 75.44% +0.01%
==========================================
Files 182 182
Lines 11055 11060 +5
Branches 2898 2903 +5
==========================================
+ Hits 8339 8344 +5
Misses 2716 2716
|
Doesn't seem to work with the preview build:
also might wanna update the text recommending |
Ah yeah good catch wrangler calls out to
Thanks for catching this. There is an ongoing convo with @petebacondarwin who is conscious of having outdated versions of wrangler@3 installed on machines running newer versions of C3 (>2) which may not be compatible with the expected behaviour. I'll factor this into the convo when we next bring it up |
Fixes #3333 #3319
What this PR solves / how to test:
When
wrangler init … -y
delegates to C3, it now sets a hidden flag–wrangler-defaults
which will skip all prompts in C3. Fixes #3333Test by running
wrangler init -y
orwrangler init --from-dash test -y
and confirm the process exits without user input.Also, C3 now allows to use an existing directory if it is empty. Fixes #3319
Test by setting the project directory to 1. an empty directory, and 2. a non-empty directory. The former succeeds while the latter will fail
Associated docs issue(s)/PR(s):
Author has included the following, where applicable:
Reviewer is to perform the following, as applicable: