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
@@ -1,106 +0,0 @@
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.0.8](https://github.com/ljharb/call-bind/compare/v1.0.7...v1.0.8) - 2024-12-05
9
-
10
- ### Commits
11
-
12
- - [Refactor] extract out some helpers and avoid get-intrinsic usage [`407fd5e`](https://github.com/ljharb/call-bind/commit/407fd5eec34ec58394522a6ce3badfa4788fd5ae)
13
- - [Refactor] replace code with extracted `call-bind-apply-helpers` [`81018fb`](https://github.com/ljharb/call-bind/commit/81018fb78902ff5acbc6c09300780e97f0db6a34)
14
- - [Tests] use `set-function-length/env` [`0fc311d`](https://github.com/ljharb/call-bind/commit/0fc311de0e115cfa6b02969b23a42ad45aadf224)
15
- - [actions] split out node 10-20, and 20+ [`77a0cad`](https://github.com/ljharb/call-bind/commit/77a0cad75f83f5b8050dc13baef4fa2cff537fa3)
16
- - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `gopd`, `object-inspect`, `tape` [`a145d10`](https://github.com/ljharb/call-bind/commit/a145d10fe847f350e11094f8541848b028ee8c91)
17
- - [Tests] replace `aud` with `npm audit` [`30ca3dd`](https://github.com/ljharb/call-bind/commit/30ca3dd7234648eb029947477d06b17879e10727)
18
- - [Deps] update `set-function-length` [`57c79a3`](https://github.com/ljharb/call-bind/commit/57c79a3666022ea797cc2a4a3b43fe089bc97d1b)
19
- - [Dev Deps] add missing peer dep [`601cfa5`](https://github.com/ljharb/call-bind/commit/601cfa5540066b6206039ceb9496cecbd134ff7b)
20
-
21
- ## [v1.0.7](https://github.com/ljharb/call-bind/compare/v1.0.6...v1.0.7) - 2024-02-12
22
-
23
- ### Commits
24
-
25
- - [Refactor] use `es-define-property` [`09b76a0`](https://github.com/ljharb/call-bind/commit/09b76a01634440461d44a80c9924ec4b500f3b03)
26
- - [Deps] update `get-intrinsic`, `set-function-length` [`ad5136d`](https://github.com/ljharb/call-bind/commit/ad5136ddda2a45c590959829ad3dce0c9f4e3590)
27
-
28
- ## [v1.0.6](https://github.com/ljharb/call-bind/compare/v1.0.5...v1.0.6) - 2024-02-05
29
-
30
- ### Commits
31
-
32
- - [Dev Deps] update `aud`, `npmignore`, `tape` [`d564d5c`](https://github.com/ljharb/call-bind/commit/d564d5ce3e06a19df4d499c77f8d1a9da44e77aa)
33
- - [Deps] update `get-intrinsic`, `set-function-length` [`cfc2bdc`](https://github.com/ljharb/call-bind/commit/cfc2bdca7b633df0e0e689e6b637f668f1c6792e)
34
- - [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`64cd289`](https://github.com/ljharb/call-bind/commit/64cd289ae5862c250a4ca80aa8d461047c166af5)
35
- - [meta] add missing `engines.node` [`32a4038`](https://github.com/ljharb/call-bind/commit/32a4038857b62179f7f9b7b3df2c5260036be582)
36
-
37
- ## [v1.0.5](https://github.com/ljharb/call-bind/compare/v1.0.4...v1.0.5) - 2023-10-19
38
-
39
- ### Commits
40
-
41
- - [Fix] throw an error on non-functions as early as possible [`f262408`](https://github.com/ljharb/call-bind/commit/f262408f822c840fbc268080f3ad7c429611066d)
42
- - [Deps] update `set-function-length` [`3fff271`](https://github.com/ljharb/call-bind/commit/3fff27145a1e3a76a5b74f1d7c3c43d0fa3b9871)
43
-
44
- ## [v1.0.4](https://github.com/ljharb/call-bind/compare/v1.0.3...v1.0.4) - 2023-10-19
45
-
46
- ## [v1.0.3](https://github.com/ljharb/call-bind/compare/v1.0.2...v1.0.3) - 2023-10-19
47
-
48
- ### Commits
49
-
50
- - [actions] reuse common workflows [`a994df6`](https://github.com/ljharb/call-bind/commit/a994df69f401f4bf735a4ccd77029b85d1549453)
51
- - [meta] use `npmignore` to autogenerate an npmignore file [`eef3ef2`](https://github.com/ljharb/call-bind/commit/eef3ef21e1f002790837fedb8af2679c761fbdf5)
52
- - [readme] flesh out content [`1845ccf`](https://github.com/ljharb/call-bind/commit/1845ccfd9976a607884cfc7157c93192cc16cf22)
53
- - [actions] use `node/install` instead of `node/run`; use `codecov` action [`5b47d53`](https://github.com/ljharb/call-bind/commit/5b47d53d2fd74af5ea0a44f1d51e503cd42f7a90)
54
- - [Refactor] use `set-function-length` [`a0e165c`](https://github.com/ljharb/call-bind/commit/a0e165c5dc61db781cbc919b586b1c2b8da0b150)
55
- - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`9c50103`](https://github.com/ljharb/call-bind/commit/9c50103f44137279a817317cf6cc421a658f85b4)
56
- - [meta] simplify "exports" [`019c6d0`](https://github.com/ljharb/call-bind/commit/019c6d06b0e1246ceed8e579f57e44441cbbf6d9)
57
- - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `safe-publish-latest`, `tape` [`23bd718`](https://github.com/ljharb/call-bind/commit/23bd718a288d3b03042062b4ef5153b3cea83f11)
58
- - [actions] update codecov uploader [`62552d7`](https://github.com/ljharb/call-bind/commit/62552d79cc79e05825e99aaba134ae5b37f33da5)
59
- - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`ec81665`](https://github.com/ljharb/call-bind/commit/ec81665b300f87eabff597afdc8b8092adfa7afd)
60
- - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`35d67fc`](https://github.com/ljharb/call-bind/commit/35d67fcea883e686650f736f61da5ddca2592de8)
61
- - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`0266d8d`](https://github.com/ljharb/call-bind/commit/0266d8d2a45086a922db366d0c2932fa463662ff)
62
- - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`43a5b28`](https://github.com/ljharb/call-bind/commit/43a5b28a444e710e1bbf92adb8afb5cf7523a223)
63
- - [Deps] update `define-data-property`, `function-bind`, `get-intrinsic` [`780eb36`](https://github.com/ljharb/call-bind/commit/780eb36552514f8cc99c70821ce698697c2726a5)
64
- - [Dev Deps] update `aud`, `tape` [`90d50ad`](https://github.com/ljharb/call-bind/commit/90d50ad03b061e0268b3380b0065fcaec183dc05)
65
- - [meta] use `prepublishOnly` script for npm 7+ [`44c5433`](https://github.com/ljharb/call-bind/commit/44c5433b7980e02b4870007046407cf6fc543329)
66
- - [Deps] update `get-intrinsic` [`86bfbfc`](https://github.com/ljharb/call-bind/commit/86bfbfcf34afdc6eabc93ce3d408548d0e27d958)
67
- - [Deps] update `get-intrinsic` [`5c53354`](https://github.com/ljharb/call-bind/commit/5c5335489be0294c18cd7a8bb6e08226ee019ff5)
68
- - [actions] update checkout action [`4c393a8`](https://github.com/ljharb/call-bind/commit/4c393a8173b3c8e5b30d5b3297b3b94d48bf87f3)
69
- - [Deps] update `get-intrinsic` [`4e70bde`](https://github.com/ljharb/call-bind/commit/4e70bdec0626acb11616d66250fc14565e716e91)
70
- - [Deps] update `get-intrinsic` [`55ae803`](https://github.com/ljharb/call-bind/commit/55ae803a920bd93c369cd798c20de31f91e9fc60)
71
-
72
- ## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
73
-
74
- ### Commits
75
-
76
- - [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d)
77
-
78
- ## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08
79
-
80
- ### Commits
81
-
82
- - [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1)
83
- - [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e)
84
- - [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb)
85
- - [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8)
86
- - [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71)
87
- - [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee)
88
- - [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2)
89
- - [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8)
90
- - [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532)
91
- - [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6)
92
-
93
- ## v1.0.0 - 2020-10-30
94
-
95
- ### Commits
96
-
97
- - Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50)
98
- - Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df)
99
- - Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65)
100
- - npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249)
101
- - [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13)
102
- - [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4)
103
- - [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717)
104
- - [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af)
105
- - Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650)
106
- - [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f)
@@ -1,64 +0,0 @@
1
- # call-bind <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
-
3
- [![github actions][actions-image]][actions-url]
4
- [![coverage][codecov-image]][codecov-url]
5
- [![dependency status][deps-svg]][deps-url]
6
- [![dev dependency status][dev-deps-svg]][dev-deps-url]
7
- [![License][license-image]][license-url]
8
- [![Downloads][downloads-image]][downloads-url]
9
-
10
- [![npm badge][npm-badge-png]][package-url]
11
-
12
- Robustly `.call.bind()` a function.
13
-
14
- ## Getting started
15
-
16
- ```sh
17
- npm install --save call-bind
18
- ```
19
-
20
- ## Usage/Examples
21
-
22
- ```js
23
- const assert = require('assert');
24
- const callBind = require('call-bind');
25
- const callBound = require('call-bind/callBound');
26
-
27
- function f(a, b) {
28
- assert.equal(this, 1);
29
- assert.equal(a, 2);
30
- assert.equal(b, 3);
31
- assert.equal(arguments.length, 2);
32
- }
33
-
34
- const fBound = callBind(f);
35
-
36
- const slice = callBound('Array.prototype.slice');
37
-
38
- delete Function.prototype.call;
39
- delete Function.prototype.bind;
40
-
41
- fBound(1, 2, 3);
42
-
43
- assert.deepEqual(slice([1, 2, 3, 4], 1, -1), [2, 3]);
44
- ```
45
-
46
- ## Tests
47
-
48
- Clone the repo, `npm install`, and run `npm test`
49
-
50
- [package-url]: https://npmjs.org/package/call-bind
51
- [npm-version-svg]: https://versionbadg.es/ljharb/call-bind.svg
52
- [deps-svg]: https://david-dm.org/ljharb/call-bind.svg
53
- [deps-url]: https://david-dm.org/ljharb/call-bind
54
- [dev-deps-svg]: https://david-dm.org/ljharb/call-bind/dev-status.svg
55
- [dev-deps-url]: https://david-dm.org/ljharb/call-bind#info=devDependencies
56
- [npm-badge-png]: https://nodei.co/npm/call-bind.png?downloads=true&stars=true
57
- [license-image]: https://img.shields.io/npm/l/call-bind.svg
58
- [license-url]: LICENSE
59
- [downloads-image]: https://img.shields.io/npm/dm/call-bind.svg
60
- [downloads-url]: https://npm-stat.com/charts.html?package=call-bind
61
- [codecov-image]: https://codecov.io/gh/ljharb/call-bind/branch/main/graphs/badge.svg
62
- [codecov-url]: https://app.codecov.io/gh/ljharb/call-bind/
63
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/call-bind
64
- [actions-url]: https://github.com/ljharb/call-bind/actions
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- var GetIntrinsic = require('get-intrinsic');
4
-
5
- var callBind = require('./');
6
-
7
- var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
8
-
9
- module.exports = function callBoundIntrinsic(name, allowMissing) {
10
- var intrinsic = GetIntrinsic(name, !!allowMissing);
11
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
12
- return callBind(intrinsic);
13
- }
14
- return intrinsic;
15
- };
@@ -1,24 +0,0 @@
1
- 'use strict';
2
-
3
- var setFunctionLength = require('set-function-length');
4
-
5
- var $defineProperty = require('es-define-property');
6
-
7
- var callBindBasic = require('call-bind-apply-helpers');
8
- var applyBind = require('call-bind-apply-helpers/applyBind');
9
-
10
- module.exports = function callBind(originalFunction) {
11
- var func = callBindBasic(arguments);
12
- var adjustedLength = originalFunction.length - (arguments.length - 1);
13
- return setFunctionLength(
14
- func,
15
- 1 + (adjustedLength > 0 ? adjustedLength : 0),
16
- true
17
- );
18
- };
19
-
20
- if ($defineProperty) {
21
- $defineProperty(module.exports, 'apply', { value: applyBind });
22
- } else {
23
- module.exports.apply = applyBind;
24
- }
@@ -1,74 +0,0 @@
1
- 'use strict';
2
-
3
- var callBind = require('../');
4
- var hasStrictMode = require('has-strict-mode')();
5
- var forEach = require('for-each');
6
- var inspect = require('object-inspect');
7
- var v = require('es-value-fixtures');
8
-
9
- var test = require('tape');
10
-
11
- /*
12
- * older engines have length nonconfigurable
13
- * in io.js v3, it is configurable except on bound functions, hence the .bind()
14
- */
15
- var boundFnsHaveConfigurableLengths = require('set-function-length/env').boundFnsHaveConfigurableLengths;
16
-
17
- test('callBind', function (t) {
18
- forEach(v.nonFunctions, function (nonFunction) {
19
- t['throws'](
20
- function () { callBind(nonFunction); },
21
- TypeError,
22
- inspect(nonFunction) + ' is not a function'
23
- );
24
- });
25
-
26
- var sentinel = { sentinel: true };
27
- var func = function (a, b) {
28
- // eslint-disable-next-line no-invalid-this
29
- return [!hasStrictMode && this === global ? undefined : this, a, b];
30
- };
31
- t.equal(func.length, 2, 'original function length is 2');
32
- t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
33
- t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
34
- t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
35
-
36
- var bound = callBind(func);
37
- t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths });
38
- t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
39
- t.deepEqual(bound(1, 2), [hasStrictMode ? 1 : Object(1), 2, undefined], 'bound func with right args');
40
- t.deepEqual(bound(1, 2, 3), [hasStrictMode ? 1 : Object(1), 2, 3], 'bound func with too many args');
41
-
42
- var boundR = callBind(func, sentinel);
43
- t.equal(boundR.length, func.length, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths });
44
- t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
45
- t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
46
- t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
47
-
48
- var boundArg = callBind(func, sentinel, 1);
49
- t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !boundFnsHaveConfigurableLengths });
50
- t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
51
- t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
52
- t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
53
-
54
- t.test('callBind.apply', function (st) {
55
- var aBound = callBind.apply(func);
56
- st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args');
57
- st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
58
- st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
59
-
60
- var aBoundArg = callBind.apply(func);
61
- st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args');
62
- st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
63
- st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
64
-
65
- var aBoundR = callBind.apply(func, sentinel);
66
- st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args');
67
- st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args');
68
- st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args');
69
-
70
- st.end();
71
- });
72
-
73
- t.end();
74
- });
@@ -1,24 +0,0 @@
1
- {
2
- "root": true,
3
-
4
- "extends": "@ljharb",
5
-
6
- "rules": {
7
- "complexity": 0,
8
- "id-length": 0,
9
- "new-cap": ["error", {
10
- "capIsNewExceptions": [
11
- "GetIntrinsic",
12
- ],
13
- }],
14
- },
15
-
16
- "overrides": [
17
- {
18
- "files": "test/**",
19
- "rules": {
20
- "max-lines-per-function": "off",
21
- },
22
- },
23
- ],
24
- }
@@ -1,70 +0,0 @@
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.4](https://github.com/ljharb/define-data-property/compare/v1.1.3...v1.1.4) - 2024-02-13
9
-
10
- ### Commits
11
-
12
- - [Refactor] use `es-define-property` [`90f2f4c`](https://github.com/ljharb/define-data-property/commit/90f2f4cc20298401e71c28e1e08888db12021453)
13
- - [Dev Deps] update `@types/object.getownpropertydescriptors` [`cd929d9`](https://github.com/ljharb/define-data-property/commit/cd929d9a04f5f2fdcfa9d5be140940b91a083153)
14
-
15
- ## [v1.1.3](https://github.com/ljharb/define-data-property/compare/v1.1.2...v1.1.3) - 2024-02-12
16
-
17
- ### Commits
18
-
19
- - [types] hand-write d.ts instead of emitting it [`0cbc988`](https://github.com/ljharb/define-data-property/commit/0cbc988203c105f2d97948327c7167ebd33bd318)
20
- - [meta] simplify `exports` [`690781e`](https://github.com/ljharb/define-data-property/commit/690781eed28bbf2d6766237efda0ba6dd591609e)
21
- - [Dev Deps] update `hasown`; clean up DT packages [`6cdfd1c`](https://github.com/ljharb/define-data-property/commit/6cdfd1cb2d91d791bfd18cda5d5cab232fd5d8fc)
22
- - [actions] cleanup [`3142bc6`](https://github.com/ljharb/define-data-property/commit/3142bc6a4bc406a51f5b04f31e98562a27f35ffd)
23
- - [meta] add `funding` [`8474423`](https://github.com/ljharb/define-data-property/commit/847442391a79779af3e0f1bf0b5bb923552b7804)
24
- - [Deps] update `get-intrinsic` [`3e9be00`](https://github.com/ljharb/define-data-property/commit/3e9be00e07784ba34e7c77d8bc0fdbc832ad61de)
25
-
26
- ## [v1.1.2](https://github.com/ljharb/define-data-property/compare/v1.1.1...v1.1.2) - 2024-02-05
27
-
28
- ### Commits
29
-
30
- - [Dev Deps] update @types packages, `object-inspect`, `tape`, `typescript` [`df41bf8`](https://github.com/ljharb/define-data-property/commit/df41bf84ca3456be6226055caab44e38e3a7fd2f)
31
- - [Dev Deps] update DT packages, `aud`, `npmignore`, `tape`, typescript` [`fab0e4e`](https://github.com/ljharb/define-data-property/commit/fab0e4ec709ee02b79f42d6db3ee5f26e0a34b8a)
32
- - [Dev Deps] use `hasown` instead of `has` [`aa51ef9`](https://github.com/ljharb/define-data-property/commit/aa51ef93f6403d49d9bb72a807bcdb6e418978c0)
33
- - [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d89be50`](https://github.com/ljharb/define-data-property/commit/d89be50571175888d391238605122679f7e65ffc)
34
- - [Deps] update `has-property-descriptors` [`7af887c`](https://github.com/ljharb/define-data-property/commit/7af887c9083b59b195b0079e04815cfed9fcee2b)
35
- - [Deps] update `get-intrinsic` [`bb8728e`](https://github.com/ljharb/define-data-property/commit/bb8728ec42cd998505a7157ae24853a560c20646)
36
-
37
- ## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12
38
-
39
- ### Commits
40
-
41
- - [Tests] fix tests in ES3 engines [`5c6920e`](https://github.com/ljharb/define-data-property/commit/5c6920edd1f52f675b02f417e539c28135b43f94)
42
- - [Dev Deps] update `@types/es-value-fixtures`, `@types/for-each`, `@types/gopd`, `@types/has-property-descriptors`, `tape`, `typescript` [`7d82dfc`](https://github.com/ljharb/define-data-property/commit/7d82dfc20f778b4465bba06335dd53f6f431aea3)
43
- - [Fix] IE 8 has a broken `Object.defineProperty` [`0672e1a`](https://github.com/ljharb/define-data-property/commit/0672e1af2a9fcc787e7c23b96dea60d290df5548)
44
- - [meta] emit types on prepack [`73acb1f`](https://github.com/ljharb/define-data-property/commit/73acb1f903c21b314ec7156bf10f73c7910530c0)
45
- - [Dev Deps] update `tape`, `typescript` [`9489a77`](https://github.com/ljharb/define-data-property/commit/9489a7738bf2ecf0ac71d5b78ec4ca6ad7ba0142)
46
-
47
- ## [v1.1.0](https://github.com/ljharb/define-data-property/compare/v1.0.1...v1.1.0) - 2023-09-13
48
-
49
- ### Commits
50
-
51
- - [New] add `loose` arg [`155235a`](https://github.com/ljharb/define-data-property/commit/155235a4c4d7741f6de01cd87c99599a56654b72)
52
- - [New] allow `null` to be passed for the non* args [`7d2fa5f`](https://github.com/ljharb/define-data-property/commit/7d2fa5f06be0392736c13b126f7cd38979f34792)
53
-
54
- ## [v1.0.1](https://github.com/ljharb/define-data-property/compare/v1.0.0...v1.0.1) - 2023-09-12
55
-
56
- ### Commits
57
-
58
- - [meta] add TS types [`43d763c`](https://github.com/ljharb/define-data-property/commit/43d763c6c883f652de1c9c02ef6216ee507ffa69)
59
- - [Dev Deps] update `@types/tape`, `typescript` [`f444985`](https://github.com/ljharb/define-data-property/commit/f444985811c36f3e6448a03ad2f9b7898917f4c7)
60
- - [meta] add `safe-publish-latest`, [`172bb10`](https://github.com/ljharb/define-data-property/commit/172bb10890896ebb160e64398f6ee55760107bee)
61
-
62
- ## v1.0.0 - 2023-09-12
63
-
64
- ### Commits
65
-
66
- - Initial implementation, tests, readme [`5b43d6b`](https://github.com/ljharb/define-data-property/commit/5b43d6b44e675a904810467a7d4e0adb7efc3196)
67
- - Initial commit [`35e577a`](https://github.com/ljharb/define-data-property/commit/35e577a6ba59a98befa97776d70d90f3bea9009d)
68
- - npm init [`82a0a04`](https://github.com/ljharb/define-data-property/commit/82a0a04a321ca7de220af02d41e2745e8a9962ed)
69
- - Only apps should have lockfiles [`96df244`](https://github.com/ljharb/define-data-property/commit/96df244a3c6f426f9a2437be825d1c6f5dd7158e)
70
- - [meta] use `npmignore` to autogenerate an npmignore file [`a87ff18`](https://github.com/ljharb/define-data-property/commit/a87ff18cb79e14c2eb5720486c4759fd9a189375)
@@ -1,67 +0,0 @@
1
- # define-data-property <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
- Define a data property on an object. Will fall back to assignment in an engine without descriptors.
11
-
12
- The three `non*` argument can also be passed `null`, which will use the existing state if available.
13
-
14
- The `loose` argument will mean that if you attempt to set a non-normal data property, in an environment without descriptor support, it will fall back to normal assignment.
15
-
16
- ## Usage
17
-
18
- ```javascript
19
- var defineDataProperty = require('define-data-property');
20
- var assert = require('assert');
21
-
22
- var obj = {};
23
- defineDataProperty(obj, 'key', 'value');
24
- defineDataProperty(
25
- obj,
26
- 'key2',
27
- 'value',
28
- true, // nonEnumerable, optional
29
- false, // nonWritable, optional
30
- true, // nonConfigurable, optional
31
- false // loose, optional
32
- );
33
-
34
- assert.deepEqual(
35
- Object.getOwnPropertyDescriptors(obj),
36
- {
37
- key: {
38
- configurable: true,
39
- enumerable: true,
40
- value: 'value',
41
- writable: true,
42
- },
43
- key2: {
44
- configurable: false,
45
- enumerable: false,
46
- value: 'value',
47
- writable: true,
48
- },
49
- }
50
- );
51
- ```
52
-
53
- [package-url]: https://npmjs.org/package/define-data-property
54
- [npm-version-svg]: https://versionbadg.es/ljharb/define-data-property.svg
55
- [deps-svg]: https://david-dm.org/ljharb/define-data-property.svg
56
- [deps-url]: https://david-dm.org/ljharb/define-data-property
57
- [dev-deps-svg]: https://david-dm.org/ljharb/define-data-property/dev-status.svg
58
- [dev-deps-url]: https://david-dm.org/ljharb/define-data-property#info=devDependencies
59
- [npm-badge-png]: https://nodei.co/npm/define-data-property.png?downloads=true&stars=true
60
- [license-image]: https://img.shields.io/npm/l/define-data-property.svg
61
- [license-url]: LICENSE
62
- [downloads-image]: https://img.shields.io/npm/dm/define-data-property.svg
63
- [downloads-url]: https://npm-stat.com/charts.html?package=define-data-property
64
- [codecov-image]: https://codecov.io/gh/ljharb/define-data-property/branch/main/graphs/badge.svg
65
- [codecov-url]: https://app.codecov.io/gh/ljharb/define-data-property/
66
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/define-data-property
67
- [actions-url]: https://github.com/ljharb/define-data-property/actions
@@ -1,12 +0,0 @@
1
-
2
- declare function defineDataProperty(
3
- obj: Record<PropertyKey, unknown>,
4
- property: keyof typeof obj,
5
- value: typeof obj[typeof property],
6
- nonEnumerable?: boolean | null,
7
- nonWritable?: boolean | null,
8
- nonConfigurable?: boolean | null,
9
- loose?: boolean
10
- ): void;
11
-
12
- export = defineDataProperty;
@@ -1,56 +0,0 @@
1
- 'use strict';
2
-
3
- var $defineProperty = require('es-define-property');
4
-
5
- var $SyntaxError = require('es-errors/syntax');
6
- var $TypeError = require('es-errors/type');
7
-
8
- var gopd = require('gopd');
9
-
10
- /** @type {import('.')} */
11
- module.exports = function defineDataProperty(
12
- obj,
13
- property,
14
- value
15
- ) {
16
- if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
17
- throw new $TypeError('`obj` must be an object or a function`');
18
- }
19
- if (typeof property !== 'string' && typeof property !== 'symbol') {
20
- throw new $TypeError('`property` must be a string or a symbol`');
21
- }
22
- if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
23
- throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
24
- }
25
- if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
26
- throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
27
- }
28
- if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
29
- throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
30
- }
31
- if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
32
- throw new $TypeError('`loose`, if provided, must be a boolean');
33
- }
34
-
35
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
36
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
37
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
38
- var loose = arguments.length > 6 ? arguments[6] : false;
39
-
40
- /* @type {false | TypedPropertyDescriptor<unknown>} */
41
- var desc = !!gopd && gopd(obj, property);
42
-
43
- if ($defineProperty) {
44
- $defineProperty(obj, property, {
45
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
46
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
47
- value: value,
48
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
49
- });
50
- } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
51
- // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
52
- obj[property] = value; // eslint-disable-line no-param-reassign
53
- } else {
54
- throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
55
- }
56
- };
@@ -1,106 +0,0 @@
1
- {
2
- "name": "define-data-property",
3
- "version": "1.1.4",
4
- "description": "Define a data property on an object. Will fall back to assignment in an engine without descriptors.",
5
- "main": "index.js",
6
- "types": "./index.d.ts",
7
- "exports": {
8
- ".": "./index.js",
9
- "./package.json": "./package.json"
10
- },
11
- "sideEffects": false,
12
- "scripts": {
13
- "prepack": "npmignore --auto --commentLines=autogenerated",
14
- "prepublish": "not-in-publish || npm run prepublishOnly",
15
- "prepublishOnly": "safe-publish-latest",
16
- "tsc": "tsc -p .",
17
- "prelint": "evalmd README.md",
18
- "lint": "eslint --ext=js,mjs .",
19
- "postlint": "npm run tsc",
20
- "pretest": "npm run lint",
21
- "tests-only": "nyc tape 'test/**/*.js'",
22
- "test": "npm run tests-only",
23
- "posttest": "aud --production",
24
- "version": "auto-changelog && git add CHANGELOG.md",
25
- "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
26
- },
27
- "repository": {
28
- "type": "git",
29
- "url": "git+https://github.com/ljharb/define-data-property.git"
30
- },
31
- "keywords": [
32
- "define",
33
- "data",
34
- "property",
35
- "object",
36
- "accessor",
37
- "javascript",
38
- "ecmascript",
39
- "enumerable",
40
- "configurable",
41
- "writable"
42
- ],
43
- "author": "Jordan Harband <ljharb@gmail.com>",
44
- "funding": {
45
- "url": "https://github.com/sponsors/ljharb"
46
- },
47
- "license": "MIT",
48
- "bugs": {
49
- "url": "https://github.com/ljharb/define-data-property/issues"
50
- },
51
- "homepage": "https://github.com/ljharb/define-data-property#readme",
52
- "dependencies": {
53
- "es-define-property": "^1.0.0",
54
- "es-errors": "^1.3.0",
55
- "gopd": "^1.0.1"
56
- },
57
- "devDependencies": {
58
- "@ljharb/eslint-config": "^21.1.0",
59
- "@types/call-bind": "^1.0.5",
60
- "@types/define-properties": "^1.1.5",
61
- "@types/es-value-fixtures": "^1.4.4",
62
- "@types/for-each": "^0.3.3",
63
- "@types/get-intrinsic": "^1.2.2",
64
- "@types/gopd": "^1.0.3",
65
- "@types/has-property-descriptors": "^1.0.3",
66
- "@types/object-inspect": "^1.8.4",
67
- "@types/object.getownpropertydescriptors": "^2.1.4",
68
- "@types/tape": "^5.6.4",
69
- "aud": "^2.0.4",
70
- "auto-changelog": "^2.4.0",
71
- "es-value-fixtures": "^1.4.2",
72
- "eslint": "=8.8.0",
73
- "evalmd": "^0.0.19",
74
- "for-each": "^0.3.3",
75
- "hasown": "^2.0.1",
76
- "in-publish": "^2.0.1",
77
- "npmignore": "^0.3.1",
78
- "nyc": "^10.3.2",
79
- "object-inspect": "^1.13.1",
80
- "object.getownpropertydescriptors": "^2.1.7",
81
- "reflect.ownkeys": "^1.1.4",
82
- "safe-publish-latest": "^2.0.0",
83
- "tape": "^5.7.4",
84
- "typescript": "next"
85
- },
86
- "engines": {
87
- "node": ">= 0.4"
88
- },
89
- "testling": {
90
- "files": "test/index.js"
91
- },
92
- "auto-changelog": {
93
- "output": "CHANGELOG.md",
94
- "template": "keepachangelog",
95
- "unreleased": false,
96
- "commitLimit": false,
97
- "backfillLimit": false,
98
- "hideCredit": true
99
- },
100
- "publishConfig": {
101
- "ignore": [
102
- ".github/workflows",
103
- "types/reflect.ownkeys"
104
- ]
105
- }
106
- }