Skip to content

Commit daed26d

Browse files
authored
[42] move logError argument of withTogglePointFactory to plugin hook (#44)
1 parent bf5b973 commit daed26d

33 files changed

Lines changed: 337 additions & 158 deletions

docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ N.B. See changelogs for individual packages, where most change will occur:
1414

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

17+
## [0.12.0] - 2025-09-30
18+
19+
### Added
20+
21+
- a `build:examples` script, for easy re-building of all examples
22+
23+
### Fixed
24+
25+
- added a `prepare-publish.mjs` script to prepare packages for npm publishing (moving `README.md` and `LICENSE` files into package roots), replacing the prior `shx` based solution, and adding [`transform-markdown-links`](https://github.com/gakimball/transform-markdown-links) to fix relative paths that otherwise incorrectly link on [npmjs.com](https://www.npmjs.com/)
26+
1727
## [0.11.0] - 2025-09-29
1828

1929
### Changed

examples/express/docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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.7] - 2025-09-30
9+
10+
### Changed
11+
12+
- move to use new `onVariantError` plugin hook over `logError` to consume [0.5.0](../../../packages/react-pointcuts/docs/CHANGELOG.md#040---2025-07-06) of `react-pointcuts` package.
13+
814
## [0.2.6] - 2025-07-15
915

1016
### 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.6",
3+
"version": "0.2.7",
44
"type": "module",
55
"engines": {
66
"node": ">=20.6.0"

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ const { getFeatures: getActiveFeatures } = featuresStore;
66
const withTogglePoint = withTogglePointFactory({
77
getActiveFeatures,
88
variantKey: "size",
9-
logError: console.log
9+
plugins: [
10+
{
11+
onVariantError: console.error
12+
}
13+
]
1014
});
1115

1216
export default withTogglePoint;

examples/next/docs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ 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.3.1] - 2025-09-30
9+
10+
### Changed
11+
12+
- move to use new `onVariantError` plugin hook over `logError` to consume [0.5.0](../../../packages/react-pointcuts/docs/CHANGELOG.md#040---2025-07-06) of `react-pointcuts` package.
13+
814
## [0.3.0] - 2025-09-29
915

1016
### Added

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.3.0",
3+
"version": "0.3.1",
44
"private": true,
55
"type": "module",
66
"scripts": {

examples/next/src/app/fixtures/experiments/withTogglePoint.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ const getActiveFeatures = () => getFeatures().decisions;
88

99
const withTogglePoint = withTogglePointFactory({
1010
getActiveFeatures,
11-
logError: console.log,
1211
plugins: [
1312
{
13+
onVariantError: console.error,
1414
onCodeSelected: ({ matchedFeatures }) => {
1515
if (matchedFeatures?.length) {
1616
const [[feature]] = matchedFeatures;

0 commit comments

Comments
 (0)