-
Notifications
You must be signed in to change notification settings - Fork 757
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] fix: make sure that all C3 projects include in their .gitignore
the wrangler files
#5129
Conversation
🦋 Changeset detectedLatest commit: 36c028c 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! Nice tests.
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/8147445097/npm-package-wrangler-5129 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5129/npm-package-wrangler-5129 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-wrangler-5129 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-create-cloudflare-5129 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-cloudflare-kv-asset-handler-5129 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-miniflare-5129 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-cloudflare-pages-shared-5129 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8147445097/npm-package-cloudflare-vitest-pool-workers-5129 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5129 +/- ##
==========================================
+ Coverage 70.31% 70.36% +0.04%
==========================================
Files 298 298
Lines 15550 15551 +1
Branches 4000 4001 +1
==========================================
+ Hits 10934 10942 +8
+ Misses 4616 4609 -7 |
@petebacondarwin sorry I had to tweak some logic here 🙇 , could you please give this PR another quick review? Also, the broken e2es come from Solid, that's being fixed in #5135 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nit
return; | ||
} | ||
|
||
const fileExisted = gitIgnoreExists; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I though it'd add clarity... because at the top of the file I check if the file exists, then here I create the file and at the end of the function I check if the file existed, so gitIgnoreExists
kind of looses meaning and fileExisted
makes much more sense....
if you dislike the extra variable I guess I can use a single variable with a name that comprises both cases, such as gitIgnorePreExisted
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
variable removed 🙂
4f17d75
to
4a7c6a0
Compare
All good now 😄 |
…` the wrangler files
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
the earlier code would break when a .git directory did not existed by throwing an ENOENT error, fix such issue by adding a new directoryExists utility that catches such error
4a7c6a0
to
4bd81d8
Compare
What this PR solves / how to test:
previously only the worker templates included in their
.gitignore
the wrangler files(those being
.dev.vars
and.wrangler
), make sure to instead include such files inthe
.gitignore
files of all the templates including the full stack onesAuthor has addressed the following:
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.