step-node-agent 3.26.5 → 3.27.0

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.
Files changed (259) hide show
  1. package/node_modules/call-bind-apply-helpers/.eslintrc +1 -0
  2. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +7 -0
  3. package/node_modules/call-bind-apply-helpers/index.d.ts +38 -20
  4. package/node_modules/call-bind-apply-helpers/index.js +1 -1
  5. package/node_modules/call-bind-apply-helpers/package.json +8 -8
  6. package/node_modules/call-bind-apply-helpers/test/index.js +4 -4
  7. package/node_modules/{call-bind → call-bound}/.eslintrc +0 -3
  8. package/node_modules/{define-data-property → call-bound}/.github/FUNDING.yml +1 -1
  9. package/node_modules/call-bound/CHANGELOG.md +42 -0
  10. package/node_modules/{call-bind → call-bound}/LICENSE +1 -1
  11. package/node_modules/call-bound/README.md +53 -0
  12. package/node_modules/call-bound/index.d.ts +94 -0
  13. package/node_modules/call-bound/index.js +19 -0
  14. package/node_modules/{call-bind → call-bound}/package.json +23 -17
  15. package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +12 -5
  16. package/node_modules/call-bound/tsconfig.json +10 -0
  17. package/node_modules/dunder-proto/CHANGELOG.md +9 -0
  18. package/node_modules/dunder-proto/get.js +10 -3
  19. package/node_modules/dunder-proto/package.json +4 -4
  20. package/node_modules/dunder-proto/set.js +7 -1
  21. package/node_modules/dunder-proto/test/set.js +10 -1
  22. package/node_modules/es-object-atoms/.eslintrc +16 -0
  23. package/node_modules/{set-function-length → es-object-atoms}/.github/FUNDING.yml +1 -1
  24. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  25. package/node_modules/{has-property-descriptors → es-object-atoms}/LICENSE +1 -1
  26. package/node_modules/es-object-atoms/README.md +63 -0
  27. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  28. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  29. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  30. package/node_modules/es-object-atoms/ToObject.js +10 -0
  31. package/node_modules/es-object-atoms/index.d.ts +3 -0
  32. package/node_modules/es-object-atoms/index.js +4 -0
  33. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  34. package/node_modules/es-object-atoms/isObject.js +6 -0
  35. package/node_modules/es-object-atoms/package.json +80 -0
  36. package/node_modules/es-object-atoms/test/index.js +38 -0
  37. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  38. package/node_modules/get-intrinsic/.eslintrc +4 -0
  39. package/node_modules/get-intrinsic/CHANGELOG.md +25 -0
  40. package/node_modules/get-intrinsic/index.js +25 -6
  41. package/node_modules/get-intrinsic/package.json +11 -9
  42. package/node_modules/get-proto/.eslintrc +10 -0
  43. package/node_modules/{call-bind → get-proto}/.github/FUNDING.yml +1 -1
  44. package/node_modules/get-proto/CHANGELOG.md +21 -0
  45. package/node_modules/{define-data-property → get-proto}/LICENSE +1 -1
  46. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  47. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  48. package/node_modules/get-proto/README.md +50 -0
  49. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  50. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  51. package/node_modules/get-proto/index.d.ts +5 -0
  52. package/node_modules/get-proto/index.js +27 -0
  53. package/node_modules/{has-property-descriptors → get-proto}/package.json +35 -31
  54. package/node_modules/get-proto/test/index.js +68 -0
  55. package/node_modules/get-proto/tsconfig.json +9 -0
  56. package/node_modules/is-core-module/CHANGELOG.md +13 -0
  57. package/node_modules/is-core-module/core.json +1 -0
  58. package/node_modules/is-core-module/package.json +3 -3
  59. package/node_modules/is-core-module/test/index.js +3 -0
  60. package/node_modules/math-intrinsics/.eslintrc +16 -0
  61. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  62. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  63. package/node_modules/{set-function-length → math-intrinsics}/LICENSE +1 -1
  64. package/node_modules/math-intrinsics/README.md +50 -0
  65. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  66. package/node_modules/math-intrinsics/abs.js +4 -0
  67. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  68. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  69. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  70. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  71. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  72. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  73. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  74. package/node_modules/math-intrinsics/floor.js +4 -0
  75. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  76. package/node_modules/math-intrinsics/isFinite.js +12 -0
  77. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  78. package/node_modules/math-intrinsics/isInteger.js +16 -0
  79. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  80. package/node_modules/math-intrinsics/isNaN.js +6 -0
  81. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  82. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  83. package/node_modules/math-intrinsics/max.d.ts +1 -0
  84. package/node_modules/math-intrinsics/max.js +4 -0
  85. package/node_modules/math-intrinsics/min.d.ts +1 -0
  86. package/node_modules/math-intrinsics/min.js +4 -0
  87. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  88. package/node_modules/math-intrinsics/mod.js +9 -0
  89. package/node_modules/math-intrinsics/package.json +86 -0
  90. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  91. package/node_modules/math-intrinsics/pow.js +4 -0
  92. package/node_modules/math-intrinsics/round.d.ts +1 -0
  93. package/node_modules/math-intrinsics/round.js +4 -0
  94. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  95. package/node_modules/math-intrinsics/sign.js +11 -0
  96. package/node_modules/math-intrinsics/test/index.js +192 -0
  97. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  98. package/node_modules/object-inspect/CHANGELOG.md +8 -0
  99. package/node_modules/object-inspect/index.js +10 -7
  100. package/node_modules/object-inspect/package.json +5 -4
  101. package/node_modules/object-inspect/test/values.js +50 -0
  102. package/node_modules/resolve/lib/core.json +4 -0
  103. package/node_modules/resolve/package.json +12 -9
  104. package/node_modules/side-channel/.eslintrc +1 -0
  105. package/node_modules/side-channel/CHANGELOG.md +15 -0
  106. package/node_modules/side-channel/README.md +60 -1
  107. package/node_modules/side-channel/index.d.ts +9 -22
  108. package/node_modules/side-channel/index.js +20 -106
  109. package/node_modules/side-channel/package.json +20 -19
  110. package/node_modules/side-channel/test/index.js +76 -55
  111. package/node_modules/side-channel/tsconfig.json +2 -43
  112. package/node_modules/side-channel-list/.editorconfig +9 -0
  113. package/node_modules/side-channel-list/.eslintrc +11 -0
  114. package/node_modules/{has-property-descriptors → side-channel-list}/.github/FUNDING.yml +1 -1
  115. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  116. package/node_modules/side-channel-list/LICENSE +21 -0
  117. package/node_modules/side-channel-list/README.md +62 -0
  118. package/node_modules/side-channel-list/index.d.ts +13 -0
  119. package/node_modules/side-channel-list/index.js +113 -0
  120. package/node_modules/side-channel-list/list.d.ts +14 -0
  121. package/node_modules/side-channel-list/package.json +77 -0
  122. package/node_modules/side-channel-list/test/index.js +104 -0
  123. package/node_modules/side-channel-map/.editorconfig +9 -0
  124. package/node_modules/side-channel-map/.eslintrc +11 -0
  125. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  126. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  127. package/node_modules/side-channel-map/LICENSE +21 -0
  128. package/node_modules/side-channel-map/README.md +62 -0
  129. package/node_modules/side-channel-map/index.d.ts +15 -0
  130. package/node_modules/side-channel-map/index.js +68 -0
  131. package/node_modules/side-channel-map/package.json +80 -0
  132. package/node_modules/side-channel-map/test/index.js +114 -0
  133. package/node_modules/side-channel-map/tsconfig.json +9 -0
  134. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  135. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  136. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  137. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  138. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  139. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  140. package/node_modules/side-channel-weakmap/README.md +62 -0
  141. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  142. package/node_modules/side-channel-weakmap/index.js +84 -0
  143. package/node_modules/side-channel-weakmap/package.json +87 -0
  144. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  145. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  146. package/node_modules/yaml/README.md +27 -8
  147. package/node_modules/yaml/browser/dist/compose/resolve-props.js +1 -1
  148. package/node_modules/yaml/browser/dist/log.js +1 -4
  149. package/node_modules/yaml/browser/dist/schema/yaml-1.1/binary.js +2 -11
  150. package/node_modules/yaml/browser/dist/util.js +1 -1
  151. package/node_modules/yaml/dist/compose/compose-collection.d.ts +4 -4
  152. package/node_modules/yaml/dist/compose/compose-doc.d.ts +6 -6
  153. package/node_modules/yaml/dist/compose/compose-node.d.ts +7 -7
  154. package/node_modules/yaml/dist/compose/compose-scalar.d.ts +4 -4
  155. package/node_modules/yaml/dist/compose/composer.d.ts +7 -6
  156. package/node_modules/yaml/dist/compose/composer.js +2 -1
  157. package/node_modules/yaml/dist/compose/resolve-block-map.d.ts +5 -5
  158. package/node_modules/yaml/dist/compose/resolve-block-scalar.d.ts +5 -5
  159. package/node_modules/yaml/dist/compose/resolve-block-seq.d.ts +5 -5
  160. package/node_modules/yaml/dist/compose/resolve-end.d.ts +2 -2
  161. package/node_modules/yaml/dist/compose/resolve-flow-collection.d.ts +7 -7
  162. package/node_modules/yaml/dist/compose/resolve-flow-scalar.d.ts +4 -4
  163. package/node_modules/yaml/dist/compose/resolve-props.d.ts +2 -2
  164. package/node_modules/yaml/dist/compose/resolve-props.js +1 -1
  165. package/node_modules/yaml/dist/compose/util-contains-newline.d.ts +1 -1
  166. package/node_modules/yaml/dist/compose/util-empty-scalar-position.d.ts +1 -1
  167. package/node_modules/yaml/dist/compose/util-flow-indent-check.d.ts +2 -2
  168. package/node_modules/yaml/dist/compose/util-map-includes.d.ts +3 -3
  169. package/node_modules/yaml/dist/doc/Document.d.ts +11 -11
  170. package/node_modules/yaml/dist/doc/anchors.d.ts +2 -2
  171. package/node_modules/yaml/dist/doc/createNode.d.ts +4 -4
  172. package/node_modules/yaml/dist/doc/directives.d.ts +1 -1
  173. package/node_modules/yaml/dist/index.d.ts +21 -18
  174. package/node_modules/yaml/dist/log.js +4 -2
  175. package/node_modules/yaml/dist/nodes/Alias.d.ts +9 -8
  176. package/node_modules/yaml/dist/nodes/Collection.d.ts +4 -4
  177. package/node_modules/yaml/dist/nodes/Node.d.ts +10 -10
  178. package/node_modules/yaml/dist/nodes/Pair.d.ts +9 -8
  179. package/node_modules/yaml/dist/nodes/Scalar.d.ts +4 -3
  180. package/node_modules/yaml/dist/nodes/YAMLMap.d.ts +10 -10
  181. package/node_modules/yaml/dist/nodes/YAMLSeq.d.ts +10 -10
  182. package/node_modules/yaml/dist/nodes/addPairToJSMap.d.ts +3 -3
  183. package/node_modules/yaml/dist/nodes/identity.d.ts +7 -7
  184. package/node_modules/yaml/dist/nodes/toJS.d.ts +2 -2
  185. package/node_modules/yaml/dist/options.d.ts +10 -10
  186. package/node_modules/yaml/dist/parse/cst-scalar.d.ts +4 -4
  187. package/node_modules/yaml/dist/parse/cst-stringify.d.ts +1 -1
  188. package/node_modules/yaml/dist/parse/cst-visit.d.ts +2 -2
  189. package/node_modules/yaml/dist/parse/cst.d.ts +4 -3
  190. package/node_modules/yaml/dist/parse/lexer.d.ts +1 -1
  191. package/node_modules/yaml/dist/parse/parser.d.ts +4 -4
  192. package/node_modules/yaml/dist/parse/parser.js +2 -1
  193. package/node_modules/yaml/dist/public-api.d.ts +6 -5
  194. package/node_modules/yaml/dist/schema/Schema.d.ts +4 -4
  195. package/node_modules/yaml/dist/schema/common/map.d.ts +1 -1
  196. package/node_modules/yaml/dist/schema/common/null.d.ts +1 -1
  197. package/node_modules/yaml/dist/schema/common/seq.d.ts +1 -1
  198. package/node_modules/yaml/dist/schema/common/string.d.ts +1 -1
  199. package/node_modules/yaml/dist/schema/core/bool.d.ts +1 -1
  200. package/node_modules/yaml/dist/schema/core/float.d.ts +1 -1
  201. package/node_modules/yaml/dist/schema/core/int.d.ts +1 -1
  202. package/node_modules/yaml/dist/schema/core/schema.d.ts +1 -1
  203. package/node_modules/yaml/dist/schema/json/schema.d.ts +1 -1
  204. package/node_modules/yaml/dist/schema/tags.d.ts +2 -2
  205. package/node_modules/yaml/dist/schema/types.d.ts +8 -8
  206. package/node_modules/yaml/dist/schema/yaml-1.1/binary.d.ts +1 -1
  207. package/node_modules/yaml/dist/schema/yaml-1.1/binary.js +6 -5
  208. package/node_modules/yaml/dist/schema/yaml-1.1/bool.d.ts +1 -1
  209. package/node_modules/yaml/dist/schema/yaml-1.1/float.d.ts +1 -1
  210. package/node_modules/yaml/dist/schema/yaml-1.1/int.d.ts +1 -1
  211. package/node_modules/yaml/dist/schema/yaml-1.1/merge.d.ts +3 -3
  212. package/node_modules/yaml/dist/schema/yaml-1.1/omap.d.ts +11 -17
  213. package/node_modules/yaml/dist/schema/yaml-1.1/pairs.d.ts +7 -7
  214. package/node_modules/yaml/dist/schema/yaml-1.1/schema.d.ts +1 -1
  215. package/node_modules/yaml/dist/schema/yaml-1.1/set.d.ts +9 -9
  216. package/node_modules/yaml/dist/schema/yaml-1.1/timestamp.d.ts +1 -1
  217. package/node_modules/yaml/dist/stringify/stringify.d.ts +3 -3
  218. package/node_modules/yaml/dist/stringify/stringifyCollection.d.ts +2 -2
  219. package/node_modules/yaml/dist/stringify/stringifyDocument.d.ts +3 -3
  220. package/node_modules/yaml/dist/stringify/stringifyNumber.d.ts +1 -1
  221. package/node_modules/yaml/dist/stringify/stringifyPair.d.ts +2 -2
  222. package/node_modules/yaml/dist/stringify/stringifyString.d.ts +2 -2
  223. package/node_modules/yaml/dist/util.d.ts +16 -12
  224. package/node_modules/yaml/dist/util.js +2 -2
  225. package/node_modules/yaml/dist/visit.d.ts +7 -7
  226. package/node_modules/yaml/package.json +4 -4
  227. package/package.json +1 -1
  228. package/node_modules/call-bind/.eslintignore +0 -1
  229. package/node_modules/call-bind/CHANGELOG.md +0 -106
  230. package/node_modules/call-bind/README.md +0 -64
  231. package/node_modules/call-bind/callBound.js +0 -15
  232. package/node_modules/call-bind/index.js +0 -24
  233. package/node_modules/call-bind/test/index.js +0 -74
  234. package/node_modules/define-data-property/.eslintrc +0 -24
  235. package/node_modules/define-data-property/CHANGELOG.md +0 -70
  236. package/node_modules/define-data-property/README.md +0 -67
  237. package/node_modules/define-data-property/index.d.ts +0 -12
  238. package/node_modules/define-data-property/index.js +0 -56
  239. package/node_modules/define-data-property/package.json +0 -106
  240. package/node_modules/define-data-property/test/index.js +0 -392
  241. package/node_modules/define-data-property/tsconfig.json +0 -59
  242. package/node_modules/has-property-descriptors/.eslintrc +0 -13
  243. package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  244. package/node_modules/has-property-descriptors/README.md +0 -43
  245. package/node_modules/has-property-descriptors/index.js +0 -22
  246. package/node_modules/has-property-descriptors/test/index.js +0 -57
  247. package/node_modules/set-function-length/.eslintrc +0 -27
  248. package/node_modules/set-function-length/CHANGELOG.md +0 -70
  249. package/node_modules/set-function-length/README.md +0 -56
  250. package/node_modules/set-function-length/env.d.ts +0 -9
  251. package/node_modules/set-function-length/env.js +0 -25
  252. package/node_modules/set-function-length/index.d.ts +0 -7
  253. package/node_modules/set-function-length/index.js +0 -42
  254. package/node_modules/set-function-length/package.json +0 -102
  255. /package/node_modules/{call-bind → call-bound}/.nycrc +0 -0
  256. /package/node_modules/{has-property-descriptors → get-proto}/.nycrc +0 -0
  257. /package/node_modules/{define-data-property → side-channel-list}/.nycrc +0 -0
  258. /package/node_modules/{set-function-length → side-channel-list}/tsconfig.json +0 -0
  259. /package/node_modules/{set-function-length → side-channel-map}/.nycrc +0 -0
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ var reflectGetProto = require('./Reflect.getPrototypeOf');
4
+ var originalGetProto = require('./Object.getPrototypeOf');
5
+
6
+ var getDunderProto = require('dunder-proto/get');
7
+
8
+ /** @type {import('.')} */
9
+ module.exports = reflectGetProto
10
+ ? function getProto(O) {
11
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
12
+ return reflectGetProto(O);
13
+ }
14
+ : originalGetProto
15
+ ? function getProto(O) {
16
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
17
+ throw new TypeError('getProto: not an object');
18
+ }
19
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
20
+ return originalGetProto(O);
21
+ }
22
+ : getDunderProto
23
+ ? function getProto(O) {
24
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
25
+ return getDunderProto(O);
26
+ }
27
+ : null;
@@ -1,65 +1,66 @@
1
1
  {
2
- "name": "has-property-descriptors",
3
- "version": "1.0.2",
4
- "description": "Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.",
2
+ "name": "get-proto",
3
+ "version": "1.0.1",
4
+ "description": "Robustly get the [[Prototype]] of an object",
5
5
  "main": "index.js",
6
6
  "exports": {
7
7
  ".": "./index.js",
8
+ "./Reflect.getPrototypeOf": "./Reflect.getPrototypeOf.js",
9
+ "./Object.getPrototypeOf": "./Object.getPrototypeOf.js",
8
10
  "./package.json": "./package.json"
9
11
  },
10
- "sideEffects": false,
11
12
  "scripts": {
12
13
  "prepack": "npmignore --auto --commentLines=autogenerated",
13
- "prepublishOnly": "safe-publish-latest",
14
14
  "prepublish": "not-in-publish || npm run prepublishOnly",
15
- "pretest": "npm run lint",
15
+ "prepublishOnly": "safe-publish-latest",
16
+ "pretest": "npm run --silent lint",
17
+ "test": "npm run tests-only",
18
+ "posttest": "npx npm@\">=10.2\" audit --production",
19
+ "tests-only": "nyc tape 'test/**/*.js'",
16
20
  "prelint": "evalmd README.md",
17
21
  "lint": "eslint --ext=js,mjs .",
18
- "tests-only": "nyc tape 'test/**/*.js'",
19
- "test": "npm run tests-only",
20
- "posttest": "aud --production",
22
+ "postlint": "tsc && attw -P",
21
23
  "version": "auto-changelog && git add CHANGELOG.md",
22
24
  "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
23
25
  },
24
26
  "repository": {
25
27
  "type": "git",
26
- "url": "git+https://github.com/inspect-js/has-property-descriptors.git"
28
+ "url": "git+https://github.com/ljharb/get-proto.git"
27
29
  },
28
30
  "keywords": [
29
- "property",
30
- "descriptors",
31
- "has",
32
- "environment",
33
- "env",
34
- "defineProperty",
35
- "getOwnPropertyDescriptor"
31
+ "get",
32
+ "proto",
33
+ "prototype",
34
+ "getPrototypeOf",
35
+ "[[Prototype]]"
36
36
  ],
37
37
  "author": "Jordan Harband <ljharb@gmail.com>",
38
- "funding": {
39
- "url": "https://github.com/sponsors/ljharb"
40
- },
41
38
  "license": "MIT",
42
39
  "bugs": {
43
- "url": "https://github.com/inspect-js/has-property-descriptors/issues"
40
+ "url": "https://github.com/ljharb/get-proto/issues"
41
+ },
42
+ "homepage": "https://github.com/ljharb/get-proto#readme",
43
+ "dependencies": {
44
+ "dunder-proto": "^1.0.1",
45
+ "es-object-atoms": "^1.0.0"
44
46
  },
45
- "homepage": "https://github.com/inspect-js/has-property-descriptors#readme",
46
47
  "devDependencies": {
47
- "@ljharb/eslint-config": "^21.1.0",
48
- "aud": "^2.0.4",
49
- "auto-changelog": "^2.4.0",
48
+ "@arethetypeswrong/cli": "^0.17.2",
49
+ "@ljharb/eslint-config": "^21.1.1",
50
+ "@ljharb/tsconfig": "^0.2.3",
51
+ "@types/tape": "^5.8.0",
52
+ "auto-changelog": "^2.5.0",
50
53
  "eslint": "=8.8.0",
51
54
  "evalmd": "^0.0.19",
52
55
  "in-publish": "^2.0.1",
53
56
  "npmignore": "^0.3.1",
54
57
  "nyc": "^10.3.2",
55
58
  "safe-publish-latest": "^2.0.0",
56
- "tape": "^5.7.4"
57
- },
58
- "dependencies": {
59
- "es-define-property": "^1.0.0"
59
+ "tape": "^5.9.0",
60
+ "typescript": "next"
60
61
  },
61
- "testling": {
62
- "files": "test/index.js"
62
+ "engines": {
63
+ "node": ">= 0.4"
63
64
  },
64
65
  "auto-changelog": {
65
66
  "output": "CHANGELOG.md",
@@ -73,5 +74,8 @@
73
74
  "ignore": [
74
75
  ".github/workflows"
75
76
  ]
77
+ },
78
+ "testling": {
79
+ "files": "test/index.js"
76
80
  }
77
81
  }
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ var getProto = require('../');
6
+
7
+ test('getProto', function (t) {
8
+ t.equal(typeof getProto, 'function', 'is a function');
9
+
10
+ t.test('can get', { skip: !getProto }, function (st) {
11
+ if (getProto) { // TS doesn't understand tape's skip
12
+ var proto = { b: 2 };
13
+ st.equal(getProto(proto), Object.prototype, 'proto: returns the [[Prototype]]');
14
+
15
+ st.test('nullish value', function (s2t) {
16
+ // @ts-expect-error
17
+ s2t['throws'](function () { return getProto(undefined); }, TypeError, 'undefined is not an object');
18
+ // @ts-expect-error
19
+ s2t['throws'](function () { return getProto(null); }, TypeError, 'null is not an object');
20
+ s2t.end();
21
+ });
22
+
23
+ // @ts-expect-error
24
+ st['throws'](function () { getProto(true); }, 'throws for true');
25
+ // @ts-expect-error
26
+ st['throws'](function () { getProto(false); }, 'throws for false');
27
+ // @ts-expect-error
28
+ st['throws'](function () { getProto(42); }, 'throws for 42');
29
+ // @ts-expect-error
30
+ st['throws'](function () { getProto(NaN); }, 'throws for NaN');
31
+ // @ts-expect-error
32
+ st['throws'](function () { getProto(0); }, 'throws for +0');
33
+ // @ts-expect-error
34
+ st['throws'](function () { getProto(-0); }, 'throws for -0');
35
+ // @ts-expect-error
36
+ st['throws'](function () { getProto(Infinity); }, 'throws for ∞');
37
+ // @ts-expect-error
38
+ st['throws'](function () { getProto(-Infinity); }, 'throws for -∞');
39
+ // @ts-expect-error
40
+ st['throws'](function () { getProto(''); }, 'throws for empty string');
41
+ // @ts-expect-error
42
+ st['throws'](function () { getProto('foo'); }, 'throws for non-empty string');
43
+ st.equal(getProto(/a/g), RegExp.prototype);
44
+ st.equal(getProto(new Date()), Date.prototype);
45
+ st.equal(getProto(function () {}), Function.prototype);
46
+ st.equal(getProto([]), Array.prototype);
47
+ st.equal(getProto({}), Object.prototype);
48
+
49
+ var nullObject = { __proto__: null };
50
+ if ('toString' in nullObject) {
51
+ st.comment('no null objects in this engine');
52
+ st.equal(getProto(nullObject), Object.prototype, '"null" object has Object.prototype as [[Prototype]]');
53
+ } else {
54
+ st.equal(getProto(nullObject), null, 'null object has null [[Prototype]]');
55
+ }
56
+ }
57
+
58
+ st.end();
59
+ });
60
+
61
+ t.test('can not get', { skip: !!getProto }, function (st) {
62
+ st.equal(getProto, null);
63
+
64
+ st.end();
65
+ });
66
+
67
+ t.end();
68
+ });
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@ljharb/tsconfig",
3
+ "compilerOptions": {
4
+ //"target": "es2021",
5
+ },
6
+ "exclude": [
7
+ "coverage",
8
+ ],
9
+ }
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v2.16.1](https://github.com/inspect-js/is-core-module/compare/v2.16.0...v2.16.1) - 2024-12-21
9
+
10
+ ### Fixed
11
+
12
+ - [Fix] `node:sqlite` is available in node ^22.13 [`#17`](https://github.com/inspect-js/is-core-module/issues/17)
13
+
14
+ ## [v2.16.0](https://github.com/inspect-js/is-core-module/compare/v2.15.1...v2.16.0) - 2024-12-13
15
+
16
+ ### Commits
17
+
18
+ - [New] add `node:sqlite` [`1ee94d2`](https://github.com/inspect-js/is-core-module/commit/1ee94d20857e22cdb24e9b4bb1a2097f2e03e26f)
19
+ - [Dev Deps] update `auto-changelog`, `tape` [`aa84aa3`](https://github.com/inspect-js/is-core-module/commit/aa84aa34face677f14e08ec1c737f0c4bba27260)
20
+
8
21
  ## [v2.15.1](https://github.com/inspect-js/is-core-module/compare/v2.15.0...v2.15.1) - 2024-08-21
9
22
 
10
23
  ### Commits
@@ -91,6 +91,7 @@
91
91
  "node:repl": [">= 14.18 && < 15", ">= 16"],
92
92
  "node:sea": [">= 20.12 && < 21", ">= 21.7"],
93
93
  "smalloc": ">= 0.11.5 && < 3",
94
+ "node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
94
95
  "_stream_duplex": ">= 0.9.4",
95
96
  "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
96
97
  "_stream_transform": ">= 0.9.4",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "is-core-module",
3
- "version": "2.15.1",
3
+ "version": "2.16.1",
4
4
  "description": "Is this specifier a node.js core module?",
5
5
  "main": "index.js",
6
6
  "sideEffects": false,
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@ljharb/eslint-config": "^21.1.1",
49
- "auto-changelog": "^2.4.0",
49
+ "auto-changelog": "^2.5.0",
50
50
  "encoding": "^0.1.13",
51
51
  "eslint": "=8.8.0",
52
52
  "in-publish": "^2.0.1",
@@ -55,7 +55,7 @@
55
55
  "nyc": "^10.3.2",
56
56
  "safe-publish-latest": "^2.0.0",
57
57
  "semver": "^6.3.1",
58
- "tape": "^5.8.1"
58
+ "tape": "^5.9.0"
59
59
  },
60
60
  "auto-changelog": {
61
61
  "output": "CHANGELOG.md",
@@ -92,6 +92,9 @@ test('core modules', function (t) {
92
92
  if (semver.satisfies(process.version, '^20.12 || >= 21.7')) {
93
93
  libs = libs.concat('node:sea');
94
94
  }
95
+ if (semver.satisfies(process.version, '>= 23.4')) {
96
+ libs = libs.concat('node:sqlite');
97
+ }
95
98
 
96
99
  for (var i = 0; i < libs.length; ++i) {
97
100
  var mod = libs[i];
@@ -0,0 +1,16 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "eqeqeq": ["error", "allow-null"],
8
+ "id-length": "off",
9
+ "new-cap": ["error", {
10
+ "capIsNewExceptions": [
11
+ "RequireObjectCoercible",
12
+ "ToObject",
13
+ ],
14
+ }],
15
+ },
16
+ }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/math-intrinsics
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with a single custom sponsorship URL
@@ -0,0 +1,24 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18
9
+
10
+ ### Commits
11
+
12
+ - [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130)
13
+ - [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d)
14
+ - [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec)
15
+
16
+ ## v1.0.0 - 2024-12-11
17
+
18
+ ### Commits
19
+
20
+ - Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe)
21
+ - Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c)
22
+ - [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5)
23
+ - npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2)
24
+ - Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd)
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) Jordan Harband and contributors
3
+ Copyright (c) 2024 ECMAScript Shims
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,50 @@
1
+ # math-intrinsics <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![License][license-image]][license-url]
6
+ [![Downloads][downloads-image]][downloads-url]
7
+
8
+ [![npm badge][npm-badge-png]][package-url]
9
+
10
+ ES Math-related intrinsics and helpers, robustly cached.
11
+
12
+ - `abs`
13
+ - `floor`
14
+ - `isFinite`
15
+ - `isInteger`
16
+ - `isNaN`
17
+ - `isNegativeZero`
18
+ - `max`
19
+ - `min`
20
+ - `mod`
21
+ - `pow`
22
+ - `round`
23
+ - `sign`
24
+ - `constants/maxArrayLength`
25
+ - `constants/maxSafeInteger`
26
+ - `constants/maxValue`
27
+
28
+
29
+ ## Tests
30
+ Simply clone the repo, `npm install`, and run `npm test`
31
+
32
+ ## Security
33
+
34
+ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
35
+
36
+ [package-url]: https://npmjs.org/package/math-intrinsics
37
+ [npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg
38
+ [deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg
39
+ [deps-url]: https://david-dm.org/es-shims/math-intrinsics
40
+ [dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg
41
+ [dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies
42
+ [npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true
43
+ [license-image]: https://img.shields.io/npm/l/math-intrinsics.svg
44
+ [license-url]: LICENSE
45
+ [downloads-image]: https://img.shields.io/npm/dm/es-object.svg
46
+ [downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics
47
+ [codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg
48
+ [codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/
49
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics
50
+ [actions-url]: https://github.com/es-shims/math-intrinsics/actions
@@ -0,0 +1 @@
1
+ export = Math.abs;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./abs')} */
4
+ module.exports = Math.abs;
@@ -0,0 +1,3 @@
1
+ declare const MAX_ARRAY_LENGTH: 4294967295;
2
+
3
+ export = MAX_ARRAY_LENGTH;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxArrayLength')} */
4
+ module.exports = 4294967295; // Math.pow(2, 32) - 1;
@@ -0,0 +1,3 @@
1
+ declare const MAX_SAFE_INTEGER: 9007199254740991;
2
+
3
+ export = MAX_SAFE_INTEGER;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxSafeInteger')} */
4
+ // eslint-disable-next-line no-extra-parens
5
+ module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1;
@@ -0,0 +1,3 @@
1
+ declare const MAX_VALUE: 1.7976931348623157e+308;
2
+
3
+ export = MAX_VALUE;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxValue')} */
4
+ // eslint-disable-next-line no-extra-parens
5
+ module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308;
@@ -0,0 +1 @@
1
+ export = Math.floor;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./floor')} */
4
+ module.exports = Math.floor;
@@ -0,0 +1,3 @@
1
+ declare function isFinite(x: unknown): x is number | bigint;
2
+
3
+ export = isFinite;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var $isNaN = require('./isNaN');
4
+
5
+ /** @type {import('./isFinite')} */
6
+ module.exports = function isFinite(x) {
7
+ return (typeof x === 'number' || typeof x === 'bigint')
8
+ && !$isNaN(x)
9
+ && x !== Infinity
10
+ && x !== -Infinity;
11
+ };
12
+
@@ -0,0 +1,3 @@
1
+ declare function isInteger(argument: unknown): argument is number;
2
+
3
+ export = isInteger;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var $abs = require('./abs');
4
+ var $floor = require('./floor');
5
+
6
+ var $isNaN = require('./isNaN');
7
+ var $isFinite = require('./isFinite');
8
+
9
+ /** @type {import('./isInteger')} */
10
+ module.exports = function isInteger(argument) {
11
+ if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
12
+ return false;
13
+ }
14
+ var absValue = $abs(argument);
15
+ return $floor(absValue) === absValue;
16
+ };
@@ -0,0 +1 @@
1
+ export = Number.isNaN;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./isNaN')} */
4
+ module.exports = Number.isNaN || function isNaN(a) {
5
+ return a !== a;
6
+ };
@@ -0,0 +1,3 @@
1
+ declare function isNegativeZero(x: unknown): boolean;
2
+
3
+ export = isNegativeZero;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./isNegativeZero')} */
4
+ module.exports = function isNegativeZero(x) {
5
+ return x === 0 && 1 / x === 1 / -0;
6
+ };
@@ -0,0 +1 @@
1
+ export = Math.max;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./max')} */
4
+ module.exports = Math.max;
@@ -0,0 +1 @@
1
+ export = Math.min;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./min')} */
4
+ module.exports = Math.min;
@@ -0,0 +1,3 @@
1
+ declare function mod(number: number, modulo: number): number;
2
+
3
+ export = mod;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var $floor = require('./floor');
4
+
5
+ /** @type {import('./mod')} */
6
+ module.exports = function mod(number, modulo) {
7
+ var remain = number % modulo;
8
+ return $floor(remain >= 0 ? remain : remain + modulo);
9
+ };
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "math-intrinsics",
3
+ "version": "1.1.0",
4
+ "description": "ES Math-related intrinsics and helpers, robustly cached.",
5
+ "main": false,
6
+ "exports": {
7
+ "./abs": "./abs.js",
8
+ "./floor": "./floor.js",
9
+ "./isFinite": "./isFinite.js",
10
+ "./isInteger": "./isInteger.js",
11
+ "./isNaN": "./isNaN.js",
12
+ "./isNegativeZero": "./isNegativeZero.js",
13
+ "./max": "./max.js",
14
+ "./min": "./min.js",
15
+ "./mod": "./mod.js",
16
+ "./pow": "./pow.js",
17
+ "./sign": "./sign.js",
18
+ "./round": "./round.js",
19
+ "./constants/maxArrayLength": "./constants/maxArrayLength.js",
20
+ "./constants/maxSafeInteger": "./constants/maxSafeInteger.js",
21
+ "./constants/maxValue": "./constants/maxValue.js",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "sideEffects": false,
25
+ "scripts": {
26
+ "prepack": "npmignore --auto --commentLines=autogenerated",
27
+ "prepublishOnly": "safe-publish-latest",
28
+ "prepublish": "not-in-publish || npm run prepublishOnly",
29
+ "pretest": "npm run lint",
30
+ "test": "npm run tests-only",
31
+ "tests-only": "nyc tape 'test/**/*.js'",
32
+ "posttest": "npx npm@'>= 10.2' audit --production",
33
+ "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
34
+ "lint": "eslint --ext=js,mjs .",
35
+ "postlint": "tsc && attw -P",
36
+ "version": "auto-changelog && git add CHANGELOG.md",
37
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/es-shims/math-intrinsics.git"
42
+ },
43
+ "author": "Jordan Harband <ljharb@gmail.com>",
44
+ "license": "MIT",
45
+ "bugs": {
46
+ "url": "https://github.com/es-shims/math-intrinsics/issues"
47
+ },
48
+ "homepage": "https://github.com/es-shims/math-intrinsics#readme",
49
+ "devDependencies": {
50
+ "@arethetypeswrong/cli": "^0.17.1",
51
+ "@ljharb/eslint-config": "^21.1.1",
52
+ "@ljharb/tsconfig": "^0.2.2",
53
+ "@types/for-each": "^0.3.3",
54
+ "@types/object-inspect": "^1.13.0",
55
+ "@types/tape": "^5.8.0",
56
+ "auto-changelog": "^2.5.0",
57
+ "eclint": "^2.8.1",
58
+ "es-value-fixtures": "^1.5.0",
59
+ "eslint": "^8.8.0",
60
+ "evalmd": "^0.0.19",
61
+ "for-each": "^0.3.3",
62
+ "in-publish": "^2.0.1",
63
+ "npmignore": "^0.3.1",
64
+ "nyc": "^10.3.2",
65
+ "object-inspect": "^1.13.3",
66
+ "safe-publish-latest": "^2.0.0",
67
+ "tape": "^5.9.0",
68
+ "typescript": "next"
69
+ },
70
+ "auto-changelog": {
71
+ "output": "CHANGELOG.md",
72
+ "template": "keepachangelog",
73
+ "unreleased": false,
74
+ "commitLimit": false,
75
+ "backfillLimit": false,
76
+ "hideCredit": true
77
+ },
78
+ "publishConfig": {
79
+ "ignore": [
80
+ ".github/workflows"
81
+ ]
82
+ },
83
+ "engines": {
84
+ "node": ">= 0.4"
85
+ }
86
+ }
@@ -0,0 +1 @@
1
+ export = Math.pow;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./pow')} */
4
+ module.exports = Math.pow;