-
Notifications
You must be signed in to change notification settings - Fork 691
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-name-validation-fix #3496
C3-name-validation-fix #3496
Conversation
If you hit enter when asked for the name of the project, you expect it to use the default value. But the project name validation was then failing as it was receiving undefined for the value of the input rather than the default value. Now the validator will be passed the default if no value was provided.
🦋 Changeset detectedLatest commit: ff7e7d5 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/5320150716/npm-package-wrangler-3496 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3496/npm-package-wrangler-3496 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5320150716/npm-package-wrangler-3496 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5320150716/npm-package-cloudflare-pages-shared-3496 Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #3496 +/- ##
==========================================
+ Coverage 75.18% 75.21% +0.02%
==========================================
Files 183 183
Lines 11055 11055
Branches 2904 2904
==========================================
+ Hits 8312 8315 +3
+ Misses 2743 2740 -3 |
I just tried this again locally and actually my fix is wrong. The fix assumes that the I think for C3 PRs we have to be careful to actually pull down the code and run it, since there is very little test coverage, especially for interactive behaviour. |
Added a fix for this in my PR. |
* Remove package-lock.json, which should be handled at the root * [C3] fix: ensure that default project name can be used If you hit enter when asked for the name of the project, you expect it to use the default value. But the project name validation was then failing as it was receiving undefined for the value of the input rather than the default value. Now the validator will be passed the default if no value was provided.
If you hit enter when asked for the name of the project, you expect it
to use the default value. But the project name validation was then failing
as it was receiving undefined for the value of the input rather than the
default value.
Now the validator will be passed the default if no value was provided.
Author has included the following, where applicable:
To test manually:
npm run build
in the root to ensure the binaries are up to date.node ./packages/create-cloudflare/dist/cli.js
Reviewer is to perform the following, as applicable: