diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index ee90a14..ebbf74e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ # Issue -[_ISSUE_ID_](https://github.com/ASOS/web-toggle-point/issues/_ISSUE_ID_) +resolves #_ISSUE_ID_ ## Details diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bfcd51b..0a4881a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -14,11 +14,31 @@ N.B. See changelogs for individual packages, where most change will occur: This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo). +## [0.10.5] - 2025-03-06 + +### Fixed + +- updated the `CONTRIBUTING.md`: + - clarification regarding changes needing to be committed for the `danger:local` script to be effective + - clarification regarding write access or forking being needed to open a pull request + +### Changed + +- updated main `README.md`: + - linked to `CONTRIBUTING.md` + - added link to repo discussions, alongside the issues + - clarified the convention-based approach to advice +- updated `pull_request_template.md` to ensure "resolves #issue" is prompted, to make sure linked issues are closed automatically with PR merges + +### Added + + - a `danger:local:staged` command to augment the above danger fix + ## [0.10.4] - 2025-03-06 ### Fixed -- Ensured that the registry is explicitly set, to ensure that [`@actions/setup-node`](https://github.com/actions/setup-node) honours the `NODE_AUTH_TOKEN` +- ensured that the registry is explicitly set, to ensure that [`@actions/setup-node`](https://github.com/actions/setup-node) honours the `NODE_AUTH_TOKEN` ## [0.10.3] - 2025-02-27 diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 453730e..48ae95f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -16,6 +16,9 @@ On this project we follow mainline development (or trunk based development), and Therefore you need to branch / fork from `main` and merge into `main`. +> [!NOTE] +> To contribute a pull request, [you will need to fork the repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) or be given [write access](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request), so get in touch to discuss the latter! + ### Coding style Generally try to match the style and conventions of the code around your changes. Ultimately we want code that is clear, concise, consistent and easy to read. @@ -35,6 +38,12 @@ npm run test:unit npm run test:automation npm run danger:local ``` +> [!NOTE] +> N.B. The `danger:local` script requires staged changes to be committed, otherwise you will receive the message: +> +> `No git changes detected between head and main` +> +> If you'd like to check just staged commits, you can instead run `npm run danger:local:staged` ## Opening a PR diff --git a/docs/README.md b/docs/README.md index e6e59fa..a59e5f2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -31,11 +31,11 @@ A library providing a means to toggle or branch web application code. ### 🐬 Purpose -This library provides a means to toggle or branch application code. +This library provides a means to toggle or branch application code at runtime, whilst mitigating the carrying costs of doing so. It aims to enable low friction feature toggling [aspect/advice](https://en.wikipedia.org/wiki/Advice_(programming))[^1] in a codebase. -It suggests a convention-based approach to storing variant code, aiming to mitigate [boilerplate](https://en.wikipedia.org/wiki/Boilerplate_code) whilst developing new features, and reduce the friction of accepting or rejecting toggled variations, when appropriate. +It suggests a convention-based approach to storing variant code, aiming to mitigate [boilerplate](https://en.wikipedia.org/wiki/Boilerplate_code) whilst developing new features, and reduce the friction of accepting or rejecting toggled variations, if and when the time arises. Originally developed for experiment toggles / flags, it acts only as a means to implement a toggle point, separating any toggle router concern, so is agnostic of the type of toggle or flag. @@ -84,7 +84,7 @@ Please see separate [examples documentation](../examples/README.md). ### 🔜 Future Plans -Please see [issues](https://github.com/ASOS/web-toggle-point/issues) and please consider contributing! +Please see [discussions](https://github.com/ASOS/web-toggle-point/discussions) and [issues](https://github.com/ASOS/web-toggle-point/issues), and please consider [contributing](./CONTRIBUTING.md)! ### 🔗 Links diff --git a/examples/express/README.md b/examples/express/README.md index 6fe37d1..ac9e6f6 100644 --- a/examples/express/README.md +++ b/examples/express/README.md @@ -4,8 +4,8 @@ Some example applications based on an [express](https://expressjs.com/) router 1. [animals](./src/routes/animals/README.md) - This is a basic example using the [`webpack`](../packages/webpack/docs/README.md) package. + This is a basic example using the [`webpack`](../../packages/webpack/docs/README.md) package. 2. [config](./src/routes/config/README.md) - This example shows the use of the [`react-pointcuts`](../packages/react-pointcuts/docs/README.md), [`features`](../packages/features/docs/README.md), [`ssr`](../packages/ssr/docs/README.md) and [`webpack`](../packages/webpack/docs/README.md) packages. + This example shows the use of the [`react-pointcuts`](../../packages/react-pointcuts/docs/README.md), [`features`](../../packages/features/docs/README.md), [`ssr`](../../packages/ssr/docs/README.md) and [`webpack`](../../packages/webpack/docs/README.md) packages. diff --git a/examples/express/docs/CHANGELOG.md b/examples/express/docs/CHANGELOG.md index 6ac4195..89d7780 100644 --- a/examples/express/docs/CHANGELOG.md +++ b/examples/express/docs/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.4] - 2024-02-07 + +### Fixed + +- corrected some links to packages from the examples readme +- removed orphan `index.js` in the animals example, this has been supplanted by `router.js` + ## [0.2.3] - 2024-12-24 ### Changed diff --git a/examples/express/package.json b/examples/express/package.json index 995407b..75ecd27 100644 --- a/examples/express/package.json +++ b/examples/express/package.json @@ -1,6 +1,6 @@ { "name": "web-toggle-point-express-example", - "version": "0.2.3", + "version": "0.2.4", "type": "module", "engines": { "node": ">=20.6.0" diff --git a/examples/express/src/routes/animals/index.js b/examples/express/src/routes/animals/index.js deleted file mode 100644 index a59d851..0000000 --- a/examples/express/src/routes/animals/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Router } from "express"; -import streamImage from "./streamImage.js"; -import featuresStore from "./featuresStore.js"; -import featuresMiddleware from "./middleware.js"; - -const router = Router(); - -router.use(featuresMiddleware); -router.get("/images", (_, response) => { - console.log("running images route"); - return streamImage(response); -}); -router.get("/", (_, response) => { - response.send(` - - - An animal - - `); -}); - -export default router; diff --git a/examples/next/docs/CHANGELOG.md b/examples/next/docs/CHANGELOG.md index 8f4e287..735a7ff 100644 --- a/examples/next/docs/CHANGELOG.md +++ b/examples/next/docs/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.3] - 2025-02-07 + +### Fixed + +- fixed a regression in the ability to use `?showExperiments` query in the experiments fixtures, regressed in version `0.2.0`. + ## [0.2.2] - 2024-12-24 ### Fixed diff --git a/examples/next/package.json b/examples/next/package.json index b7478e4..60a4744 100644 --- a/examples/next/package.json +++ b/examples/next/package.json @@ -1,6 +1,6 @@ { "name": "web-toggle-point-next-example", - "version": "0.2.2", + "version": "0.2.3", "private": true, "type": "module", "scripts": { diff --git a/examples/next/src/app/fixtures/experiments/example.tsx b/examples/next/src/app/fixtures/experiments/example.tsx index 7b33b2b..c008a1c 100644 --- a/examples/next/src/app/fixtures/experiments/example.tsx +++ b/examples/next/src/app/fixtures/experiments/example.tsx @@ -9,11 +9,10 @@ const Example = ({ children, experiments }) => { const searchParams = useSearchParams(); const FeaturesProvider = providerFactory(); return ( -
+
+ {searchParams.has("showExperiments") ? ( + {JSON.stringify(experiments)} + ) : undefined}
{children}
diff --git a/examples/next/src/app/fixtures/experiments/styles.module.css b/examples/next/src/app/fixtures/experiments/styles.module.css index 6e463d0..faaf04d 100644 --- a/examples/next/src/app/fixtures/experiments/styles.module.css +++ b/examples/next/src/app/fixtures/experiments/styles.module.css @@ -14,25 +14,16 @@ } } -.debug { - & script { - display: inline; - font-family: monospace; - width: 100%; - padding: 2px; - margin: 2px; - flex: 0 0 auto; - background: #eee; - border: 1px solid #ccc; - } - & script[id$="decisions"]{ - &::before { - content: "decisions: "; - } - } - & script[id$="audience"] { - &::before { - content: "audience: "; - } - } +.code { + padding: 0.2em; + background: #eee; + border: 1px solid #ccc; + text-indent: -7em; +} +.code::before { + content: "experiments: "; + position: relative; + left: 5.5em; + top: -1.7em; + font-family: 'Didact Gothic', 'Didact Gothic Fallback'; } diff --git a/examples/serve/README.md b/examples/serve/README.md index cd95bcf..5b29fbd 100644 --- a/examples/serve/README.md +++ b/examples/serve/README.md @@ -61,7 +61,7 @@ All fall back to the default if no variant matches. ``` 5. (in chrome) open `chrome://settings/?search=lang` and add one of `Portuguese (Brazil)` or `German` to your preferred languages, and move that to the no 1. position. -6. re-load `localhost:3000` +6. re-load `localhost:3001` - you should see the following (in Portuguese example): ```html @@ -72,7 +72,7 @@ All fall back to the default if no variant matches. Some event-themed content ``` -7. now open `localhost:3000/es` +7. now open `localhost:3001/es` - you should see the following: ```html @@ -83,7 +83,7 @@ All fall back to the default if no variant matches. Some event-themed content ``` -8. now open `localhost:3000/it` +8. now open `localhost:3001/it` - you should see the following: ```html @@ -94,7 +94,7 @@ All fall back to the default if no variant matches. Some event-themed content ``` -9. now open `localhost:3000/us` or `localhost:3000/de` or `localhost:3000/fr` +9. now open `localhost:3001/us` or `localhost:3001/de` or `localhost:3001/fr` - you should see the following: ```html @@ -106,7 +106,7 @@ All fall back to the default if no variant matches. ``` 10. set a cookie for an audience to either of `cohort-1` or `cohort-2` using `document.cookie = "audience=cohort-1"` -11. now open `localhost:3000/` +11. now open `localhost:3001/` - you should see the following (in cohort-1 example): ```html @@ -118,7 +118,7 @@ All fall back to the default if no variant matches. ``` 12. change the system date to either 5th July 2025, 31st October or 17th March. -13. now open `localhost:3000/` +13. now open `localhost:3001/` - you should see the following: ```html diff --git a/examples/serve/docs/CHANGELOG.md b/examples/serve/docs/CHANGELOG.md index 9f2b321..9b54d30 100644 --- a/examples/serve/docs/CHANGELOG.md +++ b/examples/serve/docs/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.4] - 2025-05-16 + +### Fixed + +- fixed some incorrect ports in the `README.md` + ## [0.2.3] - 2025-02-27 ### Changed diff --git a/examples/serve/package.json b/examples/serve/package.json index 20a3f5d..c46e176 100644 --- a/examples/serve/package.json +++ b/examples/serve/package.json @@ -1,6 +1,6 @@ { "name": "web-toggle-point-serve-example", - "version": "0.2.3", + "version": "0.2.4", "type": "module", "private": true, "scripts": { diff --git a/package-lock.json b/package-lock.json index 1601923..6bc0882 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@asos/web-toggle-point", - "version": "0.10.3", + "version": "0.10.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@asos/web-toggle-point", - "version": "0.10.3", + "version": "0.10.5", "license": "MIT", "workspaces": [ "packages/features", @@ -57,7 +57,7 @@ }, "examples/express": { "name": "web-toggle-point-express-example", - "version": "0.2.3", + "version": "0.2.4", "dependencies": { "@asos/web-toggle-point-features": "file:../../packages/features", "@asos/web-toggle-point-react-pointcuts": "file:../../packages/react-pointcuts", @@ -89,7 +89,7 @@ }, "examples/next": { "name": "web-toggle-point-next-example", - "version": "0.2.2", + "version": "0.2.3", "dependencies": { "@asos/web-toggle-point-features": "file:../../packages/features", "@asos/web-toggle-point-react-pointcuts": "file:../../packages/react-pointcuts", @@ -2064,6 +2064,8 @@ }, "node_modules/@gitbeaker/core": { "version": "35.8.1", + "resolved": "https://registry.npmjs.org/@gitbeaker/core/-/core-35.8.1.tgz", + "integrity": "sha512-KBrDykVKSmU9Q9Gly8KeHOgdc0lZSa435srECxuO0FGqqBcUQ82hPqUc13YFkkdOI9T1JRA3qSFajg8ds0mZKA==", "dev": true, "license": "MIT", "dependencies": { @@ -2080,6 +2082,9 @@ }, "node_modules/@gitbeaker/node": { "version": "35.8.1", + "resolved": "https://registry.npmjs.org/@gitbeaker/node/-/node-35.8.1.tgz", + "integrity": "sha512-g6rX853y61qNhzq9cWtxIEoe2KDeFBtXAeWMGWJnc3nz3WRump2pIICvJqw/yobLZqmTNt+ea6w3/n92Mnbn3g==", + "deprecated": "Please use its successor @gitbeaker/rest", "dev": true, "license": "MIT", "dependencies": { @@ -2095,6 +2100,8 @@ }, "node_modules/@gitbeaker/requester-utils": { "version": "35.8.1", + "resolved": "https://registry.npmjs.org/@gitbeaker/requester-utils/-/requester-utils-35.8.1.tgz", + "integrity": "sha512-MFzdH+Z6eJaCZA5ruWsyvm6SXRyrQHjYVR6aY8POFraIy7ceIHOprWCs1R+0ydDZ8KtBnd8OTHjlJ0sLtSFJCg==", "dev": true, "license": "MIT", "dependencies": { @@ -4412,6 +4419,8 @@ }, "node_modules/@sindresorhus/is": { "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz", + "integrity": "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==", "dev": true, "license": "MIT", "engines": { @@ -4480,6 +4489,8 @@ }, "node_modules/@szmarczak/http-timer": { "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", + "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", "dev": true, "license": "MIT", "dependencies": { @@ -4630,6 +4641,8 @@ }, "node_modules/@types/cacheable-request": { "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.3.tgz", + "integrity": "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw==", "dev": true, "license": "MIT", "dependencies": { @@ -4717,6 +4730,8 @@ }, "node_modules/@types/http-cache-semantics": { "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz", + "integrity": "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA==", "dev": true, "license": "MIT" }, @@ -4766,6 +4781,8 @@ }, "node_modules/@types/keyv": { "version": "3.1.4", + "resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.4.tgz", + "integrity": "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg==", "dev": true, "license": "MIT", "dependencies": { @@ -4844,6 +4861,8 @@ }, "node_modules/@types/responselike": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.3.tgz", + "integrity": "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==", "dev": true, "license": "MIT", "dependencies": { @@ -6178,6 +6197,8 @@ }, "node_modules/cacheable-lookup": { "version": "5.0.4", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", + "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", "dev": true, "license": "MIT", "engines": { @@ -6186,6 +6207,8 @@ }, "node_modules/cacheable-request": { "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.4.tgz", + "integrity": "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg==", "dev": true, "license": "MIT", "dependencies": { @@ -6687,6 +6710,8 @@ }, "node_modules/clone-response": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.3.tgz", + "integrity": "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA==", "dev": true, "license": "MIT", "dependencies": { @@ -7126,6 +7151,8 @@ }, "node_modules/danger": { "version": "11.3.1", + "resolved": "https://registry.npmjs.org/danger/-/danger-11.3.1.tgz", + "integrity": "sha512-+slkGnbf0czY7g4LSuYpYkKJgFrb9YIXFJvV5JAuLLF39CXLlUw0iebgeL3ASK1t6RDb8xe+Rk2F5ilh2Hdv2w==", "dev": true, "license": "MIT", "dependencies": { @@ -7416,6 +7443,8 @@ }, "node_modules/decode-uri-component": { "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "license": "MIT", "engines": { @@ -7424,6 +7453,8 @@ }, "node_modules/decompress-response": { "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", "dev": true, "license": "MIT", "dependencies": { @@ -7438,6 +7469,8 @@ }, "node_modules/decompress-response/node_modules/mimic-response": { "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", "dev": true, "license": "MIT", "engines": { @@ -7481,6 +7514,8 @@ }, "node_modules/defer-to-connect": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", + "integrity": "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==", "dev": true, "license": "MIT", "engines": { @@ -7519,6 +7554,8 @@ }, "node_modules/delay": { "version": "5.0.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", + "integrity": "sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==", "dev": true, "license": "MIT", "engines": { @@ -7764,6 +7801,8 @@ }, "node_modules/end-of-stream": { "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", "dev": true, "license": "MIT", "dependencies": { @@ -9448,6 +9487,8 @@ }, "node_modules/filter-obj": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", "dev": true, "license": "MIT", "engines": { @@ -9743,6 +9784,8 @@ }, "node_modules/get-stream": { "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "license": "MIT", "dependencies": { @@ -9890,6 +9933,8 @@ }, "node_modules/got": { "version": "11.8.6", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.6.tgz", + "integrity": "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==", "dev": true, "license": "MIT", "dependencies": { @@ -10182,6 +10227,8 @@ }, "node_modules/http-cache-semantics": { "version": "4.1.1", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz", + "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true, "license": "BSD-2-Clause" }, @@ -10218,6 +10265,8 @@ }, "node_modules/http2-wrapper": { "version": "1.0.3", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", + "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", "dev": true, "license": "MIT", "dependencies": { @@ -13741,6 +13790,8 @@ }, "node_modules/li": { "version": "1.3.0", + "resolved": "https://registry.npmjs.org/li/-/li-1.3.0.tgz", + "integrity": "sha512-z34TU6GlMram52Tss5mt1m//ifRIpKH5Dqm7yUVOdHI+BQCs9qGPHFaCUTIzsWX7edN30aa2WrPwR7IO10FHaw==", "dev": true, "license": "MIT" }, @@ -14046,6 +14097,8 @@ }, "node_modules/lowercase-keys": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", "dev": true, "license": "MIT", "engines": { @@ -15241,6 +15294,8 @@ }, "node_modules/mime": { "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true, "license": "MIT", "bin": { @@ -15291,6 +15346,8 @@ }, "node_modules/mimic-response": { "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", "dev": true, "license": "MIT", "engines": { @@ -15588,6 +15645,8 @@ }, "node_modules/normalize-url": { "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", "dev": true, "license": "MIT", "engines": { @@ -15882,6 +15941,8 @@ }, "node_modules/p-cancelable": { "version": "2.1.1", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", + "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", "dev": true, "license": "MIT", "engines": { @@ -16591,6 +16652,8 @@ }, "node_modules/pump": { "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, "license": "MIT", "dependencies": { @@ -16629,11 +16692,13 @@ "license": "MIT" }, "node_modules/qs": { - "version": "6.13.1", + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.6" + "side-channel": "^1.1.0" }, "engines": { "node": ">=0.6" @@ -16644,6 +16709,8 @@ }, "node_modules/query-string": { "version": "7.1.3", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", + "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", "dev": true, "license": "MIT", "dependencies": { @@ -17294,6 +17361,8 @@ }, "node_modules/resolve-alpn": { "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", "dev": true, "license": "MIT" }, @@ -17334,6 +17403,8 @@ }, "node_modules/responselike": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-2.0.1.tgz", + "integrity": "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw==", "dev": true, "license": "MIT", "dependencies": { @@ -18267,6 +18338,8 @@ }, "node_modules/split-on-first": { "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", "dev": true, "license": "MIT", "engines": { @@ -18317,6 +18390,8 @@ }, "node_modules/strict-uri-encode": { "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", "dev": true, "license": "MIT", "engines": { @@ -20196,6 +20271,8 @@ }, "node_modules/xcase": { "version": "2.0.1", + "resolved": "https://registry.npmjs.org/xcase/-/xcase-2.0.1.tgz", + "integrity": "sha512-UmFXIPU+9Eg3E9m/728Bii0lAIuoc+6nbrNUKaRPJOFp91ih44qqGlWtxMB6kXFrRD6po+86ksHM5XHCfk6iPw==", "dev": true, "license": "MIT" }, @@ -20346,7 +20423,7 @@ }, "packages/features": { "name": "@asos/web-toggle-point-features", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0" @@ -20403,7 +20480,7 @@ }, "packages/react-pointcuts": { "name": "@asos/web-toggle-point-react-pointcuts", - "version": "0.4.3", + "version": "0.4.4", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0" @@ -20441,7 +20518,7 @@ }, "packages/ssr": { "name": "@asos/web-toggle-point-ssr", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", @@ -20477,7 +20554,7 @@ }, "packages/webpack": { "name": "@asos/web-toggle-point-webpack", - "version": "0.7.4", + "version": "0.7.5", "license": "MIT", "dependencies": { "@babel/runtime": "^7.26.0", diff --git a/package.json b/package.json index 540f361..82d302a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@asos/web-toggle-point", - "version": "0.10.4", + "version": "0.10.5", "repository": "git@github.com:asos/web-toggle-point.git", "homepage": "https://asos.github.io/web-toggle-point/", "license": "MIT", @@ -16,6 +16,7 @@ "scripts": { "build": "npm run build --workspace packages", "danger:local": "DANGER_DISABLE_TRANSPILATION=true danger local --base main", + "danger:local:staged": "DANGER_DISABLE_TRANSPILATION=true danger local --staging --base main", "docs": "rimraf ./docs/html/* && jsdoc ./packages/*/src -c ./docs/jsdoc.conf.js", "lint": "npm run lint --workspaces --if-present && npm run lint:docs && npm run lint:danger", "lint:danger": "eslint danger", diff --git a/packages/features/.npmignore b/packages/features/.npmignore index ea00334..4238c07 100644 --- a/packages/features/.npmignore +++ b/packages/features/.npmignore @@ -1,4 +1,5 @@ * !lib/* !docs/CHANGELOG.md +!docs/README.md !package.json diff --git a/packages/features/docs/CHANGELOG.md b/packages/features/docs/CHANGELOG.md index c7b7a37..fdc01ee 100644 --- a/packages/features/docs/CHANGELOG.md +++ b/packages/features/docs/CHANGELOG.md @@ -5,11 +5,22 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.3] - 2025-03-06 + +### Changed + +- added `package.json` [homepage](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#homepage), for clarity once on https://www.npmjs.com/ +- move the React 17 note to the end, in the `README.md`, since only relevant to the last two store factories & added companion note regarding `react-dom/server`. + +### Fixed + +- include the `README.md` in the NPM package + ## [0.3.2] - 2025-03-03 ### Changed -- Added `package.json` [repository](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#repository), [bugs](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bugs), and [`directories/doc`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#directories) fields, for clarity once on NPM +- added `package.json` [repository](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#repository), [bugs](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#bugs), and [`directories/doc`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#directories) fields, for clarity once on NPM ## [0.3.1] - 2024-12-26 diff --git a/packages/features/docs/README.md b/packages/features/docs/README.md index fd7cdef..4290324 100644 --- a/packages/features/docs/README.md +++ b/packages/features/docs/README.md @@ -10,18 +10,6 @@ A store should be chosen based on the requirement for global or partitioned stat See: [JSDoc output](https://asos.github.io/web-toggle-point/module-web-toggle-point-features.html) -> [!WARNING] -> ### Use with React 17 -> The package should work with React 17 and above, but due to [a bug](https://github.com/facebook/react/issues/20235) that they are not back-filling, the use of `"type": "module"` in the package means webpack will be unable to resolve the extensionless import. -> To fix, either upgrade to React 18+ or add the following resolve configuration to the webpack config: -> ```js -> resolve: { -> alias: { -> "react/jsx-runtime": "react/jsx-runtime.js" -> } -> } -> ``` - ## Exports The package contains the following exports: @@ -106,5 +94,15 @@ It accepts the following parameters: - a method to log warnings, should the serialized json somehow become malformed when hydrating the client application - this was designed to allow modifications of markup in systems upstream of the origin, but downstream of the browser, with a view to ensure adequate telemetry is in place. - - +> [!WARNING] +> ### Use with React 17 +> The react-specific stores should work with React 17 and above, but due to [a bug](https://github.com/facebook/react/issues/20235) that they are not back-filling, the use of `"type": "module"` in the package means webpack will be unable to resolve the extensionless import. +> To fix, either upgrade to React 18+ or add the following resolve configuration to the webpack config: +> ```js +> resolve: { +> alias: { +> "react/jsx-runtime": "react/jsx-runtime.js", +> "react-dom/server": "react-dom/server.js", +> } +> } +> ``` \ No newline at end of file diff --git a/packages/features/package.json b/packages/features/package.json index f5e2477..74e0ea1 100644 --- a/packages/features/package.json +++ b/packages/features/package.json @@ -1,7 +1,7 @@ { "name": "@asos/web-toggle-point-features", "description": "toggle point features code", - "version": "0.3.2", + "version": "0.3.3", "license": "MIT", "type": "module", "main": "./lib/main.es5.cjs", @@ -24,6 +24,7 @@ "bugs": { "url": "https://github.com/asos/web-toggle-point/issues" }, + "homepage": "https://github.com/asos/web-toggle-point/tree/main/packages/features", "directories": { "doc": "docs" }, diff --git a/packages/react-pointcuts/.npmignore b/packages/react-pointcuts/.npmignore index ea00334..4238c07 100644 --- a/packages/react-pointcuts/.npmignore +++ b/packages/react-pointcuts/.npmignore @@ -1,4 +1,5 @@ * !lib/* !docs/CHANGELOG.md +!docs/README.md !package.json diff --git a/packages/react-pointcuts/docs/CHANGELOG.md b/packages/react-pointcuts/docs/CHANGELOG.md index d8cb61a..2824582 100644 --- a/packages/react-pointcuts/docs/CHANGELOG.md +++ b/packages/react-pointcuts/docs/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.4.4] - 2025-03-06 + +### Changed + +- added `package.json` [homepage](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#homepage), for clarity once on https://www.npmjs.com/ +- added companion note regarding `react-dom/server` when used with React 17 + +### Fixed + +- include the `README.md` in the NPM package + ## [0.4.3] - 2025-03-03 ### Changed diff --git a/packages/react-pointcuts/docs/README.md b/packages/react-pointcuts/docs/README.md index 92347dc..0a85ad7 100644 --- a/packages/react-pointcuts/docs/README.md +++ b/packages/react-pointcuts/docs/README.md @@ -27,7 +27,8 @@ See: [JSDoc output](https://asos.github.io/web-toggle-point/module-web-toggle-po > ```js > resolve: { > alias: { -> "react/jsx-runtime": "react/jsx-runtime.js" +> "react/jsx-runtime": "react/jsx-runtime.js", +> "react-dom/server": "react-dom/server.js", > } > } > ``` diff --git a/packages/react-pointcuts/package.json b/packages/react-pointcuts/package.json index f6ed552..d41e39f 100644 --- a/packages/react-pointcuts/package.json +++ b/packages/react-pointcuts/package.json @@ -1,7 +1,7 @@ { "name": "@asos/web-toggle-point-react-pointcuts", "description": "react pointcut code", - "version": "0.4.3", + "version": "0.4.4", "license": "MIT", "type": "module", "main": "./lib/main.es5.cjs", @@ -23,6 +23,7 @@ "bugs": { "url": "https://github.com/asos/web-toggle-point/issues" }, + "homepage": "https://github.com/asos/web-toggle-point/tree/main/packages/react-pointcuts", "directories": { "doc": "docs" }, diff --git a/packages/ssr/.npmignore b/packages/ssr/.npmignore index ea00334..4238c07 100644 --- a/packages/ssr/.npmignore +++ b/packages/ssr/.npmignore @@ -1,4 +1,5 @@ * !lib/* !docs/CHANGELOG.md +!docs/README.md !package.json diff --git a/packages/ssr/docs/CHANGELOG.md b/packages/ssr/docs/CHANGELOG.md index 8bbdb26..058d6d5 100644 --- a/packages/ssr/docs/CHANGELOG.md +++ b/packages/ssr/docs/CHANGELOG.md @@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.3] - 2025-03-06 + +### Changed + +- added `package.json` [homepage](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#homepage), for clarity once on https://www.npmjs.com/ +- added companion note regarding `react-dom/server` when used with React 17 + +### Fixed + +- include the `README.md` in the NPM package + ## [0.2.2] - 2025-03-03 ### Changed diff --git a/packages/ssr/docs/README.md b/packages/ssr/docs/README.md index 54873d8..a9ec1f5 100644 --- a/packages/ssr/docs/README.md +++ b/packages/ssr/docs/README.md @@ -37,7 +37,8 @@ See: [JSDoc output](https://asos.github.io/web-toggle-point/module-web-toggle-po > ```js > resolve: { > alias: { -> "react/jsx-runtime": "react/jsx-runtime.js" +> "react/jsx-runtime": "react/jsx-runtime.js", +> "react-dom/server": "react-dom/server.js", > } > } > ``` diff --git a/packages/ssr/package.json b/packages/ssr/package.json index 2656ae1..dcdc958 100644 --- a/packages/ssr/package.json +++ b/packages/ssr/package.json @@ -1,7 +1,7 @@ { "name": "@asos/web-toggle-point-ssr", "description": "toggle point server side rendering code", - "version": "0.2.2", + "version": "0.2.3", "license": "MIT", "type": "module", "main": "./lib/main.es5.cjs", @@ -23,6 +23,7 @@ "bugs": { "url": "https://github.com/asos/web-toggle-point/issues" }, + "homepage": "https://github.com/asos/web-toggle-point/tree/main/packages/ssr", "directories": { "doc": "docs" }, diff --git a/packages/webpack/.npmignore b/packages/webpack/.npmignore index ea00334..4238c07 100644 --- a/packages/webpack/.npmignore +++ b/packages/webpack/.npmignore @@ -1,4 +1,5 @@ * !lib/* !docs/CHANGELOG.md +!docs/README.md !package.json diff --git a/packages/webpack/docs/CHANGELOG.md b/packages/webpack/docs/CHANGELOG.md index 424440a..7a133ee 100644 --- a/packages/webpack/docs/CHANGELOG.md +++ b/packages/webpack/docs/CHANGELOG.md @@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.5] - 2025-03-06 + +### Changed + +- added `package.json` [homepage](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#homepage), for clarity once on https://www.npmjs.com/ + +### Fixed + +- fixed typo in JSDoc comment +- fixed typo in `README.md` +- include the `README.md` in the NPM package + ## [0.7.4] - 2025-03-03 ### Changed diff --git a/packages/webpack/docs/README.md b/packages/webpack/docs/README.md index f4c7b1d..c5bbd98 100644 --- a/packages/webpack/docs/README.md +++ b/packages/webpack/docs/README.md @@ -53,7 +53,7 @@ interface TogglePointInjectionOptions { > [!IMPORTANT] > N.B. when setting up multiple pointcuts, the path matched by the [globs](https://en.wikipedia.org/wiki/Glob_(programming)) must be mutually exclusive. Otherwise, the pointcut defined earlier in the array "wins", and a warning is emitted into the compilation indicating that the subsequent cuts are neutered for those matching files. > -> Also, due to the way Webpack works, there should only be a sinlge `TogglePointInjection` plugin per webpack configuration, so utilize the point cuts array, rather than having separate plugin instances per point cut. +> Also, due to the way Webpack works, there should only be a single `TogglePointInjection` plugin per webpack configuration, so utilize the point cuts array, rather than having separate plugin instances per point cut. #### _`name`_ diff --git a/packages/webpack/package.json b/packages/webpack/package.json index 36798ae..a2fce31 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -1,7 +1,7 @@ { "name": "@asos/web-toggle-point-webpack", "description": "toggle point webpack plugin", - "version": "0.7.4", + "version": "0.7.5", "license": "MIT", "type": "module", "main": "./lib/main.cjs", @@ -20,6 +20,7 @@ "bugs": { "url": "https://github.com/asos/web-toggle-point/issues" }, + "homepage": "https://github.com/asos/web-toggle-point/tree/main/packages/webpack", "directories": { "doc": "docs" }, diff --git a/packages/webpack/src/plugins/togglePointInjection/index.js b/packages/webpack/src/plugins/togglePointInjection/index.js index 0148828..2fa3310 100644 --- a/packages/webpack/src/plugins/togglePointInjection/index.js +++ b/packages/webpack/src/plugins/togglePointInjection/index.js @@ -19,9 +19,9 @@ class TogglePointInjection { * @param {object[]} options.pointCuts toggle point point cut configuration, with target toggle point code as advice. The first matching point cut will be used * @param {string} options.pointCuts[].name name to describe the nature of the point cut, for clarity in logs and dev tools etc. * @param {string} options.pointCuts[].togglePointModule path, from root of the compilation, of where the toggle point sits. Or a resolvable node_module. - * @param {object} [options.pointCuts[].variantGlob=.\/**\/__variants__/*\/*\/!(*.test).{js,jsx,ts,tsx}] {@link https://en.wikipedia.org/wiki/Glob_(programming)|Globs} to identified variant modules. The plugin uses {@link https://github.com/mrmlnc/fast-glob|fast-glob} under the hood, so supports any glob that it does. + * @param {string} [options.pointCuts[].variantGlob='.\/**\/__variants__/*\/*\/!(*.test).{js,jsx,ts,tsx}'] {@link https://en.wikipedia.org/wiki/Glob_(programming)|Glob} to identified variant modules. The plugin uses {@link https://github.com/mrmlnc/fast-glob|fast-glob} under the hood, so supports any glob that it does. * @param {function} [options.pointCuts[].joinPointResolver=(variantPath) => path.posix.resolve(variantPath, "../../../..", path.basename(variantPath))] A function that takes the path to a variant module and returns a join point / base module. N.B. This is executed at build-time, so cannot use run-time context. It should use posix path segments, so on Windows be sure to use path.posix.resolve. - * @param {string} [options.pointsCuts[].toggleHandler] Path to a toggle handler that unpicks a {@link https://webpack.js.org/api/module-methods/#requirecontext|require.context} containing potential variants, passing that plus a joint point module to a toggle point function. If not provided, the plugin will use a default handler that processes folder names into a tree held in a Map. Leaf nodes of the tree are the variant modules. + * @param {string} [options.pointCuts[].toggleHandler] Path to a toggle handler that unpicks a {@link https://webpack.js.org/api/module-methods/#requirecontext|require.context} containing potential variants, passing that plus a joint point module to a toggle point function. If not provided, the plugin will use a default handler that processes folder names into a tree held in a Map. Leaf nodes of the tree are the variant modules. * @param {function} [options.webpackNormalModule] A function that returns the Webpack NormalModule class. This is required for Next.js, as it does not expose the NormalModule class directly * @returns {external:Webpack.WebpackPluginInstance} WebpackPluginInstance * @example N.B. forward slashes are escaped in the glob, due to JSDoc shortcomings, but in reality should be un-escaped @@ -33,7 +33,7 @@ class TogglePointInjection { * }, * { * togglePointModule: "/withTogglePoint", - * variantGlob: "./**\/!(use*|*.test).{ts,tsx}" + * variantGlob: "./**\/__variants__/*\/*\/!(use*|*.test).{ts,tsx}" * } * ] * });