@endo/eventual-send 1.3.2 → 1.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endo/eventual-send",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "Extend a Promise class to implement the eventual-send API",
5
5
  "type": "module",
6
6
  "main": "src/no-shim.js",
@@ -9,9 +9,9 @@
9
9
  "test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js",
10
10
  "test:xs": "exit 0",
11
11
  "build": "exit 0",
12
- "clean": "git clean -f '*.d.ts*'",
12
+ "clean": "git clean -fX \"*.d.ts*\" \"*.d.cts*\" \"*.d.mts*\" \"*.tsbuildinfo\"",
13
13
  "prepack": "tsc --build tsconfig.build.json",
14
- "postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'",
14
+ "postpack": "yarn clean",
15
15
  "lint-fix": "yarn lint:eslint --fix && yarn lint:types",
16
16
  "lint": "yarn lint:types && yarn lint:eslint",
17
17
  "lint:types": "tsc",
@@ -35,10 +35,10 @@
35
35
  },
36
36
  "homepage": "https://github.com/endojs/endo#readme",
37
37
  "dependencies": {
38
- "@endo/env-options": "^1.1.9"
38
+ "@endo/env-options": "^1.1.11"
39
39
  },
40
40
  "devDependencies": {
41
- "@endo/lockdown": "^1.0.16",
41
+ "@endo/lockdown": "^1.0.18",
42
42
  "ava": "^6.1.3",
43
43
  "c8": "^7.14.0",
44
44
  "tsd": "^0.31.2",
@@ -76,5 +76,5 @@
76
76
  "typeCoverage": {
77
77
  "atLeast": 77.81
78
78
  },
79
- "gitHead": "571b7803cf10df7cb4fa9d70e4d53a0b53767fa8"
79
+ "gitHead": "9815aea9541f241389d2135c6097a7442bdffa17"
80
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["local.js"],"names":[],"mappings":"AA8CO,oCAHI,GAAG,GACD,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAqB7B;AAKM,mEAkBN;AAEM,kFAqCN;AAEM,gDAAmC"}
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["local.js"],"names":[],"mappings":"AAsDO,oCAHI,GAAG,GACD,CAAC,MAAM,GAAC,MAAM,CAAC,EAAE,CAqB7B;AAKM,mEAkBN;AAEM,kFAqCN;AAEM,gDAAmC"}
package/src/local.js CHANGED
@@ -10,12 +10,20 @@ const ntypeof = specimen => (specimen === null ? 'null' : typeof specimen);
10
10
  const onDelivery = makeMessageBreakpointTester('ENDO_DELIVERY_BREAKPOINTS');
11
11
 
12
12
  /**
13
- * TODO Consolidate with `isObject` that's currently in `@endo/marshal`
13
+ * TODO Consolidate with `isPrimitive` that's currently in `@endo/pass-style`.
14
+ * Layering constraints make this tricky, which is why we haven't yet figured
15
+ * out how to do this.
14
16
  *
15
- * @param {any} val
16
- * @returns {boolean}
17
+ * @type {(val: unknown) => val is (undefined
18
+ * | null
19
+ * | boolean
20
+ * | number
21
+ * | bigint
22
+ * | string
23
+ * | symbol)}
17
24
  */
18
- const isObject = val => Object(val) === val;
25
+ const isPrimitive = val =>
26
+ !val || (typeof val !== 'object' && typeof val !== 'function');
19
27
 
20
28
  /**
21
29
  * Prioritize symbols as earlier than strings.
@@ -57,7 +65,7 @@ export const getMethodNames = val => {
57
65
  names.add(name);
58
66
  }
59
67
  }
60
- if (!isObject(val)) {
68
+ if (isPrimitive(val)) {
61
69
  break;
62
70
  }
63
71
  layer = getPrototypeOf(layer);