Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d0ce7f1
change initial commit message in changelogs (#3)
TomStrepsil Dec 24, 2024
27e436a
[#18] Fix JSDoc module names (#19)
TomStrepsil Jan 30, 2025
1f0cb29
[26] Fix public/scoped package publishing (#27)
TomStrepsil Mar 6, 2025
d85e398
fix registry url etc (#34)
TomStrepsil Mar 6, 2025
cd2fc82
Merge branch 'main' of github.com:TomStrepsil/web-toggle-point
TomStrepsil Apr 13, 2025
d20a886
Merge branch 'ASOS:main' into main
TomStrepsil Jul 14, 2025
710d357
Merge branch 'ASOS:main' into main
TomStrepsil Jul 14, 2025
f488cab
Merge branch 'ASOS:main' into main
TomStrepsil Jul 14, 2025
6d90bc3
Merge branch 'ASOS:main' into main
TomStrepsil Jul 14, 2025
e942cde
Extract portions of load strategies update and apply separately
TomStrepsil Jul 29, 2025
e41ef94
use get()
TomStrepsil Jul 29, 2025
a30583b
fix version link in CHANGELOGs to use correct date
TomStrepsil Aug 4, 2025
42a0784
more CHANGELOG date fix
TomStrepsil Aug 4, 2025
904e2e5
handle circular references
TomStrepsil Aug 19, 2025
d199c1c
try being explicit about type import?
TomStrepsil Aug 19, 2025
bad0091
import playwright types explicitly
TomStrepsil Aug 19, 2025
334d8f9
more type explicitness
TomStrepsil Aug 19, 2025
4eba157
more explicit type imports
TomStrepsil Aug 19, 2025
7c71a5a
sigh... more types
TomStrepsil Aug 19, 2025
955080f
version & changelog for test/automation
TomStrepsil Aug 21, 2025
a133186
try/catch resolution
TomStrepsil Aug 21, 2025
b3eddac
Set -> WeakSet
TomStrepsil Aug 24, 2025
c135720
correct documentation re: toggleHandler
TomStrepsil Aug 31, 2025
8373970
type fix now part of #43
TomStrepsil Sep 26, 2025
5363515
Merge branch 'main' into feat/54-support-bidirectional-filesystem-con…
TomStrepsil Sep 26, 2025
528056b
Merge branch 'main' into feat/54-support-bidirectional-filesystem-con…
TomStrepsil Oct 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ N.B. See changelogs for individual packages, where most change will occur:

This log covers the [monorepo](https://en.wikipedia.org/wiki/Monorepo).

## [0.13.0] - 2025-10-21

### Changed

- updated to `0.11.0` of [`eslint-plugin-workspaces`](https://github.com/joshuajaco/eslint-plugin-workspaces) after [addition of ESLint9 support](https://github.com/joshuajaco/eslint-plugin-workspaces/commit/af855c3a3d8069366d4446747e91828ddf7560c6)
- update `eslint.config.mjs` to utilise flat config

## [0.12.0] - 2025-09-30

### Added
Expand Down
10 changes: 2 additions & 8 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@ import asosConfig from "./peripheral/eslint-config-asosconfig/index.js";
import globals from "globals";
import jsdoc from "eslint-plugin-jsdoc";
import markdown from "@eslint/markdown";
import { FlatCompat } from "@eslint/eslintrc";
import path from "path";
import { fileURLToPath } from "url";
import workspaces from "eslint-plugin-workspaces";

const scripts = ["*.{js,mjs}", "**/*.{js,mjs}"];
const markDowns = ["*.md", "**/*.md"];

const compat = new FlatCompat({
baseDirectory: path.dirname(fileURLToPath(import.meta.url))
});

export default [
...compat.extends("plugin:workspaces/recommended"),
workspaces.configs["flat/recommended"],
...asosConfig.map((config) => ({
files: scripts,
ignores: ["**/docs/**", "**/danger/**"],
Expand Down
6 changes: 6 additions & 0 deletions examples/express/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.3.1] - 2025-10-21

### Fixed

- removed "Vary" header from "animals" example, the page is meant to be un-cacheable, and the value was wrong in any case

## [0.3.0] - 2025-10-20

### Changed
Expand Down
2 changes: 1 addition & 1 deletion examples/express/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-express-example",
"version": "0.3.0",
"version": "0.3.1",
"type": "module",
"engines": {
"node": ">=20.6.0"
Expand Down
1 change: 0 additions & 1 deletion examples/express/src/routes/animals/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const contextMiddleware = (request, response, scopeCallBack) => {
response.status(StatusCodes.BAD_REQUEST).end();
return;
}
response.header("Vary", version);
featuresStore.setValue({ value: { version }, scopeCallBack });
};

Expand Down
6 changes: 6 additions & 0 deletions examples/next/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.1] - 2025-10-21

### Changed

- update to take supply static `webpackNormalModule` corresponding to webpack plugin [version 0.9.0](../../../packages/webpack/docs/CHANGELOG.md#090---2025-07-29)

## [0.4.0] - 2025-10-20

### Changed
Expand Down
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-next-example",
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion examples/next/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { defineConfig, type PlaywrightTestConfig } from "@playwright/test";
// eslint-disable-next-line workspaces/no-relative-imports, workspaces/require-dependency
import baseConfig from "../../test/automation/base.config";

const THREE_MINUTES = 3 * 60 * 1000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ interface ToggleHandler {
featuresMap: Map<string, Map<string, ReactComponentModuleType>>
) => React.Component;
joinPoint: ReactComponentModuleType;
variants: __WebpackModuleApi.RequireContext;
variantPathMap: Map<string, ReactComponentModuleType>;
}
export default ({ togglePoint, joinPoint, variants }: ToggleHandler) => {
export default ({ togglePoint, joinPoint, variantPathMap }: ToggleHandler) => {
const variantsMap = new Map<string, ReactComponentModuleType>();
const featuresMap = new Map([[FEATURE_KEY, variantsMap]]);

for (const key of variants.keys()) {
for (const key of variantPathMap.keys()) {
const [, , value] = key.split(".");
const [start, end] = value.split("-");

Expand All @@ -25,7 +25,7 @@ export default ({ togglePoint, joinPoint, variants }: ToggleHandler) => {
charCode <= end.charCodeAt(0);
charCode++
) {
variantsMap.set(String.fromCharCode(charCode), variants(key));
variantsMap.set(String.fromCharCode(charCode), variantPathMap.get(key)!);
}
}

Expand Down
6 changes: 6 additions & 0 deletions examples/serve/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.4.0] - 2025-10-21

### Changed

- updated toggle handlers to take a `variantPathMap` corresponding to webpack [version 0.9.0](../../../packages/webpack/docs/CHANGELOG.md#090---2025-07-29)

## [0.3.0] - 2025-10-20

### Changed
Expand Down
2 changes: 1 addition & 1 deletion examples/serve/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web-toggle-point-serve-example",
"version": "0.3.0",
"version": "0.4.0",
"type": "module",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default ({ togglePoint, joinPoint, variants }) => {
const featuresMap = variants.keys().reduce((map, key) => {
export default ({ togglePoint, joinPoint, variantPathMap }) => {
const featuresMap = variantPathMap.keys().reduce((map, key) => {
const [, , value] = key.split("/");
const list = value.split(",");
for (const value of list) {
map.set(value, variants(key));
map.set(value, variantPathMap.get(key));
}
return map;
}, new Map());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default ({ togglePoint, joinPoint, variants }) => {
export default ({ togglePoint, joinPoint, variantPathMap }) => {
const featuresMap = new Map();
for (const key of variants.keys()) {
for (const key of variantPathMap.keys()) {
const [, , value] = key.split(".");
featuresMap.set(value, variants(key));
featuresMap.set(value, variantPathMap.get(key));
}
return togglePoint(joinPoint, featuresMap);
};
6 changes: 3 additions & 3 deletions examples/serve/src/toggleHandlers/singlePathSegment.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export default ({ togglePoint, joinPoint, variants }) => {
export default ({ togglePoint, joinPoint, variantPathMap }) => {
const featuresMap = new Map();
for (const key of variants.keys()) {
for (const key of variantPathMap.keys()) {
const [, value] = key.split("/");
featuresMap.set(value, variants(key));
featuresMap.set(value, variantPathMap.get(key));
}
return togglePoint(joinPoint, featuresMap);
};
59 changes: 15 additions & 44 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asos/web-toggle-point",
"version": "0.12.0",
"version": "0.13.0",
"repository": "[email protected]:asos/web-toggle-point.git",
"homepage": "https://asos.github.io/web-toggle-point/",
"license": "MIT",
Expand Down Expand Up @@ -47,7 +47,7 @@
"eslint-plugin-jest-formatting": "^3.1.0",
"eslint-plugin-jsdoc": "^50.5.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-workspaces": "^0.10.1",
"eslint-plugin-workspaces": "^0.11.0",
"globals": "^15.12.0",
"jsdoc": "^4.0.4",
"lint-staged": "^15.2.10",
Expand Down
18 changes: 18 additions & 0 deletions packages/webpack/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ 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.9.0] - 2025-10-21

### Changed

- consolidated setting of default optional values
- changed `variants` array on join point data structure to a `Map` of relative to absolute path as `variantPathMap`
- move away from webpack `import.meta.webpackContext` when generating join points, construct a `Map` manually instead
- add linking of join points, to supplant the functionality previously provided by `import.meta.webpackContext`
- updated win32 path replacement, can effectively no-op on posix systems

### Fixed

- removed "next" peer dependency, this needn't be explicit
- ensured files that cannot be resolved (by [enhanced-resolve](https://github.com/webpack/enhanced-resolve/)), for whatever reason, don't break the build
- don't try and filter potential resolutions, let enhanced-resolve try and potentially fail, to allow for resolve plugins to have irregular specifiers (e.g. path alias')
- ensured that circular dependencies don't cause the module graph search lock up
- correct README.md to show `toggleHandler` as an option of the `pointCut`, not the general plugin configuration

## [0.8.3] - 2025-09-30

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ interface PointCut {
togglePointModule: string;
variantGlobs?: string[];
joinPointResolver?: (variantPath: string) => string;
toggleHandler?: string;
}

interface TogglePointInjectionOptions {
pointCuts: PointCut[];
toggleHandler?: string;
webpackNormalModule?: typeof webpack.NormalModule;
}
```
Expand Down
Loading
Loading