unified-notification-core 0.1.5 → 0.1.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.6
4
+
5
+ - Add CommonJS `require` export conditions for the package root and schema
6
+ entrypoints so bundled CommonJS consumers can resolve UNC without package
7
+ manager patches.
8
+ - Add a built-package CommonJS export smoke test before packing.
9
+
3
10
  ## 0.1.5
4
11
 
5
12
  - Add provider-agnostic `channelPolicies` with durable per-channel rate windows
package/README.md CHANGED
@@ -60,6 +60,9 @@ npm install unified-notification-core drizzle-orm
60
60
  The package supports Drizzle `0.45.x` with PostgreSQL-compatible drivers,
61
61
  including `node-postgres`, `postgres.js`, and PGlite.
62
62
 
63
+ Both public entrypoints support ESM `import` and CommonJS `require`:
64
+ `unified-notification-core` and `unified-notification-core/schema`.
65
+
63
66
  ## Add the schema
64
67
 
65
68
  Export the UNC tables from the schema entrypoint already read by Drizzle Kit:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unified-notification-core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "UNC is a Drizzle-native multichannel notification core with durable delivery, retries, in-app inboxes, and recipient preferences.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -8,10 +8,12 @@
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.js",
11
12
  "import": "./dist/index.js"
12
13
  },
13
14
  "./schema": {
14
15
  "types": "./dist/schema.d.ts",
16
+ "require": "./dist/schema.js",
15
17
  "import": "./dist/schema.js"
16
18
  }
17
19
  },
@@ -27,7 +29,8 @@
27
29
  "build": "tsc -p tsconfig.json",
28
30
  "typecheck": "tsc -p tsconfig.json --noEmit",
29
31
  "test": "vitest run --no-file-parallelism --maxWorkers=1",
30
- "check": "npm run typecheck && npm run test && npm run build && npm pack --dry-run",
32
+ "test:package-exports": "npm run build && node test/package-exports.cjs",
33
+ "check": "npm run typecheck && npm run test && npm run test:package-exports && npm pack --dry-run",
31
34
  "prepare": "npm run build"
32
35
  },
33
36
  "keywords": [