cdk-lambda-subminute 2.0.550 → 2.0.552

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/.jsii +2 -2
  2. package/lib/cdk-lambda-subminute.js +3 -3
  3. package/node_modules/call-bind/CHANGELOG.md +13 -0
  4. package/node_modules/call-bind/index.js +6 -17
  5. package/node_modules/call-bind/package.json +14 -16
  6. package/node_modules/call-bind/test/index.js +4 -10
  7. package/node_modules/call-bind-apply-helpers/.eslintrc +16 -0
  8. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  9. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  10. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +15 -0
  11. package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
  12. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  13. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  14. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  15. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  16. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  17. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  18. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  19. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  20. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  21. package/node_modules/call-bind-apply-helpers/index.d.ts +46 -0
  22. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  23. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  24. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +1 -0
  25. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  26. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  27. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  28. package/node_modules/{has-proto → dunder-proto}/.github/FUNDING.yml +1 -1
  29. package/node_modules/dunder-proto/.nycrc +13 -0
  30. package/node_modules/dunder-proto/CHANGELOG.md +15 -0
  31. package/node_modules/dunder-proto/LICENSE +21 -0
  32. package/node_modules/dunder-proto/README.md +54 -0
  33. package/node_modules/dunder-proto/get.d.ts +5 -0
  34. package/node_modules/dunder-proto/get.js +23 -0
  35. package/node_modules/{has-proto → dunder-proto}/package.json +25 -41
  36. package/node_modules/dunder-proto/set.d.ts +5 -0
  37. package/node_modules/dunder-proto/set.js +29 -0
  38. package/node_modules/dunder-proto/test/get.js +34 -0
  39. package/node_modules/dunder-proto/test/index.js +4 -0
  40. package/node_modules/dunder-proto/test/set.js +41 -0
  41. package/node_modules/{has-proto → dunder-proto}/tsconfig.json +3 -5
  42. package/node_modules/es-define-property/CHANGELOG.md +14 -0
  43. package/node_modules/es-define-property/index.js +1 -3
  44. package/node_modules/es-define-property/package.json +12 -12
  45. package/node_modules/es-define-property/test/index.js +1 -0
  46. package/node_modules/es-define-property/tsconfig.json +2 -42
  47. package/node_modules/get-intrinsic/CHANGELOG.md +18 -0
  48. package/node_modules/get-intrinsic/index.js +20 -20
  49. package/node_modules/get-intrinsic/package.json +21 -19
  50. package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
  51. package/package.json +1 -1
  52. package/node_modules/has-proto/CHANGELOG.md +0 -52
  53. package/node_modules/has-proto/README.md +0 -57
  54. package/node_modules/has-proto/accessor.d.ts +0 -3
  55. package/node_modules/has-proto/accessor.js +0 -20
  56. package/node_modules/has-proto/helpers/getDunder.js +0 -12
  57. package/node_modules/has-proto/helpers/setDunder.js +0 -9
  58. package/node_modules/has-proto/index.d.ts +0 -3
  59. package/node_modules/has-proto/index.js +0 -15
  60. package/node_modules/has-proto/mutator.d.ts +0 -3
  61. package/node_modules/has-proto/mutator.js +0 -33
  62. package/node_modules/has-proto/test/accessor.js +0 -34
  63. package/node_modules/has-proto/test/index.js +0 -28
  64. package/node_modules/has-proto/test/mutator.js +0 -34
  65. /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
