cdk-common 2.0.168 → 2.0.171
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +15 -3
- package/API.md +10 -0
- package/lib/index.d.ts +0 -1
- package/lib/integ-default.d.ts +0 -1
- package/lib/main.d.ts +0 -1
- package/lib/main.js +1 -1
- package/lib/managed-policies.d.ts +2 -1
- package/lib/managed-policies.js +3 -1
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/CHANGELOG.md +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/LICENSE +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/README.md +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/copy/copy.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/copy/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/copy-sync/copy-sync.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/copy-sync/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/empty/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/file.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/link.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink-paths.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink-type.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/fs/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/jsonfile.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/output-json-sync.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/output-json.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/mkdirs/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/mkdirs/make-dir.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move/move.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move-sync/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move-sync/move-sync.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/output/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/path-exists/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/remove/index.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/remove/rimraf.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/util/stat.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/util/utimes.js +0 -0
- package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/package.json +0 -0
- package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +1 -1
- package/node_modules/get-intrinsic/.eslintrc +2 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +27 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +4 -0
- package/node_modules/get-intrinsic/package.json +22 -12
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +25 -11
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +4 -4
- package/node_modules/qs/CHANGELOG.md +154 -0
- package/node_modules/qs/dist/qs.js +12 -9
- package/node_modules/qs/lib/stringify.js +5 -3
- package/node_modules/qs/package.json +16 -12
- package/node_modules/qs/test/parse.js +14 -0
- package/node_modules/qs/test/stringify.js +42 -13
- package/package.json +8 -8
- package/changelog.md +0 -2
- package/lib/index.d.ts.map +0 -1
- package/lib/integ-default.d.ts.map +0 -1
- package/lib/main.d.ts.map +0 -1
- package/lib/managed-policies.d.ts.map +0 -1
- package/node_modules/get-intrinsic/.eslintignore +0 -1
- package/releasetag.txt +0 -1
- package/version.txt +0 -1
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/copy-sync/index.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/index.js
RENAMED
|
File without changes
|
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink-paths.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink-type.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/ensure/symlink.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/jsonfile.js
RENAMED
|
File without changes
|
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/json/output-json.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/mkdirs/index.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/mkdirs/make-dir.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move-sync/index.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/move-sync/move-sync.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/output/index.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/path-exists/index.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/remove/index.js
RENAMED
|
File without changes
|
package/node_modules/{fs-extra → @aws-cdk/cfnspec/node_modules/fs-extra}/lib/remove/rimraf.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 07 Jun 2022 19:01:35 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.41",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,6 +220,6 @@
|
|
|
220
220
|
},
|
|
221
221
|
"scripts": {},
|
|
222
222
|
"dependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "9e1502e0553fb32bd0595c18b2baac4ef97c4aa2fae1006ead4e396591c10d6e",
|
|
224
224
|
"typeScriptVersion": "3.9"
|
|
225
225
|
}
|
|
@@ -158,7 +158,7 @@ declare module 'tls' {
|
|
|
158
158
|
* Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
|
|
159
159
|
* @since v0.11.4
|
|
160
160
|
*/
|
|
161
|
-
encrypted:
|
|
161
|
+
encrypted: true;
|
|
162
162
|
/**
|
|
163
163
|
* String containing the selected ALPN protocol.
|
|
164
164
|
* Before a handshake has completed, this value is always null.
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Tue, 07 Jun 2022 19:01:35 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`, `structuredClone`
|
|
14
14
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.41",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -220,6 +220,6 @@
|
|
|
220
220
|
},
|
|
221
221
|
"scripts": {},
|
|
222
222
|
"dependencies": {},
|
|
223
|
-
"typesPublisherContentHash": "
|
|
223
|
+
"typesPublisherContentHash": "9e1502e0553fb32bd0595c18b2baac4ef97c4aa2fae1006ead4e396591c10d6e",
|
|
224
224
|
"typeScriptVersion": "3.9"
|
|
225
225
|
}
|
|
@@ -158,7 +158,7 @@ declare module 'tls' {
|
|
|
158
158
|
* Always returns `true`. This may be used to distinguish TLS sockets from regular`net.Socket` instances.
|
|
159
159
|
* @since v0.11.4
|
|
160
160
|
*/
|
|
161
|
-
encrypted:
|
|
161
|
+
encrypted: true;
|
|
162
162
|
/**
|
|
163
163
|
* String containing the selected ALPN protocol.
|
|
164
164
|
* Before a handshake has completed, this value is always null.
|
|
@@ -8,26 +8,21 @@
|
|
|
8
8
|
"es2017": true,
|
|
9
9
|
"es2020": true,
|
|
10
10
|
"es2021": true,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"globals": {
|
|
14
|
-
"AggregateError": false,
|
|
11
|
+
"es2022": true,
|
|
15
12
|
},
|
|
16
13
|
|
|
17
14
|
"rules": {
|
|
18
15
|
"array-bracket-newline": 0,
|
|
19
|
-
"array-element-newline": 0,
|
|
20
16
|
"complexity": 0,
|
|
21
17
|
"eqeqeq": [2, "allow-null"],
|
|
22
18
|
"func-name-matching": 0,
|
|
23
19
|
"id-length": 0,
|
|
24
|
-
"max-lines-per-function": [2,
|
|
20
|
+
"max-lines-per-function": [2, 90],
|
|
25
21
|
"max-params": [2, 4],
|
|
26
22
|
"max-statements": 0,
|
|
27
23
|
"max-statements-per-line": [2, { "max": 2 }],
|
|
28
24
|
"multiline-comment-style": 0,
|
|
29
25
|
"no-magic-numbers": 0,
|
|
30
|
-
"operator-linebreak": [2, "before"],
|
|
31
26
|
"sort-keys": 0,
|
|
32
27
|
},
|
|
33
28
|
|
|
@@ -35,7 +30,6 @@
|
|
|
35
30
|
{
|
|
36
31
|
"files": "test/**",
|
|
37
32
|
"rules": {
|
|
38
|
-
"max-lines-per-function": 0,
|
|
39
33
|
"new-cap": 0,
|
|
40
34
|
},
|
|
41
35
|
},
|
|
@@ -5,6 +5,33 @@ 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.1.2](https://github.com/ljharb/get-intrinsic/compare/v1.1.1...v1.1.2) - 2022-06-08
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- [Fix] properly validate against extra % signs [`#16`](https://github.com/ljharb/get-intrinsic/issues/16)
|
|
13
|
+
|
|
14
|
+
### Commits
|
|
15
|
+
|
|
16
|
+
- [actions] reuse common workflows [`0972547`](https://github.com/ljharb/get-intrinsic/commit/0972547efd0abc863fe4c445a6ca7eb4f8c6901d)
|
|
17
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`5ba0b51`](https://github.com/ljharb/get-intrinsic/commit/5ba0b51d8d8d4f1c31d426d74abc0770fd106bad)
|
|
18
|
+
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`c364492`](https://github.com/ljharb/get-intrinsic/commit/c364492af4af51333e6f81c0bf21fd3d602c3661)
|
|
19
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es-abstract`, `object-inspect`, `tape` [`dc04dad`](https://github.com/ljharb/get-intrinsic/commit/dc04dad86f6e5608775a2640cb0db5927ae29ed9)
|
|
20
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es-abstract`, `object-inspect`, `safe-publish-latest`, `tape` [`1c14059`](https://github.com/ljharb/get-intrinsic/commit/1c1405984e86dd2dc9366c15d8a0294a96a146a5)
|
|
21
|
+
- [Tests] use `mock-property` [`b396ef0`](https://github.com/ljharb/get-intrinsic/commit/b396ef05bb73b1d699811abd64b0d9b97997fdda)
|
|
22
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`c2c758d`](https://github.com/ljharb/get-intrinsic/commit/c2c758d3b90af4fef0a76910d8d3c292ec8d1d3e)
|
|
23
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`29e3c09`](https://github.com/ljharb/get-intrinsic/commit/29e3c091c2bf3e17099969847e8729d0e46896de)
|
|
24
|
+
- [actions] update codecov uploader [`8cbc141`](https://github.com/ljharb/get-intrinsic/commit/8cbc1418940d7a8941f3a7985cbc4ac095c5e13d)
|
|
25
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `es-abstract`, `es-value-fixtures`, `object-inspect`, `tape` [`10b6f5c`](https://github.com/ljharb/get-intrinsic/commit/10b6f5c02593fb3680c581d696ac124e30652932)
|
|
26
|
+
- [readme] add github actions/codecov badges [`4e25400`](https://github.com/ljharb/get-intrinsic/commit/4e25400d9f51ae9eb059cbe22d9144e70ea214e8)
|
|
27
|
+
- [Tests] use `for-each` instead of `foreach` [`c05b957`](https://github.com/ljharb/get-intrinsic/commit/c05b957ad9a7bc7721af7cc9e9be1edbfe057496)
|
|
28
|
+
- [Dev Deps] update `es-abstract` [`29b05ae`](https://github.com/ljharb/get-intrinsic/commit/29b05aec3e7330e9ad0b8e0f685a9112c20cdd97)
|
|
29
|
+
- [meta] use `prepublishOnly` script for npm 7+ [`95c285d`](https://github.com/ljharb/get-intrinsic/commit/95c285da810516057d3bbfa871176031af38f05d)
|
|
30
|
+
- [Deps] update `has-symbols` [`593cb4f`](https://github.com/ljharb/get-intrinsic/commit/593cb4fb38e7922e40e42c183f45274b636424cd)
|
|
31
|
+
- [readme] fix repo URLs [`1c8305b`](https://github.com/ljharb/get-intrinsic/commit/1c8305b5365827c9b6fc785434aac0e1328ff2f5)
|
|
32
|
+
- [Deps] update `has-symbols` [`c7138b6`](https://github.com/ljharb/get-intrinsic/commit/c7138b6c6d73132d859471fb8c13304e1e7c8b20)
|
|
33
|
+
- [Dev Deps] remove unused `has-bigints` [`bd63aff`](https://github.com/ljharb/get-intrinsic/commit/bd63aff6ad8f3a986c557fcda2914187bdaab359)
|
|
34
|
+
|
|
8
35
|
## [v1.1.1](https://github.com/ljharb/get-intrinsic/compare/v1.1.0...v1.1.1) - 2021-02-03
|
|
9
36
|
|
|
10
37
|
### Fixed
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
2
|
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
3
5
|
[![dependency status][deps-svg]][deps-url]
|
|
4
6
|
[![dev dependency status][dev-deps-svg]][dev-deps-url]
|
|
5
7
|
[![License][license-image]][license-url]
|
|
@@ -53,7 +55,7 @@ Simply clone the repo, `npm install`, and run `npm test`
|
|
|
53
55
|
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
|
|
54
56
|
|
|
55
57
|
[package-url]: https://npmjs.org/package/get-intrinsic
|
|
56
|
-
[npm-version-svg]:
|
|
58
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg
|
|
57
59
|
[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg
|
|
58
60
|
[deps-url]: https://david-dm.org/ljharb/get-intrinsic
|
|
59
61
|
[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg
|
|
@@ -63,3 +65,7 @@ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/se
|
|
|
63
65
|
[license-url]: LICENSE
|
|
64
66
|
[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg
|
|
65
67
|
[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic
|
|
68
|
+
[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg
|
|
69
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/
|
|
70
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic
|
|
71
|
+
[actions-url]: https://github.com/ljharb/get-intrinsic/actions
|
|
@@ -202,6 +202,7 @@ var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
|
202
202
|
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
203
203
|
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
204
204
|
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
205
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
205
206
|
|
|
206
207
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
207
208
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -257,6 +258,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|
|
257
258
|
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
258
259
|
}
|
|
259
260
|
|
|
261
|
+
if ($exec(/^%?[^%]*%?$/g, name) === null) {
|
|
262
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
263
|
+
}
|
|
260
264
|
var parts = stringToPath(name);
|
|
261
265
|
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
262
266
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "get-intrinsic",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Get and robustly cache all JS language-level intrinsics at first require time",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"exports": {
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"./package.json": "./package.json"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
17
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
18
|
+
"prepublishOnly": "safe-publish-latest",
|
|
16
19
|
"prelint": "evalmd README.md",
|
|
17
20
|
"lint": "eslint --ext=.js,.mjs .",
|
|
18
21
|
"pretest": "npm run lint",
|
|
@@ -45,22 +48,24 @@
|
|
|
45
48
|
},
|
|
46
49
|
"homepage": "https://github.com/ljharb/get-intrinsic#readme",
|
|
47
50
|
"devDependencies": {
|
|
48
|
-
"@ljharb/eslint-config": "^
|
|
49
|
-
"aud": "^
|
|
50
|
-
"auto-changelog": "^2.
|
|
51
|
+
"@ljharb/eslint-config": "^21.0.0",
|
|
52
|
+
"aud": "^2.0.0",
|
|
53
|
+
"auto-changelog": "^2.4.0",
|
|
51
54
|
"call-bind": "^1.0.2",
|
|
52
|
-
"es-abstract": "^1.
|
|
53
|
-
"es-value-fixtures": "^1.
|
|
54
|
-
"eslint": "
|
|
55
|
+
"es-abstract": "^1.20.1",
|
|
56
|
+
"es-value-fixtures": "^1.4.1",
|
|
57
|
+
"eslint": "=8.8.0",
|
|
55
58
|
"evalmd": "^0.0.19",
|
|
56
|
-
"
|
|
57
|
-
"has-bigints": "^1.0.1",
|
|
59
|
+
"for-each": "^0.3.3",
|
|
58
60
|
"make-async-function": "^1.0.0",
|
|
59
61
|
"make-async-generator-function": "^1.0.0",
|
|
60
62
|
"make-generator-function": "^2.0.0",
|
|
63
|
+
"mock-property": "^1.0.0",
|
|
64
|
+
"npmignore": "^0.3.0",
|
|
61
65
|
"nyc": "^10.3.2",
|
|
62
|
-
"object-inspect": "^1.
|
|
63
|
-
"
|
|
66
|
+
"object-inspect": "^1.12.2",
|
|
67
|
+
"safe-publish-latest": "^2.0.0",
|
|
68
|
+
"tape": "^5.5.3"
|
|
64
69
|
},
|
|
65
70
|
"auto-changelog": {
|
|
66
71
|
"output": "CHANGELOG.md",
|
|
@@ -73,6 +78,11 @@
|
|
|
73
78
|
"dependencies": {
|
|
74
79
|
"function-bind": "^1.1.1",
|
|
75
80
|
"has": "^1.0.3",
|
|
76
|
-
"has-symbols": "^1.0.
|
|
81
|
+
"has-symbols": "^1.0.3"
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"ignore": [
|
|
85
|
+
".github/workflows"
|
|
86
|
+
]
|
|
77
87
|
}
|
|
78
88
|
}
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
var GetIntrinsic = require('../');
|
|
4
4
|
|
|
5
5
|
var test = require('tape');
|
|
6
|
-
var forEach = require('
|
|
6
|
+
var forEach = require('for-each');
|
|
7
7
|
var debug = require('object-inspect');
|
|
8
8
|
var generatorFns = require('make-generator-function')();
|
|
9
9
|
var asyncFns = require('make-async-function').list();
|
|
10
10
|
var asyncGenFns = require('make-async-generator-function')();
|
|
11
|
+
var mockProperty = require('mock-property');
|
|
11
12
|
|
|
12
13
|
var callBound = require('call-bind/callBound');
|
|
13
14
|
var v = require('es-value-fixtures');
|
|
14
15
|
var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
|
|
15
|
-
var
|
|
16
|
+
var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow');
|
|
16
17
|
|
|
17
18
|
var $isProto = callBound('%Object.prototype.isPrototypeOf%');
|
|
18
19
|
|
|
@@ -66,6 +67,18 @@ test('throws', function (t) {
|
|
|
66
67
|
"Throws when middle part doesn't exist (%Proxy.prototype.undefined%)"
|
|
67
68
|
);
|
|
68
69
|
|
|
70
|
+
t['throws'](
|
|
71
|
+
function () { GetIntrinsic('%Array.prototype%garbage%'); },
|
|
72
|
+
SyntaxError,
|
|
73
|
+
'Throws with extra percent signs'
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
t['throws'](
|
|
77
|
+
function () { GetIntrinsic('%Array.prototype%push%'); },
|
|
78
|
+
SyntaxError,
|
|
79
|
+
'Throws with extra percent signs, even on an existing intrinsic'
|
|
80
|
+
);
|
|
81
|
+
|
|
69
82
|
forEach(v.nonStrings, function (nonString) {
|
|
70
83
|
t['throws'](
|
|
71
84
|
function () { GetIntrinsic(nonString); },
|
|
@@ -123,15 +136,15 @@ test('dotted paths', function (t) {
|
|
|
123
136
|
'%ObjProto_toString%',
|
|
124
137
|
'ObjProto_toString'
|
|
125
138
|
], function (name) {
|
|
126
|
-
|
|
127
|
-
|
|
139
|
+
DefinePropertyOrThrow(Object.prototype, 'toString', {
|
|
140
|
+
'[[Value]]': function toString() {
|
|
128
141
|
return original.apply(this, arguments);
|
|
129
142
|
}
|
|
130
143
|
});
|
|
131
144
|
st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString');
|
|
132
145
|
});
|
|
133
146
|
|
|
134
|
-
|
|
147
|
+
DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original });
|
|
135
148
|
st.end();
|
|
136
149
|
});
|
|
137
150
|
|
|
@@ -144,15 +157,16 @@ test('dotted paths', function (t) {
|
|
|
144
157
|
'%ObjectPrototype.propertyIsEnumerable%',
|
|
145
158
|
'ObjectPrototype.propertyIsEnumerable'
|
|
146
159
|
], function (name) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
160
|
+
var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', {
|
|
161
|
+
value: function propertyIsEnumerable() {
|
|
162
|
+
return original.apply(this, arguments);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
151
165
|
st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable');
|
|
166
|
+
|
|
167
|
+
restore();
|
|
152
168
|
});
|
|
153
169
|
|
|
154
|
-
// eslint-disable-next-line no-extend-native
|
|
155
|
-
Object.prototype.propertyIsEnumerable = original;
|
|
156
170
|
st.end();
|
|
157
171
|
});
|
|
158
172
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"indent": [2, 4],
|
|
16
16
|
"max-lines-per-function": [2, { "max": 150 }],
|
|
17
17
|
"max-params": [2, 15],
|
|
18
|
-
"max-statements": [2,
|
|
18
|
+
"max-statements": [2, 53],
|
|
19
19
|
"multiline-comment-style": 0,
|
|
20
20
|
"no-continue": 1,
|
|
21
21
|
"no-magic-numbers": 0,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"no-buffer-constructor": 0,
|
|
33
33
|
"no-extend-native": 0,
|
|
34
34
|
"no-throw-literal": 0,
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
]
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
38
|
}
|