Repository navigation
[build-output-utils] Support fallback static asset exclusions - #17234
petebacondarwin merged 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 54f3435 The changes in this PR will be included in the next version bump. This PR includes changesets to release 12 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 |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/test-server
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
There was a problem hiding this comment.
Superseded by the review of
906e85f7.
This review, of 59ed2478
✅ Approved — No issues found. Existing callers behave as before because the fallback patterns default to an empty list and an empty .assetsignore still turns them off. onSkip reports each pruned entry once, and the tests cover both fallback cases and that the scaffolded patterns match what is written.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The changeset covers the two packages whose public API changed. The asset filtering is opt-in, so existing builds do not change unless a caller passes fallback patterns.
🔒 Security: ✅ LGTM
The fallback patterns come from the caller and default to empty. The reserved output directory is still excluded, and the .dev.vars/.env exclusions are unchanged.
📖 AGENTS.md: ✅ LGTM
No issues with the repository guidelines.
📋 Code Quality: ✅ LGTM
createAssetsIgnoreFunctionappliesfallbackPatternsonly when no.assetsignorecan be read. An empty.assetsignoretherefore still turns the fallback off, and a test covers that case.writeAssetsstill makes the same ignore decision as before. When the file and directory forms of a path disagree, it still callsstatto pick one.onSkipfires once for each pruned entry. A pruned directory is not recursed into, so its children are not reported. The reserved.cloudflareskip is reported too.- The
run.tsrefactor keeps the same scaffolded entries, and the new autoconfig test checks that they match what is written to the file.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The new options have JSDoc comments, and the changeset describes the API additions.
Reviewed commit: 59ed2478
There was a problem hiding this comment.
Superseded by the review of
ea3ca12b.
This review, of 906e85f7
✅ Approved — No issues found. Fallback patterns apply only when .assetsignore is missing, so an empty file still opts out. onSkip reports each pruned entry once, including the reserved .cloudflare entry, and existing callers behave as before.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The changeset covers the packages whose public API changed and releases the additions as minor versions. The filtering is opt-in, so existing builds do not change unless a caller passes fallback patterns.
🔒 Security: ✅ LGTM
The fallback patterns come from the caller and default to an empty list. The reserved output directory is still excluded, and the .dev.vars/.env exclusions are unchanged. If the caller's filter throws, the copy fails rather than letting entries through.
📖 AGENTS.md: ✅ LGTM
No issues with the repository guidelines.
📋 Code Quality: ✅ LGTM
createAssetsIgnoreFunction(packages/workers-shared/utils/helpers.ts) addsfallbackPatternsonly when.assetsignorecannot be read. An empty file returns"", so it still opts out. The default[]leaves existing callers unchanged.- In
writeAssets, the copy filter is now async and awaits the caller's filter.onSkipfires once for each pruned entry, and the children of a pruned directory are not visited, so they are not reported. The reserved.cloudflareentry is also reported. - The
workers-utilswrapper passesfallbackPatternsthrough and still turnsInvalidAssetsIgnoreErrorintoUserError. - The tests cover the fallback when
.assetsignoreis missing, empty, or has content, and they cover the reported reserved-entry skip.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The new options have JSDoc comments, and the changeset describes the API additions.
Reviewed commit: 906e85f7
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
906e85f to
ea3ca12
Compare
There was a problem hiding this comment.
Superseded by the review of
54f34354.
This review, of ea3ca12b
✅ Approved — No issues found. Fallback patterns apply only when .assetsignore is missing, so an empty file still opts out. onSkip reports each pruned entry once, including the reserved .cloudflare entry, and existing callers behave as before.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The changeset covers the packages whose public API changed and releases the additions as minor versions. The filtering is opt-in, so existing builds do not change unless a caller passes fallback patterns.
🔒 Security: ✅ LGTM
The fallback patterns come from the caller and default to an empty list. The reserved output directory is still excluded, and the .dev.vars/.env exclusions are unchanged. If the caller's filter throws, the copy fails rather than letting entries through.
📖 AGENTS.md: ✅ LGTM
No issues with the repository guidelines.
📋 Code Quality: ✅ LGTM
createAssetsIgnoreFunction(packages/workers-shared/utils/helpers.ts) addsfallbackPatternsonly when.assetsignorecannot be read. An empty file returns"", so it still opts out. The default[]leaves existing callers unchanged.- In
writeAssets, the copy filter is now async and awaits the caller's filter.onSkipfires once for each pruned entry, and the children of a pruned directory are not visited, so they are not reported. The reserved.cloudflareentry is also reported. - The
workers-utilswrapper passesfallbackPatternsthrough and still turnsInvalidAssetsIgnoreErrorintoUserError. - The tests cover the fallback when
.assetsignoreis missing, empty, or has content, and they cover the reported reserved-entry skip.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The new options have JSDoc comments, and the changeset describes the API additions.
Reviewed commit: ea3ca12b — same changes as 906e85f7, so this is that commit's review (no new review was run; line numbers are as of 906e85f7)
ea3ca12 to
54f3435
Compare
|
/devin review |
There was a problem hiding this comment.
✅ Approved — No issues found. Fallback patterns apply only when .assetsignore is missing, so an empty file still opts out. onSkip reports each pruned entry once, including the reserved .cloudflare entry, and existing callers behave as before.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
🚀 Release: ✅ LGTM
The changeset covers the packages whose public API changed and releases the additions as minor versions. The filtering is opt-in, so existing builds do not change unless a caller passes fallback patterns.
🔒 Security: ✅ LGTM
The fallback patterns come from the caller and default to an empty list. The reserved output directory is still excluded, and the .dev.vars/.env exclusions are unchanged. If the caller's filter throws, the copy fails rather than letting entries through.
📖 AGENTS.md: ✅ LGTM
No issues with the repository guidelines.
📋 Code Quality: ✅ LGTM
createAssetsIgnoreFunction(packages/workers-shared/utils/helpers.ts) addsfallbackPatternsonly when.assetsignorecannot be read. An empty file returns"", so it still opts out. The default[]leaves existing callers unchanged.- In
writeAssets, the copy filter is now async and awaits the caller's filter.onSkipfires once for each pruned entry, and the children of a pruned directory are not visited, so they are not reported. The reserved.cloudflareentry is also reported. - The
workers-utilswrapper passesfallbackPatternsthrough and still turnsInvalidAssetsIgnoreErrorintoUserError. - The tests cover the fallback when
.assetsignoreis missing, empty, or has content, and they cover the reported reserved-entry skip.
⚡ Performance: ✅ LGTM
No performance concerns.
📝 Documentation: ✅ LGTM
The new options have JSDoc comments, and the changeset describes the API additions.
Reviewed commit: 54f34354 — same changes as 906e85f7, so this is that commit's review (no new review was run; line numbers are as of 906e85f7)
Supports cloudflare/cf#803. Stacked on #17164. Callers can now build their own filter with
createAssetsCopyFilterand the exported scaffolded patterns, then pass it towriteAssets. Fallback patterns apply only when the source has no.assetsignore; an empty file opts out.onSkipreports the relative paths pruned during copying.Note
This is a contribution from Codex.