Skip to content

Conversation

@TomStrepsil
Copy link
Contributor

@TomStrepsil TomStrepsil commented May 27, 2025

Issue

resolves #5

Details

  • Move from variantGlob to variantGlobs in the configuration of the webpack plugin.
  • The getVariantFiles module becomes getVariantPaths, returning a Set rather than array of objects. The separation of name and path (just to save unpicking this later) has been replaced for a simpler collection of paths, with the separation now happening at time of need in processVariantFiles using parse.
  • Renamed some related variables for brevity/clarity e.g. filename, directory etc.
  • Updated the express example to use posix character classes and braces for numeric matching in its variantGlobs, to cover support of such, and provide inspiration for those that may prefer this form.

Scout Rule:

  • Avoid needlessly sending variantGlob to processVariantFiles in processPointCuts
  • Fixed a typo in the webpack package README.md ("sinlge" -> "single")

Upgrade guide

This change will represent breaking changes in consumers of the webpack package.

The point cut configuration needs to be modified for the plugin thus:

  • variantGlob option key is renamed to variantGlobs, and its value should be wrapped in []

CheckList

  • PR starts with [ISSUE_ID].
  • Has been tested (where required) before merge to main.

TomStrepsil and others added 8 commits December 24, 2024 17:31
* rename to proper module namespace

* update docs links

* update versions

* web toggle point in readme title

* fixup changelog from revised 0.x range

* 2.0.0 -> 0.5.0 in oss version scheme

* fix broken link syntax in CHANGELOG

* consistent quoting

* more version history issues

* fixup module name in jsdoc

* add web
remove sdkInstanceProvider

* remove SDKInstanceProvider

* fixup jsdoc dedupe

* tweak

* clarity re: ssr package

* casing etc
* update workflows

* version

* typo

* update chromium linux snaps

* versions for serve update

* package.json repository field

* update root package.lock

* bugs & directories/doc fields

* fix changelog

---------

Co-authored-by: Tom Pereira <tom.pereira@johnlewis.co.uk>
Co-authored-by: Tom Pereira <tom.pereira@johnlewis.co.uk>
A few cherry-picks from ASOS#21...
@TomStrepsil TomStrepsil requested a review from a team as a code owner July 14, 2025 16:07
@asos-dominicjomaa asos-dominicjomaa merged commit e84d4b3 into ASOS:main Jul 14, 2025
10 checks passed
@TomStrepsil TomStrepsil deleted the feature/5-support-multiple-variant-globs branch October 21, 2025 09:26
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.

Support an array of variantGlob in Webpack TogglePointInjection Plugin

3 participants