@ankhorage/permissions 0.2.4 → 0.2.5

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,11 @@
1
1
  # @ankhorage/permissions
2
2
 
3
+ ## 0.2.5
4
+
5
+ ### Patch Changes
6
+
7
+ - f8f19fe: Expose the permission registry through the headless `@ankhorage/permissions/registry` subpath so planning and CLI consumers do not load React APIs.
8
+
3
9
  ## 0.2.4
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ankhorage/permissions",
3
3
  "type": "module",
4
- "version": "0.2.4",
4
+ "version": "0.2.5",
5
5
  "description": "Cross-platform permission registry and runtime helpers for Expo, React Native, and React Native Web apps, with unified request/check APIs for camera, media, location, notifications, microphone, and other web/native capabilities.",
6
6
  "homepage": "https://github.com/ankhorage/permissions#readme",
7
7
  "bugs": {
@@ -16,22 +16,23 @@
16
16
  "url": "git+https://github.com/ankhorage/permissions.git"
17
17
  },
18
18
  "keywords": [
19
- "permissions",
20
- "permission-management",
19
+ "ankhorage",
20
+ "camera",
21
21
  "capabilities",
22
- "typescript",
23
- "react",
24
- "react-native",
25
- "react-native-web",
22
+ "cross-platform",
26
23
  "expo",
27
- "web",
28
- "camera",
29
- "notifications",
30
24
  "location",
31
25
  "media-library",
32
26
  "microphone",
27
+ "notifications",
28
+ "permission-management",
29
+ "permissions",
33
30
  "privacy",
34
- "cross-platform"
31
+ "react",
32
+ "react-native",
33
+ "react-native-web",
34
+ "typescript",
35
+ "web"
35
36
  ],
36
37
  "dependencies": {},
37
38
  "peerDependencies": {
@@ -107,7 +108,14 @@
107
108
  "import": "./dist/metadata/index.js",
108
109
  "default": "./dist/metadata/index.js"
109
110
  },
110
- "./package.json": "./package.json"
111
+ "./package.json": "./package.json",
112
+ "./registry": {
113
+ "react-native": "./dist/registry/permissions.js",
114
+ "browser": "./dist/registry/permissions.js",
115
+ "types": "./dist/registry/permissions.d.ts",
116
+ "import": "./dist/registry/permissions.js",
117
+ "default": "./dist/registry/permissions.js"
118
+ }
111
119
  },
112
120
  "publishConfig": {
113
121
  "access": "public"
@@ -128,13 +136,13 @@
128
136
  "knip:check": "ankhorage-knip"
129
137
  },
130
138
  "devDependencies": {
131
- "@ankhorage/devtools": "^1.9.2",
139
+ "@ankhorage/devtools": "^1.11.11",
132
140
  "@ankhorage/paradox": "^0.1.24",
133
- "@types/bun": "^1.4.0",
141
+ "@types/bun": "^1.4.1",
134
142
  "@types/node": "^25.6.0",
135
143
  "@types/react": "^19.2.7",
136
144
  "react": "^19.2.1",
137
145
  "typescript": "^5.9.3"
138
146
  },
139
- "packageManager": "bun@1.4.0"
147
+ "packageManager": "bun@1.4.2"
140
148
  }
@@ -1,5 +1,6 @@
1
1
  import { describe, expect, test } from 'bun:test';
2
2
 
3
+ import packageJson from '../../package.json';
3
4
  import {
4
5
  getPermissionDefinition,
5
6
  isPermission,
@@ -31,6 +32,16 @@ describe('permission registry', () => {
31
32
  }
32
33
  });
33
34
 
35
+ test('publishes the registry as a dedicated headless subpath', () => {
36
+ expect(packageJson.exports['./registry']).toEqual({
37
+ 'react-native': './dist/registry/permissions.js',
38
+ browser: './dist/registry/permissions.js',
39
+ types: './dist/registry/permissions.d.ts',
40
+ import: './dist/registry/permissions.js',
41
+ default: './dist/registry/permissions.js',
42
+ });
43
+ });
44
+
34
45
  test('validates permission strings', () => {
35
46
  expect(isPermission('camera')).toBe(true);
36
47
  expect(isPermission('not-a-permission')).toBe(false);