-
Notifications
You must be signed in to change notification settings - Fork 31
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
[Feat] #381 Also consider crawl filter as a regexp #382
Conversation
*/ | ||
const pathnameMatchesFilter = (path, filter) => { | ||
try { | ||
if (!filter || filter.length === 0 || path.startsWith(filter)) { |
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.
startsWith
is most likely overkill, but I wanted no doubt that the current functionality would not change.
// eslint-disable-next-line no-console | ||
console.error(`Could not test path ${path} with provided filter: ${filter}`, e); | ||
alert.error(`Could not test path with provided filter: ${filter}`); | ||
return false; |
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.
Should the error be re-thrown? Should this error be added to an import report?
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.
alert
is fine.
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.
Looks good
// eslint-disable-next-line no-console | ||
console.error(`Could not test path ${path} with provided filter: ${filter}`, e); | ||
alert.error(`Could not test path with provided filter: ${filter}`); | ||
return false; |
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.
alert
is fine.
🎉 This PR is included in version 1.51.31 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
* fix(deps): update dependency @adobe/helix-importer to v3.4.3 (#368) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.19 [skip ci] ## [1.51.19](v1.51.18...v1.51.19) (2024-06-07) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.3 ([#368](#368)) ([c62cd1f](c62cd1f)) * fix(deps): update dependency @adobe/helix-importer to v3.4.4 (#369) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.20 [skip ci] ## [1.51.20](v1.51.19...v1.51.20) (2024-06-07) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.4 ([#369](#369)) ([2ab0bbd](2ab0bbd)) * chore(deps): update external fixes (#370) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update adobe fixes (#371) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.21 [skip ci] ## [1.51.21](v1.51.20...v1.51.21) (2024-06-09) ### Bug Fixes * **deps:** update adobe fixes ([#371](#371)) ([74595c8](74595c8)) * fix(deps): update dependency @adobe/helix-importer to v3.4.6 (#372) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.22 [skip ci] ## [1.51.22](v1.51.21...v1.51.22) (2024-06-09) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.6 ([#372](#372)) ([b3f5849](b3f5849)) * fix(deps): update dependency @adobe/helix-importer to v3.4.7 (#373) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.23 [skip ci] ## [1.51.23](v1.51.22...v1.51.23) (2024-06-09) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.7 ([#373](#373)) ([0edd45b](0edd45b)) * chore(deps): update dependency c8 to v10 (#374) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update external fixes (#379) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.24 [skip ci] ## [1.51.24](v1.51.23...v1.51.24) (2024-06-15) ### Bug Fixes * **deps:** update external fixes ([#379](#379)) ([dedbce8](dedbce8)) * fix(deps): update external fixes (#384) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.25 [skip ci] ## [1.51.25](v1.51.24...v1.51.25) (2024-06-22) ### Bug Fixes * **deps:** update external fixes ([#384](#384)) ([c5302c3](c5302c3)) * fix(deps): update dependency @adobe/helix-importer to v3.4.8 (#385) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.26 [skip ci] ## [1.51.26](v1.51.25...v1.51.26) (2024-06-22) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.8 ([#385](#385)) ([dbcef27](dbcef27)) * fix(deps): update dependency @adobe/helix-importer to v3.4.9 (#386) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.27 [skip ci] ## [1.51.27](v1.51.26...v1.51.27) (2024-06-23) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.9 ([#386](#386)) ([9087858](9087858)) * fix(deps): update dependency @adobe/helix-importer to v3.4.10 (#388) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.28 [skip ci] ## [1.51.28](v1.51.27...v1.51.28) (2024-06-29) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.10 ([#388](#388)) ([9335765](9335765)) * chore(deps): update dependency mocha to v10.5.2 (#389) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @adobe/helix-importer to v3.4.11 (#390) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.29 [skip ci] ## [1.51.29](v1.51.28...v1.51.29) (2024-07-05) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.11 ([#390](#390)) ([d2c4622](d2c4622)) * chore(deps): update dependency mocha to v10.6.0 (#392) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @adobe/helix-importer to v3.4.12 (#393) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.30 [skip ci] ## [1.51.30](v1.51.29...v1.51.30) (2024-07-08) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.12 ([#393](#393)) ([e1a1dd1](e1a1dd1)) * [Feat] #381 Also consider crawl filter as a regexp (#382) * chore(deps): update external fixes (#400) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update dependency @adobe/helix-importer to v3.4.13 (#401) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.31 [skip ci] ## [1.51.31](v1.51.30...v1.51.31) (2024-07-14) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.13 ([#401](#401)) ([7e8208d](7e8208d)) * chore(deps): update external fixes (#403) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency mocha to v10.7.0 (#404) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @babel/eslint-parser to v7.25.0 (#408) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update external fixes (#409) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix(deps): update external fixes (#410) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.32 [skip ci] ## [1.51.32](v1.51.31...v1.51.32) (2024-08-10) ### Bug Fixes * **deps:** update external fixes ([#410](#410)) ([f2619bb](f2619bb)) * fix(deps): update dependency @adobe/helix-importer to v3.4.14 (#412) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency webpack-merge to v6 (#394) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(release): 1.51.33 [skip ci] ## [1.51.33](v1.51.32...v1.51.33) (2024-08-13) ### Bug Fixes * **deps:** update dependency @adobe/helix-importer to v3.4.14 ([#412](#412)) ([c343bc4](c343bc4)) * chore(sm-import): merge main --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: semantic-release-bot <semantic-release-bot@martynus.net> Co-authored-by: Andrew Top <top.od.morning@gmail.com>
Description
Also evaluate a possible page path with the provided filter as a RegExp (not just startsWith).
Ensure current behavior is not changed.
Related Issue
#381 (Hubble Homes VIP)
Motivation and Context
Hubble Homes has a very distinct path for a certain template. The path ends in "/999". They'd like to target the import to only work on those pages.
How Has This Been Tested?
Manually.
Screenshots (if appropriate):
Nothing changed visually.
Types of changes
Checklist: