@react-foundry/react-router-context 0.1.9 → 0.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.
package/dist/index.js CHANGED
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sanitiseUserInfo = exports.cspNonceContext = exports.userInfoContext = void 0;
4
- exports.userInfoContext = 'USER_INFO';
5
- exports.cspNonceContext = 'CSP_NONCE';
6
- const sanitiseUserInfo = ({ displayName, emails, expiry, groups, name, photos, roles, username }) => ({
1
+ export const userInfoContext = 'USER_INFO';
2
+ export const cspNonceContext = 'CSP_NONCE';
3
+ export const sanitiseUserInfo = ({ displayName, emails, expiry, groups, name, photos, roles, username }) => ({
7
4
  displayName,
8
5
  emails,
9
6
  expiry,
@@ -13,4 +10,3 @@ const sanitiseUserInfo = ({ displayName, emails, expiry, groups, name, photos, r
13
10
  roles,
14
11
  username
15
12
  });
16
- exports.sanitiseUserInfo = sanitiseUserInfo;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@react-foundry/react-router-context",
3
- "version": "0.1.9",
3
+ "version": "0.2.1",
4
4
  "description": "A collection of React Router contexts for use in React Foundry applications.",
5
+ "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "exports": {
7
8
  ".": {
8
9
  "types": "./dist/index.d.ts",
9
- "import": "./dist/index.mjs",
10
- "require": "./dist/index.js",
11
- "default": "./dist/index.mjs"
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
12
  }
13
13
  },
14
14
  "files": [
@@ -25,15 +25,13 @@
25
25
  "react-router": "7.13.0",
26
26
  "ts-jest": "29.4.9",
27
27
  "typescript": "5.9.3",
28
- "@react-foundry/types": "0.1.9"
28
+ "@react-foundry/types": "0.2.1"
29
29
  },
30
30
  "scripts": {
31
31
  "test": "NODE_OPTIONS=--experimental-vm-modules jest",
32
- "build": "npm run build:esm && npm run build:cjs",
33
- "build:esm": "tsc -m es2022 && find dist -name '*.js' -exec sh -c 'mv \"$0\" \"${0%.js}.mjs\"' {} \\;",
34
- "build:cjs": "tsc",
32
+ "build": "tsc",
35
33
  "clean": "rm -rf dist tsconfig.tsbuildinfo"
36
34
  },
37
- "module": "dist/index.mjs",
35
+ "module": "dist/index.js",
38
36
  "typings": "dist/index.d.ts"
39
37
  }
package/dist/index.mjs DELETED
@@ -1,12 +0,0 @@
1
- export const userInfoContext = 'USER_INFO';
2
- export const cspNonceContext = 'CSP_NONCE';
3
- export const sanitiseUserInfo = ({ displayName, emails, expiry, groups, name, photos, roles, username }) => ({
4
- displayName,
5
- emails,
6
- expiry,
7
- groups,
8
- name,
9
- photos,
10
- roles,
11
- username
12
- });