synstate-react-hooks-compat 3.1.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -0
  2. package/package.json +10 -10
package/README.md CHANGED
@@ -4,6 +4,8 @@ synstate-react-hooks-compat re-exports all exports from synstate except for `cre
4
4
 
5
5
  The first element of the array returned by the `createState<T>` function provided by synstate-react-hooks-compat is changed from `InitializedObservable<T>` to a React hook `() => T`, and the `InitializedObservable<T>` has been moved to the `state` property in the object at index 2.
6
6
 
7
+ Their options, such as `equals` (the second argument of `createState` and `createBooleanState`, the third of `createReducer`), are passed to synstate as they are.
8
+
7
9
  This package provides the same API as [synstate-react-hooks](https://www.npmjs.com/package/synstate-react-hooks), but subscribes to observables with `useState` + `useEffect` instead of `useSyncExternalStore`, so it also works with React 16.8 and 17. Use synstate-react-hooks if you are on React 18 or later.
8
10
 
9
11
  ## Installation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "synstate-react-hooks-compat",
3
- "version": "3.1.0",
3
+ "version": "3.2.1",
4
4
  "description": "SynState React hooks for React 16.8–17 (without useSyncExternalStore)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "LICENSE"
29
29
  ],
30
30
  "dependencies": {
31
- "synstate": "3.1.0",
31
+ "synstate": "3.2.1",
32
32
  "ts-data-forge": "^14.7.1",
33
33
  "ts-type-forge": "^9.2.2"
34
34
  },
@@ -37,12 +37,12 @@
37
37
  "@testing-library/react": "16.3.3",
38
38
  "@types/react": "19.3.0",
39
39
  "@types/react-dom": "19.3.0",
40
- "@vitest/browser-playwright": "5.0.2",
41
- "eslint-config-typed": "5.17.0",
42
- "eslint-plugin-ts-data-forge": "0.8.3",
43
- "eslint-plugin-ts-fortress": "1.3.0",
44
- "eslint-plugin-ts-type-forge": "0.8.5",
45
- "playwright": "1.63.0",
40
+ "@vitest/browser-playwright": "5.0.3",
41
+ "eslint-config-typed": "5.17.4",
42
+ "eslint-plugin-ts-data-forge": "0.8.6",
43
+ "eslint-plugin-ts-fortress": "1.3.3",
44
+ "eslint-plugin-ts-type-forge": "0.8.8",
45
+ "playwright": "1.64.0",
46
46
  "prettier": "3.9.9",
47
47
  "prettier-plugin-organize-imports": "4.3.0",
48
48
  "prettier-plugin-packagejson": "3.0.2",
@@ -64,7 +64,7 @@
64
64
  "scripts": {
65
65
  "build": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/build.mts",
66
66
  "check:ext": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ./scripts/cmd/check-ext.mts",
67
- "check:lint": "eslint .",
67
+ "check:lint": "oxlint . && eslint .",
68
68
  "check:test": "pnpm run z:vitest:node run",
69
69
  "check:test:browser": "pnpm run z:vitest --project='Browser' run",
70
70
  "check:test:cov": "pnpm run z:vitest run --coverage",
@@ -75,7 +75,7 @@
75
75
  "fix:fmt": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-repo-utils/src/cmd/format-uncommitted.mts --cwd .",
76
76
  "fix:fmt:diff": "tsx --tsconfig ../../tools/configs/tsconfig.tsx.json ../../libs/ts-repo-utils/src/cmd/format-diff-from.mts origin/main --cwd .",
77
77
  "fix:fmt:full": "pnpm run z:prettier .",
78
- "fix:lint": "eslint . --fix",
78
+ "fix:lint": "oxlint . --fix && eslint . --fix",
79
79
  "fmt": "pnpm run fix:fmt",
80
80
  "gen": "run-s gen:index gen:re-export gen:readme gen:jsdoc",
81
81
  "gen:index": "run-s gen:index:src fix:fmt",