Conversation
🦋 Changeset detectedLatest commit: 849ca40 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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/5327501920/npm-package-wrangler-3465You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3465/npm-package-wrangler-3465Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5327501920/npm-package-wrangler-3465 dev path/to/script.jsAdditional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5327501920/npm-package-cloudflare-pages-shared-3465Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #3465 +/- ##
==========================================
- Coverage 75.20% 75.10% -0.10%
==========================================
Files 183 183
Lines 11064 11084 +20
Branches 2906 2918 +12
==========================================
+ Hits 8321 8325 +4
- Misses 2743 2759 +16 |
| crash( | ||
| `Directory \`${relativePath}\` already exists and is not empty. Please choose a new name.` | ||
| ); | ||
| if (relativePath && existsAlready && !isEmpty) { |
There was a problem hiding this comment.
Do we need to check relativePath is truthy? If it is an empty string, existsAlready will be false
There was a problem hiding this comment.
We do if we want to have validateProjectDirectory work with both the interactive prompt as well as setupProjectDirectory.
The issue is with the way the clack text prompt is handling user input. If you run c3 with current main and hit enter when prompted with the default project directory it will fail with Directory "" already exists and isn't empty. Clack handles empty string input by replacing it with defaultValue where supplied, but it only does so AFTER running the validator. When the validator doesn't allow empty string, it fails, and clack doesn't get a chance to default it.
There was a problem hiding this comment.
I think this was fixed by @petebacondarwin in #3496
There was a problem hiding this comment.
Cool, reverted this bit, but still returning error as string instead of crashing
d7553d7 to
dd7558b
Compare
Fixes #3394.
What this PR solves / how to test:
This fixes a couple of things:
-in some terminals.Author has included the following, where applicable:
Reviewer is to perform the following, as applicable: