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] fix: make sure that all C3 projects include in their .gitignore the wrangler files #5129

Merged
merged 7 commits into from
Mar 4, 2024

Conversation

dario-piotrowicz
Copy link
Member

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 in
the .gitignore files of all the templates including the full stack ones

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: quality of life improvement not needing documentation

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.

@dario-piotrowicz dario-piotrowicz requested review from a team as code owners February 29, 2024 23:11
Copy link

changeset-bot bot commented Feb 29, 2024

🦋 Changeset detected

Latest commit: 36c028c

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

Copy link
Contributor

@petebacondarwin petebacondarwin left a 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.

.changeset/stale-needles-unite.md Outdated Show resolved Hide resolved
.changeset/stale-needles-unite.md Outdated Show resolved Hide resolved
.changeset/stale-needles-unite.md Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Mar 1, 2024

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 with this latest build directly:

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.


wrangler@3.30.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240223.0
workerd 1.20240223.1 1.20240223.1
workerd --version 1.20240223.1 2024-02-23

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

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.36%. Comparing base (4194495) to head (36c028c).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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     

see 9 files with indirect coverage changes

@dario-piotrowicz
Copy link
Member Author

@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
(so I guess we should look into merging 5135 before merging this PR)

Copy link
Contributor

@petebacondarwin petebacondarwin left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this variable?

Copy link
Member Author

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

variable removed 🙂

@dario-piotrowicz dario-piotrowicz force-pushed the c3-add-wrangler-gitignore branch from 4f17d75 to 4a7c6a0 Compare March 4, 2024 12:54
@dario-piotrowicz
Copy link
Member Author

dario-piotrowicz commented Mar 4, 2024

The e2es are currently failing because of hono, those are getting fixed in #5149

All good now 😄

dario-piotrowicz and others added 5 commits March 4, 2024 14:24
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
@dario-piotrowicz dario-piotrowicz force-pushed the c3-add-wrangler-gitignore branch from 4a7c6a0 to 4bd81d8 Compare March 4, 2024 14:24
.changeset/stale-needles-unite.md Outdated Show resolved Hide resolved
@dario-piotrowicz dario-piotrowicz merged commit 23074c7 into main Mar 4, 2024
22 checks passed
@dario-piotrowicz dario-piotrowicz deleted the c3-add-wrangler-gitignore branch March 4, 2024 22:09
@workers-devprod workers-devprod mentioned this pull request Mar 4, 2024
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.

3 participants