@byline/admin 3.11.0 → 3.11.2

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.
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This Source Code is subject to the terms of the Mozilla Public
3
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
+ *
6
+ * Copyright (c) Infonomic Company Limited
7
+ */
8
+ export {};
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@byline/admin",
3
3
  "private": false,
4
4
  "license": "MPL-2.0",
5
- "version": "3.11.0",
5
+ "version": "3.11.2",
6
6
  "engines": {
7
7
  "node": ">=20.9.0"
8
8
  },
@@ -47,6 +47,11 @@
47
47
  "import": "./dist/modules/auth/index.js",
48
48
  "require": "./dist/modules/auth/index.js"
49
49
  },
50
+ "./admin-activity": {
51
+ "types": "./dist/modules/admin-activity/index.d.ts",
52
+ "import": "./dist/modules/admin-activity/index.js",
53
+ "require": "./dist/modules/admin-activity/index.js"
54
+ },
50
55
  "./admin-users": {
51
56
  "types": "./dist/modules/admin-users/index.d.ts",
52
57
  "import": "./dist/modules/admin-users/index.js",
@@ -146,10 +151,10 @@
146
151
  "uuid": "^14.0.0",
147
152
  "zod": "^4.4.3",
148
153
  "zod-form-data": "^3.0.1",
149
- "@byline/auth": "3.11.0",
150
- "@byline/core": "3.11.0",
151
- "@byline/i18n": "3.11.0",
152
- "@byline/ui": "3.11.0"
154
+ "@byline/auth": "3.11.2",
155
+ "@byline/core": "3.11.2",
156
+ "@byline/ui": "3.11.2",
157
+ "@byline/i18n": "3.11.2"
153
158
  },
154
159
  "peerDependencies": {
155
160
  "react": "^19.0.0",
@@ -0,0 +1,50 @@
1
+ /**
2
+ * This Source Code is subject to the terms of the Mozilla Public
3
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
+ *
6
+ * Copyright (c) Infonomic Company Limited
7
+ */
8
+
9
+ /**
10
+ * Guard against `publishConfig.exports` drift.
11
+ *
12
+ * `@byline/admin` carries a `publishConfig.exports` block that npm uses to
13
+ * **override** the top-level `exports` at publish time. The workspace and dev
14
+ * builds resolve through the top-level `exports` (or source), so a subpath
15
+ * added there but forgotten in `publishConfig.exports` typechecks and builds
16
+ * locally yet is **missing from the published package** — surfacing only as a
17
+ * downstream consumer's build error ("X is not exported …"). That is exactly
18
+ * how `./admin-activity` slipped through in v3.11.0.
19
+ *
20
+ * This test fails the moment the two blocks drift, so the gap is caught in
21
+ * `pnpm test` / CI rather than in a production Docker build.
22
+ */
23
+
24
+ import { readFileSync } from 'node:fs'
25
+ import { dirname, resolve } from 'node:path'
26
+ import { fileURLToPath } from 'node:url'
27
+
28
+ import { describe, expect, it } from 'vitest'
29
+
30
+ const pkgPath = resolve(dirname(fileURLToPath(import.meta.url)), '../package.json')
31
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf8')) as {
32
+ exports: Record<string, unknown>
33
+ publishConfig?: { exports?: Record<string, unknown> }
34
+ }
35
+
36
+ describe('package.json export parity', () => {
37
+ it('every top-level export subpath is also declared in publishConfig.exports', () => {
38
+ const publishExports = pkg.publishConfig?.exports
39
+ // If there is no override, the top-level exports ship as-is — nothing to check.
40
+ if (publishExports == null) return
41
+
42
+ const missing = Object.keys(pkg.exports).filter((key) => !(key in publishExports))
43
+ expect(
44
+ missing,
45
+ `publishConfig.exports is missing subpath(s) present in the top-level exports: ${missing.join(
46
+ ', '
47
+ )}. The published package would not expose them — add them to BOTH blocks.`
48
+ ).toEqual([])
49
+ })
50
+ })