Skip to content

Commit 2918c6b

Browse files
authored
[39] [57] Move features package to named exports, preventing "ssr" package dependency. Firefox compatibility. (#43)
1 parent b252f6f commit 2918c6b

57 files changed

Lines changed: 237 additions & 147 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/express/docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.6] - 2025-07-15
9+
10+
### Changed
11+
12+
- Updated to named exports version of "features" package ([0.4.0](../../../packages/features/docs/CHANGELOG.md#040---2025-07-15))
13+
14+
### Fixed
15+
16+
- import types explicitly from `@playwright/test` after unexpected pipeline failure
17+
818
## [0.2.5] - 2025-05-27
919

1020
### Changed

examples/express/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-toggle-point-express-example",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"type": "module",
55
"engines": {
66
"node": ">=20.6.0"

examples/express/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig, PlaywrightTestConfig } from "@playwright/test";
1+
import { defineConfig, type PlaywrightTestConfig } from "@playwright/test";
22
import baseConfig from "../../test/automation/base.config";
33

44
const config: PlaywrightTestConfig = {

examples/express/src/routes/animals/featuresStore.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { nodeRequestScopedStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
1+
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
2+
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/nodeRequestScopedFeaturesStoreFactory";
23

34
const featuresStore = featuresStoreFactory();
45

examples/express/src/routes/animals/middleware.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const contextMiddleware = (request, response, scopeCallBack) => {
99
return;
1010
}
1111
response.header("Vary", version);
12-
featuresStore.useValue({ value: { version }, scopeCallBack });
12+
featuresStore.setValue({ value: { version }, scopeCallBack });
1313
};
1414

1515
export default contextMiddleware;

examples/express/src/routes/config/featuresStore.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ssrBackedReactContextFeaturesStoreFactory as featuresStoreFactory } from "@asos/web-toggle-point-features";
1+
// eslint-disable-next-line import/no-unresolved -- https://github.com/import-js/eslint-plugin-import/issues/1810
2+
import featuresStoreFactory from "@asos/web-toggle-point-features/storeFactories/ssrBackedReactContextFeaturesStoreFactory";
23

34
const featuresStore = featuresStoreFactory({
45
name: "config",

examples/next/docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.2.5] - 2025-07-15
9+
10+
### Changed
11+
12+
- Updated to named exports version of "features" package ([0.4.0](../../../packages/features/docs/CHANGELOG.md#040---2025-07-15))
13+
14+
### Fixed
15+
16+
- import types explicitly from `@playwright/test` & internally, after unexpected pipeline failure
17+
818
## [0.2.4] - 2025-05-27
919

1020
### Changed

examples/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "web-toggle-point-next-example",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"private": true,
55
"type": "module",
66
"scripts": {

examples/next/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { defineConfig, PlaywrightTestConfig } from "@playwright/test";
1+
import { defineConfig, type PlaywrightTestConfig } from "@playwright/test";
2+
// eslint-disable-next-line workspaces/no-relative-imports, workspaces/require-dependency
23
import baseConfig from "../../test/automation/base.config";
34

45
const THREE_MINUTES = 3 * 60 * 1000;

examples/next/src/app/fixtures/experiments/1-varied-component/playwright.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { test, expect, ConsoleMessage } from "@playwright/test";
1+
import { test, expect, type ConsoleMessage } from "@playwright/test";
22
import setExperimentHeaders from "../playwright.setExperimentHeaders";
33
import locateWithinExample from "../playwright.locateInExample";
44
import getFixtureURL from "../playwright.getFixtureUrl";

0 commit comments

Comments
 (0)