@baukit/preferences-core 0.4.0 → 0.5.0

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 -1
  2. package/package.json +11 -9
package/README.md CHANGED
@@ -75,7 +75,8 @@ UI must expect committed visibility while updates are pending.
75
75
 
76
76
  Adapters implement `PreferenceStore.read` and `PreferenceStore.patch`. Import
77
77
  `describePreferenceStoreContract` from `@baukit/preferences-core/vitest` to run the shared Vitest
78
- contract. `InMemoryPreferenceStore` is suitable for tests and small in-process consumers.
78
+ contract. That subpath is ESM-only and has no `default` condition, so Jest cannot resolve it.
79
+ `InMemoryPreferenceStore` is suitable for tests and small in-process consumers.
79
80
 
80
81
  `RepositoryPreferenceStore` (or `createRepositoryPreferenceStore`) adapts a repository keyed by a
81
82
  subject id, which is how most products already store a settings row. Give it the repository, the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baukit/preferences-core",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Typed preferences and their update behavior, with storage and effects supplied by the product.",
5
5
  "license": "MIT",
6
6
  "author": "Patrick Koss",
@@ -24,7 +24,8 @@
24
24
  "exports": {
25
25
  ".": {
26
26
  "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js"
27
+ "import": "./dist/index.js",
28
+ "default": "./dist/index.js"
28
29
  },
29
30
  "./vitest": {
30
31
  "types": "./dist/vitest.d.ts",
@@ -36,14 +37,15 @@
36
37
  "README.md",
37
38
  "LICENSE"
38
39
  ],
39
- "devDependencies": {
40
- "typescript": "6.0.3",
41
- "vitest": "4.1.10"
42
- },
43
40
  "scripts": {
44
41
  "build": "tsc -p tsconfig.json",
45
- "test": "vitest run --config ../../vitest.config.ts",
42
+ "prepare": "pnpm run build",
43
+ "test": "tsc -p tsconfig.test.json && vitest run --config ../../vitest.config.ts && node ../../scripts/test-packed-exports.mjs --esm-only ./vitest",
46
44
  "lint": "eslint src --max-warnings=0",
47
- "format:check": "prettier --check src package.json tsconfig.json"
45
+ "format:check": "prettier --check src package.json tsconfig.json tsconfig.test.json"
46
+ },
47
+ "devDependencies": {
48
+ "typescript": "6.0.3",
49
+ "vitest": "4.1.10"
48
50
  }
49
- }
51
+ }