@@ -5,6 +5,24 @@ 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
+ ## [v1.2.5](https://github.com/ljharb/get-intrinsic/compare/v1.2.4...v1.2.5) - 2024-12-06
9
+
10
+ ### Commits
11
+
12
+ - [actions] split out node 10-20, and 20+ [`6e2b9dd`](https://github.com/ljharb/get-intrinsic/commit/6e2b9dd23902665681ebe453256ccfe21d7966f0)
13
+ - [Refactor] use `dunder-proto` and `call-bind-apply-helpers` instead of `has-proto` [`c095d17`](https://github.com/ljharb/get-intrinsic/commit/c095d179ad0f4fbfff20c8a3e0cb4fe668018998)
14
+ - [Refactor] use `gopd` [`9841d5b`](https://github.com/ljharb/get-intrinsic/commit/9841d5b35f7ab4fd2d193f0c741a50a077920e90)
15
+ - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-abstract`, `es-value-fixtures`, `gopd`, `mock-property`, `object-inspect`, `tape` [`2d07e01`](https://github.com/ljharb/get-intrinsic/commit/2d07e01310cee2cbaedfead6903df128b1f5d425)
16
+ - [Deps] update `gopd`, `has-proto`, `has-symbols`, `hasown` [`974d8bf`](https://github.com/ljharb/get-intrinsic/commit/974d8bf5baad7939eef35c25cc1dd88c10a30fa6)
17
+ - [Dev Deps] update `call-bind`, `es-abstract`, `tape` [`df9dde1`](https://github.com/ljharb/get-intrinsic/commit/df9dde178186631ab8a3165ede056549918ce4bc)
18
+ - [Refactor] cache `es-define-property` as well [`43ef543`](https://github.com/ljharb/get-intrinsic/commit/43ef543cb02194401420e3a914a4ca9168691926)
19
+ - [Deps] update `has-proto`, `has-symbols`, `hasown` [`ad4949d`](https://github.com/ljharb/get-intrinsic/commit/ad4949d5467316505aad89bf75f9417ed782f7af)
20
+ - [Tests] use `call-bound` directly [`ad5c406`](https://github.com/ljharb/get-intrinsic/commit/ad5c4069774bfe90e520a35eead5fe5ca9d69e80)
21
+ - [Deps] update `has-proto`, `hasown` [`45414ca`](https://github.com/ljharb/get-intrinsic/commit/45414caa312333a2798953682c68f85c550627dd)
22
+ - [Tests] replace `aud` with `npm audit` [`18d3509`](https://github.com/ljharb/get-intrinsic/commit/18d3509f79460e7924da70409ee81e5053087523)
23
+ - [Deps] update `es-define-property` [`aadaa3b`](https://github.com/ljharb/get-intrinsic/commit/aadaa3b2188d77ad9bff394ce5d4249c49eb21f5)
24
+ - [Dev Deps] add missing peer dep [`c296a16`](https://github.com/ljharb/get-intrinsic/commit/c296a16246d0c9a5981944f4cc5cf61fbda0cf6a)
25
+
8
26
  ## [v1.2.4](https://github.com/ljharb/get-intrinsic/compare/v1.2.3...v1.2.4) - 2024-02-05
9
27
 
10
28
  ### Commits
@@ -19,14 +19,8 @@ var getEvalledConstructor = function (expressionSyntax) {
19
19
  } catch (e) {}
20
20
  };
21
21
 
22
- var $gOPD = Object.getOwnPropertyDescriptor;
23
- if ($gOPD) {
24
- try {
25
- $gOPD({}, '');
26
- } catch (e) {
27
- $gOPD = null; // this is IE 8, which has a broken gOPD
28
- }
29
- }
22
+ var $gOPD = require('gopd');
23
+ var $defineProperty = require('es-define-property');
30
24
 
31
25
  var throwTypeError = function () {
32
26
  throw new $TypeError();
@@ -49,13 +43,14 @@ var ThrowTypeError = $gOPD
49
43
  : throwTypeError;
50
44
 
51
45
  var hasSymbols = require('has-symbols')();
52
- var hasProto = require('has-proto')();
46
+ var getDunderProto = require('dunder-proto/get');
47
+
48
+ var getProto = (typeof Reflect === 'function' && Reflect.getPrototypeOf)
49
+ || Object.getPrototypeOf
50
+ || getDunderProto;
53
51
 
54
- var getProto = Object.getPrototypeOf || (
55
- hasProto
56
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
57
- : null
58
- );
52
+ var $apply = require('call-bind-apply-helpers/functionApply');
53
+ var $call = require('call-bind-apply-helpers/functionCall');
59
54
 
60
55
  var needsEval = {};
61
56
 
@@ -103,6 +98,7 @@ var INTRINSICS = {
103
98
  '%Math%': Math,
104
99
  '%Number%': Number,
105
100
  '%Object%': Object,
101
+ '%Object.getOwnPropertyDescriptor%': $gOPD,
106
102
  '%parseFloat%': parseFloat,
107
103
  '%parseInt%': parseInt,
108
104
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
@@ -128,7 +124,11 @@ var INTRINSICS = {
128
124
  '%URIError%': $URIError,
129
125
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
130
126
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
131
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
127
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet,
128
+
129
+ '%Function.prototype.call%': $call,
130
+ '%Function.prototype.apply%': $apply,
131
+ '%Object.defineProperty%': $defineProperty
132
132
  };
133
133
 
134
134
  if (getProto) {
@@ -223,11 +223,11 @@ var LEGACY_ALIASES = {
223
223
 
224
224
  var bind = require('function-bind');
225
225
  var hasOwn = require('hasown');
226
- var $concat = bind.call(Function.call, Array.prototype.concat);
227
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
228
- var $replace = bind.call(Function.call, String.prototype.replace);
229
- var $strSlice = bind.call(Function.call, String.prototype.slice);
230
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
226
+ var $concat = bind.call($call, Array.prototype.concat);
227
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
228
+ var $replace = bind.call($call, String.prototype.replace);
229
+ var $strSlice = bind.call($call, String.prototype.slice);
230
+ var $exec = bind.call($call, RegExp.prototype.exec);
231
231
 
232
232
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
233
233
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-intrinsic",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Get and robustly cache all JS language-level intrinsics at first require time",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -17,7 +17,7 @@
17
17
  "pretest": "npm run lint",
18
18
  "tests-only": "nyc tape 'test/**/*.js'",
19
19
  "test": "npm run tests-only",
20
- "posttest": "aud --production",
20
+ "posttest": "npx npm@'>= 10.2' audit --production",
21
21
  "version": "auto-changelog && git add CHANGELOG.md",
22
22
  "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
23
  },
@@ -43,26 +43,35 @@
43
43
  "url": "https://github.com/ljharb/get-intrinsic/issues"
44
44
  },
45
45
  "homepage": "https://github.com/ljharb/get-intrinsic#readme",
46
+ "dependencies": {
47
+ "call-bind-apply-helpers": "^1.0.0",
48
+ "dunder-proto": "^1.0.0",
49
+ "es-define-property": "^1.0.1",
50
+ "es-errors": "^1.3.0",
51
+ "function-bind": "^1.1.2",
52
+ "gopd": "^1.2.0",
53
+ "has-symbols": "^1.1.0",
54
+ "hasown": "^2.0.2"
55
+ },
46
56
  "devDependencies": {
47
- "@ljharb/eslint-config": "^21.1.0",
48
- "aud": "^2.0.4",
49
- "auto-changelog": "^2.4.0",
50
- "call-bind": "^1.0.5",
51
- "es-abstract": "^1.22.3",
52
- "es-value-fixtures": "^1.4.2",
57
+ "@ljharb/eslint-config": "^21.1.1",
58
+ "auto-changelog": "^2.5.0",
59
+ "call-bound": "^1.0.1",
60
+ "encoding": "^0.1.13",
61
+ "es-abstract": "^1.23.5",
62
+ "es-value-fixtures": "^1.5.0",
53
63
  "eslint": "=8.8.0",
54
64
  "evalmd": "^0.0.19",
55
65
  "for-each": "^0.3.3",
56
- "gopd": "^1.0.1",
57
66
  "make-async-function": "^1.0.0",
58
67
  "make-async-generator-function": "^1.0.0",
59
68
  "make-generator-function": "^2.0.0",
60
- "mock-property": "^1.0.3",
69
+ "mock-property": "^1.1.0",
61
70
  "npmignore": "^0.3.1",
62
71
  "nyc": "^10.3.2",
63
- "object-inspect": "^1.13.1",
72
+ "object-inspect": "^1.13.3",
64
73
  "safe-publish-latest": "^2.0.0",
65
- "tape": "^5.7.4"
74
+ "tape": "^5.9.0"
66
75
  },
67
76
  "auto-changelog": {
68
77
  "output": "CHANGELOG.md",
@@ -72,13 +81,6 @@
72
81
  "backfillLimit": false,
73
82
  "hideCredit": true
74
83
  },
75
- "dependencies": {
76
- "es-errors": "^1.3.0",
77
- "function-bind": "^1.1.2",
78
- "has-proto": "^1.0.1",
79
- "has-symbols": "^1.0.3",
80
- "hasown": "^2.0.0"
81
- },
82
84
  "testling": {
83
85
  "files": "test/GetIntrinsic.js"
84
86
  },
@@ -10,10 +10,10 @@ var asyncFns = require('make-async-function').list();
10
10
  var asyncGenFns = require('make-async-generator-function')();
11
11
  var mockProperty = require('mock-property');
12
12
 
13
- var callBound = require('call-bind/callBound');
13
+ var callBound = require('call-bound');
14
14
  var v = require('es-value-fixtures');
15
15
  var $gOPD = require('gopd');
16
- var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow');
16
+ var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow');
17
17
 
18
18
  var $isProto = callBound('%Object.prototype.isPrototypeOf%');
19
19
 
package/package.json CHANGED
@@ -91,7 +91,7 @@
91
91
  "publishConfig": {
92
92
  "access": "public"
93
93
  },
94
- "version": "2.0.550",
94
+ "version": "2.0.552",
95
95
  "jest": {
96
96
  "coverageProvider": "v8",
97
97
  "testMatch": [
@@ -1,52 +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.0](https://github.com/inspect-js/has-proto/compare/v1.0.3...v1.1.0) - 2024-12-01
9
-
10
- ### Commits
11
-
12
- - [New] add `accessor` and `mutator` endpoints [`144f6a9`](https://github.com/inspect-js/has-proto/commit/144f6a9c2a3925f25058d5d5ea7eab3be57767d9)
13
- - [types] use shared config [`8b597cf`](https://github.com/inspect-js/has-proto/commit/8b597cff2b09f0351bc357cac0e0c7b0c8bb7e70)
14
- - [Refactor] cache result at module level [`88418bd`](https://github.com/inspect-js/has-proto/commit/88418bde7e0c37c7d9aa6cc79150e774004c01d8)
15
- - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`d246200`](https://github.com/inspect-js/has-proto/commit/d246200bae6ceceebb495df7f8eb0f27a017b63f)
16
- - [Deps] update `gopd`, `reflect.getprototypeof` [`6f72364`](https://github.com/inspect-js/has-proto/commit/6f723645da9b5bef0aaae4a1aa66c07a1fed179f)
17
- - [Tests] add `@arethetypeswrong/cli` [`8194e1a`](https://github.com/inspect-js/has-proto/commit/8194e1a607233f63c5bd0b91112c0423b3296ac9)
18
- - [Tests] replace `aud` with `npm audit` [`fd7ad11`](https://github.com/inspect-js/has-proto/commit/fd7ad111dc35488b3200a763204dba0f6087defc)
19
- - [Dev Deps] update `@types/tape` [`2695808`](https://github.com/inspect-js/has-proto/commit/26958086aec0b1cbfdddd4f10e54d2de1facf85c)
20
- - [Dev Deps] add missing peer dep [`fa4b2f7`](https://github.com/inspect-js/has-proto/commit/fa4b2f77f7c0071e1c06b5590c9bada8e6b2edce)
21
-
22
- ## [v1.0.3](https://github.com/inspect-js/has-proto/compare/v1.0.2...v1.0.3) - 2024-02-19
23
-
24
- ### Commits
25
-
26
- - [types] add missing declaration file [`26ecade`](https://github.com/inspect-js/has-proto/commit/26ecade05d253bb5dc376945ee3186d1fbe334f8)
27
-
28
- ## [v1.0.2](https://github.com/inspect-js/has-proto/compare/v1.0.1...v1.0.2) - 2024-02-19
29
-
30
- ### Commits
31
-
32
- - add types [`6435262`](https://github.com/inspect-js/has-proto/commit/64352626cf511c0276d5f4bb6be770a0bf0f8524)
33
- - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `tape` [`f16a5e4`](https://github.com/inspect-js/has-proto/commit/f16a5e4121651e551271419f9d60fdd3561fd82c)
34
- - [Refactor] tiny cleanup [`d1f1a4b`](https://github.com/inspect-js/has-proto/commit/d1f1a4bdc135f115a10f148ce302676224534702)
35
- - [meta] add `sideEffects` flag [`e7ab1a6`](https://github.com/inspect-js/has-proto/commit/e7ab1a6f153b3e80dee68d1748b71e46767a0531)
36
-
37
- ## [v1.0.1](https://github.com/inspect-js/has-proto/compare/v1.0.0...v1.0.1) - 2022-12-21
38
-
39
- ### Commits
40
-
41
- - [meta] correct URLs and description [`ef34483`](https://github.com/inspect-js/has-proto/commit/ef34483ca0d35680f271b6b96e35526151b25dfc)
42
- - [patch] add an additional criteria [`e81959e`](https://github.com/inspect-js/has-proto/commit/e81959ed7c7a77fbf459f00cb4ef824f1099497f)
43
- - [Dev Deps] update `aud` [`2bec2c4`](https://github.com/inspect-js/has-proto/commit/2bec2c47b072b122ff5443fba0263f6dc649531f)
44
-
45
- ## v1.0.0 - 2022-12-12
46
-
47
- ### Commits
48
-
49
- - Initial implementation, tests, readme [`6886fea`](https://github.com/inspect-js/has-proto/commit/6886fea578f67daf69a7920b2eb7637ea6ebb0bc)
50
- - Initial commit [`99129c8`](https://github.com/inspect-js/has-proto/commit/99129c8f42471ac89cb681ba9cb9d52a583eb94f)
51
- - npm init [`2844ad8`](https://github.com/inspect-js/has-proto/commit/2844ad8e75b84d66a46765b3bab9d2e8ea692e10)
52
- - Only apps should have lockfiles [`c65bc5e`](https://github.com/inspect-js/has-proto/commit/c65bc5e40b9004463f7336d47c67245fb139a36a)
@@ -1,57 +0,0 @@
1
- # has-proto <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
- Does this environment have the ability to set the [[Prototype]] of an object on creation with `__proto__`?
11
-
12
- ## Example
13
-
14
- ```js
15
- var hasProto = require('has-proto');
16
- var assert = require('assert');
17
-
18
- assert.equal(typeof hasProto(), 'boolean');
19
-
20
- var hasProtoAccessor = require('has-proto/accessor')();
21
- if (hasProtoAccessor) {
22
- assert.equal([].__proto__, Array.prototype);
23
- } else {
24
- assert(!('__proto__' in Object.prototype));
25
- }
26
-
27
- var hasProtoMutator = require('has-proto/mutator');
28
- var obj = {};
29
- assert('toString' in obj);
30
-
31
- obj.__proto__ = null;
32
- if (hasProtoMutator) {
33
- assert(!('toString' in obj));
34
- } else {
35
- assert('toString' in obj);
36
- assert.equal(obj.__proto__, null);
37
- }
38
- ```
39
-
40
- ## Tests
41
- Simply clone the repo, `npm install`, and run `npm test`
42
-
43
- [package-url]: https://npmjs.org/package/has-proto
44
- [npm-version-svg]: https://versionbadg.es/inspect-js/has-proto.svg
45
- [deps-svg]: https://david-dm.org/inspect-js/has-proto.svg
46
- [deps-url]: https://david-dm.org/inspect-js/has-proto
47
- [dev-deps-svg]: https://david-dm.org/inspect-js/has-proto/dev-status.svg
48
- [dev-deps-url]: https://david-dm.org/inspect-js/has-proto#info=devDependencies
49
- [npm-badge-png]: https://nodei.co/npm/has-proto.png?downloads=true&stars=true
50
- [license-image]: https://img.shields.io/npm/l/has-proto.svg
51
- [license-url]: LICENSE
52
- [downloads-image]: https://img.shields.io/npm/dm/has-proto.svg
53
- [downloads-url]: https://npm-stat.com/charts.html?package=has-proto
54
- [codecov-image]: https://codecov.io/gh/inspect-js/has-proto/branch/main/graphs/badge.svg
55
- [codecov-url]: https://app.codecov.io/gh/inspect-js/has-proto/
56
- [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-proto
57
- [actions-url]: https://github.com/inspect-js/has-proto/actions
@@ -1,3 +0,0 @@
1
- declare function accessor(): boolean;
2
-
3
- export = accessor;
@@ -1,20 +0,0 @@
1
- 'use strict';
2
-
3
- var result = require('./')();
4
-
5
- var test = {
6
- __proto__: null,
7
- foo: {}
8
- };
9
-
10
- /** @type {import('./accessor')} */
11
- module.exports = function hasAccessor() {
12
- /* eslint no-proto: 0 */
13
- return result
14
- && !('toString' in test)
15
- // eslint-disable-next-line no-extra-parens
16
- && /** @type {{ __proto__?: typeof Object.prototype }} */ ({}).__proto__ === Object.prototype
17
- // eslint-disable-next-line no-extra-parens
18
- && /** @type {ReadonlyArray<never> & { __proto__?: typeof Array.prototype }} */ (
19
- []).__proto__ === Array.prototype;
20
- };
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- var callBind = require('call-bind');
4
- var gOPD = require('gopd');
5
-
6
- // eslint-disable-next-line no-extra-parens, no-proto
7
- var hasProto = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
8
-
9
- // eslint-disable-next-line no-extra-parens
10
- var dunderGetter = hasProto && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
11
-
12
- module.exports = dunderGetter && dunderGetter.get && callBind(dunderGetter.get);
@@ -1,9 +0,0 @@
1
- 'use strict';
2
-
3
- var callBind = require('call-bind');
4
- var gOPD = require('gopd');
5
-
6
- // @ts-expect-error TS can't handle dunder proto
7
- var desc = gOPD && gOPD(Object.prototype, '__proto__');
8
-
9
- module.exports = !!desc && !!desc.set && callBind(desc.set);
@@ -1,3 +0,0 @@
1
- declare function hasProto(): boolean;
2
-
3
- export = hasProto;
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- var test = {
4
- __proto__: null,
5
- foo: {}
6
- };
7
-
8
- // @ts-expect-error: TS errors on an inherited property for some reason
9
- var result = { __proto__: test }.foo === test.foo
10
- && !(test instanceof Object);
11
-
12
- /** @type {import('.')} */
13
- module.exports = function hasProto() {
14
- return result;
15
- };
@@ -1,3 +0,0 @@
1
- declare function mutator(): boolean;
2
-
3
- export = mutator;
@@ -1,33 +0,0 @@
1
- 'use strict';
2
-
3
- var result = require('./')();
4
-
5
- var test = {
6
- __proto__: null,
7
- foo: {}
8
- };
9
-
10
- var setter = require('./helpers/setDunder');
11
-
12
- /** @type {import('./mutator')} */
13
- module.exports = function hasMutator() {
14
- if (!result) {
15
- return false;
16
- }
17
-
18
- var obj = { __proto__: test };
19
- // @ts-expect-error: TS errors on an inherited property for some reason
20
- if (obj.foo !== test.foo) {
21
- return false;
22
- }
23
-
24
- if (!setter) {
25
- return false;
26
- }
27
-
28
- setter(obj, null);
29
- if ('foo' in obj || 'toString' in obj) {
30
- return false;
31
- }
32
- return true;
33
- };
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var gPO = require('reflect.getprototypeof/polyfill')();
5
- var gOPD = require('gopd');
6
-
7
- var hasProto = require('../');
8
- var hasProtoAccessor = require('../accessor');
9
-
10
- var getter = require('../helpers/getDunder');
11
-
12
- test('hasProtoAccessor', function (t) {
13
- var result = hasProtoAccessor();
14
- t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')');
15
-
16
- var obj = { __proto__: null };
17
- if (result) {
18
- t.notOk('toString' in obj, 'null object lacks toString');
19
- t.equal(gPO(obj), null);
20
- if (gOPD && getter) {
21
- t.equal(getter(obj), null);
22
- }
23
- } else if (hasProto()) {
24
- t.notOk('toString' in obj, 'null object lacks toString');
25
- if (gOPD && getter) {
26
- t.equal(getter(obj), null);
27
- }
28
- } else {
29
- t.ok('toString' in obj, 'without proto, null object has toString');
30
- t.equal(gPO(obj), Object.prototype);
31
- }
32
-
33
- t.end();
34
- });
@@ -1,28 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var gPO = require('reflect.getprototypeof/polyfill')();
5
- var gOPD = require('gopd');
6
-
7
- var hasProto = require('../');
8
-
9
- var getter = require('../helpers/getDunder');
10
-
11
- test('hasProto', function (t) {
12
- var result = hasProto();
13
- t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')');
14
-
15
- var obj = { __proto__: null };
16
- if (result) {
17
- t.notOk('toString' in obj, 'null object lacks toString');
18
- if (gOPD && getter) {
19
- t.equal(getter(obj), null);
20
- }
21
- } else {
22
- t.ok('toString' in obj, 'without proto, null object has toString');
23
- t.equal(gPO(obj), Object.prototype);
24
- }
25
-
26
- t.end();
27
- });
28
-
@@ -1,34 +0,0 @@
1
- 'use strict';
2
-
3
- var test = require('tape');
4
- var gPO = require('reflect.getprototypeof/polyfill')();
5
- var gOPD = require('gopd');
6
-
7
- var hasProto = require('../');
8
- var hasProtoMutator = require('../mutator');
9
-
10
- var getter = require('../helpers/getDunder');
11
-
12
- test('hasProtoMutator', function (t) {
13
- var result = hasProtoMutator();
14
- t.equal(typeof result, 'boolean', 'returns a boolean (' + result + ')');
15
-
16
- var obj = { __proto__: null };
17
- if (result) {
18
- t.notOk('toString' in obj, 'null object lacks toString');
19
- t.equal(gPO(obj), null);
20
- if (gOPD && getter) {
21
- t.equal(getter(obj), null);
22
- }
23
- } else if (hasProto()) {
24
- t.notOk('toString' in obj, 'null object lacks toString');
25
- if (gOPD && getter) {
26
- t.equal(getter(obj), null);
27
- }
28
- } else {
29
- t.ok('toString' in obj, 'without proto, null object has toString');
30
- t.equal(gPO(obj), Object.prototype);
31
- }
32
-
33
- t.end();
34
- });