-
Notifications
You must be signed in to change notification settings - Fork 697
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
[wrangler] move assets.directory logs on file changes to debug #6873
Conversation
🦋 Changeset detectedLatest commit: 74e086e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
packages/wrangler/src/dev.tsx
Outdated
}).on("all", async (eventName, changedPath) => { | ||
const message = getAssetChangeMessage(eventName, changedPath); | ||
|
||
logger.log(`🌀 ${message}...`); |
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 think we should log the message inside the debounce
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.
Log something like "x files in assets directory changed"?
b582e95
to
4e9ea1a
Compare
This change doesn't catch the logging in
|
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/11145622423/npm-package-wrangler-6873 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6873/npm-package-wrangler-6873 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-wrangler-6873 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-create-cloudflare-6873 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-cloudflare-kv-asset-handler-6873 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-miniflare-6873 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-cloudflare-pages-shared-6873 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-cloudflare-vitest-pool-workers-6873 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-cloudflare-workers-editor-shared-6873 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11145622423/npm-package-cloudflare-workers-shared-6873 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
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.
Can you continue logging each asset change message but use logger.debug
instead? This would reduce noise by default but still have this info accessible if necessary. Thanks so much for all the PRs and issues btw, really appreciate it!
4e9ea1a
to
2317334
Compare
That's a much better idea. I made that change, and also changed the logging in x-dev-env |
I also did the same in #6881 My rationale was we don't print the source files changes when we reload the dev server so there's no need to do so for assets either |
Congratulations @zwily, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm1rzbk1m24280cmcjve1as6e This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Thanks everyone! |
What this PR solves / how to test
When using
wrangler dev
with a worker with an assets dir set, every time a file changed in that dir, it was logged. This causes a lot of noise when that dir is the target of a build (like with remix). This commit moved that logging to debug.Fixes N/A
Author has addressed the following