Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 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
da6ccf1
named exports of the features package
TomStrepsil Jul 6, 2025
632f06b
fixup jsdoc
TomStrepsil Jul 6, 2025
5472a32
consolidate filter
TomStrepsil Jul 6, 2025
11877b2
lint
TomStrepsil Jul 6, 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
d27f5da
Merge branch 'main' into bug/39-move-features-package-to-named-exports
TomStrepsil Jul 15, 2025
35fac08
useValue -> setValue
TomStrepsil Aug 21, 2025
7a05c13
fixup for typescript failure in pipeline
TomStrepsil Aug 21, 2025
576d4a6
another type...
TomStrepsil Aug 21, 2025
479930b
sigh... more types
TomStrepsil Aug 21, 2025
6b3f64a
danger : changelog
TomStrepsil Aug 21, 2025
631df06
proper format changelog
TomStrepsil Aug 21, 2025
54ed0a1
some missing useValue -> setValue stuff somehow missed
TomStrepsil Aug 21, 2025
38473a5
note in changelog
TomStrepsil Aug 21, 2025
2c3fc89
default/browser exports - seems most palatable to linting/ts/etc.
TomStrepsil Aug 21, 2025
d7c3ef9
ssr changelog
TomStrepsil Aug 21, 2025
a603915
support firefox in the globalFeaturesStore
TomStrepsil Aug 21, 2025
0a698f3
support de-structuring of the serialization object returned by the fa…
TomStrepsil Aug 21, 2025
ce1e349
lint
TomStrepsil Aug 21, 2025
5833218
Merge branch 'main' into bug/39-move-features-package-to-named-exports
asos-dominicjomaa Sep 26, 2025
5c6b11f
fixup for windows base image playwright snapshot false negative
TomStrepsil Sep 26, 2025
ed7d436
Merge branch 'bug/39-move-features-package-to-named-exports' of githu…
TomStrepsil Sep 26, 2025
6ed3e82
revert maxDiffPixel change
TomStrepsil Sep 26, 2025
a68e792
0.07 -> 0.05
TomStrepsil Sep 26, 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
10 changes: 10 additions & 0 deletions examples/express/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ 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.6] - 2025-07-15

### Changed

