mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 12:10:20 +08:00
Merge remote-tracking branch 'origin/releases/v2' into update-v1.1.23-6a38b7d4
This commit is contained in:
287
node_modules/.package-lock.json
generated
vendored
287
node_modules/.package-lock.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "codeql",
|
||||
"version": "2.1.22",
|
||||
"version": "2.1.23",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
@@ -1261,14 +1261,6 @@
|
||||
"node": ">=8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/arrify": {
|
||||
"version": "2.0.1",
|
||||
"integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/astral-regex": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
|
||||
@@ -1284,45 +1276,45 @@
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
|
||||
},
|
||||
"node_modules/ava": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ava/-/ava-4.0.1.tgz",
|
||||
"integrity": "sha512-+12A/JDWyShBCZAKISEEPyM2dwkUrrAfPILqXi4LI4Aa58d92PzjY829hmuoSeACPNqrn2Wlbnja8c/n7bKV6Q==",
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/ava/-/ava-4.3.3.tgz",
|
||||
"integrity": "sha512-9Egq/d9R74ExrWohHeqUlexjDbgZJX5jA1Wq4KCTqc3wIfpGEK79zVy4rBtofJ9YKIxs4PzhJ8BgbW5PlAYe6w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.7.0",
|
||||
"acorn": "^8.7.1",
|
||||
"acorn-walk": "^8.2.0",
|
||||
"ansi-styles": "^6.1.0",
|
||||
"arrgv": "^1.0.2",
|
||||
"arrify": "^3.0.0",
|
||||
"callsites": "^4.0.0",
|
||||
"cbor": "^8.1.0",
|
||||
"chalk": "^5.0.0",
|
||||
"chokidar": "^3.5.2",
|
||||
"chalk": "^5.0.1",
|
||||
"chokidar": "^3.5.3",
|
||||
"chunkd": "^2.0.1",
|
||||
"ci-info": "^3.3.0",
|
||||
"ci-info": "^3.3.1",
|
||||
"ci-parallel-vars": "^1.0.1",
|
||||
"clean-yaml-object": "^0.1.0",
|
||||
"cli-truncate": "^3.1.0",
|
||||
"code-excerpt": "^3.0.0",
|
||||
"code-excerpt": "^4.0.0",
|
||||
"common-path-prefix": "^3.0.0",
|
||||
"concordance": "^5.0.4",
|
||||
"currently-unhandled": "^0.4.1",
|
||||
"debug": "^4.3.3",
|
||||
"del": "^6.0.0",
|
||||
"emittery": "^0.10.0",
|
||||
"figures": "^4.0.0",
|
||||
"globby": "^12.0.2",
|
||||
"ignore-by-default": "^2.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"del": "^6.1.1",
|
||||
"emittery": "^0.11.0",
|
||||
"figures": "^4.0.1",
|
||||
"globby": "^13.1.1",
|
||||
"ignore-by-default": "^2.1.0",
|
||||
"indent-string": "^5.0.0",
|
||||
"is-error": "^2.2.2",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"is-promise": "^4.0.0",
|
||||
"matcher": "^5.0.0",
|
||||
"mem": "^9.0.1",
|
||||
"mem": "^9.0.2",
|
||||
"ms": "^2.1.3",
|
||||
"p-event": "^5.0.1",
|
||||
"p-map": "^5.3.0",
|
||||
"picomatch": "^2.3.0",
|
||||
"p-map": "^5.4.0",
|
||||
"picomatch": "^2.3.1",
|
||||
"pkg-conf": "^4.0.0",
|
||||
"plur": "^5.1.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
@@ -1330,16 +1322,16 @@
|
||||
"slash": "^3.0.0",
|
||||
"stack-utils": "^2.0.5",
|
||||
"strip-ansi": "^7.0.1",
|
||||
"supertap": "^2.0.0",
|
||||
"supertap": "^3.0.1",
|
||||
"temp-dir": "^2.0.0",
|
||||
"write-file-atomic": "^3.0.3",
|
||||
"yargs": "^17.3.1"
|
||||
"write-file-atomic": "^4.0.1",
|
||||
"yargs": "^17.5.1"
|
||||
},
|
||||
"bin": {
|
||||
"ava": "entrypoints/cli.mjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=17"
|
||||
"node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ava/typescript": "*"
|
||||
@@ -1351,9 +1343,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/acorn": {
|
||||
"version": "8.7.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
|
||||
"integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
|
||||
"version": "8.8.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz",
|
||||
"integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
@@ -1363,9 +1355,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/aggregate-error": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.0.tgz",
|
||||
"integrity": "sha512-8DGp7zUt1E9k0NE2q4jlXHk+V3ORErmwolEdRz9iV+LKJ40WhMHh92cxAvhqV2I+zEn/gotIoqoMs0NjF3xofg==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-4.0.1.tgz",
|
||||
"integrity": "sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"clean-stack": "^4.0.0",
|
||||
@@ -1402,18 +1394,6 @@
|
||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/array-union": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
|
||||
"integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/arrify": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz",
|
||||
@@ -1439,9 +1419,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/chalk": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.0.tgz",
|
||||
"integrity": "sha512-/duVOqst+luxCQRKEo4bNxinsOQtMP80ZYm7mMqzuh5PociNL0PvmHFvREJ9ueYL2TxlHjBcmLCdmocx9Vg+IQ==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-5.0.1.tgz",
|
||||
"integrity": "sha512-Fo07WOYGqMfCWHOzSXOt2CxDbC6skS/jO9ynEcmpANMoPrD+W1r1K6Vx7iNm+AQmETU1Xr2t+n8nzkV9t6xh3w==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.17.0 || ^14.13 || >=16.0.0"
|
||||
@@ -1451,9 +1431,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/clean-stack": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.1.0.tgz",
|
||||
"integrity": "sha512-dxXQYI7mfQVcaF12s6sjNFoZ6ZPDQuBBLp3QJ5156k9EvUFClUoZ11fo8HnLQO241DDVntHEug8MOuFO5PSfRg==",
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-4.2.0.tgz",
|
||||
"integrity": "sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "5.0.0"
|
||||
@@ -1478,15 +1458,14 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ava/node_modules/globby": {
|
||||
"version": "12.2.0",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-12.2.0.tgz",
|
||||
"integrity": "sha512-wiSuFQLZ+urS9x2gGPl1H5drc5twabmm4m2gTR27XDFyjUHJUNsS8o/2aKyIF6IoBaR630atdher0XJ5g6OMmA==",
|
||||
"version": "13.1.2",
|
||||
"resolved": "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz",
|
||||
"integrity": "sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"array-union": "^3.0.1",
|
||||
"dir-glob": "^3.0.1",
|
||||
"fast-glob": "^3.2.7",
|
||||
"ignore": "^5.1.9",
|
||||
"fast-glob": "^3.2.11",
|
||||
"ignore": "^5.2.0",
|
||||
"merge2": "^1.4.1",
|
||||
"slash": "^4.0.0"
|
||||
},
|
||||
@@ -1528,9 +1507,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ava/node_modules/p-map": {
|
||||
"version": "5.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-5.3.0.tgz",
|
||||
"integrity": "sha512-SRbIQFoLYNezHkqZslqeg963HYUtqOrfMCxjNrFOpJ19WTYuq26rQoOXeX8QQiMLUlLqdYV/7PuDsdYJ7hLE1w==",
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/p-map/-/p-map-5.5.0.tgz",
|
||||
"integrity": "sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"aggregate-error": "^4.0.0"
|
||||
@@ -1654,10 +1633,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/chokidar": {
|
||||
"version": "3.5.2",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
|
||||
"integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
|
||||
"version": "3.5.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
|
||||
"integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"anymatch": "~3.1.2",
|
||||
"braces": "~3.0.2",
|
||||
@@ -1680,9 +1665,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ci-info": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz",
|
||||
"integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==",
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.2.tgz",
|
||||
"integrity": "sha512-xmDt/QIAdeZ9+nfdPsaBCpMvHNLFiLdjj59qjqn+6iPe6YmHGQ35sBnQ8uslRBXFmXkiZQOJRjvQeoGppoTjjg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ci-parallel-vars": {
|
||||
@@ -1784,15 +1769,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/code-excerpt": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz",
|
||||
"integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-4.0.0.tgz",
|
||||
"integrity": "sha512-xxodCmBen3iy2i0WtAK8FlFNrRzjUqjRsMfho58xT/wvZU1YTM3fCnRjcy1gJPMepaRlgm/0e6w8SpWHpn3/cA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"convert-to-spaces": "^1.0.1"
|
||||
"convert-to-spaces": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/color-convert": {
|
||||
@@ -1858,12 +1843,12 @@
|
||||
"integrity": "sha512-VZzbIORbP+PPcN/gg3DXClTLPLg5Slwd5fL2MIc+o1qZ4BXBvWyc6QxPk6T/Mkr6IVjRpoAGf32XxP3ZWMVRcQ=="
|
||||
},
|
||||
"node_modules/convert-to-spaces": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz",
|
||||
"integrity": "sha1-fj5Iu+bZl7FBfdyihoIEtNPYVxU=",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-2.0.1.tgz",
|
||||
"integrity": "sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
@@ -1911,9 +1896,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
"integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
@@ -1952,9 +1937,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/del": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
|
||||
"integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/del/-/del-6.1.1.tgz",
|
||||
"integrity": "sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg==",
|
||||
"dependencies": {
|
||||
"globby": "^11.0.1",
|
||||
"graceful-fs": "^4.2.4",
|
||||
@@ -2022,9 +2007,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/emittery": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/emittery/-/emittery-0.10.0.tgz",
|
||||
"integrity": "sha512-AGvFfs+d0JKCJQ4o01ASQLGPmSCxgfU9RFXvzPvZdjKK8oscynksuJhWrSTSw7j7Ep/sZct5b5ZhYCi8S/t0HQ==",
|
||||
"version": "0.11.0",
|
||||
"resolved": "https://registry.npmjs.org/emittery/-/emittery-0.11.0.tgz",
|
||||
"integrity": "sha512-S/7tzL6v5i+4iJd627Nhv9cLFIo5weAIlGccqJFpnBoDB8U1TF2k5tez4J/QNuxyyhWuFqHg1L84Kd3m7iXg6g==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -2992,13 +2977,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/figures": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-4.0.0.tgz",
|
||||
"integrity": "sha512-VnYcWq6H6F0qDN0QnorznBr0abEovifzUokmnezpKZBUbDmbLAt7LMryOp1TKFVxLxyNYkxEkCEADZR58U9oSw==",
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/figures/-/figures-4.0.1.tgz",
|
||||
"integrity": "sha512-rElJwkA/xS04Vfg+CaZodpso7VqBknOYbzi6I76hI4X80RUjkSxO2oAyPmGbuXUppywjqndOrQDl817hDnI++w==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^5.0.0",
|
||||
"is-unicode-supported": "^1.0.0"
|
||||
"is-unicode-supported": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -3407,9 +3392,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ignore-by-default": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.0.0.tgz",
|
||||
"integrity": "sha512-+mQSgMRiFD3L3AOxLYOCxjIq4OnAmo5CIuC+lj5ehCJcPtV++QacEV7FdpzvYxH6DaOySWzQU6RR0lPLy37ckA==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-2.1.0.tgz",
|
||||
"integrity": "sha512-yiWd4GVmJp0Q6ghmM2B/V3oZGRmjrKLXvHR3TE1nfoXsmoggllfZUQe74EN0fJdPFZu2NIvNdrMMLm3OsV7Ohw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=10 <11 || >=12 <13 || >=14"
|
||||
@@ -3711,16 +3696,10 @@
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/is-typedarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
|
||||
"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/is-unicode-supported": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.1.0.tgz",
|
||||
"integrity": "sha512-lDcxivp8TJpLG75/DpatAqNzOpDPSpED8XNtrpBHTdQ2InQ1PbW78jhwSxyxhhu+xbVSast2X38bwj8atwoUQA==",
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.2.0.tgz",
|
||||
"integrity": "sha512-wH+U77omcRzevfIG8dDhTS0V9zZyweakfD01FULl97+0EHiJTTZtJqxPSkIIo/SDPv/i07k/C9jAPY+jwLLeUQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
@@ -4461,9 +4440,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/picomatch": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
|
||||
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==",
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
|
||||
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
|
||||
"engines": {
|
||||
"node": ">=8.6"
|
||||
},
|
||||
@@ -4866,7 +4845,7 @@
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
||||
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
@@ -5035,9 +5014,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/signal-exit": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
|
||||
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/sinon": {
|
||||
@@ -5281,19 +5260,30 @@
|
||||
}
|
||||
},
|
||||
"node_modules/supertap": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/supertap/-/supertap-2.0.0.tgz",
|
||||
"integrity": "sha512-jRzcXlCeDYvKoZGA5oRhYyR3jUIYu0enkSxtmAgHRlD7HwrovTpH4bDSi0py9FtuA8si9cW/fKommJHuaoDHJA==",
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/supertap/-/supertap-3.0.1.tgz",
|
||||
"integrity": "sha512-u1ZpIBCawJnO+0QePsEiOknOfCRq0yERxiAchT0i4li0WHNUJbf0evXXSXOcCAR4M8iMDoajXYmstm/qO81Isw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"arrify": "^2.0.1",
|
||||
"indent-string": "^4.0.0",
|
||||
"js-yaml": "^3.14.0",
|
||||
"indent-string": "^5.0.0",
|
||||
"js-yaml": "^3.14.1",
|
||||
"serialize-error": "^7.0.1",
|
||||
"strip-ansi": "^6.0.0"
|
||||
"strip-ansi": "^7.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/supertap/node_modules/ansi-regex": {
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
|
||||
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/supertap/node_modules/argparse": {
|
||||
@@ -5305,6 +5295,18 @@
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/supertap/node_modules/indent-string": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz",
|
||||
"integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/supertap/node_modules/js-yaml": {
|
||||
"version": "3.14.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
|
||||
@@ -5318,6 +5320,21 @@
|
||||
"js-yaml": "bin/js-yaml.js"
|
||||
}
|
||||
},
|
||||
"node_modules/supertap/node_modules/strip-ansi": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
|
||||
"integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ansi-regex": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "5.5.0",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
@@ -5570,15 +5587,6 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/typedarray-to-buffer": {
|
||||
"version": "3.1.5",
|
||||
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
|
||||
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-typedarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.4.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.2.tgz",
|
||||
@@ -5773,15 +5781,16 @@
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"node_modules/write-file-atomic": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
|
||||
"integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-4.0.2.tgz",
|
||||
"integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"imurmurhash": "^0.1.4",
|
||||
"is-typedarray": "^1.0.0",
|
||||
"signal-exit": "^3.0.2",
|
||||
"typedarray-to-buffer": "^3.1.5"
|
||||
"signal-exit": "^3.0.7"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.13.0 || ^14.15.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/xml2js": {
|
||||
@@ -5819,9 +5828,9 @@
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
|
||||
},
|
||||
"node_modules/yargs": {
|
||||
"version": "17.3.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
|
||||
"integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
|
||||
"version": "17.5.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-17.5.1.tgz",
|
||||
"integrity": "sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cliui": "^7.0.2",
|
||||
@@ -5837,9 +5846,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/yargs-parser": {
|
||||
"version": "21.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz",
|
||||
"integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==",
|
||||
"version": "21.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
|
||||
"integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
||||
38
node_modules/arrify/index.d.ts
generated
vendored
38
node_modules/arrify/index.d.ts
generated
vendored
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
Convert a value to an array.
|
||||
|
||||
_Supplying `null` or `undefined` results in an empty array._
|
||||
|
||||
@example
|
||||
```
|
||||
import arrify = require('arrify');
|
||||
|
||||
arrify('🦄');
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(['🦄']);
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(new Set(['🦄']));
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(null);
|
||||
//=> []
|
||||
|
||||
arrify(undefined);
|
||||
//=> []
|
||||
```
|
||||
*/
|
||||
declare function arrify<ValueType>(
|
||||
value: ValueType
|
||||
): ValueType extends (null | undefined)
|
||||
? []
|
||||
: ValueType extends string
|
||||
? [string]
|
||||
: ValueType extends ReadonlyArray<unknown> // TODO: Use 'readonly unknown[]' in the next major version
|
||||
? ValueType
|
||||
: ValueType extends Iterable<infer T>
|
||||
? T[]
|
||||
: [ValueType];
|
||||
|
||||
export = arrify;
|
||||
23
node_modules/arrify/index.js
generated
vendored
23
node_modules/arrify/index.js
generated
vendored
@@ -1,23 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const arrify = value => {
|
||||
if (value === null || value === undefined) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (typeof value === 'string') {
|
||||
return [value];
|
||||
}
|
||||
|
||||
if (typeof value[Symbol.iterator] === 'function') {
|
||||
return [...value];
|
||||
}
|
||||
|
||||
return [value];
|
||||
};
|
||||
|
||||
module.exports = arrify;
|
||||
35
node_modules/arrify/package.json
generated
vendored
35
node_modules/arrify/package.json
generated
vendored
@@ -1,35 +0,0 @@
|
||||
{
|
||||
"name": "arrify",
|
||||
"version": "2.0.1",
|
||||
"description": "Convert a value to an array",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/arrify",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "sindresorhus.com"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"array",
|
||||
"arrify",
|
||||
"arrayify",
|
||||
"convert",
|
||||
"value",
|
||||
"ensure"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^1.4.1",
|
||||
"tsd": "^0.7.2",
|
||||
"xo": "^0.24.0"
|
||||
}
|
||||
}
|
||||
39
node_modules/arrify/readme.md
generated
vendored
39
node_modules/arrify/readme.md
generated
vendored
@@ -1,39 +0,0 @@
|
||||
# arrify [](https://travis-ci.org/sindresorhus/arrify)
|
||||
|
||||
> Convert a value to an array
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install arrify
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const arrify = require('arrify');
|
||||
|
||||
arrify('🦄');
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(['🦄']);
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(new Set(['🦄']));
|
||||
//=> ['🦄']
|
||||
|
||||
arrify(null);
|
||||
//=> []
|
||||
|
||||
arrify(undefined);
|
||||
//=> []
|
||||
```
|
||||
|
||||
*Supplying `null` or `undefined` results in an empty array.*
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Sindre Sorhus](https://sindresorhus.com)
|
||||
2
node_modules/ava/entrypoints/eslint-plugin-helper.cjs
generated
vendored
2
node_modules/ava/entrypoints/eslint-plugin-helper.cjs
generated
vendored
@@ -90,7 +90,7 @@ function load(projectDir, overrides) {
|
||||
|
||||
const helper = Object.freeze({
|
||||
classifyFile: classifyForESLint,
|
||||
classifyImport: importPath => {
|
||||
classifyImport(importPath) {
|
||||
if (hasExtension(globs.extensions, importPath)) {
|
||||
// The importPath has one of the test file extensions: we can classify
|
||||
// it directly.
|
||||
|
||||
2
node_modules/ava/entrypoints/index.d.cts
generated
vendored
Normal file
2
node_modules/ava/entrypoints/index.d.cts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {default} from '../index.js';
|
||||
export * from '../index.js';
|
||||
1
node_modules/ava/entrypoints/plugin.d.cts
generated
vendored
Normal file
1
node_modules/ava/entrypoints/plugin.d.cts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export * from '../plugin.js'
|
||||
10
node_modules/ava/index.d.ts
generated
vendored
10
node_modules/ava/index.d.ts
generated
vendored
@@ -1,9 +1,9 @@
|
||||
import type {TestFn} from './types/test-fn';
|
||||
import type {TestFn} from './types/test-fn.js';
|
||||
|
||||
export * from './types/assertions';
|
||||
export * from './types/try-fn';
|
||||
export * from './types/test-fn';
|
||||
export * from './types/subscribable';
|
||||
export * from './types/assertions.js';
|
||||
export * from './types/try-fn.js';
|
||||
export * from './types/test-fn.js';
|
||||
export * from './types/subscribable.js';
|
||||
|
||||
/** Call to declare a test, or chain to declare hooks or test modifiers */
|
||||
declare const test: TestFn;
|
||||
|
||||
12
node_modules/ava/lib/api.js
generated
vendored
12
node_modules/ava/lib/api.js
generated
vendored
@@ -177,13 +177,19 @@ export default class Api extends Emittery {
|
||||
const fileCount = selectedFiles.length;
|
||||
|
||||
// The files must be in the same order across all runs, so sort them.
|
||||
selectedFiles = selectedFiles.sort((a, b) => a.localeCompare(b, [], {numeric: true}));
|
||||
const defaultComparator = (a, b) => a.localeCompare(b, [], {numeric: true});
|
||||
selectedFiles = selectedFiles.sort(this.options.sortTestFiles || defaultComparator);
|
||||
selectedFiles = chunkd(selectedFiles, currentIndex, totalRuns);
|
||||
|
||||
const currentFileCount = selectedFiles.length;
|
||||
|
||||
runStatus = new RunStatus(fileCount, {currentFileCount, currentIndex, totalRuns}, selectionInsights);
|
||||
} else {
|
||||
// If a custom sorter was configured, use it.
|
||||
if (this.options.sortTestFiles) {
|
||||
selectedFiles = selectedFiles.sort(this.options.sortTestFiles);
|
||||
}
|
||||
|
||||
runStatus = new RunStatus(selectedFiles.length, null, selectionInsights);
|
||||
}
|
||||
|
||||
@@ -261,8 +267,8 @@ export default class Api extends Emittery {
|
||||
}
|
||||
|
||||
const lineNumbers = getApplicableLineNumbers(globs.normalizeFileForMatching(apiOptions.projectDir, file), filter);
|
||||
// Removing `providers` field because they cannot be transfered to the worker threads.
|
||||
const {providers, ...forkOptions} = apiOptions;
|
||||
// Removing `providers` and `sortTestFiles` fields because they cannot be transferred to the worker threads.
|
||||
const {providers, sortTestFiles, ...forkOptions} = apiOptions;
|
||||
const options = {
|
||||
...forkOptions,
|
||||
providerStates,
|
||||
|
||||
22
node_modules/ava/lib/assert.js
generated
vendored
22
node_modules/ava/lib/assert.js
generated
vendored
@@ -106,10 +106,15 @@ function validateExpectations(assertion, expectations, numberArgs) { // eslint-d
|
||||
});
|
||||
}
|
||||
|
||||
if (hasOwnProperty(expectations, 'message') && typeof expectations.message !== 'string' && !(expectations.message instanceof RegExp)) {
|
||||
if (
|
||||
hasOwnProperty(expectations, 'message')
|
||||
&& typeof expectations.message !== 'string'
|
||||
&& !(expectations.message instanceof RegExp)
|
||||
&& !(typeof expectations.message === 'function')
|
||||
) {
|
||||
throw new AssertionError({
|
||||
assertion,
|
||||
message: `The \`message\` property of the second argument to \`t.${assertion}()\` must be a string or regular expression`,
|
||||
message: `The \`message\` property of the second argument to \`t.${assertion}()\` must be a string, regular expression or a function`,
|
||||
values: [formatWithLabel('Called with:', expectations)],
|
||||
});
|
||||
}
|
||||
@@ -230,6 +235,19 @@ function assertExpectations({assertion, actual, expectations, message, prefix, s
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof expectations.message === 'function' && expectations.message(actual.message) === false) {
|
||||
throw new AssertionError({
|
||||
assertion,
|
||||
message,
|
||||
savedError,
|
||||
actualStack,
|
||||
values: [
|
||||
formatWithLabel(`${prefix} unexpected exception:`, actual),
|
||||
formatWithLabel('Expected message to return true:', expectations.message),
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof expectations.code !== 'undefined' && actual.code !== expectations.code) {
|
||||
throw new AssertionError({
|
||||
assertion,
|
||||
|
||||
30
node_modules/ava/lib/cli.js
generated
vendored
30
node_modules/ava/lib/cli.js
generated
vendored
@@ -21,6 +21,7 @@ import {splitPatternAndLineNumbers} from './line-numbers.js';
|
||||
import {loadConfig} from './load-config.js';
|
||||
import normalizeModuleTypes from './module-types.js';
|
||||
import normalizeNodeArguments from './node-arguments.js';
|
||||
import pkg from './pkg.cjs';
|
||||
import providerManager from './provider-manager.js';
|
||||
import DefaultReporter from './reporters/default.js';
|
||||
import TapReporter from './reporters/tap.js';
|
||||
@@ -102,8 +103,15 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
let conf;
|
||||
let confError;
|
||||
try {
|
||||
const {argv: {config: configFile}} = yargs(hideBin(process.argv)).help(false);
|
||||
conf = await loadConfig({configFile});
|
||||
const {argv: {config: configFile}} = yargs(hideBin(process.argv)).help(false).version(false);
|
||||
const loaded = await loadConfig({configFile});
|
||||
if (loaded.unsupportedFiles.length > 0) {
|
||||
console.log(chalk.magenta(
|
||||
` ${figures.warning} AVA does not support JSON config, ignoring:\n\n ${loaded.unsupportedFiles.join('\n ')}`,
|
||||
));
|
||||
}
|
||||
|
||||
conf = loaded.config;
|
||||
if (conf.configFile && path.basename(conf.configFile) !== path.relative(conf.projectDir, conf.configFile)) {
|
||||
console.log(chalk.magenta(` ${figures.warning} Using configuration from ${conf.configFile}`));
|
||||
}
|
||||
@@ -132,6 +140,7 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
|
||||
let resetCache = false;
|
||||
const {argv} = yargs(hideBin(process.argv))
|
||||
.version(pkg.version)
|
||||
.parserConfiguration({
|
||||
'boolean-negation': true,
|
||||
'camel-case-expansion': false,
|
||||
@@ -161,7 +170,7 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
})
|
||||
.command('* [<pattern>...]', 'Run tests', yargs => yargs.options(FLAGS).positional('pattern', {
|
||||
array: true,
|
||||
describe: 'Select which test files to run. Leave empty if you want AVA to run all test files as per your configuration. Accepts glob patterns, directories that (recursively) contain test files, and file paths. Add a colon and specify line numbers of specific tests to run',
|
||||
describe: 'Select which test files to run. Leave empty if you want AVA to run all test files as per your configuration. Accepts glob patterns, directories that (recursively) contain test files, and file paths optionally suffixed with a colon and comma-separated numbers and/or ranges identifying the 1-based line(s) of specific tests to run',
|
||||
type: 'string',
|
||||
}), argv => {
|
||||
if (activeInspector) {
|
||||
@@ -188,7 +197,7 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
},
|
||||
}).positional('pattern', {
|
||||
demand: true,
|
||||
describe: 'Glob patterns to select a single test file to debug. Add a colon and specify line numbers of specific tests to run',
|
||||
describe: 'Glob pattern to select a single test file to debug, optionally suffixed with a colon and comma-separated numbers and/or ranges identifying the 1-based line(s) of specific tests to run',
|
||||
type: 'string',
|
||||
}),
|
||||
argv => {
|
||||
@@ -319,16 +328,20 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
exit('’sources’ has been removed. Use ’ignoredByWatcher’ to provide glob patterns of files that the watcher should ignore.');
|
||||
}
|
||||
|
||||
let pkg;
|
||||
if (Reflect.has(conf, 'sortTestFiles') && typeof conf.sortTestFiles !== 'function') {
|
||||
exit('’sortTestFiles’ must be a comparator function.');
|
||||
}
|
||||
|
||||
let projectPackageObject;
|
||||
try {
|
||||
pkg = JSON.parse(fs.readFileSync(path.resolve(projectDir, 'package.json')));
|
||||
projectPackageObject = JSON.parse(fs.readFileSync(path.resolve(projectDir, 'package.json')));
|
||||
} catch (error) {
|
||||
if (error.code !== 'ENOENT') {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
const {type: defaultModuleType = 'commonjs'} = pkg || {};
|
||||
const {type: defaultModuleType = 'commonjs'} = projectPackageObject || {};
|
||||
|
||||
const providers = [];
|
||||
if (Reflect.has(conf, 'typescript')) {
|
||||
@@ -380,7 +393,7 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
}
|
||||
|
||||
let parallelRuns = null;
|
||||
if (isCi && ciParallelVars) {
|
||||
if (isCi && ciParallelVars && combined.utilizeParallelBuilds !== false) {
|
||||
const {index: currentIndex, total: totalRuns} = ciParallelVars;
|
||||
parallelRuns = {currentIndex, totalRuns};
|
||||
}
|
||||
@@ -411,6 +424,7 @@ export default async function loadCli() { // eslint-disable-line complexity
|
||||
moduleTypes,
|
||||
nodeArguments,
|
||||
parallelRuns,
|
||||
sortTestFiles: conf.sortTestFiles,
|
||||
projectDir,
|
||||
providers,
|
||||
ranFromCli: true,
|
||||
|
||||
12
node_modules/ava/lib/create-chain.js
generated
vendored
12
node_modules/ava/lib/create-chain.js
generated
vendored
@@ -101,11 +101,13 @@ export default function createChain(fn, defaults, meta) {
|
||||
|
||||
root.meta = meta;
|
||||
|
||||
// Our type definition uses ESM syntax; when using CJS with VSCode, the
|
||||
// auto-completion assumes the root is accessed through `require('ava').default`.
|
||||
// Placate VSCode by adding a mostly hidden default property on the root.
|
||||
// This is available through both CJS and ESM imports. We use a proxy so that
|
||||
// we don't end up with root.default.default.default chains.
|
||||
// The ESM and CJS type definitions export the chain (`test()` function) as
|
||||
// the default. TypeScript's CJS output (when `esModuleInterop` is disabled)
|
||||
// assume `require('ava').default` is available. The same goes for `import ava
|
||||
// = require('ava')` syntax.
|
||||
//
|
||||
// Add `test.default` to make this work. Use a proxy to avoid
|
||||
// `test.default.default` chains.
|
||||
Object.defineProperty(root, 'default', {
|
||||
configurable: false,
|
||||
enumerable: false,
|
||||
|
||||
2
node_modules/ava/lib/eslint-plugin-helper-worker.js
generated
vendored
2
node_modules/ava/lib/eslint-plugin-helper-worker.js
generated
vendored
@@ -41,7 +41,7 @@ const buildGlobs = ({conf, providers, projectDir, overrideExtensions, overrideFi
|
||||
|
||||
const resolveGlobs = async (projectDir, overrideExtensions, overrideFiles) => {
|
||||
if (!configCache.has(projectDir)) {
|
||||
configCache.set(projectDir, loadConfig({resolveFrom: projectDir}).then(async conf => {
|
||||
configCache.set(projectDir, loadConfig({resolveFrom: projectDir}).then(async ({config: conf}) => {
|
||||
const providers = await collectProviders({conf, projectDir});
|
||||
return {conf, providers};
|
||||
}));
|
||||
|
||||
33
node_modules/ava/lib/load-config.js
generated
vendored
33
node_modules/ava/lib/load-config.js
generated
vendored
@@ -20,14 +20,15 @@ const importConfig = async ({configFile, fileForErrorMessage}) => {
|
||||
};
|
||||
|
||||
const loadConfigFile = async ({projectDir, configFile}) => {
|
||||
if (!fs.existsSync(configFile)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const fileForErrorMessage = path.relative(projectDir, configFile);
|
||||
try {
|
||||
await fs.promises.access(configFile);
|
||||
return {config: await importConfig({configFile, fileForErrorMessage}), configFile, fileForErrorMessage};
|
||||
} catch (error) {
|
||||
if (error.code === 'ENOENT') {
|
||||
return null;
|
||||
}
|
||||
|
||||
throw Object.assign(new Error(`Error loading ${fileForErrorMessage}: ${error.message}`), {parent: error});
|
||||
}
|
||||
};
|
||||
@@ -63,6 +64,20 @@ async function findRepoRoot(fromDir) {
|
||||
return root;
|
||||
}
|
||||
|
||||
async function checkJsonFile(searchDir) {
|
||||
const file = path.join(searchDir, 'ava.config.json');
|
||||
try {
|
||||
await fs.promises.access(file);
|
||||
return file;
|
||||
} catch (error) {
|
||||
if (error.code === 'ENOENT') {
|
||||
return null;
|
||||
}
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export async function loadConfig({configFile, resolveFrom = process.cwd(), defaults = {}} = {}) {
|
||||
let packageConf = await packageConfig('ava', {cwd: resolveFrom});
|
||||
const filepath = packageJsonPath(packageConf);
|
||||
@@ -74,6 +89,7 @@ export async function loadConfig({configFile, resolveFrom = process.cwd(), defau
|
||||
const allowConflictWithPackageJson = Boolean(configFile);
|
||||
configFile = resolveConfigFile(configFile);
|
||||
|
||||
const unsupportedFiles = [];
|
||||
let fileConf = NO_SUCH_FILE;
|
||||
let fileForErrorMessage;
|
||||
let conflicting = [];
|
||||
@@ -86,12 +102,17 @@ export async function loadConfig({configFile, resolveFrom = process.cwd(), defau
|
||||
let searchDir = projectDir;
|
||||
const stopAt = path.dirname(repoRoot);
|
||||
do {
|
||||
const results = await Promise.all([ // eslint-disable-line no-await-in-loop
|
||||
const [jsonFile, ...results] = await Promise.all([ // eslint-disable-line no-await-in-loop
|
||||
checkJsonFile(searchDir),
|
||||
loadConfigFile({projectDir, configFile: path.join(searchDir, 'ava.config.js')}),
|
||||
loadConfigFile({projectDir, configFile: path.join(searchDir, 'ava.config.cjs')}),
|
||||
loadConfigFile({projectDir, configFile: path.join(searchDir, 'ava.config.mjs')}),
|
||||
]);
|
||||
|
||||
if (jsonFile !== null) {
|
||||
unsupportedFiles.push(jsonFile);
|
||||
}
|
||||
|
||||
[{config: fileConf, fileForErrorMessage, configFile} = {config: NO_SUCH_FILE, fileForErrorMessage: undefined}, ...conflicting] = results.filter(result => result !== null);
|
||||
|
||||
searchDir = path.dirname(searchDir);
|
||||
@@ -139,5 +160,5 @@ export async function loadConfig({configFile, resolveFrom = process.cwd(), defau
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
return {config, unsupportedFiles};
|
||||
}
|
||||
|
||||
19
node_modules/ava/lib/reporters/default.js
generated
vendored
19
node_modules/ava/lib/reporters/default.js
generated
vendored
@@ -220,6 +220,9 @@ export default class Reporter {
|
||||
this.lineNumberErrors.push(event);
|
||||
|
||||
this.write(colors.information(`${figures.warning} Could not parse ${this.relativeFile(event.testFile)} for line number selection`));
|
||||
this.lineWriter.writeLine();
|
||||
this.lineWriter.writeLine(colors.errorStack(event.err.stack));
|
||||
this.lineWriter.writeLine();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -231,7 +234,7 @@ export default class Reporter {
|
||||
}
|
||||
|
||||
case 'hook-finished': {
|
||||
if (true && event.logs.length > 0) {
|
||||
if (event.logs.length > 0) {
|
||||
this.lineWriter.writeLine(` ${this.prefixTitle(event.testFile, event.title)}`);
|
||||
this.writeLogs(event);
|
||||
}
|
||||
@@ -312,7 +315,7 @@ export default class Reporter {
|
||||
this.filesWithoutMatchedLineNumbers.add(event.testFile);
|
||||
|
||||
this.lineWriter.writeLine(colors.error(`${figures.cross} Line numbers for ${this.relativeFile(event.testFile)} did not match any tests`));
|
||||
} else if (true && !this.failFastEnabled && fileStats.remainingTests > 0) {
|
||||
} else if (!this.failFastEnabled && fileStats.remainingTests > 0) {
|
||||
this.lineWriter.writeLine(colors.error(`${figures.cross} ${fileStats.remainingTests} ${plur('test', fileStats.remainingTests)} remaining in ${this.relativeFile(event.testFile)}`));
|
||||
}
|
||||
}
|
||||
@@ -515,7 +518,8 @@ export default class Reporter {
|
||||
|
||||
writeFailure(event) {
|
||||
this.lineWriter.writeLine(colors.title(this.prefixTitle(event.testFile, event.title)));
|
||||
if (!this.writeLogs(event, true)) {
|
||||
|
||||
if (!event.logs || event.logs.length === 0) {
|
||||
this.lineWriter.writeLine();
|
||||
}
|
||||
|
||||
@@ -570,17 +574,12 @@ export default class Reporter {
|
||||
this.lineWriter.writeLine();
|
||||
|
||||
if (this.failures.length > 0) {
|
||||
const writeTrailingLines = this.internalErrors.length > 0 || this.sharedWorkerErrors.length > 0 || this.uncaughtExceptions.length > 0 || this.unhandledRejections.length > 0;
|
||||
|
||||
const lastFailure = this.failures[this.failures.length - 1];
|
||||
for (const event of this.failures) {
|
||||
this.writeFailure(event);
|
||||
if (event !== lastFailure) {
|
||||
this.lineWriter.writeLine();
|
||||
this.lineWriter.writeLine();
|
||||
} else if (!true && writeTrailingLines) {
|
||||
this.lineWriter.writeLine();
|
||||
this.lineWriter.writeLine();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -659,6 +658,10 @@ export default class Reporter {
|
||||
this.lineWriter.writeLine(colors.error(`${this.stats.uncaughtExceptions} uncaught ${plur('exception', this.stats.uncaughtExceptions)}`));
|
||||
}
|
||||
|
||||
if (this.stats.timeouts > 0) {
|
||||
this.lineWriter.writeLine(colors.error(`${this.stats.timeouts} ${plur('test', this.stats.timeouts)} remained pending after a timeout`));
|
||||
}
|
||||
|
||||
if (this.previousFailures > 0) {
|
||||
this.lineWriter.writeLine(colors.error(`${this.previousFailures} previous ${plur('failure', this.previousFailures)} in test files that were not rerun`));
|
||||
}
|
||||
|
||||
2
node_modules/ava/lib/reporters/tap.js
generated
vendored
2
node_modules/ava/lib/reporters/tap.js
generated
vendored
@@ -4,7 +4,7 @@ import path from 'node:path';
|
||||
import indentString from 'indent-string';
|
||||
import plur from 'plur';
|
||||
import stripAnsi from 'strip-ansi';
|
||||
import supertap from 'supertap';
|
||||
import * as supertap from 'supertap';
|
||||
|
||||
import beautifyStack from './beautify-stack.js';
|
||||
import prefixTitle from './prefix-title.js';
|
||||
|
||||
5
node_modules/ava/lib/run-status.js
generated
vendored
5
node_modules/ava/lib/run-status.js
generated
vendored
@@ -125,7 +125,10 @@ export default class RunStatus extends Emittery {
|
||||
case 'timeout':
|
||||
event.pendingTests = this.pendingTests;
|
||||
this.pendingTests = new Map();
|
||||
stats.timeouts++;
|
||||
for (const testsInFile of event.pendingTests.values()) {
|
||||
stats.timeouts += testsInFile.size;
|
||||
}
|
||||
|
||||
break;
|
||||
case 'interrupt':
|
||||
event.pendingTests = this.pendingTests;
|
||||
|
||||
2
node_modules/ava/lib/runner.js
generated
vendored
2
node_modules/ava/lib/runner.js
generated
vendored
@@ -524,7 +524,7 @@ export default class Runner extends Emittery {
|
||||
// If a concurrent test fails, even if `failFast` is enabled it won't
|
||||
// stop other concurrent tests from running.
|
||||
const allOkays = await Promise.all(concurrentTests.map(task => this.runTest(task, contextRef.copy())));
|
||||
return allOkays.every(ok => ok);
|
||||
return allOkays.every(Boolean);
|
||||
});
|
||||
|
||||
const beforeExitHandler = this.beforeExitHandler.bind(this);
|
||||
|
||||
4
node_modules/ava/lib/snapshot-manager.js
generated
vendored
4
node_modules/ava/lib/snapshot-manager.js
generated
vendored
@@ -391,7 +391,9 @@ class Manager {
|
||||
|
||||
const resolveSourceFile = mem(file => {
|
||||
const sourceMap = findSourceMap(file);
|
||||
if (sourceMap === undefined) {
|
||||
// Prior to Node.js 18.8.0, the value when a source map could not be found was `undefined`.
|
||||
// This changed to `null` in <https://github.com/nodejs/node/pull/43875>. Check both.
|
||||
if (sourceMap === undefined || sourceMap === null) {
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
12
node_modules/ava/lib/test.js
generated
vendored
12
node_modules/ava/lib/test.js
generated
vendored
@@ -24,16 +24,16 @@ const testMap = new WeakMap();
|
||||
class ExecutionContext extends Assertions {
|
||||
constructor(test) {
|
||||
super({
|
||||
pass: () => {
|
||||
pass() {
|
||||
test.countPassedAssertion();
|
||||
},
|
||||
pending: promise => {
|
||||
pending(promise) {
|
||||
test.addPendingAssertion(promise);
|
||||
},
|
||||
fail: error => {
|
||||
fail(error) {
|
||||
test.addFailedAssertion(error);
|
||||
},
|
||||
skip: () => {
|
||||
skip() {
|
||||
test.countPassedAssertion();
|
||||
},
|
||||
compareWithSnapshot: options => test.compareWithSnapshot(options),
|
||||
@@ -109,7 +109,7 @@ class ExecutionContext extends Assertions {
|
||||
logs: [...logs], // Don't allow modification of logs.
|
||||
passed,
|
||||
title: attemptTitle,
|
||||
commit: ({retainLogs = true} = {}) => {
|
||||
commit({retainLogs = true} = {}) {
|
||||
if (committed) {
|
||||
return;
|
||||
}
|
||||
@@ -132,7 +132,7 @@ class ExecutionContext extends Assertions {
|
||||
startingSnapshotCount,
|
||||
});
|
||||
},
|
||||
discard: ({retainLogs = false} = {}) => {
|
||||
discard({retainLogs = false} = {}) {
|
||||
if (committed) {
|
||||
test.saveFirstError(new Error('Can’t discard a result that was previously committed'));
|
||||
return;
|
||||
|
||||
19
node_modules/ava/lib/worker/line-numbers.js
generated
vendored
19
node_modules/ava/lib/worker/line-numbers.js
generated
vendored
@@ -61,11 +61,18 @@ function findTest(locations, declaration) {
|
||||
const range = (start, end) => Array.from({length: end - start + 1}).fill(start).map((element, index) => element + index);
|
||||
|
||||
const translate = (sourceMap, pos) => {
|
||||
if (sourceMap === undefined) {
|
||||
if (sourceMap === null) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
const entry = sourceMap.findEntry(pos.line - 1, pos.column); // Source maps are 0-based
|
||||
|
||||
// When used with ts-node/register, we've seen entries without original values. Return the
|
||||
// original position.
|
||||
if (entry.originalLine === undefined || entry.originalColumn === undefined) {
|
||||
return pos;
|
||||
}
|
||||
|
||||
return {
|
||||
line: entry.originalLine + 1, // Readjust for Acorn.
|
||||
column: entry.originalColumn,
|
||||
@@ -81,7 +88,7 @@ export default function lineNumberSelection({file, lineNumbers = []}) {
|
||||
|
||||
let locations = parse(file);
|
||||
let lookedForSourceMap = false;
|
||||
let sourceMap;
|
||||
let sourceMap = null;
|
||||
|
||||
return () => {
|
||||
if (!lookedForSourceMap) {
|
||||
@@ -91,7 +98,13 @@ export default function lineNumberSelection({file, lineNumbers = []}) {
|
||||
// Source maps are not available before then.
|
||||
sourceMap = findSourceMap(file);
|
||||
|
||||
if (sourceMap !== undefined) {
|
||||
if (sourceMap === undefined) {
|
||||
// Prior to Node.js 18.8.0, the value when a source map could not be found was `undefined`.
|
||||
// This changed to `null` in <https://github.com/nodejs/node/pull/43875>.
|
||||
sourceMap = null;
|
||||
}
|
||||
|
||||
if (sourceMap !== null) {
|
||||
locations = locations.map(({start, end}) => ({
|
||||
start: translate(sourceMap, start),
|
||||
end: translate(sourceMap, end),
|
||||
|
||||
22
node_modules/ava/node_modules/acorn/CHANGELOG.md
generated
vendored
22
node_modules/ava/node_modules/acorn/CHANGELOG.md
generated
vendored
@@ -1,3 +1,25 @@
|
||||
## 8.8.0 (2022-07-21)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Allow parentheses around spread args in destructuring object assignment.
|
||||
|
||||
Fix an issue where the tree contained `directive` properties in when parsing with a language version that doesn't support them.
|
||||
|
||||
### New features
|
||||
|
||||
Support hashbang comments by default in ECMAScript 2023 and later.
|
||||
|
||||
## 8.7.1 (2021-04-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
Stop handling `"use strict"` directives in ECMAScript versions before 5.
|
||||
|
||||
Fix an issue where duplicate quoted export names in `export *` syntax were incorrectly checked.
|
||||
|
||||
Add missing type for `tokTypes`.
|
||||
|
||||
## 8.7.0 (2021-12-27)
|
||||
|
||||
### New features
|
||||
|
||||
2
node_modules/ava/node_modules/acorn/LICENSE
generated
vendored
2
node_modules/ava/node_modules/acorn/LICENSE
generated
vendored
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (C) 2012-2020 by various contributors (see AUTHORS)
|
||||
Copyright (C) 2012-2022 by various contributors (see AUTHORS)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
21
node_modules/ava/node_modules/acorn/README.md
generated
vendored
21
node_modules/ava/node_modules/acorn/README.md
generated
vendored
@@ -54,10 +54,10 @@ required):
|
||||
|
||||
- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be
|
||||
either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10 (2019),
|
||||
11 (2020), 12 (2021), 13 (2022, partial support)
|
||||
or `"latest"` (the latest the library supports). This influences
|
||||
support for strict mode, the set of reserved words, and support
|
||||
for new syntax features.
|
||||
11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"` (the
|
||||
latest the library supports). This influences support for strict
|
||||
mode, the set of reserved words, and support for new syntax
|
||||
features.
|
||||
|
||||
**NOTE**: Only 'stage 4' (finalized) ECMAScript features are being
|
||||
implemented by Acorn. Other proposed new features must be
|
||||
@@ -104,9 +104,9 @@ required):
|
||||
- **allowSuperOutsideMethod**: By default, `super` outside a method
|
||||
raises an error. Set this to `true` to accept such code.
|
||||
|
||||
- **allowHashBang**: When this is enabled (off by default), if the
|
||||
code starts with the characters `#!` (as in a shellscript), the
|
||||
first line will be treated as a comment.
|
||||
- **allowHashBang**: When this is enabled, if the code starts with the
|
||||
characters `#!` (as in a shellscript), the first line will be
|
||||
treated as a comment. Defaults to true when `ecmaVersion` >= 2023.
|
||||
|
||||
- **locations**: When `true`, each node has a `loc` object attached
|
||||
with `start` and `end` subobjects, each of which contains the
|
||||
@@ -271,10 +271,3 @@ The utility spits out the syntax tree as JSON data.
|
||||
## Existing plugins
|
||||
|
||||
- [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx)
|
||||
|
||||
Plugins for ECMAScript proposals:
|
||||
|
||||
- [`acorn-stage3`](https://github.com/acornjs/acorn-stage3): Parse most stage 3 proposals, bundling:
|
||||
- [`acorn-class-fields`](https://github.com/acornjs/acorn-class-fields): Parse [class fields proposal](https://github.com/tc39/proposal-class-fields)
|
||||
- [`acorn-import-meta`](https://github.com/acornjs/acorn-import-meta): Parse [import.meta proposal](https://github.com/tc39/proposal-import-meta)
|
||||
- [`acorn-private-methods`](https://github.com/acornjs/acorn-private-methods): parse [private methods, getters and setters proposal](https://github.com/tc39/proposal-private-methods)n
|
||||
|
||||
4
node_modules/ava/node_modules/acorn/bin/acorn
generated
vendored
4
node_modules/ava/node_modules/acorn/bin/acorn
generated
vendored
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
"use strict"
|
||||
|
||||
require('../dist/bin.js');
|
||||
require("../dist/bin.js")
|
||||
|
||||
40
node_modules/ava/node_modules/acorn/dist/acorn.d.ts
generated
vendored
40
node_modules/ava/node_modules/acorn/dist/acorn.d.ts
generated
vendored
@@ -11,8 +11,10 @@ declare namespace acorn {
|
||||
[Symbol.iterator](): Iterator<Token>
|
||||
}
|
||||
|
||||
type ecmaVersion = 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest'
|
||||
|
||||
interface Options {
|
||||
ecmaVersion: 3 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 'latest'
|
||||
ecmaVersion: ecmaVersion
|
||||
sourceType?: 'script' | 'module'
|
||||
onInsertedSemicolon?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
||||
onTrailingComma?: (lastTokEnd: number, lastTokEndLoc?: Position) => void
|
||||
@@ -36,8 +38,41 @@ declare namespace acorn {
|
||||
}
|
||||
|
||||
class Parser {
|
||||
// state.js
|
||||
lineStart: number;
|
||||
options: Options;
|
||||
curLine: number;
|
||||
start: number;
|
||||
end: number;
|
||||
input: string;
|
||||
type: TokenType;
|
||||
|
||||
// state.js
|
||||
constructor(options: Options, input: string, startPos?: number)
|
||||
parse(this: Parser): Node
|
||||
|
||||
// tokenize.js
|
||||
next(): void;
|
||||
nextToken(): void;
|
||||
|
||||
// statement.js
|
||||
parseTopLevel(node: Node): Node;
|
||||
|
||||
// node.js
|
||||
finishNode(node: Node, type: string): Node;
|
||||
finishNodeAt(node: Node, type: string, pos: number, loc: Position): Node;
|
||||
|
||||
// location.js
|
||||
raise(pos: number, message: string) : void;
|
||||
raiseRecoverable?(pos: number, message: string) : void;
|
||||
|
||||
// parseutils.js
|
||||
unexpected(pos: number) : void;
|
||||
|
||||
// index.js
|
||||
static acorn: typeof acorn;
|
||||
|
||||
// state.js
|
||||
static parse(this: typeof Parser, input: string, options: Options): Node
|
||||
static parseExpressionAt(this: typeof Parser, input: string, pos: number, options: Options): Node
|
||||
static tokenizer(this: typeof Parser, input: string, options: Options): {
|
||||
@@ -102,8 +137,10 @@ declare namespace acorn {
|
||||
colon: TokenType
|
||||
dot: TokenType
|
||||
question: TokenType
|
||||
questionDot: TokenType
|
||||
arrow: TokenType
|
||||
template: TokenType
|
||||
invalidTemplate: TokenType
|
||||
ellipsis: TokenType
|
||||
backQuote: TokenType
|
||||
dollarBraceL: TokenType
|
||||
@@ -124,6 +161,7 @@ declare namespace acorn {
|
||||
star: TokenType
|
||||
slash: TokenType
|
||||
starstar: TokenType
|
||||
coalesce: TokenType
|
||||
_break: TokenType
|
||||
_case: TokenType
|
||||
_catch: TokenType
|
||||
|
||||
112
node_modules/ava/node_modules/acorn/dist/acorn.js
generated
vendored
112
node_modules/ava/node_modules/acorn/dist/acorn.js
generated
vendored
@@ -4,6 +4,20 @@
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.acorn = {}));
|
||||
})(this, (function (exports) { 'use strict';
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
|
||||
// These are a run-length and offset encoded representation of the
|
||||
|
||||
// Reserved word lists for various dialects of the language
|
||||
|
||||
var reservedWords = {
|
||||
@@ -28,31 +42,9 @@
|
||||
|
||||
// ## Character categories
|
||||
|
||||
// Big ugly regular expressions that match characters in the
|
||||
// whitespace, identifier, and identifier-start categories. These
|
||||
// are only applied when a character is found to actually have a
|
||||
// code point above 128.
|
||||
// Generated by `bin/generate-identifier-regex.js`.
|
||||
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
||||
|
||||
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
||||
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
||||
|
||||
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
||||
|
||||
// These are a run-length and offset encoded representation of the
|
||||
// >0xffff code points that are a valid part of identifiers. The
|
||||
// offset starts at 0x10000, and each pair of numbers represents an
|
||||
// offset to the next range, and then a size of the range. They were
|
||||
// generated by bin/generate-identifier-regex.js
|
||||
|
||||
// eslint-disable-next-line comma-spacing
|
||||
var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];
|
||||
|
||||
// eslint-disable-next-line comma-spacing
|
||||
var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];
|
||||
|
||||
// This has a complexity linear to the value of the code. The
|
||||
// assumption is that looking up astral identifier characters is
|
||||
// rare.
|
||||
@@ -287,6 +279,13 @@
|
||||
return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
|
||||
}
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) { return String.fromCharCode(code) }
|
||||
code -= 0x10000;
|
||||
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
|
||||
}
|
||||
|
||||
var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
|
||||
|
||||
// These are used when `options.locations` is on, for the
|
||||
@@ -328,10 +327,10 @@
|
||||
var defaultOptions = {
|
||||
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
||||
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
||||
// (2019), 11 (2020), 12 (2021), 13 (2022), or `"latest"` (the
|
||||
// latest version the library supports). This influences support
|
||||
// for strict mode, the set of reserved words, and support for
|
||||
// new syntax features.
|
||||
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
||||
// (the latest version the library supports). This influences
|
||||
// support for strict mode, the set of reserved words, and support
|
||||
// for new syntax features.
|
||||
ecmaVersion: null,
|
||||
// `sourceType` indicates the mode the code should be parsed in.
|
||||
// Can be either `"script"` or `"module"`. This influences global
|
||||
@@ -365,8 +364,9 @@
|
||||
// When enabled, super identifiers are not constrained to
|
||||
// appearing in methods and do not raise an error when they appear elsewhere.
|
||||
allowSuperOutsideMethod: null,
|
||||
// When enabled, hashbang directive in the beginning of file
|
||||
// is allowed and treated as a line comment.
|
||||
// When enabled, hashbang directive in the beginning of file is
|
||||
// allowed and treated as a line comment. Enabled by default when
|
||||
// `ecmaVersion` >= 2023.
|
||||
allowHashBang: false,
|
||||
// When `locations` is on, `loc` properties holding objects with
|
||||
// `start` and `end` properties in `{line, column}` form (with
|
||||
@@ -441,6 +441,9 @@
|
||||
if (options.allowReserved == null)
|
||||
{ options.allowReserved = options.ecmaVersion < 5; }
|
||||
|
||||
if (opts.allowHashBang == null)
|
||||
{ options.allowHashBang = options.ecmaVersion >= 14; }
|
||||
|
||||
if (isArray(options.onToken)) {
|
||||
var tokens = options.onToken;
|
||||
options.onToken = function (token) { return tokens.push(token); };
|
||||
@@ -654,6 +657,7 @@
|
||||
|
||||
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
||||
pp$9.strictDirective = function(start) {
|
||||
if (this.options.ecmaVersion < 5) { return false }
|
||||
for (;;) {
|
||||
// Try to find string literal.
|
||||
skipWhiteSpace.lastIndex = start;
|
||||
@@ -756,21 +760,21 @@
|
||||
this.raise(pos != null ? pos : this.start, "Unexpected token");
|
||||
};
|
||||
|
||||
function DestructuringErrors() {
|
||||
var DestructuringErrors = function DestructuringErrors() {
|
||||
this.shorthandAssign =
|
||||
this.trailingComma =
|
||||
this.parenthesizedAssign =
|
||||
this.parenthesizedBind =
|
||||
this.doubleProto =
|
||||
-1;
|
||||
}
|
||||
};
|
||||
|
||||
pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
|
||||
if (!refDestructuringErrors) { return }
|
||||
if (refDestructuringErrors.trailingComma > -1)
|
||||
{ this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
|
||||
var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
|
||||
if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); }
|
||||
if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); }
|
||||
};
|
||||
|
||||
pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
|
||||
@@ -1644,7 +1648,7 @@
|
||||
if (this.options.ecmaVersion >= 11) {
|
||||
if (this.eatContextual("as")) {
|
||||
node.exported = this.parseModuleExportName();
|
||||
this.checkExport(exports, node.exported.name, this.lastTokStart);
|
||||
this.checkExport(exports, node.exported, this.lastTokStart);
|
||||
} else {
|
||||
node.exported = null;
|
||||
}
|
||||
@@ -1678,7 +1682,7 @@
|
||||
if (node.declaration.type === "VariableDeclaration")
|
||||
{ this.checkVariableExport(exports, node.declaration.declarations); }
|
||||
else
|
||||
{ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }
|
||||
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
||||
node.specifiers = [];
|
||||
node.source = null;
|
||||
} else { // export { x, y as z } [from '...']
|
||||
@@ -1710,6 +1714,8 @@
|
||||
|
||||
pp$8.checkExport = function(exports, name, pos) {
|
||||
if (!exports) { return }
|
||||
if (typeof name !== "string")
|
||||
{ name = name.type === "Identifier" ? name.name : name.value; }
|
||||
if (hasOwn(exports, name))
|
||||
{ this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
|
||||
exports[name] = true;
|
||||
@@ -1718,7 +1724,7 @@
|
||||
pp$8.checkPatternExport = function(exports, pat) {
|
||||
var type = pat.type;
|
||||
if (type === "Identifier")
|
||||
{ this.checkExport(exports, pat.name, pat.start); }
|
||||
{ this.checkExport(exports, pat, pat.start); }
|
||||
else if (type === "ObjectPattern")
|
||||
{ for (var i = 0, list = pat.properties; i < list.length; i += 1)
|
||||
{
|
||||
@@ -1778,7 +1784,7 @@
|
||||
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
||||
this.checkExport(
|
||||
exports,
|
||||
node.exported[node.exported.type === "Identifier" ? "name" : "value"],
|
||||
node.exported,
|
||||
node.exported.start
|
||||
);
|
||||
nodes.push(this.finishNode(node, "ExportSpecifier"));
|
||||
@@ -1864,6 +1870,7 @@
|
||||
};
|
||||
pp$8.isDirectiveCandidate = function(statement) {
|
||||
return (
|
||||
this.options.ecmaVersion >= 5 &&
|
||||
statement.type === "ExpressionStatement" &&
|
||||
statement.expression.type === "Literal" &&
|
||||
typeof statement.expression.value === "string" &&
|
||||
@@ -2274,7 +2281,8 @@
|
||||
{ this.exprAllowed = type.beforeExpr; }
|
||||
};
|
||||
|
||||
// Used to handle egde case when token context could not be inferred correctly in tokenize phase
|
||||
// Used to handle egde cases when token context could not be inferred correctly during tokenization phase
|
||||
|
||||
pp$6.overrideContext = function(tokenCtx) {
|
||||
if (this.curContext() !== tokenCtx) {
|
||||
this.context[this.context.length - 1] = tokenCtx;
|
||||
@@ -3090,15 +3098,6 @@
|
||||
}
|
||||
return this.finishNode(prop, "RestElement")
|
||||
}
|
||||
// To disallow parenthesized identifier via `this.toAssignable()`.
|
||||
if (this.type === types$1.parenL && refDestructuringErrors) {
|
||||
if (refDestructuringErrors.parenthesizedAssign < 0) {
|
||||
refDestructuringErrors.parenthesizedAssign = this.start;
|
||||
}
|
||||
if (refDestructuringErrors.parenthesizedBind < 0) {
|
||||
refDestructuringErrors.parenthesizedBind = this.start;
|
||||
}
|
||||
}
|
||||
// Parse argument.
|
||||
prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
|
||||
// To disallow trailing comma via `this.toAssignable()`.
|
||||
@@ -3768,12 +3767,6 @@
|
||||
return false
|
||||
};
|
||||
|
||||
function codePointToString$1(ch) {
|
||||
if (ch <= 0xFFFF) { return String.fromCharCode(ch) }
|
||||
ch -= 0x10000;
|
||||
return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the flags part of a given RegExpLiteral.
|
||||
*
|
||||
@@ -4138,9 +4131,9 @@
|
||||
pp$1.regexp_eatRegExpIdentifierName = function(state) {
|
||||
state.lastStringValue = "";
|
||||
if (this.regexp_eatRegExpIdentifierStart(state)) {
|
||||
state.lastStringValue += codePointToString$1(state.lastIntValue);
|
||||
state.lastStringValue += codePointToString(state.lastIntValue);
|
||||
while (this.regexp_eatRegExpIdentifierPart(state)) {
|
||||
state.lastStringValue += codePointToString$1(state.lastIntValue);
|
||||
state.lastStringValue += codePointToString(state.lastIntValue);
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -4492,7 +4485,7 @@
|
||||
var ch = 0;
|
||||
state.lastStringValue = "";
|
||||
while (isUnicodePropertyNameCharacter(ch = state.current())) {
|
||||
state.lastStringValue += codePointToString$1(ch);
|
||||
state.lastStringValue += codePointToString(ch);
|
||||
state.advance();
|
||||
}
|
||||
return state.lastStringValue !== ""
|
||||
@@ -4507,7 +4500,7 @@
|
||||
var ch = 0;
|
||||
state.lastStringValue = "";
|
||||
while (isUnicodePropertyValueCharacter(ch = state.current())) {
|
||||
state.lastStringValue += codePointToString$1(ch);
|
||||
state.lastStringValue += codePointToString(ch);
|
||||
state.advance();
|
||||
}
|
||||
return state.lastStringValue !== ""
|
||||
@@ -5290,13 +5283,6 @@
|
||||
return code
|
||||
};
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) { return String.fromCharCode(code) }
|
||||
code -= 0x10000;
|
||||
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
|
||||
}
|
||||
|
||||
pp.readString = function(quote) {
|
||||
var out = "", chunkStart = ++this.pos;
|
||||
for (;;) {
|
||||
@@ -5541,7 +5527,7 @@
|
||||
|
||||
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
||||
|
||||
var version = "8.7.0";
|
||||
var version = "8.8.0";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
||||
112
node_modules/ava/node_modules/acorn/dist/acorn.mjs
generated
vendored
112
node_modules/ava/node_modules/acorn/dist/acorn.mjs
generated
vendored
@@ -1,3 +1,17 @@
|
||||
// This file was generated. Do not modify manually!
|
||||
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 154, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 161, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 19306, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 262, 6, 10, 9, 357, 0, 62, 13, 1495, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 85, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 190, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1070, 4050, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 46, 2, 18, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 482, 44, 11, 6, 17, 0, 322, 29, 19, 43, 1269, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4152, 8, 221, 3, 5761, 15, 7472, 3104, 541, 1507, 4938];
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
||||
|
||||
// This file was generated. Do not modify manually!
|
||||
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
|
||||
// These are a run-length and offset encoded representation of the
|
||||
|
||||
// Reserved word lists for various dialects of the language
|
||||
|
||||
var reservedWords = {
|
||||
@@ -22,31 +36,9 @@ var keywordRelationalOperator = /^in(stanceof)?$/;
|
||||
|
||||
// ## Character categories
|
||||
|
||||
// Big ugly regular expressions that match characters in the
|
||||
// whitespace, identifier, and identifier-start categories. These
|
||||
// are only applied when a character is found to actually have a
|
||||
// code point above 128.
|
||||
// Generated by `bin/generate-identifier-regex.js`.
|
||||
var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0560-\u0588\u05d0-\u05ea\u05ef-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u0860-\u086a\u0870-\u0887\u0889-\u088e\u08a0-\u08c9\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u09fc\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c5d\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cdd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d04-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e86-\u0e8a\u0e8c-\u0ea3\u0ea5\u0ea7-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u1711\u171f-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1878\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4c\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1c90-\u1cba\u1cbd-\u1cbf\u1ce9-\u1cec\u1cee-\u1cf3\u1cf5\u1cf6\u1cfa\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312f\u3131-\u318e\u31a0-\u31bf\u31f0-\u31ff\u3400-\u4dbf\u4e00-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ca\ua7d0\ua7d1\ua7d3\ua7d5-\ua7d9\ua7f2-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua8fe\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab69\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc";
|
||||
var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u07fd\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0898-\u089f\u08ca-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u09fe\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0afa-\u0aff\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b55-\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c04\u0c3c\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d00-\u0d03\u0d3b\u0d3c\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d81-\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u180f-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1abf-\u1ace\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf4\u1cf7-\u1cf9\u1dc0-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua82c\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua8ff-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f";
|
||||
|
||||
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
||||
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
||||
|
||||
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
||||
|
||||
// These are a run-length and offset encoded representation of the
|
||||
// >0xffff code points that are a valid part of identifiers. The
|
||||
// offset starts at 0x10000, and each pair of numbers represents an
|
||||
// offset to the next range, and then a size of the range. They were
|
||||
// generated by bin/generate-identifier-regex.js
|
||||
|
||||
// eslint-disable-next-line comma-spacing
|
||||
var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];
|
||||
|
||||
// eslint-disable-next-line comma-spacing
|
||||
var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];
|
||||
|
||||
// This has a complexity linear to the value of the code. The
|
||||
// assumption is that looking up astral identifier characters is
|
||||
// rare.
|
||||
@@ -281,6 +273,13 @@ function wordsRegexp(words) {
|
||||
return new RegExp("^(?:" + words.replace(/ /g, "|") + ")$")
|
||||
}
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) { return String.fromCharCode(code) }
|
||||
code -= 0x10000;
|
||||
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
|
||||
}
|
||||
|
||||
var loneSurrogate = /(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;
|
||||
|
||||
// These are used when `options.locations` is on, for the
|
||||
@@ -322,10 +321,10 @@ function getLineInfo(input, offset) {
|
||||
var defaultOptions = {
|
||||
// `ecmaVersion` indicates the ECMAScript version to parse. Must be
|
||||
// either 3, 5, 6 (or 2015), 7 (2016), 8 (2017), 9 (2018), 10
|
||||
// (2019), 11 (2020), 12 (2021), 13 (2022), or `"latest"` (the
|
||||
// latest version the library supports). This influences support
|
||||
// for strict mode, the set of reserved words, and support for
|
||||
// new syntax features.
|
||||
// (2019), 11 (2020), 12 (2021), 13 (2022), 14 (2023), or `"latest"`
|
||||
// (the latest version the library supports). This influences
|
||||
// support for strict mode, the set of reserved words, and support
|
||||
// for new syntax features.
|
||||
ecmaVersion: null,
|
||||
// `sourceType` indicates the mode the code should be parsed in.
|
||||
// Can be either `"script"` or `"module"`. This influences global
|
||||
@@ -359,8 +358,9 @@ var defaultOptions = {
|
||||
// When enabled, super identifiers are not constrained to
|
||||
// appearing in methods and do not raise an error when they appear elsewhere.
|
||||
allowSuperOutsideMethod: null,
|
||||
// When enabled, hashbang directive in the beginning of file
|
||||
// is allowed and treated as a line comment.
|
||||
// When enabled, hashbang directive in the beginning of file is
|
||||
// allowed and treated as a line comment. Enabled by default when
|
||||
// `ecmaVersion` >= 2023.
|
||||
allowHashBang: false,
|
||||
// When `locations` is on, `loc` properties holding objects with
|
||||
// `start` and `end` properties in `{line, column}` form (with
|
||||
@@ -435,6 +435,9 @@ function getOptions(opts) {
|
||||
if (options.allowReserved == null)
|
||||
{ options.allowReserved = options.ecmaVersion < 5; }
|
||||
|
||||
if (opts.allowHashBang == null)
|
||||
{ options.allowHashBang = options.ecmaVersion >= 14; }
|
||||
|
||||
if (isArray(options.onToken)) {
|
||||
var tokens = options.onToken;
|
||||
options.onToken = function (token) { return tokens.push(token); };
|
||||
@@ -648,6 +651,7 @@ var pp$9 = Parser.prototype;
|
||||
|
||||
var literal = /^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;
|
||||
pp$9.strictDirective = function(start) {
|
||||
if (this.options.ecmaVersion < 5) { return false }
|
||||
for (;;) {
|
||||
// Try to find string literal.
|
||||
skipWhiteSpace.lastIndex = start;
|
||||
@@ -750,21 +754,21 @@ pp$9.unexpected = function(pos) {
|
||||
this.raise(pos != null ? pos : this.start, "Unexpected token");
|
||||
};
|
||||
|
||||
function DestructuringErrors() {
|
||||
var DestructuringErrors = function DestructuringErrors() {
|
||||
this.shorthandAssign =
|
||||
this.trailingComma =
|
||||
this.parenthesizedAssign =
|
||||
this.parenthesizedBind =
|
||||
this.doubleProto =
|
||||
-1;
|
||||
}
|
||||
};
|
||||
|
||||
pp$9.checkPatternErrors = function(refDestructuringErrors, isAssign) {
|
||||
if (!refDestructuringErrors) { return }
|
||||
if (refDestructuringErrors.trailingComma > -1)
|
||||
{ this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element"); }
|
||||
var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind;
|
||||
if (parens > -1) { this.raiseRecoverable(parens, "Parenthesized pattern"); }
|
||||
if (parens > -1) { this.raiseRecoverable(parens, isAssign ? "Assigning to rvalue" : "Parenthesized pattern"); }
|
||||
};
|
||||
|
||||
pp$9.checkExpressionErrors = function(refDestructuringErrors, andThrow) {
|
||||
@@ -1638,7 +1642,7 @@ pp$8.parseExport = function(node, exports) {
|
||||
if (this.options.ecmaVersion >= 11) {
|
||||
if (this.eatContextual("as")) {
|
||||
node.exported = this.parseModuleExportName();
|
||||
this.checkExport(exports, node.exported.name, this.lastTokStart);
|
||||
this.checkExport(exports, node.exported, this.lastTokStart);
|
||||
} else {
|
||||
node.exported = null;
|
||||
}
|
||||
@@ -1672,7 +1676,7 @@ pp$8.parseExport = function(node, exports) {
|
||||
if (node.declaration.type === "VariableDeclaration")
|
||||
{ this.checkVariableExport(exports, node.declaration.declarations); }
|
||||
else
|
||||
{ this.checkExport(exports, node.declaration.id.name, node.declaration.id.start); }
|
||||
{ this.checkExport(exports, node.declaration.id, node.declaration.id.start); }
|
||||
node.specifiers = [];
|
||||
node.source = null;
|
||||
} else { // export { x, y as z } [from '...']
|
||||
@@ -1704,6 +1708,8 @@ pp$8.parseExport = function(node, exports) {
|
||||
|
||||
pp$8.checkExport = function(exports, name, pos) {
|
||||
if (!exports) { return }
|
||||
if (typeof name !== "string")
|
||||
{ name = name.type === "Identifier" ? name.name : name.value; }
|
||||
if (hasOwn(exports, name))
|
||||
{ this.raiseRecoverable(pos, "Duplicate export '" + name + "'"); }
|
||||
exports[name] = true;
|
||||
@@ -1712,7 +1718,7 @@ pp$8.checkExport = function(exports, name, pos) {
|
||||
pp$8.checkPatternExport = function(exports, pat) {
|
||||
var type = pat.type;
|
||||
if (type === "Identifier")
|
||||
{ this.checkExport(exports, pat.name, pat.start); }
|
||||
{ this.checkExport(exports, pat, pat.start); }
|
||||
else if (type === "ObjectPattern")
|
||||
{ for (var i = 0, list = pat.properties; i < list.length; i += 1)
|
||||
{
|
||||
@@ -1772,7 +1778,7 @@ pp$8.parseExportSpecifiers = function(exports) {
|
||||
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
||||
this.checkExport(
|
||||
exports,
|
||||
node.exported[node.exported.type === "Identifier" ? "name" : "value"],
|
||||
node.exported,
|
||||
node.exported.start
|
||||
);
|
||||
nodes.push(this.finishNode(node, "ExportSpecifier"));
|
||||
@@ -1858,6 +1864,7 @@ pp$8.adaptDirectivePrologue = function(statements) {
|
||||
};
|
||||
pp$8.isDirectiveCandidate = function(statement) {
|
||||
return (
|
||||
this.options.ecmaVersion >= 5 &&
|
||||
statement.type === "ExpressionStatement" &&
|
||||
statement.expression.type === "Literal" &&
|
||||
typeof statement.expression.value === "string" &&
|
||||
@@ -2268,7 +2275,8 @@ pp$6.updateContext = function(prevType) {
|
||||
{ this.exprAllowed = type.beforeExpr; }
|
||||
};
|
||||
|
||||
// Used to handle egde case when token context could not be inferred correctly in tokenize phase
|
||||
// Used to handle egde cases when token context could not be inferred correctly during tokenization phase
|
||||
|
||||
pp$6.overrideContext = function(tokenCtx) {
|
||||
if (this.curContext() !== tokenCtx) {
|
||||
this.context[this.context.length - 1] = tokenCtx;
|
||||
@@ -3084,15 +3092,6 @@ pp$5.parseProperty = function(isPattern, refDestructuringErrors) {
|
||||
}
|
||||
return this.finishNode(prop, "RestElement")
|
||||
}
|
||||
// To disallow parenthesized identifier via `this.toAssignable()`.
|
||||
if (this.type === types$1.parenL && refDestructuringErrors) {
|
||||
if (refDestructuringErrors.parenthesizedAssign < 0) {
|
||||
refDestructuringErrors.parenthesizedAssign = this.start;
|
||||
}
|
||||
if (refDestructuringErrors.parenthesizedBind < 0) {
|
||||
refDestructuringErrors.parenthesizedBind = this.start;
|
||||
}
|
||||
}
|
||||
// Parse argument.
|
||||
prop.argument = this.parseMaybeAssign(false, refDestructuringErrors);
|
||||
// To disallow trailing comma via `this.toAssignable()`.
|
||||
@@ -3762,12 +3761,6 @@ RegExpValidationState.prototype.eat = function eat (ch, forceU) {
|
||||
return false
|
||||
};
|
||||
|
||||
function codePointToString$1(ch) {
|
||||
if (ch <= 0xFFFF) { return String.fromCharCode(ch) }
|
||||
ch -= 0x10000;
|
||||
return String.fromCharCode((ch >> 10) + 0xD800, (ch & 0x03FF) + 0xDC00)
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate the flags part of a given RegExpLiteral.
|
||||
*
|
||||
@@ -4132,9 +4125,9 @@ pp$1.regexp_eatGroupName = function(state) {
|
||||
pp$1.regexp_eatRegExpIdentifierName = function(state) {
|
||||
state.lastStringValue = "";
|
||||
if (this.regexp_eatRegExpIdentifierStart(state)) {
|
||||
state.lastStringValue += codePointToString$1(state.lastIntValue);
|
||||
state.lastStringValue += codePointToString(state.lastIntValue);
|
||||
while (this.regexp_eatRegExpIdentifierPart(state)) {
|
||||
state.lastStringValue += codePointToString$1(state.lastIntValue);
|
||||
state.lastStringValue += codePointToString(state.lastIntValue);
|
||||
}
|
||||
return true
|
||||
}
|
||||
@@ -4486,7 +4479,7 @@ pp$1.regexp_eatUnicodePropertyName = function(state) {
|
||||
var ch = 0;
|
||||
state.lastStringValue = "";
|
||||
while (isUnicodePropertyNameCharacter(ch = state.current())) {
|
||||
state.lastStringValue += codePointToString$1(ch);
|
||||
state.lastStringValue += codePointToString(ch);
|
||||
state.advance();
|
||||
}
|
||||
return state.lastStringValue !== ""
|
||||
@@ -4501,7 +4494,7 @@ pp$1.regexp_eatUnicodePropertyValue = function(state) {
|
||||
var ch = 0;
|
||||
state.lastStringValue = "";
|
||||
while (isUnicodePropertyValueCharacter(ch = state.current())) {
|
||||
state.lastStringValue += codePointToString$1(ch);
|
||||
state.lastStringValue += codePointToString(ch);
|
||||
state.advance();
|
||||
}
|
||||
return state.lastStringValue !== ""
|
||||
@@ -5284,13 +5277,6 @@ pp.readCodePoint = function() {
|
||||
return code
|
||||
};
|
||||
|
||||
function codePointToString(code) {
|
||||
// UTF-16 Decoding
|
||||
if (code <= 0xFFFF) { return String.fromCharCode(code) }
|
||||
code -= 0x10000;
|
||||
return String.fromCharCode((code >> 10) + 0xD800, (code & 1023) + 0xDC00)
|
||||
}
|
||||
|
||||
pp.readString = function(quote) {
|
||||
var out = "", chunkStart = ++this.pos;
|
||||
for (;;) {
|
||||
@@ -5535,7 +5521,7 @@ pp.readWord = function() {
|
||||
|
||||
// Acorn is a tiny, fast JavaScript parser written in JavaScript.
|
||||
|
||||
var version = "8.7.0";
|
||||
var version = "8.8.0";
|
||||
|
||||
Parser.acorn = {
|
||||
Parser: Parser,
|
||||
|
||||
2
node_modules/ava/node_modules/acorn/package.json
generated
vendored
2
node_modules/ava/node_modules/acorn/package.json
generated
vendored
@@ -16,7 +16,7 @@
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"version": "8.7.0",
|
||||
"version": "8.8.0",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
|
||||
2
node_modules/ava/node_modules/aggregate-error/index.js
generated
vendored
2
node_modules/ava/node_modules/aggregate-error/index.js
generated
vendored
@@ -29,7 +29,7 @@ export default class AggregateError extends Error {
|
||||
let message = errors
|
||||
.map(error => {
|
||||
// The `stack` property is not standardized, so we can't assume it exists
|
||||
return typeof error.stack === 'string' ? cleanInternalStack(cleanStack(error.stack)) : String(error);
|
||||
return typeof error.stack === 'string' && error.stack.length > 0 ? cleanInternalStack(cleanStack(error.stack)) : String(error);
|
||||
})
|
||||
.join('\n');
|
||||
message = '\n' + indentString(message, 4);
|
||||
|
||||
2
node_modules/ava/node_modules/aggregate-error/package.json
generated
vendored
2
node_modules/ava/node_modules/aggregate-error/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aggregate-error",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Create an error from multiple errors",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/aggregate-error",
|
||||
|
||||
25
node_modules/ava/node_modules/array-union/index.d.ts
generated
vendored
25
node_modules/ava/node_modules/array-union/index.d.ts
generated
vendored
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
Create an array of unique values, in order, from the input arrays.
|
||||
|
||||
@example
|
||||
```
|
||||
import arrayUnion = require('array-union');
|
||||
|
||||
arrayUnion([1, 1, 2, 3], [2, 3]);
|
||||
//=> [1, 2, 3]
|
||||
|
||||
arrayUnion(['foo', 'foo', 'bar']);
|
||||
//=> ['foo', 'bar']
|
||||
|
||||
arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
||||
//=> ['🐱', '🦄', '🐻', '🌈']
|
||||
|
||||
arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
||||
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
||||
```
|
||||
*/
|
||||
declare function arrayUnion<ArgumentsType extends readonly unknown[]>(
|
||||
...arguments: readonly ArgumentsType[]
|
||||
): ArgumentsType;
|
||||
|
||||
export = arrayUnion;
|
||||
3
node_modules/ava/node_modules/array-union/index.js
generated
vendored
3
node_modules/ava/node_modules/array-union/index.js
generated
vendored
@@ -1,3 +0,0 @@
|
||||
const arrayUnion = (...arguments_) => [...new Set(arguments_.flat())];
|
||||
|
||||
export default arrayUnion;
|
||||
39
node_modules/ava/node_modules/array-union/readme.md
generated
vendored
39
node_modules/ava/node_modules/array-union/readme.md
generated
vendored
@@ -1,39 +0,0 @@
|
||||
# array-union
|
||||
|
||||
> Create an array of unique values, in order, from the input arrays
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install array-union
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import arrayUnion from 'array-union';
|
||||
|
||||
arrayUnion([1, 1, 2, 3], [2, 3]);
|
||||
//=> [1, 2, 3]
|
||||
|
||||
arrayUnion(['foo', 'foo', 'bar']);
|
||||
//=> ['foo', 'bar']
|
||||
|
||||
arrayUnion(['🐱', '🦄', '🐻'], ['🦄', '🌈']);
|
||||
//=> ['🐱', '🦄', '🐻', '🌈']
|
||||
|
||||
arrayUnion(['🐱', '🦄'], ['🐻', '🦄'], ['🐶', '🌈', '🌈']);
|
||||
//=> ['🐱', '🦄', '🐻', '🐶', '🌈']
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<b>
|
||||
<a href="https://tidelift.com/subscription/pkg/npm-array-union?utm_source=npm-array-union&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
|
||||
</b>
|
||||
<br>
|
||||
<sub>
|
||||
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
|
||||
</sub>
|
||||
</div>
|
||||
3
node_modules/ava/node_modules/chalk/package.json
generated
vendored
3
node_modules/ava/node_modules/chalk/package.json
generated
vendored
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "chalk",
|
||||
"version": "5.0.0",
|
||||
"version": "5.0.1",
|
||||
"description": "Terminal string styling done right",
|
||||
"license": "MIT",
|
||||
"repository": "chalk/chalk",
|
||||
"funding": "https://github.com/chalk/chalk?sponsor=1",
|
||||
"type": "module",
|
||||
"main": "./source/index.js",
|
||||
"exports": "./source/index.js",
|
||||
"imports": {
|
||||
"#ansi-styles": "./source/vendor/ansi-styles/index.js",
|
||||
|
||||
4
node_modules/ava/node_modules/clean-stack/index.js
generated
vendored
4
node_modules/ava/node_modules/clean-stack/index.js
generated
vendored
@@ -25,7 +25,9 @@ export default function cleanStack(stack, {pretty = false, basePath} = {}) {
|
||||
// Electron
|
||||
if (
|
||||
match.includes('.app/Contents/Resources/electron.asar') ||
|
||||
match.includes('.app/Contents/Resources/default_app.asar')
|
||||
match.includes('.app/Contents/Resources/default_app.asar') ||
|
||||
match.includes('node_modules/electron/dist/resources/electron.asar') ||
|
||||
match.includes('node_modules/electron/dist/resources/default_app.asar')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
2
node_modules/ava/node_modules/clean-stack/package.json
generated
vendored
2
node_modules/ava/node_modules/clean-stack/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "clean-stack",
|
||||
"version": "4.1.0",
|
||||
"version": "4.2.0",
|
||||
"description": "Clean up error stack traces",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/clean-stack",
|
||||
|
||||
108
node_modules/ava/node_modules/globby/gitignore.js
generated
vendored
108
node_modules/ava/node_modules/globby/gitignore.js
generated
vendored
@@ -1,108 +0,0 @@
|
||||
import process from 'node:process';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import fastGlob from 'fast-glob';
|
||||
import gitIgnore from 'ignore';
|
||||
import slash from 'slash';
|
||||
import toPath from './to-path.js';
|
||||
|
||||
const DEFAULT_IGNORE = [
|
||||
'**/node_modules/**',
|
||||
'**/flow-typed/**',
|
||||
'**/coverage/**',
|
||||
'**/.git',
|
||||
];
|
||||
|
||||
const mapGitIgnorePatternTo = base => ignore => {
|
||||
if (ignore.startsWith('!')) {
|
||||
return '!' + path.posix.join(base, ignore.slice(1));
|
||||
}
|
||||
|
||||
return path.posix.join(base, ignore);
|
||||
};
|
||||
|
||||
const parseGitIgnore = (content, options) => {
|
||||
const base = slash(path.relative(options.cwd, path.dirname(options.fileName)));
|
||||
|
||||
return content
|
||||
.split(/\r?\n/)
|
||||
.filter(Boolean)
|
||||
.filter(line => !line.startsWith('#'))
|
||||
.map(mapGitIgnorePatternTo(base));
|
||||
};
|
||||
|
||||
const reduceIgnore = files => {
|
||||
const ignores = gitIgnore();
|
||||
for (const file of files) {
|
||||
ignores.add(parseGitIgnore(file.content, {
|
||||
cwd: file.cwd,
|
||||
fileName: file.filePath,
|
||||
}));
|
||||
}
|
||||
|
||||
return ignores;
|
||||
};
|
||||
|
||||
const ensureAbsolutePathForCwd = (cwd, p) => {
|
||||
cwd = slash(cwd);
|
||||
if (path.isAbsolute(p)) {
|
||||
if (slash(p).startsWith(cwd)) {
|
||||
return p;
|
||||
}
|
||||
|
||||
throw new Error(`Path ${p} is not in cwd ${cwd}`);
|
||||
}
|
||||
|
||||
return path.join(cwd, p);
|
||||
};
|
||||
|
||||
const getIsIgnoredPredicate = (ignores, cwd) => p => ignores.ignores(slash(path.relative(cwd, ensureAbsolutePathForCwd(cwd, toPath(p.path || p)))));
|
||||
|
||||
const getFile = async (file, cwd) => {
|
||||
const filePath = path.join(cwd, file);
|
||||
const content = await fs.promises.readFile(filePath, 'utf8');
|
||||
|
||||
return {
|
||||
cwd,
|
||||
filePath,
|
||||
content,
|
||||
};
|
||||
};
|
||||
|
||||
const getFileSync = (file, cwd) => {
|
||||
const filePath = path.join(cwd, file);
|
||||
const content = fs.readFileSync(filePath, 'utf8');
|
||||
|
||||
return {
|
||||
cwd,
|
||||
filePath,
|
||||
content,
|
||||
};
|
||||
};
|
||||
|
||||
const normalizeOptions = ({
|
||||
ignore = [],
|
||||
cwd = slash(process.cwd()),
|
||||
} = {}) => ({ignore: [...DEFAULT_IGNORE, ...ignore], cwd: toPath(cwd)});
|
||||
|
||||
export const isGitIgnored = async options => {
|
||||
options = normalizeOptions(options);
|
||||
|
||||
const paths = await fastGlob('**/.gitignore', options);
|
||||
|
||||
const files = await Promise.all(paths.map(file => getFile(file, options.cwd)));
|
||||
const ignores = reduceIgnore(files);
|
||||
|
||||
return getIsIgnoredPredicate(ignores, options.cwd);
|
||||
};
|
||||
|
||||
export const isGitIgnoredSync = options => {
|
||||
options = normalizeOptions(options);
|
||||
|
||||
const paths = fastGlob.sync('**/.gitignore', options);
|
||||
|
||||
const files = paths.map(file => getFileSync(file, options.cwd));
|
||||
const ignores = reduceIgnore(files);
|
||||
|
||||
return getIsIgnoredPredicate(ignores, options.cwd);
|
||||
};
|
||||
92
node_modules/ava/node_modules/globby/ignore.js
generated
vendored
Normal file
92
node_modules/ava/node_modules/globby/ignore.js
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
||||
import process from 'node:process';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import fastGlob from 'fast-glob';
|
||||
import gitIgnore from 'ignore';
|
||||
import slash from 'slash';
|
||||
import {toPath, isNegativePattern} from './utilities.js';
|
||||
|
||||
const ignoreFilesGlobOptions = {
|
||||
ignore: [
|
||||
'**/node_modules',
|
||||
'**/flow-typed',
|
||||
'**/coverage',
|
||||
'**/.git',
|
||||
],
|
||||
absolute: true,
|
||||
dot: true,
|
||||
};
|
||||
|
||||
export const GITIGNORE_FILES_PATTERN = '**/.gitignore';
|
||||
|
||||
const applyBaseToPattern = (pattern, base) => isNegativePattern(pattern)
|
||||
? '!' + path.posix.join(base, pattern.slice(1))
|
||||
: path.posix.join(base, pattern);
|
||||
|
||||
const parseIgnoreFile = (file, cwd) => {
|
||||
const base = slash(path.relative(cwd, path.dirname(file.filePath)));
|
||||
|
||||
return file.content
|
||||
.split(/\r?\n/)
|
||||
.filter(line => line && !line.startsWith('#'))
|
||||
.map(pattern => applyBaseToPattern(pattern, base));
|
||||
};
|
||||
|
||||
const toRelativePath = (fileOrDirectory, cwd) => {
|
||||
cwd = slash(cwd);
|
||||
if (path.isAbsolute(fileOrDirectory)) {
|
||||
if (slash(fileOrDirectory).startsWith(cwd)) {
|
||||
return path.relative(cwd, fileOrDirectory);
|
||||
}
|
||||
|
||||
throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`);
|
||||
}
|
||||
|
||||
return fileOrDirectory;
|
||||
};
|
||||
|
||||
const getIsIgnoredPredicate = (files, cwd) => {
|
||||
const patterns = files.flatMap(file => parseIgnoreFile(file, cwd));
|
||||
const ignores = gitIgnore().add(patterns);
|
||||
|
||||
return fileOrDirectory => {
|
||||
fileOrDirectory = toPath(fileOrDirectory);
|
||||
fileOrDirectory = toRelativePath(fileOrDirectory, cwd);
|
||||
return ignores.ignores(slash(fileOrDirectory));
|
||||
};
|
||||
};
|
||||
|
||||
const normalizeOptions = (options = {}) => ({
|
||||
cwd: toPath(options.cwd) || process.cwd(),
|
||||
});
|
||||
|
||||
export const isIgnoredByIgnoreFiles = async (patterns, options) => {
|
||||
const {cwd} = normalizeOptions(options);
|
||||
|
||||
const paths = await fastGlob(patterns, {cwd, ...ignoreFilesGlobOptions});
|
||||
|
||||
const files = await Promise.all(
|
||||
paths.map(async filePath => ({
|
||||
filePath,
|
||||
content: await fs.promises.readFile(filePath, 'utf8'),
|
||||
})),
|
||||
);
|
||||
|
||||
return getIsIgnoredPredicate(files, cwd);
|
||||
};
|
||||
|
||||
export const isIgnoredByIgnoreFilesSync = (patterns, options) => {
|
||||
const {cwd} = normalizeOptions(options);
|
||||
|
||||
const paths = fastGlob.sync(patterns, {cwd, ...ignoreFilesGlobOptions});
|
||||
|
||||
const files = paths.map(filePath => ({
|
||||
filePath,
|
||||
content: fs.readFileSync(filePath, 'utf8'),
|
||||
}));
|
||||
|
||||
return getIsIgnoredPredicate(files, cwd);
|
||||
};
|
||||
|
||||
export const isGitIgnored = options => isIgnoredByIgnoreFiles(GITIGNORE_FILES_PATTERN, options);
|
||||
export const isGitIgnoredSync = options => isIgnoredByIgnoreFilesSync(GITIGNORE_FILES_PATTERN, options);
|
||||
22
node_modules/ava/node_modules/globby/index.d.ts
generated
vendored
22
node_modules/ava/node_modules/globby/index.d.ts
generated
vendored
@@ -4,7 +4,7 @@ import {Options as FastGlobOptions, Entry} from 'fast-glob';
|
||||
export type GlobEntry = Entry;
|
||||
|
||||
export interface GlobTask {
|
||||
readonly pattern: string;
|
||||
readonly patterns: string[];
|
||||
readonly options: Options;
|
||||
}
|
||||
|
||||
@@ -47,6 +47,15 @@ export interface Options extends FastGlobOptionsWithoutCwd {
|
||||
*/
|
||||
readonly gitignore?: boolean;
|
||||
|
||||
/**
|
||||
Glob patterns to look for ignore files, which are then used to ignore globbed files.
|
||||
|
||||
This is a more generic form of the `gitignore` option, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.
|
||||
|
||||
@default undefined
|
||||
*/
|
||||
readonly ignoreFiles?: string | readonly string[];
|
||||
|
||||
/**
|
||||
The current working directory in which to search.
|
||||
|
||||
@@ -57,7 +66,6 @@ export interface Options extends FastGlobOptionsWithoutCwd {
|
||||
|
||||
export interface GitignoreOptions {
|
||||
readonly cwd?: URL | string;
|
||||
readonly ignore?: readonly string[];
|
||||
}
|
||||
|
||||
export type GlobbyFilterFunction = (path: URL | string) => boolean;
|
||||
@@ -141,6 +149,16 @@ Note that you should avoid running the same tasks multiple times as they contain
|
||||
export function generateGlobTasks(
|
||||
patterns: string | readonly string[],
|
||||
options?: Options
|
||||
): Promise<GlobTask[]>;
|
||||
|
||||
/**
|
||||
@see generateGlobTasks
|
||||
|
||||
@returns An object in the format `{pattern: string, options: object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
|
||||
*/
|
||||
export function generateGlobTasksSync(
|
||||
patterns: string | readonly string[],
|
||||
options?: Options
|
||||
): GlobTask[];
|
||||
|
||||
/**
|
||||
|
||||
348
node_modules/ava/node_modules/globby/index.js
generated
vendored
348
node_modules/ava/node_modules/globby/index.js
generated
vendored
@@ -1,22 +1,27 @@
|
||||
import fs from 'node:fs';
|
||||
import arrayUnion from 'array-union';
|
||||
import nodePath from 'node:path';
|
||||
import merge2 from 'merge2';
|
||||
import fastGlob from 'fast-glob';
|
||||
import dirGlob from 'dir-glob';
|
||||
import toPath from './to-path.js';
|
||||
import {isGitIgnored, isGitIgnoredSync} from './gitignore.js';
|
||||
import {FilterStream, UniqueStream} from './stream-utils.js';
|
||||
|
||||
const DEFAULT_FILTER = () => false;
|
||||
|
||||
const isNegative = pattern => pattern[0] === '!';
|
||||
import {
|
||||
GITIGNORE_FILES_PATTERN,
|
||||
isIgnoredByIgnoreFiles,
|
||||
isIgnoredByIgnoreFilesSync,
|
||||
} from './ignore.js';
|
||||
import {FilterStream, toPath, isNegativePattern} from './utilities.js';
|
||||
|
||||
const assertPatternsInput = patterns => {
|
||||
if (!patterns.every(pattern => typeof pattern === 'string')) {
|
||||
if (patterns.some(pattern => typeof pattern !== 'string')) {
|
||||
throw new TypeError('Patterns must be a string or an array of strings');
|
||||
}
|
||||
};
|
||||
|
||||
const toPatternsArray = patterns => {
|
||||
patterns = [...new Set([patterns].flat())];
|
||||
assertPatternsInput(patterns);
|
||||
return patterns;
|
||||
};
|
||||
|
||||
const checkCwdOption = options => {
|
||||
if (!options.cwd) {
|
||||
return;
|
||||
@@ -34,164 +39,189 @@ const checkCwdOption = options => {
|
||||
}
|
||||
};
|
||||
|
||||
const getPathString = p => p.stats instanceof fs.Stats ? p.path : p;
|
||||
|
||||
export const generateGlobTasks = (patterns, taskOptions = {}) => {
|
||||
patterns = arrayUnion([patterns].flat());
|
||||
assertPatternsInput(patterns);
|
||||
|
||||
const globTasks = [];
|
||||
|
||||
taskOptions = {
|
||||
const normalizeOptions = (options = {}) => {
|
||||
options = {
|
||||
ignore: [],
|
||||
expandDirectories: true,
|
||||
...taskOptions,
|
||||
cwd: toPath(taskOptions.cwd),
|
||||
};
|
||||
|
||||
checkCwdOption(taskOptions);
|
||||
|
||||
for (const [index, pattern] of patterns.entries()) {
|
||||
if (isNegative(pattern)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const ignore = patterns
|
||||
.slice(index)
|
||||
.filter(pattern => isNegative(pattern))
|
||||
.map(pattern => pattern.slice(1));
|
||||
|
||||
const options = {
|
||||
...taskOptions,
|
||||
ignore: [...taskOptions.ignore, ...ignore],
|
||||
};
|
||||
|
||||
globTasks.push({pattern, options});
|
||||
}
|
||||
|
||||
return globTasks;
|
||||
};
|
||||
|
||||
const globDirectories = (task, fn) => {
|
||||
let options = {};
|
||||
if (task.options.cwd) {
|
||||
options.cwd = task.options.cwd;
|
||||
}
|
||||
|
||||
if (Array.isArray(task.options.expandDirectories)) {
|
||||
options = {
|
||||
...options,
|
||||
files: task.options.expandDirectories,
|
||||
};
|
||||
} else if (typeof task.options.expandDirectories === 'object') {
|
||||
options = {
|
||||
...options,
|
||||
...task.options.expandDirectories,
|
||||
};
|
||||
}
|
||||
|
||||
return fn(task.pattern, options);
|
||||
};
|
||||
|
||||
const getPattern = (task, fn) => task.options.expandDirectories ? globDirectories(task, fn) : [task.pattern];
|
||||
|
||||
const getFilterSync = options => options && options.gitignore
|
||||
? isGitIgnoredSync({cwd: options.cwd, ignore: options.ignore})
|
||||
: DEFAULT_FILTER;
|
||||
|
||||
const globToTask = task => async glob => {
|
||||
const {options} = task;
|
||||
if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) {
|
||||
options.ignore = await dirGlob(options.ignore);
|
||||
}
|
||||
|
||||
return {
|
||||
pattern: glob,
|
||||
options,
|
||||
};
|
||||
};
|
||||
|
||||
const globToTaskSync = task => glob => {
|
||||
const {options} = task;
|
||||
if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) {
|
||||
options.ignore = dirGlob.sync(options.ignore);
|
||||
}
|
||||
|
||||
return {
|
||||
pattern: glob,
|
||||
options,
|
||||
};
|
||||
};
|
||||
|
||||
export const globby = async (patterns, options) => {
|
||||
const globTasks = generateGlobTasks(patterns, options);
|
||||
|
||||
const getFilter = async () => options && options.gitignore
|
||||
? isGitIgnored({cwd: options.cwd, ignore: options.ignore})
|
||||
: DEFAULT_FILTER;
|
||||
|
||||
const getTasks = async () => {
|
||||
const tasks = await Promise.all(globTasks.map(async task => {
|
||||
const globs = await getPattern(task, dirGlob);
|
||||
return Promise.all(globs.map(globToTask(task)));
|
||||
}));
|
||||
|
||||
return arrayUnion(...tasks);
|
||||
};
|
||||
|
||||
const [filter, tasks] = await Promise.all([getFilter(), getTasks()]);
|
||||
const paths = await Promise.all(tasks.map(task => fastGlob(task.pattern, task.options)));
|
||||
|
||||
return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
|
||||
};
|
||||
|
||||
export const globbySync = (patterns, options) => {
|
||||
const globTasks = generateGlobTasks(patterns, options);
|
||||
|
||||
const tasks = [];
|
||||
for (const task of globTasks) {
|
||||
const newTask = getPattern(task, dirGlob.sync).map(globToTaskSync(task));
|
||||
tasks.push(...newTask);
|
||||
}
|
||||
|
||||
const filter = getFilterSync(options);
|
||||
|
||||
let matches = [];
|
||||
for (const task of tasks) {
|
||||
matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options));
|
||||
}
|
||||
|
||||
return matches.filter(path_ => !filter(path_));
|
||||
};
|
||||
|
||||
export const globbyStream = (patterns, options) => {
|
||||
const globTasks = generateGlobTasks(patterns, options);
|
||||
|
||||
const tasks = [];
|
||||
for (const task of globTasks) {
|
||||
const newTask = getPattern(task, dirGlob.sync).map(globToTaskSync(task));
|
||||
tasks.push(...newTask);
|
||||
}
|
||||
|
||||
const filter = getFilterSync(options);
|
||||
const filterStream = new FilterStream(p => !filter(p));
|
||||
const uniqueStream = new UniqueStream();
|
||||
|
||||
return merge2(tasks.map(task => fastGlob.stream(task.pattern, task.options)))
|
||||
.pipe(filterStream)
|
||||
.pipe(uniqueStream);
|
||||
};
|
||||
|
||||
export const isDynamicPattern = (patterns, options = {}) => {
|
||||
options = {
|
||||
...options,
|
||||
cwd: toPath(options.cwd),
|
||||
};
|
||||
|
||||
return [patterns].flat().some(pattern => fastGlob.isDynamicPattern(pattern, options));
|
||||
checkCwdOption(options);
|
||||
|
||||
return options;
|
||||
};
|
||||
|
||||
const normalizeArguments = fn => async (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));
|
||||
const normalizeArgumentsSync = fn => (patterns, options) => fn(toPatternsArray(patterns), normalizeOptions(options));
|
||||
|
||||
const getIgnoreFilesPatterns = options => {
|
||||
const {ignoreFiles, gitignore} = options;
|
||||
|
||||
const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : [];
|
||||
if (gitignore) {
|
||||
patterns.push(GITIGNORE_FILES_PATTERN);
|
||||
}
|
||||
|
||||
return patterns;
|
||||
};
|
||||
|
||||
const getFilter = async options => {
|
||||
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
||||
return createFilterFunction(
|
||||
ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, {cwd: options.cwd}),
|
||||
);
|
||||
};
|
||||
|
||||
const getFilterSync = options => {
|
||||
const ignoreFilesPatterns = getIgnoreFilesPatterns(options);
|
||||
return createFilterFunction(
|
||||
ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, {cwd: options.cwd}),
|
||||
);
|
||||
};
|
||||
|
||||
const createFilterFunction = isIgnored => {
|
||||
const seen = new Set();
|
||||
|
||||
return fastGlobResult => {
|
||||
const path = fastGlobResult.path || fastGlobResult;
|
||||
const pathKey = nodePath.normalize(path);
|
||||
const seenOrIgnored = seen.has(pathKey) || (isIgnored && isIgnored(path));
|
||||
seen.add(pathKey);
|
||||
return !seenOrIgnored;
|
||||
};
|
||||
};
|
||||
|
||||
const unionFastGlobResults = (results, filter) => results.flat().filter(fastGlobResult => filter(fastGlobResult));
|
||||
const unionFastGlobStreams = (streams, filter) => merge2(streams).pipe(new FilterStream(fastGlobResult => filter(fastGlobResult)));
|
||||
|
||||
const convertNegativePatterns = (patterns, options) => {
|
||||
const tasks = [];
|
||||
|
||||
while (patterns.length > 0) {
|
||||
const index = patterns.findIndex(pattern => isNegativePattern(pattern));
|
||||
|
||||
if (index === -1) {
|
||||
tasks.push({patterns, options});
|
||||
break;
|
||||
}
|
||||
|
||||
const ignorePattern = patterns[index].slice(1);
|
||||
|
||||
for (const task of tasks) {
|
||||
task.options.ignore.push(ignorePattern);
|
||||
}
|
||||
|
||||
if (index !== 0) {
|
||||
tasks.push({
|
||||
patterns: patterns.slice(0, index),
|
||||
options: {
|
||||
...options,
|
||||
ignore: [
|
||||
...options.ignore,
|
||||
ignorePattern,
|
||||
],
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
patterns = patterns.slice(index + 1);
|
||||
}
|
||||
|
||||
return tasks;
|
||||
};
|
||||
|
||||
const getDirGlobOptions = (options, cwd) => ({
|
||||
...(cwd ? {cwd} : {}),
|
||||
...(Array.isArray(options) ? {files: options} : options),
|
||||
});
|
||||
|
||||
const generateTasks = async (patterns, options) => {
|
||||
const globTasks = convertNegativePatterns(patterns, options);
|
||||
|
||||
const {cwd, expandDirectories} = options;
|
||||
|
||||
if (!expandDirectories) {
|
||||
return globTasks;
|
||||
}
|
||||
|
||||
const patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);
|
||||
const ignoreExpandOptions = cwd ? {cwd} : undefined;
|
||||
|
||||
return Promise.all(
|
||||
globTasks.map(async task => {
|
||||
let {patterns, options} = task;
|
||||
|
||||
[
|
||||
patterns,
|
||||
options.ignore,
|
||||
] = await Promise.all([
|
||||
dirGlob(patterns, patternExpandOptions),
|
||||
dirGlob(options.ignore, ignoreExpandOptions),
|
||||
]);
|
||||
|
||||
return {patterns, options};
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
const generateTasksSync = (patterns, options) => {
|
||||
const globTasks = convertNegativePatterns(patterns, options);
|
||||
|
||||
const {cwd, expandDirectories} = options;
|
||||
|
||||
if (!expandDirectories) {
|
||||
return globTasks;
|
||||
}
|
||||
|
||||
const patternExpandOptions = getDirGlobOptions(expandDirectories, cwd);
|
||||
const ignoreExpandOptions = cwd ? {cwd} : undefined;
|
||||
|
||||
return globTasks.map(task => {
|
||||
let {patterns, options} = task;
|
||||
patterns = dirGlob.sync(patterns, patternExpandOptions);
|
||||
options.ignore = dirGlob.sync(options.ignore, ignoreExpandOptions);
|
||||
return {patterns, options};
|
||||
});
|
||||
};
|
||||
|
||||
export const globby = normalizeArguments(async (patterns, options) => {
|
||||
const [
|
||||
tasks,
|
||||
filter,
|
||||
] = await Promise.all([
|
||||
generateTasks(patterns, options),
|
||||
getFilter(options),
|
||||
]);
|
||||
const results = await Promise.all(tasks.map(task => fastGlob(task.patterns, task.options)));
|
||||
|
||||
return unionFastGlobResults(results, filter);
|
||||
});
|
||||
|
||||
export const globbySync = normalizeArgumentsSync((patterns, options) => {
|
||||
const tasks = generateTasksSync(patterns, options);
|
||||
const filter = getFilterSync(options);
|
||||
const results = tasks.map(task => fastGlob.sync(task.patterns, task.options));
|
||||
|
||||
return unionFastGlobResults(results, filter);
|
||||
});
|
||||
|
||||
export const globbyStream = normalizeArgumentsSync((patterns, options) => {
|
||||
const tasks = generateTasksSync(patterns, options);
|
||||
const filter = getFilterSync(options);
|
||||
const streams = tasks.map(task => fastGlob.stream(task.patterns, task.options));
|
||||
|
||||
return unionFastGlobStreams(streams, filter);
|
||||
});
|
||||
|
||||
export const isDynamicPattern = normalizeArgumentsSync(
|
||||
(patterns, options) => patterns.some(pattern => fastGlob.isDynamicPattern(pattern, options)),
|
||||
);
|
||||
|
||||
export const generateGlobTasks = normalizeArguments(generateTasks);
|
||||
export const generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
|
||||
|
||||
export {
|
||||
isGitIgnored,
|
||||
isGitIgnoredSync,
|
||||
} from './gitignore.js';
|
||||
} from './ignore.js';
|
||||
|
||||
32
node_modules/ava/node_modules/globby/package.json
generated
vendored
32
node_modules/ava/node_modules/globby/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "globby",
|
||||
"version": "12.2.0",
|
||||
"version": "13.1.2",
|
||||
"description": "User-friendly glob matching",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/globby",
|
||||
@@ -16,15 +16,14 @@
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"bench": "npm update glob-stream fast-glob && matcha bench.js",
|
||||
"bench": "npm update @globby/main-branch glob-stream fast-glob && node bench.js",
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"gitignore.js",
|
||||
"stream-utils.js",
|
||||
"to-path.js"
|
||||
"ignore.js",
|
||||
"utilities.js"
|
||||
],
|
||||
"keywords": [
|
||||
"all",
|
||||
@@ -60,28 +59,33 @@
|
||||
"git"
|
||||
],
|
||||
"dependencies": {
|
||||
"array-union": "^3.0.1",
|
||||
"dir-glob": "^3.0.1",
|
||||
"fast-glob": "^3.2.7",
|
||||
"ignore": "^5.1.9",
|
||||
"fast-glob": "^3.2.11",
|
||||
"ignore": "^5.2.0",
|
||||
"merge2": "^1.4.1",
|
||||
"slash": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.11",
|
||||
"ava": "^3.15.0",
|
||||
"@globby/main-branch": "sindresorhus/globby#main",
|
||||
"@types/node": "^17.0.10",
|
||||
"ava": "^4.0.1",
|
||||
"benchmark": "2.1.4",
|
||||
"get-stream": "^6.0.1",
|
||||
"glob-stream": "^7.0.0",
|
||||
"globby": "sindresorhus/globby#main",
|
||||
"matcha": "^0.7.0",
|
||||
"rimraf": "^3.0.2",
|
||||
"tsd": "^0.19.0",
|
||||
"typescript": "^4.5.2",
|
||||
"tsd": "^0.19.1",
|
||||
"typescript": "^4.5.5",
|
||||
"xo": "^0.47.0"
|
||||
},
|
||||
"xo": {
|
||||
"ignores": [
|
||||
"fixtures"
|
||||
]
|
||||
},
|
||||
"ava": {
|
||||
"files": [
|
||||
"!tests/utilities.js"
|
||||
],
|
||||
"workerThreads": false
|
||||
}
|
||||
}
|
||||
|
||||
23
node_modules/ava/node_modules/globby/readme.md
generated
vendored
23
node_modules/ava/node_modules/globby/readme.md
generated
vendored
@@ -10,7 +10,7 @@ Based on [`fast-glob`](https://github.com/mrmlnc/fast-glob) but adds a bunch of
|
||||
- Multiple patterns
|
||||
- Negated patterns: `['foo*', '!foobar']`
|
||||
- Expands directories: `foo` → `foo/**/*`
|
||||
- Supports `.gitignore`
|
||||
- Supports `.gitignore` and similar ignore config files
|
||||
- Supports `URL` as `cwd`
|
||||
|
||||
## Install
|
||||
@@ -88,6 +88,15 @@ Default: `false`
|
||||
|
||||
Respect ignore patterns in `.gitignore` files that apply to the globbed files.
|
||||
|
||||
##### ignoreFiles
|
||||
|
||||
Type: `string | string[]`\
|
||||
Default: `undefined`
|
||||
|
||||
Glob patterns to look for ignore files, which are then used to ignore globbed files.
|
||||
|
||||
This is a more generic form of the `gitignore` option, allowing you to find ignore files with a [compatible syntax](http://git-scm.com/docs/gitignore). For instance, this works with Babel's `.babelignore`, Prettier's `.prettierignore`, or ESLint's `.eslintignore` files.
|
||||
|
||||
### globbySync(patterns, options?)
|
||||
|
||||
Returns `string[]` of matching paths.
|
||||
@@ -110,10 +119,16 @@ import {globbyStream} from 'globby';
|
||||
|
||||
### generateGlobTasks(patterns, options?)
|
||||
|
||||
Returns an `object[]` in the format `{pattern: string, options: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
|
||||
Returns an `Promise<object[]>` in the format `{patterns: string[], options: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
|
||||
|
||||
Note that you should avoid running the same tasks multiple times as they contain a file system cache. Instead, run this method each time to ensure file system changes are taken into consideration.
|
||||
|
||||
### generateGlobTasksSync(patterns, options?)
|
||||
|
||||
Returns an `object[]` in the format `{patterns: string[], options: Object}`, which can be passed as arguments to [`fast-glob`](https://github.com/mrmlnc/fast-glob). This is useful for other globbing-related packages.
|
||||
|
||||
Takes the same arguments as `generateGlobTasks`.
|
||||
|
||||
### isDynamicPattern(patterns, options?)
|
||||
|
||||
Returns a `boolean` of whether there are any special glob characters in the `patterns`.
|
||||
@@ -126,7 +141,7 @@ This function is backed by [`fast-glob`](https://github.com/mrmlnc/fast-glob#isd
|
||||
|
||||
Returns a `Promise<(path: URL | string) => boolean>` indicating whether a given path is ignored via a `.gitignore` file.
|
||||
|
||||
Takes `cwd?: URL | string` and `ignore?: string[]` as options. `.gitignore` files matched by the ignore config are not used for the resulting filter function.
|
||||
Takes `cwd?: URL | string` as options.
|
||||
|
||||
```js
|
||||
import {isGitIgnored} from 'globby';
|
||||
@@ -140,7 +155,7 @@ console.log(isIgnored('some/file'));
|
||||
|
||||
Returns a `(path: URL | string) => boolean` indicating whether a given path is ignored via a `.gitignore` file.
|
||||
|
||||
Takes the same options as `isGitIgnored`.
|
||||
Takes `cwd?: URL | string` as options.
|
||||
|
||||
## Globbing patterns
|
||||
|
||||
|
||||
40
node_modules/ava/node_modules/globby/stream-utils.js
generated
vendored
40
node_modules/ava/node_modules/globby/stream-utils.js
generated
vendored
@@ -1,40 +0,0 @@
|
||||
import {Transform} from 'node:stream';
|
||||
|
||||
class ObjectTransform extends Transform {
|
||||
constructor() {
|
||||
super({
|
||||
objectMode: true,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export class FilterStream extends ObjectTransform {
|
||||
constructor(filter) {
|
||||
super();
|
||||
this._filter = filter;
|
||||
}
|
||||
|
||||
_transform(data, encoding, callback) {
|
||||
if (this._filter(data)) {
|
||||
this.push(data);
|
||||
}
|
||||
|
||||
callback();
|
||||
}
|
||||
}
|
||||
|
||||
export class UniqueStream extends ObjectTransform {
|
||||
constructor() {
|
||||
super();
|
||||
this._pushed = new Set();
|
||||
}
|
||||
|
||||
_transform(data, encoding, callback) {
|
||||
if (!this._pushed.has(data)) {
|
||||
this.push(data);
|
||||
this._pushed.add(data);
|
||||
}
|
||||
|
||||
callback();
|
||||
}
|
||||
}
|
||||
15
node_modules/ava/node_modules/globby/to-path.js
generated
vendored
15
node_modules/ava/node_modules/globby/to-path.js
generated
vendored
@@ -1,15 +0,0 @@
|
||||
import {fileURLToPath} from 'node:url';
|
||||
|
||||
const toPath = urlOrPath => {
|
||||
if (!urlOrPath) {
|
||||
return urlOrPath;
|
||||
}
|
||||
|
||||
if (urlOrPath instanceof URL) {
|
||||
urlOrPath = urlOrPath.href;
|
||||
}
|
||||
|
||||
return urlOrPath.startsWith('file://') ? fileURLToPath(urlOrPath) : urlOrPath;
|
||||
};
|
||||
|
||||
export default toPath;
|
||||
17
node_modules/ava/node_modules/globby/utilities.js
generated
vendored
Normal file
17
node_modules/ava/node_modules/globby/utilities.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import {fileURLToPath} from 'node:url';
|
||||
import {Transform} from 'node:stream';
|
||||
|
||||
export const toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
||||
|
||||
export class FilterStream extends Transform {
|
||||
constructor(filter) {
|
||||
super({
|
||||
objectMode: true,
|
||||
transform(data, encoding, callback) {
|
||||
callback(undefined, filter(data) ? data : undefined);
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export const isNegativePattern = pattern => pattern[0] === '!';
|
||||
28
node_modules/ava/node_modules/p-map/index.d.ts
generated
vendored
28
node_modules/ava/node_modules/p-map/index.d.ts
generated
vendored
@@ -18,8 +18,34 @@ export interface Options {
|
||||
@default true
|
||||
*/
|
||||
readonly stopOnError?: boolean;
|
||||
|
||||
/**
|
||||
You can abort the promises using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
||||
|
||||
**Requires Node.js 16 or later.*
|
||||
|
||||
@example
|
||||
```
|
||||
import pMap from 'p-map';
|
||||
import delay from 'delay';
|
||||
|
||||
const abortController = new AbortController();
|
||||
|
||||
setTimeout(() => {
|
||||
abortController.abort();
|
||||
}, 500);
|
||||
|
||||
const mapper = async value => value;
|
||||
|
||||
await pMap([delay(1000), delay(1000)], mapper, {signal: abortController.signal});
|
||||
// Throws AbortError (DOMException) after 500 ms.
|
||||
```
|
||||
*/
|
||||
readonly signal?: AbortSignal;
|
||||
}
|
||||
|
||||
type MaybePromise<T> = T | Promise<T>;
|
||||
|
||||
/**
|
||||
Function which is called for every item in `input`. Expected to return a `Promise` or value.
|
||||
|
||||
@@ -29,7 +55,7 @@ Function which is called for every item in `input`. Expected to return a `Promis
|
||||
export type Mapper<Element = any, NewElement = unknown> = (
|
||||
element: Element,
|
||||
index: number
|
||||
) => NewElement | Promise<NewElement>;
|
||||
) => MaybePromise<NewElement | typeof pMapSkip>;
|
||||
|
||||
/**
|
||||
@param input - Synchronous or asynchronous iterable that is iterated over concurrently, calling the `mapper` function for each element. Each iterated item is `await`'d before the `mapper` is invoked so the iterable may return a `Promise` that resolves to an item. Asynchronous iterables (different from synchronous iterables that return `Promise` that resolves to an item) can be used when the next item may not be ready without waiting for an asynchronous process to complete and/or the end of the iterable may be reached after the asynchronous process completes. For example, reading from a remote queue when the queue has reached empty, or reading lines from a stream.
|
||||
|
||||
49
node_modules/ava/node_modules/p-map/index.js
generated
vendored
49
node_modules/ava/node_modules/p-map/index.js
generated
vendored
@@ -1,14 +1,45 @@
|
||||
import AggregateError from 'aggregate-error';
|
||||
|
||||
/**
|
||||
An error to be thrown when the request is aborted by AbortController.
|
||||
DOMException is thrown instead of this Error when DOMException is available.
|
||||
*/
|
||||
export class AbortError extends Error {
|
||||
constructor(message) {
|
||||
super();
|
||||
this.name = 'AbortError';
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
TODO: Remove AbortError and just throw DOMException when targeting Node 18.
|
||||
*/
|
||||
const getDOMException = errorMessage => globalThis.DOMException === undefined
|
||||
? new AbortError(errorMessage)
|
||||
: new DOMException(errorMessage);
|
||||
|
||||
/**
|
||||
TODO: Remove below function and just 'reject(signal.reason)' when targeting Node 18.
|
||||
*/
|
||||
const getAbortedReason = signal => {
|
||||
const reason = signal.reason === undefined
|
||||
? getDOMException('This operation was aborted.')
|
||||
: signal.reason;
|
||||
|
||||
return reason instanceof Error ? reason : getDOMException(reason);
|
||||
};
|
||||
|
||||
export default async function pMap(
|
||||
iterable,
|
||||
mapper,
|
||||
{
|
||||
concurrency = Number.POSITIVE_INFINITY,
|
||||
stopOnError = true
|
||||
} = {}
|
||||
stopOnError = true,
|
||||
signal,
|
||||
} = {},
|
||||
) {
|
||||
return new Promise((resolve, reject_) => { // eslint-disable-line promise/param-names
|
||||
return new Promise((resolve, reject_) => {
|
||||
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
|
||||
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
|
||||
}
|
||||
@@ -37,6 +68,16 @@ export default async function pMap(
|
||||
reject_(reason);
|
||||
};
|
||||
|
||||
if (signal) {
|
||||
if (signal.aborted) {
|
||||
reject(getAbortedReason(signal));
|
||||
}
|
||||
|
||||
signal.addEventListener('abort', () => {
|
||||
reject(getAbortedReason(signal));
|
||||
});
|
||||
}
|
||||
|
||||
const next = async () => {
|
||||
if (isResolved) {
|
||||
return;
|
||||
@@ -64,7 +105,7 @@ export default async function pMap(
|
||||
|
||||
isResolved = true;
|
||||
|
||||
if (!skippedIndexesMap.size) {
|
||||
if (skippedIndexesMap.size === 0) {
|
||||
resolve(result);
|
||||
return;
|
||||
}
|
||||
|
||||
8
node_modules/ava/node_modules/p-map/package.json
generated
vendored
8
node_modules/ava/node_modules/p-map/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "p-map",
|
||||
"version": "5.3.0",
|
||||
"version": "5.5.0",
|
||||
"description": "Map over promises concurrently",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/p-map",
|
||||
@@ -44,12 +44,12 @@
|
||||
"aggregate-error": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"ava": "^4.1.0",
|
||||
"delay": "^5.0.0",
|
||||
"in-range": "^3.0.0",
|
||||
"random-int": "^3.0.0",
|
||||
"time-span": "^5.0.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
"tsd": "^0.19.1",
|
||||
"xo": "^0.48.0"
|
||||
}
|
||||
}
|
||||
|
||||
24
node_modules/ava/node_modules/p-map/readme.md
generated
vendored
24
node_modules/ava/node_modules/p-map/readme.md
generated
vendored
@@ -78,6 +78,30 @@ When `false`, instead of stopping when a promise rejects, it will wait for all t
|
||||
|
||||
Caveat: When `true`, any already-started async mappers will continue to run until they resolve or reject. In the case of infinite concurrency with sync iterables, *all* mappers are invoked on startup and will continue after the first rejection. [Issue #51](https://github.com/sindresorhus/p-map/issues/51) can be implemented for abort control.
|
||||
|
||||
##### signal
|
||||
|
||||
Type: [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)
|
||||
|
||||
You can abort the promises using [`AbortController`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController).
|
||||
|
||||
*Requires Node.js 16 or later.*
|
||||
|
||||
```js
|
||||
import pMap from 'p-map';
|
||||
import delay from 'delay';
|
||||
|
||||
const abortController = new AbortController();
|
||||
|
||||
setTimeout(() => {
|
||||
abortController.abort();
|
||||
}, 500);
|
||||
|
||||
const mapper = async value => value;
|
||||
|
||||
await pMap([delay(1000), delay(1000)], mapper, {signal: abortController.signal});
|
||||
// Throws AbortError (DOMException) after 500 ms.
|
||||
```
|
||||
|
||||
### pMapSkip
|
||||
|
||||
Return this value from a `mapper` function to skip including the value in the returned array.
|
||||
|
||||
80
node_modules/ava/package.json
generated
vendored
80
node_modules/ava/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ava",
|
||||
"version": "4.0.1",
|
||||
"version": "4.3.3",
|
||||
"description": "Node.js test runner that lets you develop with confidence.",
|
||||
"license": "MIT",
|
||||
"repository": "avajs/ava",
|
||||
@@ -10,18 +10,30 @@
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"import": "./entrypoints/main.mjs",
|
||||
"require": "./entrypoints/main.cjs"
|
||||
"import": {
|
||||
"types": "./index.d.ts",
|
||||
"default": "./entrypoints/main.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./entrypoints/index.d.cts",
|
||||
"default": "./entrypoints/main.cjs"
|
||||
}
|
||||
},
|
||||
"./eslint-plugin-helper": "./entrypoints/eslint-plugin-helper.cjs",
|
||||
"./plugin": {
|
||||
"import": "./entrypoints/plugin.mjs",
|
||||
"require": "./entrypoints/plugin.cjs"
|
||||
"import": {
|
||||
"types": "./plugin.d.ts",
|
||||
"default": "./entrypoints/plugin.mjs"
|
||||
},
|
||||
"require": {
|
||||
"types": "./entrypoints/plugin.d.cts",
|
||||
"default": "./entrypoints/plugin.cjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "module",
|
||||
"engines": {
|
||||
"node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=17"
|
||||
"node": ">=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=18"
|
||||
},
|
||||
"scripts": {
|
||||
"cover": "c8 --report=none test-ava && c8 --report=none --no-clean tap && c8 report",
|
||||
@@ -70,40 +82,40 @@
|
||||
"typescript"
|
||||
],
|
||||
"dependencies": {
|
||||
"acorn": "^8.7.0",
|
||||
"acorn": "^8.7.1",
|
||||
"acorn-walk": "^8.2.0",
|
||||
"ansi-styles": "^6.1.0",
|
||||
"arrgv": "^1.0.2",
|
||||
"arrify": "^3.0.0",
|
||||
"callsites": "^4.0.0",
|
||||
"cbor": "^8.1.0",
|
||||
"chalk": "^5.0.0",
|
||||
"chokidar": "^3.5.2",
|
||||
"chalk": "^5.0.1",
|
||||
"chokidar": "^3.5.3",
|
||||
"chunkd": "^2.0.1",
|
||||
"ci-info": "^3.3.0",
|
||||
"ci-info": "^3.3.1",
|
||||
"ci-parallel-vars": "^1.0.1",
|
||||
"clean-yaml-object": "^0.1.0",
|
||||
"cli-truncate": "^3.1.0",
|
||||
"code-excerpt": "^3.0.0",
|
||||
"code-excerpt": "^4.0.0",
|
||||
"common-path-prefix": "^3.0.0",
|
||||
"concordance": "^5.0.4",
|
||||
"currently-unhandled": "^0.4.1",
|
||||
"debug": "^4.3.3",
|
||||
"del": "^6.0.0",
|
||||
"emittery": "^0.10.0",
|
||||
"figures": "^4.0.0",
|
||||
"globby": "^12.0.2",
|
||||
"ignore-by-default": "^2.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"del": "^6.1.1",
|
||||
"emittery": "^0.11.0",
|
||||
"figures": "^4.0.1",
|
||||
"globby": "^13.1.1",
|
||||
"ignore-by-default": "^2.1.0",
|
||||
"indent-string": "^5.0.0",
|
||||
"is-error": "^2.2.2",
|
||||
"is-plain-object": "^5.0.0",
|
||||
"is-promise": "^4.0.0",
|
||||
"matcher": "^5.0.0",
|
||||
"mem": "^9.0.1",
|
||||
"mem": "^9.0.2",
|
||||
"ms": "^2.1.3",
|
||||
"p-event": "^5.0.1",
|
||||
"p-map": "^5.3.0",
|
||||
"picomatch": "^2.3.0",
|
||||
"p-map": "^5.4.0",
|
||||
"picomatch": "^2.3.1",
|
||||
"pkg-conf": "^4.0.0",
|
||||
"plur": "^5.1.0",
|
||||
"pretty-ms": "^7.0.1",
|
||||
@@ -111,30 +123,30 @@
|
||||
"slash": "^3.0.0",
|
||||
"stack-utils": "^2.0.5",
|
||||
"strip-ansi": "^7.0.1",
|
||||
"supertap": "^2.0.0",
|
||||
"supertap": "^3.0.1",
|
||||
"temp-dir": "^2.0.0",
|
||||
"write-file-atomic": "^3.0.3",
|
||||
"yargs": "^17.3.1"
|
||||
"write-file-atomic": "^4.0.1",
|
||||
"yargs": "^17.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ava/test": "github:avajs/test",
|
||||
"@ava/typescript": "^3.0.1",
|
||||
"@sinonjs/fake-timers": "^8.1.0",
|
||||
"@sinonjs/fake-timers": "^9.1.2",
|
||||
"ansi-escapes": "^5.0.0",
|
||||
"c8": "^7.11.0",
|
||||
"c8": "^7.11.3",
|
||||
"delay": "^5.0.0",
|
||||
"execa": "^6.0.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"execa": "^6.1.0",
|
||||
"fs-extra": "^10.1.0",
|
||||
"get-stream": "^6.0.1",
|
||||
"replace-string": "^4.0.0",
|
||||
"sinon": "^12.0.1",
|
||||
"tap": "^15.1.5",
|
||||
"sinon": "^13.0.2",
|
||||
"tap": "^16.2.0",
|
||||
"temp-write": "^5.0.0",
|
||||
"tempy": "^2.0.0",
|
||||
"touch": "^3.1.0",
|
||||
"tsd": "^0.19.1",
|
||||
"typescript": "^4.4.4",
|
||||
"xo": "^0.47.0",
|
||||
"tsd": "^0.20.0",
|
||||
"typescript": "^4.7.2",
|
||||
"xo": "^0.49.0",
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
@@ -144,5 +156,9 @@
|
||||
"@ava/typescript": {
|
||||
"optional": true
|
||||
}
|
||||
},
|
||||
"volta": {
|
||||
"node": "18.3.0",
|
||||
"npm": "8.12.0"
|
||||
}
|
||||
}
|
||||
|
||||
2
node_modules/ava/plugin.d.ts
generated
vendored
2
node_modules/ava/plugin.d.ts
generated
vendored
@@ -41,7 +41,7 @@ export namespace SharedWorker {
|
||||
readonly file: string;
|
||||
publish: (data: Data) => PublishedMessage<Data>;
|
||||
subscribe: () => AsyncIterableIterator<ReceivedMessage<Data>>;
|
||||
teardown: <TeardownFn extends () => void> (fn: TeardownFn) => TeardownFn;
|
||||
teardown: (fn: (() => Promise<void>) | (() => void)) => () => Promise<void>;
|
||||
};
|
||||
|
||||
export namespace Plugin {
|
||||
|
||||
21
node_modules/ava/readme.md
generated
vendored
21
node_modules/ava/readme.md
generated
vendored
@@ -1,3 +1,5 @@
|
||||
[](https://vshymanskyy.github.io/StandWithUkraine/)
|
||||
|
||||
# <img src="media/header.png" title="AVA" alt="AVA logo" width="530">
|
||||
|
||||
AVA is a test runner for Node.js with a concise API, detailed error output, embrace of new language features and process isolation that lets you develop with confidence 🚀
|
||||
@@ -9,7 +11,7 @@ Read our [contributing guide](.github/CONTRIBUTING.md) if you're looking to cont
|
||||

|
||||
|
||||
|
||||
Translations: [Español](https://github.com/avajs/ava-docs/blob/master/es_ES/readme.md), [Français](https://github.com/avajs/ava-docs/blob/master/fr_FR/readme.md), [Italiano](https://github.com/avajs/ava-docs/blob/master/it_IT/readme.md), [日本語](https://github.com/avajs/ava-docs/blob/master/ja_JP/readme.md), [한국어](https://github.com/avajs/ava-docs/blob/master/ko_KR/readme.md), [Português](https://github.com/avajs/ava-docs/blob/master/pt_BR/readme.md), [Русский](https://github.com/avajs/ava-docs/blob/master/ru_RU/readme.md), [简体中文](https://github.com/avajs/ava-docs/blob/master/zh_CN/readme.md)
|
||||
Translations: [Español](https://github.com/avajs/ava-docs/blob/main/es_ES/readme.md), [Français](https://github.com/avajs/ava-docs/blob/main/fr_FR/readme.md), [Italiano](https://github.com/avajs/ava-docs/blob/main/it_IT/readme.md), [日本語](https://github.com/avajs/ava-docs/blob/main/ja_JP/readme.md), [한국어](https://github.com/avajs/ava-docs/blob/main/ko_KR/readme.md), [Português](https://github.com/avajs/ava-docs/blob/main/pt_BR/readme.md), [Русский](https://github.com/avajs/ava-docs/blob/main/ru_RU/readme.md), [简体中文](https://github.com/avajs/ava-docs/blob/main/zh_CN/readme.md)
|
||||
|
||||
|
||||
## Why AVA?
|
||||
@@ -64,6 +66,8 @@ Alternatively you can install `ava` manually:
|
||||
npm install --save-dev ava
|
||||
```
|
||||
|
||||
*Make sure to install AVA locally. As of AVA 4 it can no longer be run globally.*
|
||||
|
||||
Don't forget to configure the `test` script in your `package.json` as per above.
|
||||
|
||||
### Create your test file
|
||||
@@ -71,7 +75,7 @@ Don't forget to configure the `test` script in your `package.json` as per above.
|
||||
Create a file named `test.js` in the project root directory:
|
||||
|
||||
```js
|
||||
const test = require('ava');
|
||||
import test from 'ava';
|
||||
|
||||
test('foo', t => {
|
||||
t.pass();
|
||||
@@ -139,15 +143,16 @@ We have a growing list of [common pitfalls](docs/08-common-pitfalls.md) you may
|
||||
|
||||
### Recipes
|
||||
|
||||
- [Shared workers](docs/recipes/shared-workers.md)
|
||||
- [Test setup](docs/recipes/test-setup.md)
|
||||
- [Code coverage](docs/recipes/code-coverage.md)
|
||||
- [Watch mode](docs/recipes/watch-mode.md)
|
||||
- [Endpoint testing](docs/recipes/endpoint-testing.md)
|
||||
- [When to use `t.plan()`](docs/recipes/when-to-use-plan.md)
|
||||
- [Browser testing](docs/recipes/browser-testing.md)
|
||||
- [TypeScript](docs/recipes/typescript.md)
|
||||
- [Shared workers](docs/recipes/shared-workers.md)
|
||||
- [Watch mode](docs/recipes/watch-mode.md)
|
||||
- [When to use `t.plan()`](docs/recipes/when-to-use-plan.md)
|
||||
- [Passing arguments to your test files](docs/recipes/passing-arguments-to-your-test-files.md)
|
||||
- [Splitting tests in CI](docs/recipes/splitting-tests-ci.md)
|
||||
- [Code coverage](docs/recipes/code-coverage.md)
|
||||
- [Endpoint testing](docs/recipes/endpoint-testing.md)
|
||||
- [Browser testing](docs/recipes/browser-testing.md)
|
||||
- [Testing Vue.js components](docs/recipes/vue.md)
|
||||
- [Debugging tests with Chrome DevTools](docs/recipes/debugging-with-chrome-devtools.md)
|
||||
- [Debugging tests with VSCode](docs/recipes/debugging-with-vscode.md)
|
||||
|
||||
18
node_modules/ava/types/assertions.d.ts
generated
vendored
18
node_modules/ava/types/assertions.d.ts
generated
vendored
@@ -12,7 +12,7 @@ export type ThrowsExpectation = {
|
||||
is?: Error;
|
||||
|
||||
/** The thrown error must have a message that equals the given string, or matches the regular expression. */
|
||||
message?: string | RegExp;
|
||||
message?: string | RegExp | ((message: string) => boolean);
|
||||
|
||||
/** The thrown error must have a name that equals the given string. */
|
||||
name?: string;
|
||||
@@ -138,6 +138,18 @@ export interface DeepEqualAssertion {
|
||||
*/
|
||||
<Actual, Expected extends Actual>(actual: Actual, expected: Expected, message?: string): actual is Expected;
|
||||
|
||||
/**
|
||||
* Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to
|
||||
* `expected`, returning a boolean indicating whether the assertion passed.
|
||||
*/
|
||||
<Actual extends Expected, Expected>(actual: Actual, expected: Expected, message?: string): expected is Actual;
|
||||
|
||||
/**
|
||||
* Assert that `actual` is [deeply equal](https://github.com/concordancejs/concordance#comparison-details) to
|
||||
* `expected`, returning a boolean indicating whether the assertion passed.
|
||||
*/
|
||||
<Actual, Expected>(actual: Actual, expected: Expected, message?: string): boolean;
|
||||
|
||||
/** Skip this assertion. */
|
||||
skip(actual: any, expected: any, message?: string): void;
|
||||
}
|
||||
@@ -240,7 +252,7 @@ export interface NotThrowsAsyncAssertion {
|
||||
(fn: () => PromiseLike<any>, message?: string): Promise<void>;
|
||||
|
||||
/** Assert that the promise does not reject. You must await the result. */
|
||||
(promise: PromiseLike<any>, message?: string): Promise<void>; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
(promise: PromiseLike<any>, message?: string): Promise<void>;
|
||||
|
||||
/** Skip this assertion. */
|
||||
skip(nonThrower: any, message?: string): void;
|
||||
@@ -299,7 +311,7 @@ export interface ThrowsAsyncAssertion {
|
||||
* rejection reason. Returns undefined when the assertion fails. You must await the result. The error must satisfy all
|
||||
* expectations.
|
||||
*/
|
||||
<ThrownError extends Error>(promise: PromiseLike<any>, expectations?: ThrowsExpectation, message?: string): Promise<ThrownError | undefined>; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
<ThrownError extends Error>(promise: PromiseLike<any>, expectations?: ThrowsExpectation, message?: string): Promise<ThrownError | undefined>;
|
||||
|
||||
/** Skip this assertion. */
|
||||
skip(thrower: any, expectations?: any, message?: string): void;
|
||||
|
||||
0
node_modules/ava/types/subscribable.ts → node_modules/ava/types/subscribable.d.ts
generated
vendored
0
node_modules/ava/types/subscribable.ts → node_modules/ava/types/subscribable.d.ts
generated
vendored
10
node_modules/ava/types/test-fn.d.ts
generated
vendored
10
node_modules/ava/types/test-fn.d.ts
generated
vendored
@@ -1,6 +1,6 @@
|
||||
import type {Assertions} from './assertions';
|
||||
import type {Subscribable} from './subscribable';
|
||||
import type {TryFn} from './try-fn';
|
||||
import type {Assertions} from './assertions.js';
|
||||
import type {Subscribable} from './subscribable.js';
|
||||
import type {TryFn} from './try-fn.js';
|
||||
|
||||
/** The `t` value passed to test & hook implementations. */
|
||||
export interface ExecutionContext<Context = unknown> extends Assertions {
|
||||
@@ -46,7 +46,7 @@ export interface PlanFn {
|
||||
export type TimeoutFn = (ms: number, message?: string) => void;
|
||||
|
||||
/** Declare a function to be run after the test has ended. */
|
||||
export type TeardownFn = (fn: () => void) => void;
|
||||
export type TeardownFn = (fn: (() => Promise<void>) | (() => void)) => void;
|
||||
|
||||
export type ImplementationFn<Args extends unknown[], Context = unknown> =
|
||||
((t: ExecutionContext<Context>, ...args: Args) => PromiseLike<void>) |
|
||||
@@ -219,7 +219,7 @@ export type MacroDeclarationOptions<Args extends unknown[], Context = unknown> =
|
||||
export interface MacroFn<Context = unknown> {
|
||||
/** Declare a reusable test implementation. */
|
||||
<Args extends unknown[]>(/** The function that is executed when the macro is used. */ exec: ImplementationFn<Args, Context>): Macro<Args, Context>;
|
||||
<Args extends unknown[]>(declaration: MacroDeclarationOptions<Args, Context>): Macro<Args, Context>; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
<Args extends unknown[]>(declaration: MacroDeclarationOptions<Args, Context>): Macro<Args, Context>;
|
||||
}
|
||||
|
||||
export interface Meta {
|
||||
|
||||
2
node_modules/ava/types/try-fn.d.ts
generated
vendored
2
node_modules/ava/types/try-fn.d.ts
generated
vendored
@@ -1,4 +1,4 @@
|
||||
import type {Implementation} from './test-fn';
|
||||
import type {Implementation} from './test-fn.js';
|
||||
|
||||
export type CommitDiscardOptions = {
|
||||
/**
|
||||
|
||||
2
node_modules/chokidar/README.md
generated
vendored
2
node_modules/chokidar/README.md
generated
vendored
@@ -265,7 +265,7 @@ values are arrays of the names of the items contained in each directory.
|
||||
## CLI
|
||||
|
||||
If you need a CLI interface for your file watching, check out
|
||||
[chokidar-cli](https://github.com/kimmobrunfeldt/chokidar-cli), allowing you to
|
||||
[chokidar-cli](https://github.com/open-cli-tools/chokidar-cli), allowing you to
|
||||
execute a command on each change, or get a stdio stream of change events.
|
||||
|
||||
## Install Troubleshooting
|
||||
|
||||
10
node_modules/chokidar/lib/nodefs-handler.js
generated
vendored
10
node_modules/chokidar/lib/nodefs-handler.js
generated
vendored
@@ -421,7 +421,15 @@ async _handleSymlink(entry, directory, path, item) {
|
||||
if (!this.fsw.options.followSymlinks) {
|
||||
// watch symlink directly (don't follow) and detect changes
|
||||
this.fsw._incrReadyCount();
|
||||
const linkPath = await fsrealpath(path);
|
||||
|
||||
let linkPath;
|
||||
try {
|
||||
linkPath = await fsrealpath(path);
|
||||
} catch (e) {
|
||||
this.fsw._emitReady();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this.fsw.closed) return;
|
||||
if (dir.has(item)) {
|
||||
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
||||
|
||||
11
node_modules/chokidar/package.json
generated
vendored
11
node_modules/chokidar/package.json
generated
vendored
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "chokidar",
|
||||
"description": "Minimal and efficient cross-platform file watching library",
|
||||
"version": "3.5.2",
|
||||
"version": "3.5.3",
|
||||
"homepage": "https://github.com/paulmillr/chokidar",
|
||||
"author": "Paul Miller (https://paulmillr.com)",
|
||||
"contributors": [
|
||||
@@ -34,6 +34,7 @@
|
||||
"rimraf": "^3.0.0",
|
||||
"sinon": "^9.0.1",
|
||||
"sinon-chai": "^3.3.0",
|
||||
"typescript": "~4.4.3",
|
||||
"upath": "^1.2.0"
|
||||
},
|
||||
"files": [
|
||||
@@ -74,5 +75,11 @@
|
||||
"html",
|
||||
"text"
|
||||
]
|
||||
}
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
7
node_modules/chokidar/types/index.d.ts
generated
vendored
7
node_modules/chokidar/types/index.d.ts
generated
vendored
@@ -4,6 +4,7 @@
|
||||
|
||||
import * as fs from "fs";
|
||||
import { EventEmitter } from "events";
|
||||
import { Matcher } from 'anymatch';
|
||||
|
||||
export class FSWatcher extends EventEmitter implements fs.FSWatcher {
|
||||
options: WatchOptions;
|
||||
@@ -17,13 +18,13 @@ export class FSWatcher extends EventEmitter implements fs.FSWatcher {
|
||||
* Add files, directories, or glob patterns for tracking. Takes an array of strings or just one
|
||||
* string.
|
||||
*/
|
||||
add(paths: string | ReadonlyArray<string>): void;
|
||||
add(paths: string | ReadonlyArray<string>): this;
|
||||
|
||||
/**
|
||||
* Stop watching files, directories, or glob patterns. Takes an array of strings or just one
|
||||
* string.
|
||||
*/
|
||||
unwatch(paths: string | ReadonlyArray<string>): void;
|
||||
unwatch(paths: string | ReadonlyArray<string>): this;
|
||||
|
||||
/**
|
||||
* Returns an object representing all the paths on the file system being watched by this
|
||||
@@ -79,7 +80,7 @@ export interface WatchOptions {
|
||||
* (the path), second time with two arguments (the path and the
|
||||
* [`fs.Stats`](https://nodejs.org/api/fs.html#fs_class_fs_stats) object of that path).
|
||||
*/
|
||||
ignored?: any;
|
||||
ignored?: Matcher;
|
||||
|
||||
/**
|
||||
* If set to `false` then `add`/`addDir` events are also emitted for matching paths while
|
||||
|
||||
11
node_modules/ci-info/CHANGELOG.md
generated
vendored
11
node_modules/ci-info/CHANGELOG.md
generated
vendored
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## v3.3.2
|
||||
|
||||
- fix: export correct typings for `EAS`
|
||||
|
||||
## v3.3.1
|
||||
|
||||
- fix: export `EAS_BUILD` constant in typings
|
||||
- Add support for nodejs v18
|
||||
|
||||
## v3.3.0
|
||||
|
||||
- support Expo Application Services ([#70](https://github.com/watson/ci-info/pull/70))
|
||||
@@ -9,7 +18,7 @@
|
||||
- support LayerCI ([#68](https://github.com/watson/ci-info/pull/68))
|
||||
- support Appcircle ([#69](https://github.com/watson/ci-info/pull/69))
|
||||
- support Codefresh CI ([#65](https://github.com/watson/ci-info/pull/65))
|
||||
- Add support for nodejs v16
|
||||
- add support for nodejs v16
|
||||
|
||||
## v3.1.1
|
||||
|
||||
|
||||
1
node_modules/ci-info/index.d.ts
generated
vendored
1
node_modules/ci-info/index.d.ts
generated
vendored
@@ -39,6 +39,7 @@ export const CODEFRESH: boolean;
|
||||
export const CODESHIP: boolean;
|
||||
export const DRONE: boolean;
|
||||
export const DSARI: boolean;
|
||||
export const EAS: boolean;
|
||||
export const GITHUB_ACTIONS: boolean;
|
||||
export const GITLAB: boolean;
|
||||
export const GOCD: boolean;
|
||||
|
||||
4
node_modules/ci-info/index.js
generated
vendored
4
node_modules/ci-info/index.js
generated
vendored
@@ -6,7 +6,9 @@ const env = process.env
|
||||
|
||||
// Used for testing only
|
||||
Object.defineProperty(exports, '_vendors', {
|
||||
value: vendors.map(function (v) { return v.constant })
|
||||
value: vendors.map(function (v) {
|
||||
return v.constant
|
||||
})
|
||||
})
|
||||
|
||||
exports.name = null
|
||||
|
||||
23
node_modules/ci-info/package.json
generated
vendored
23
node_modules/ci-info/package.json
generated
vendored
@@ -1,18 +1,13 @@
|
||||
{
|
||||
"name": "ci-info",
|
||||
"version": "3.3.0",
|
||||
"version": "3.3.2",
|
||||
"description": "Get details about the current Continuous Integration environment",
|
||||
"main": "index.js",
|
||||
"typings": "index.d.ts",
|
||||
"author": "Thomas Watson Steen <w@tson.dk> (https://twitter.com/wa7son)",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/watson/ci-info.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/watson/ci-info/issues"
|
||||
},
|
||||
"repository": "https://github.com/watson/ci-info.git",
|
||||
"bugs": "https://github.com/watson/ci-info/issues",
|
||||
"homepage": "https://github.com/watson/ci-info",
|
||||
"keywords": [
|
||||
"ci",
|
||||
@@ -21,16 +16,18 @@
|
||||
"test",
|
||||
"detect"
|
||||
],
|
||||
"coordinates": [
|
||||
55.778231,
|
||||
12.593179
|
||||
"files": [
|
||||
"vendors.json",
|
||||
"index.js",
|
||||
"index.d.ts",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "standard && node test.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"clear-module": "^4.1.2",
|
||||
"standard": "^16.0.4",
|
||||
"tape": "^5.3.2"
|
||||
"standard": "^17.0.0",
|
||||
"tape": "^5.5.3"
|
||||
}
|
||||
}
|
||||
|
||||
9
node_modules/code-excerpt/dist/index.d.ts
generated
vendored
Normal file
9
node_modules/code-excerpt/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
interface Options {
|
||||
around?: number;
|
||||
}
|
||||
export interface CodeExcerpt {
|
||||
line: number;
|
||||
value: string;
|
||||
}
|
||||
declare const codeExcerpt: (source: string, line: number, options?: Options) => CodeExcerpt[] | undefined;
|
||||
export default codeExcerpt;
|
||||
27
node_modules/code-excerpt/dist/index.js
generated
vendored
Normal file
27
node_modules/code-excerpt/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import tabsToSpaces from 'convert-to-spaces';
|
||||
const generateLineNumbers = (line, around) => {
|
||||
const lineNumbers = [];
|
||||
const min = line - around;
|
||||
const max = line + around;
|
||||
for (let lineNumber = min; lineNumber <= max; lineNumber++) {
|
||||
lineNumbers.push(lineNumber);
|
||||
}
|
||||
return lineNumbers;
|
||||
};
|
||||
const codeExcerpt = (source, line, options = {}) => {
|
||||
var _a;
|
||||
if (typeof source !== 'string') {
|
||||
throw new TypeError('Source code is missing.');
|
||||
}
|
||||
if (!line || line < 1) {
|
||||
throw new TypeError('Line number must start from `1`.');
|
||||
}
|
||||
const lines = tabsToSpaces(source).split(/\r?\n/);
|
||||
if (line > lines.length) {
|
||||
return;
|
||||
}
|
||||
return generateLineNumbers(line, (_a = options.around) !== null && _a !== void 0 ? _a : 3)
|
||||
.filter(line => lines[line - 1] !== undefined)
|
||||
.map(line => ({ line, value: lines[line - 1] }));
|
||||
};
|
||||
export default codeExcerpt;
|
||||
44
node_modules/code-excerpt/index.d.ts
generated
vendored
44
node_modules/code-excerpt/index.d.ts
generated
vendored
@@ -1,44 +0,0 @@
|
||||
declare namespace codeExcerpt {
|
||||
interface Options {
|
||||
/**
|
||||
* Number of surrounding lines to extract.
|
||||
*
|
||||
* @default 3
|
||||
*/
|
||||
readonly around?: number;
|
||||
}
|
||||
|
||||
interface ExcerptLine {
|
||||
/**
|
||||
* Line number
|
||||
*/
|
||||
readonly line: number;
|
||||
|
||||
/**
|
||||
* Line itself
|
||||
*/
|
||||
readonly value: string;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract code excerpts
|
||||
*/
|
||||
declare function codeExcerpt(
|
||||
/**
|
||||
* Source code
|
||||
*/
|
||||
source: string,
|
||||
|
||||
/**
|
||||
* Line number to extract excerpt for.
|
||||
*/
|
||||
line: number,
|
||||
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
options?: codeExcerpt.Options
|
||||
): codeExcerpt.ExcerptLine[] | undefined;
|
||||
|
||||
export = codeExcerpt;
|
||||
40
node_modules/code-excerpt/index.js
generated
vendored
40
node_modules/code-excerpt/index.js
generated
vendored
@@ -1,40 +0,0 @@
|
||||
'use strict';
|
||||
const tabsToSpaces = require('convert-to-spaces');
|
||||
|
||||
const generateLineNumbers = (line, around) => {
|
||||
const lineNumbers = [];
|
||||
|
||||
const min = line - around;
|
||||
const max = line + around;
|
||||
|
||||
for (let lineNumber = min; lineNumber <= max; lineNumber++) {
|
||||
lineNumbers.push(lineNumber);
|
||||
}
|
||||
|
||||
return lineNumbers;
|
||||
};
|
||||
|
||||
module.exports = (source, line, options) => {
|
||||
if (typeof source !== 'string') {
|
||||
throw new TypeError('Source code is missing.');
|
||||
}
|
||||
|
||||
if (!line || line < 1) {
|
||||
throw new TypeError('Line number must start from `1`.');
|
||||
}
|
||||
|
||||
source = tabsToSpaces(source).split(/\r?\n/);
|
||||
|
||||
if (line > source.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
options = {
|
||||
around: 3,
|
||||
...options
|
||||
};
|
||||
|
||||
return generateLineNumbers(line, options.around)
|
||||
.filter(line => source[line - 1] !== undefined)
|
||||
.map(line => ({line, value: source[line - 1]}));
|
||||
};
|
||||
33
node_modules/code-excerpt/package.json
generated
vendored
33
node_modules/code-excerpt/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "code-excerpt",
|
||||
"version": "3.0.0",
|
||||
"version": "4.0.0",
|
||||
"description": "Extract code excerpts",
|
||||
"license": "MIT",
|
||||
"repository": "vadimdemedes/code-excerpt",
|
||||
@@ -9,22 +9,35 @@
|
||||
"email": "vdemedes@gmail.com",
|
||||
"url": "github.com/vadimdemedes"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "tsd && xo && ava"
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"prepare": "npm run build",
|
||||
"pretest": "npm run build",
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
"dist"
|
||||
],
|
||||
"dependencies": {
|
||||
"convert-to-spaces": "^1.0.1"
|
||||
"convert-to-spaces": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^3.9.0",
|
||||
"tsd": "^0.11.0",
|
||||
"xo": "^0.32.0"
|
||||
}
|
||||
"@sindresorhus/tsconfig": "^2.0.0",
|
||||
"@vdemedes/prettier-config": "^2.0.1",
|
||||
"ava": "^4.0.1",
|
||||
"prettier": "^2.5.1",
|
||||
"typescript": "^4.5.5",
|
||||
"xo": "^0.47.0"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"prettier": "@vdemedes/prettier-config"
|
||||
}
|
||||
|
||||
2
node_modules/code-excerpt/readme.md
generated
vendored
2
node_modules/code-excerpt/readme.md
generated
vendored
@@ -11,7 +11,7 @@ $ npm install --save code-excerpt
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const codeExcerpt = require('code-excerpt');
|
||||
import codeExcerpt from 'code-excerpt';
|
||||
|
||||
const source = `
|
||||
'use strict';
|
||||
|
||||
2
node_modules/convert-to-spaces/dist/index.d.ts
generated
vendored
Normal file
2
node_modules/convert-to-spaces/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
declare const convertToSpaces: (input: string, spaces?: number) => string;
|
||||
export default convertToSpaces;
|
||||
4
node_modules/convert-to-spaces/dist/index.js
generated
vendored
Normal file
4
node_modules/convert-to-spaces/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
const convertToSpaces = (input, spaces = 2) => {
|
||||
return input.replace(/^\t+/gm, $1 => ' '.repeat($1.length * spaces));
|
||||
};
|
||||
export default convertToSpaces;
|
||||
5
node_modules/convert-to-spaces/index.js
generated
vendored
5
node_modules/convert-to-spaces/index.js
generated
vendored
@@ -1,5 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = (str, spaces) => {
|
||||
return str.replace(/^\t+/gm, $1 => ' '.repeat($1.length * (spaces || 2)));
|
||||
};
|
||||
41
node_modules/convert-to-spaces/package.json
generated
vendored
41
node_modules/convert-to-spaces/package.json
generated
vendored
@@ -1,25 +1,40 @@
|
||||
{
|
||||
"name": "convert-to-spaces",
|
||||
"version": "1.0.2",
|
||||
"version": "2.0.1",
|
||||
"description": "Convert tabs to spaces in a string",
|
||||
"license": "MIT",
|
||||
"repository": "vadimdemedes/convert-to-spaces",
|
||||
"author": "Vadim Demedes <vdemedes@gmail.com>",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"dev": "tsc --watch",
|
||||
"prepare": "npm run build",
|
||||
"pretest": "npm run build",
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"keywords": [
|
||||
"tabs",
|
||||
"spaces"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^0.18.2",
|
||||
"xo": "^0.17.1"
|
||||
}
|
||||
"@sindresorhus/tsconfig": "^2.0.0",
|
||||
"@vdemedes/prettier-config": "^2.0.1",
|
||||
"ava": "^4.0.1",
|
||||
"prettier": "^2.5.1",
|
||||
"typescript": "^4.5.5",
|
||||
"xo": "^0.47.0"
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true
|
||||
},
|
||||
"prettier": "@vdemedes/prettier-config"
|
||||
}
|
||||
|
||||
19
node_modules/convert-to-spaces/readme.md
generated
vendored
19
node_modules/convert-to-spaces/readme.md
generated
vendored
@@ -1,34 +1,31 @@
|
||||
# convert-to-spaces [](https://travis-ci.org/vadimdemedes/convert-to-spaces)
|
||||
# convert-to-spaces [](https://github.com/vadimdemedes/convert-to-spaces/actions)
|
||||
|
||||
> Convert tabs to spaces in a string
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save convert-to-spaces
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const convertToSpaces = require('convert-to-spaces');
|
||||
import convertToSpaces from 'convert-to-spaces';
|
||||
|
||||
convertToSpaces('\t\thello!');
|
||||
//=> ' hello!'
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### convertToSpaces(str, [spaces])
|
||||
### convertToSpaces(input, [spaces])
|
||||
|
||||
#### str
|
||||
#### input
|
||||
|
||||
Type: `string`
|
||||
|
||||
Source string.
|
||||
String to convert.
|
||||
|
||||
#### spaces
|
||||
|
||||
@@ -37,12 +34,6 @@ Default: `2`
|
||||
|
||||
Number of spaces instead of each tab.
|
||||
|
||||
|
||||
## Related
|
||||
|
||||
- [convert-to-tabs](https://github.com/vadimdemedes/convert-to-tabs) - Convert spaces to tabs.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Vadim Demedes](https://vadimdemedes.com)
|
||||
|
||||
3
node_modules/debug/README.md
generated
vendored
3
node_modules/debug/README.md
generated
vendored
@@ -241,6 +241,9 @@ setInterval(function(){
|
||||
}, 1200);
|
||||
```
|
||||
|
||||
In Chromium-based web browsers (e.g. Brave, Chrome, and Electron), the JavaScript console will—by default—only show messages logged by `debug` if the "Verbose" log level is _enabled_.
|
||||
|
||||
<img width="647" src="https://user-images.githubusercontent.com/7143133/152083257-29034707-c42c-4959-8add-3cee850e6fcf.png">
|
||||
|
||||
## Output streams
|
||||
|
||||
|
||||
2
node_modules/debug/package.json
generated
vendored
2
node_modules/debug/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "debug",
|
||||
"version": "4.3.3",
|
||||
"version": "4.3.4",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/debug-js/debug.git"
|
||||
|
||||
2
node_modules/debug/src/common.js
generated
vendored
2
node_modules/debug/src/common.js
generated
vendored
@@ -179,7 +179,7 @@ function setup(env) {
|
||||
namespaces = split[i].replace(/\*/g, '.*?');
|
||||
|
||||
if (namespaces[0] === '-') {
|
||||
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
||||
createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
|
||||
} else {
|
||||
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
||||
}
|
||||
|
||||
36
node_modules/del/index.d.ts
generated
vendored
36
node_modules/del/index.d.ts
generated
vendored
@@ -1,6 +1,23 @@
|
||||
import {GlobbyOptions} from 'globby';
|
||||
|
||||
declare namespace del {
|
||||
interface ProgressData {
|
||||
/**
|
||||
Deleted files and directories count.
|
||||
*/
|
||||
deletedCount: number;
|
||||
|
||||
/**
|
||||
Total files and directories count.
|
||||
*/
|
||||
totalCount: number;
|
||||
|
||||
/**
|
||||
Completed percentage. A value between `0` and `1`.
|
||||
*/
|
||||
percent: number;
|
||||
}
|
||||
|
||||
interface Options extends GlobbyOptions {
|
||||
/**
|
||||
Allow deleting the current working directory and outside.
|
||||
@@ -33,6 +50,21 @@ declare namespace del {
|
||||
@default Infinity
|
||||
*/
|
||||
readonly concurrency?: number;
|
||||
|
||||
/**
|
||||
Called after each file or directory is deleted.
|
||||
|
||||
@example
|
||||
```
|
||||
import del from 'del';
|
||||
|
||||
await del(patterns, {
|
||||
onProgress: progress => {
|
||||
// …
|
||||
}});
|
||||
```
|
||||
*/
|
||||
readonly onProgress?: (progress: ProgressData) => void;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +75,7 @@ declare const del: {
|
||||
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
|
||||
|
||||
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
@param options - You can specify any of the [`globby` options](https://github.com/sindresorhus/globby#options) in addition to the `del` options. In contrast to the `globby` defaults, `expandDirectories`, `onlyFiles`, and `followSymbolicLinks` are `false` by default.
|
||||
@returns The deleted paths.
|
||||
@@ -59,7 +91,7 @@ declare const del: {
|
||||
Note that glob patterns can only contain forward-slashes, not backward-slashes. Windows file paths can use backward-slashes as long as the path does not contain any glob-like characters, otherwise use `path.posix.join()` instead of `path.join()`.
|
||||
|
||||
@param patterns - See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
@param options - You can specify any of the [`globby` options](https://github.com/sindresorhus/globby#options) in addition to the `del` options. In contrast to the `globby` defaults, `expandDirectories`, `onlyFiles`, and `followSymbolicLinks` are `false` by default.
|
||||
@returns The deleted paths.
|
||||
|
||||
20
node_modules/del/index.js
generated
vendored
20
node_modules/del/index.js
generated
vendored
@@ -52,7 +52,7 @@ function normalizePatterns(patterns) {
|
||||
return patterns;
|
||||
}
|
||||
|
||||
module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...options} = {}) => {
|
||||
module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), onProgress = () => {}, ...options} = {}) => {
|
||||
options = {
|
||||
expandDirectories: false,
|
||||
onlyFiles: false,
|
||||
@@ -66,6 +66,16 @@ module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...option
|
||||
const files = (await globby(patterns, options))
|
||||
.sort((a, b) => b.localeCompare(a));
|
||||
|
||||
if (files.length === 0) {
|
||||
onProgress({
|
||||
totalCount: 0,
|
||||
deletedCount: 0,
|
||||
percent: 1
|
||||
});
|
||||
}
|
||||
|
||||
let deletedCount = 0;
|
||||
|
||||
const mapper = async file => {
|
||||
file = path.resolve(cwd, file);
|
||||
|
||||
@@ -77,6 +87,14 @@ module.exports = async (patterns, {force, dryRun, cwd = process.cwd(), ...option
|
||||
await rimrafP(file, rimrafOptions);
|
||||
}
|
||||
|
||||
deletedCount += 1;
|
||||
|
||||
onProgress({
|
||||
totalCount: files.length,
|
||||
deletedCount,
|
||||
percent: deletedCount / files.length
|
||||
});
|
||||
|
||||
return file;
|
||||
};
|
||||
|
||||
|
||||
2
node_modules/del/package.json
generated
vendored
2
node_modules/del/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "del",
|
||||
"version": "6.0.0",
|
||||
"version": "6.1.1",
|
||||
"description": "Delete files and directories",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/del",
|
||||
|
||||
33
node_modules/del/readme.md
generated
vendored
33
node_modules/del/readme.md
generated
vendored
@@ -1,4 +1,4 @@
|
||||
# del [](https://travis-ci.com/github/sindresorhus/del) [](https://github.com/xojs/xo)
|
||||
# del
|
||||
|
||||
> Delete files and directories using [globs](https://github.com/sindresorhus/globby#globbing-patterns)
|
||||
|
||||
@@ -21,7 +21,7 @@ const del = require('del');
|
||||
|
||||
console.log('Deleted files:\n', deletedFilePaths.join('\n'));
|
||||
console.log('\n\n');
|
||||
console.log('Deleted directories:\n', deletedDirectoryPaths.join('\n));
|
||||
console.log('Deleted directories:\n', deletedDirectoryPaths.join('\n'));
|
||||
})();
|
||||
```
|
||||
|
||||
@@ -67,7 +67,7 @@ Type: `string | string[]`
|
||||
|
||||
See the supported [glob patterns](https://github.com/sindresorhus/globby#globbing-patterns).
|
||||
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/master/test/test.js)
|
||||
- [Pattern examples with expected matches](https://github.com/sindresorhus/multimatch/blob/main/test/test.js)
|
||||
- [Quick globbing pattern overview](https://github.com/sindresorhus/multimatch#globbing-patterns)
|
||||
|
||||
#### options
|
||||
@@ -108,6 +108,33 @@ Minimum: `1`
|
||||
|
||||
Concurrency limit.
|
||||
|
||||
##### onProgress
|
||||
|
||||
Type: `(progress: ProgressData) => void`
|
||||
|
||||
Called after each file or directory is deleted.
|
||||
|
||||
```js
|
||||
import del from 'del';
|
||||
|
||||
await del(patterns, {
|
||||
onProgress: progress => {
|
||||
// …
|
||||
}});
|
||||
```
|
||||
|
||||
###### ProgressData
|
||||
|
||||
```js
|
||||
{
|
||||
totalCount: number,
|
||||
deletedCount: number,
|
||||
percent: number
|
||||
}
|
||||
```
|
||||
|
||||
- `percent` is a value between `0` and `1`
|
||||
|
||||
## CLI
|
||||
|
||||
See [del-cli](https://github.com/sindresorhus/del-cli) for a CLI for this module and [trash-cli](https://github.com/sindresorhus/trash-cli) for a safe version that is suitable for running by hand.
|
||||
|
||||
18
node_modules/emittery/index.d.ts
generated
vendored
18
node_modules/emittery/index.d.ts
generated
vendored
@@ -1,11 +1,11 @@
|
||||
/* eslint-disable no-redeclare */
|
||||
|
||||
/**
|
||||
Emittery accepts strings and symbols as event names.
|
||||
Emittery accepts strings, symbols, and numbers as event names.
|
||||
|
||||
Symbol event names can be used to avoid name collisions when your classes are extended, especially for internal events.
|
||||
Symbol event names are preferred given that they can be used to avoid name collisions when your classes are extended, especially for internal events.
|
||||
*/
|
||||
type EventName = string | symbol;
|
||||
type EventName = PropertyKey;
|
||||
|
||||
// Helper type for turning the passed `EventData` type map into a list of string keys that don't require data alongside the event name when emitting. Uses the same trick that `Omit` does internally to filter keys by building a map of keys to keys we want to keep, and then accessing all the keys to return just the list of keys we want to keep.
|
||||
type DatalessEventNames<EventData> = {
|
||||
@@ -14,7 +14,7 @@ type DatalessEventNames<EventData> = {
|
||||
|
||||
declare const listenerAdded: unique symbol;
|
||||
declare const listenerRemoved: unique symbol;
|
||||
type OmnipresentEventData = {[listenerAdded]: Emittery.ListenerChangedData; [listenerRemoved]: Emittery.ListenerChangedData};
|
||||
type _OmnipresentEventData = {[listenerAdded]: Emittery.ListenerChangedData; [listenerRemoved]: Emittery.ListenerChangedData};
|
||||
|
||||
/**
|
||||
Emittery can collect and log debug information.
|
||||
@@ -90,7 +90,7 @@ interface DebugOptions<EventData> {
|
||||
(type, debugName, eventName, eventData) => {
|
||||
eventData = JSON.stringify(eventData);
|
||||
|
||||
if (typeof eventName === 'symbol') {
|
||||
if (typeof eventName === 'symbol' || typeof eventName === 'number') {
|
||||
eventName = eventName.toString();
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ Emittery is a strictly typed, fully async EventEmitter implementation. Event lis
|
||||
import Emittery = require('emittery');
|
||||
|
||||
const emitter = new Emittery<
|
||||
// Pass `{[eventName: <string | symbol>]: undefined | <eventArg>}` as the first type argument for events that pass data to their listeners.
|
||||
// Pass `{[eventName: <string | symbol | number>]: undefined | <eventArg>}` as the first type argument for events that pass data to their listeners.
|
||||
// A value of `undefined` in this map means the event listeners should expect no data, and a type other than `undefined` means the listeners will receive one argument of that type.
|
||||
{
|
||||
open: string,
|
||||
@@ -164,8 +164,8 @@ emitter.emit('other');
|
||||
```
|
||||
*/
|
||||
declare class Emittery<
|
||||
EventData = Record<string, any>, // When https://github.com/microsoft/TypeScript/issues/1863 ships, we can switch this to have an index signature including Symbols. If you want to use symbol keys right now, you need to pass an interface with those symbol keys explicitly listed.
|
||||
AllEventData = EventData & OmnipresentEventData,
|
||||
EventData = Record<EventName, any>,
|
||||
AllEventData = EventData & _OmnipresentEventData,
|
||||
DatalessEvents = DatalessEventNames<EventData>
|
||||
> {
|
||||
/**
|
||||
@@ -592,6 +592,8 @@ declare namespace Emittery {
|
||||
*/
|
||||
eventName?: EventName;
|
||||
}
|
||||
|
||||
type OmnipresentEventData = _OmnipresentEventData;
|
||||
}
|
||||
|
||||
export = Emittery;
|
||||
|
||||
59
node_modules/emittery/index.js
generated
vendored
59
node_modules/emittery/index.js
generated
vendored
@@ -6,14 +6,22 @@ const producersMap = new WeakMap();
|
||||
const anyProducer = Symbol('anyProducer');
|
||||
const resolvedPromise = Promise.resolve();
|
||||
|
||||
// Define symbols for "meta" events.
|
||||
const listenerAdded = Symbol('listenerAdded');
|
||||
const listenerRemoved = Symbol('listenerRemoved');
|
||||
|
||||
// Define a symbol that allows internal code to emit meta events, but prevents userland from doing so.
|
||||
const metaEventsAllowed = Symbol('metaEventsAllowed');
|
||||
|
||||
let isGlobalDebugEnabled = false;
|
||||
|
||||
function assertEventName(eventName) {
|
||||
if (typeof eventName !== 'string' && typeof eventName !== 'symbol') {
|
||||
throw new TypeError('eventName must be a string or a symbol');
|
||||
function assertEventName(eventName, allowMetaEvents) {
|
||||
if (typeof eventName !== 'string' && typeof eventName !== 'symbol' && typeof eventName !== 'number') {
|
||||
throw new TypeError('`eventName` must be a string, symbol, or number');
|
||||
}
|
||||
|
||||
if (isMetaEvent(eventName) && allowMetaEvents !== metaEventsAllowed) {
|
||||
throw new TypeError('`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +41,7 @@ function getListeners(instance, eventName) {
|
||||
}
|
||||
|
||||
function getEventProducers(instance, eventName) {
|
||||
const key = typeof eventName === 'string' || typeof eventName === 'symbol' ? eventName : anyProducer;
|
||||
const key = typeof eventName === 'string' || typeof eventName === 'symbol' || typeof eventName === 'number' ? eventName : anyProducer;
|
||||
const producers = producersMap.get(instance);
|
||||
if (!producers.has(key)) {
|
||||
producers.set(key, new Set());
|
||||
@@ -147,7 +155,7 @@ function defaultMethodNamesOrAssert(methodNames) {
|
||||
return methodNames;
|
||||
}
|
||||
|
||||
const isListenerSymbol = symbol => symbol === listenerAdded || symbol === listenerRemoved;
|
||||
const isMetaEvent = eventName => eventName === listenerAdded || eventName === listenerRemoved;
|
||||
|
||||
class Emittery {
|
||||
static mixin(emitteryPropertyName, methodNames) {
|
||||
@@ -216,9 +224,14 @@ class Emittery {
|
||||
|
||||
if (!this.debug.logger) {
|
||||
this.debug.logger = (type, debugName, eventName, eventData) => {
|
||||
eventData = JSON.stringify(eventData);
|
||||
try {
|
||||
// TODO: Use https://github.com/sindresorhus/safe-stringify when the package is more mature. Just copy-paste the code.
|
||||
eventData = JSON.stringify(eventData);
|
||||
} catch {
|
||||
eventData = `Object with the following keys failed to stringify: ${Object.keys(eventData).join(',')}`;
|
||||
}
|
||||
|
||||
if (typeof eventName === 'symbol') {
|
||||
if (typeof eventName === 'symbol' || typeof eventName === 'number') {
|
||||
eventName = eventName.toString();
|
||||
}
|
||||
|
||||
@@ -240,13 +253,13 @@ class Emittery {
|
||||
|
||||
eventNames = Array.isArray(eventNames) ? eventNames : [eventNames];
|
||||
for (const eventName of eventNames) {
|
||||
assertEventName(eventName);
|
||||
assertEventName(eventName, metaEventsAllowed);
|
||||
getListeners(this, eventName).add(listener);
|
||||
|
||||
this.logIfDebugEnabled('subscribe', eventName, undefined);
|
||||
|
||||
if (!isListenerSymbol(eventName)) {
|
||||
this.emit(listenerAdded, {eventName, listener});
|
||||
if (!isMetaEvent(eventName)) {
|
||||
this.emit(listenerAdded, {eventName, listener}, metaEventsAllowed);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,13 +271,13 @@ class Emittery {
|
||||
|
||||
eventNames = Array.isArray(eventNames) ? eventNames : [eventNames];
|
||||
for (const eventName of eventNames) {
|
||||
assertEventName(eventName);
|
||||
assertEventName(eventName, metaEventsAllowed);
|
||||
getListeners(this, eventName).delete(listener);
|
||||
|
||||
this.logIfDebugEnabled('unsubscribe', eventName, undefined);
|
||||
|
||||
if (!isListenerSymbol(eventName)) {
|
||||
this.emit(listenerRemoved, {eventName, listener});
|
||||
if (!isMetaEvent(eventName)) {
|
||||
this.emit(listenerRemoved, {eventName, listener}, metaEventsAllowed);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -281,14 +294,14 @@ class Emittery {
|
||||
events(eventNames) {
|
||||
eventNames = Array.isArray(eventNames) ? eventNames : [eventNames];
|
||||
for (const eventName of eventNames) {
|
||||
assertEventName(eventName);
|
||||
assertEventName(eventName, metaEventsAllowed);
|
||||
}
|
||||
|
||||
return iterator(this, eventNames);
|
||||
}
|
||||
|
||||
async emit(eventName, eventData) {
|
||||
assertEventName(eventName);
|
||||
async emit(eventName, eventData, allowMetaEvents) {
|
||||
assertEventName(eventName, allowMetaEvents);
|
||||
|
||||
this.logIfDebugEnabled('emit', eventName, eventData);
|
||||
|
||||
@@ -297,7 +310,7 @@ class Emittery {
|
||||
const listeners = getListeners(this, eventName);
|
||||
const anyListeners = anyMap.get(this);
|
||||
const staticListeners = [...listeners];
|
||||
const staticAnyListeners = isListenerSymbol(eventName) ? [] : [...anyListeners];
|
||||
const staticAnyListeners = isMetaEvent(eventName) ? [] : [...anyListeners];
|
||||
|
||||
await resolvedPromise;
|
||||
await Promise.all([
|
||||
@@ -314,8 +327,8 @@ class Emittery {
|
||||
]);
|
||||
}
|
||||
|
||||
async emitSerial(eventName, eventData) {
|
||||
assertEventName(eventName);
|
||||
async emitSerial(eventName, eventData, allowMetaEvents) {
|
||||
assertEventName(eventName, allowMetaEvents);
|
||||
|
||||
this.logIfDebugEnabled('emitSerial', eventName, eventData);
|
||||
|
||||
@@ -346,7 +359,7 @@ class Emittery {
|
||||
this.logIfDebugEnabled('subscribeAny', undefined, undefined);
|
||||
|
||||
anyMap.get(this).add(listener);
|
||||
this.emit(listenerAdded, {listener});
|
||||
this.emit(listenerAdded, {listener}, metaEventsAllowed);
|
||||
return this.offAny.bind(this, listener);
|
||||
}
|
||||
|
||||
@@ -359,7 +372,7 @@ class Emittery {
|
||||
|
||||
this.logIfDebugEnabled('unsubscribeAny', undefined, undefined);
|
||||
|
||||
this.emit(listenerRemoved, {listener});
|
||||
this.emit(listenerRemoved, {listener}, metaEventsAllowed);
|
||||
anyMap.get(this).delete(listener);
|
||||
}
|
||||
|
||||
@@ -369,7 +382,7 @@ class Emittery {
|
||||
for (const eventName of eventNames) {
|
||||
this.logIfDebugEnabled('clear', eventName, undefined);
|
||||
|
||||
if (typeof eventName === 'string' || typeof eventName === 'symbol') {
|
||||
if (typeof eventName === 'string' || typeof eventName === 'symbol' || typeof eventName === 'number') {
|
||||
getListeners(this, eventName).clear();
|
||||
|
||||
const producers = getEventProducers(this, eventName);
|
||||
@@ -409,7 +422,7 @@ class Emittery {
|
||||
}
|
||||
|
||||
if (typeof eventName !== 'undefined') {
|
||||
assertEventName(eventName);
|
||||
assertEventName(eventName, metaEventsAllowed);
|
||||
}
|
||||
|
||||
count += anyMap.get(this).size;
|
||||
|
||||
4
node_modules/emittery/package.json
generated
vendored
4
node_modules/emittery/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "emittery",
|
||||
"version": "0.10.0",
|
||||
"version": "0.11.0",
|
||||
"description": "Simple and modern async event emitter",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/emittery",
|
||||
@@ -53,7 +53,7 @@
|
||||
"delay": "^4.3.0",
|
||||
"nyc": "^15.0.0",
|
||||
"p-event": "^4.1.0",
|
||||
"tsd": "^0.16.0",
|
||||
"tsd": "^0.19.1",
|
||||
"xo": "^0.39.0"
|
||||
},
|
||||
"nyc": {
|
||||
|
||||
10
node_modules/emittery/readme.md
generated
vendored
10
node_modules/emittery/readme.md
generated
vendored
@@ -40,9 +40,9 @@ emitter.emit(myUnicorn, '🦋'); // Will trigger printing 'Unicorns love 🦋'
|
||||
|
||||
### eventName
|
||||
|
||||
Emittery accepts strings and symbols as event names.
|
||||
Emittery accepts strings, symbols, and numbers as event names.
|
||||
|
||||
Symbol event names can be used to avoid name collisions when your classes are extended, especially for internal events.
|
||||
Symbol event names are preferred given that they can be used to avoid name collisions when your classes are extended, especially for internal events.
|
||||
|
||||
### isDebugEnabled
|
||||
|
||||
@@ -89,7 +89,7 @@ Configure the new instance of Emittery.
|
||||
|
||||
##### debug?
|
||||
|
||||
Type: `objcect`
|
||||
Type: `object`
|
||||
|
||||
Configure the debugging options for this instance.
|
||||
|
||||
@@ -160,7 +160,7 @@ Default:
|
||||
eventData = JSON.stringify(eventData);
|
||||
}
|
||||
|
||||
if (typeof eventName === 'symbol') {
|
||||
if (typeof eventName === 'symbol' || typeof eventName === 'number') {
|
||||
eventName = eventName.toString();
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ emitter.emit('🐶', '🍖'); // log => '🍖'
|
||||
|
||||
##### Custom subscribable events
|
||||
|
||||
Emittery exports some symbols which represent custom events that can be passed to `Emitter.on` and similar methods.
|
||||
Emittery exports some symbols which represent "meta" events that can be passed to `Emitter.on` and similar methods.
|
||||
|
||||
- `Emittery.listenerAdded` - Fires when an event listener was added.
|
||||
- `Emittery.listenerRemoved` - Fires when an event listener was removed.
|
||||
|
||||
19
node_modules/figures/index.js
generated
vendored
19
node_modules/figures/index.js
generated
vendored
@@ -1,3 +1,4 @@
|
||||
import process from 'node:process';
|
||||
import escapeStringRegexp from 'escape-string-regexp';
|
||||
import isUnicodeSupported from 'is-unicode-supported';
|
||||
|
||||
@@ -195,21 +196,21 @@ const common = {
|
||||
lineUpDownLeftDoubleRightDouble: '╪',
|
||||
lineCross: '╳',
|
||||
lineBackslash: '╲',
|
||||
lineSlash: '╱'
|
||||
lineSlash: '╱',
|
||||
};
|
||||
|
||||
export const mainSymbols = {
|
||||
...common,
|
||||
// The main symbols for those do not look that good on Ubuntu.
|
||||
...(
|
||||
platform === 'linux' ?
|
||||
{
|
||||
platform === 'linux'
|
||||
? {
|
||||
circleQuestionMark: '?⃝',
|
||||
questionMarkPrefix: '?⃝'
|
||||
} :
|
||||
{
|
||||
questionMarkPrefix: '?⃝',
|
||||
}
|
||||
: {
|
||||
circleQuestionMark: '?',
|
||||
questionMarkPrefix: '?'
|
||||
questionMarkPrefix: '?',
|
||||
}
|
||||
),
|
||||
tick: '✔',
|
||||
@@ -245,7 +246,7 @@ export const mainSymbols = {
|
||||
nodejs: '⬢',
|
||||
oneSeventh: '⅐',
|
||||
oneNinth: '⅑',
|
||||
oneTenth: '⅒'
|
||||
oneTenth: '⅒',
|
||||
};
|
||||
|
||||
export const fallbackSymbols = {
|
||||
@@ -285,7 +286,7 @@ export const fallbackSymbols = {
|
||||
nodejs: '♦',
|
||||
oneSeventh: '1/7',
|
||||
oneNinth: '1/9',
|
||||
oneTenth: '1/10'
|
||||
oneTenth: '1/10',
|
||||
};
|
||||
|
||||
const shouldUseMain = isUnicodeSupported();
|
||||
|
||||
12
node_modules/figures/package.json
generated
vendored
12
node_modules/figures/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "figures",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Unicode symbols with fallbacks for older terminals",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/figures",
|
||||
@@ -36,12 +36,12 @@
|
||||
],
|
||||
"dependencies": {
|
||||
"escape-string-regexp": "^5.0.0",
|
||||
"is-unicode-supported": "^1.0.0"
|
||||
"is-unicode-supported": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.17.0",
|
||||
"typescript": "^4.3.5",
|
||||
"xo": "^0.40.3"
|
||||
"ava": "^4.1.0",
|
||||
"tsd": "^0.19.1",
|
||||
"typescript": "^4.6.3",
|
||||
"xo": "^0.48.0"
|
||||
}
|
||||
}
|
||||
|
||||
2
node_modules/figures/readme.md
generated
vendored
2
node_modules/figures/readme.md
generated
vendored
@@ -27,7 +27,7 @@ console.log(figures.mainSymbols.tick);
|
||||
// On all terminals: ✔︎
|
||||
|
||||
console.log(figures.fallbackSymbols.tick);
|
||||
// On all terminal: √
|
||||
// On all terminals: √
|
||||
|
||||
console.log(figures.replaceSymbols('✔︎ check'));
|
||||
// On terminals with Unicode symbols: ✔︎ check
|
||||
|
||||
1
node_modules/ignore-by-default/index.js
generated
vendored
1
node_modules/ignore-by-default/index.js
generated
vendored
@@ -5,6 +5,7 @@ exports.directories = () => [
|
||||
'.log', // Log files emitted by tools such as `tsserver`, see <https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-%28tsserver%29>
|
||||
'.nyc_output', // Temporary directory where nyc stores coverage data, see <https://github.com/bcoe/nyc>
|
||||
'.sass-cache', // Cache folder for node-sass, see <https://github.com/sass/node-sass>
|
||||
'.yarn', // Where node modules are installed when using Yarn, see <https://yarnpkg.com/>
|
||||
'bower_components', // Where Bower packages are installed, see <http://bower.io/>
|
||||
'coverage', // Standard output directory for code coverage reports, see <https://github.com/gotwarlost/istanbul>
|
||||
'node_modules' // Where Node modules are installed, see <https://nodejs.org/>
|
||||
|
||||
2
node_modules/ignore-by-default/package.json
generated
vendored
2
node_modules/ignore-by-default/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ignore-by-default",
|
||||
"version": "2.0.0",
|
||||
"version": "2.1.0",
|
||||
"description": "A list of directories you should ignore by default",
|
||||
"engines": {
|
||||
"node": ">=10 <11 || >=12 <13 || >=14"
|
||||
|
||||
18
node_modules/is-typedarray/LICENSE.md
generated
vendored
18
node_modules/is-typedarray/LICENSE.md
generated
vendored
@@ -1,18 +0,0 @@
|
||||
This software is released under the MIT license:
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
16
node_modules/is-typedarray/README.md
generated
vendored
16
node_modules/is-typedarray/README.md
generated
vendored
@@ -1,16 +0,0 @@
|
||||
# is-typedarray [](http://github.com/badges/stability-badges)
|
||||
|
||||
Detect whether or not an object is a
|
||||
[Typed Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays).
|
||||
|
||||
## Usage
|
||||
|
||||
[](https://nodei.co/npm/is-typedarray/)
|
||||
|
||||
### isTypedArray(array)
|
||||
|
||||
Returns `true` when array is a Typed Array, and `false` when it is not.
|
||||
|
||||
## License
|
||||
|
||||
MIT. See [LICENSE.md](http://github.com/hughsk/is-typedarray/blob/master/LICENSE.md) for details.
|
||||
41
node_modules/is-typedarray/index.js
generated
vendored
41
node_modules/is-typedarray/index.js
generated
vendored
@@ -1,41 +0,0 @@
|
||||
module.exports = isTypedArray
|
||||
isTypedArray.strict = isStrictTypedArray
|
||||
isTypedArray.loose = isLooseTypedArray
|
||||
|
||||
var toString = Object.prototype.toString
|
||||
var names = {
|
||||
'[object Int8Array]': true
|
||||
, '[object Int16Array]': true
|
||||
, '[object Int32Array]': true
|
||||
, '[object Uint8Array]': true
|
||||
, '[object Uint8ClampedArray]': true
|
||||
, '[object Uint16Array]': true
|
||||
, '[object Uint32Array]': true
|
||||
, '[object Float32Array]': true
|
||||
, '[object Float64Array]': true
|
||||
}
|
||||
|
||||
function isTypedArray(arr) {
|
||||
return (
|
||||
isStrictTypedArray(arr)
|
||||
|| isLooseTypedArray(arr)
|
||||
)
|
||||
}
|
||||
|
||||
function isStrictTypedArray(arr) {
|
||||
return (
|
||||
arr instanceof Int8Array
|
||||
|| arr instanceof Int16Array
|
||||
|| arr instanceof Int32Array
|
||||
|| arr instanceof Uint8Array
|
||||
|| arr instanceof Uint8ClampedArray
|
||||
|| arr instanceof Uint16Array
|
||||
|| arr instanceof Uint32Array
|
||||
|| arr instanceof Float32Array
|
||||
|| arr instanceof Float64Array
|
||||
)
|
||||
}
|
||||
|
||||
function isLooseTypedArray(arr) {
|
||||
return names[toString.call(arr)]
|
||||
}
|
||||
30
node_modules/is-typedarray/package.json
generated
vendored
30
node_modules/is-typedarray/package.json
generated
vendored
@@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "is-typedarray",
|
||||
"version": "1.0.0",
|
||||
"description": "Detect whether or not an object is a Typed Array",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "node test"
|
||||
},
|
||||
"author": "Hugh Kennedy <hughskennedy@gmail.com> (http://hughsk.io/)",
|
||||
"license": "MIT",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"tape": "^2.13.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/hughsk/is-typedarray.git"
|
||||
},
|
||||
"keywords": [
|
||||
"typed",
|
||||
"array",
|
||||
"detect",
|
||||
"is",
|
||||
"util"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/hughsk/is-typedarray/issues"
|
||||
},
|
||||
"homepage": "https://github.com/hughsk/is-typedarray"
|
||||
}
|
||||
34
node_modules/is-typedarray/test.js
generated
vendored
34
node_modules/is-typedarray/test.js
generated
vendored
@@ -1,34 +0,0 @@
|
||||
var test = require('tape')
|
||||
var ista = require('./')
|
||||
|
||||
test('strict', function(t) {
|
||||
t.ok(ista.strict(new Int8Array), 'Int8Array')
|
||||
t.ok(ista.strict(new Int16Array), 'Int16Array')
|
||||
t.ok(ista.strict(new Int32Array), 'Int32Array')
|
||||
t.ok(ista.strict(new Uint8Array), 'Uint8Array')
|
||||
t.ok(ista.strict(new Uint16Array), 'Uint16Array')
|
||||
t.ok(ista.strict(new Uint32Array), 'Uint32Array')
|
||||
t.ok(ista.strict(new Float32Array), 'Float32Array')
|
||||
t.ok(ista.strict(new Float64Array), 'Float64Array')
|
||||
|
||||
t.ok(!ista.strict(new Array), 'Array')
|
||||
t.ok(!ista.strict([]), '[]')
|
||||
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('loose', function(t) {
|
||||
t.ok(ista.loose(new Int8Array), 'Int8Array')
|
||||
t.ok(ista.loose(new Int16Array), 'Int16Array')
|
||||
t.ok(ista.loose(new Int32Array), 'Int32Array')
|
||||
t.ok(ista.loose(new Uint8Array), 'Uint8Array')
|
||||
t.ok(ista.loose(new Uint16Array), 'Uint16Array')
|
||||
t.ok(ista.loose(new Uint32Array), 'Uint32Array')
|
||||
t.ok(ista.loose(new Float32Array), 'Float32Array')
|
||||
t.ok(ista.loose(new Float64Array), 'Float64Array')
|
||||
|
||||
t.ok(!ista.loose(new Array), 'Array')
|
||||
t.ok(!ista.loose([]), '[]')
|
||||
|
||||
t.end()
|
||||
})
|
||||
15
node_modules/is-unicode-supported/index.js
generated
vendored
15
node_modules/is-unicode-supported/index.js
generated
vendored
@@ -1,12 +1,15 @@
|
||||
import process from 'node:process';
|
||||
|
||||
export default function isUnicodeSupported() {
|
||||
if (process.platform !== 'win32') {
|
||||
return process.env.TERM !== 'linux'; // Linux console (kernel)
|
||||
}
|
||||
|
||||
return Boolean(process.env.CI) ||
|
||||
Boolean(process.env.WT_SESSION) || // Windows Terminal
|
||||
process.env.ConEmuTask === '{cmd::Cmder}' || // ConEmu and cmder
|
||||
process.env.TERM_PROGRAM === 'vscode' ||
|
||||
process.env.TERM === 'xterm-256color' ||
|
||||
process.env.TERM === 'alacritty';
|
||||
return Boolean(process.env.CI)
|
||||
|| Boolean(process.env.WT_SESSION) // Windows Terminal
|
||||
|| process.env.ConEmuTask === '{cmd::Cmder}' // ConEmu and cmder
|
||||
|| process.env.TERM_PROGRAM === 'vscode'
|
||||
|| process.env.TERM === 'xterm-256color'
|
||||
|| process.env.TERM === 'alacritty'
|
||||
|| process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
|
||||
}
|
||||
|
||||
8
node_modules/is-unicode-supported/package.json
generated
vendored
8
node_modules/is-unicode-supported/package.json
generated
vendored
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "is-unicode-supported",
|
||||
"version": "1.1.0",
|
||||
"version": "1.2.0",
|
||||
"description": "Detect whether the terminal supports Unicode",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/is-unicode-supported",
|
||||
@@ -36,8 +36,8 @@
|
||||
"detection"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.14.0",
|
||||
"xo": "^0.38.2"
|
||||
"ava": "^4.0.1",
|
||||
"tsd": "^0.19.1",
|
||||
"xo": "^0.47.0"
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user