-
Notifications
You must be signed in to change notification settings - Fork 712
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
Avoid uploading the functions/
directory as part of wrangler pages publish
#2103
Conversation
🦋 Changeset detectedLatest commit: ccafb81 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.developers.workers.dev/runs/3376938856/npm-package-wrangler-2103 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/2103/npm-package-wrangler-2103 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/3376938856/npm-package-wrangler-2103 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.developers.workers.dev/runs/3376938856/npm-package-cloudflare-pages-shared-2103 |
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.
Compiled Worker successfully.
IGNORING functions
IGNORING node_modules
Nice. This looks good to me, looks like a test needs updating
Ty for fixing this!
8d381cd
to
ea8d918
Compare
Codecov Report
@@ Coverage Diff @@
## main #2103 +/- ##
==========================================
+ Coverage 73.11% 73.20% +0.09%
==========================================
Files 127 128 +1
Lines 8610 8641 +31
Branches 2264 2266 +2
==========================================
+ Hits 6295 6326 +31
Misses 2315 2315
|
ea8d918
to
5eab88c
Compare
Didn't mean to leave in that |
5eab88c
to
a31c6d0
Compare
I think it might be nice to have a log for it tbh |
Maybe we can add it back later with a |
a31c6d0
to
fc8b0d2
Compare
fc8b0d2
to
9ab845a
Compare
TIL. I had no idea this is happening. Can you please add some tests for the scope of this PR? I'm thinking a unit test to verify that output Walshy mentioned (or smth along those lines)
and maybe a fixture (could also update an existing fixture) to test that other than that 💯 |
9ab845a
to
ccafb81
Compare
I'd warn against logging it or reword the message or something. If I'm a new user and I don't know what it means, it looks like |
Don't upload
functions/
directory as part ofwrangler pages publish
If the root directory of a project was the same as the build output directory, we were previously uploading the
functions/
directory as static assets. This PR now ensures that thefunctions/
files are only used to create Pages Functions and are no longer uploaded as static assets.Additionally, we also now do upload
_worker.js
,_headers
,_redirects
and_routes.json
if they aren't immediate children of the build output directory. Previously, we'd ignore all files with this name regardless of location. For example, if you have apublic/blog/how-to-use-pages/_headers
file (wherepublic
is your build output directory), we will now upload the_headers
file as a static asset.