- Updated to named exports version of "features" package ([0.4.0](../../../packages/features/docs/CHANGELOG.md#040---2025-07-15))

### Fixed

- import types explicitly from `@playwright/test` after unexpected pipeline failure

## [0.2.5] - 2025-05-27

### 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.2.5",
"version": "0.2.6",
"type": "module",
"engines": {
"node": ">=20.6.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/express/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineConfig, PlaywrightTestConfig } from "@playwright/test";
import { defineConfig, type PlaywrightTestConfig } from "@playwright/test";
import baseConfig from "../../test/automation/base.config";

const config: PlaywrightTestConfig = {
Expand Down
3 changes: 2 additions & 1 deletion examples/express/src/routes/animals/featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { nodeRequestScopedStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/nodeRequestScopedFeaturesStoreFactory";

const featuresStore = featuresStoreFactory();

Expand Down
2 changes: 1 addition & 1 deletion examples/express/src/routes/animals/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const contextMiddleware = (request, response, scopeCallBack) => {
return;
}
response.header("Vary", version);
featuresStore.useValue({ value: { version }, scopeCallBack });
featuresStore.setValue({ value: { version }, scopeCallBack });
};

export default contextMiddleware;
3 changes: 2 additions & 1 deletion examples/express/src/routes/config/featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ssrBackedReactContextFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/ssrBackedReactContextFeaturesStoreFactory";

const featuresStore = featuresStoreFactory({
name: "config",
Expand Down
10 changes: 10 additions & 0 deletions examples/next/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ 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.5] - 2025-07-15

### Changed

- Updated to named exports version of "features" package ([0.4.0](../../../packages/features/docs/CHANGELOG.md#040---2025-07-15))

### Fixed

- import types explicitly from `@playwright/test` & internally, after unexpected pipeline failure

## [0.2.4] - 2025-05-27

### 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.2.4",
"version": "0.2.5",
"private": true,
"type": "module",
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion examples/next/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig, PlaywrightTestConfig } from "@playwright/test";
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
@@ -1,4 +1,4 @@
import { test, expect, ConsoleMessage } from "@playwright/test";
import { test, expect, type ConsoleMessage } from "@playwright/test";
import setExperimentHeaders from "../playwright.setExperimentHeaders";
import locateWithinExample from "../playwright.locateInExample";
import getFixtureURL from "../playwright.getFixtureUrl";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { test, expect, ConsoleMessage } from "@playwright/test";
import { test, expect, type ConsoleMessage } from "@playwright/test";
import setExperimentHeaders from "../playwright.setExperimentHeaders";
import locateWithinExample from "../playwright.locateInExample";
import getFixtureURL from "../playwright.getFixtureUrl";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { reactContextFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/reactContextFeaturesStoreFactory";

const reactContextStore = featuresStoreFactory({
name: "Experiments"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { headers } from "next/headers";
import { Experiments } from "./experiments";
import { type Experiments } from "./experiments";

export default async function getExperiments(): Promise<
Experiments | Record<string, never>
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/app/fixtures/experiments/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode } from "react";
import { type ReactNode } from "react";
import getExperiments from "./getExperiments";
import Example from "./example";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Page, Locator } from "@playwright/test";
import type { Page, Locator } from "@playwright/test";

function locateWithinExample(page: Page, testId: string): Locator {
return page.locator("#example").getByTestId(testId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
import type {
TestType,
PlaywrightTestArgs,
PlaywrightTestOptions,
PlaywrightWorkerArgs,
PlaywrightWorkerOptions
} from "@playwright/test";

import { Experiments, Decision } from "./experiments";
import type { Experiments, Decision } from "./experiments";

const setExperimentHeaders = (
test: TestType<
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Didact_Gothic } from "next/font/google";
import styles from "./styles.module.css";
import { ReactNode } from "react";
import { type ReactNode } from "react";

const didactGothic = Didact_Gothic({
display: "swap",
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/control1.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React, { type ReactNode } from "react";
import styles from "./styles.module.css";

interface Control1Props {
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/control2.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React, { type ReactNode } from "react";
import styles from "./styles.module.css";

interface Control2Props {
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/variant1.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React, { type ReactNode } from "react";
import styles from "./styles.module.css";

interface Variant1Props {
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/variant2.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React, { type ReactNode } from "react";
import styles from "./styles.module.css";

interface Variant2Props {
Expand Down
13 changes: 12 additions & 1 deletion examples/serve/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.7] - 2025-07-15

### Changed

- Updated to named exports version of "features" package ([0.4.0](../../../packages/features/docs/CHANGELOG.md#040---2025-07-15))

### Fixed

- import types explicitly from `@playwright/test` after unexpected pipeline failure
- updated pride image after update to windows chromium emojis

## [0.2.6] - 2025-07-14

### Changed

- updated to use `variantGlobs` array, with updated webpack plugin [0.8.0][version 0.8.0](../../../packages/webpack/docs/CHANGELOG.md#080---2025-05-27)
- updated to use `variantGlobs` array, with updated webpack plugin [version 0.8.0](../../../packages/webpack/docs/CHANGELOG.md#080---2025-05-27)

## [0.2.5] - 2025-07-14

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.2.6",
"version": "0.2.7",
"type": "module",
"private": true,
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions examples/serve/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineConfig, PlaywrightTestConfig } from "@playwright/test";
import { defineConfig, type PlaywrightTestConfig } from "@playwright/test";
import baseConfig from "../../test/automation/base.config";

const config: PlaywrightTestConfig = {
...baseConfig,
expect:{
expect: {
toMatchSnapshot: {
maxDiffPixelRatio: 0.05
}
Expand Down
5 changes: 3 additions & 2 deletions examples/serve/src/fixtures/audience/__featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { globalFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/globalFeaturesStoreFactory";

const featuresStore = featuresStoreFactory();

const [, audience] = document.cookie.match(/audience=(.+?)(;|$)/) || [];

featuresStore.useValue({ value: audience });
featuresStore.setValue({ value: audience });

export default featuresStore;
5 changes: 3 additions & 2 deletions examples/serve/src/fixtures/config/__featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { globalFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/globalFeaturesStoreFactory";

const featuresStore = featuresStoreFactory();

featuresStore.useValue({ value: new URL(document.URL).pathname.slice(1) });
featuresStore.setValue({ value: new URL(document.URL).pathname.slice(1) });

export default featuresStore;
5 changes: 3 additions & 2 deletions examples/serve/src/fixtures/event/__featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { globalFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/globalFeaturesStoreFactory";

const featuresStore = featuresStoreFactory();

Expand All @@ -15,6 +16,6 @@ const getEvent = () => {
}
};

featuresStore.useValue({ value: getEvent() });
featuresStore.setValue({ value: getEvent() });

export default featuresStore;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions examples/serve/src/fixtures/translation/__featuresStore.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { globalFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/globalFeaturesStoreFactory";

const featuresStore = featuresStoreFactory();

featuresStore.useValue({
featuresStore.setValue({
value: navigator.language || document.documentElement.lang
});

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

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

9 changes: 9 additions & 0 deletions packages/features/build/eslint-import-backfill.rollup.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
input: "./src/global.js",
output: {
file: "lib/global.js",
format: "es",
sourcemap: true
},
treeshake: false
};
Loading
Loading