From 28e807a47c756757845e9f1429e54cd8ef7bc8ba Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sat, 28 Sep 2019 20:47:50 +0900
Subject: [PATCH 01/28] Add GitHub NodeJS workflow.
---
.github/workflows/nodejs.yml | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
create mode 100644 .github/workflows/nodejs.yml
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
new file mode 100644
index 0000000..b15baf3
--- /dev/null
+++ b/.github/workflows/nodejs.yml
@@ -0,0 +1,26 @@
+name: Node CI
+
+on: [push]
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [8.x, 10.x, 12.x]
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: npm install, build, and test
+ run: |
+ npm install
+ npm run build --if-present
+ npm test
+ env:
+ CI: true
From 91079d9333a26e9112eb6bb48bdd45abbac820c7 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sat, 28 Sep 2019 20:54:33 +0900
Subject: [PATCH 02/28] Remove obsolete travis config.
---
.travis.yml | 3 ---
1 file changed, 3 deletions(-)
delete mode 100644 .travis.yml
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 7a56d2a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-language: node_js
-node_js:
- - "stable"
From 2217a3aeaba6b0376a63baca648f3471663a5710 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 20 Oct 2019 15:34:30 +0900
Subject: [PATCH 03/28] Run workflow on push and pull_request.
Format YAML with prettier.
---
.github/workflows/nodejs.yml | 27 +++++++++++++--------------
1 file changed, 13 insertions(+), 14 deletions(-)
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index b15baf3..89973ab 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -1,10 +1,9 @@
name: Node CI
-on: [push]
+on: [push, pull_request]
jobs:
build:
-
runs-on: ubuntu-latest
strategy:
@@ -12,15 +11,15 @@ jobs:
node-version: [8.x, 10.x, 12.x]
steps:
- - uses: actions/checkout@v1
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node-version }}
- - name: npm install, build, and test
- run: |
- npm install
- npm run build --if-present
- npm test
- env:
- CI: true
+ - uses: actions/checkout@v1
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: npm install, build, and test
+ run: |
+ npm install
+ npm run build --if-present
+ npm test
+ env:
+ CI: true
From 0b02d7d7e3c36b62c0f43ae08e3a9dae489fbbca Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 3 Nov 2019 10:24:45 +0900
Subject: [PATCH 04/28] Add GitHub Sponsors config.
---
.github/FUNDING.yml | 1 +
1 file changed, 1 insertion(+)
create mode 100644 .github/FUNDING.yml
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 0000000..048b1cf
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: [blueimp]
From 1ca0ada3c55d49b02daafd46fc112c381988233c Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 26 Mar 2020 21:01:02 +0900
Subject: [PATCH 05/28] Drop support for NodeJS 8.
---
.github/workflows/nodejs.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index 89973ab..71ea8eb 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
- node-version: [8.x, 10.x, 12.x]
+ node-version: [10.x, 12.x]
steps:
- uses: actions/checkout@v1
From 58b69e6eba9e9708bceea490001549e0e4ee2248 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 26 Mar 2020 21:02:49 +0900
Subject: [PATCH 06/28] Update dev dependencies.
---
package-lock.json | 1093 +++++++++++++++++++++++------------------
package.json | 4 +-
test/vendor/mocha.css | 1 -
test/vendor/mocha.js | 862 ++++++++++++++++++--------------
4 files changed, 1099 insertions(+), 861 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 71db433..08c7879 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,44 +5,56 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
- "version": "7.5.5",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz",
- "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==",
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
+ "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.0.0"
+ "@babel/highlight": "^7.8.3"
}
},
+ "@babel/helper-validator-identifier": {
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
+ "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
+ "dev": true
+ },
"@babel/highlight": {
- "version": "7.5.0",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz",
- "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==",
+ "version": "7.9.0",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
+ "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
"dev": true,
"requires": {
+ "@babel/helper-validator-identifier": "^7.9.0",
"chalk": "^2.0.0",
- "esutils": "^2.0.2",
"js-tokens": "^4.0.0"
}
},
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+ "dev": true
+ },
"acorn": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz",
- "integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
+ "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
"dev": true
},
"acorn-jsx": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz",
- "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
+ "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
"dev": true
},
"ajv": {
- "version": "6.10.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz",
- "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==",
+ "version": "6.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
+ "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
"dev": true,
"requires": {
- "fast-deep-equal": "^2.0.1",
+ "fast-deep-equal": "^3.1.1",
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
@@ -55,15 +67,26 @@
"dev": true
},
"ansi-escapes": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz",
- "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==",
- "dev": true
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
+ "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.11.0"
+ },
+ "dependencies": {
+ "type-fest": {
+ "version": "0.11.0",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
+ "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
+ "dev": true
+ }
+ }
},
"ansi-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
- "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
"dev": true
},
"ansi-styles": {
@@ -75,6 +98,16 @@
"color-convert": "^1.9.0"
}
},
+ "anymatch": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
+ "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
"argparse": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
@@ -102,6 +135,12 @@
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
+ "binary-extensions": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
+ "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
+ "dev": true
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -112,6 +151,15 @@
"concat-map": "0.0.1"
}
},
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
"browser-stdout": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
@@ -167,13 +215,29 @@
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
"dev": true
},
+ "chokidar": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
+ "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.1",
+ "braces": "~3.0.2",
+ "fsevents": "~2.1.1",
+ "glob-parent": "~5.1.0",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.2.0"
+ }
+ },
"cli-cursor": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz",
- "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
"dev": true,
"requires": {
- "restore-cursor": "^2.0.0"
+ "restore-cursor": "^3.1.0"
}
},
"cli-width": {
@@ -183,33 +247,41 @@
"dev": true
},
"cliui": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
- "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+ "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
"dev": true,
"requires": {
- "string-width": "^2.1.1",
- "strip-ansi": "^4.0.0",
- "wrap-ansi": "^2.0.0"
+ "string-width": "^3.1.0",
+ "strip-ansi": "^5.2.0",
+ "wrap-ansi": "^5.1.0"
},
"dependencies": {
- "strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
- "ansi-regex": "^3.0.0"
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
}
}
}
},
- "code-point-at": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
- "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
- "dev": true
- },
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -226,15 +298,15 @@
"dev": true
},
"commander": {
- "version": "2.20.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz",
- "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
},
"comment-parser": {
- "version": "0.6.2",
- "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.6.2.tgz",
- "integrity": "sha512-Wdms0Q8d4vvb2Yk72OwZjwNWtMklbC5Re7lD9cjCP/AG1fhocmc0TrxGBBAXPLy8fZQPrfHGgyygwI0lA7pbzA==",
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.2.tgz",
+ "integrity": "sha512-4Rjb1FnxtOcv9qsfuaNuVsmmVn4ooVoBHzYfyKteiXwIU84PClyGA5jASoFMwPV93+FPh9spwueXauxFJZkGAg==",
"dev": true
},
"concat-map": {
@@ -319,38 +391,34 @@
}
},
"emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
"dev": true
},
- "end-of-stream": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
- "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
- "dev": true,
- "requires": {
- "once": "^1.4.0"
- }
- },
"es-abstract": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
- "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
+ "version": "1.17.5",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
+ "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
"dev": true,
"requires": {
- "es-to-primitive": "^1.2.0",
+ "es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
- "is-callable": "^1.1.4",
- "is-regex": "^1.0.4",
- "object-keys": "^1.0.12"
+ "has-symbols": "^1.0.1",
+ "is-callable": "^1.1.5",
+ "is-regex": "^1.0.5",
+ "object-inspect": "^1.7.0",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.0",
+ "string.prototype.trimleft": "^2.1.1",
+ "string.prototype.trimright": "^2.1.1"
}
},
"es-to-primitive": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
- "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
"requires": {
"is-callable": "^1.1.4",
@@ -365,9 +433,9 @@
"dev": true
},
"eslint": {
- "version": "6.2.2",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.2.2.tgz",
- "integrity": "sha512-mf0elOkxHbdyGX1IJEUsNBzCDdyoUgljF3rRlgfyYh0pwGnreLc0jjD6ZuleOibjmnUWZLY2eXwSooeOgGJ2jw==",
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
+ "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -377,19 +445,19 @@
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^5.0.0",
- "eslint-utils": "^1.4.2",
+ "eslint-utils": "^1.4.3",
"eslint-visitor-keys": "^1.1.0",
- "espree": "^6.1.1",
+ "espree": "^6.1.2",
"esquery": "^1.0.1",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
"glob-parent": "^5.0.0",
- "globals": "^11.7.0",
+ "globals": "^12.1.0",
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
- "inquirer": "^6.4.1",
+ "inquirer": "^7.0.0",
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
@@ -398,7 +466,7 @@
"minimatch": "^3.0.4",
"mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
- "optionator": "^0.8.2",
+ "optionator": "^0.8.3",
"progress": "^2.0.0",
"regexpp": "^2.0.1",
"semver": "^6.1.2",
@@ -410,38 +478,39 @@
}
},
"eslint-config-blueimp": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-1.4.0.tgz",
- "integrity": "sha512-OWTLOSmsjDglgNvKKtb0t3iRPpyzFvXszXJkSS1w5oqkgVmFaKiNeoU6qOyZF2Q78rIog77RgIhzyA387b+7qA==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-1.9.0.tgz",
+ "integrity": "sha512-30uqxKoc3/AAn7H2lzISh77SRAecZ3D52RBwLdrV5G/ZorWcPNX0ZnlTz68AnaXoIXFu6irkMs1Zi/KJaA5ZJQ==",
"dev": true
},
"eslint-config-prettier": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.1.0.tgz",
- "integrity": "sha512-k9fny9sPjIBQ2ftFTesJV21Rg4R/7a7t7LCtZVrYQiHEp8Nnuk3EGaDmsKSAnsPj0BYcgB2zxzHa2NTkIxcOLg==",
+ "version": "6.10.1",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz",
+ "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==",
"dev": true,
"requires": {
"get-stdin": "^6.0.0"
}
},
"eslint-plugin-jsdoc": {
- "version": "15.8.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-15.8.3.tgz",
- "integrity": "sha512-p2O6SYetuSD5gWV04HHevIfp2WfimXReYwINuB4iC33hm1jrYoP+t2XbJtCBYvjhoRjjw8w4NfnyZKixte1fug==",
+ "version": "22.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz",
+ "integrity": "sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg==",
"dev": true,
"requires": {
- "comment-parser": "^0.6.2",
+ "comment-parser": "^0.7.2",
"debug": "^4.1.1",
- "jsdoctypeparser": "5.0.1",
+ "jsdoctypeparser": "^6.1.0",
"lodash": "^4.17.15",
- "object.entries-ponyfill": "^1.0.1",
- "regextras": "^0.6.1"
+ "regextras": "^0.7.0",
+ "semver": "^6.3.0",
+ "spdx-expression-parse": "^3.0.0"
}
},
"eslint-plugin-prettier": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz",
- "integrity": "sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA==",
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz",
+ "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
@@ -458,12 +527,12 @@
}
},
"eslint-utils": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz",
- "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==",
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+ "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
"dev": true,
"requires": {
- "eslint-visitor-keys": "^1.0.0"
+ "eslint-visitor-keys": "^1.1.0"
}
},
"eslint-visitor-keys": {
@@ -473,13 +542,13 @@
"dev": true
},
"espree": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz",
- "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==",
+ "version": "6.2.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
+ "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
"dev": true,
"requires": {
- "acorn": "^7.0.0",
- "acorn-jsx": "^5.0.2",
+ "acorn": "^7.1.1",
+ "acorn-jsx": "^5.2.0",
"eslint-visitor-keys": "^1.1.0"
}
},
@@ -490,12 +559,20 @@
"dev": true
},
"esquery": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz",
- "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz",
+ "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==",
"dev": true,
"requires": {
- "estraverse": "^4.0.0"
+ "estraverse": "^5.0.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz",
+ "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==",
+ "dev": true
+ }
}
},
"esrecurse": {
@@ -519,21 +596,6 @@
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
- "execa": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
- "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
- "dev": true,
- "requires": {
- "cross-spawn": "^6.0.0",
- "get-stream": "^4.0.0",
- "is-stream": "^1.1.0",
- "npm-run-path": "^2.0.0",
- "p-finally": "^1.0.0",
- "signal-exit": "^3.0.0",
- "strip-eof": "^1.0.0"
- }
- },
"external-editor": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
@@ -546,9 +608,9 @@
}
},
"fast-deep-equal": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
- "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
+ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
"dev": true
},
"fast-diff": {
@@ -558,9 +620,9 @@
"dev": true
},
"fast-json-stable-stringify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
- "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
"dev": true
},
"fast-levenshtein": {
@@ -570,9 +632,9 @@
"dev": true
},
"figures": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz",
- "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=",
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
"dev": true,
"requires": {
"escape-string-regexp": "^1.0.5"
@@ -587,6 +649,15 @@
"flat-cache": "^2.0.1"
}
},
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
"find-up": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
@@ -628,6 +699,13 @@
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
},
+ "fsevents": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
+ "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
+ "dev": true,
+ "optional": true
+ },
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
@@ -658,19 +736,10 @@
"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
"dev": true
},
- "get-stream": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
- "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
- "dev": true,
- "requires": {
- "pump": "^3.0.0"
- }
- },
"glob": {
- "version": "7.1.4",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
- "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
@@ -682,19 +751,22 @@
}
},
"glob-parent": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz",
- "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==",
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
+ "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
"dev": true,
"requires": {
"is-glob": "^4.0.1"
}
},
"globals": {
- "version": "11.12.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
- "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
- "dev": true
+ "version": "12.4.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
+ "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.8.1"
+ }
},
"growl": {
"version": "1.10.5",
@@ -718,9 +790,9 @@
"dev": true
},
"has-symbols": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
- "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+ "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
"dev": true
},
"he": {
@@ -745,9 +817,9 @@
"dev": true
},
"import-fresh": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz",
- "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==",
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
"dev": true,
"requires": {
"parent-module": "^1.0.0",
@@ -777,48 +849,112 @@
"dev": true
},
"inquirer": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz",
- "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz",
+ "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==",
"dev": true,
"requires": {
- "ansi-escapes": "^3.2.0",
- "chalk": "^2.4.2",
- "cli-cursor": "^2.1.0",
+ "ansi-escapes": "^4.2.1",
+ "chalk": "^3.0.0",
+ "cli-cursor": "^3.1.0",
"cli-width": "^2.0.0",
"external-editor": "^3.0.3",
- "figures": "^2.0.0",
- "lodash": "^4.17.12",
- "mute-stream": "0.0.7",
- "run-async": "^2.2.0",
- "rxjs": "^6.4.0",
- "string-width": "^2.1.0",
- "strip-ansi": "^5.1.0",
+ "figures": "^3.0.0",
+ "lodash": "^4.17.15",
+ "mute-stream": "0.0.8",
+ "run-async": "^2.4.0",
+ "rxjs": "^6.5.3",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0",
"through": "^2.3.6"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
}
},
- "invert-kv": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
- "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
- "dev": true
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
},
"is-buffer": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
- "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
+ "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==",
"dev": true
},
"is-callable": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
- "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
+ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
"dev": true
},
"is-date-object": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
- "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+ "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
"dev": true
},
"is-extglob": {
@@ -828,9 +964,9 @@
"dev": true
},
"is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"dev": true
},
"is-glob": {
@@ -842,6 +978,12 @@
"is-extglob": "^2.1.1"
}
},
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
"is-promise": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
@@ -849,27 +991,21 @@
"dev": true
},
"is-regex": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
- "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
+ "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
"dev": true,
"requires": {
- "has": "^1.0.1"
+ "has": "^1.0.3"
}
},
- "is-stream": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
- "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
- "dev": true
- },
"is-symbol": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
- "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+ "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
"dev": true,
"requires": {
- "has-symbols": "^1.0.0"
+ "has-symbols": "^1.0.1"
}
},
"isexe": {
@@ -895,9 +1031,9 @@
}
},
"jsdoctypeparser": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-5.0.1.tgz",
- "integrity": "sha512-dYwcK6TKzvq+ZKtbp4sbQSW9JMo6s+4YFfUs5D/K7bZsn3s1NhEhZ+jmIPzby0HbkbECBe+hNPEa6a+E21o94w==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-6.1.0.tgz",
+ "integrity": "sha512-UCQBZ3xCUBv/PLfwKAJhp6jmGOSLFNKzrotXGNgbKhWvz27wPsCsVeP7gIcHPElQw2agBmynAitXqhxR58XAmA==",
"dev": true
},
"json-schema-traverse": {
@@ -912,15 +1048,6 @@
"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
"dev": true
},
- "lcid": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
- "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
- "dev": true,
- "requires": {
- "invert-kv": "^2.0.0"
- }
- },
"levn": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
@@ -948,46 +1075,18 @@
"dev": true
},
"log-symbols": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
- "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
- "dev": true,
- "requires": {
- "chalk": "^2.0.1"
- }
- },
- "map-age-cleaner": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
- "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
- "dev": true,
- "requires": {
- "p-defer": "^1.0.0"
- }
- },
- "mem": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz",
- "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
+ "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
"dev": true,
"requires": {
- "map-age-cleaner": "^0.1.1",
- "mimic-fn": "^2.0.0",
- "p-is-promise": "^2.0.0"
- },
- "dependencies": {
- "mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true
- }
+ "chalk": "^2.4.2"
}
},
"mimic-fn": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz",
- "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
"dev": true
},
"minimatch": {
@@ -1000,28 +1099,29 @@
}
},
"minimist": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
- "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "version": "1.2.5",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
"dev": true
},
"mkdirp": {
- "version": "0.5.1",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
- "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
+ "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
"dev": true,
"requires": {
- "minimist": "0.0.8"
+ "minimist": "^1.2.5"
}
},
"mocha": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz",
- "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==",
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
+ "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==",
"dev": true,
"requires": {
"ansi-colors": "3.2.3",
"browser-stdout": "1.3.1",
+ "chokidar": "3.3.0",
"debug": "3.2.6",
"diff": "3.5.0",
"escape-string-regexp": "1.0.5",
@@ -1030,19 +1130,19 @@
"growl": "1.10.5",
"he": "1.2.0",
"js-yaml": "3.13.1",
- "log-symbols": "2.2.0",
+ "log-symbols": "3.0.0",
"minimatch": "3.0.4",
- "mkdirp": "0.5.1",
+ "mkdirp": "0.5.3",
"ms": "2.1.1",
- "node-environment-flags": "1.0.5",
+ "node-environment-flags": "1.0.6",
"object.assign": "4.1.0",
"strip-json-comments": "2.0.1",
"supports-color": "6.0.0",
"which": "1.3.1",
"wide-align": "1.1.3",
- "yargs": "13.2.2",
- "yargs-parser": "13.0.0",
- "yargs-unparser": "1.5.0"
+ "yargs": "13.3.2",
+ "yargs-parser": "13.1.2",
+ "yargs-unparser": "1.6.0"
},
"dependencies": {
"debug": {
@@ -1068,6 +1168,15 @@
"path-is-absolute": "^1.0.0"
}
},
+ "mkdirp": {
+ "version": "0.5.3",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
+ "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==",
+ "dev": true,
+ "requires": {
+ "minimist": "^1.2.5"
+ }
+ },
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
@@ -1098,9 +1207,9 @@
"dev": true
},
"mute-stream": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
- "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=",
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
"dev": true
},
"natural-compare": {
@@ -1116,9 +1225,9 @@
"dev": true
},
"node-environment-flags": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
- "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
+ "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
"dev": true,
"requires": {
"object.getownpropertydescriptors": "^2.0.3",
@@ -1133,19 +1242,16 @@
}
}
},
- "npm-run-path": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
- "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
- "dev": true,
- "requires": {
- "path-key": "^2.0.0"
- }
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
},
- "number-is-nan": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
- "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
+ "object-inspect": {
+ "version": "1.7.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
+ "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
"dev": true
},
"object-keys": {
@@ -1166,20 +1272,14 @@
"object-keys": "^1.0.11"
}
},
- "object.entries-ponyfill": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/object.entries-ponyfill/-/object.entries-ponyfill-1.0.1.tgz",
- "integrity": "sha1-Kavfd8v70mVm3RqiTp2I9lQz0lY=",
- "dev": true
- },
"object.getownpropertydescriptors": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
- "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
+ "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
"dev": true,
"requires": {
- "define-properties": "^1.1.2",
- "es-abstract": "^1.5.1"
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1"
}
},
"once": {
@@ -1192,37 +1292,26 @@
}
},
"onetime": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz",
- "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
+ "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
"dev": true,
"requires": {
- "mimic-fn": "^1.0.0"
+ "mimic-fn": "^2.1.0"
}
},
"optionator": {
- "version": "0.8.2",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
- "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
"dev": true,
"requires": {
"deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.4",
+ "fast-levenshtein": "~2.0.6",
"levn": "~0.3.0",
"prelude-ls": "~1.1.2",
"type-check": "~0.3.2",
- "wordwrap": "~1.0.0"
- }
- },
- "os-locale": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
- "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
- "dev": true,
- "requires": {
- "execa": "^1.0.0",
- "lcid": "^2.0.0",
- "mem": "^4.0.0"
+ "word-wrap": "~1.2.3"
}
},
"os-tmpdir": {
@@ -1231,28 +1320,10 @@
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true
},
- "p-defer": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
- "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
- "dev": true
- },
- "p-finally": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
- "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
- "dev": true
- },
- "p-is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz",
- "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==",
- "dev": true
- },
"p-limit": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
- "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
+ "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
"dev": true,
"requires": {
"p-try": "^2.0.0"
@@ -1306,6 +1377,12 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
+ "picomatch": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
+ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
+ "dev": true
+ },
"prelude-ls": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
@@ -1313,9 +1390,9 @@
"dev": true
},
"prettier": {
- "version": "1.18.2",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.18.2.tgz",
- "integrity": "sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw==",
+ "version": "1.19.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
+ "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
"dev": true
},
"prettier-linter-helpers": {
@@ -1333,22 +1410,21 @@
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
- "pump": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
- "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
- "dev": true,
- "requires": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
+ "readdirp": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
+ "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.0.4"
+ }
+ },
"regexpp": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
@@ -1356,9 +1432,9 @@
"dev": true
},
"regextras": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.6.1.tgz",
- "integrity": "sha512-EzIHww9xV2Kpqx+corS/I7OBmf2rZ0pKKJPsw5Dc+l6Zq1TslDmtRIP9maVn3UH+72MIXmn8zzDgP07ihQogUA==",
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.0.tgz",
+ "integrity": "sha512-ds+fL+Vhl918gbAUb0k2gVKbTZLsg84Re3DI6p85Et0U0tYME3hyW4nMK8Px4dtDaBA2qNjvG5uWyW7eK5gfmw==",
"dev": true
},
"require-directory": {
@@ -1380,12 +1456,12 @@
"dev": true
},
"restore-cursor": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
- "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
"dev": true,
"requires": {
- "onetime": "^2.0.0",
+ "onetime": "^5.1.0",
"signal-exit": "^3.0.2"
}
},
@@ -1399,18 +1475,18 @@
}
},
"run-async": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz",
- "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=",
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
+ "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
"dev": true,
"requires": {
"is-promise": "^2.1.0"
}
},
"rxjs": {
- "version": "6.5.2",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz",
- "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==",
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
+ "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
@@ -1464,6 +1540,14 @@
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0"
+ },
+ "dependencies": {
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ }
}
},
"source-map": {
@@ -1472,6 +1556,28 @@
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
+ "spdx-exceptions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
+ "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
+ "dev": true
+ },
+ "spdx-expression-parse": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
+ "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+ "dev": true,
+ "requires": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "spdx-license-ids": {
+ "version": "3.0.5",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
+ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
+ "dev": true
+ },
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
@@ -1479,26 +1585,47 @@
"dev": true
},
"string-width": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
- "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
"dev": true,
"requires": {
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^4.0.0"
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
},
"dependencies": {
"strip-ansi": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
- "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
- "ansi-regex": "^3.0.0"
+ "ansi-regex": "^5.0.0"
}
}
}
},
+ "string.prototype.trimleft": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
+ "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
+ "string.prototype.trimright": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
+ "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "function-bind": "^1.1.1"
+ }
+ },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -1516,12 +1643,6 @@
}
}
},
- "strip-eof": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
- "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
- "dev": true
- },
"strip-json-comments": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
@@ -1549,6 +1670,18 @@
"string-width": "^3.0.0"
},
"dependencies": {
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@@ -1583,10 +1716,19 @@
"os-tmpdir": "~1.0.2"
}
},
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
"tslib": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz",
- "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==",
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
+ "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
"dev": true
},
"type-check": {
@@ -1604,13 +1746,19 @@
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
"dev": true
},
+ "type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "dev": true
+ },
"uglify-js": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
- "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
+ "version": "3.8.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz",
+ "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==",
"dev": true,
"requires": {
- "commander": "~2.20.0",
+ "commander": "~2.20.3",
"source-map": "~0.6.1"
}
},
@@ -1651,57 +1799,79 @@
"dev": true,
"requires": {
"string-width": "^1.0.2 || 2"
- }
- },
- "wordwrap": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
- "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
- "dev": true
- },
- "wrap-ansi": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
- "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
- "dev": true,
- "requires": {
- "string-width": "^1.0.1",
- "strip-ansi": "^3.0.1"
},
"dependencies": {
"ansi-regex": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
- "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
"is-fullwidth-code-point": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
- "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+ "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
- "number-is-nan": "^1.0.0"
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^4.0.0"
}
},
- "string-width": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
- "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
+ "strip-ansi": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+ "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
- "code-point-at": "^1.0.0",
- "is-fullwidth-code-point": "^1.0.0",
- "strip-ansi": "^3.0.0"
+ "ansi-regex": "^3.0.0"
}
+ }
+ }
+ },
+ "word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+ "dev": true
+ },
+ "wrap-ansi": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+ "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.0",
+ "string-width": "^3.0.0",
+ "strip-ansi": "^5.0.0"
+ },
+ "dependencies": {
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
},
- "strip-ansi": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
- "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
- "ansi-regex": "^2.0.0"
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
}
}
}
@@ -1728,24 +1898,35 @@
"dev": true
},
"yargs": {
- "version": "13.2.2",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
- "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
+ "version": "13.3.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+ "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
"dev": true,
"requires": {
- "cliui": "^4.0.0",
+ "cliui": "^5.0.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
- "os-locale": "^3.1.0",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
- "yargs-parser": "^13.0.0"
+ "yargs-parser": "^13.1.2"
},
"dependencies": {
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
@@ -1760,9 +1941,9 @@
}
},
"yargs-parser": {
- "version": "13.0.0",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
- "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
+ "version": "13.1.2",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+ "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
"dev": true,
"requires": {
"camelcase": "^5.0.0",
@@ -1770,58 +1951,14 @@
}
},
"yargs-unparser": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz",
- "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==",
+ "version": "1.6.0",
+ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
+ "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
"dev": true,
"requires": {
"flat": "^4.1.0",
- "lodash": "^4.17.11",
- "yargs": "^12.0.5"
- },
- "dependencies": {
- "get-caller-file": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
- "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
- "dev": true
- },
- "require-main-filename": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
- "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
- "dev": true
- },
- "yargs": {
- "version": "12.0.5",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
- "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
- "dev": true,
- "requires": {
- "cliui": "^4.0.0",
- "decamelize": "^1.2.0",
- "find-up": "^3.0.0",
- "get-caller-file": "^1.0.1",
- "os-locale": "^3.0.0",
- "require-directory": "^2.1.1",
- "require-main-filename": "^1.0.1",
- "set-blocking": "^2.0.0",
- "string-width": "^2.0.0",
- "which-module": "^2.0.0",
- "y18n": "^3.2.1 || ^4.0.0",
- "yargs-parser": "^11.1.1"
- }
- },
- "yargs-parser": {
- "version": "11.1.1",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
- "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
- "dev": true,
- "requires": {
- "camelcase": "^5.0.0",
- "decamelize": "^1.2.0"
- }
- }
+ "lodash": "^4.17.15",
+ "yargs": "^13.3.0"
}
}
}
diff --git a/package.json b/package.json
index ba2ea94..32d7ece 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,9 @@
"eslint": "6",
"eslint-config-blueimp": "1",
"eslint-config-prettier": "6",
- "eslint-plugin-jsdoc": "15",
+ "eslint-plugin-jsdoc": "22",
"eslint-plugin-prettier": "3",
- "mocha": "6",
+ "mocha": "7",
"prettier": "1",
"uglify-js": "3"
},
diff --git a/test/vendor/mocha.css b/test/vendor/mocha.css
index ec96b00..4ca8fcb 100644
--- a/test/vendor/mocha.css
+++ b/test/vendor/mocha.css
@@ -139,7 +139,6 @@ body {
#mocha .test .html-error {
overflow: auto;
color: black;
- line-height: 1.5;
display: block;
float: left;
clear: left;
diff --git a/test/vendor/mocha.js b/test/vendor/mocha.js
index 508a306..5be2b9e 100644
--- a/test/vendor/mocha.js
+++ b/test/vendor/mocha.js
@@ -62,7 +62,7 @@ process.on = function(e, fn) {
if (e === 'uncaughtException') {
global.onerror = function(err, url, line) {
fn(new Error(err + ' (' + url + ':' + line + ')'));
- return !mocha.allowUncaught;
+ return !mocha.options.allowUncaught;
};
uncaughtExceptionHandlers.push(fn);
}
@@ -131,7 +131,7 @@ mocha.setup = function(opts) {
opts = {ui: opts};
}
for (var opt in opts) {
- if (opts.hasOwnProperty(opt)) {
+ if (Object.prototype.hasOwnProperty.call(opts, opt)) {
this[opt](opts[opt]);
}
}
@@ -1408,6 +1408,7 @@ var utils = require('./utils');
var mocharc = require('./mocharc.json');
var errors = require('./errors');
var Suite = require('./suite');
+var esmUtils = utils.supportsEsModules() ? require('./esm-utils') : undefined;
var createStatsCollector = require('./stats-collector');
var createInvalidReporterError = errors.createInvalidReporterError;
var createInvalidInterfaceError = errors.createInvalidInterfaceError;
@@ -1463,28 +1464,26 @@ exports.Test = require('./test');
* @param {boolean} [options.allowUncaught] - Propagate uncaught errors?
* @param {boolean} [options.asyncOnly] - Force `done` callback or promise?
* @param {boolean} [options.bail] - Bail after first test failure?
- * @param {boolean} [options.checkLeaks] - If true, check leaks.
+ * @param {boolean} [options.checkLeaks] - Check for global variable leaks?
+ * @param {boolean} [options.color] - Color TTY output from reporter?
* @param {boolean} [options.delay] - Delay root suite execution?
- * @param {boolean} [options.enableTimeouts] - Enable timeouts?
+ * @param {boolean} [options.diff] - Show diff on failure?
* @param {string} [options.fgrep] - Test filter given string.
* @param {boolean} [options.forbidOnly] - Tests marked `only` fail the suite?
* @param {boolean} [options.forbidPending] - Pending tests fail the suite?
- * @param {boolean} [options.fullStackTrace] - Full stacktrace upon failure?
+ * @param {boolean} [options.fullTrace] - Full stacktrace upon failure?
* @param {string[]} [options.global] - Variables expected in global scope.
* @param {RegExp|string} [options.grep] - Test filter given regular expression.
* @param {boolean} [options.growl] - Enable desktop notifications?
- * @param {boolean} [options.hideDiff] - Suppress diffs from failures?
- * @param {boolean} [options.ignoreLeaks] - Ignore global leaks?
+ * @param {boolean} [options.inlineDiffs] - Display inline diffs?
* @param {boolean} [options.invert] - Invert test filter matches?
* @param {boolean} [options.noHighlighting] - Disable syntax highlighting?
- * @param {string} [options.reporter] - Reporter name.
+ * @param {string|constructor} [options.reporter] - Reporter name or constructor.
* @param {Object} [options.reporterOption] - Reporter settings object.
* @param {number} [options.retries] - Number of times to retry failed tests.
* @param {number} [options.slow] - Slow threshold value.
* @param {number|string} [options.timeout] - Timeout threshold value.
* @param {string} [options.ui] - Interface name.
- * @param {boolean} [options.color] - Color TTY output from reporter?
- * @param {boolean} [options.useInlineDiffs] - Use inline diffs?
*/
function Mocha(options) {
options = utils.assign({}, mocharc, options || {});
@@ -1493,31 +1492,15 @@ function Mocha(options) {
// root suite
this.suite = new exports.Suite('', new exports.Context(), true);
- if ('useColors' in options) {
- utils.deprecate(
- 'useColors is DEPRECATED and will be removed from a future version of Mocha. Instead, use the "color" option'
- );
- options.color = 'color' in options ? options.color : options.useColors;
- }
-
this.grep(options.grep)
.fgrep(options.fgrep)
.ui(options.ui)
- .bail(options.bail)
- .reporter(options.reporter, options.reporterOptions)
- .useColors(options.color)
+ .reporter(
+ options.reporter,
+ options.reporterOption || options.reporterOptions // reporterOptions was previously the only way to specify options to reporter
+ )
.slow(options.slow)
- .useInlineDiffs(options.inlineDiffs)
- .globals(options.globals);
-
- if ('enableTimeouts' in options) {
- utils.deprecate(
- 'enableTimeouts is DEPRECATED and will be removed from a future version of Mocha. Instead, use "timeout: false" to disable timeouts.'
- );
- if (options.enableTimeouts === false) {
- this.timeout(0);
- }
- }
+ .global(options.global);
// this guard exists because Suite#timeout does not consider `undefined` to be valid input
if (typeof options.timeout !== 'undefined') {
@@ -1528,19 +1511,19 @@ function Mocha(options) {
this.retries(options.retries);
}
- if ('diff' in options) {
- this.hideDiff(!options.diff);
- }
-
[
'allowUncaught',
'asyncOnly',
+ 'bail',
'checkLeaks',
+ 'color',
'delay',
+ 'diff',
'forbidOnly',
'forbidPending',
'fullTrace',
'growl',
+ 'inlineDiffs',
'invert'
].forEach(function(opt) {
if (options[opt]) {
@@ -1553,16 +1536,13 @@ function Mocha(options) {
* Enables or disables bailing on the first failure.
*
* @public
- * @see {@link https://mochajs.org/#-b---bail|CLI option}
+ * @see [CLI option](../#-bail-b)
* @param {boolean} [bail=true] - Whether to bail on first error.
* @returns {Mocha} this
* @chainable
*/
Mocha.prototype.bail = function(bail) {
- if (!arguments.length) {
- bail = true;
- }
- this.suite.bail(bail);
+ this.suite.bail(bail !== false);
return this;
};
@@ -1574,7 +1554,7 @@ Mocha.prototype.bail = function(bail) {
* Useful for generic setup code that must be included within test suite.
*
* @public
- * @see {@link https://mochajs.org/#--file-file|CLI option}
+ * @see [CLI option](../#-file-filedirectoryglob)
* @param {string} file - Pathname of file to be loaded.
* @returns {Mocha} this
* @chainable
@@ -1588,8 +1568,8 @@ Mocha.prototype.addFile = function(file) {
* Sets reporter to `reporter`, defaults to "spec".
*
* @public
- * @see {@link https://mochajs.org/#-r---reporter-name|CLI option}
- * @see {@link https://mochajs.org/#reporters|Reporters}
+ * @see [CLI option](../#-reporter-name-r-name)
+ * @see [Reporters](../#reporters)
* @param {String|Function} reporter - Reporter name or constructor.
* @param {Object} [reporterOptions] - Options used to configure the reporter.
* @returns {Mocha} this
@@ -1647,6 +1627,8 @@ Mocha.prototype.reporter = function(reporter, reporterOptions) {
}
this._reporter = _reporter;
}
+ this.options.reporterOption = reporterOptions;
+ // alias option name is used in public reporters xunit/tap/progress
this.options.reporterOptions = reporterOptions;
return this;
};
@@ -1655,8 +1637,8 @@ Mocha.prototype.reporter = function(reporter, reporterOptions) {
* Sets test UI `name`, defaults to "bdd".
*
* @public
- * @see {@link https://mochajs.org/#-u---ui-name|CLI option}
- * @see {@link https://mochajs.org/#interfaces|Interface DSLs}
+ * @see [CLI option](../#-ui-name-u-name)
+ * @see [Interface DSLs](../#interfaces)
* @param {string|Function} [ui=bdd] - Interface name or class.
* @returns {Mocha} this
* @chainable
@@ -1703,16 +1685,18 @@ Mocha.prototype.ui = function(ui) {
};
/**
- * Loads `files` prior to execution.
+ * Loads `files` prior to execution. Does not support ES Modules.
*
* @description
* The implementation relies on Node's `require` to execute
* the test interface functions and will be subject to its cache.
+ * Supports only CommonJS modules. To load ES modules, use Mocha#loadFilesAsync.
*
* @private
* @see {@link Mocha#addFile}
* @see {@link Mocha#run}
* @see {@link Mocha#unloadFiles}
+ * @see {@link Mocha#loadFilesAsync}
* @param {Function} [fn] - Callback invoked upon completion.
*/
Mocha.prototype.loadFiles = function(fn) {
@@ -1727,6 +1711,49 @@ Mocha.prototype.loadFiles = function(fn) {
fn && fn();
};
+/**
+ * Loads `files` prior to execution. Supports Node ES Modules.
+ *
+ * @description
+ * The implementation relies on Node's `require` and `import` to execute
+ * the test interface functions and will be subject to its cache.
+ * Supports both CJS and ESM modules.
+ *
+ * @public
+ * @see {@link Mocha#addFile}
+ * @see {@link Mocha#run}
+ * @see {@link Mocha#unloadFiles}
+ * @returns {Promise}
+ * @example
+ *
+ * // loads ESM (and CJS) test files asynchronously, then runs root suite
+ * mocha.loadFilesAsync()
+ * .then(() => mocha.run(failures => process.exitCode = failures ? 1 : 0))
+ * .catch(() => process.exitCode = 1);
+ */
+Mocha.prototype.loadFilesAsync = function() {
+ var self = this;
+ var suite = this.suite;
+ this.loadAsync = true;
+
+ if (!esmUtils) {
+ return new Promise(function(resolve) {
+ self.loadFiles(resolve);
+ });
+ }
+
+ return esmUtils.loadFilesAsync(
+ this.files,
+ function(file) {
+ suite.emit(EVENT_FILE_PRE_REQUIRE, global, file, self);
+ },
+ function(file, resultModule) {
+ suite.emit(EVENT_FILE_REQUIRE, resultModule, file, self);
+ suite.emit(EVENT_FILE_POST_REQUIRE, global, file, self);
+ }
+ );
+};
+
/**
* Removes a previously loaded file from Node's `require` cache.
*
@@ -1743,14 +1770,13 @@ Mocha.unloadFile = function(file) {
* Unloads `files` from Node's `require` cache.
*
* @description
- * This allows files to be "freshly" reloaded, providing the ability
+ * This allows required files to be "freshly" reloaded, providing the ability
* to reuse a Mocha instance programmatically.
+ * Note: does not clear ESM module files from the cache
*
* Intended for consumers — not used internally
*
* @public
- * @see {@link Mocha.unloadFile}
- * @see {@link Mocha#loadFiles}
* @see {@link Mocha#run}
* @returns {Mocha} this
* @chainable
@@ -1794,7 +1820,7 @@ Mocha.prototype.fgrep = function(str) {
* Previous filter value will be overwritten on each call!
*
* @public
- * @see {@link https://mochajs.org/#-g---grep-pattern|CLI option}
+ * @see [CLI option](../#-grep-regexp-g-regexp)
* @see {@link Mocha#fgrep}
* @see {@link Mocha#invert}
* @param {RegExp|String} re - Regular expression used to select tests.
@@ -1845,32 +1871,32 @@ Mocha.prototype.invert = function() {
/**
* Enables or disables ignoring global leaks.
*
+ * @deprecated since v7.0.0
* @public
* @see {@link Mocha#checkLeaks}
- * @param {boolean} ignoreLeaks - Whether to ignore global leaks.
+ * @param {boolean} [ignoreLeaks=false] - Whether to ignore global leaks.
* @return {Mocha} this
* @chainable
- * @example
- *
- * // Ignore global leaks
- * mocha.ignoreLeaks(true);
*/
Mocha.prototype.ignoreLeaks = function(ignoreLeaks) {
- this.options.ignoreLeaks = Boolean(ignoreLeaks);
+ utils.deprecate(
+ '"ignoreLeaks()" is DEPRECATED, please use "checkLeaks()" instead.'
+ );
+ this.options.checkLeaks = !ignoreLeaks;
return this;
};
/**
- * Enables checking for global variables leaked while running tests.
+ * Enables or disables checking for global variables leaked while running tests.
*
* @public
- * @see {@link https://mochajs.org/#--check-leaks|CLI option}
- * @see {@link Mocha#ignoreLeaks}
+ * @see [CLI option](../#-check-leaks)
+ * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.checkLeaks = function() {
- this.options.ignoreLeaks = false;
+Mocha.prototype.checkLeaks = function(checkLeaks) {
+ this.options.checkLeaks = checkLeaks !== false;
return this;
};
@@ -1878,11 +1904,13 @@ Mocha.prototype.checkLeaks = function() {
* Displays full stack trace upon test failure.
*
* @public
+ * @see [CLI option](../#-full-trace)
+ * @param {boolean} [fullTrace=true] - Whether to print full stacktrace upon failure.
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.fullTrace = function() {
- this.options.fullStackTrace = true;
+Mocha.prototype.fullTrace = function(fullTrace) {
+ this.options.fullTrace = fullTrace !== false;
return this;
};
@@ -1890,8 +1918,7 @@ Mocha.prototype.fullTrace = function() {
* Enables desktop notification support if prerequisite software installed.
*
* @public
- * @see {@link Mocha#isGrowlCapable}
- * @see {@link Mocha#_growl}
+ * @see [CLI option](../#-growl-g)
* @return {Mocha} this
* @chainable
*/
@@ -1934,62 +1961,121 @@ Mocha.prototype._growl = growl.notify;
* Specifies whitelist of variable names to be expected in global scope.
*
* @public
- * @see {@link https://mochajs.org/#--globals-names|CLI option}
+ * @see [CLI option](../#-global-variable-name)
* @see {@link Mocha#checkLeaks}
- * @param {String[]|String} globals - Accepted global variable name(s).
+ * @param {String[]|String} global - Accepted global variable name(s).
* @return {Mocha} this
* @chainable
* @example
*
* // Specify variables to be expected in global scope
- * mocha.globals(['jQuery', 'MyLib']);
- */
-Mocha.prototype.globals = function(globals) {
- this.options.globals = (this.options.globals || [])
- .concat(globals)
- .filter(Boolean);
+ * mocha.global(['jQuery', 'MyLib']);
+ */
+Mocha.prototype.global = function(global) {
+ this.options.global = (this.options.global || [])
+ .concat(global)
+ .filter(Boolean)
+ .filter(function(elt, idx, arr) {
+ return arr.indexOf(elt) === idx;
+ });
return this;
};
+// for backwards compability, 'globals' is an alias of 'global'
+Mocha.prototype.globals = Mocha.prototype.global;
/**
* Enables or disables TTY color output by screen-oriented reporters.
*
+ * @deprecated since v7.0.0
* @public
+ * @see {@link Mocha#color}
* @param {boolean} colors - Whether to enable color output.
* @return {Mocha} this
* @chainable
*/
Mocha.prototype.useColors = function(colors) {
+ utils.deprecate('"useColors()" is DEPRECATED, please use "color()" instead.');
if (colors !== undefined) {
- this.options.useColors = colors;
+ this.options.color = colors;
}
return this;
};
+/**
+ * Enables or disables TTY color output by screen-oriented reporters.
+ *
+ * @public
+ * @see [CLI option](../#-color-c-colors)
+ * @param {boolean} [color=true] - Whether to enable color output.
+ * @return {Mocha} this
+ * @chainable
+ */
+Mocha.prototype.color = function(color) {
+ this.options.color = color !== false;
+ return this;
+};
+
/**
* Determines if reporter should use inline diffs (rather than +/-)
* in test failure output.
*
+ * @deprecated since v7.0.0
* @public
- * @param {boolean} inlineDiffs - Whether to use inline diffs.
+ * @see {@link Mocha#inlineDiffs}
+ * @param {boolean} [inlineDiffs=false] - Whether to use inline diffs.
* @return {Mocha} this
* @chainable
*/
Mocha.prototype.useInlineDiffs = function(inlineDiffs) {
- this.options.useInlineDiffs = inlineDiffs !== undefined && inlineDiffs;
+ utils.deprecate(
+ '"useInlineDiffs()" is DEPRECATED, please use "inlineDiffs()" instead.'
+ );
+ this.options.inlineDiffs = inlineDiffs !== undefined && inlineDiffs;
+ return this;
+};
+
+/**
+ * Enables or disables reporter to use inline diffs (rather than +/-)
+ * in test failure output.
+ *
+ * @public
+ * @see [CLI option](../#-inline-diffs)
+ * @param {boolean} [inlineDiffs=true] - Whether to use inline diffs.
+ * @return {Mocha} this
+ * @chainable
+ */
+Mocha.prototype.inlineDiffs = function(inlineDiffs) {
+ this.options.inlineDiffs = inlineDiffs !== false;
return this;
};
/**
* Determines if reporter should include diffs in test failure output.
*
+ * @deprecated since v7.0.0
* @public
- * @param {boolean} hideDiff - Whether to hide diffs.
+ * @see {@link Mocha#diff}
+ * @param {boolean} [hideDiff=false] - Whether to hide diffs.
* @return {Mocha} this
* @chainable
*/
Mocha.prototype.hideDiff = function(hideDiff) {
- this.options.hideDiff = hideDiff !== undefined && hideDiff;
+ utils.deprecate('"hideDiff()" is DEPRECATED, please use "diff()" instead.');
+ this.options.diff = !(hideDiff === true);
+ return this;
+};
+
+/**
+ * Enables or disables reporter to include diff in test failure output.
+ *
+ * @public
+ * @see [CLI option](../#-diff)
+ * @param {boolean} [diff=true] - Whether to show diff on failure.
+ * @return {Mocha} this
+ * @chainable
+ */
+Mocha.prototype.diff = function(diff) {
+ this.options.diff = diff !== false;
return this;
};
@@ -2002,9 +2088,8 @@ Mocha.prototype.hideDiff = function(hideDiff) {
* If the value is `0`, timeouts will be disabled.
*
* @public
- * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option}
- * @see {@link https://mochajs.org/#--no-timeouts|CLI option}
- * @see {@link https://mochajs.org/#timeouts|Timeouts}
+ * @see [CLI option](../#-timeout-ms-t-ms)
+ * @see [Timeouts](../#timeouts)
* @see {@link Mocha#enableTimeouts}
* @param {number|string} msecs - Timeout threshold value.
* @return {Mocha} this
@@ -2027,7 +2112,8 @@ Mocha.prototype.timeout = function(msecs) {
* Sets the number of times to retry failed tests.
*
* @public
- * @see {@link https://mochajs.org/#retry-tests|Retry Tests}
+ * @see [CLI option](../#-retries-n)
+ * @see [Retry Tests](../#retry-tests)
* @param {number} retry - Number of times to retry failed tests.
* @return {Mocha} this
* @chainable
@@ -2045,7 +2131,7 @@ Mocha.prototype.retries = function(n) {
* Sets slowness threshold value.
*
* @public
- * @see {@link https://mochajs.org/#-s---slow-ms|CLI option}
+ * @see [CLI option](../#-slow-ms-s-ms)
* @param {number} msecs - Slowness threshold value.
* @return {Mocha} this
* @chainable
@@ -2067,8 +2153,7 @@ Mocha.prototype.slow = function(msecs) {
* Enables or disables timeouts.
*
* @public
- * @see {@link https://mochajs.org/#-t---timeout-ms|CLI option}
- * @see {@link https://mochajs.org/#--no-timeouts|CLI option}
+ * @see [CLI option](../#-timeout-ms-t-ms)
* @param {boolean} enableTimeouts - Whether to enable timeouts.
* @return {Mocha} this
* @chainable
@@ -2084,11 +2169,13 @@ Mocha.prototype.enableTimeouts = function(enableTimeouts) {
* Forces all tests to either accept a `done` callback or return a promise.
*
* @public
+ * @see [CLI option](../#-async-only-a)
+ * @param {boolean} [asyncOnly=true] - Wether to force `done` callback or promise.
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.asyncOnly = function() {
- this.options.asyncOnly = true;
+Mocha.prototype.asyncOnly = function(asyncOnly) {
+ this.options.asyncOnly = asyncOnly !== false;
return this;
};
@@ -2105,14 +2192,16 @@ Mocha.prototype.noHighlighting = function() {
};
/**
- * Enables uncaught errors to propagate (in browser).
+ * Enables or disables uncaught errors to propagate.
*
* @public
+ * @see [CLI option](../#-allow-uncaught)
+ * @param {boolean} [allowUncaught=true] - Whether to propagate uncaught errors.
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.allowUncaught = function() {
- this.options.allowUncaught = true;
+Mocha.prototype.allowUncaught = function(allowUncaught) {
+ this.options.allowUncaught = allowUncaught !== false;
return this;
};
@@ -2124,7 +2213,7 @@ Mocha.prototype.allowUncaught = function() {
* Used to perform asynch operations before any suites are run.
*
* @public
- * @see {@link https://mochajs.org/#delayed-root-suite|delayed root suite}
+ * @see [delayed root suite](../#delayed-root-suite)
* @returns {Mocha} this
* @chainable
*/
@@ -2137,11 +2226,13 @@ Mocha.prototype.delay = function delay() {
* Causes tests marked `only` to fail the suite.
*
* @public
+ * @see [CLI option](../#-forbid-only)
+ * @param {boolean} [forbidOnly=true] - Whether tests marked `only` fail the suite.
* @returns {Mocha} this
* @chainable
*/
-Mocha.prototype.forbidOnly = function() {
- this.options.forbidOnly = true;
+Mocha.prototype.forbidOnly = function(forbidOnly) {
+ this.options.forbidOnly = forbidOnly !== false;
return this;
};
@@ -2149,11 +2240,13 @@ Mocha.prototype.forbidOnly = function() {
* Causes pending tests and tests marked `skip` to fail the suite.
*
* @public
+ * @see [CLI option](../#-forbid-pending)
+ * @param {boolean} [forbidPending=true] - Whether pending tests fail the suite.
* @returns {Mocha} this
* @chainable
*/
-Mocha.prototype.forbidPending = function() {
- this.options.forbidPending = true;
+Mocha.prototype.forbidPending = function(forbidPending) {
+ this.options.forbidPending = forbidPending !== false;
return this;
};
@@ -2187,14 +2280,17 @@ Object.defineProperty(Mocha.prototype, 'version', {
* the cache first!
*
* @public
- * @see {@link Mocha#loadFiles}
* @see {@link Mocha#unloadFiles}
* @see {@link Runner#run}
* @param {DoneCB} [fn] - Callback invoked when test execution completed.
- * @return {Runner} runner instance
+ * @returns {Runner} runner instance
+ * @example
+ *
+ * // exit with non-zero status if there were test failures
+ * mocha.run(failures => process.exitCode = failures ? 1 : 0);
*/
Mocha.prototype.run = function(fn) {
- if (this.files.length) {
+ if (this.files.length && !this.loadAsync) {
this.loadFiles();
}
var suite = this.suite;
@@ -2203,8 +2299,8 @@ Mocha.prototype.run = function(fn) {
var runner = new exports.Runner(suite, options.delay);
createStatsCollector(runner);
var reporter = new this._reporter(runner, options);
- runner.ignoreLeaks = options.ignoreLeaks !== false;
- runner.fullStackTrace = options.fullStackTrace;
+ runner.checkLeaks = options.checkLeaks === true;
+ runner.fullStackTrace = options.fullTrace;
runner.asyncOnly = options.asyncOnly;
runner.allowUncaught = options.allowUncaught;
runner.forbidOnly = options.forbidOnly;
@@ -2212,17 +2308,17 @@ Mocha.prototype.run = function(fn) {
if (options.grep) {
runner.grep(options.grep, options.invert);
}
- if (options.globals) {
- runner.globals(options.globals);
+ if (options.global) {
+ runner.globals(options.global);
}
if (options.growl) {
this._growl(runner);
}
- if (options.useColors !== undefined) {
- exports.reporters.Base.useColors = options.useColors;
+ if (options.color !== undefined) {
+ exports.reporters.Base.useColors = options.color;
}
- exports.reporters.Base.inlineDiffs = options.useInlineDiffs;
- exports.reporters.Base.hideDiff = options.hideDiff;
+ exports.reporters.Base.inlineDiffs = options.inlineDiffs;
+ exports.reporters.Base.hideDiff = !options.diff;
function done(failures) {
fn = fn || utils.noop;
@@ -2237,16 +2333,17 @@ Mocha.prototype.run = function(fn) {
};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../package.json":90,"./context":5,"./errors":6,"./growl":2,"./hook":7,"./interfaces":11,"./mocharc.json":15,"./reporters":21,"./runnable":33,"./runner":34,"./stats-collector":35,"./suite":36,"./test":37,"./utils":38,"_process":69,"escape-string-regexp":49,"path":42}],15:[function(require,module,exports){
+},{"../package.json":90,"./context":5,"./errors":6,"./esm-utils":42,"./growl":2,"./hook":7,"./interfaces":11,"./mocharc.json":15,"./reporters":21,"./runnable":33,"./runner":34,"./stats-collector":35,"./suite":36,"./test":37,"./utils":38,"_process":69,"escape-string-regexp":49,"path":42}],15:[function(require,module,exports){
module.exports={
"diff": true,
- "extension": ["js"],
+ "extension": ["js", "cjs", "mjs"],
"opts": "./test/mocha.opts",
"package": "./package.json",
"reporter": "spec",
"slow": 75,
"timeout": 2000,
- "ui": "bdd"
+ "ui": "bdd",
+ "watch-ignore": ["node_modules", ".git"]
}
},{}],16:[function(require,module,exports){
@@ -2292,7 +2389,12 @@ exports = module.exports = Base;
* Check if both stdio streams are associated with a tty.
*/
-var isatty = tty.isatty(1) && tty.isatty(2);
+var isatty = process.stdout.isTTY && process.stderr.isTTY;
+
+/**
+ * Save log references to avoid tests interfering (see GH-3604).
+ */
+var consoleLog = console.log;
/**
* Enable coloring by default, except in the browser interface.
@@ -2416,14 +2518,14 @@ exports.cursor = {
}
};
-function showDiff(err) {
+var showDiff = (exports.showDiff = function(err) {
return (
err &&
err.showDiff !== false &&
sameType(err.actual, err.expected) &&
err.expected !== undefined
);
-}
+});
function stringifyDiffObjs(err) {
if (!utils.isString(err.actual) || !utils.isString(err.expected)) {
@@ -2444,9 +2546,19 @@ function stringifyDiffObjs(err) {
* @return {string} Diff
*/
var generateDiff = (exports.generateDiff = function(actual, expected) {
- return exports.inlineDiffs
- ? inlineDiff(actual, expected)
- : unifiedDiff(actual, expected);
+ try {
+ return exports.inlineDiffs
+ ? inlineDiff(actual, expected)
+ : unifiedDiff(actual, expected);
+ } catch (err) {
+ var msg =
+ '\n ' +
+ color('diff added', '+ expected') +
+ ' ' +
+ color('diff removed', '- actual: failed to generate Mocha diff') +
+ '\n';
+ return msg;
+ }
});
/**
@@ -2459,7 +2571,8 @@ var generateDiff = (exports.generateDiff = function(actual, expected) {
* Error property
*/
exports.list = function(failures) {
- console.log();
+ var multipleErr, multipleTest;
+ Base.consoleLog();
failures.forEach(function(test, i) {
// format
var fmt =
@@ -2469,7 +2582,16 @@ exports.list = function(failures) {
// msg
var msg;
- var err = test.err;
+ var err;
+ if (test.err && test.err.multiple) {
+ if (multipleTest !== test) {
+ multipleTest = test;
+ multipleErr = [test.err].concat(test.err.multiple);
+ }
+ err = multipleErr.shift();
+ } else {
+ err = test.err;
+ }
var message;
if (err.message && typeof err.message.toString === 'function') {
message = err.message + '';
@@ -2520,7 +2642,7 @@ exports.list = function(failures) {
testTitle += str;
});
- console.log(fmt, i + 1, testTitle, msg, stack);
+ Base.consoleLog(fmt, i + 1, testTitle, msg, stack);
});
};
@@ -2560,7 +2682,12 @@ function Base(runner, options) {
if (showDiff(err)) {
stringifyDiffObjs(err);
}
- test.err = err;
+ // more than one error per test
+ if (test.err && err instanceof Error) {
+ test.err.multiple = (test.err.multiple || []).concat(err);
+ } else {
+ test.err = err;
+ }
failures.push(test);
});
}
@@ -2569,13 +2696,13 @@ function Base(runner, options) {
* Outputs common epilogue used by many of the bundled reporters.
*
* @public
- * @memberof Mocha.reporters.Base
+ * @memberof Mocha.reporters
*/
Base.prototype.epilogue = function() {
var stats = this.stats;
var fmt;
- console.log();
+ Base.consoleLog();
// passes
fmt =
@@ -2583,26 +2710,26 @@ Base.prototype.epilogue = function() {
color('green', ' %d passing') +
color('light', ' (%s)');
- console.log(fmt, stats.passes || 0, milliseconds(stats.duration));
+ Base.consoleLog(fmt, stats.passes || 0, milliseconds(stats.duration));
// pending
if (stats.pending) {
fmt = color('pending', ' ') + color('pending', ' %d pending');
- console.log(fmt, stats.pending);
+ Base.consoleLog(fmt, stats.pending);
}
// failures
if (stats.failures) {
fmt = color('fail', ' %d failing');
- console.log(fmt, stats.failures);
+ Base.consoleLog(fmt, stats.failures);
Base.list(this.failures);
- console.log();
+ Base.consoleLog();
}
- console.log();
+ Base.consoleLog();
};
/**
@@ -2755,6 +2882,8 @@ function sameType(a, b) {
return objToString.call(a) === objToString.call(b);
}
+Base.consoleLog = consoleLog;
+
Base.abstract = true;
}).call(this,require('_process'))
@@ -2805,41 +2934,45 @@ function Doc(runner, options) {
return;
}
++indents;
- console.log('%s', indent());
+ Base.consoleLog('%s', indent());
++indents;
- console.log('%s%s
', indent(), utils.escape(suite.title));
- console.log('%s', indent());
+ Base.consoleLog('%s%s
', indent(), utils.escape(suite.title));
+ Base.consoleLog('%s', indent());
});
runner.on(EVENT_SUITE_END, function(suite) {
if (suite.root) {
return;
}
- console.log('%s
', indent());
+ Base.consoleLog('%s
', indent());
--indents;
- console.log('%s', indent());
+ Base.consoleLog('%s', indent());
--indents;
});
runner.on(EVENT_TEST_PASS, function(test) {
- console.log('%s %s', indent(), utils.escape(test.title));
+ Base.consoleLog('%s %s', indent(), utils.escape(test.title));
var code = utils.escape(utils.clean(test.body));
- console.log('%s %s
', indent(), code);
+ Base.consoleLog('%s %s
', indent(), code);
});
runner.on(EVENT_TEST_FAIL, function(test, err) {
- console.log(
+ Base.consoleLog(
'%s %s',
indent(),
utils.escape(test.title)
);
var code = utils.escape(utils.clean(test.body));
- console.log(
+ Base.consoleLog(
'%s %s
',
indent(),
code
);
- console.log('%s %s', indent(), utils.escape(err));
+ Base.consoleLog(
+ '%s %s',
+ indent(),
+ utils.escape(err)
+ );
});
}
@@ -2917,7 +3050,7 @@ function Dot(runner, options) {
});
runner.once(EVENT_RUN_END, function() {
- console.log();
+ process.stdout.write('\n');
self.epilogue();
});
}
@@ -3291,8 +3424,8 @@ function hideSuitesWithout(classname) {
*/
function unhide() {
var els = document.getElementsByClassName('suite hidden');
- for (var i = 0; i < els.length; ++i) {
- els[i].className = els[i].className.replace('suite hidden', 'suite');
+ while (els.length > 0) {
+ els[0].className = els[0].className.replace('suite hidden', 'suite');
}
}
@@ -3677,7 +3810,7 @@ function Landing(runner, options) {
runner.once(EVENT_RUN_END, function() {
cursor.show();
- console.log();
+ process.stdout.write('\n');
self.epilogue();
});
}
@@ -3735,7 +3868,7 @@ function List(runner, options) {
var n = 0;
runner.on(EVENT_RUN_BEGIN, function() {
- console.log();
+ Base.consoleLog();
});
runner.on(EVENT_TEST_BEGIN, function(test) {
@@ -3744,7 +3877,7 @@ function List(runner, options) {
runner.on(EVENT_TEST_PENDING, function(test) {
var fmt = color('checkmark', ' -') + color('pending', ' %s');
- console.log(fmt, test.fullTitle());
+ Base.consoleLog(fmt, test.fullTitle());
});
runner.on(EVENT_TEST_PASS, function(test) {
@@ -3753,12 +3886,12 @@ function List(runner, options) {
color('pass', ' %s: ') +
color(test.speed, '%dms');
cursor.CR();
- console.log(fmt, test.fullTitle(), test.duration);
+ Base.consoleLog(fmt, test.fullTitle(), test.duration);
});
runner.on(EVENT_TEST_FAIL, function(test) {
cursor.CR();
- console.log(color('fail', ' %d) %s'), ++n, test.fullTitle());
+ Base.consoleLog(color('fail', ' %d) %s'), ++n, test.fullTitle());
});
runner.once(EVENT_RUN_END, self.epilogue.bind(self));
@@ -4286,7 +4419,7 @@ function Progress(runner, options) {
// tests started
runner.on(EVENT_RUN_BEGIN, function() {
- console.log();
+ process.stdout.write('\n');
cursor.hide();
});
@@ -4319,7 +4452,7 @@ function Progress(runner, options) {
// and the failures if any
runner.once(EVENT_RUN_END, function() {
cursor.show();
- console.log();
+ process.stdout.write('\n');
self.epilogue();
});
}
@@ -4381,24 +4514,24 @@ function Spec(runner, options) {
}
runner.on(EVENT_RUN_BEGIN, function() {
- console.log();
+ Base.consoleLog();
});
runner.on(EVENT_SUITE_BEGIN, function(suite) {
++indents;
- console.log(color('suite', '%s%s'), indent(), suite.title);
+ Base.consoleLog(color('suite', '%s%s'), indent(), suite.title);
});
runner.on(EVENT_SUITE_END, function() {
--indents;
if (indents === 1) {
- console.log();
+ Base.consoleLog();
}
});
runner.on(EVENT_TEST_PENDING, function(test) {
var fmt = indent() + color('pending', ' - %s');
- console.log(fmt, test.title);
+ Base.consoleLog(fmt, test.title);
});
runner.on(EVENT_TEST_PASS, function(test) {
@@ -4408,19 +4541,19 @@ function Spec(runner, options) {
indent() +
color('checkmark', ' ' + Base.symbols.ok) +
color('pass', ' %s');
- console.log(fmt, test.title);
+ Base.consoleLog(fmt, test.title);
} else {
fmt =
indent() +
color('checkmark', ' ' + Base.symbols.ok) +
color('pass', ' %s') +
color(test.speed, ' (%dms)');
- console.log(fmt, test.title, test.duration);
+ Base.consoleLog(fmt, test.title, test.duration);
}
});
runner.on(EVENT_TEST_FAIL, function(test) {
- console.log(indent() + color('fail', ' %d) %s'), ++n, test.title);
+ Base.consoleLog(indent() + color('fail', ' %d) %s'), ++n, test.title);
});
runner.once(EVENT_RUN_END, self.epilogue.bind(self));
@@ -4877,7 +5010,7 @@ XUnit.prototype.write = function(line) {
} else if (typeof process === 'object' && process.stdout) {
process.stdout.write(line + '\n');
} else {
- console.log(line);
+ Base.consoleLog(line);
}
};
@@ -4898,9 +5031,9 @@ XUnit.prototype.test = function(test) {
if (test.state === STATE_FAILED) {
var err = test.err;
var diff =
- Base.hideDiff || !err.actual || !err.expected
- ? ''
- : '\n' + Base.generateDiff(err.actual, err.expected);
+ !Base.hideDiff && Base.showDiff(err)
+ ? '\n' + Base.generateDiff(err.actual, err.expected)
+ : '';
this.write(
tag(
'testcase',
@@ -5090,7 +5223,8 @@ Runnable.prototype.enableTimeouts = function(enabled) {
* @public
*/
Runnable.prototype.skip = function() {
- throw new Pending('sync skip');
+ this.pending = true;
+ throw new Pending('sync skip; aborting execution');
};
/**
@@ -5289,43 +5423,45 @@ Runnable.prototype.run = function(fn) {
fn(err);
}
- // for .resetTimeout()
+ // for .resetTimeout() and Runner#uncaught()
this.callback = done;
+ if (this.fn && typeof this.fn.call !== 'function') {
+ done(
+ new TypeError(
+ 'A runnable must be passed a function as its second argument.'
+ )
+ );
+ return;
+ }
+
// explicit async with `done` argument
if (this.async) {
this.resetTimeout();
// allows skip() to be used in an explicit async context
this.skip = function asyncSkip() {
- done(new Pending('async skip call'));
- // halt execution. the Runnable will be marked pending
- // by the previous call, and the uncaught handler will ignore
- // the failure.
+ this.pending = true;
+ done();
+ // halt execution, the uncaught handler will ignore the failure.
throw new Pending('async skip; aborting execution');
};
- if (this.allowUncaught) {
- return callFnAsync(this.fn);
- }
try {
callFnAsync(this.fn);
} catch (err) {
+ // handles async runnables which actually run synchronously
emitted = true;
+ if (err instanceof Pending) {
+ return; // done() is already called in this.skip()
+ } else if (this.allowUncaught) {
+ throw err;
+ }
done(Runnable.toValueOrError(err));
}
return;
}
- if (this.allowUncaught) {
- if (this.isPending()) {
- done();
- } else {
- callFn(this.fn);
- }
- return;
- }
-
// sync or promise-returning
try {
if (this.isPending()) {
@@ -5335,6 +5471,11 @@ Runnable.prototype.run = function(fn) {
}
} catch (err) {
emitted = true;
+ if (err instanceof Pending) {
+ return done();
+ } else if (this.allowUncaught) {
+ throw err;
+ }
done(Runnable.toValueOrError(err));
}
@@ -5479,8 +5620,9 @@ var sQuote = utils.sQuote;
var stackFilter = utils.stackTraceFilter();
var stringify = utils.stringify;
var type = utils.type;
-var createInvalidExceptionError = require('./errors')
- .createInvalidExceptionError;
+var errors = require('./errors');
+var createInvalidExceptionError = errors.createInvalidExceptionError;
+var createUnsupportedError = errors.createUnsupportedError;
/**
* Non-enumerable globals.
@@ -5589,6 +5731,11 @@ function Runner(suite, delay) {
this.total = suite.total();
this.failures = 0;
this.on(constants.EVENT_TEST_END, function(test) {
+ if (test.retriedTest() && test.parent) {
+ var idx =
+ test.parent.tests && test.parent.tests.indexOf(test.retriedTest());
+ if (idx > -1) test.parent.tests[idx] = test;
+ }
self.checkGlobals(test);
});
this.on(constants.EVENT_HOOK_END, function(hook) {
@@ -5596,7 +5743,7 @@ function Runner(suite, delay) {
});
this._defaultGrep = /.*/;
this.grep(this._defaultGrep);
- this.globals(this.globalProps().concat(extraGlobals()));
+ this.globals(this.globalProps());
}
/**
@@ -5699,7 +5846,7 @@ Runner.prototype.globals = function(arr) {
* @private
*/
Runner.prototype.checkGlobals = function(test) {
- if (this.ignoreLeaks) {
+ if (!this.checkLeaks) {
return;
}
var ok = this._globals;
@@ -5770,8 +5917,7 @@ Runner.prototype.fail = function(test, err) {
* - Failed `before each` hook skips remaining tests in a
* suite and jumps to corresponding `after each` hook,
* which is run only once
- * - Failed `after` hook does not alter
- * execution order
+ * - Failed `after` hook does not alter execution order
* - Failed `after each` hook skips remaining tests in a
* suite and subsuites, but executes other `after each`
* hooks
@@ -5841,34 +5987,37 @@ Runner.prototype.hook = function(name, fn) {
if (testError) {
self.fail(self.test, testError);
}
- if (err) {
- if (err instanceof Pending) {
- if (name === HOOK_TYPE_AFTER_ALL) {
- utils.deprecate(
- 'Skipping a test within an "after all" hook is DEPRECATED and will throw an exception in a future version of Mocha. ' +
- 'Use a return statement or other means to abort hook execution.'
- );
+ // conditional skip
+ if (hook.pending) {
+ if (name === HOOK_TYPE_AFTER_EACH) {
+ // TODO define and implement use case
+ if (self.test) {
+ self.test.pending = true;
}
- if (name === HOOK_TYPE_BEFORE_EACH || name === HOOK_TYPE_AFTER_EACH) {
- if (self.test) {
- self.test.pending = true;
- }
- } else {
- suite.tests.forEach(function(test) {
- test.pending = true;
- });
- suite.suites.forEach(function(suite) {
- suite.pending = true;
- });
- // a pending hook won't be executed twice.
- hook.pending = true;
+ } else if (name === HOOK_TYPE_BEFORE_EACH) {
+ if (self.test) {
+ self.test.pending = true;
}
+ self.emit(constants.EVENT_HOOK_END, hook);
+ hook.pending = false; // activates hook for next test
+ return fn(new Error('abort hookDown'));
+ } else if (name === HOOK_TYPE_BEFORE_ALL) {
+ suite.tests.forEach(function(test) {
+ test.pending = true;
+ });
+ suite.suites.forEach(function(suite) {
+ suite.pending = true;
+ });
} else {
- self.failHook(hook, err);
-
- // stop executing hooks, notify callee of hook err
- return fn(err);
+ hook.pending = false;
+ var errForbid = createUnsupportedError('`this.skip` forbidden');
+ self.failHook(hook, errForbid);
+ return fn(errForbid);
}
+ } else if (err) {
+ self.failHook(hook, err);
+ // stop executing hooks, notify callee of hook err
+ return fn(err);
}
self.emit(constants.EVENT_HOOK_END, hook);
delete hook.ctx.currentTest;
@@ -5980,6 +6129,9 @@ Runner.prototype.runTest = function(fn) {
test.asyncOnly = true;
}
test.on('error', function(err) {
+ if (err instanceof Pending) {
+ return;
+ }
self.fail(test, err);
});
if (this.allowUncaught) {
@@ -6075,6 +6227,7 @@ Runner.prototype.runTests = function(suite, fn) {
return;
}
+ // static skip, no hooks are executed
if (test.isPending()) {
if (self.forbidPending) {
test.isPending = alwaysFalse;
@@ -6090,6 +6243,7 @@ Runner.prototype.runTests = function(suite, fn) {
// execute test and hook(s)
self.emit(constants.EVENT_TEST_BEGIN, (self.test = test));
self.hookDown(HOOK_TYPE_BEFORE_EACH, function(err, errSuite) {
+ // conditional skip within beforeEach
if (test.isPending()) {
if (self.forbidPending) {
test.isPending = alwaysFalse;
@@ -6099,7 +6253,13 @@ Runner.prototype.runTests = function(suite, fn) {
self.emit(constants.EVENT_TEST_PENDING, test);
}
self.emit(constants.EVENT_TEST_END, test);
- return next();
+ // skip inner afterEach hooks below errSuite level
+ var origSuite = self.suite;
+ self.suite = errSuite || self.suite;
+ return self.hookUp(HOOK_TYPE_AFTER_EACH, function(e, eSuite) {
+ self.suite = origSuite;
+ next(e, eSuite);
+ });
}
if (err) {
return hookErr(err, errSuite, false);
@@ -6107,14 +6267,20 @@ Runner.prototype.runTests = function(suite, fn) {
self.currentRunnable = self.test;
self.runTest(function(err) {
test = self.test;
- if (err) {
- var retry = test.currentRetry();
- if (err instanceof Pending && self.forbidPending) {
+ // conditional skip within it
+ if (test.pending) {
+ if (self.forbidPending) {
+ test.isPending = alwaysFalse;
self.fail(test, new Error('Pending test forbidden'));
- } else if (err instanceof Pending) {
- test.pending = true;
+ delete test.isPending;
+ } else {
self.emit(constants.EVENT_TEST_PENDING, test);
- } else if (retry < test.retries()) {
+ }
+ self.emit(constants.EVENT_TEST_END, test);
+ return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
+ } else if (err) {
+ var retry = test.currentRetry();
+ if (retry < test.retries()) {
var clonedTest = test.clone();
clonedTest.currentRetry(retry + 1);
tests.unshift(clonedTest);
@@ -6128,11 +6294,6 @@ Runner.prototype.runTests = function(suite, fn) {
self.fail(test, err);
}
self.emit(constants.EVENT_TEST_END, test);
-
- if (err instanceof Pending) {
- return next();
- }
-
return self.hookUp(HOOK_TYPE_AFTER_EACH, next);
}
@@ -6164,7 +6325,6 @@ Runner.prototype.runSuite = function(suite, fn) {
var i = 0;
var self = this;
var total = this.grepTotal(suite);
- var afterAllHookCalled = false;
debug('run suite %s', suite.fullTitle());
@@ -6212,21 +6372,13 @@ Runner.prototype.runSuite = function(suite, fn) {
self.suite = suite;
self.nextSuite = next;
- if (afterAllHookCalled) {
- fn(errSuite);
- } else {
- // mark that the afterAll block has been called once
- // and so can be skipped if there is an error in it.
- afterAllHookCalled = true;
+ // remove reference to test
+ delete self.test;
- // remove reference to test
- delete self.test;
-
- self.hook(HOOK_TYPE_AFTER_ALL, function() {
- self.emit(constants.EVENT_SUITE_END, suite);
- fn(errSuite);
- });
- }
+ self.hook(HOOK_TYPE_AFTER_ALL, function() {
+ self.emit(constants.EVENT_SUITE_END, suite);
+ fn(errSuite);
+ });
}
this.nextSuite = next;
@@ -6240,7 +6392,7 @@ Runner.prototype.runSuite = function(suite, fn) {
};
/**
- * Handle uncaught exceptions.
+ * Handle uncaught exceptions within runner.
*
* @param {Error} err
* @private
@@ -6249,6 +6401,11 @@ Runner.prototype.uncaught = function(err) {
if (err instanceof Pending) {
return;
}
+ // browser does not exit script when throwing in global.onerror()
+ if (this.allowUncaught && !process.browser) {
+ throw err;
+ }
+
if (err) {
debug('uncaught exception %O', err);
} else {
@@ -6284,43 +6441,37 @@ Runner.prototype.uncaught = function(err) {
runnable.clearTimeout();
- // Ignore errors if already failed or pending
- // See #3226
- if (runnable.isFailed() || runnable.isPending()) {
+ if (runnable.isFailed()) {
+ // Ignore error if already failed
+ return;
+ } else if (runnable.isPending()) {
+ // report 'pending test' retrospectively as failed
+ runnable.isPending = alwaysFalse;
+ this.fail(runnable, err);
+ delete runnable.isPending;
return;
}
+
// we cannot recover gracefully if a Runnable has already passed
// then fails asynchronously
- var alreadyPassed = runnable.isPassed();
- // this will change the state to "failed" regardless of the current value
- this.fail(runnable, err);
- if (!alreadyPassed) {
- // recover from test
- if (runnable.type === constants.EVENT_TEST_BEGIN) {
- this.emit(constants.EVENT_TEST_END, runnable);
- this.hookUp(HOOK_TYPE_AFTER_EACH, this.next);
- return;
- }
+ if (runnable.isPassed()) {
+ this.fail(runnable, err);
+ this.abort();
+ } else {
debug(runnable);
-
- // recover from hooks
- var errSuite = this.suite;
-
- // XXX how about a less awful way to determine this?
- // if hook failure is in afterEach block
- if (runnable.fullTitle().indexOf('after each') > -1) {
- return this.hookErr(err, errSuite, true);
- }
- // if hook failure is in beforeEach block
- if (runnable.fullTitle().indexOf('before each') > -1) {
- return this.hookErr(err, errSuite, false);
- }
- // if hook failure is in after or before blocks
- return this.nextSuite(errSuite);
+ return runnable.callback(err);
}
+};
- // bail
- this.emit(constants.EVENT_RUN_END);
+/**
+ * Handle uncaught exceptions after runner's end event.
+ *
+ * @param {Error} err
+ * @private
+ */
+Runner.prototype.uncaughtEnd = function uncaughtEnd(err) {
+ if (err instanceof Pending) return;
+ throw err;
};
/**
@@ -6370,10 +6521,12 @@ Runner.prototype.run = function(fn) {
this.on(constants.EVENT_RUN_END, function() {
debug(constants.EVENT_RUN_END);
process.removeListener('uncaughtException', uncaught);
+ process.on('uncaughtException', self.uncaughtEnd);
fn(self.failures);
});
// uncaught exception
+ process.removeListener('uncaughtException', self.uncaughtEnd);
process.on('uncaughtException', uncaught);
if (this._delay) {
@@ -6382,7 +6535,9 @@ Runner.prototype.run = function(fn) {
this.emit(constants.EVENT_DELAY_BEGIN, rootSuite);
rootSuite.once(EVENT_ROOT_SUITE_RUN, start);
} else {
- start();
+ Runner.immediately(function() {
+ start();
+ });
}
return this;
@@ -6471,30 +6626,6 @@ function thrown2Error(err) {
);
}
-/**
- * Array of globals dependent on the environment.
- *
- * @return {Array}
- * @deprecated
- * @todo remove; long since unsupported
- * @private
- */
-function extraGlobals() {
- if (typeof process === 'object' && typeof process.version === 'string') {
- var parts = process.version.split('.');
- var nodeVersion = parts.reduce(function(a, v) {
- return (a << 8) | v;
- });
-
- // 'errno' was renamed to process._errno in v0.9.11.
- if (nodeVersion < 0x00090b) {
- return ['errno'];
- }
- }
-
- return [];
-}
-
Runner.constants = constants;
/**
@@ -7274,6 +7405,18 @@ function Test(title, fn) {
*/
utils.inherits(Test, Runnable);
+/**
+ * Set or get retried test
+ *
+ * @private
+ */
+Test.prototype.retriedTest = function(n) {
+ if (!arguments.length) {
+ return this._retriedTest;
+ }
+ this._retriedTest = n;
+};
+
Test.prototype.clone = function() {
var test = new Test(this.title, this.fn);
test.timeout(this.timeout());
@@ -7281,6 +7424,7 @@ Test.prototype.clone = function() {
test.enableTimeouts(this.enableTimeouts());
test.retries(this.retries());
test.currentRetry(this.currentRetry());
+ test.retriedTest(this.retriedTest() || this);
test.globals(this.globals());
test.parent = this.parent;
test.file = this.file;
@@ -7345,80 +7489,6 @@ exports.isString = function(obj) {
return typeof obj === 'string';
};
-/**
- * Watch the given `files` for changes
- * and invoke `fn(file)` on modification.
- *
- * @private
- * @param {Array} files
- * @param {Function} fn
- */
-exports.watch = function(files, fn) {
- var options = {interval: 100};
- var debug = require('debug')('mocha:watch');
- files.forEach(function(file) {
- debug('file %s', file);
- fs.watchFile(file, options, function(curr, prev) {
- if (prev.mtime < curr.mtime) {
- fn(file);
- }
- });
- });
-};
-
-/**
- * Predicate to screen `pathname` for further consideration.
- *
- * @description
- * Returns false for pathname referencing:
- *
- * - 'npm' package installation directory
- *
- 'git' version control directory
- *
- *
- * @private
- * @param {string} pathname - File or directory name to screen
- * @return {boolean} whether pathname should be further considered
- * @example
- * ['node_modules', 'test.js'].filter(considerFurther); // => ['test.js']
- */
-function considerFurther(pathname) {
- var ignore = ['node_modules', '.git'];
-
- return !~ignore.indexOf(pathname);
-}
-
-/**
- * Lookup files in the given `dir`.
- *
- * @description
- * Filenames are returned in _traversal_ order by the OS/filesystem.
- * **Make no assumption that the names will be sorted in any fashion.**
- *
- * @private
- * @param {string} dir
- * @param {string[]} [exts=['js']]
- * @param {Array} [ret=[]]
- * @return {Array}
- */
-exports.files = function(dir, exts, ret) {
- ret = ret || [];
- exts = exts || ['js'];
-
- fs.readdirSync(dir)
- .filter(considerFurther)
- .forEach(function(dirent) {
- var pathname = path.join(dir, dirent);
- if (fs.lstatSync(pathname).isDirectory()) {
- exports.files(pathname, exts, ret);
- } else if (hasMatchingExtname(pathname, exts)) {
- ret.push(pathname);
- }
- });
-
- return ret;
-};
-
/**
* Compute a slug from the given `str`.
*
@@ -7854,32 +7924,41 @@ function isHiddenOnUnix(pathname) {
*
* @public
* @memberof Mocha.utils
- * @todo Fix extension handling
* @param {string} filepath - Base path to start searching from.
- * @param {string[]} extensions - File extensions to look for.
- * @param {boolean} recursive - Whether to recurse into subdirectories.
+ * @param {string[]} [extensions=[]] - File extensions to look for.
+ * @param {boolean} [recursive=false] - Whether to recurse into subdirectories.
* @return {string[]} An array of paths.
* @throws {Error} if no files match pattern.
* @throws {TypeError} if `filepath` is directory and `extensions` not provided.
*/
exports.lookupFiles = function lookupFiles(filepath, extensions, recursive) {
+ extensions = extensions || [];
+ recursive = recursive || false;
var files = [];
var stat;
if (!fs.existsSync(filepath)) {
- if (fs.existsSync(filepath + '.js')) {
- filepath += '.js';
+ var pattern;
+ if (glob.hasMagic(filepath)) {
+ // Handle glob as is without extensions
+ pattern = filepath;
} else {
- // Handle glob
- files = glob.sync(filepath);
- if (!files.length) {
- throw createNoFilesMatchPatternError(
- 'Cannot find any files matching pattern ' + exports.dQuote(filepath),
- filepath
- );
- }
- return files;
+ // glob pattern e.g. 'filepath+(.js|.ts)'
+ var strExtensions = extensions
+ .map(function(v) {
+ return '.' + v;
+ })
+ .join('|');
+ pattern = filepath + '+(' + strExtensions + ')';
+ }
+ files = glob.sync(pattern, {nodir: true});
+ if (!files.length) {
+ throw createNoFilesMatchPatternError(
+ 'Cannot find any files matching pattern ' + exports.dQuote(filepath),
+ filepath
+ );
}
+ return files;
}
// Handle file
@@ -7910,7 +7989,7 @@ exports.lookupFiles = function lookupFiles(filepath, extensions, recursive) {
// ignore error
return;
}
- if (!extensions) {
+ if (!extensions.length) {
throw createMissingArgumentError(
util.format(
'Argument %s required when argument %s is a directory',
@@ -8006,7 +8085,8 @@ exports.stackTraceFilter = function() {
function isMochaInternal(line) {
return (
~line.indexOf('node_modules' + slash + 'mocha' + slash) ||
- ~line.indexOf(slash + 'mocha.js')
+ ~line.indexOf(slash + 'mocha.js') ||
+ ~line.indexOf(slash + 'mocha.min.js')
);
}
@@ -8188,8 +8268,30 @@ exports.defineConstants = function(obj) {
return Object.freeze(exports.createMap(obj));
};
+/**
+ * Whether current version of Node support ES modules
+ *
+ * @description
+ * Versions prior to 10 did not support ES Modules, and version 10 has an old incompatibile version of ESM.
+ * This function returns whether Node.JS has ES Module supports that is compatible with Mocha's needs,
+ * which is version >=12.11.
+ *
+ * @returns {Boolean} whether the current version of Node.JS supports ES Modules in a way that is compatible with Mocha
+ */
+exports.supportsEsModules = function() {
+ if (!process.browser && process.versions && process.versions.node) {
+ var versionFields = process.versions.node.split('.');
+ var major = +versionFields[0];
+ var minor = +versionFields[1];
+
+ if (major >= 13 || (major === 12 && minor >= 11)) {
+ return true;
+ }
+ }
+};
+
}).call(this,require('_process'),require("buffer").Buffer)
-},{"./errors":6,"_process":69,"buffer":43,"debug":45,"fs":42,"glob":42,"he":54,"object.assign":65,"path":42,"util":89}],39:[function(require,module,exports){
+},{"./errors":6,"_process":69,"buffer":43,"fs":42,"glob":42,"he":54,"object.assign":65,"path":42,"util":89}],39:[function(require,module,exports){
'use strict'
exports.byteLength = byteLength
@@ -18069,7 +18171,7 @@ function hasOwnProperty(obj, prop) {
},{"./support/isBuffer":88,"_process":69,"inherits":56}],90:[function(require,module,exports){
module.exports={
"name": "mocha",
- "version": "6.1.4",
+ "version": "7.1.1",
"homepage": "https://mochajs.org/",
"notifyLogo": "https://ibin.co/4QuRuGjXvl36.png"
}
From 3047d1f2e378eefa8b112bb26cce4355a9812a5e Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 26 Mar 2020 21:05:35 +0900
Subject: [PATCH 07/28] Update prettier to version 2.
---
js/compile.js | 6 ++---
js/demo/demo.js | 2 +-
js/runtime.js | 12 ++++-----
js/tmpl.js | 16 ++++++------
package-lock.json | 6 ++---
package.json | 6 +++--
test/test.js | 66 +++++++++++++++++++++++------------------------
7 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/js/compile.js b/js/compile.js
index 1797f64..122d034 100755
--- a/js/compile.js
+++ b/js/compile.js
@@ -13,7 +13,7 @@
/* eslint-disable strict */
/* eslint-disable no-console */
-;(function() {
+;(function () {
'use strict'
var path = require('path')
var tmpl = require(path.join(__dirname, 'tmpl.js'))
@@ -31,7 +31,7 @@
var list = []
var code
// Extend the Templating engine with a print method for the generated functions:
- tmpl.print = function(str) {
+ tmpl.print = function (str) {
// Only add helper functions if they are used inside of the template:
var helper = helperRegexp.test(str) ? tmpl.helper : ''
var body = str.replace(tmpl.regexp, tmpl.func)
@@ -49,7 +49,7 @@
)
}
// Loop through the command line arguments:
- process.argv.forEach(function(file, index) {
+ process.argv.forEach(function (file, index) {
var listLength = list.length
var stats
var content
diff --git a/js/demo/demo.js b/js/demo/demo.js
index a355add..7a71fcc 100644
--- a/js/demo/demo.js
+++ b/js/demo/demo.js
@@ -13,7 +13,7 @@
/* eslint-disable strict */
-;(function() {
+;(function () {
'use strict'
var templateInput = document.getElementById('template')
diff --git a/js/runtime.js b/js/runtime.js
index c862b4b..1a3a716 100644
--- a/js/runtime.js
+++ b/js/runtime.js
@@ -13,13 +13,13 @@
/* eslint-disable strict */
-;(function($) {
+;(function ($) {
'use strict'
- var tmpl = function(id, data) {
+ var tmpl = function (id, data) {
var f = tmpl.cache[id]
return data
? f(data, tmpl)
- : function(data) {
+ : function (data) {
return f(data, tmpl)
}
}
@@ -32,14 +32,14 @@
'"': '"',
"'": '''
}
- tmpl.encode = function(s) {
+ tmpl.encode = function (s) {
// eslint-disable-next-line eqeqeq
- return (s == null ? '' : '' + s).replace(tmpl.encReg, function(c) {
+ return (s == null ? '' : '' + s).replace(tmpl.encReg, function (c) {
return tmpl.encMap[c] || ''
})
}
if (typeof define === 'function' && define.amd) {
- define(function() {
+ define(function () {
return tmpl
})
} else if (typeof module === 'object' && module.exports) {
diff --git a/js/tmpl.js b/js/tmpl.js
index 3ab54f2..63eb927 100644
--- a/js/tmpl.js
+++ b/js/tmpl.js
@@ -16,9 +16,9 @@
/* eslint-disable strict */
-;(function($) {
+;(function ($) {
'use strict'
- var tmpl = function(str, data) {
+ var tmpl = function (str, data) {
var f = !/[^\w\-.:]/.test(str)
? (tmpl.cache[str] = tmpl.cache[str] || tmpl(tmpl.load(str)))
: new Function( // eslint-disable-line no-new-func
@@ -31,16 +31,16 @@
)
return data
? f(data, tmpl)
- : function(data) {
+ : function (data) {
return f(data, tmpl)
}
}
tmpl.cache = {}
- tmpl.load = function(id) {
+ tmpl.load = function (id) {
return document.getElementById(id).innerHTML
}
tmpl.regexp = /([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g
- tmpl.func = function(s, p1, p2, p3, p4, p5) {
+ tmpl.func = function (s, p1, p2, p3, p4, p5) {
if (p1) {
// whitespace, quote and backspace in HTML context
return (
@@ -76,9 +76,9 @@
'"': '"',
"'": '''
}
- tmpl.encode = function(s) {
+ tmpl.encode = function (s) {
// eslint-disable-next-line eqeqeq
- return (s == null ? '' : '' + s).replace(tmpl.encReg, function(c) {
+ return (s == null ? '' : '' + s).replace(tmpl.encReg, function (c) {
return tmpl.encMap[c] || ''
})
}
@@ -87,7 +87,7 @@
",print=function(s,e){_s+=e?(s==null?'':s):_e(s);}" +
',include=function(s,d){_s+=tmpl(s,d);}'
if (typeof define === 'function' && define.amd) {
- define(function() {
+ define(function () {
return tmpl
})
} else if (typeof module === 'object' && module.exports) {
diff --git a/package-lock.json b/package-lock.json
index 08c7879..f20aa2c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1390,9 +1390,9 @@
"dev": true
},
"prettier": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz",
- "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz",
+ "integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==",
"dev": true
},
"prettier-linter-helpers": {
diff --git a/package.json b/package.json
index 32d7ece..690a1e6 100644
--- a/package.json
+++ b/package.json
@@ -26,7 +26,7 @@
"eslint-plugin-jsdoc": "22",
"eslint-plugin-prettier": "3",
"mocha": "7",
- "prettier": "1",
+ "prettier": "2",
"uglify-js": "3"
},
"eslintConfig": {
@@ -45,9 +45,11 @@
"test/vendor"
],
"prettier": {
+ "arrowParens": "avoid",
"proseWrap": "always",
"semi": false,
- "singleQuote": true
+ "singleQuote": true,
+ "trailingComma": "none"
},
"scripts": {
"lint": "eslint .",
diff --git a/test/test.js b/test/test.js
index 0a11937..94576de 100644
--- a/test/test.js
+++ b/test/test.js
@@ -13,12 +13,12 @@
/* eslint-disable strict */
-;(function(context, expect, tmpl) {
+;(function (context, expect, tmpl) {
'use strict'
if (context.require === undefined) {
// Override the template loading method:
- tmpl.load = function(id) {
+ tmpl.load = function (id) {
switch (id) {
case 'template':
return '{%=o.value%}'
@@ -28,7 +28,7 @@
var data
- beforeEach(function() {
+ beforeEach(function () {
// Initialize the sample data:
data = {
value: 'value',
@@ -37,7 +37,7 @@
zeroValue: 0,
special: '<>&"\'\x00',
list: [1, 2, 3, 4, 5],
- func: function() {
+ func: function () {
return this.value
},
deep: {
@@ -46,66 +46,66 @@
}
})
- afterEach(function() {
+ afterEach(function () {
// Purge the template cache:
tmpl.cache = {}
})
- describe('Template loading', function() {
- it('String template', function() {
+ describe('Template loading', function () {
+ it('String template', function () {
expect(tmpl('{%=o.value%}', data)).to.equal('value')
})
- it('Load template by id', function() {
+ it('Load template by id', function () {
expect(tmpl('template', data)).to.equal('value')
})
- it('Retun function when called without data parameter', function() {
+ it('Retun function when called without data parameter', function () {
expect(tmpl('{%=o.value%}')(data)).to.equal('value')
})
- it('Cache templates loaded by id', function() {
+ it('Cache templates loaded by id', function () {
tmpl('template')
expect(tmpl.cache.template).to.be.a('function')
})
})
- describe('Interpolation', function() {
- it('Escape HTML special characters with {%=o.prop%}', function() {
+ describe('Interpolation', function () {
+ it('Escape HTML special characters with {%=o.prop%}', function () {
expect(tmpl('{%=o.special%}', data)).to.equal('<>&"'')
})
- it('Allow HTML special characters with {%#o.prop%}', function() {
+ it('Allow HTML special characters with {%#o.prop%}', function () {
expect(tmpl('{%#o.special%}', data)).to.equal('<>&"\'\x00')
})
- it('Function call', function() {
+ it('Function call', function () {
expect(tmpl('{%=o.func()%}', data)).to.equal('value')
})
- it('Dot notation', function() {
+ it('Dot notation', function () {
expect(tmpl('{%=o.deep.value%}', data)).to.equal('value')
})
- it('Handle single quotes', function() {
+ it('Handle single quotes', function () {
expect(tmpl("'single quotes'{%=\": '\"%}", data)).to.equal(
"'single quotes': '"
)
})
- it('Handle double quotes', function() {
+ it('Handle double quotes', function () {
expect(tmpl('"double quotes"{%=": \\""%}', data)).to.equal(
'"double quotes": "'
)
})
- it('Handle backslashes', function() {
+ it('Handle backslashes', function () {
expect(tmpl('\\backslashes\\{%=": \\\\"%}', data)).to.equal(
'\\backslashes\\: \\'
)
})
- it('Interpolate escaped falsy values except undefined or null', function() {
+ it('Interpolate escaped falsy values except undefined or null', function () {
expect(
tmpl(
'{%=o.undefinedValue%}' +
@@ -117,7 +117,7 @@
).to.equal('false0')
})
- it('Interpolate unescaped falsy values except undefined or null', function() {
+ it('Interpolate unescaped falsy values except undefined or null', function () {
expect(
tmpl(
'{%#o.undefinedValue%}' +
@@ -129,25 +129,25 @@
).to.equal('false0')
})
- it('Preserve whitespace', function() {
+ it('Preserve whitespace', function () {
expect(tmpl('\n\r\t{%=o.value%} \n\r\t{%=o.value%} ', data)).to.equal(
'\n\r\tvalue \n\r\tvalue '
)
})
})
- describe('Evaluation', function() {
- it('Escape HTML special characters with print(data)', function() {
+ describe('Evaluation', function () {
+ it('Escape HTML special characters with print(data)', function () {
expect(tmpl('{% print(o.special); %}', data)).to.equal(
'<>&"''
)
})
- it('Allow HTML special characters with print(data, true)', function() {
+ it('Allow HTML special characters with print(data, true)', function () {
expect(tmpl('{% print(o.special, true); %}', data)).to.equal('<>&"\'\x00')
})
- it('Print out escaped falsy values except undefined or null', function() {
+ it('Print out escaped falsy values except undefined or null', function () {
expect(
tmpl(
'{% print(o.undefinedValue); %}' +
@@ -159,7 +159,7 @@
).to.equal('false0')
})
- it('Print out unescaped falsy values except undefined or null', function() {
+ it('Print out unescaped falsy values except undefined or null', function () {
expect(
tmpl(
'{% print(o.undefinedValue, true); %}' +
@@ -171,19 +171,19 @@
).to.equal('false0')
})
- it('Include template', function() {
+ it('Include template', function () {
expect(
tmpl('{% include("template", {value: "value"}); %}', data)
).to.equal('value')
})
- it('If condition', function() {
+ it('If condition', function () {
expect(
tmpl('{% if (o.value) { %}true{% } else { %}false{% } %}', data)
).to.equal('true')
})
- it('Else condition', function() {
+ it('Else condition', function () {
expect(
tmpl(
'{% if (o.undefinedValue) { %}false{% } else { %}true{% } %}',
@@ -192,7 +192,7 @@
).to.equal('true')
})
- it('For loop', function() {
+ it('For loop', function () {
expect(
tmpl(
'{% for (var i=0; i
Date: Thu, 26 Mar 2020 21:07:31 +0900
Subject: [PATCH 08/28] 3.14.0
---
js/tmpl.min.js.map | 2 +-
package-lock.json | 2 +-
package.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/js/tmpl.min.js.map b/js/tmpl.min.js.map
index 1abb58b..9334ee8 100644
--- a/js/tmpl.min.js.map
+++ b/js/tmpl.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["tmpl.js"],"names":["$","tmpl","str","data","f","test","Function","arg","helper","replace","regexp","func","cache","load","id","document","getElementById","innerHTML","s","p1","p2","p3","p4","p5","\n","\r","\t"," ","encReg","encMap","<",">","&","\"","'","encode","c","define","amd","module","exports","this"],"mappings":"CAkBC,SAAUA,GACT,aACA,IAAIC,EAAO,SAASC,EAAKC,GACvB,IAAIC,EAAK,YAAYC,KAAKH,GAEtB,IAAII,SACFL,EAAKM,IAAM,QACX,qBACEN,EAAKO,OACL,QACAN,EAAIO,QAAQR,EAAKS,OAAQT,EAAKU,MAC9B,gBAPHV,EAAKW,MAAMV,GAAOD,EAAKW,MAAMV,IAAQD,EAAKA,EAAKY,KAAKX,IASzD,OAAOC,EACHC,EAAED,EAAMF,GACR,SAASE,GACP,OAAOC,EAAED,EAAMF,KAGvBA,EAAKW,MAAQ,GACbX,EAAKY,KAAO,SAASC,GACnB,OAAOC,SAASC,eAAeF,GAAIG,WAErChB,EAAKS,OAAS,2EACdT,EAAKU,KAAO,SAASO,EAAGC,EAAIC,EAAIC,EAAIC,EAAIC,GACtC,OAAIJ,EAGA,CACEK,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,IAAK,KACLR,IAAO,KAAOA,EAGhBC,EAES,MAAPA,EACK,QAAUC,EAAK,MAEjB,MAAQA,EAAK,aAAeA,EAAK,MAEtCC,EAEK,KAELC,EAEK,aAFT,GAKFtB,EAAK2B,OAAS,eACd3B,EAAK4B,OAAS,CACZC,IAAK,OACLC,IAAK,OACLC,IAAK,QACLC,IAAK,SACLC,IAAK,SAEPjC,EAAKkC,OAAS,SAASjB,GAErB,OAAa,MAALA,EAAY,GAAK,GAAKA,GAAGT,QAAQR,EAAK2B,OAAQ,SAASQ,GAC7D,OAAOnC,EAAK4B,OAAOO,IAAM,MAG7BnC,EAAKM,IAAM,IACXN,EAAKO,OACH,0FAEoB,mBAAX6B,QAAyBA,OAAOC,IACzCD,OAAO,WACL,OAAOpC,IAEkB,iBAAXsC,QAAuBA,OAAOC,QAC9CD,OAAOC,QAAUvC,EAEjBD,EAAEC,KAAOA,EA7EZ,CA+EEwC"}
\ No newline at end of file
+{"version":3,"sources":["tmpl.js"],"names":["$","tmpl","str","data","f","test","Function","arg","helper","replace","regexp","func","cache","load","id","document","getElementById","innerHTML","s","p1","p2","p3","p4","p5","\n","\r","\t"," ","encReg","encMap","<",">","&","\"","'","encode","c","define","amd","module","exports","this"],"mappings":"CAkBC,SAAWA,GACV,aACA,IAAIC,EAAO,SAAUC,EAAKC,GACxB,IAAIC,EAAK,YAAYC,KAAKH,GAEtB,IAAII,SACFL,EAAKM,IAAM,QACX,qBACEN,EAAKO,OACL,QACAN,EAAIO,QAAQR,EAAKS,OAAQT,EAAKU,MAC9B,gBAPHV,EAAKW,MAAMV,GAAOD,EAAKW,MAAMV,IAAQD,EAAKA,EAAKY,KAAKX,IASzD,OAAOC,EACHC,EAAED,EAAMF,GACR,SAAUE,GACR,OAAOC,EAAED,EAAMF,KAGvBA,EAAKW,MAAQ,GACbX,EAAKY,KAAO,SAAUC,GACpB,OAAOC,SAASC,eAAeF,GAAIG,WAErChB,EAAKS,OAAS,2EACdT,EAAKU,KAAO,SAAUO,EAAGC,EAAIC,EAAIC,EAAIC,EAAIC,GACvC,OAAIJ,EAGA,CACEK,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,IAAK,KACLR,IAAO,KAAOA,EAGhBC,EAES,MAAPA,EACK,QAAUC,EAAK,MAEjB,MAAQA,EAAK,aAAeA,EAAK,MAEtCC,EAEK,KAELC,EAEK,aAFT,GAKFtB,EAAK2B,OAAS,eACd3B,EAAK4B,OAAS,CACZC,IAAK,OACLC,IAAK,OACLC,IAAK,QACLC,IAAK,SACLC,IAAK,SAEPjC,EAAKkC,OAAS,SAAUjB,GAEtB,OAAa,MAALA,EAAY,GAAK,GAAKA,GAAGT,QAAQR,EAAK2B,OAAQ,SAAUQ,GAC9D,OAAOnC,EAAK4B,OAAOO,IAAM,MAG7BnC,EAAKM,IAAM,IACXN,EAAKO,OACH,0FAEoB,mBAAX6B,QAAyBA,OAAOC,IACzCD,OAAO,WACL,OAAOpC,IAEkB,iBAAXsC,QAAuBA,OAAOC,QAC9CD,OAAOC,QAAUvC,EAEjBD,EAAEC,KAAOA,EA7EZ,CA+EEwC"}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index f20aa2c..0bee19c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.13.0",
+ "version": "3.14.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 690a1e6..1353f47 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.13.0",
+ "version": "3.14.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From b9bb436cb9683ea0e0bc959c9271a4891f712a02 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Mon, 4 May 2020 04:43:56 +0900
Subject: [PATCH 09/28] Demo: Improve layout and design.
This adds support for a light/dark theme based on the OS color scheme setting.
---
css/demo.css | 146 +++++++++++++++++++++++++++++++++++-------------
index.html | 9 ++-
js/demo/demo.js | 6 +-
3 files changed, 117 insertions(+), 44 deletions(-)
diff --git a/css/demo.css b/css/demo.css
index a21cb17..4134e00 100644
--- a/css/demo.css
+++ b/css/demo.css
@@ -13,63 +13,133 @@ body {
max-width: 750px;
margin: 0 auto;
padding: 1em;
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Arial, sans-serif;
- font-size: 1em;
- line-height: 1.4em;
- background: #222;
- color: #fff;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
+ font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
+ sans-serif;
+ line-height: 1.4;
+ background: #212121;
+ color: #dedede;
}
a {
- color: orange;
+ color: #61afef;
text-decoration: none;
}
-img {
+a:visited {
+ color: #56b6c2;
+}
+a:hover {
+ color: #98c379;
+}
+figure,
+tr {
+ background: #363636;
+}
+tr:nth-child(odd) {
+ background: #414141;
+}
+td,
+th {
+ padding: 10px;
+ text-align: left;
+}
+table {
+ width: 100%;
+ word-wrap: break-word;
+ table-layout: fixed;
+ border-collapse: collapse;
+}
+figure {
+ margin: 0;
+ padding: 10px;
+ border-radius: 5px;
+ display: inline-block;
+}
+figure,
+table {
+ margin-bottom: 20px;
+}
+img,
+canvas {
border: 0;
vertical-align: middle;
}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin-top: 1.5em;
+ margin-bottom: 0.5em;
+}
h1 {
- line-height: 1em;
+ margin-top: 0.5em;
}
-textarea,
-input {
- display: inline-block;
- width: 100%;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
+button,
+input,
+select,
+textarea {
box-sizing: border-box;
- padding: 10px;
- margin: 0 0 10px;
- font-family: 'Lucida Console', Monaco, monospace;
+ font-family: inherit;
+ font-size: 100%;
+ line-height: 1.15;
+ margin: 0;
+ padding: 5px;
}
-.result {
- padding: 20px 40px;
- background: #fff;
- color: #222;
+input[type='file'] {
+ padding: inherit;
}
-.error {
- color: red;
+
+#template,
+#data {
+ width: 100%;
+ font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
+}
+
+#result {
+ background: #363636;
+ padding: 20px;
+ border-radius: 5px;
+}
+
+@media (prefers-color-scheme: light) {
+ body {
+ background: #ececec;
+ color: #212121;
+ }
+ a {
+ color: #225c8d;
+ }
+ a:visited {
+ color: #378f9a;
+ }
+ a:hover {
+ color: #6fa349;
+ }
+ figure,
+ tr {
+ background: #fff;
+ color: #212121;
+ }
+ tr:nth-child(odd) {
+ background: #f6f6f6;
+ }
+
+ #result {
+ background: #fff;
+ padding: 20px;
+ border-radius: 5px;
+ }
}
@media (min-width: 481px) {
- .navigation {
+ #navigation {
list-style: none;
padding: 0;
}
- .navigation li {
+ #navigation li {
display: inline-block;
}
- .navigation li:not(:first-child):before {
- content: '| ';
+ #navigation li:not(:first-child)::before {
+ content: ' | ';
}
}
-
-/* IE7 fixes */
-* + html textarea,
-* + html input {
- width: 460px;
-}
-* + html .result {
- width: 400px;
-}
diff --git a/index.html b/index.html
index 86d6b76..63d280d 100644
--- a/index.html
+++ b/index.html
@@ -32,12 +32,11 @@ JavaScript Templates Demo
JavaScript
templating engine with zero dependencies.
Compatible with server-side environments like
- Node.js, module loaders like
- RequireJS,
- Browserify or
- webpack and all web browsers.
+ Node.js, module loaders like
+ RequireJS or
+ webpack and all web browsers.
-
+
-
Download
Date: Mon, 4 May 2020 04:44:11 +0900
Subject: [PATCH 10/28] Docs: Update reference links and add NPM install.
---
README.md | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
diff --git a/README.md b/README.md
index 6e2df13..d8281b2 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
## Contents
-- [Demo](#demo)
+- [Demo](https://blueimp.github.io/JavaScript-Templates/)
- [Description](#description)
- [Usage](#usage)
- [Client-side](#client-side)
@@ -22,20 +22,24 @@
- [Tests](#tests)
- [License](#license)
-## Demo
-
-[JavaScript Templates Demo](https://blueimp.github.io/JavaScript-Templates/)
-
## Description
1KB lightweight, fast & powerful JavaScript templating engine with zero
-dependencies. Compatible with server-side environments like Node.js, module
-loaders like RequireJS, Browserify or webpack and all web browsers.
+dependencies.
+Compatible with server-side environments like [Node.js](https://nodejs.org/),
+module loaders like [RequireJS](https://requirejs.org/) or
+[webpack](https://webpack.js.org/) and all web browsers.
## Usage
### Client-side
+Install the **blueimp-tmpl** package with [NPM](https://www.npmjs.org/):
+
+```sh
+npm install blueimp-tmpl
+```
+
Include the (minified) JavaScript Templates script in your HTML markup:
```html
@@ -77,7 +81,7 @@ var data = {
```
In a real application, this data could be the result of retrieving a
-[JSON](http://json.org/) resource.
+[JSON](https://json.org/) resource.
Render the result by calling the **tmpl()** method with the id of the template
and the data object as arguments:
@@ -89,10 +93,9 @@ document.getElementById('result').innerHTML = tmpl('tmpl-demo', data)
### Server-side
The following is an example how to use the JavaScript Templates engine on the
-server-side with [node.js](http://nodejs.org/).
+server-side with [Node.js](https://nodejs.org/).
-Create a new directory and add the **tmpl.js** file. Or alternatively, install
-the **blueimp-tmpl** package with [npm](https://www.npmjs.org/):
+Install the **blueimp-tmpl** package with [NPM](https://www.npmjs.org/):
```sh
npm install blueimp-tmpl
@@ -116,7 +119,7 @@ Add a file **server.js** with the following content:
```js
require('http')
- .createServer(function(req, res) {
+ .createServer(function (req, res) {
var fs = require('fs'),
// The tmpl module exports the tmpl() function:
tmpl = require('./tmpl'),
@@ -129,7 +132,7 @@ require('http')
features: ['lightweight & fast', 'powerful', 'zero dependencies']
}
// Override the template loading method:
- tmpl.load = function(id) {
+ tmpl.load = function (id) {
var filename = id + '.html'
console.log('Loading ' + filename)
return fs.readFileSync(filename, 'utf8')
@@ -295,7 +298,7 @@ function, e.g. with the following code:
```js
var originalFunc = tmpl.func
-tmpl.func = function(s, p1, p2, p3, p4, p5, offset, str) {
+tmpl.func = function (s, p1, p2, p3, p4, p5, offset, str) {
if (p1 && /\s/.test(p1)) {
if (
!offset ||
@@ -386,9 +389,9 @@ The JavaScript Templates project comes with a compilation script, that allows
you to compile your templates into JavaScript code and combine them with a
minimal Templates runtime into one combined JavaScript file.
-The compilation script is built for [node.js](http://nodejs.org/).
+The compilation script is built for [Node.js](https://nodejs.org/).
To use it, first install the JavaScript Templates project via
-[npm](https://www.npmjs.org/):
+[NPM](https://www.npmjs.org/):
```sh
npm install blueimp-tmpl
@@ -425,7 +428,7 @@ There are two different ways to run the tests:
- run `npm test` in the Terminal in the root path of the repository package.
The first one tests the browser integration, the second one the
-[node.js](http://nodejs.org/) integration.
+[Node.js](https://nodejs.org/) integration.
## License
From 9fc8e54306975e615670528668bf205c7d5d04ee Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Mon, 4 May 2020 04:45:29 +0900
Subject: [PATCH 11/28] Update dev dependencies.
---
package-lock.json | 191 +++++++++++++++++++++++-----------------------
package.json | 2 +-
2 files changed, 95 insertions(+), 98 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0bee19c..b9964ae 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -14,9 +14,9 @@
}
},
"@babel/helper-validator-identifier": {
- "version": "7.9.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz",
- "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==",
+ "version": "7.9.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
+ "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
"dev": true
},
"@babel/highlight": {
@@ -49,9 +49,9 @@
"dev": true
},
"ajv": {
- "version": "6.12.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
- "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
+ "version": "6.12.2",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
+ "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -241,9 +241,9 @@
}
},
"cli-width": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
- "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
+ "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
"dev": true
},
"cliui": {
@@ -484,18 +484,18 @@
"dev": true
},
"eslint-config-prettier": {
- "version": "6.10.1",
- "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.10.1.tgz",
- "integrity": "sha512-svTy6zh1ecQojvpbJSgH3aei/Rt7C6i090l5f2WQ4aB05lYHeZIR1qL4wZyyILTbtmnbHP5Yn8MrsOJMGa8RkQ==",
+ "version": "6.11.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz",
+ "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==",
"dev": true,
"requires": {
"get-stdin": "^6.0.0"
}
},
"eslint-plugin-jsdoc": {
- "version": "22.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz",
- "integrity": "sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg==",
+ "version": "24.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-24.0.2.tgz",
+ "integrity": "sha512-tvk/jPpIP6MBVZETYnurKL/VGKzSinSbhpz1x+CzDOX20bmhRnCiexrgre4xF0WD/feg7ARKTVLCygVB3pfG5Q==",
"dev": true,
"requires": {
"comment-parser": "^0.7.2",
@@ -508,9 +508,9 @@
}
},
"eslint-plugin-prettier": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz",
- "integrity": "sha512-GlolCC9y3XZfv3RQfwGew7NnuFDKsfI4lbvRK+PIIo23SFH+LemGs4cKwzAaRa+Mdb+lQO/STaIayno8T5sJJA==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz",
+ "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
@@ -559,18 +559,18 @@
"dev": true
},
"esquery": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.2.0.tgz",
- "integrity": "sha512-weltsSqdeWIX9G2qQZz7KlTRJdkkOCTPgLYJUz1Hacf48R4YOwGPHO3+ORfWedqJKbq5WQmsgK90n+pFLIKt/Q==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
+ "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
"dev": true,
"requires": {
- "estraverse": "^5.0.0"
+ "estraverse": "^5.1.0"
},
"dependencies": {
"estraverse": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.0.0.tgz",
- "integrity": "sha512-j3acdrMzqrxmJTNj5dbr1YbjacrYgAxVMeF0gK16E3j494mOe7xygM/ZLIguEQ0ETwAg2hlJCtHRGav+y0Ny5A==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
+ "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==",
"dev": true
}
}
@@ -688,9 +688,9 @@
}
},
"flatted": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
- "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+ "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
"dev": true
},
"fs.realpath": {
@@ -700,9 +700,9 @@
"dev": true
},
"fsevents": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz",
- "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==",
+ "version": "2.1.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
+ "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"dev": true,
"optional": true
},
@@ -984,12 +984,6 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
- "is-promise": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
- "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
- "dev": true
- },
"is-regex": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
@@ -1105,18 +1099,18 @@
"dev": true
},
"mkdirp": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz",
- "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==",
+ "version": "0.5.5",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+ "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
"dev": true,
"requires": {
"minimist": "^1.2.5"
}
},
"mocha": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.1.tgz",
- "integrity": "sha512-3qQsu3ijNS3GkWcccT5Zw0hf/rWvu1fTN9sPvEd81hlwsr30GX2GcDSSoBxo24IR8FelmrAydGC6/1J5QQP4WA==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz",
+ "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==",
"dev": true,
"requires": {
"ansi-colors": "3.2.3",
@@ -1132,7 +1126,7 @@
"js-yaml": "3.13.1",
"log-symbols": "3.0.0",
"minimatch": "3.0.4",
- "mkdirp": "0.5.3",
+ "mkdirp": "0.5.5",
"ms": "2.1.1",
"node-environment-flags": "1.0.6",
"object.assign": "4.1.0",
@@ -1168,15 +1162,6 @@
"path-is-absolute": "^1.0.0"
}
},
- "mkdirp": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
- "integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==",
- "dev": true,
- "requires": {
- "minimist": "^1.2.5"
- }
- },
"ms": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
@@ -1321,9 +1306,9 @@
"dev": true
},
"p-limit": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz",
- "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dev": true,
"requires": {
"p-try": "^2.0.0"
@@ -1390,9 +1375,9 @@
"dev": true
},
"prettier": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.2.tgz",
- "integrity": "sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg==",
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
+ "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
"dev": true
},
"prettier-linter-helpers": {
@@ -1475,18 +1460,15 @@
}
},
"run-async": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
- "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
- "dev": true,
- "requires": {
- "is-promise": "^2.1.0"
- }
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
+ "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
+ "dev": true
},
"rxjs": {
- "version": "6.5.4",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
- "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "version": "6.5.5",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
+ "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
"dev": true,
"requires": {
"tslib": "^1.9.0"
@@ -1526,9 +1508,9 @@
"dev": true
},
"signal-exit": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
- "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+ "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
"dev": true
},
"slice-ansi": {
@@ -1550,16 +1532,10 @@
}
}
},
- "source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "dev": true
- },
"spdx-exceptions": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
- "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
"dev": true
},
"spdx-expression-parse": {
@@ -1606,24 +1582,46 @@
}
}
},
+ "string.prototype.trimend": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
+ "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
+ }
+ },
"string.prototype.trimleft": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
- "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
+ "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimstart": "^1.0.0"
}
},
"string.prototype.trimright": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
- "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
+ "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
"dev": true,
"requires": {
"define-properties": "^1.1.3",
- "function-bind": "^1.1.1"
+ "es-abstract": "^1.17.5",
+ "string.prototype.trimend": "^1.0.0"
+ }
+ },
+ "string.prototype.trimstart": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
+ "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.5"
}
},
"strip-ansi": {
@@ -1644,9 +1642,9 @@
}
},
"strip-json-comments": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
- "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
+ "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
"dev": true
},
"supports-color": {
@@ -1753,13 +1751,12 @@
"dev": true
},
"uglify-js": {
- "version": "3.8.0",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.8.0.tgz",
- "integrity": "sha512-ugNSTT8ierCsDHso2jkBHXYrU8Y5/fY2ZUprfrJUiD7YpuFvV4jODLFmb3h4btQjqr5Nh4TX4XtgDfCU1WdioQ==",
+ "version": "3.9.2",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.2.tgz",
+ "integrity": "sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q==",
"dev": true,
"requires": {
- "commander": "~2.20.3",
- "source-map": "~0.6.1"
+ "commander": "~2.20.3"
}
},
"uri-js": {
diff --git a/package.json b/package.json
index 1353f47..fcc7658 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"eslint": "6",
"eslint-config-blueimp": "1",
"eslint-config-prettier": "6",
- "eslint-plugin-jsdoc": "22",
+ "eslint-plugin-jsdoc": "24",
"eslint-plugin-prettier": "3",
"mocha": "7",
"prettier": "2",
From b1996fd202ffd349c7a2d9dd86a319b70fbd7c7a Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Mon, 4 May 2020 04:45:36 +0900
Subject: [PATCH 12/28] 3.15.0
---
js/tmpl.min.js.map | 2 +-
package-lock.json | 2 +-
package.json | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/js/tmpl.min.js.map b/js/tmpl.min.js.map
index 9334ee8..1c55780 100644
--- a/js/tmpl.min.js.map
+++ b/js/tmpl.min.js.map
@@ -1 +1 @@
-{"version":3,"sources":["tmpl.js"],"names":["$","tmpl","str","data","f","test","Function","arg","helper","replace","regexp","func","cache","load","id","document","getElementById","innerHTML","s","p1","p2","p3","p4","p5","\n","\r","\t"," ","encReg","encMap","<",">","&","\"","'","encode","c","define","amd","module","exports","this"],"mappings":"CAkBC,SAAWA,GACV,aACA,IAAIC,EAAO,SAAUC,EAAKC,GACxB,IAAIC,EAAK,YAAYC,KAAKH,GAEtB,IAAII,SACFL,EAAKM,IAAM,QACX,qBACEN,EAAKO,OACL,QACAN,EAAIO,QAAQR,EAAKS,OAAQT,EAAKU,MAC9B,gBAPHV,EAAKW,MAAMV,GAAOD,EAAKW,MAAMV,IAAQD,EAAKA,EAAKY,KAAKX,IASzD,OAAOC,EACHC,EAAED,EAAMF,GACR,SAAUE,GACR,OAAOC,EAAED,EAAMF,KAGvBA,EAAKW,MAAQ,GACbX,EAAKY,KAAO,SAAUC,GACpB,OAAOC,SAASC,eAAeF,GAAIG,WAErChB,EAAKS,OAAS,2EACdT,EAAKU,KAAO,SAAUO,EAAGC,EAAIC,EAAIC,EAAIC,EAAIC,GACvC,OAAIJ,EAGA,CACEK,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,IAAK,KACLR,IAAO,KAAOA,EAGhBC,EAES,MAAPA,EACK,QAAUC,EAAK,MAEjB,MAAQA,EAAK,aAAeA,EAAK,MAEtCC,EAEK,KAELC,EAEK,aAFT,GAKFtB,EAAK2B,OAAS,eACd3B,EAAK4B,OAAS,CACZC,IAAK,OACLC,IAAK,OACLC,IAAK,QACLC,IAAK,SACLC,IAAK,SAEPjC,EAAKkC,OAAS,SAAUjB,GAEtB,OAAa,MAALA,EAAY,GAAK,GAAKA,GAAGT,QAAQR,EAAK2B,OAAQ,SAAUQ,GAC9D,OAAOnC,EAAK4B,OAAOO,IAAM,MAG7BnC,EAAKM,IAAM,IACXN,EAAKO,OACH,0FAEoB,mBAAX6B,QAAyBA,OAAOC,IACzCD,OAAO,WACL,OAAOpC,IAEkB,iBAAXsC,QAAuBA,OAAOC,QAC9CD,OAAOC,QAAUvC,EAEjBD,EAAEC,KAAOA,EA7EZ,CA+EEwC"}
\ No newline at end of file
+{"version":3,"sources":["tmpl.js"],"names":["$","tmpl","str","data","f","test","Function","arg","helper","replace","regexp","func","cache","load","id","document","getElementById","innerHTML","s","p1","p2","p3","p4","p5","\n","\r","\t"," ","encReg","encMap","<",">","&","\"","'","encode","c","define","amd","module","exports","this"],"mappings":"CAkBC,SAAWA,gBAEV,IAAIC,EAAO,SAAUC,EAAKC,GACxB,IAAIC,EAAK,YAAYC,KAAKH,GAEtB,IAAII,SACFL,EAAKM,IAAM,QACX,qBACEN,EAAKO,OACL,QACAN,EAAIO,QAAQR,EAAKS,OAAQT,EAAKU,MAC9B,gBAPHV,EAAKW,MAAMV,GAAOD,EAAKW,MAAMV,IAAQD,EAAKA,EAAKY,KAAKX,IASzD,OAAOC,EACHC,EAAED,EAAMF,GACR,SAAUE,GACR,OAAOC,EAAED,EAAMF,KAGvBA,EAAKW,MAAQ,GACbX,EAAKY,KAAO,SAAUC,GACpB,OAAOC,SAASC,eAAeF,GAAIG,WAErChB,EAAKS,OAAS,2EACdT,EAAKU,KAAO,SAAUO,EAAGC,EAAIC,EAAIC,EAAIC,EAAIC,GACvC,OAAIJ,EAGA,CACEK,KAAM,MACNC,KAAM,MACNC,KAAM,MACNC,IAAK,KACLR,IAAO,KAAOA,EAGhBC,EAES,MAAPA,EACK,QAAUC,EAAK,MAEjB,MAAQA,EAAK,aAAeA,EAAK,MAEtCC,EAEK,KAELC,EAEK,aAFT,GAKFtB,EAAK2B,OAAS,eACd3B,EAAK4B,OAAS,CACZC,IAAK,OACLC,IAAK,OACLC,IAAK,QACLC,IAAK,SACLC,IAAK,SAEPjC,EAAKkC,OAAS,SAAUjB,GAEtB,OAAa,MAALA,EAAY,GAAK,GAAKA,GAAGT,QAAQR,EAAK2B,OAAQ,SAAUQ,GAC9D,OAAOnC,EAAK4B,OAAOO,IAAM,MAG7BnC,EAAKM,IAAM,IACXN,EAAKO,OACH,0FAEoB,mBAAX6B,QAAyBA,OAAOC,IACzCD,OAAO,WACL,OAAOpC,IAEkB,iBAAXsC,QAAuBA,OAAOC,QAC9CD,OAAOC,QAAUvC,EAEjBD,EAAEC,KAAOA,EA7EZ,CA+EEwC"}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index b9964ae..b0ad63c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.14.0",
+ "version": "3.15.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index fcc7658..5adaf7f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.14.0",
+ "version": "3.15.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From 9ea2cb9b155ffd01844fd7134f628f341756fcc8 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Fri, 8 May 2020 21:13:33 +0900
Subject: [PATCH 13/28] Update demo styles.
---
css/demo.css | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/css/demo.css b/css/demo.css
index 4134e00..dffff7f 100644
--- a/css/demo.css
+++ b/css/demo.css
@@ -13,8 +13,8 @@ body {
max-width: 750px;
margin: 0 auto;
padding: 1em;
- font-family: -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
- sans-serif;
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
+ Arial, sans-serif;
line-height: 1.4;
background: #212121;
color: #dedede;
@@ -87,6 +87,7 @@ textarea {
}
input[type='file'] {
padding: inherit;
+ max-width: 100%;
}
#template,
From 5dc0e0a03b70e8cbf261f0d5f4d2443caf429c45 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Fri, 8 May 2020 21:13:48 +0900
Subject: [PATCH 14/28] Update dev dependencies.
---
package-lock.json | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b0ad63c..f1c81dd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -304,9 +304,9 @@
"dev": true
},
"comment-parser": {
- "version": "0.7.2",
- "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.2.tgz",
- "integrity": "sha512-4Rjb1FnxtOcv9qsfuaNuVsmmVn4ooVoBHzYfyKteiXwIU84PClyGA5jASoFMwPV93+FPh9spwueXauxFJZkGAg==",
+ "version": "0.7.4",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.4.tgz",
+ "integrity": "sha512-Nnl77/mt6sj1BiYSVMeMWzvD0183F2MFOJyFRmZHimUVDYS9J40AvXpiFA7RpU5pQH+HkvYc0dnsHpwW2xmbyQ==",
"dev": true
},
"concat-map": {
@@ -493,12 +493,12 @@
}
},
"eslint-plugin-jsdoc": {
- "version": "24.0.2",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-24.0.2.tgz",
- "integrity": "sha512-tvk/jPpIP6MBVZETYnurKL/VGKzSinSbhpz1x+CzDOX20bmhRnCiexrgre4xF0WD/feg7ARKTVLCygVB3pfG5Q==",
+ "version": "24.0.6",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-24.0.6.tgz",
+ "integrity": "sha512-WDzUgShMK7Zg9N6s19LxUqy71At/PxCuMEXaKyBzybhABq6iU4DaZtWZ+4fkCMBvMzMwMAPa2oRD/+fQGORMhg==",
"dev": true,
"requires": {
- "comment-parser": "^0.7.2",
+ "comment-parser": "^0.7.4",
"debug": "^4.1.1",
"jsdoctypeparser": "^6.1.0",
"lodash": "^4.17.15",
@@ -1724,9 +1724,9 @@
}
},
"tslib": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
- "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
+ "version": "1.11.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz",
+ "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==",
"dev": true
},
"type-check": {
From b143ff271eeaebc053b3adade3001e032fc2711b Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Fri, 8 May 2020 21:15:14 +0900
Subject: [PATCH 15/28] 3.16.0
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index f1c81dd..85f8022 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.15.0",
+ "version": "3.16.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 5adaf7f..628bf5f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.15.0",
+ "version": "3.16.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From a383140e84ff1d1fb39ecda619678ba0b9b947da Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 14 May 2020 10:13:35 +0900
Subject: [PATCH 16/28] GitHub workflow: Upgrade to actions/checkout@v2.
---
.github/workflows/{nodejs.yml => test.yml} | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
rename .github/workflows/{nodejs.yml => test.yml} (88%)
diff --git a/.github/workflows/nodejs.yml b/.github/workflows/test.yml
similarity index 88%
rename from .github/workflows/nodejs.yml
rename to .github/workflows/test.yml
index 71ea8eb..bf627ae 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/test.yml
@@ -1,9 +1,9 @@
-name: Node CI
+name: Test
on: [push, pull_request]
jobs:
- build:
+ test:
runs-on: ubuntu-latest
strategy:
@@ -11,7 +11,7 @@ jobs:
node-version: [10.x, 12.x]
steps:
- - uses: actions/checkout@v1
+ - uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
From b9536567503c2b6fecd38cc7fa5e40831091d435 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 14 May 2020 10:15:07 +0900
Subject: [PATCH 17/28] Upgrade dev dependencies.
---
package-lock.json | 385 +++++++++++++++++++++++++++++-----------------
package.json | 6 +-
2 files changed, 245 insertions(+), 146 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 85f8022..ad99f79 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -28,6 +28,19 @@
"@babel/helper-validator-identifier": "^7.9.0",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ }
}
},
"@types/color-name": {
@@ -37,9 +50,9 @@
"dev": true
},
"acorn": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
- "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
+ "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
"dev": true
},
"acorn-jsx": {
@@ -193,14 +206,55 @@
}
},
"chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
+ "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
"dev": true,
"requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
}
},
"chardet": {
@@ -257,6 +311,12 @@
"wrap-ansi": "^5.1.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -279,6 +339,15 @@
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
}
}
},
@@ -316,24 +385,14 @@
"dev": true
},
"cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "version": "7.0.2",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
+ "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==",
"dev": true,
"requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
}
},
"debug": {
@@ -433,22 +492,22 @@
"dev": true
},
"eslint": {
- "version": "6.8.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
- "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz",
+ "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"ajv": "^6.10.0",
- "chalk": "^2.1.0",
- "cross-spawn": "^6.0.5",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
"debug": "^4.0.1",
"doctrine": "^3.0.0",
"eslint-scope": "^5.0.0",
- "eslint-utils": "^1.4.3",
+ "eslint-utils": "^2.0.0",
"eslint-visitor-keys": "^1.1.0",
- "espree": "^6.1.2",
- "esquery": "^1.0.1",
+ "espree": "^7.0.0",
+ "esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
"functional-red-black-tree": "^1.0.1",
@@ -461,26 +520,25 @@
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.3.0",
+ "levn": "^0.4.1",
"lodash": "^4.17.14",
"minimatch": "^3.0.4",
- "mkdirp": "^0.5.1",
"natural-compare": "^1.4.0",
- "optionator": "^0.8.3",
+ "optionator": "^0.9.1",
"progress": "^2.0.0",
- "regexpp": "^2.0.1",
- "semver": "^6.1.2",
- "strip-ansi": "^5.2.0",
- "strip-json-comments": "^3.0.1",
+ "regexpp": "^3.1.0",
+ "semver": "^7.2.1",
+ "strip-ansi": "^6.0.0",
+ "strip-json-comments": "^3.1.0",
"table": "^5.2.3",
"text-table": "^0.2.0",
"v8-compile-cache": "^2.0.3"
}
},
"eslint-config-blueimp": {
- "version": "1.9.0",
- "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-1.9.0.tgz",
- "integrity": "sha512-30uqxKoc3/AAn7H2lzISh77SRAecZ3D52RBwLdrV5G/ZorWcPNX0ZnlTz68AnaXoIXFu6irkMs1Zi/KJaA5ZJQ==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-2.0.0.tgz",
+ "integrity": "sha512-FoL6USm4l6rk+npoC/SMsvTmc89jH3D2sH5Hh0/y0fZwYRzn6SPZQ6R1DfLNTrJ5AfWA9y3J25t5bT/+PjtE9Q==",
"dev": true
},
"eslint-config-prettier": {
@@ -493,18 +551,26 @@
}
},
"eslint-plugin-jsdoc": {
- "version": "24.0.6",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-24.0.6.tgz",
- "integrity": "sha512-WDzUgShMK7Zg9N6s19LxUqy71At/PxCuMEXaKyBzybhABq6iU4DaZtWZ+4fkCMBvMzMwMAPa2oRD/+fQGORMhg==",
+ "version": "25.4.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-25.4.1.tgz",
+ "integrity": "sha512-EixCLTv36/etbr5GGC89n0GLDkU/5NmadPzI3x6gSzldqrZpyQVh6qqN3jarWdfTvJsimorP4KNCIwe5mk/7TA==",
"dev": true,
"requires": {
"comment-parser": "^0.7.4",
"debug": "^4.1.1",
"jsdoctypeparser": "^6.1.0",
"lodash": "^4.17.15",
- "regextras": "^0.7.0",
+ "regextras": "^0.7.1",
"semver": "^6.3.0",
"spdx-expression-parse": "^3.0.0"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ }
}
},
"eslint-plugin-prettier": {
@@ -527,9 +593,9 @@
}
},
"eslint-utils": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
- "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
+ "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
@@ -542,9 +608,9 @@
"dev": true
},
"espree": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz",
- "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz",
+ "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==",
"dev": true,
"requires": {
"acorn": "^7.1.1",
@@ -910,15 +976,6 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- },
"supports-color": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
@@ -1043,13 +1100,13 @@
"dev": true
},
"levn": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
- "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2"
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
}
},
"locate-path": {
@@ -1075,6 +1132,19 @@
"dev": true,
"requires": {
"chalk": "^2.4.2"
+ },
+ "dependencies": {
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ }
}
},
"mimic-fn": {
@@ -1182,6 +1252,15 @@
"requires": {
"has-flag": "^3.0.0"
}
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
}
}
},
@@ -1203,12 +1282,6 @@
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
- "nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
- "dev": true
- },
"node-environment-flags": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
@@ -1286,17 +1359,17 @@
}
},
"optionator": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
- "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+ "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
"dev": true,
"requires": {
- "deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.6",
- "levn": "~0.3.0",
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2",
- "word-wrap": "~1.2.3"
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0",
+ "word-wrap": "^1.2.3"
}
},
"os-tmpdir": {
@@ -1351,9 +1424,9 @@
"dev": true
},
"path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"dev": true
},
"pathval": {
@@ -1369,9 +1442,9 @@
"dev": true
},
"prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
"dev": true
},
"prettier": {
@@ -1411,15 +1484,15 @@
}
},
"regexpp": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
- "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
+ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
"dev": true
},
"regextras": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.0.tgz",
- "integrity": "sha512-ds+fL+Vhl918gbAUb0k2gVKbTZLsg84Re3DI6p85Et0U0tYME3hyW4nMK8Px4dtDaBA2qNjvG5uWyW7eK5gfmw==",
+ "version": "0.7.1",
+ "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz",
+ "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==",
"dev": true
},
"require-directory": {
@@ -1481,9 +1554,9 @@
"dev": true
},
"semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "version": "7.3.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
+ "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
"dev": true
},
"set-blocking": {
@@ -1493,18 +1566,18 @@
"dev": true
},
"shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dev": true,
"requires": {
- "shebang-regex": "^1.0.0"
+ "shebang-regex": "^3.0.0"
}
},
"shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
"signal-exit": {
@@ -1539,9 +1612,9 @@
"dev": true
},
"spdx-expression-parse": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
- "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
"dev": true,
"requires": {
"spdx-exceptions": "^2.1.0",
@@ -1569,17 +1642,6 @@
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.0"
- },
- "dependencies": {
- "strip-ansi": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
- "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
- "dev": true,
- "requires": {
- "ansi-regex": "^5.0.0"
- }
- }
}
},
"string.prototype.trimend": {
@@ -1625,20 +1687,12 @@
}
},
"strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- }
+ "ansi-regex": "^5.0.0"
}
},
"strip-json-comments": {
@@ -1668,6 +1722,12 @@
"string-width": "^3.0.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -1690,6 +1750,15 @@
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
}
}
},
@@ -1724,18 +1793,18 @@
}
},
"tslib": {
- "version": "1.11.2",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.2.tgz",
- "integrity": "sha512-tTSkux6IGPnUGUd1XAZHcpu85MOkIl5zX49pO+jfsie3eP0B6pyhOlLXm3cAC6T7s+euSDDUUV+Acop5WmtkVg==",
+ "version": "1.13.0",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
+ "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
"dev": true
},
"type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
"dev": true,
"requires": {
- "prelude-ls": "~1.1.2"
+ "prelude-ls": "^1.2.1"
}
},
"type-detect": {
@@ -1751,9 +1820,9 @@
"dev": true
},
"uglify-js": {
- "version": "3.9.2",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.2.tgz",
- "integrity": "sha512-zGVwKslUAD/EeqOrD1nQaBmXIHl1Vw371we8cvS8I6mYK9rmgX5tv8AAeJdfsQ3Kk5mGax2SVV/AizxdNGhl7Q==",
+ "version": "3.9.3",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz",
+ "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==",
"dev": true,
"requires": {
"commander": "~2.20.3"
@@ -1775,9 +1844,9 @@
"dev": true
},
"which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dev": true,
"requires": {
"isexe": "^2.0.0"
@@ -1848,6 +1917,12 @@
"strip-ansi": "^5.0.0"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -1870,6 +1945,15 @@
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
}
}
},
@@ -1912,6 +1996,12 @@
"yargs-parser": "^13.1.2"
},
"dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
@@ -1934,6 +2024,15 @@
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
}
}
},
diff --git a/package.json b/package.json
index 628bf5f..0d11570 100644
--- a/package.json
+++ b/package.json
@@ -20,10 +20,10 @@
"license": "MIT",
"devDependencies": {
"chai": "4",
- "eslint": "6",
- "eslint-config-blueimp": "1",
+ "eslint": "7",
+ "eslint-config-blueimp": "2",
"eslint-config-prettier": "6",
- "eslint-plugin-jsdoc": "24",
+ "eslint-plugin-jsdoc": "25",
"eslint-plugin-prettier": "3",
"mocha": "7",
"prettier": "2",
From 5de93db6da61c5912a958ab48ba3206dcfdb7479 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 14 May 2020 10:24:22 +0900
Subject: [PATCH 18/28] Demo: Point to releases for download.
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 63d280d..b8f1248 100644
--- a/index.html
+++ b/index.html
@@ -38,7 +38,7 @@
JavaScript Templates Demo
-
- Download
From 6d2aefbe186dda061ffbe94a544b5eff58996c14 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 14 May 2020 10:58:56 +0900
Subject: [PATCH 19/28] Demo: Update design and layout.
---
css/demo.css | 116 +++++++++++++++++++++++----------------------------
index.html | 25 ++++++-----
2 files changed, 67 insertions(+), 74 deletions(-)
diff --git a/css/demo.css b/css/demo.css
index dffff7f..70a2010 100644
--- a/css/demo.css
+++ b/css/demo.css
@@ -10,11 +10,12 @@
*/
body {
- max-width: 750px;
+ max-width: 990px;
margin: 0 auto;
padding: 1em;
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
Arial, sans-serif;
+ -webkit-text-size-adjust: 100%;
line-height: 1.4;
background: #212121;
color: #dedede;
@@ -29,39 +30,6 @@ a:visited {
a:hover {
color: #98c379;
}
-figure,
-tr {
- background: #363636;
-}
-tr:nth-child(odd) {
- background: #414141;
-}
-td,
-th {
- padding: 10px;
- text-align: left;
-}
-table {
- width: 100%;
- word-wrap: break-word;
- table-layout: fixed;
- border-collapse: collapse;
-}
-figure {
- margin: 0;
- padding: 10px;
- border-radius: 5px;
- display: inline-block;
-}
-figure,
-table {
- margin-bottom: 20px;
-}
-img,
-canvas {
- border: 0;
- vertical-align: middle;
-}
h1,
h2,
h3,
@@ -74,32 +42,61 @@ h6 {
h1 {
margin-top: 0.5em;
}
+label {
+ display: inline-block;
+ margin-bottom: 0.25em;
+}
button,
-input,
select,
-textarea {
+input,
+textarea,
+div.result {
+ -webkit-appearance: none;
box-sizing: border-box;
+ margin: 0;
+ padding: 0.5em 0.75em;
font-family: inherit;
font-size: 100%;
- line-height: 1.15;
- margin: 0;
- padding: 5px;
-}
-input[type='file'] {
- padding: inherit;
- max-width: 100%;
+ line-height: 1.4;
+ background: #414141;
+ color: #dedede;
+ border: 1px solid #363636;
+ border-radius: 5px;
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.07);
}
-
-#template,
-#data {
+input,
+textarea,
+div.result {
width: 100%;
- font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
+ box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.07);
+}
+textarea {
+ display: block;
+ overflow: auto;
+}
+button {
+ background: #3c76a7;
+ background: linear-gradient(180deg, #3c76a7, #225c8d);
+ border-color: #225c8d;
+ color: #fff;
+}
+button[type='submit'] {
+ background: #6fa349;
+ background: linear-gradient(180deg, #6fa349, #568a30);
+ border-color: #568a30;
+}
+button[type='reset'] {
+ background: #d79435;
+ background: linear-gradient(180deg, #d79435, #be7b1c);
+ border-color: #be7b1c;
+}
+button:active {
+ box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5);
}
-#result {
- background: #363636;
- padding: 20px;
- border-radius: 5px;
+pre,
+textarea.code {
+ font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}
@media (prefers-color-scheme: light) {
@@ -116,23 +113,16 @@ input[type='file'] {
a:hover {
color: #6fa349;
}
- figure,
- tr {
+ input,
+ textarea,
+ div.result {
background: #fff;
+ border-color: #d1d1d1;
color: #212121;
}
- tr:nth-child(odd) {
- background: #f6f6f6;
- }
-
- #result {
- background: #fff;
- padding: 20px;
- border-radius: 5px;
- }
}
-@media (min-width: 481px) {
+@media (min-width: 540px) {
#navigation {
list-style: none;
padding: 0;
diff --git a/index.html b/index.html
index b8f1248..ae27d75 100644
--- a/index.html
+++ b/index.html
@@ -57,17 +57,20 @@ JavaScript Templates Demo
- © Sebastian Tschan
From c9a02bbbb00a0fba6e9963b4e1e3eebe1642c22f Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Thu, 14 May 2020 11:00:16 +0900
Subject: [PATCH 20/28] 3.17.0
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index ad99f79..c350a85 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.16.0",
+ "version": "3.17.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 0d11570..266081c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.16.0",
+ "version": "3.17.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From 8a62c8b0a7ca490074885a450ef7900906edaa47 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 26 Jul 2020 11:55:29 +0900
Subject: [PATCH 21/28] Update dev dependencies.
---
package-lock.json | 948 +++------
package.json | 4 +-
test/vendor/mocha.js | 4617 ++++++++++++++++++++++--------------------
3 files changed, 2755 insertions(+), 2814 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index c350a85..8b0c534 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,27 +5,27 @@
"requires": true,
"dependencies": {
"@babel/code-frame": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
- "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz",
+ "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==",
"dev": true,
"requires": {
- "@babel/highlight": "^7.8.3"
+ "@babel/highlight": "^7.10.4"
}
},
"@babel/helper-validator-identifier": {
- "version": "7.9.5",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz",
- "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz",
+ "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==",
"dev": true
},
"@babel/highlight": {
- "version": "7.9.0",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz",
- "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==",
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz",
+ "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==",
"dev": true,
"requires": {
- "@babel/helper-validator-identifier": "^7.9.0",
+ "@babel/helper-validator-identifier": "^7.10.4",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
},
@@ -50,9 +50,9 @@
"dev": true
},
"acorn": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.2.0.tgz",
- "integrity": "sha512-apwXVmYVpQ34m/i71vrApRrRKCWQnZZF1+npOD0WV5xZFfwWOmKGQ2RWlfdy9vWITsenisM8M0Qeq8agcFHNiQ==",
+ "version": "7.3.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
+ "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
"dev": true
},
"acorn-jsx": {
@@ -62,9 +62,9 @@
"dev": true
},
"ajv": {
- "version": "6.12.2",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
- "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==",
+ "version": "6.12.3",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
+ "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -74,28 +74,11 @@
}
},
"ansi-colors": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
- "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+ "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
"dev": true
},
- "ansi-escapes": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
- "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
- "dev": true,
- "requires": {
- "type-fest": "^0.11.0"
- },
- "dependencies": {
- "type-fest": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
- "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
- "dev": true
- }
- }
- },
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
@@ -130,6 +113,18 @@
"sprintf-js": "~1.0.2"
}
},
+ "array.prototype.map": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz",
+ "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==",
+ "dev": true,
+ "requires": {
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1",
+ "es-array-method-boxes-properly": "^1.0.0",
+ "is-string": "^1.0.4"
+ }
+ },
"assertion-error": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
@@ -149,9 +144,9 @@
"dev": true
},
"binary-extensions": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz",
- "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
+ "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
"dev": true
},
"brace-expansion": {
@@ -206,9 +201,9 @@
}
},
"chalk": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz",
- "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
+ "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
"dev": true,
"requires": {
"ansi-styles": "^4.1.0",
@@ -257,12 +252,6 @@
}
}
},
- "chardet": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
- "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
- "dev": true
- },
"check-error": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
@@ -270,36 +259,21 @@
"dev": true
},
"chokidar": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
- "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
+ "version": "3.3.1",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
+ "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
"dev": true,
"requires": {
"anymatch": "~3.1.1",
"braces": "~3.0.2",
- "fsevents": "~2.1.1",
+ "fsevents": "~2.1.2",
"glob-parent": "~5.1.0",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
- "readdirp": "~3.2.0"
+ "readdirp": "~3.3.0"
}
},
- "cli-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
- "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
- "dev": true,
- "requires": {
- "restore-cursor": "^3.1.0"
- }
- },
- "cli-width": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz",
- "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==",
- "dev": true
- },
"cliui": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
@@ -317,29 +291,6 @@
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -366,16 +317,10 @@
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
- "commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
- "dev": true
- },
"comment-parser": {
- "version": "0.7.4",
- "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.4.tgz",
- "integrity": "sha512-Nnl77/mt6sj1BiYSVMeMWzvD0183F2MFOJyFRmZHimUVDYS9J40AvXpiFA7RpU5pQH+HkvYc0dnsHpwW2xmbyQ==",
+ "version": "0.7.5",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.5.tgz",
+ "integrity": "sha512-iH9YA35ccw94nx5244GVkpyC9eVTsL71jZz6iz5w6RIf79JLF2AsXHXq9p6Oaohyl3sx5qSMnGsWUDFIAfWL4w==",
"dev": true
},
"concat-map": {
@@ -385,9 +330,9 @@
"dev": true
},
"cross-spawn": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz",
- "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==",
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -435,9 +380,9 @@
}
},
"diff": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
- "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+ "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
"dev": true
},
"doctrine": {
@@ -450,28 +395,58 @@
}
},
"emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
+ "enquirer": {
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
+ "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
+ "dev": true,
+ "requires": {
+ "ansi-colors": "^4.1.1"
+ }
+ },
"es-abstract": {
- "version": "1.17.5",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz",
- "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==",
+ "version": "1.17.6",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz",
+ "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==",
"dev": true,
"requires": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
"has-symbols": "^1.0.1",
- "is-callable": "^1.1.5",
- "is-regex": "^1.0.5",
+ "is-callable": "^1.2.0",
+ "is-regex": "^1.1.0",
"object-inspect": "^1.7.0",
"object-keys": "^1.1.1",
"object.assign": "^4.1.0",
- "string.prototype.trimleft": "^2.1.1",
- "string.prototype.trimright": "^2.1.1"
+ "string.prototype.trimend": "^1.0.1",
+ "string.prototype.trimstart": "^1.0.1"
+ }
+ },
+ "es-array-method-boxes-properly": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz",
+ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==",
+ "dev": true
+ },
+ "es-get-iterator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz",
+ "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==",
+ "dev": true,
+ "requires": {
+ "es-abstract": "^1.17.4",
+ "has-symbols": "^1.0.1",
+ "is-arguments": "^1.0.4",
+ "is-map": "^2.0.1",
+ "is-set": "^2.0.1",
+ "is-string": "^1.0.5",
+ "isarray": "^2.0.5"
}
},
"es-to-primitive": {
@@ -492,9 +467,9 @@
"dev": true
},
"eslint": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.0.0.tgz",
- "integrity": "sha512-qY1cwdOxMONHJfGqw52UOpZDeqXy8xmD0u8CT6jIstil72jkhURC704W8CFyTPDPllz4z4lu0Ql1+07PG/XdIg==",
+ "version": "7.5.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.5.0.tgz",
+ "integrity": "sha512-vlUP10xse9sWt9SGRtcr1LAC67BENcQMFeV+w5EvLEoFe3xJ8cF1Skd0msziRx/VMC+72B4DxreCE+OR12OA6Q==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
@@ -503,10 +478,11 @@
"cross-spawn": "^7.0.2",
"debug": "^4.0.1",
"doctrine": "^3.0.0",
- "eslint-scope": "^5.0.0",
- "eslint-utils": "^2.0.0",
- "eslint-visitor-keys": "^1.1.0",
- "espree": "^7.0.0",
+ "enquirer": "^2.3.5",
+ "eslint-scope": "^5.1.0",
+ "eslint-utils": "^2.1.0",
+ "eslint-visitor-keys": "^1.3.0",
+ "espree": "^7.2.0",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
@@ -516,12 +492,11 @@
"ignore": "^4.0.6",
"import-fresh": "^3.0.0",
"imurmurhash": "^0.1.4",
- "inquirer": "^7.0.0",
"is-glob": "^4.0.0",
"js-yaml": "^3.13.1",
"json-stable-stringify-without-jsonify": "^1.0.1",
"levn": "^0.4.1",
- "lodash": "^4.17.14",
+ "lodash": "^4.17.19",
"minimatch": "^3.0.4",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
@@ -536,9 +511,9 @@
}
},
"eslint-config-blueimp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-2.0.0.tgz",
- "integrity": "sha512-FoL6USm4l6rk+npoC/SMsvTmc89jH3D2sH5Hh0/y0fZwYRzn6SPZQ6R1DfLNTrJ5AfWA9y3J25t5bT/+PjtE9Q==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-blueimp/-/eslint-config-blueimp-2.1.0.tgz",
+ "integrity": "sha512-Ox/sCVx9gX4yPkk1JTqKLEyGOqrPVjJQvK7m1FCg2zAVgZbzCTw64s4tLW7Svn1yfwVqPeNPX+1LL0iAXjO66Q==",
"dev": true
},
"eslint-config-prettier": {
@@ -551,41 +526,33 @@
}
},
"eslint-plugin-jsdoc": {
- "version": "25.4.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-25.4.1.tgz",
- "integrity": "sha512-EixCLTv36/etbr5GGC89n0GLDkU/5NmadPzI3x6gSzldqrZpyQVh6qqN3jarWdfTvJsimorP4KNCIwe5mk/7TA==",
+ "version": "30.0.3",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.0.3.tgz",
+ "integrity": "sha512-EviSu0Hgc9Bhz00WhA6829KYC9BaP6JWoycOTA1xFxjQ/2XguRlB3r6nGNA/jkmMDQp5dTQ22s1kAJIaC+dE8Q==",
"dev": true,
"requires": {
- "comment-parser": "^0.7.4",
+ "comment-parser": "^0.7.5",
"debug": "^4.1.1",
- "jsdoctypeparser": "^6.1.0",
+ "jsdoctypeparser": "^8.0.0",
"lodash": "^4.17.15",
"regextras": "^0.7.1",
- "semver": "^6.3.0",
- "spdx-expression-parse": "^3.0.0"
- },
- "dependencies": {
- "semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "dev": true
- }
+ "semver": "^7.3.2",
+ "spdx-expression-parse": "^3.0.1"
}
},
"eslint-plugin-prettier": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz",
- "integrity": "sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==",
+ "version": "3.1.4",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.4.tgz",
+ "integrity": "sha512-jZDa8z76klRqo+TdGDTFJSavwbnWK2ZpqGKNZ+VvweMW516pDUMmQ2koXvxEE4JhzNvTv+radye/bWGBmA6jmg==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0"
}
},
"eslint-scope": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
- "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==",
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz",
+ "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
@@ -593,29 +560,29 @@
}
},
"eslint-utils": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.0.0.tgz",
- "integrity": "sha512-0HCPuJv+7Wv1bACm8y5/ECVfYdfsAm9xmVb7saeFlxjPYALefjhbYoCkBjPdPzGH8wWyTpAez82Fh3VKYEZ8OA==",
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+ "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
"dev": true,
"requires": {
"eslint-visitor-keys": "^1.1.0"
}
},
"eslint-visitor-keys": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz",
- "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==",
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+ "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
"dev": true
},
"espree": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.0.0.tgz",
- "integrity": "sha512-/r2XEx5Mw4pgKdyb7GNLQNsu++asx/dltf/CI8RFi9oGHxmQFgvLbc5Op4U6i8Oaj+kdslhJtVlEZeAqH5qOTw==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.2.0.tgz",
+ "integrity": "sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==",
"dev": true,
"requires": {
- "acorn": "^7.1.1",
+ "acorn": "^7.3.1",
"acorn-jsx": "^5.2.0",
- "eslint-visitor-keys": "^1.1.0"
+ "eslint-visitor-keys": "^1.3.0"
}
},
"esprima": {
@@ -662,21 +629,10 @@
"integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
"dev": true
},
- "external-editor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
- "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
- "dev": true,
- "requires": {
- "chardet": "^0.7.0",
- "iconv-lite": "^0.4.24",
- "tmp": "^0.0.33"
- }
- },
"fast-deep-equal": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
- "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
"fast-diff": {
@@ -697,15 +653,6 @@
"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
"dev": true
},
- "figures": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
- "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
- "dev": true,
- "requires": {
- "escape-string-regexp": "^1.0.5"
- }
- },
"file-entry-cache": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
@@ -725,12 +672,13 @@
}
},
"find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+ "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dev": true,
"requires": {
- "locate-path": "^3.0.0"
+ "locate-path": "^5.0.0",
+ "path-exists": "^4.0.0"
}
},
"flat": {
@@ -867,15 +815,6 @@
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
"dev": true
},
- "iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dev": true,
- "requires": {
- "safer-buffer": ">= 2.1.2 < 3"
- }
- },
"ignore": {
"version": "4.0.6",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
@@ -914,78 +853,11 @@
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
},
- "inquirer": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.1.0.tgz",
- "integrity": "sha512-5fJMWEmikSYu0nv/flMc475MhGbB7TSPd/2IpFV4I4rMklboCH2rQjYY5kKiYGHqUF9gvaambupcJFFG9dvReg==",
- "dev": true,
- "requires": {
- "ansi-escapes": "^4.2.1",
- "chalk": "^3.0.0",
- "cli-cursor": "^3.1.0",
- "cli-width": "^2.0.0",
- "external-editor": "^3.0.3",
- "figures": "^3.0.0",
- "lodash": "^4.17.15",
- "mute-stream": "0.0.8",
- "run-async": "^2.4.0",
- "rxjs": "^6.5.3",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0",
- "through": "^2.3.6"
- },
- "dependencies": {
- "ansi-styles": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
- "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
- "dev": true,
- "requires": {
- "@types/color-name": "^1.1.1",
- "color-convert": "^2.0.1"
- }
- },
- "chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dev": true,
- "requires": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- }
- },
- "color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dev": true,
- "requires": {
- "color-name": "~1.1.4"
- }
- },
- "color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
- "dev": true
- },
- "has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "dev": true
- },
- "supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
- "dev": true,
- "requires": {
- "has-flag": "^4.0.0"
- }
- }
- }
+ "is-arguments": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz",
+ "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==",
+ "dev": true
},
"is-binary-path": {
"version": "2.1.0",
@@ -1003,9 +875,9 @@
"dev": true
},
"is-callable": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
- "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",
+ "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==",
"dev": true
},
"is-date-object": {
@@ -1021,9 +893,9 @@
"dev": true
},
"is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
},
"is-glob": {
@@ -1035,6 +907,12 @@
"is-extglob": "^2.1.1"
}
},
+ "is-map": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz",
+ "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==",
+ "dev": true
+ },
"is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
@@ -1042,14 +920,26 @@
"dev": true
},
"is-regex": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
- "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
+ "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==",
"dev": true,
"requires": {
- "has": "^1.0.3"
+ "has-symbols": "^1.0.1"
}
},
+ "is-set": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz",
+ "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==",
+ "dev": true
+ },
+ "is-string": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+ "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+ "dev": true
+ },
"is-symbol": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
@@ -1059,12 +949,34 @@
"has-symbols": "^1.0.1"
}
},
+ "isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true
+ },
"isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
+ "iterate-iterator": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz",
+ "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==",
+ "dev": true
+ },
+ "iterate-value": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz",
+ "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==",
+ "dev": true,
+ "requires": {
+ "es-get-iterator": "^1.0.2",
+ "iterate-iterator": "^1.0.1"
+ }
+ },
"js-tokens": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
@@ -1072,9 +984,9 @@
"dev": true
},
"js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "version": "3.14.0",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
+ "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
@@ -1082,9 +994,9 @@
}
},
"jsdoctypeparser": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-6.1.0.tgz",
- "integrity": "sha512-UCQBZ3xCUBv/PLfwKAJhp6jmGOSLFNKzrotXGNgbKhWvz27wPsCsVeP7gIcHPElQw2agBmynAitXqhxR58XAmA==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-8.0.0.tgz",
+ "integrity": "sha512-eLCs6s4JqN8TjFJfgdiLHRvogLhOAJz+5RIA2FtoMe6ZDyuvghvppnlIToqAEnVbxRqLMrfnNXpW8FpmR6IMBw==",
"dev": true
},
"json-schema-traverse": {
@@ -1110,19 +1022,18 @@
}
},
"locate-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+ "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dev": true,
"requires": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
+ "p-locate": "^4.1.0"
}
},
"lodash": {
- "version": "4.17.15",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
- "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "version": "4.17.19",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
+ "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
"dev": true
},
"log-symbols": {
@@ -1147,12 +1058,6 @@
}
}
},
- "mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "dev": true
- },
"minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -1178,32 +1083,33 @@
}
},
"mocha": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.1.2.tgz",
- "integrity": "sha512-o96kdRKMKI3E8U0bjnfqW4QMk12MwZ4mhdBTf+B5a1q9+aq2HRnj+3ZdJu0B/ZhJeK78MgYuv6L8d/rA5AeBJA==",
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz",
+ "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==",
"dev": true,
"requires": {
- "ansi-colors": "3.2.3",
+ "ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
- "chokidar": "3.3.0",
+ "chokidar": "3.3.1",
"debug": "3.2.6",
- "diff": "3.5.0",
+ "diff": "4.0.2",
"escape-string-regexp": "1.0.5",
- "find-up": "3.0.0",
- "glob": "7.1.3",
+ "find-up": "4.1.0",
+ "glob": "7.1.6",
"growl": "1.10.5",
"he": "1.2.0",
"js-yaml": "3.13.1",
"log-symbols": "3.0.0",
"minimatch": "3.0.4",
- "mkdirp": "0.5.5",
- "ms": "2.1.1",
- "node-environment-flags": "1.0.6",
+ "ms": "2.1.2",
"object.assign": "4.1.0",
- "strip-json-comments": "2.0.1",
- "supports-color": "6.0.0",
- "which": "1.3.1",
+ "promise.allsettled": "1.0.2",
+ "serialize-javascript": "3.0.0",
+ "strip-json-comments": "3.0.1",
+ "supports-color": "7.1.0",
+ "which": "2.0.2",
"wide-align": "1.1.3",
+ "workerpool": "6.0.0",
"yargs": "13.3.2",
"yargs-parser": "13.1.2",
"yargs-unparser": "1.6.0"
@@ -1218,48 +1124,35 @@
"ms": "^2.1.1"
}
},
- "glob": {
- "version": "7.1.3",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
- "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
}
},
- "ms": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
- "dev": true
- },
"strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
+ "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
"dev": true
},
"supports-color": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
- "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- },
- "which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
"dev": true,
"requires": {
- "isexe": "^2.0.0"
+ "has-flag": "^4.0.0"
}
}
}
@@ -1270,36 +1163,12 @@
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
- "mute-stream": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
- "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
- "dev": true
- },
"natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
"dev": true
},
- "node-environment-flags": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
- "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
- "dev": true,
- "requires": {
- "object.getownpropertydescriptors": "^2.0.3",
- "semver": "^5.7.0"
- },
- "dependencies": {
- "semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
- }
- }
- },
"normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -1307,9 +1176,9 @@
"dev": true
},
"object-inspect": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
- "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
+ "version": "1.8.0",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz",
+ "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==",
"dev": true
},
"object-keys": {
@@ -1330,16 +1199,6 @@
"object-keys": "^1.0.11"
}
},
- "object.getownpropertydescriptors": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz",
- "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.0-next.1"
- }
- },
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -1349,15 +1208,6 @@
"wrappy": "1"
}
},
- "onetime": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
- "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
- "dev": true,
- "requires": {
- "mimic-fn": "^2.1.0"
- }
- },
"optionator": {
"version": "0.9.1",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
@@ -1372,12 +1222,6 @@
"word-wrap": "^1.2.3"
}
},
- "os-tmpdir": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
- "dev": true
- },
"p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
@@ -1388,12 +1232,12 @@
}
},
"p-locate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+ "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dev": true,
"requires": {
- "p-limit": "^2.0.0"
+ "p-limit": "^2.2.0"
}
},
"p-try": {
@@ -1412,9 +1256,9 @@
}
},
"path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+ "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"dev": true
},
"path-is-absolute": {
@@ -1468,6 +1312,19 @@
"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
"dev": true
},
+ "promise.allsettled": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz",
+ "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==",
+ "dev": true,
+ "requires": {
+ "array.prototype.map": "^1.0.1",
+ "define-properties": "^1.1.3",
+ "es-abstract": "^1.17.0-next.1",
+ "function-bind": "^1.1.1",
+ "iterate-value": "^1.0.0"
+ }
+ },
"punycode": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
@@ -1475,12 +1332,12 @@
"dev": true
},
"readdirp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
- "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
+ "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
"dev": true,
"requires": {
- "picomatch": "^2.0.4"
+ "picomatch": "^2.0.7"
}
},
"regexpp": {
@@ -1513,16 +1370,6 @@
"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
"dev": true
},
- "restore-cursor": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
- "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
- "dev": true,
- "requires": {
- "onetime": "^5.1.0",
- "signal-exit": "^3.0.2"
- }
- },
"rimraf": {
"version": "2.6.3",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
@@ -1532,33 +1379,18 @@
"glob": "^7.1.3"
}
},
- "run-async": {
- "version": "2.4.1",
- "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz",
- "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==",
- "dev": true
- },
- "rxjs": {
- "version": "6.5.5",
- "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz",
- "integrity": "sha512-WfQI+1gohdf0Dai/Bbmk5L5ItH5tYqm3ki2c5GdWhKjalzjg93N3avFjVStyZZz+A2Em+ZxKH5bNghw9UeylGQ==",
- "dev": true,
- "requires": {
- "tslib": "^1.9.0"
- }
- },
- "safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
- "dev": true
- },
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
"integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==",
"dev": true
},
+ "serialize-javascript": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz",
+ "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==",
+ "dev": true
+ },
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
@@ -1580,12 +1412,6 @@
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"dev": true
},
- "signal-exit": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
- "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
- "dev": true
- },
"slice-ansi": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
@@ -1595,14 +1421,6 @@
"ansi-styles": "^3.2.0",
"astral-regex": "^1.0.0",
"is-fullwidth-code-point": "^2.0.0"
- },
- "dependencies": {
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- }
}
},
"spdx-exceptions": {
@@ -1634,14 +1452,31 @@
"dev": true
},
"string-width": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
- "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"dev": true,
"requires": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.0"
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ }
+ }
}
},
"string.prototype.trimend": {
@@ -1654,28 +1489,6 @@
"es-abstract": "^1.17.5"
}
},
- "string.prototype.trimleft": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz",
- "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5",
- "string.prototype.trimstart": "^1.0.0"
- }
- },
- "string.prototype.trimright": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz",
- "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==",
- "dev": true,
- "requires": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.5",
- "string.prototype.trimend": "^1.0.0"
- }
- },
"string.prototype.trimstart": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
@@ -1696,9 +1509,9 @@
}
},
"strip-json-comments": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
- "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
"dev": true
},
"supports-color": {
@@ -1720,46 +1533,6 @@
"lodash": "^4.17.14",
"slice-ansi": "^2.1.0",
"string-width": "^3.0.0"
- },
- "dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
- "dev": true,
- "requires": {
- "ansi-regex": "^4.1.0"
- }
- }
}
},
"text-table": {
@@ -1768,21 +1541,6 @@
"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
"dev": true
},
- "through": {
- "version": "2.3.8",
- "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
- "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
- "dev": true
- },
- "tmp": {
- "version": "0.0.33",
- "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
- "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
- "dev": true,
- "requires": {
- "os-tmpdir": "~1.0.2"
- }
- },
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -1792,12 +1550,6 @@
"is-number": "^7.0.0"
}
},
- "tslib": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
- "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==",
- "dev": true
- },
"type-check": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
@@ -1820,13 +1572,10 @@
"dev": true
},
"uglify-js": {
- "version": "3.9.3",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.9.3.tgz",
- "integrity": "sha512-r5ImcL6QyzQGVimQoov3aL2ZScywrOgBXGndbWrdehKoSvGe/RmiE5Jpw/v+GvxODt6l2tpBXwA7n+qZVlHBMA==",
- "dev": true,
- "requires": {
- "commander": "~2.20.3"
- }
+ "version": "3.10.0",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
+ "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
+ "dev": true
},
"uri-js": {
"version": "4.2.2",
@@ -1838,9 +1587,9 @@
}
},
"v8-compile-cache": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
- "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz",
+ "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==",
"dev": true
},
"which": {
@@ -1873,12 +1622,6 @@
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
},
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- },
"string-width": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
@@ -1906,6 +1649,12 @@
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
"dev": true
},
+ "workerpool": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz",
+ "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==",
+ "dev": true
+ },
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
@@ -1923,29 +1672,6 @@
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
"dev": true
},
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
- },
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
- "dev": true,
- "requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
- }
- },
"strip-ansi": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
@@ -1996,43 +1722,39 @@
"yargs-parser": "^13.1.2"
},
"dependencies": {
- "ansi-regex": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
- "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
- "dev": true
- },
- "emoji-regex": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
- "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
- "dev": true
- },
- "is-fullwidth-code-point": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
- "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
- "dev": true
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
},
- "string-width": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
- "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
"dev": true,
"requires": {
- "emoji-regex": "^7.0.1",
- "is-fullwidth-code-point": "^2.0.0",
- "strip-ansi": "^5.1.0"
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
}
},
- "strip-ansi": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
- "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
"dev": true,
"requires": {
- "ansi-regex": "^4.1.0"
+ "p-limit": "^2.0.0"
}
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
}
}
},
diff --git a/package.json b/package.json
index 266081c..f961036 100644
--- a/package.json
+++ b/package.json
@@ -23,9 +23,9 @@
"eslint": "7",
"eslint-config-blueimp": "2",
"eslint-config-prettier": "6",
- "eslint-plugin-jsdoc": "25",
+ "eslint-plugin-jsdoc": "30",
"eslint-plugin-prettier": "3",
- "mocha": "7",
+ "mocha": "8",
"prettier": "2",
"uglify-js": "3"
},
diff --git a/test/vendor/mocha.js b/test/vendor/mocha.js
index 5be2b9e..159b647 100644
--- a/test/vendor/mocha.js
+++ b/test/vendor/mocha.js
@@ -54,6 +54,17 @@ process.removeListener = function(e, fn) {
}
};
+/**
+ * Implements listenerCount for 'uncaughtException'.
+ */
+
+process.listenerCount = function(name) {
+ if (name === 'uncaughtException') {
+ return uncaughtExceptionHandlers.length;
+ }
+ return 0;
+};
+
/**
* Implements uncaughtException listener.
*/
@@ -193,8 +204,8 @@ global.mocha = mocha;
module.exports = global;
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./lib/mocha":14,"_process":69,"browser-stdout":41}],2:[function(require,module,exports){
-(function (process,global){
+},{"./lib/mocha":14,"_process":67,"browser-stdout":41}],2:[function(require,module,exports){
+(function (global){
'use strict';
/**
@@ -208,6 +219,7 @@ module.exports = global;
var Date = global.Date;
var setTimeout = global.setTimeout;
var EVENT_RUN_END = require('../runner').constants.EVENT_RUN_END;
+var isBrowser = require('../utils').isBrowser;
/**
* Checks if browser notification support exists.
@@ -222,7 +234,7 @@ var EVENT_RUN_END = require('../runner').constants.EVENT_RUN_END;
exports.isCapable = function() {
var hasNotificationSupport = 'Notification' in window;
var hasPromiseSupport = typeof Promise === 'function';
- return process.browser && hasNotificationSupport && hasPromiseSupport;
+ return isBrowser() && hasNotificationSupport && hasPromiseSupport;
};
/**
@@ -364,8 +376,8 @@ function notPermitted(err) {
console.error('notification error:', err.message);
}
-}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../../package":90,"../runner":34,"_process":69}],3:[function(require,module,exports){
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"../../package":90,"../runner":34,"../utils":38}],3:[function(require,module,exports){
'use strict';
/**
@@ -551,21 +563,6 @@ Context.prototype.timeout = function(ms) {
return this;
};
-/**
- * Set test timeout `enabled`.
- *
- * @private
- * @param {boolean} enabled
- * @return {Context} self
- */
-Context.prototype.enableTimeouts = function(enabled) {
- if (!arguments.length) {
- return this.runnable().enableTimeouts();
- }
- this.runnable().enableTimeouts(enabled);
- return this;
-};
-
/**
* Set or get test slowness threshold `ms`.
*
@@ -608,12 +605,80 @@ Context.prototype.retries = function(n) {
},{}],6:[function(require,module,exports){
'use strict';
+
+var format = require('util').format;
+
/**
+ * Factory functions to create throwable error objects
* @module Errors
*/
+
/**
- * Factory functions to create throwable error objects
+ * When Mocha throw exceptions (or otherwise errors), it attempts to assign a
+ * `code` property to the `Error` object, for easier handling. These are the
+ * potential values of `code`.
*/
+var constants = {
+ /**
+ * An unrecoverable error.
+ */
+ FATAL: 'ERR_MOCHA_FATAL',
+
+ /**
+ * The type of an argument to a function call is invalid
+ */
+ INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',
+
+ /**
+ * The value of an argument to a function call is invalid
+ */
+ INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',
+
+ /**
+ * Something was thrown, but it wasn't an `Error`
+ */
+ INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',
+
+ /**
+ * An interface (e.g., `Mocha.interfaces`) is unknown or invalid
+ */
+ INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',
+
+ /**
+ * A reporter (.e.g, `Mocha.reporters`) is unknown or invalid
+ */
+ INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',
+
+ /**
+ * `done()` was called twice in a `Test` or `Hook` callback
+ */
+ MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',
+
+ /**
+ * No files matched the pattern provided by the user
+ */
+ NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',
+
+ /**
+ * Known, but unsupported behavior of some kind
+ */
+ UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',
+
+ /**
+ * Invalid state transition occuring in `Mocha` instance
+ */
+ INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',
+
+ /**
+ * Invalid state transition occuring in `Mocha` instance
+ */
+ INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',
+
+ /**
+ * Use of `only()` w/ `--forbid-only` results in this error.
+ */
+ FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY'
+};
/**
* Creates an error object to be thrown when no files to be tested could be found using specified pattern.
@@ -625,7 +690,7 @@ Context.prototype.retries = function(n) {
*/
function createNoFilesMatchPatternError(message, pattern) {
var err = new Error(message);
- err.code = 'ERR_MOCHA_NO_FILES_MATCH_PATTERN';
+ err.code = constants.NO_FILES_MATCH_PATTERN;
err.pattern = pattern;
return err;
}
@@ -640,7 +705,7 @@ function createNoFilesMatchPatternError(message, pattern) {
*/
function createInvalidReporterError(message, reporter) {
var err = new TypeError(message);
- err.code = 'ERR_MOCHA_INVALID_REPORTER';
+ err.code = constants.INVALID_REPORTER;
err.reporter = reporter;
return err;
}
@@ -655,7 +720,7 @@ function createInvalidReporterError(message, reporter) {
*/
function createInvalidInterfaceError(message, ui) {
var err = new Error(message);
- err.code = 'ERR_MOCHA_INVALID_INTERFACE';
+ err.code = constants.INVALID_INTERFACE;
err.interface = ui;
return err;
}
@@ -669,7 +734,7 @@ function createInvalidInterfaceError(message, ui) {
*/
function createUnsupportedError(message) {
var err = new Error(message);
- err.code = 'ERR_MOCHA_UNSUPPORTED';
+ err.code = constants.UNSUPPORTED;
return err;
}
@@ -697,7 +762,7 @@ function createMissingArgumentError(message, argument, expected) {
*/
function createInvalidArgumentTypeError(message, argument, expected) {
var err = new TypeError(message);
- err.code = 'ERR_MOCHA_INVALID_ARG_TYPE';
+ err.code = constants.INVALID_ARG_TYPE;
err.argument = argument;
err.expected = expected;
err.actual = typeof argument;
@@ -716,7 +781,7 @@ function createInvalidArgumentTypeError(message, argument, expected) {
*/
function createInvalidArgumentValueError(message, argument, value, reason) {
var err = new TypeError(message);
- err.code = 'ERR_MOCHA_INVALID_ARG_VALUE';
+ err.code = constants.INVALID_ARG_VALUE;
err.argument = argument;
err.value = value;
err.reason = typeof reason !== 'undefined' ? reason : 'is invalid';
@@ -732,12 +797,130 @@ function createInvalidArgumentValueError(message, argument, value, reason) {
*/
function createInvalidExceptionError(message, value) {
var err = new Error(message);
- err.code = 'ERR_MOCHA_INVALID_EXCEPTION';
+ err.code = constants.INVALID_EXCEPTION;
+ err.valueType = typeof value;
+ err.value = value;
+ return err;
+}
+
+/**
+ * Creates an error object to be thrown when an unrecoverable error occurs.
+ *
+ * @public
+ * @param {string} message - Error message to be displayed.
+ * @returns {Error} instance detailing the error condition
+ */
+function createFatalError(message, value) {
+ var err = new Error(message);
+ err.code = constants.FATAL;
err.valueType = typeof value;
err.value = value;
return err;
}
+/**
+ * Dynamically creates a plugin-type-specific error based on plugin type
+ * @param {string} message - Error message
+ * @param {"reporter"|"interface"} pluginType - Plugin type. Future: expand as needed
+ * @param {string} [pluginId] - Name/path of plugin, if any
+ * @throws When `pluginType` is not known
+ * @public
+ * @returns {Error}
+ */
+function createInvalidPluginError(message, pluginType, pluginId) {
+ switch (pluginType) {
+ case 'reporter':
+ return createInvalidReporterError(message, pluginId);
+ case 'interface':
+ return createInvalidInterfaceError(message, pluginId);
+ default:
+ throw new Error('unknown pluginType "' + pluginType + '"');
+ }
+}
+
+/**
+ * Creates an error object to be thrown when a mocha object's `run` method is executed while it is already disposed.
+ * @param {string} message The error message to be displayed.
+ * @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`
+ * @param {Mocha} instance the mocha instance that throw this error
+ */
+function createMochaInstanceAlreadyDisposedError(
+ message,
+ cleanReferencesAfterRun,
+ instance
+) {
+ var err = new Error(message);
+ err.code = constants.INSTANCE_ALREADY_DISPOSED;
+ err.cleanReferencesAfterRun = cleanReferencesAfterRun;
+ err.instance = instance;
+ return err;
+}
+
+/**
+ * Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.
+ * @param {string} message The error message to be displayed.
+ */
+function createMochaInstanceAlreadyRunningError(message, instance) {
+ var err = new Error(message);
+ err.code = constants.INSTANCE_ALREADY_RUNNING;
+ err.instance = instance;
+ return err;
+}
+
+/*
+ * Creates an error object to be thrown when done() is called multiple times in a test
+ *
+ * @public
+ * @param {Runnable} runnable - Original runnable
+ * @param {Error} [originalErr] - Original error, if any
+ * @returns {Error} instance detailing the error condition
+ */
+function createMultipleDoneError(runnable, originalErr) {
+ var title;
+ try {
+ title = format('<%s>', runnable.fullTitle());
+ if (runnable.parent.root) {
+ title += ' (of root suite)';
+ }
+ } catch (ignored) {
+ title = format('<%s> (of unknown suite)', runnable.title);
+ }
+ var message = format(
+ 'done() called multiple times in %s %s',
+ runnable.type ? runnable.type : 'unknown runnable',
+ title
+ );
+ if (runnable.file) {
+ message += format(' of file %s', runnable.file);
+ }
+ if (originalErr) {
+ message += format('; in addition, done() received error: %s', originalErr);
+ }
+
+ var err = new Error(message);
+ err.code = constants.MULTIPLE_DONE;
+ err.valueType = typeof originalErr;
+ err.value = originalErr;
+ return err;
+}
+
+/**
+ * Creates an error object to be thrown when `.only()` is used with
+ * `--forbid-only`.
+ * @public
+ * @param {Mocha} mocha - Mocha instance
+ * @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}
+ */
+function createForbiddenExclusivityError(mocha) {
+ var err = new Error(
+ mocha.isWorker
+ ? '`.only` is not supported in parallel mode'
+ : '`.only` forbidden by --forbid-only'
+ );
+ err.code = constants.FORBIDDEN_EXCLUSIVITY;
+ return err;
+}
+
module.exports = {
createInvalidArgumentTypeError: createInvalidArgumentTypeError,
createInvalidArgumentValueError: createInvalidArgumentValueError,
@@ -746,10 +929,17 @@ module.exports = {
createInvalidReporterError: createInvalidReporterError,
createMissingArgumentError: createMissingArgumentError,
createNoFilesMatchPatternError: createNoFilesMatchPatternError,
- createUnsupportedError: createUnsupportedError
+ createUnsupportedError: createUnsupportedError,
+ createInvalidPluginError: createInvalidPluginError,
+ createMochaInstanceAlreadyDisposedError: createMochaInstanceAlreadyDisposedError,
+ createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError,
+ createFatalError: createFatalError,
+ createMultipleDoneError: createMultipleDoneError,
+ createForbiddenExclusivityError: createForbiddenExclusivityError,
+ constants: constants
};
-},{}],7:[function(require,module,exports){
+},{"util":89}],7:[function(require,module,exports){
'use strict';
var Runnable = require('./runnable');
@@ -779,6 +969,14 @@ function Hook(title, fn) {
*/
inherits(Hook, Runnable);
+/**
+ * Resets the state for a next run.
+ */
+Hook.prototype.reset = function() {
+ Runnable.prototype.reset.call(this);
+ delete this._error;
+};
+
/**
* Get or set the test `err`.
*
@@ -797,6 +995,30 @@ Hook.prototype.error = function(err) {
this._error = err;
};
+/**
+ * Returns an object suitable for IPC.
+ * Functions are represented by keys beginning with `$$`.
+ * @private
+ * @returns {Object}
+ */
+Hook.prototype.serialize = function serialize() {
+ return {
+ $$isPending: this.isPending(),
+ $$titlePath: this.titlePath(),
+ ctx: {
+ currentTest: {
+ title: this.ctx && this.ctx.currentTest && this.ctx.currentTest.title
+ }
+ },
+ parent: {
+ root: this.parent.root,
+ title: this.parent.title
+ },
+ title: this.title,
+ type: this.type
+ };
+};
+
},{"./runnable":33,"./utils":38}],8:[function(require,module,exports){
'use strict';
@@ -923,6 +1145,8 @@ module.exports.description = 'BDD or RSpec style [default]';
var Suite = require('../suite');
var errors = require('../errors');
var createMissingArgumentError = errors.createMissingArgumentError;
+var createUnsupportedError = errors.createUnsupportedError;
+var createForbiddenExclusivityError = errors.createForbiddenExclusivityError;
/**
* Functions common to more than one interface.
@@ -1012,6 +1236,9 @@ module.exports = function(suites, context, mocha) {
* @returns {Suite}
*/
only: function only(opts) {
+ if (mocha.options.forbidOnly) {
+ throw createForbiddenExclusivityError(mocha);
+ }
opts.isOnly = true;
return this.create(opts);
},
@@ -1045,16 +1272,14 @@ module.exports = function(suites, context, mocha) {
suite.file = opts.file;
suites.unshift(suite);
if (opts.isOnly) {
- if (mocha.options.forbidOnly && shouldBeTested(suite)) {
- throw new Error('`.only` forbidden');
- }
-
- suite.parent.appendOnlySuite(suite);
+ suite.markOnly();
}
- if (suite.pending) {
- if (mocha.options.forbidPending && shouldBeTested(suite)) {
- throw new Error('Pending test forbidden');
- }
+ if (
+ suite.pending &&
+ mocha.options.forbidPending &&
+ shouldBeTested(suite)
+ ) {
+ throw createUnsupportedError('Pending test forbidden');
}
if (typeof opts.fn === 'function') {
opts.fn.call(suite);
@@ -1085,7 +1310,10 @@ module.exports = function(suites, context, mocha) {
* @returns {*}
*/
only: function(mocha, test) {
- test.parent.appendOnlyTest(test);
+ if (mocha.options.forbidOnly) {
+ throw createForbiddenExclusivityError(mocha);
+ }
+ test.markOnly();
return test;
},
@@ -1391,7 +1619,7 @@ module.exports.description =
'traditional "suite"/"test" instead of BDD\'s "describe"/"it"';
},{"../suite":36,"../test":37,"./common":9}],14:[function(require,module,exports){
-(function (process,global){
+(function (global){
'use strict';
/*!
@@ -1403,28 +1631,59 @@ module.exports.description =
var escapeRe = require('escape-string-regexp');
var path = require('path');
var builtinReporters = require('./reporters');
-var growl = require('./growl');
+var growl = require('./nodejs/growl');
var utils = require('./utils');
var mocharc = require('./mocharc.json');
var errors = require('./errors');
var Suite = require('./suite');
-var esmUtils = utils.supportsEsModules() ? require('./esm-utils') : undefined;
+var esmUtils = utils.supportsEsModules(true)
+ ? require('./esm-utils')
+ : undefined;
var createStatsCollector = require('./stats-collector');
var createInvalidReporterError = errors.createInvalidReporterError;
var createInvalidInterfaceError = errors.createInvalidInterfaceError;
+var createMochaInstanceAlreadyDisposedError =
+ errors.createMochaInstanceAlreadyDisposedError;
+var createMochaInstanceAlreadyRunningError =
+ errors.createMochaInstanceAlreadyRunningError;
var EVENT_FILE_PRE_REQUIRE = Suite.constants.EVENT_FILE_PRE_REQUIRE;
var EVENT_FILE_POST_REQUIRE = Suite.constants.EVENT_FILE_POST_REQUIRE;
var EVENT_FILE_REQUIRE = Suite.constants.EVENT_FILE_REQUIRE;
var sQuote = utils.sQuote;
+var debug = require('debug')('mocha:mocha');
exports = module.exports = Mocha;
+/**
+ * A Mocha instance is a finite state machine.
+ * These are the states it can be in.
+ */
+var mochaStates = utils.defineConstants({
+ /**
+ * Initial state of the mocha instance
+ */
+ INIT: 'init',
+ /**
+ * Mocha instance is running tests
+ */
+ RUNNING: 'running',
+ /**
+ * Mocha instance is done running tests and references to test functions and hooks are cleaned.
+ * You can reset this state by unloading the test files.
+ */
+ REFERENCES_CLEANED: 'referencesCleaned',
+ /**
+ * Mocha instance is disposed and can no longer be used.
+ */
+ DISPOSED: 'disposed'
+});
+
/**
* To require local UIs and reporters when running in node.
*/
-if (!process.browser) {
- var cwd = process.cwd();
+if (!utils.isBrowser() && typeof module.paths !== 'undefined') {
+ var cwd = utils.cwd();
module.paths.push(cwd, path.join(cwd, 'node_modules'));
}
@@ -1432,11 +1691,6 @@ if (!process.browser) {
* Expose internals.
*/
-/**
- * @public
- * @class utils
- * @memberof Mocha
- */
exports.utils = utils;
exports.interfaces = require('./interfaces');
/**
@@ -1484,6 +1738,11 @@ exports.Test = require('./test');
* @param {number} [options.slow] - Slow threshold value.
* @param {number|string} [options.timeout] - Timeout threshold value.
* @param {string} [options.ui] - Interface name.
+ * @param {boolean} [options.parallel] - Run jobs in parallel
+ * @param {number} [options.jobs] - Max number of worker processes for parallel runs
+ * @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root
+ * suite with
+ * @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process.
*/
function Mocha(options) {
options = utils.assign({}, mocharc, options || {});
@@ -1491,6 +1750,8 @@ function Mocha(options) {
this.options = options;
// root suite
this.suite = new exports.Suite('', new exports.Context(), true);
+ this._cleanReferencesAfterRun = true;
+ this._state = mochaStates.INIT;
this.grep(options.grep)
.fgrep(options.fgrep)
@@ -1530,6 +1791,43 @@ function Mocha(options) {
this[opt]();
}
}, this);
+
+ if (options.rootHooks) {
+ this.rootHooks(options.rootHooks);
+ }
+
+ /**
+ * The class which we'll instantiate in {@link Mocha#run}. Defaults to
+ * {@link Runner} in serial mode; changes in parallel mode.
+ * @memberof Mocha
+ * @private
+ */
+ this._runnerClass = exports.Runner;
+
+ /**
+ * Whether or not to call {@link Mocha#loadFiles} implicitly when calling
+ * {@link Mocha#run}. If this is `true`, then it's up to the consumer to call
+ * {@link Mocha#loadFiles} _or_ {@link Mocha#loadFilesAsync}.
+ * @private
+ * @memberof Mocha
+ */
+ this._lazyLoadFiles = false;
+
+ /**
+ * It's useful for a Mocha instance to know if it's running in a worker process.
+ * We could derive this via other means, but it's helpful to have a flag to refer to.
+ * @memberof Mocha
+ * @private
+ */
+ this.isWorker = Boolean(options.isWorker);
+
+ if (
+ options.parallel &&
+ (typeof options.jobs === 'undefined' || options.jobs > 1)
+ ) {
+ debug('attempting to enable parallel mode');
+ this.parallelMode(true);
+ }
}
/**
@@ -1580,52 +1878,52 @@ Mocha.prototype.addFile = function(file) {
* // Use XUnit reporter and direct its output to file
* mocha.reporter('xunit', { output: '/path/to/testspec.xunit.xml' });
*/
-Mocha.prototype.reporter = function(reporter, reporterOptions) {
- if (typeof reporter === 'function') {
- this._reporter = reporter;
+Mocha.prototype.reporter = function(reporterName, reporterOptions) {
+ if (typeof reporterName === 'function') {
+ this._reporter = reporterName;
} else {
- reporter = reporter || 'spec';
- var _reporter;
+ reporterName = reporterName || 'spec';
+ var reporter;
// Try to load a built-in reporter.
- if (builtinReporters[reporter]) {
- _reporter = builtinReporters[reporter];
+ if (builtinReporters[reporterName]) {
+ reporter = builtinReporters[reporterName];
}
// Try to load reporters from process.cwd() and node_modules
- if (!_reporter) {
+ if (!reporter) {
try {
- _reporter = require(reporter);
+ reporter = require(reporterName);
} catch (err) {
if (
- err.code !== 'MODULE_NOT_FOUND' ||
- err.message.indexOf('Cannot find module') !== -1
+ err.code === 'MODULE_NOT_FOUND' ||
+ err.message.indexOf('Cannot find module') >= 0
) {
// Try to load reporters from a path (absolute or relative)
try {
- _reporter = require(path.resolve(process.cwd(), reporter));
+ reporter = require(path.resolve(utils.cwd(), reporterName));
} catch (_err) {
- _err.code !== 'MODULE_NOT_FOUND' ||
- _err.message.indexOf('Cannot find module') !== -1
- ? console.warn(sQuote(reporter) + ' reporter not found')
- : console.warn(
- sQuote(reporter) +
+ _err.code === 'MODULE_NOT_FOUND' ||
+ _err.message.indexOf('Cannot find module') >= 0
+ ? utils.warn(sQuote(reporterName) + ' reporter not found')
+ : utils.warn(
+ sQuote(reporterName) +
' reporter blew up with error:\n' +
err.stack
);
}
} else {
- console.warn(
- sQuote(reporter) + ' reporter blew up with error:\n' + err.stack
+ utils.warn(
+ sQuote(reporterName) + ' reporter blew up with error:\n' + err.stack
);
}
}
}
- if (!_reporter) {
+ if (!reporter) {
throw createInvalidReporterError(
- 'invalid reporter ' + sQuote(reporter),
- reporter
+ 'invalid reporter ' + sQuote(reporterName),
+ reporterName
);
}
- this._reporter = _reporter;
+ this._reporter = reporter;
}
this.options.reporterOption = reporterOptions;
// alias option name is used in public reporters xunit/tap/progress
@@ -1734,7 +2032,7 @@ Mocha.prototype.loadFiles = function(fn) {
Mocha.prototype.loadFilesAsync = function() {
var self = this;
var suite = this.suite;
- this.loadAsync = true;
+ this.lazyLoadFiles(true);
if (!esmUtils) {
return new Promise(function(resolve) {
@@ -1782,7 +2080,18 @@ Mocha.unloadFile = function(file) {
* @chainable
*/
Mocha.prototype.unloadFiles = function() {
- this.files.forEach(Mocha.unloadFile);
+ if (this._state === mochaStates.DISPOSED) {
+ throw createMochaInstanceAlreadyDisposedError(
+ 'Mocha instance is already disposed, it cannot be used again.',
+ this._cleanReferencesAfterRun,
+ this
+ );
+ }
+
+ this.files.forEach(function(file) {
+ Mocha.unloadFile(file);
+ });
+ this._state = mochaStates.INIT;
return this;
};
@@ -1869,37 +2178,51 @@ Mocha.prototype.invert = function() {
};
/**
- * Enables or disables ignoring global leaks.
+ * Enables or disables checking for global variables leaked while running tests.
*
- * @deprecated since v7.0.0
* @public
- * @see {@link Mocha#checkLeaks}
- * @param {boolean} [ignoreLeaks=false] - Whether to ignore global leaks.
+ * @see [CLI option](../#-check-leaks)
+ * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.ignoreLeaks = function(ignoreLeaks) {
- utils.deprecate(
- '"ignoreLeaks()" is DEPRECATED, please use "checkLeaks()" instead.'
- );
- this.options.checkLeaks = !ignoreLeaks;
+Mocha.prototype.checkLeaks = function(checkLeaks) {
+ this.options.checkLeaks = checkLeaks !== false;
return this;
};
/**
- * Enables or disables checking for global variables leaked while running tests.
- *
+ * Enables or disables whether or not to dispose after each test run.
+ * Disable this to ensure you can run the test suite multiple times.
+ * If disabled, be sure to dispose mocha when you're done to prevent memory leaks.
* @public
- * @see [CLI option](../#-check-leaks)
- * @param {boolean} [checkLeaks=true] - Whether to check for global variable leaks.
+ * @see {@link Mocha#dispose}
+ * @param {boolean} cleanReferencesAfterRun
* @return {Mocha} this
* @chainable
*/
-Mocha.prototype.checkLeaks = function(checkLeaks) {
- this.options.checkLeaks = checkLeaks !== false;
+Mocha.prototype.cleanReferencesAfterRun = function(cleanReferencesAfterRun) {
+ this._cleanReferencesAfterRun = cleanReferencesAfterRun !== false;
return this;
};
+/**
+ * Manually dispose this mocha instance. Mark this instance as `disposed` and unable to run more tests.
+ * It also removes function references to tests functions and hooks, so variables trapped in closures can be cleaned by the garbage collector.
+ * @public
+ */
+Mocha.prototype.dispose = function() {
+ if (this._state === mochaStates.RUNNING) {
+ throw createMochaInstanceAlreadyRunningError(
+ 'Cannot dispose while the mocha instance is still running tests.'
+ );
+ }
+ this.unloadFiles();
+ this._previousRunner && this._previousRunner.dispose();
+ this.suite.dispose();
+ this._state = mochaStates.DISPOSED;
+};
+
/**
* Displays full stack trace upon test failure.
*
@@ -1925,7 +2248,7 @@ Mocha.prototype.fullTrace = function(fullTrace) {
Mocha.prototype.growl = function() {
this.options.growl = this.isGrowlCapable();
if (!this.options.growl) {
- var detail = process.browser
+ var detail = utils.isBrowser()
? 'notification support not available in this browser...'
: 'notification support prerequisites not installed...';
console.error(detail + ' cannot enable!');
@@ -1983,24 +2306,6 @@ Mocha.prototype.global = function(global) {
// for backwards compability, 'globals' is an alias of 'global'
Mocha.prototype.globals = Mocha.prototype.global;
-/**
- * Enables or disables TTY color output by screen-oriented reporters.
- *
- * @deprecated since v7.0.0
- * @public
- * @see {@link Mocha#color}
- * @param {boolean} colors - Whether to enable color output.
- * @return {Mocha} this
- * @chainable
- */
-Mocha.prototype.useColors = function(colors) {
- utils.deprecate('"useColors()" is DEPRECATED, please use "color()" instead.');
- if (colors !== undefined) {
- this.options.color = colors;
- }
- return this;
-};
-
/**
* Enables or disables TTY color output by screen-oriented reporters.
*
@@ -2015,25 +2320,6 @@ Mocha.prototype.color = function(color) {
return this;
};
-/**
- * Determines if reporter should use inline diffs (rather than +/-)
- * in test failure output.
- *
- * @deprecated since v7.0.0
- * @public
- * @see {@link Mocha#inlineDiffs}
- * @param {boolean} [inlineDiffs=false] - Whether to use inline diffs.
- * @return {Mocha} this
- * @chainable
- */
-Mocha.prototype.useInlineDiffs = function(inlineDiffs) {
- utils.deprecate(
- '"useInlineDiffs()" is DEPRECATED, please use "inlineDiffs()" instead.'
- );
- this.options.inlineDiffs = inlineDiffs !== undefined && inlineDiffs;
- return this;
-};
-
/**
* Enables or disables reporter to use inline diffs (rather than +/-)
* in test failure output.
@@ -2049,22 +2335,6 @@ Mocha.prototype.inlineDiffs = function(inlineDiffs) {
return this;
};
-/**
- * Determines if reporter should include diffs in test failure output.
- *
- * @deprecated since v7.0.0
- * @public
- * @see {@link Mocha#diff}
- * @param {boolean} [hideDiff=false] - Whether to hide diffs.
- * @return {Mocha} this
- * @chainable
- */
-Mocha.prototype.hideDiff = function(hideDiff) {
- utils.deprecate('"hideDiff()" is DEPRECATED, please use "diff()" instead.');
- this.options.diff = !(hideDiff === true);
- return this;
-};
-
/**
* Enables or disables reporter to include diff in test failure output.
*
@@ -2090,7 +2360,6 @@ Mocha.prototype.diff = function(diff) {
* @public
* @see [CLI option](../#-timeout-ms-t-ms)
* @see [Timeouts](../#timeouts)
- * @see {@link Mocha#enableTimeouts}
* @param {number|string} msecs - Timeout threshold value.
* @return {Mocha} this
* @chainable
@@ -2149,22 +2418,6 @@ Mocha.prototype.slow = function(msecs) {
return this;
};
-/**
- * Enables or disables timeouts.
- *
- * @public
- * @see [CLI option](../#-timeout-ms-t-ms)
- * @param {boolean} enableTimeouts - Whether to enable timeouts.
- * @return {Mocha} this
- * @chainable
- */
-Mocha.prototype.enableTimeouts = function(enableTimeouts) {
- this.suite.enableTimeouts(
- arguments.length && enableTimeouts !== undefined ? enableTimeouts : true
- );
- return this;
-};
-
/**
* Forces all tests to either accept a `done` callback or return a promise.
*
@@ -2250,6 +2503,29 @@ Mocha.prototype.forbidPending = function(forbidPending) {
return this;
};
+/**
+ * Throws an error if mocha is in the wrong state to be able to transition to a "running" state.
+ * @private
+ */
+Mocha.prototype._guardRunningStateTransition = function() {
+ if (this._state === mochaStates.RUNNING) {
+ throw createMochaInstanceAlreadyRunningError(
+ 'Mocha instance is currently running tests, cannot start a next test run until this one is done',
+ this
+ );
+ }
+ if (
+ this._state === mochaStates.DISPOSED ||
+ this._state === mochaStates.REFERENCES_CLEANED
+ ) {
+ throw createMochaInstanceAlreadyDisposedError(
+ 'Mocha instance is already disposed, cannot start a new test run. Please create a new mocha instance. Be sure to set disable `cleanReferencesAfterRun` when you want to reuse the same mocha instance for multiple test runs.',
+ this._cleanReferencesAfterRun,
+ this
+ );
+ }
+};
+
/**
* Mocha version as specified by "package.json".
*
@@ -2290,13 +2566,23 @@ Object.defineProperty(Mocha.prototype, 'version', {
* mocha.run(failures => process.exitCode = failures ? 1 : 0);
*/
Mocha.prototype.run = function(fn) {
- if (this.files.length && !this.loadAsync) {
+ this._guardRunningStateTransition();
+ this._state = mochaStates.RUNNING;
+ if (this._previousRunner) {
+ this._previousRunner.dispose();
+ this.suite.reset();
+ }
+ if (this.files.length && !this._lazyLoadFiles) {
this.loadFiles();
}
+ var self = this;
var suite = this.suite;
var options = this.options;
options.files = this.files;
- var runner = new exports.Runner(suite, options.delay);
+ var runner = new this._runnerClass(suite, {
+ delay: options.delay,
+ cleanReferencesAfterRun: this._cleanReferencesAfterRun
+ });
createStatsCollector(runner);
var reporter = new this._reporter(runner, options);
runner.checkLeaks = options.checkLeaks === true;
@@ -2321,6 +2607,12 @@ Mocha.prototype.run = function(fn) {
exports.reporters.Base.hideDiff = !options.diff;
function done(failures) {
+ self._previousRunner = runner;
+ if (self._cleanReferencesAfterRun) {
+ self._state = mochaStates.REFERENCES_CLEANED;
+ } else {
+ self._state = mochaStates.INIT;
+ }
fn = fn || utils.noop;
if (reporter.done) {
reporter.done(failures, fn);
@@ -2329,15 +2621,116 @@ Mocha.prototype.run = function(fn) {
}
}
- return runner.run(done);
+ return runner.run(done, {files: this.files, options: options});
};
-}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../package.json":90,"./context":5,"./errors":6,"./esm-utils":42,"./growl":2,"./hook":7,"./interfaces":11,"./mocharc.json":15,"./reporters":21,"./runnable":33,"./runner":34,"./stats-collector":35,"./suite":36,"./test":37,"./utils":38,"_process":69,"escape-string-regexp":49,"path":42}],15:[function(require,module,exports){
+/**
+ * Assigns hooks to the root suite
+ * @param {MochaRootHookObject} [hooks] - Hooks to assign to root suite
+ * @chainable
+ */
+Mocha.prototype.rootHooks = function rootHooks(hooks) {
+ if (utils.type(hooks) === 'object') {
+ var beforeAll = [].concat(hooks.beforeAll || []);
+ var beforeEach = [].concat(hooks.beforeEach || []);
+ var afterAll = [].concat(hooks.afterAll || []);
+ var afterEach = [].concat(hooks.afterEach || []);
+ var rootSuite = this.suite;
+ beforeAll.forEach(function(hook) {
+ rootSuite.beforeAll(hook);
+ });
+ beforeEach.forEach(function(hook) {
+ rootSuite.beforeEach(hook);
+ });
+ afterAll.forEach(function(hook) {
+ rootSuite.afterAll(hook);
+ });
+ afterEach.forEach(function(hook) {
+ rootSuite.afterEach(hook);
+ });
+ }
+ return this;
+};
+
+/**
+ * Toggles parallel mode.
+ *
+ * Must be run before calling {@link Mocha#run}. Changes the `Runner` class to
+ * use; also enables lazy file loading if not already done so.
+ * @param {boolean} [enable] - If `true`, enable; otherwise disable.
+ * @throws If run in browser
+ * @throws If Mocha not in "INIT" state
+ * @returns {Mocha}
+ * @chainable
+ * @public
+ */
+Mocha.prototype.parallelMode = function parallelMode(enable) {
+ if (utils.isBrowser()) {
+ throw errors.createUnsupportedError(
+ 'parallel mode is only supported in Node.js'
+ );
+ }
+ var parallel = enable === true;
+ if (
+ parallel === this.options.parallel &&
+ this._lazyLoadFiles &&
+ this._runnerClass !== exports.Runner
+ ) {
+ return this;
+ }
+ if (this._state !== mochaStates.INIT) {
+ throw errors.createUnsupportedError(
+ 'cannot change parallel mode after having called run()'
+ );
+ }
+ this.options.parallel = parallel;
+
+ // swap Runner class
+ this._runnerClass = parallel
+ ? require('./nodejs/parallel-buffered-runner')
+ : exports.Runner;
+
+ // lazyLoadFiles may have been set `true` otherwise (for ESM loading),
+ // so keep `true` if so.
+ return this.lazyLoadFiles(this._lazyLoadFiles || parallel);
+};
+
+/**
+ * Disables implicit call to {@link Mocha#loadFiles} in {@link Mocha#run}. This
+ * setting is used by watch mode, parallel mode, and for loading ESM files.
+ * @todo This should throw if we've already loaded files; such behavior
+ * necessitates adding a new state.
+ * @param {boolean} [enable] - If `true`, disable eager loading of files in
+ * {@link Mocha#run}
+ * @chainable
+ * @public
+ */
+Mocha.prototype.lazyLoadFiles = function lazyLoadFiles(enable) {
+ this._lazyLoadFiles = enable === true;
+ debug('set lazy load to %s', enable);
+ return this;
+};
+
+/**
+ * An alternative way to define root hooks that works with parallel runs.
+ * @typedef {Object} MochaRootHookObject
+ * @property {Function|Function[]} [beforeAll] - "Before all" hook(s)
+ * @property {Function|Function[]} [beforeEach] - "Before each" hook(s)
+ * @property {Function|Function[]} [afterAll] - "After all" hook(s)
+ * @property {Function|Function[]} [afterEach] - "After each" hook(s)
+ */
+
+/**
+ * An function that returns a {@link MochaRootHookObject}, either sync or async.
+ * @callback MochaRootHookFunction
+ * @returns {MochaRootHookObject|Promise}
+ */
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"../package.json":90,"./context":5,"./errors":6,"./esm-utils":42,"./hook":7,"./interfaces":11,"./mocharc.json":15,"./nodejs/growl":2,"./nodejs/parallel-buffered-runner":40,"./reporters":21,"./runnable":33,"./runner":34,"./stats-collector":35,"./suite":36,"./test":37,"./utils":38,"debug":45,"escape-string-regexp":49,"path":42}],15:[function(require,module,exports){
module.exports={
"diff": true,
"extension": ["js", "cjs", "mjs"],
- "opts": "./test/mocha.opts",
"package": "./package.json",
"reporter": "spec",
"slow": 75,
@@ -2374,7 +2767,7 @@ var tty = require('tty');
var diff = require('diff');
var milliseconds = require('ms');
var utils = require('../utils');
-var supportsColor = process.browser ? null : require('supports-color');
+var supportsColor = utils.isBrowser() ? null : require('supports-color');
var constants = require('../runner').constants;
var EVENT_TEST_PASS = constants.EVENT_TEST_PASS;
var EVENT_TEST_FAIL = constants.EVENT_TEST_FAIL;
@@ -2401,7 +2794,7 @@ var consoleLog = console.log;
*/
exports.useColors =
- !process.browser &&
+ !utils.isBrowser() &&
(supportsColor.stdout || process.env.MOCHA_COLORS !== undefined);
/**
@@ -2887,7 +3280,7 @@ Base.consoleLog = consoleLog;
Base.abstract = true;
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"_process":69,"diff":48,"ms":60,"supports-color":42,"tty":4}],18:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"_process":67,"diff":48,"ms":58,"supports-color":42,"tty":4}],18:[function(require,module,exports){
'use strict';
/**
* @module Doc
@@ -2952,6 +3345,7 @@ function Doc(runner, options) {
runner.on(EVENT_TEST_PASS, function(test) {
Base.consoleLog('%s - %s
', indent(), utils.escape(test.title));
+ Base.consoleLog('%s - %s
', indent(), utils.escape(test.file));
var code = utils.escape(utils.clean(test.body));
Base.consoleLog('%s %s
', indent(), code);
});
@@ -2962,6 +3356,11 @@ function Doc(runner, options) {
indent(),
utils.escape(test.title)
);
+ Base.consoleLog(
+ '%s - %s
',
+ indent(),
+ utils.escape(test.file)
+ );
var code = utils.escape(utils.clean(test.body));
Base.consoleLog(
'%s %s
',
@@ -3063,7 +3462,7 @@ inherits(Dot, Base);
Dot.description = 'dot matrix representation';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],20:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],20:[function(require,module,exports){
(function (global){
'use strict';
@@ -3564,6 +3963,7 @@ function clean(test) {
return {
title: test.title,
fullTitle: test.fullTitle(),
+ file: test.file,
duration: test.duration,
currentRetry: test.currentRetry()
};
@@ -3572,7 +3972,7 @@ function clean(test) {
JSONStream.description = 'newline delimited JSON events';
}).call(this,require('_process'))
-},{"../runner":34,"./base":17,"_process":69}],23:[function(require,module,exports){
+},{"../runner":34,"./base":17,"_process":67}],23:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -3663,6 +4063,7 @@ function clean(test) {
return {
title: test.title,
fullTitle: test.fullTitle(),
+ file: test.file,
duration: test.duration,
currentRetry: test.currentRetry(),
err: cleanCycles(err)
@@ -3711,7 +4112,7 @@ function errorJSON(err) {
JSONReporter.description = 'single JSON object';
}).call(this,require('_process'))
-},{"../runner":34,"./base":17,"_process":69}],24:[function(require,module,exports){
+},{"../runner":34,"./base":17,"_process":67}],24:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -3771,11 +4172,12 @@ function Landing(runner, options) {
var self = this;
var width = (Base.window.width * 0.75) | 0;
- var total = runner.total;
var stream = process.stdout;
+
var plane = color('plane', '✈');
var crashed = -1;
var n = 0;
+ var total = 0;
function runway() {
var buf = Array(width).join('-');
@@ -3789,8 +4191,7 @@ function Landing(runner, options) {
runner.on(EVENT_TEST_END, function(test) {
// check if the plane crashed
- var col = crashed === -1 ? ((width * ++n) / total) | 0 : crashed;
-
+ var col = crashed === -1 ? ((width * ++n) / ++total) | 0 : crashed;
// show the crash
if (test.state === STATE_FAILED) {
plane = color('plane crash', '✈');
@@ -3813,6 +4214,14 @@ function Landing(runner, options) {
process.stdout.write('\n');
self.epilogue();
});
+
+ // if cursor is hidden when we ctrl-C, then it will remain hidden unless...
+ process.once('SIGINT', function() {
+ cursor.show();
+ process.nextTick(function() {
+ process.kill(process.pid, 'SIGINT');
+ });
+ });
}
/**
@@ -3823,7 +4232,7 @@ inherits(Landing, Base);
Landing.description = 'Unicode landing strip';
}).call(this,require('_process'))
-},{"../runnable":33,"../runner":34,"../utils":38,"./base":17,"_process":69}],25:[function(require,module,exports){
+},{"../runnable":33,"../runner":34,"../utils":38,"./base":17,"_process":67}],25:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -3905,7 +4314,7 @@ inherits(List, Base);
List.description = 'like "spec" reporter but flat';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],26:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],26:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -4021,7 +4430,7 @@ function Markdown(runner, options) {
Markdown.description = 'GitHub Flavored Markdown';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],27:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],27:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -4077,7 +4486,7 @@ inherits(Min, Base);
Min.description = 'essentially just a summary';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],28:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],28:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -4357,7 +4766,7 @@ function write(string) {
NyanCat.description = '"nyan cat"';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],29:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],29:[function(require,module,exports){
(function (process){
'use strict';
/**
@@ -4465,7 +4874,7 @@ inherits(Progress, Base);
Progress.description = 'a progress bar';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69}],30:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67}],30:[function(require,module,exports){
'use strict';
/**
* @module Spec
@@ -4620,9 +5029,7 @@ function TAP(runner, options) {
this._producer = createProducer(tapVersion);
runner.once(EVENT_RUN_BEGIN, function() {
- var ntests = runner.grepTotal(runner.suite);
self._producer.writeVersion();
- self._producer.writePlan(ntests);
});
runner.on(EVENT_TEST_END, function() {
@@ -4774,6 +5181,7 @@ TAPProducer.prototype.writeEpilogue = function(stats) {
println('# pass ' + stats.passes);
// :TBD: Why are we not showing pending results?
println('# fail ' + stats.failures);
+ this.writePlan(stats.passes + stats.failures + stats.pending);
};
/**
@@ -4864,7 +5272,7 @@ inherits(TAP13Producer, TAPProducer);
TAP.description = 'TAP-compatible output';
}).call(this,require('_process'))
-},{"../runner":34,"../utils":38,"./base":17,"_process":69,"util":89}],32:[function(require,module,exports){
+},{"../runner":34,"../utils":38,"./base":17,"_process":67,"util":89}],32:[function(require,module,exports){
(function (process,global){
'use strict';
/**
@@ -4877,7 +5285,6 @@ TAP.description = 'TAP-compatible output';
var Base = require('./base');
var utils = require('../utils');
var fs = require('fs');
-var mkdirp = require('mkdirp');
var path = require('path');
var errors = require('../errors');
var createUnsupportedError = errors.createUnsupportedError;
@@ -4930,7 +5337,9 @@ function XUnit(runner, options) {
throw createUnsupportedError('file output not supported in browser');
}
- mkdirp.sync(path.dirname(options.reporterOptions.output));
+ fs.mkdirSync(path.dirname(options.reporterOptions.output), {
+ recursive: true
+ });
self.fileStream = fs.createWriteStream(options.reporterOptions.output);
}
@@ -5084,7 +5493,7 @@ function tag(name, attrs, close, content) {
XUnit.description = 'XUnit-compatible XML output';
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"../errors":6,"../runnable":33,"../runner":34,"../utils":38,"./base":17,"_process":69,"fs":42,"mkdirp":59,"path":42}],33:[function(require,module,exports){
+},{"../errors":6,"../runnable":33,"../runner":34,"../utils":38,"./base":17,"_process":67,"fs":42,"path":42}],33:[function(require,module,exports){
(function (global){
'use strict';
@@ -5093,8 +5502,9 @@ var Pending = require('./pending');
var debug = require('debug')('mocha:runnable');
var milliseconds = require('ms');
var utils = require('./utils');
-var createInvalidExceptionError = require('./errors')
- .createInvalidExceptionError;
+var errors = require('./errors');
+var createInvalidExceptionError = errors.createInvalidExceptionError;
+var createMultipleDoneError = errors.createMultipleDoneError;
/**
* Save timer references to avoid Sinon interfering (see GH-237).
@@ -5123,11 +5533,8 @@ function Runnable(title, fn) {
this.sync = !this.async;
this._timeout = 2000;
this._slow = 75;
- this._enableTimeouts = true;
- this.timedOut = false;
this._retries = -1;
- this._currentRetry = 0;
- this.pending = false;
+ this.reset();
}
/**
@@ -5135,6 +5542,17 @@ function Runnable(title, fn) {
*/
utils.inherits(Runnable, EventEmitter);
+/**
+ * Resets the state initially or for a next run.
+ */
+Runnable.prototype.reset = function() {
+ this.timedOut = false;
+ this._currentRetry = 0;
+ this.pending = false;
+ delete this.state;
+ delete this.err;
+};
+
/**
* Get current timeout value in msecs.
*
@@ -5171,10 +5589,12 @@ Runnable.prototype.timeout = function(ms) {
// see #1652 for reasoning
if (ms === range[0] || ms === range[1]) {
- this._enableTimeouts = false;
+ this._timeout = 0;
+ } else {
+ this._timeout = ms;
}
- debug('timeout %d', ms);
- this._timeout = ms;
+ debug('timeout %d', this._timeout);
+
if (this.timer) {
this.resetTimeout();
}
@@ -5200,22 +5620,6 @@ Runnable.prototype.slow = function(ms) {
return this;
};
-/**
- * Set and get whether timeout is `enabled`.
- *
- * @private
- * @param {boolean} enabled
- * @return {Runnable|boolean} enabled or Runnable instance.
- */
-Runnable.prototype.enableTimeouts = function(enabled) {
- if (!arguments.length) {
- return this._enableTimeouts;
- }
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
/**
* Halt and mark as pending.
*
@@ -5310,31 +5714,6 @@ Runnable.prototype.clearTimeout = function() {
clearTimeout(this.timer);
};
-/**
- * Inspect the runnable void of private properties.
- *
- * @private
- * @return {string}
- */
-Runnable.prototype.inspect = function() {
- return JSON.stringify(
- this,
- function(key, val) {
- if (key[0] === '_') {
- return;
- }
- if (key === 'parent') {
- return '#';
- }
- if (key === 'ctx') {
- return '#';
- }
- return val;
- },
- 2
- );
-};
-
/**
* Reset the timeout.
*
@@ -5342,14 +5721,14 @@ Runnable.prototype.inspect = function() {
*/
Runnable.prototype.resetTimeout = function() {
var self = this;
- var ms = this.timeout() || 1e9;
+ var ms = this.timeout();
- if (!this._enableTimeouts) {
+ if (ms === 0) {
return;
}
this.clearTimeout();
this.timer = setTimeout(function() {
- if (!self._enableTimeouts) {
+ if (self.timeout() === 0) {
return;
}
self.callback(self._timeoutError(ms));
@@ -5381,7 +5760,9 @@ Runnable.prototype.run = function(fn) {
var start = new Date();
var ctx = this.ctx;
var finished;
- var emitted;
+ var errorWasHandled = false;
+
+ if (this.isPending()) return fn();
// Sometimes the ctx exists, but it is not runnable
if (ctx && ctx.runnable) {
@@ -5390,17 +5771,11 @@ Runnable.prototype.run = function(fn) {
// called multiple times
function multiple(err) {
- if (emitted) {
+ if (errorWasHandled) {
return;
}
- emitted = true;
- var msg = 'done() called multiple times';
- if (err && err.message) {
- err.message += " (and Mocha's " + msg + ')';
- self.emit('error', err);
- } else {
- self.emit('error', new Error(msg));
- }
+ errorWasHandled = true;
+ self.emit('error', createMultipleDoneError(self, err));
}
// finished
@@ -5417,7 +5792,7 @@ Runnable.prototype.run = function(fn) {
self.clearTimeout();
self.duration = new Date() - start;
finished = true;
- if (!err && self.duration > ms && self._enableTimeouts) {
+ if (!err && self.duration > ms && ms > 0) {
err = self._timeoutError(ms);
}
fn(err);
@@ -5451,7 +5826,7 @@ Runnable.prototype.run = function(fn) {
callFnAsync(this.fn);
} catch (err) {
// handles async runnables which actually run synchronously
- emitted = true;
+ errorWasHandled = true;
if (err instanceof Pending) {
return; // done() is already called in this.skip()
} else if (this.allowUncaught) {
@@ -5464,13 +5839,9 @@ Runnable.prototype.run = function(fn) {
// sync or promise-returning
try {
- if (this.isPending()) {
- done();
- } else {
- callFn(this.fn);
- }
+ callFn(this.fn);
} catch (err) {
- emitted = true;
+ errorWasHandled = true;
if (err instanceof Pending) {
return done();
} else if (this.allowUncaught) {
@@ -5569,7 +5940,11 @@ var constants = utils.defineConstants(
/**
* Value of `state` prop when a `Runnable` has passed
*/
- STATE_PASSED: 'passed'
+ STATE_PASSED: 'passed',
+ /**
+ * Value of `state` prop when a `Runnable` has been skipped by user
+ */
+ STATE_PENDING: 'pending'
}
);
@@ -5592,7 +5967,7 @@ Runnable.toValueOrError = function(value) {
Runnable.constants = constants;
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./errors":6,"./pending":16,"./utils":38,"debug":45,"events":50,"ms":60}],34:[function(require,module,exports){
+},{"./errors":6,"./pending":16,"./utils":38,"debug":45,"events":50,"ms":58}],34:[function(require,module,exports){
(function (process,global){
'use strict';
@@ -5614,8 +5989,8 @@ var HOOK_TYPE_BEFORE_ALL = Suite.constants.HOOK_TYPE_BEFORE_ALL;
var EVENT_ROOT_SUITE_RUN = Suite.constants.EVENT_ROOT_SUITE_RUN;
var STATE_FAILED = Runnable.constants.STATE_FAILED;
var STATE_PASSED = Runnable.constants.STATE_PASSED;
+var STATE_PENDING = Runnable.constants.STATE_PENDING;
var dQuote = utils.dQuote;
-var ngettext = utils.ngettext;
var sQuote = utils.sQuote;
var stackFilter = utils.stackTraceFilter();
var stringify = utils.stringify;
@@ -5623,6 +5998,7 @@ var type = utils.type;
var errors = require('./errors');
var createInvalidExceptionError = errors.createInvalidExceptionError;
var createUnsupportedError = errors.createUnsupportedError;
+var createFatalError = errors.createFatalError;
/**
* Non-enumerable globals.
@@ -5705,7 +6081,19 @@ var constants = utils.defineConstants(
/**
* Emitted when {@link Test} execution has failed, but will retry
*/
- EVENT_TEST_RETRY: 'retry'
+ EVENT_TEST_RETRY: 'retry',
+ /**
+ * Initial state of Runner
+ */
+ STATE_IDLE: 'idle',
+ /**
+ * State set to this value when the Runner has started running
+ */
+ STATE_RUNNING: 'running',
+ /**
+ * State set to this value when the Runner has stopped
+ */
+ STATE_STOPPED: 'stopped'
}
);
@@ -5717,21 +6105,32 @@ module.exports = Runner;
* @extends external:EventEmitter
* @public
* @class
- * @param {Suite} suite Root suite
- * @param {boolean} [delay] Whether or not to delay execution of root suite
- * until ready.
- */
-function Runner(suite, delay) {
+ * @param {Suite} suite - Root suite
+ * @param {Object|boolean} [opts] - Options. If `boolean`, whether or not to delay execution of root suite until ready (for backwards compatibility).
+ * @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.
+ * @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.
+ */
+function Runner(suite, opts) {
+ if (opts === undefined) {
+ opts = {};
+ }
+ if (typeof opts === 'boolean') {
+ this._delay = opts;
+ opts = {};
+ } else {
+ this._delay = opts.delay;
+ }
var self = this;
this._globals = [];
this._abort = false;
- this._delay = delay;
this.suite = suite;
- this.started = false;
+ this._opts = opts;
+ this.state = constants.STATE_IDLE;
this.total = suite.total();
this.failures = 0;
+ this._eventListeners = [];
this.on(constants.EVENT_TEST_END, function(test) {
- if (test.retriedTest() && test.parent) {
+ if (test.type === 'test' && test.retriedTest() && test.parent) {
var idx =
test.parent.tests && test.parent.tests.indexOf(test.retriedTest());
if (idx > -1) test.parent.tests[idx] = test;
@@ -5744,6 +6143,8 @@ function Runner(suite, delay) {
this._defaultGrep = /.*/;
this.grep(this._defaultGrep);
this.globals(this.globalProps());
+
+ this.uncaught = this._uncaught.bind(this);
}
/**
@@ -5759,6 +6160,58 @@ Runner.immediately = global.setImmediate || process.nextTick;
*/
inherits(Runner, EventEmitter);
+/**
+ * Replacement for `target.on(eventName, listener)` that does bookkeeping to remove them when this runner instance is disposed.
+ * @param {EventEmitter} target - The `EventEmitter`
+ * @param {string} eventName - The event name
+ * @param {string} fn - Listener function
+ * @private
+ */
+Runner.prototype._addEventListener = function(target, eventName, listener) {
+ target.on(eventName, listener);
+ this._eventListeners.push([target, eventName, listener]);
+};
+
+/**
+ * Replacement for `target.removeListener(eventName, listener)` that also updates the bookkeeping.
+ * @param {EventEmitter} target - The `EventEmitter`
+ * @param {string} eventName - The event anme
+ * @param {function} listener - Listener function
+ * @private
+ */
+Runner.prototype._removeEventListener = function(target, eventName, listener) {
+ var eventListenerIndex = -1;
+ for (var i = 0; i < this._eventListeners.length; i++) {
+ var eventListenerDescriptor = this._eventListeners[i];
+ if (
+ eventListenerDescriptor[0] === target &&
+ eventListenerDescriptor[1] === eventName &&
+ eventListenerDescriptor[2] === listener
+ ) {
+ eventListenerIndex = i;
+ break;
+ }
+ }
+ if (eventListenerIndex !== -1) {
+ var removedListener = this._eventListeners.splice(eventListenerIndex, 1)[0];
+ removedListener[0].removeListener(removedListener[1], removedListener[2]);
+ }
+};
+
+/**
+ * Removes all event handlers set during a run on this instance.
+ * Remark: this does _not_ clean/dispose the tests or suites themselves.
+ */
+Runner.prototype.dispose = function() {
+ this.removeAllListeners();
+ this._eventListeners.forEach(function(eventListenerDescriptor) {
+ eventListenerDescriptor[0].removeListener(
+ eventListenerDescriptor[1],
+ eventListenerDescriptor[2]
+ );
+ });
+};
+
/**
* Run tests with full titles matching `re`. Updates runner.total
* with number of tests matched.
@@ -5770,7 +6223,7 @@ inherits(Runner, EventEmitter);
* @return {Runner} Runner instance.
*/
Runner.prototype.grep = function(re, invert) {
- debug('grep %s', re);
+ debug('grep(): setting to %s', re);
this._grep = re;
this._invert = invert;
this.total = this.grepTotal(this.suite);
@@ -5835,7 +6288,7 @@ Runner.prototype.globals = function(arr) {
if (!arguments.length) {
return this._globals;
}
- debug('globals %j', arr);
+ debug('globals(): setting to %O', arr);
this._globals = this._globals.concat(arr);
return this;
};
@@ -5867,12 +6320,8 @@ Runner.prototype.checkGlobals = function(test) {
this._globals = this._globals.concat(leaks);
if (leaks.length) {
- var format = ngettext(
- leaks.length,
- 'global leak detected: %s',
- 'global leaks detected: %s'
- );
- var error = new Error(util.format(format, leaks.map(sQuote).join(', ')));
+ var msg = 'global leak(s) detected: %s';
+ var error = new Error(util.format(msg, leaks.map(sQuote).join(', ')));
this.fail(test, error);
}
};
@@ -5881,15 +6330,27 @@ Runner.prototype.checkGlobals = function(test) {
* Fail the given `test`.
*
* @private
- * @param {Test} test
+ * @param {Runnable} test
* @param {Error} err
+ * @param {boolean} [force=false] - Whether to fail a pending test.
*/
-Runner.prototype.fail = function(test, err) {
- if (test.isPending()) {
+Runner.prototype.fail = function(test, err, force) {
+ force = force === true;
+ if (test.isPending() && !force) {
return;
}
+ if (this.state === constants.STATE_STOPPED) {
+ if (err.code === errors.constants.MULTIPLE_DONE) {
+ throw err;
+ }
+ throw createFatalError(
+ 'Test failed after root suite execution completed!',
+ err
+ );
+ }
++this.failures;
+ debug('total number of failures: %d', this.failures);
test.state = STATE_FAILED;
if (!isError(err)) {
@@ -5977,12 +6438,12 @@ Runner.prototype.hook = function(name, fn) {
self.emit(constants.EVENT_HOOK_BEGIN, hook);
if (!hook.listeners('error').length) {
- hook.on('error', function(err) {
+ self._addEventListener(hook, 'error', function(err) {
self.failHook(hook, err);
});
}
- hook.run(function(err) {
+ hook.run(function cbHookRun(err) {
var testError = hook.error();
if (testError) {
self.fail(self.test, testError);
@@ -6008,6 +6469,7 @@ Runner.prototype.hook = function(name, fn) {
suite.suites.forEach(function(suite) {
suite.pending = true;
});
+ hooks = [];
} else {
hook.pending = false;
var errForbid = createUnsupportedError('`this.skip` forbidden');
@@ -6120,18 +6582,10 @@ Runner.prototype.runTest = function(fn) {
return;
}
- var suite = this.parents().reverse()[0] || this.suite;
- if (this.forbidOnly && suite.hasOnly()) {
- fn(new Error('`.only` forbidden'));
- return;
- }
if (this.asyncOnly) {
test.asyncOnly = true;
}
- test.on('error', function(err) {
- if (err instanceof Pending) {
- return;
- }
+ this._addEventListener(test, 'error', function(err) {
self.fail(test, err);
});
if (this.allowUncaught) {
@@ -6230,10 +6684,9 @@ Runner.prototype.runTests = function(suite, fn) {
// static skip, no hooks are executed
if (test.isPending()) {
if (self.forbidPending) {
- test.isPending = alwaysFalse;
- self.fail(test, new Error('Pending test forbidden'));
- delete test.isPending;
+ self.fail(test, new Error('Pending test forbidden'), true);
} else {
+ test.state = STATE_PENDING;
self.emit(constants.EVENT_TEST_PENDING, test);
}
self.emit(constants.EVENT_TEST_END, test);
@@ -6246,10 +6699,9 @@ Runner.prototype.runTests = function(suite, fn) {
// conditional skip within beforeEach
if (test.isPending()) {
if (self.forbidPending) {
- test.isPending = alwaysFalse;
- self.fail(test, new Error('Pending test forbidden'));
- delete test.isPending;
+ self.fail(test, new Error('Pending test forbidden'), true);
} else {
+ test.state = STATE_PENDING;
self.emit(constants.EVENT_TEST_PENDING, test);
}
self.emit(constants.EVENT_TEST_END, test);
@@ -6270,10 +6722,9 @@ Runner.prototype.runTests = function(suite, fn) {
// conditional skip within it
if (test.pending) {
if (self.forbidPending) {
- test.isPending = alwaysFalse;
- self.fail(test, new Error('Pending test forbidden'));
- delete test.isPending;
+ self.fail(test, new Error('Pending test forbidden'), true);
} else {
+ test.state = STATE_PENDING;
self.emit(constants.EVENT_TEST_PENDING, test);
}
self.emit(constants.EVENT_TEST_END, test);
@@ -6310,10 +6761,6 @@ Runner.prototype.runTests = function(suite, fn) {
next();
};
-function alwaysFalse() {
- return false;
-}
-
/**
* Run the given `suite` and invoke the callback `fn()` when complete.
*
@@ -6326,9 +6773,10 @@ Runner.prototype.runSuite = function(suite, fn) {
var self = this;
var total = this.grepTotal(suite);
- debug('run suite %s', suite.fullTitle());
+ debug('runSuite(): running %s', suite.fullTitle());
if (!total || (self.failures && suite._bail)) {
+ debug('runSuite(): bailing');
return fn();
}
@@ -6394,22 +6842,49 @@ Runner.prototype.runSuite = function(suite, fn) {
/**
* Handle uncaught exceptions within runner.
*
- * @param {Error} err
+ * This function is bound to the instance as `Runner#uncaught` at instantiation
+ * time. It's intended to be listening on the `Process.uncaughtException` event.
+ * In order to not leak EE listeners, we need to ensure no more than a single
+ * `uncaughtException` listener exists per `Runner`. The only way to do
+ * this--because this function needs the context (and we don't have lambdas)--is
+ * to use `Function.prototype.bind`. We need strict equality to unregister and
+ * _only_ unregister the _one_ listener we set from the
+ * `Process.uncaughtException` event; would be poor form to just remove
+ * everything. See {@link Runner#run} for where the event listener is registered
+ * and unregistered.
+ * @param {Error} err - Some uncaught error
* @private
*/
-Runner.prototype.uncaught = function(err) {
+Runner.prototype._uncaught = function(err) {
+ // this is defensive to prevent future developers from mis-calling this function.
+ // it's more likely that it'd be called with the incorrect context--say, the global
+ // `process` object--than it would to be called with a context that is not a "subclass"
+ // of `Runner`.
+ if (!(this instanceof Runner)) {
+ throw createFatalError(
+ 'Runner#uncaught() called with invalid context',
+ this
+ );
+ }
if (err instanceof Pending) {
+ debug('uncaught(): caught a Pending');
return;
}
// browser does not exit script when throwing in global.onerror()
- if (this.allowUncaught && !process.browser) {
+ if (this.allowUncaught && !utils.isBrowser()) {
+ debug('uncaught(): bubbling exception due to --allow-uncaught');
+ throw err;
+ }
+
+ if (this.state === constants.STATE_STOPPED) {
+ debug('uncaught(): throwing after run has completed!');
throw err;
}
if (err) {
- debug('uncaught exception %O', err);
+ debug('uncaught(): got truthy exception %O', err);
} else {
- debug('uncaught undefined/falsy exception');
+ debug('uncaught(): undefined/falsy exception');
err = createInvalidExceptionError(
'Caught falsy/undefined exception which would otherwise be uncaught. No stack trace found; try a debugger',
err
@@ -6418,6 +6893,7 @@ Runner.prototype.uncaught = function(err) {
if (!isError(err)) {
err = thrown2Error(err);
+ debug('uncaught(): converted "error" %o to Error', err);
}
err.uncaught = true;
@@ -6425,12 +6901,15 @@ Runner.prototype.uncaught = function(err) {
if (!runnable) {
runnable = new Runnable('Uncaught error outside test suite');
+ debug('uncaught(): no current Runnable; created a phony one');
runnable.parent = this.suite;
- if (this.started) {
+ if (this.state === constants.STATE_RUNNING) {
+ debug('uncaught(): failing gracefully');
this.fail(runnable, err);
} else {
// Can't recover from this failure
+ debug('uncaught(): test run has not yet started; unrecoverable');
this.emit(constants.EVENT_RUN_BEGIN);
this.fail(runnable, err);
this.emit(constants.EVENT_RUN_END);
@@ -6442,98 +6921,94 @@ Runner.prototype.uncaught = function(err) {
runnable.clearTimeout();
if (runnable.isFailed()) {
+ debug('uncaught(): Runnable has already failed');
// Ignore error if already failed
return;
} else if (runnable.isPending()) {
+ debug('uncaught(): pending Runnable wound up failing!');
// report 'pending test' retrospectively as failed
- runnable.isPending = alwaysFalse;
- this.fail(runnable, err);
- delete runnable.isPending;
+ this.fail(runnable, err, true);
return;
}
// we cannot recover gracefully if a Runnable has already passed
// then fails asynchronously
if (runnable.isPassed()) {
+ debug('uncaught(): Runnable has already passed; bailing gracefully');
this.fail(runnable, err);
this.abort();
} else {
- debug(runnable);
+ debug('uncaught(): forcing Runnable to complete with Error');
return runnable.callback(err);
}
};
-/**
- * Handle uncaught exceptions after runner's end event.
- *
- * @param {Error} err
- * @private
- */
-Runner.prototype.uncaughtEnd = function uncaughtEnd(err) {
- if (err instanceof Pending) return;
- throw err;
-};
-
/**
* Run the root suite and invoke `fn(failures)`
* on completion.
*
* @public
* @memberof Runner
- * @param {Function} fn
+ * @param {Function} fn - Callback when finished
+ * @param {{files: string[], options: Options}} [opts] - For subclasses
* @return {Runner} Runner instance.
*/
-Runner.prototype.run = function(fn) {
+Runner.prototype.run = function(fn, opts) {
var self = this;
var rootSuite = this.suite;
fn = fn || function() {};
- function uncaught(err) {
- self.uncaught(err);
- }
-
function start() {
+ debug('run(): starting');
// If there is an `only` filter
if (rootSuite.hasOnly()) {
rootSuite.filterOnly();
+ debug('run(): filtered exclusive Runnables');
}
- self.started = true;
+ self.state = constants.STATE_RUNNING;
if (self._delay) {
self.emit(constants.EVENT_DELAY_END);
+ debug('run(): "delay" ended');
}
+ debug('run(): emitting %s', constants.EVENT_RUN_BEGIN);
self.emit(constants.EVENT_RUN_BEGIN);
+ debug('run(): emitted %s', constants.EVENT_RUN_BEGIN);
self.runSuite(rootSuite, function() {
- debug('finished running');
+ debug(
+ 'run(): root suite completed; emitting %s',
+ constants.EVENT_RUN_END
+ );
self.emit(constants.EVENT_RUN_END);
+ debug('run(): emitted %s', constants.EVENT_RUN_END);
});
}
- debug(constants.EVENT_RUN_BEGIN);
-
// references cleanup to avoid memory leaks
- this.on(constants.EVENT_SUITE_END, function(suite) {
- suite.cleanReferences();
- });
+ if (this._opts.cleanReferencesAfterRun) {
+ this.on(constants.EVENT_SUITE_END, function(suite) {
+ suite.cleanReferences();
+ });
+ }
// callback
this.on(constants.EVENT_RUN_END, function() {
+ self.state = constants.STATE_STOPPED;
debug(constants.EVENT_RUN_END);
- process.removeListener('uncaughtException', uncaught);
- process.on('uncaughtException', self.uncaughtEnd);
+ debug('run(): emitted %s', constants.EVENT_RUN_END);
fn(self.failures);
});
- // uncaught exception
- process.removeListener('uncaughtException', self.uncaughtEnd);
- process.on('uncaughtException', uncaught);
+ self._removeEventListener(process, 'uncaughtException', self.uncaught);
+ self._addEventListener(process, 'uncaughtException', self.uncaught);
if (this._delay) {
// for reporters, I guess.
// might be nice to debounce some dots while we wait.
this.emit(constants.EVENT_DELAY_BEGIN, rootSuite);
rootSuite.once(EVENT_ROOT_SUITE_RUN, start);
+ debug('run(): waiting for green light due to --delay');
} else {
Runner.immediately(function() {
start();
@@ -6551,7 +7026,7 @@ Runner.prototype.run = function(fn) {
* @return {Runner} Runner instance.
*/
Runner.prototype.abort = function() {
- debug('aborting');
+ debug('abort(): aborting');
this._abort = true;
return this;
@@ -6635,7 +7110,7 @@ Runner.constants = constants;
*/
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./errors":6,"./pending":16,"./runnable":33,"./suite":36,"./utils":38,"_process":69,"debug":45,"events":50,"util":89}],35:[function(require,module,exports){
+},{"./errors":6,"./pending":16,"./runnable":33,"./suite":36,"./utils":38,"_process":67,"debug":45,"events":50,"util":89}],35:[function(require,module,exports){
(function (global){
'use strict';
@@ -6786,20 +7261,19 @@ function Suite(title, parentContext, isRoot) {
this.ctx = new Context();
this.suites = [];
this.tests = [];
+ this.root = isRoot === true;
this.pending = false;
+ this._retries = -1;
this._beforeEach = [];
this._beforeAll = [];
this._afterEach = [];
this._afterAll = [];
- this.root = isRoot === true;
this._timeout = 2000;
- this._enableTimeouts = true;
this._slow = 75;
this._bail = false;
- this._retries = -1;
this._onlyTests = [];
this._onlySuites = [];
- this.delayed = false;
+ this.reset();
this.on('newListener', function(event) {
if (deprecatedEvents[event]) {
@@ -6817,6 +7291,22 @@ function Suite(title, parentContext, isRoot) {
*/
inherits(Suite, EventEmitter);
+/**
+ * Resets the state initially or for a next run.
+ */
+Suite.prototype.reset = function() {
+ this.delayed = false;
+ function doReset(thingToReset) {
+ thingToReset.reset();
+ }
+ this.suites.forEach(doReset);
+ this.tests.forEach(doReset);
+ this._beforeEach.forEach(doReset);
+ this._afterEach.forEach(doReset);
+ this._beforeAll.forEach(doReset);
+ this._afterAll.forEach(doReset);
+};
+
/**
* Return a clone of this `Suite`.
*
@@ -6830,7 +7320,6 @@ Suite.prototype.clone = function() {
suite.root = this.root;
suite.timeout(this.timeout());
suite.retries(this.retries());
- suite.enableTimeouts(this.enableTimeouts());
suite.slow(this.slow());
suite.bail(this.bail());
return suite;
@@ -6848,12 +7337,15 @@ Suite.prototype.timeout = function(ms) {
if (!arguments.length) {
return this._timeout;
}
- if (ms.toString() === '0') {
- this._enableTimeouts = false;
- }
if (typeof ms === 'string') {
ms = milliseconds(ms);
}
+
+ // Clamp to range
+ var INT_MAX = Math.pow(2, 31) - 1;
+ var range = [0, INT_MAX];
+ ms = utils.clamp(ms, range);
+
debug('timeout %d', ms);
this._timeout = parseInt(ms, 10);
return this;
@@ -6875,22 +7367,6 @@ Suite.prototype.retries = function(n) {
return this;
};
-/**
- * Set or get timeout to `enabled`.
- *
- * @private
- * @param {boolean} enabled
- * @return {Suite|boolean} self or enabled
- */
-Suite.prototype.enableTimeouts = function(enabled) {
- if (!arguments.length) {
- return this._enableTimeouts;
- }
- debug('enableTimeouts %s', enabled);
- this._enableTimeouts = enabled;
- return this;
-};
-
/**
* Set or get slow `ms` or short-hand such as "2s".
*
@@ -6947,7 +7423,6 @@ Suite.prototype._createHook = function(title, fn) {
hook.parent = this;
hook.timeout(this.timeout());
hook.retries(this.retries());
- hook.enableTimeouts(this.enableTimeouts());
hook.slow(this.slow());
hook.ctx = this.ctx;
hook.file = this.file;
@@ -7062,7 +7537,6 @@ Suite.prototype.addSuite = function(suite) {
suite.root = false;
suite.timeout(this.timeout());
suite.retries(this.retries());
- suite.enableTimeouts(this.enableTimeouts());
suite.slow(this.slow());
suite.bail(this.bail());
this.suites.push(suite);
@@ -7081,7 +7555,6 @@ Suite.prototype.addTest = function(test) {
test.parent = this;
test.timeout(this.timeout());
test.retries(this.retries());
- test.enableTimeouts(this.enableTimeouts());
test.slow(this.slow());
test.ctx = this.ctx;
this.tests.push(test);
@@ -7218,6 +7691,15 @@ Suite.prototype.appendOnlySuite = function(suite) {
this._onlySuites.push(suite);
};
+/**
+ * Marks a suite to be `only`.
+ *
+ * @private
+ */
+Suite.prototype.markOnly = function() {
+ this.parent && this.parent.appendOnlySuite(this);
+};
+
/**
* Adds a test to the list of tests marked `only`.
*
@@ -7236,6 +7718,16 @@ Suite.prototype.getHooks = function getHooks(name) {
return this['_' + name];
};
+/**
+ * cleans all references from this suite and all child suites.
+ */
+Suite.prototype.dispose = function() {
+ this.suites.forEach(function(suite) {
+ suite.dispose();
+ });
+ this.cleanReferences();
+};
+
/**
* Cleans up the references to all the deferred functions
* (before/after/beforeEach/afterEach) and tests of a Suite.
@@ -7274,6 +7766,22 @@ Suite.prototype.cleanReferences = function cleanReferences() {
}
};
+/**
+ * Returns an object suitable for IPC.
+ * Functions are represented by keys beginning with `$$`.
+ * @private
+ * @returns {Object}
+ */
+Suite.prototype.serialize = function serialize() {
+ return {
+ _bail: this._bail,
+ $$fullTitle: this.fullTitle(),
+ $$isPending: this.isPending(),
+ root: this.root,
+ title: this.title
+ };
+};
+
var constants = utils.defineConstants(
/**
* {@link Suite}-related constants.
@@ -7366,7 +7874,7 @@ var deprecatedEvents = Object.keys(constants)
Suite.constants = constants;
-},{"./errors":6,"./hook":7,"./utils":38,"debug":45,"events":50,"ms":60}],37:[function(require,module,exports){
+},{"./errors":6,"./hook":7,"./utils":38,"debug":45,"events":50,"ms":58}],37:[function(require,module,exports){
'use strict';
var Runnable = require('./runnable');
var utils = require('./utils');
@@ -7395,9 +7903,9 @@ function Test(title, fn) {
'string'
);
}
- Runnable.call(this, title, fn);
- this.pending = !fn;
this.type = 'test';
+ Runnable.call(this, title, fn);
+ this.reset();
}
/**
@@ -7405,6 +7913,15 @@ function Test(title, fn) {
*/
utils.inherits(Test, Runnable);
+/**
+ * Resets the state initially or for a next run.
+ */
+Test.prototype.reset = function() {
+ Runnable.prototype.reset.call(this);
+ this.pending = !this.fn;
+ delete this.state;
+};
+
/**
* Set or get retried test
*
@@ -7417,11 +7934,19 @@ Test.prototype.retriedTest = function(n) {
this._retriedTest = n;
};
+/**
+ * Add test to the list of tests marked `only`.
+ *
+ * @private
+ */
+Test.prototype.markOnly = function() {
+ this.parent.appendOnlyTest(this);
+};
+
Test.prototype.clone = function() {
var test = new Test(this.title, this.fn);
test.timeout(this.timeout());
test.slow(this.slow());
- test.enableTimeouts(this.enableTimeouts());
test.retries(this.retries());
test.currentRetry(this.currentRetry());
test.retriedTest(this.retriedTest() || this);
@@ -7432,6 +7957,34 @@ Test.prototype.clone = function() {
return test;
};
+/**
+ * Returns an minimal object suitable for transmission over IPC.
+ * Functions are represented by keys beginning with `$$`.
+ * @private
+ * @returns {Object}
+ */
+Test.prototype.serialize = function serialize() {
+ return {
+ $$currentRetry: this._currentRetry,
+ $$fullTitle: this.fullTitle(),
+ $$isPending: this.pending,
+ $$retriedTest: this._retriedTest || null,
+ $$slow: this._slow,
+ $$titlePath: this.titlePath(),
+ body: this.body,
+ duration: this.duration,
+ err: this.err,
+ parent: {
+ $$fullTitle: this.parent.fullTitle()
+ },
+ speed: this.speed,
+ state: this.state,
+ title: this.title,
+ type: this.type,
+ file: this.file
+ };
+};
+
},{"./errors":6,"./runnable":33,"./utils":38}],38:[function(require,module,exports){
(function (process,Buffer){
'use strict';
@@ -7499,8 +8052,9 @@ exports.isString = function(obj) {
exports.slug = function(str) {
return str
.toLowerCase()
- .replace(/ +/g, '-')
- .replace(/[^-\w]/g, '');
+ .replace(/\s+/g, '-')
+ .replace(/[^-\w]/g, '')
+ .replace(/-{2,}/g, '-');
};
/**
@@ -7923,7 +8477,6 @@ function isHiddenOnUnix(pathname) {
* **Make no assumption that the names will be sorted in any fashion.**
*
* @public
- * @memberof Mocha.utils
* @param {string} filepath - Base path to start searching from.
* @param {string[]} [extensions=[]] - File extensions to look for.
* @param {boolean} [recursive=false] - Whether to recurse into subdirectories.
@@ -8073,7 +8626,7 @@ exports.stackTraceFilter = function() {
var slash = path.sep;
var cwd;
if (is.node) {
- cwd = process.cwd() + slash;
+ cwd = exports.cwd() + slash;
} else {
cwd = (typeof location === 'undefined'
? window.location
@@ -8189,38 +8742,6 @@ exports.dQuote = function(str) {
return '"' + str + '"';
};
-/**
- * Provides simplistic message translation for dealing with plurality.
- *
- * @description
- * Use this to create messages which need to be singular or plural.
- * Some languages have several plural forms, so _complete_ message clauses
- * are preferable to generating the message on the fly.
- *
- * @private
- * @param {number} n - Non-negative integer
- * @param {string} msg1 - Message to be used in English for `n = 1`
- * @param {string} msg2 - Message to be used in English for `n = 0, 2, 3, ...`
- * @returns {string} message corresponding to value of `n`
- * @example
- * var sprintf = require('util').format;
- * var pkgs = ['one', 'two'];
- * var msg = sprintf(
- * ngettext(
- * pkgs.length,
- * 'cannot load package: %s',
- * 'cannot load packages: %s'
- * ),
- * pkgs.map(sQuote).join(', ')
- * );
- * console.log(msg); // => cannot load packages: 'one', 'two'
- */
-exports.ngettext = function(n, msg1, msg2) {
- if (typeof n === 'number' && n >= 0) {
- return n === 1 ? msg1 : msg2;
- }
-};
-
/**
* It's a noop.
* @public
@@ -8276,22 +8797,46 @@ exports.defineConstants = function(obj) {
* This function returns whether Node.JS has ES Module supports that is compatible with Mocha's needs,
* which is version >=12.11.
*
+ * @param {partialSupport} whether the full Node.js ESM support is available (>= 12) or just something that supports the runtime (>= 10)
+ *
* @returns {Boolean} whether the current version of Node.JS supports ES Modules in a way that is compatible with Mocha
*/
-exports.supportsEsModules = function() {
- if (!process.browser && process.versions && process.versions.node) {
+exports.supportsEsModules = function(partialSupport) {
+ if (!exports.isBrowser() && process.versions && process.versions.node) {
var versionFields = process.versions.node.split('.');
var major = +versionFields[0];
var minor = +versionFields[1];
- if (major >= 13 || (major === 12 && minor >= 11)) {
- return true;
+ if (!partialSupport) {
+ return major >= 13 || (major === 12 && minor >= 11);
+ } else {
+ return major >= 10;
}
}
};
+/**
+ * Returns current working directory
+ *
+ * Wrapper around `process.cwd()` for isolation
+ * @private
+ */
+exports.cwd = function cwd() {
+ return process.cwd();
+};
+
+/**
+ * Returns `true` if Mocha is running in a browser.
+ * Checks for `process.browser`.
+ * @returns {boolean}
+ * @private
+ */
+exports.isBrowser = function isBrowser() {
+ return Boolean(process.browser);
+};
+
}).call(this,require('_process'),require("buffer").Buffer)
-},{"./errors":6,"_process":69,"buffer":43,"fs":42,"glob":42,"he":54,"object.assign":65,"path":42,"util":89}],39:[function(require,module,exports){
+},{"./errors":6,"_process":67,"buffer":43,"fs":42,"glob":42,"he":54,"object.assign":63,"path":42,"util":89}],39:[function(require,module,exports){
'use strict'
exports.byteLength = byteLength
@@ -8359,7 +8904,8 @@ function toByteArray (b64) {
? validLen - 4
: validLen
- for (var i = 0; i < len; i += 4) {
+ var i
+ for (i = 0; i < len; i += 4) {
tmp =
(revLookup[b64.charCodeAt(i)] << 18) |
(revLookup[b64.charCodeAt(i + 1)] << 12) |
@@ -8475,7 +9021,7 @@ BrowserStdout.prototype._write = function(chunks, encoding, cb) {
}
}).call(this,require('_process'))
-},{"_process":69,"stream":84,"util":89}],42:[function(require,module,exports){
+},{"_process":67,"stream":83,"util":89}],42:[function(require,module,exports){
arguments[4][40][0].apply(exports,arguments)
},{"dup":40}],43:[function(require,module,exports){
(function (Buffer){
@@ -10368,8 +10914,8 @@ function objectToString(o) {
return Object.prototype.toString.call(o);
}
-}).call(this,{"isBuffer":require("../../is-buffer/index.js")})
-},{"../../is-buffer/index.js":57}],45:[function(require,module,exports){
+}).call(this,{"isBuffer":require("../../insert-module-globals/node_modules/is-buffer/index.js")})
+},{"../../insert-module-globals/node_modules/is-buffer/index.js":57}],45:[function(require,module,exports){
(function (process){
"use strict";
@@ -10553,7 +11099,7 @@ formatters.j = function (v) {
}).call(this,require('_process'))
-},{"./common":46,"_process":69}],46:[function(require,module,exports){
+},{"./common":46,"_process":67}],46:[function(require,module,exports){
"use strict";
/**
@@ -10804,7 +11350,7 @@ function setup(env) {
module.exports = setup;
-},{"ms":60}],47:[function(require,module,exports){
+},{"ms":58}],47:[function(require,module,exports){
'use strict';
var keys = require('object-keys');
@@ -10864,10 +11410,10 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
module.exports = defineProperties;
-},{"object-keys":62}],48:[function(require,module,exports){
+},{"object-keys":60}],48:[function(require,module,exports){
/*!
- diff v3.5.0
+ diff v4.0.1
Software License Agreement (BSD License)
@@ -10902,1812 +11448,1555 @@ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@license
*/
-(function webpackUniversalModuleDefinition(root, factory) {
- if(typeof exports === 'object' && typeof module === 'object')
- module.exports = factory();
- else if(false)
- define([], factory);
- else if(typeof exports === 'object')
- exports["JsDiff"] = factory();
- else
- root["JsDiff"] = factory();
-})(this, function() {
-return /******/ (function(modules) { // webpackBootstrap
-/******/ // The module cache
-/******/ var installedModules = {};
+(function (global, factory) {
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+ false ? define(['exports'], factory) :
+ (global = global || self, factory(global.Diff = {}));
+}(this, function (exports) { 'use strict';
+
+ function Diff() {}
+ Diff.prototype = {
+ diff: function diff(oldString, newString) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+ var callback = options.callback;
+
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ }
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
+ this.options = options;
+ var self = this;
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId])
-/******/ return installedModules[moduleId].exports;
+ function done(value) {
+ if (callback) {
+ setTimeout(function () {
+ callback(undefined, value);
+ }, 0);
+ return true;
+ } else {
+ return value;
+ }
+ } // Allow subclasses to massage the input prior to running
+
+
+ oldString = this.castInput(oldString);
+ newString = this.castInput(newString);
+ oldString = this.removeEmpty(this.tokenize(oldString));
+ newString = this.removeEmpty(this.tokenize(newString));
+ var newLen = newString.length,
+ oldLen = oldString.length;
+ var editLength = 1;
+ var maxEditLength = newLen + oldLen;
+ var bestPath = [{
+ newPos: -1,
+ components: []
+ }]; // Seed editLength = 0, i.e. the content starts with the same values
+
+ var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
+
+ if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
+ // Identity per the equality and tokenizer
+ return done([{
+ value: this.join(newString),
+ count: newString.length
+ }]);
+ } // Main worker method. checks all permutations of a given edit length for acceptance.
+
+
+ function execEditLength() {
+ for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
+ var basePath = void 0;
+
+ var addPath = bestPath[diagonalPath - 1],
+ removePath = bestPath[diagonalPath + 1],
+ _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
+
+ if (addPath) {
+ // No one else is going to attempt to use this value, clear it
+ bestPath[diagonalPath - 1] = undefined;
+ }
+
+ var canAdd = addPath && addPath.newPos + 1 < newLen,
+ canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ exports: {},
-/******/ id: moduleId,
-/******/ loaded: false
-/******/ };
-
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+ if (!canAdd && !canRemove) {
+ // If this path is a terminal then prune
+ bestPath[diagonalPath] = undefined;
+ continue;
+ } // Select the diagonal that we want to branch from. We select the prior
+ // path whose position in the new string is the farthest from the origin
+ // and does not pass the bounds of the diff graph
-/******/ // Flag the module as loaded
-/******/ module.loaded = true;
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
+ if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
+ basePath = clonePath(removePath);
+ self.pushComponent(basePath.components, undefined, true);
+ } else {
+ basePath = addPath; // No need to clone, we've pulled it from the list
+ basePath.newPos++;
+ self.pushComponent(basePath.components, true, undefined);
+ }
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
+ _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath); // If we have hit the end of both strings, then we are done
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
+ if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
+ return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
+ } else {
+ // Otherwise track this path as a potential candidate and continue.
+ bestPath[diagonalPath] = basePath;
+ }
+ }
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
+ editLength++;
+ } // Performs the length of edit iteration. Is a bit fugly as this has to support the
+ // sync and async mode which is never fun. Loops over execEditLength until a value
+ // is produced.
-/******/ // Load entry module and return exports
-/******/ return __webpack_require__(0);
-/******/ })
-/************************************************************************/
-/******/ ([
-/* 0 */
-/***/ (function(module, exports, __webpack_require__) {
- /*istanbul ignore start*/'use strict';
+ if (callback) {
+ (function exec() {
+ setTimeout(function () {
+ // This should not happen, but we want to be safe.
- exports.__esModule = true;
- exports.canonicalize = exports.convertChangesToXML = exports.convertChangesToDMP = exports.merge = exports.parsePatch = exports.applyPatches = exports.applyPatch = exports.createPatch = exports.createTwoFilesPatch = exports.structuredPatch = exports.diffArrays = exports.diffJson = exports.diffCss = exports.diffSentences = exports.diffTrimmedLines = exports.diffLines = exports.diffWordsWithSpace = exports.diffWords = exports.diffChars = exports.Diff = undefined;
+ /* istanbul ignore next */
+ if (editLength > maxEditLength) {
+ return callback();
+ }
- /*istanbul ignore end*/var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ if (!execEditLength()) {
+ exec();
+ }
+ }, 0);
+ })();
+ } else {
+ while (editLength <= maxEditLength) {
+ var ret = execEditLength();
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
-
- /*istanbul ignore end*/var /*istanbul ignore start*/_character = __webpack_require__(2) /*istanbul ignore end*/;
+ if (ret) {
+ return ret;
+ }
+ }
+ }
+ },
+ pushComponent: function pushComponent(components, added, removed) {
+ var last = components[components.length - 1];
+
+ if (last && last.added === added && last.removed === removed) {
+ // We need to clone here as the component clone operation is just
+ // as shallow array clone
+ components[components.length - 1] = {
+ count: last.count + 1,
+ added: added,
+ removed: removed
+ };
+ } else {
+ components.push({
+ count: 1,
+ added: added,
+ removed: removed
+ });
+ }
+ },
+ extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
+ var newLen = newString.length,
+ oldLen = oldString.length,
+ newPos = basePath.newPos,
+ oldPos = newPos - diagonalPath,
+ commonCount = 0;
+
+ while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
+ newPos++;
+ oldPos++;
+ commonCount++;
+ }
- var /*istanbul ignore start*/_word = __webpack_require__(3) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/;
+ if (commonCount) {
+ basePath.components.push({
+ count: commonCount
+ });
+ }
- var /*istanbul ignore start*/_sentence = __webpack_require__(6) /*istanbul ignore end*/;
+ basePath.newPos = newPos;
+ return oldPos;
+ },
+ equals: function equals(left, right) {
+ if (this.options.comparator) {
+ return this.options.comparator(left, right);
+ } else {
+ return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
+ }
+ },
+ removeEmpty: function removeEmpty(array) {
+ var ret = [];
- var /*istanbul ignore start*/_css = __webpack_require__(7) /*istanbul ignore end*/;
+ for (var i = 0; i < array.length; i++) {
+ if (array[i]) {
+ ret.push(array[i]);
+ }
+ }
- var /*istanbul ignore start*/_json = __webpack_require__(8) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_array = __webpack_require__(9) /*istanbul ignore end*/;
+ return ret;
+ },
+ castInput: function castInput(value) {
+ return value;
+ },
+ tokenize: function tokenize(value) {
+ return value.split('');
+ },
+ join: function join(chars) {
+ return chars.join('');
+ }
+ };
- var /*istanbul ignore start*/_apply = __webpack_require__(10) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_merge = __webpack_require__(13) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_create = __webpack_require__(14) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_dmp = __webpack_require__(16) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_xml = __webpack_require__(17) /*istanbul ignore end*/;
-
- /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- /* See LICENSE file for terms of use */
-
- /*
- * Text diff implementation.
- *
- * This library supports the following APIS:
- * JsDiff.diffChars: Character by character diff
- * JsDiff.diffWords: Word (as defined by \b regex) diff which ignores whitespace
- * JsDiff.diffLines: Line based diff
- *
- * JsDiff.diffCss: Diff targeted at CSS content
- *
- * These methods are based on the implementation proposed in
- * "An O(ND) Difference Algorithm and its Variations" (Myers, 1986).
- * http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.4.6927
- */
- exports. /*istanbul ignore end*/Diff = _base2['default'];
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffChars = _character.diffChars;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWords = _word.diffWords;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = _word.diffWordsWithSpace;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffLines = _line.diffLines;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = _line.diffTrimmedLines;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffSentences = _sentence.diffSentences;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffCss = _css.diffCss;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffJson = _json.diffJson;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffArrays = _array.diffArrays;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/structuredPatch = _create.structuredPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = _create.createTwoFilesPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = _create.createPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatch = _apply.applyPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = _apply.applyPatches;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/parsePatch = _parse.parsePatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/merge = _merge.merge;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToDMP = _dmp.convertChangesToDMP;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/convertChangesToXML = _xml.convertChangesToXML;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = _json.canonicalize;
-
-
-
-/***/ }),
-/* 1 */
-/***/ (function(module, exports) {
-
- /*istanbul ignore start*/'use strict';
-
- exports.__esModule = true;
- exports['default'] = /*istanbul ignore end*/Diff;
- function Diff() {}
-
- Diff.prototype = {
- /*istanbul ignore start*/ /*istanbul ignore end*/diff: function diff(oldString, newString) {
- /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
- var callback = options.callback;
- if (typeof options === 'function') {
- callback = options;
- options = {};
- }
- this.options = options;
-
- var self = this;
-
- function done(value) {
- if (callback) {
- setTimeout(function () {
- callback(undefined, value);
- }, 0);
- return true;
- } else {
- return value;
- }
- }
-
- // Allow subclasses to massage the input prior to running
- oldString = this.castInput(oldString);
- newString = this.castInput(newString);
-
- oldString = this.removeEmpty(this.tokenize(oldString));
- newString = this.removeEmpty(this.tokenize(newString));
-
- var newLen = newString.length,
- oldLen = oldString.length;
- var editLength = 1;
- var maxEditLength = newLen + oldLen;
- var bestPath = [{ newPos: -1, components: [] }];
-
- // Seed editLength = 0, i.e. the content starts with the same values
- var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0);
- if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) {
- // Identity per the equality and tokenizer
- return done([{ value: this.join(newString), count: newString.length }]);
- }
-
- // Main worker method. checks all permutations of a given edit length for acceptance.
- function execEditLength() {
- for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) {
- var basePath = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
- var addPath = bestPath[diagonalPath - 1],
- removePath = bestPath[diagonalPath + 1],
- _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath;
- if (addPath) {
- // No one else is going to attempt to use this value, clear it
- bestPath[diagonalPath - 1] = undefined;
- }
-
- var canAdd = addPath && addPath.newPos + 1 < newLen,
- canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen;
- if (!canAdd && !canRemove) {
- // If this path is a terminal then prune
- bestPath[diagonalPath] = undefined;
- continue;
- }
-
- // Select the diagonal that we want to branch from. We select the prior
- // path whose position in the new string is the farthest from the origin
- // and does not pass the bounds of the diff graph
- if (!canAdd || canRemove && addPath.newPos < removePath.newPos) {
- basePath = clonePath(removePath);
- self.pushComponent(basePath.components, undefined, true);
- } else {
- basePath = addPath; // No need to clone, we've pulled it from the list
- basePath.newPos++;
- self.pushComponent(basePath.components, true, undefined);
- }
-
- _oldPos = self.extractCommon(basePath, newString, oldString, diagonalPath);
-
- // If we have hit the end of both strings, then we are done
- if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) {
- return done(buildValues(self, basePath.components, newString, oldString, self.useLongestToken));
- } else {
- // Otherwise track this path as a potential candidate and continue.
- bestPath[diagonalPath] = basePath;
- }
- }
-
- editLength++;
- }
-
- // Performs the length of edit iteration. Is a bit fugly as this has to support the
- // sync and async mode which is never fun. Loops over execEditLength until a value
- // is produced.
- if (callback) {
- (function exec() {
- setTimeout(function () {
- // This should not happen, but we want to be safe.
- /* istanbul ignore next */
- if (editLength > maxEditLength) {
- return callback();
- }
-
- if (!execEditLength()) {
- exec();
- }
- }, 0);
- })();
- } else {
- while (editLength <= maxEditLength) {
- var ret = execEditLength();
- if (ret) {
- return ret;
- }
- }
- }
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/pushComponent: function pushComponent(components, added, removed) {
- var last = components[components.length - 1];
- if (last && last.added === added && last.removed === removed) {
- // We need to clone here as the component clone operation is just
- // as shallow array clone
- components[components.length - 1] = { count: last.count + 1, added: added, removed: removed };
- } else {
- components.push({ count: 1, added: added, removed: removed });
- }
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) {
- var newLen = newString.length,
- oldLen = oldString.length,
- newPos = basePath.newPos,
- oldPos = newPos - diagonalPath,
- commonCount = 0;
- while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) {
- newPos++;
- oldPos++;
- commonCount++;
- }
-
- if (commonCount) {
- basePath.components.push({ count: commonCount });
- }
-
- basePath.newPos = newPos;
- return oldPos;
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/equals: function equals(left, right) {
- if (this.options.comparator) {
- return this.options.comparator(left, right);
- } else {
- return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase();
- }
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/removeEmpty: function removeEmpty(array) {
- var ret = [];
- for (var i = 0; i < array.length; i++) {
- if (array[i]) {
- ret.push(array[i]);
- }
- }
- return ret;
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/castInput: function castInput(value) {
- return value;
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/tokenize: function tokenize(value) {
- return value.split('');
- },
- /*istanbul ignore start*/ /*istanbul ignore end*/join: function join(chars) {
- return chars.join('');
- }
- };
+ function buildValues(diff, components, newString, oldString, useLongestToken) {
+ var componentPos = 0,
+ componentLen = components.length,
+ newPos = 0,
+ oldPos = 0;
+
+ for (; componentPos < componentLen; componentPos++) {
+ var component = components[componentPos];
+
+ if (!component.removed) {
+ if (!component.added && useLongestToken) {
+ var value = newString.slice(newPos, newPos + component.count);
+ value = value.map(function (value, i) {
+ var oldValue = oldString[oldPos + i];
+ return oldValue.length > value.length ? oldValue : value;
+ });
+ component.value = diff.join(value);
+ } else {
+ component.value = diff.join(newString.slice(newPos, newPos + component.count));
+ }
- function buildValues(diff, components, newString, oldString, useLongestToken) {
- var componentPos = 0,
- componentLen = components.length,
- newPos = 0,
- oldPos = 0;
-
- for (; componentPos < componentLen; componentPos++) {
- var component = components[componentPos];
- if (!component.removed) {
- if (!component.added && useLongestToken) {
- var value = newString.slice(newPos, newPos + component.count);
- value = value.map(function (value, i) {
- var oldValue = oldString[oldPos + i];
- return oldValue.length > value.length ? oldValue : value;
- });
-
- component.value = diff.join(value);
- } else {
- component.value = diff.join(newString.slice(newPos, newPos + component.count));
- }
- newPos += component.count;
-
- // Common case
- if (!component.added) {
- oldPos += component.count;
- }
- } else {
- component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
- oldPos += component.count;
-
- // Reverse add and remove so removes are output first to match common convention
- // The diffing algorithm is tied to add then remove output and this is the simplest
- // route to get the desired output with minimal overhead.
- if (componentPos && components[componentPos - 1].added) {
- var tmp = components[componentPos - 1];
- components[componentPos - 1] = components[componentPos];
- components[componentPos] = tmp;
- }
- }
- }
-
- // Special case handle for when one terminal is ignored (i.e. whitespace).
- // For this case we merge the terminal into the prior string and drop the change.
- // This is only available for string mode.
- var lastComponent = components[componentLen - 1];
- if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
- components[componentLen - 2].value += lastComponent.value;
- components.pop();
- }
-
- return components;
- }
+ newPos += component.count; // Common case
- function clonePath(path) {
- return { newPos: path.newPos, components: path.components.slice(0) };
- }
+ if (!component.added) {
+ oldPos += component.count;
+ }
+ } else {
+ component.value = diff.join(oldString.slice(oldPos, oldPos + component.count));
+ oldPos += component.count; // Reverse add and remove so removes are output first to match common convention
+ // The diffing algorithm is tied to add then remove output and this is the simplest
+ // route to get the desired output with minimal overhead.
+
+ if (componentPos && components[componentPos - 1].added) {
+ var tmp = components[componentPos - 1];
+ components[componentPos - 1] = components[componentPos];
+ components[componentPos] = tmp;
+ }
+ }
+ } // Special case handle for when one terminal is ignored (i.e. whitespace).
+ // For this case we merge the terminal into the prior string and drop the change.
+ // This is only available for string mode.
+ var lastComponent = components[componentLen - 1];
-/***/ }),
-/* 2 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (componentLen > 1 && typeof lastComponent.value === 'string' && (lastComponent.added || lastComponent.removed) && diff.equals('', lastComponent.value)) {
+ components[componentLen - 2].value += lastComponent.value;
+ components.pop();
+ }
- /*istanbul ignore start*/'use strict';
+ return components;
+ }
- exports.__esModule = true;
- exports.characterDiff = undefined;
- exports. /*istanbul ignore end*/diffChars = diffChars;
+ function clonePath(path) {
+ return {
+ newPos: path.newPos,
+ components: path.components.slice(0)
+ };
+ }
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ var characterDiff = new Diff();
+ function diffChars(oldStr, newStr, options) {
+ return characterDiff.diff(oldStr, newStr, options);
+ }
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ function generateOptions(options, defaults) {
+ if (typeof options === 'function') {
+ defaults.callback = options;
+ } else if (options) {
+ for (var name in options) {
+ /* istanbul ignore else */
+ if (options.hasOwnProperty(name)) {
+ defaults[name] = options[name];
+ }
+ }
+ }
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ return defaults;
+ }
- /*istanbul ignore end*/var characterDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/characterDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- function diffChars(oldStr, newStr, options) {
- return characterDiff.diff(oldStr, newStr, options);
- }
+ //
+ // Ranges and exceptions:
+ // Latin-1 Supplement, 0080–00FF
+ // - U+00D7 × Multiplication sign
+ // - U+00F7 ÷ Division sign
+ // Latin Extended-A, 0100–017F
+ // Latin Extended-B, 0180–024F
+ // IPA Extensions, 0250–02AF
+ // Spacing Modifier Letters, 02B0–02FF
+ // - U+02C7 ˇ ˇ Caron
+ // - U+02D8 ˘ ˘ Breve
+ // - U+02D9 ˙ ˙ Dot Above
+ // - U+02DA ˚ ˚ Ring Above
+ // - U+02DB ˛ ˛ Ogonek
+ // - U+02DC ˜ ˜ Small Tilde
+ // - U+02DD ˝ ˝ Double Acute Accent
+ // Latin Extended Additional, 1E00–1EFF
+
+ var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
+ var reWhitespace = /\S/;
+ var wordDiff = new Diff();
+
+ wordDiff.equals = function (left, right) {
+ if (this.options.ignoreCase) {
+ left = left.toLowerCase();
+ right = right.toLowerCase();
+ }
+
+ return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
+ };
+ wordDiff.tokenize = function (value) {
+ var tokens = value.split(/(\s+|[()[\]{}'"]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
+ for (var i = 0; i < tokens.length - 1; i++) {
+ // If we have an empty string in the next field and we have only word chars before and after, merge
+ if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
+ tokens[i] += tokens[i + 2];
+ tokens.splice(i + 1, 2);
+ i--;
+ }
+ }
-/***/ }),
-/* 3 */
-/***/ (function(module, exports, __webpack_require__) {
+ return tokens;
+ };
- /*istanbul ignore start*/'use strict';
+ function diffWords(oldStr, newStr, options) {
+ options = generateOptions(options, {
+ ignoreWhitespace: true
+ });
+ return wordDiff.diff(oldStr, newStr, options);
+ }
+ function diffWordsWithSpace(oldStr, newStr, options) {
+ return wordDiff.diff(oldStr, newStr, options);
+ }
- exports.__esModule = true;
- exports.wordDiff = undefined;
- exports. /*istanbul ignore end*/diffWords = diffWords;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffWordsWithSpace = diffWordsWithSpace;
+ var lineDiff = new Diff();
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ lineDiff.tokenize = function (value) {
+ var retLines = [],
+ linesAndNewlines = value.split(/(\n|\r\n)/); // Ignore the final empty token that occurs if the string ends with a new line
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ if (!linesAndNewlines[linesAndNewlines.length - 1]) {
+ linesAndNewlines.pop();
+ } // Merge the content and line separators into single tokens
- /*istanbul ignore end*/var /*istanbul ignore start*/_params = __webpack_require__(4) /*istanbul ignore end*/;
- /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ for (var i = 0; i < linesAndNewlines.length; i++) {
+ var line = linesAndNewlines[i];
- /*istanbul ignore end*/ // Based on https://en.wikipedia.org/wiki/Latin_script_in_Unicode
- //
- // Ranges and exceptions:
- // Latin-1 Supplement, 0080–00FF
- // - U+00D7 × Multiplication sign
- // - U+00F7 ÷ Division sign
- // Latin Extended-A, 0100–017F
- // Latin Extended-B, 0180–024F
- // IPA Extensions, 0250–02AF
- // Spacing Modifier Letters, 02B0–02FF
- // - U+02C7 ˇ ˇ Caron
- // - U+02D8 ˘ ˘ Breve
- // - U+02D9 ˙ ˙ Dot Above
- // - U+02DA ˚ ˚ Ring Above
- // - U+02DB ˛ ˛ Ogonek
- // - U+02DC ˜ ˜ Small Tilde
- // - U+02DD ˝ ˝ Double Acute Accent
- // Latin Extended Additional, 1E00–1EFF
- var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/;
+ if (i % 2 && !this.options.newlineIsToken) {
+ retLines[retLines.length - 1] += line;
+ } else {
+ if (this.options.ignoreWhitespace) {
+ line = line.trim();
+ }
- var reWhitespace = /\S/;
+ retLines.push(line);
+ }
+ }
- var wordDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/wordDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- wordDiff.equals = function (left, right) {
- if (this.options.ignoreCase) {
- left = left.toLowerCase();
- right = right.toLowerCase();
- }
- return left === right || this.options.ignoreWhitespace && !reWhitespace.test(left) && !reWhitespace.test(right);
- };
- wordDiff.tokenize = function (value) {
- var tokens = value.split(/(\s+|\b)/);
-
- // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
- for (var i = 0; i < tokens.length - 1; i++) {
- // If we have an empty string in the next field and we have only word chars before and after, merge
- if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars.test(tokens[i]) && extendedWordChars.test(tokens[i + 2])) {
- tokens[i] += tokens[i + 2];
- tokens.splice(i + 1, 2);
- i--;
- }
- }
-
- return tokens;
- };
+ return retLines;
+ };
- function diffWords(oldStr, newStr, options) {
- options = /*istanbul ignore start*/(0, _params.generateOptions) /*istanbul ignore end*/(options, { ignoreWhitespace: true });
- return wordDiff.diff(oldStr, newStr, options);
- }
+ function diffLines(oldStr, newStr, callback) {
+ return lineDiff.diff(oldStr, newStr, callback);
+ }
+ function diffTrimmedLines(oldStr, newStr, callback) {
+ var options = generateOptions(callback, {
+ ignoreWhitespace: true
+ });
+ return lineDiff.diff(oldStr, newStr, options);
+ }
- function diffWordsWithSpace(oldStr, newStr, options) {
- return wordDiff.diff(oldStr, newStr, options);
- }
+ var sentenceDiff = new Diff();
+ sentenceDiff.tokenize = function (value) {
+ return value.split(/(\S.+?[.!?])(?=\s+|$)/);
+ };
+ function diffSentences(oldStr, newStr, callback) {
+ return sentenceDiff.diff(oldStr, newStr, callback);
+ }
-/***/ }),
-/* 4 */
-/***/ (function(module, exports) {
+ var cssDiff = new Diff();
- /*istanbul ignore start*/'use strict';
+ cssDiff.tokenize = function (value) {
+ return value.split(/([{}:;,]|\s+)/);
+ };
- exports.__esModule = true;
- exports. /*istanbul ignore end*/generateOptions = generateOptions;
- function generateOptions(options, defaults) {
- if (typeof options === 'function') {
- defaults.callback = options;
- } else if (options) {
- for (var name in options) {
- /* istanbul ignore else */
- if (options.hasOwnProperty(name)) {
- defaults[name] = options[name];
- }
- }
- }
- return defaults;
- }
+ function diffCss(oldStr, newStr, callback) {
+ return cssDiff.diff(oldStr, newStr, callback);
+ }
+ function _typeof(obj) {
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+ _typeof = function (obj) {
+ return typeof obj;
+ };
+ } else {
+ _typeof = function (obj) {
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+ };
+ }
+ return _typeof(obj);
+ }
-/***/ }),
-/* 5 */
-/***/ (function(module, exports, __webpack_require__) {
+ function _toConsumableArray(arr) {
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
+ }
- /*istanbul ignore start*/'use strict';
+ function _arrayWithoutHoles(arr) {
+ if (Array.isArray(arr)) {
+ for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
- exports.__esModule = true;
- exports.lineDiff = undefined;
- exports. /*istanbul ignore end*/diffLines = diffLines;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/diffTrimmedLines = diffTrimmedLines;
+ return arr2;
+ }
+ }
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ function _iterableToArray(iter) {
+ if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
+ }
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ function _nonIterableSpread() {
+ throw new TypeError("Invalid attempt to spread non-iterable instance");
+ }
- /*istanbul ignore end*/var /*istanbul ignore start*/_params = __webpack_require__(4) /*istanbul ignore end*/;
+ var objectPrototypeToString = Object.prototype.toString;
+ var jsonDiff = new Diff(); // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
+ // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
- /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ jsonDiff.useLongestToken = true;
+ jsonDiff.tokenize = lineDiff.tokenize;
- /*istanbul ignore end*/var lineDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/lineDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- lineDiff.tokenize = function (value) {
- var retLines = [],
- linesAndNewlines = value.split(/(\n|\r\n)/);
+ jsonDiff.castInput = function (value) {
+ var _this$options = this.options,
+ undefinedReplacement = _this$options.undefinedReplacement,
+ _this$options$stringi = _this$options.stringifyReplacer,
+ stringifyReplacer = _this$options$stringi === void 0 ? function (k, v) {
+ return typeof v === 'undefined' ? undefinedReplacement : v;
+ } : _this$options$stringi;
+ return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
+ };
- // Ignore the final empty token that occurs if the string ends with a new line
- if (!linesAndNewlines[linesAndNewlines.length - 1]) {
- linesAndNewlines.pop();
- }
+ jsonDiff.equals = function (left, right) {
+ return Diff.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'));
+ };
- // Merge the content and line separators into single tokens
- for (var i = 0; i < linesAndNewlines.length; i++) {
- var line = linesAndNewlines[i];
+ function diffJson(oldObj, newObj, options) {
+ return jsonDiff.diff(oldObj, newObj, options);
+ } // This function handles the presence of circular references by bailing out when encountering an
+ // object that is already on the "stack" of items being processed. Accepts an optional replacer
- if (i % 2 && !this.options.newlineIsToken) {
- retLines[retLines.length - 1] += line;
- } else {
- if (this.options.ignoreWhitespace) {
- line = line.trim();
- }
- retLines.push(line);
- }
- }
+ function canonicalize(obj, stack, replacementStack, replacer, key) {
+ stack = stack || [];
+ replacementStack = replacementStack || [];
- return retLines;
- };
+ if (replacer) {
+ obj = replacer(key, obj);
+ }
- function diffLines(oldStr, newStr, callback) {
- return lineDiff.diff(oldStr, newStr, callback);
- }
- function diffTrimmedLines(oldStr, newStr, callback) {
- var options = /*istanbul ignore start*/(0, _params.generateOptions) /*istanbul ignore end*/(callback, { ignoreWhitespace: true });
- return lineDiff.diff(oldStr, newStr, options);
- }
+ var i;
+ for (i = 0; i < stack.length; i += 1) {
+ if (stack[i] === obj) {
+ return replacementStack[i];
+ }
+ }
+ var canonicalizedObj;
-/***/ }),
-/* 6 */
-/***/ (function(module, exports, __webpack_require__) {
+ if ('[object Array]' === objectPrototypeToString.call(obj)) {
+ stack.push(obj);
+ canonicalizedObj = new Array(obj.length);
+ replacementStack.push(canonicalizedObj);
- /*istanbul ignore start*/'use strict';
+ for (i = 0; i < obj.length; i += 1) {
+ canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
+ }
- exports.__esModule = true;
- exports.sentenceDiff = undefined;
- exports. /*istanbul ignore end*/diffSentences = diffSentences;
+ stack.pop();
+ replacementStack.pop();
+ return canonicalizedObj;
+ }
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ if (obj && obj.toJSON) {
+ obj = obj.toJSON();
+ }
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ if (_typeof(obj) === 'object' && obj !== null) {
+ stack.push(obj);
+ canonicalizedObj = {};
+ replacementStack.push(canonicalizedObj);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var sortedKeys = [],
+ _key;
- /*istanbul ignore end*/var sentenceDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/sentenceDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- sentenceDiff.tokenize = function (value) {
- return value.split(/(\S.+?[.!?])(?=\s+|$)/);
- };
+ for (_key in obj) {
+ /* istanbul ignore else */
+ if (obj.hasOwnProperty(_key)) {
+ sortedKeys.push(_key);
+ }
+ }
- function diffSentences(oldStr, newStr, callback) {
- return sentenceDiff.diff(oldStr, newStr, callback);
- }
+ sortedKeys.sort();
+
+ for (i = 0; i < sortedKeys.length; i += 1) {
+ _key = sortedKeys[i];
+ canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
+ }
+
+ stack.pop();
+ replacementStack.pop();
+ } else {
+ canonicalizedObj = obj;
+ }
+
+ return canonicalizedObj;
+ }
+
+ var arrayDiff = new Diff();
+
+ arrayDiff.tokenize = function (value) {
+ return value.slice();
+ };
+
+ arrayDiff.join = arrayDiff.removeEmpty = function (value) {
+ return value;
+ };
+
+ function diffArrays(oldArr, newArr, callback) {
+ return arrayDiff.diff(oldArr, newArr, callback);
+ }
+
+ function parsePatch(uniDiff) {
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+ var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
+ delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+ list = [],
+ i = 0;
+
+ function parseIndex() {
+ var index = {};
+ list.push(index); // Parse diff metadata
+
+ while (i < diffstr.length) {
+ var line = diffstr[i]; // File header found, end parsing diff metadata
+
+ if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
+ break;
+ } // Diff index
+
+
+ var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
+
+ if (header) {
+ index.index = header[1];
+ }
+
+ i++;
+ } // Parse file headers if they are defined. Unified diff requires them, but
+ // there's no technical issues to have an isolated hunk without file header
+
+
+ parseFileHeader(index);
+ parseFileHeader(index); // Parse hunks
+
+ index.hunks = [];
+
+ while (i < diffstr.length) {
+ var _line = diffstr[i];
+
+ if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
+ break;
+ } else if (/^@@/.test(_line)) {
+ index.hunks.push(parseHunk());
+ } else if (_line && options.strict) {
+ // Ignore unexpected content unless in strict mode
+ throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
+ } else {
+ i++;
+ }
+ }
+ } // Parses the --- and +++ headers, if none are found, no lines
+ // are consumed.
+
+
+ function parseFileHeader(index) {
+ var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
+
+ if (fileHeader) {
+ var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
+ var data = fileHeader[2].split('\t', 2);
+ var fileName = data[0].replace(/\\\\/g, '\\');
+
+ if (/^".*"$/.test(fileName)) {
+ fileName = fileName.substr(1, fileName.length - 2);
+ }
+
+ index[keyPrefix + 'FileName'] = fileName;
+ index[keyPrefix + 'Header'] = (data[1] || '').trim();
+ i++;
+ }
+ } // Parses a hunk
+ // This assumes that we are at the start of a hunk.
+
+
+ function parseHunk() {
+ var chunkHeaderIndex = i,
+ chunkHeaderLine = diffstr[i++],
+ chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
+ var hunk = {
+ oldStart: +chunkHeader[1],
+ oldLines: +chunkHeader[2] || 1,
+ newStart: +chunkHeader[3],
+ newLines: +chunkHeader[4] || 1,
+ lines: [],
+ linedelimiters: []
+ };
+ var addCount = 0,
+ removeCount = 0;
+
+ for (; i < diffstr.length; i++) {
+ // Lines starting with '---' could be mistaken for the "remove line" operation
+ // But they could be the header for the next file. Therefore prune such cases out.
+ if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
+ break;
+ }
+
+ var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
+
+ if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
+ hunk.lines.push(diffstr[i]);
+ hunk.linedelimiters.push(delimiters[i] || '\n');
+
+ if (operation === '+') {
+ addCount++;
+ } else if (operation === '-') {
+ removeCount++;
+ } else if (operation === ' ') {
+ addCount++;
+ removeCount++;
+ }
+ } else {
+ break;
+ }
+ } // Handle the empty block count case
+
+
+ if (!addCount && hunk.newLines === 1) {
+ hunk.newLines = 0;
+ }
+
+ if (!removeCount && hunk.oldLines === 1) {
+ hunk.oldLines = 0;
+ } // Perform optional sanity checking
+
+
+ if (options.strict) {
+ if (addCount !== hunk.newLines) {
+ throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+ }
+
+ if (removeCount !== hunk.oldLines) {
+ throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
+ }
+ }
+
+ return hunk;
+ }
+
+ while (i < diffstr.length) {
+ parseIndex();
+ }
+
+ return list;
+ }
+
+ // Iterator that traverses in the range of [min, max], stepping
+ // by distance from a given start position. I.e. for [0, 4], with
+ // start of 2, this will iterate 2, 3, 1, 4, 0.
+ function distanceIterator (start, minLine, maxLine) {
+ var wantForward = true,
+ backwardExhausted = false,
+ forwardExhausted = false,
+ localOffset = 1;
+ return function iterator() {
+ if (wantForward && !forwardExhausted) {
+ if (backwardExhausted) {
+ localOffset++;
+ } else {
+ wantForward = false;
+ } // Check if trying to fit beyond text length, and if not, check it fits
+ // after offset location (or desired location on first iteration)
+
+
+ if (start + localOffset <= maxLine) {
+ return localOffset;
+ }
+
+ forwardExhausted = true;
+ }
+ if (!backwardExhausted) {
+ if (!forwardExhausted) {
+ wantForward = true;
+ } // Check if trying to fit before text beginning, and if not, check it fits
+ // before offset location
-/***/ }),
-/* 7 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (minLine <= start - localOffset) {
+ return -localOffset++;
+ }
+
+ backwardExhausted = true;
+ return iterator();
+ } // We tried to fit hunk before text beginning and beyond text length, then
+ // hunk can't fit on the text. Return undefined
+
+ };
+ }
+
+ function applyPatch(source, uniDiff) {
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+
+ if (typeof uniDiff === 'string') {
+ uniDiff = parsePatch(uniDiff);
+ }
+
+ if (Array.isArray(uniDiff)) {
+ if (uniDiff.length > 1) {
+ throw new Error('applyPatch only works with a single input.');
+ }
+
+ uniDiff = uniDiff[0];
+ } // Apply the diff to the input
+
+
+ var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
+ delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
+ hunks = uniDiff.hunks,
+ compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) {
+ return line === patchContent;
+ },
+ errorCount = 0,
+ fuzzFactor = options.fuzzFactor || 0,
+ minLine = 0,
+ offset = 0,
+ removeEOFNL,
+ addEOFNL;
+ /**
+ * Checks if the hunk exactly fits on the provided location
+ */
+
+
+ function hunkFits(hunk, toPos) {
+ for (var j = 0; j < hunk.lines.length; j++) {
+ var line = hunk.lines[j],
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line;
+
+ if (operation === ' ' || operation === '-') {
+ // Context sanity check
+ if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
+ errorCount++;
+
+ if (errorCount > fuzzFactor) {
+ return false;
+ }
+ }
+
+ toPos++;
+ }
+ }
+
+ return true;
+ } // Search best fit offsets for each hunk based on the previous ones
+
+
+ for (var i = 0; i < hunks.length; i++) {
+ var hunk = hunks[i],
+ maxLine = lines.length - hunk.oldLines,
+ localOffset = 0,
+ toPos = offset + hunk.oldStart - 1;
+ var iterator = distanceIterator(toPos, minLine, maxLine);
+
+ for (; localOffset !== undefined; localOffset = iterator()) {
+ if (hunkFits(hunk, toPos + localOffset)) {
+ hunk.offset = offset += localOffset;
+ break;
+ }
+ }
+
+ if (localOffset === undefined) {
+ return false;
+ } // Set lower text limit to end of the current hunk, so next ones don't try
+ // to fit over already patched text
- /*istanbul ignore start*/'use strict';
- exports.__esModule = true;
- exports.cssDiff = undefined;
- exports. /*istanbul ignore end*/diffCss = diffCss;
+ minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
+ } // Apply patch hunks
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ var diffOffset = 0;
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ for (var _i = 0; _i < hunks.length; _i++) {
+ var _hunk = hunks[_i],
+ _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
- /*istanbul ignore end*/var cssDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/cssDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- cssDiff.tokenize = function (value) {
- return value.split(/([{}:;,]|\s+)/);
- };
+ diffOffset += _hunk.newLines - _hunk.oldLines;
- function diffCss(oldStr, newStr, callback) {
- return cssDiff.diff(oldStr, newStr, callback);
- }
+ if (_toPos < 0) {
+ // Creating a new file
+ _toPos = 0;
+ }
+ for (var j = 0; j < _hunk.lines.length; j++) {
+ var line = _hunk.lines[j],
+ operation = line.length > 0 ? line[0] : ' ',
+ content = line.length > 0 ? line.substr(1) : line,
+ delimiter = _hunk.linedelimiters[j];
+
+ if (operation === ' ') {
+ _toPos++;
+ } else if (operation === '-') {
+ lines.splice(_toPos, 1);
+ delimiters.splice(_toPos, 1);
+ /* istanbul ignore else */
+ } else if (operation === '+') {
+ lines.splice(_toPos, 0, content);
+ delimiters.splice(_toPos, 0, delimiter);
+ _toPos++;
+ } else if (operation === '\\') {
+ var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
+
+ if (previousOperation === '+') {
+ removeEOFNL = true;
+ } else if (previousOperation === '-') {
+ addEOFNL = true;
+ }
+ }
+ }
+ } // Handle EOFNL insertion/removal
-/***/ }),
-/* 8 */
-/***/ (function(module, exports, __webpack_require__) {
+ if (removeEOFNL) {
+ while (!lines[lines.length - 1]) {
+ lines.pop();
+ delimiters.pop();
+ }
+ } else if (addEOFNL) {
+ lines.push('');
+ delimiters.push('\n');
+ }
- /*istanbul ignore start*/'use strict';
+ for (var _k = 0; _k < lines.length - 1; _k++) {
+ lines[_k] = lines[_k] + delimiters[_k];
+ }
- exports.__esModule = true;
- exports.jsonDiff = undefined;
+ return lines.join('');
+ } // Wrapper that supports multiple file patches via callbacks.
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+ function applyPatches(uniDiff, options) {
+ if (typeof uniDiff === 'string') {
+ uniDiff = parsePatch(uniDiff);
+ }
- exports. /*istanbul ignore end*/diffJson = diffJson;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/canonicalize = canonicalize;
+ var currentIndex = 0;
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ function processIndex() {
+ var index = uniDiff[currentIndex++];
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
+ if (!index) {
+ return options.complete();
+ }
- /*istanbul ignore end*/var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/;
+ options.loadFile(index, function (err, data) {
+ if (err) {
+ return options.complete(err);
+ }
- /*istanbul ignore start*/function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ var updatedContent = applyPatch(data, index, options);
+ options.patched(index, updatedContent, function (err) {
+ if (err) {
+ return options.complete(err);
+ }
- /*istanbul ignore end*/var objectPrototypeToString = Object.prototype.toString;
+ processIndex();
+ });
+ });
+ }
- var jsonDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/jsonDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- // Discriminate between two lines of pretty-printed, serialized JSON where one of them has a
- // dangling comma and the other doesn't. Turns out including the dangling comma yields the nicest output:
- jsonDiff.useLongestToken = true;
+ processIndex();
+ }
- jsonDiff.tokenize = /*istanbul ignore start*/_line.lineDiff /*istanbul ignore end*/.tokenize;
- jsonDiff.castInput = function (value) {
- /*istanbul ignore start*/var _options = /*istanbul ignore end*/this.options,
- undefinedReplacement = _options.undefinedReplacement,
- _options$stringifyRep = _options.stringifyReplacer,
- stringifyReplacer = _options$stringifyRep === undefined ? function (k, v) /*istanbul ignore start*/{
- return (/*istanbul ignore end*/typeof v === 'undefined' ? undefinedReplacement : v
- );
- } : _options$stringifyRep;
+ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ if (!options) {
+ options = {};
+ }
+ if (typeof options.context === 'undefined') {
+ options.context = 4;
+ }
- return typeof value === 'string' ? value : JSON.stringify(canonicalize(value, null, null, stringifyReplacer), stringifyReplacer, ' ');
- };
- jsonDiff.equals = function (left, right) {
- return (/*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/.prototype.equals.call(jsonDiff, left.replace(/,([\r\n])/g, '$1'), right.replace(/,([\r\n])/g, '$1'))
- );
- };
+ var diff = diffLines(oldStr, newStr, options);
+ diff.push({
+ value: '',
+ lines: []
+ }); // Append an empty value to make cleanup easier
- function diffJson(oldObj, newObj, options) {
- return jsonDiff.diff(oldObj, newObj, options);
- }
+ function contextLines(lines) {
+ return lines.map(function (entry) {
+ return ' ' + entry;
+ });
+ }
- // This function handles the presence of circular references by bailing out when encountering an
- // object that is already on the "stack" of items being processed. Accepts an optional replacer
- function canonicalize(obj, stack, replacementStack, replacer, key) {
- stack = stack || [];
- replacementStack = replacementStack || [];
-
- if (replacer) {
- obj = replacer(key, obj);
- }
-
- var i = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
-
- for (i = 0; i < stack.length; i += 1) {
- if (stack[i] === obj) {
- return replacementStack[i];
- }
- }
-
- var canonicalizedObj = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
-
- if ('[object Array]' === objectPrototypeToString.call(obj)) {
- stack.push(obj);
- canonicalizedObj = new Array(obj.length);
- replacementStack.push(canonicalizedObj);
- for (i = 0; i < obj.length; i += 1) {
- canonicalizedObj[i] = canonicalize(obj[i], stack, replacementStack, replacer, key);
- }
- stack.pop();
- replacementStack.pop();
- return canonicalizedObj;
- }
-
- if (obj && obj.toJSON) {
- obj = obj.toJSON();
- }
-
- if ( /*istanbul ignore start*/(typeof /*istanbul ignore end*/obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object' && obj !== null) {
- stack.push(obj);
- canonicalizedObj = {};
- replacementStack.push(canonicalizedObj);
- var sortedKeys = [],
- _key = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
- for (_key in obj) {
- /* istanbul ignore else */
- if (obj.hasOwnProperty(_key)) {
- sortedKeys.push(_key);
- }
- }
- sortedKeys.sort();
- for (i = 0; i < sortedKeys.length; i += 1) {
- _key = sortedKeys[i];
- canonicalizedObj[_key] = canonicalize(obj[_key], stack, replacementStack, replacer, _key);
- }
- stack.pop();
- replacementStack.pop();
- } else {
- canonicalizedObj = obj;
- }
- return canonicalizedObj;
- }
+ var hunks = [];
+ var oldRangeStart = 0,
+ newRangeStart = 0,
+ curRange = [],
+ oldLine = 1,
+ newLine = 1;
+ var _loop = function _loop(i) {
+ var current = diff[i],
+ lines = current.lines || current.value.replace(/\n$/, '').split('\n');
+ current.lines = lines;
+ if (current.added || current.removed) {
+ var _curRange;
-/***/ }),
-/* 9 */
-/***/ (function(module, exports, __webpack_require__) {
+ // If we have previous context, start with that
+ if (!oldRangeStart) {
+ var prev = diff[i - 1];
+ oldRangeStart = oldLine;
+ newRangeStart = newLine;
- /*istanbul ignore start*/'use strict';
+ if (prev) {
+ curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
+ oldRangeStart -= curRange.length;
+ newRangeStart -= curRange.length;
+ }
+ } // Output our changes
- exports.__esModule = true;
- exports.arrayDiff = undefined;
- exports. /*istanbul ignore end*/diffArrays = diffArrays;
- var /*istanbul ignore start*/_base = __webpack_require__(1) /*istanbul ignore end*/;
+ (_curRange = curRange).push.apply(_curRange, _toConsumableArray(lines.map(function (entry) {
+ return (current.added ? '+' : '-') + entry;
+ }))); // Track the updated file position
- /*istanbul ignore start*/var _base2 = _interopRequireDefault(_base);
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+ if (current.added) {
+ newLine += lines.length;
+ } else {
+ oldLine += lines.length;
+ }
+ } else {
+ // Identical context lines. Track line changes
+ if (oldRangeStart) {
+ // Close out any changes that have been output (or join overlapping)
+ if (lines.length <= options.context * 2 && i < diff.length - 2) {
+ var _curRange2;
+
+ // Overlapping
+ (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines)));
+ } else {
+ var _curRange3;
+
+ // end the range and output
+ var contextSize = Math.min(lines.length, options.context);
+
+ (_curRange3 = curRange).push.apply(_curRange3, _toConsumableArray(contextLines(lines.slice(0, contextSize))));
+
+ var hunk = {
+ oldStart: oldRangeStart,
+ oldLines: oldLine - oldRangeStart + contextSize,
+ newStart: newRangeStart,
+ newLines: newLine - newRangeStart + contextSize,
+ lines: curRange
+ };
+
+ if (i >= diff.length - 2 && lines.length <= options.context) {
+ // EOF is inside this hunk
+ var oldEOFNewline = /\n$/.test(oldStr);
+ var newEOFNewline = /\n$/.test(newStr);
+ var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
+
+ if (!oldEOFNewline && noNlBeforeAdds) {
+ // special case: old has no eol and no trailing context; no-nl can end up before adds
+ curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
+ }
+
+ if (!oldEOFNewline && !noNlBeforeAdds || !newEOFNewline) {
+ curRange.push('\\ No newline at end of file');
+ }
+ }
- /*istanbul ignore end*/var arrayDiff = /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayDiff = new /*istanbul ignore start*/_base2['default'] /*istanbul ignore end*/();
- arrayDiff.tokenize = function (value) {
- return value.slice();
- };
- arrayDiff.join = arrayDiff.removeEmpty = function (value) {
- return value;
- };
+ hunks.push(hunk);
+ oldRangeStart = 0;
+ newRangeStart = 0;
+ curRange = [];
+ }
+ }
- function diffArrays(oldArr, newArr, callback) {
- return arrayDiff.diff(oldArr, newArr, callback);
- }
+ oldLine += lines.length;
+ newLine += lines.length;
+ }
+ };
+ for (var i = 0; i < diff.length; i++) {
+ _loop(i);
+ }
+ return {
+ oldFileName: oldFileName,
+ newFileName: newFileName,
+ oldHeader: oldHeader,
+ newHeader: newHeader,
+ hunks: hunks
+ };
+ }
+ function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
+ var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
+ var ret = [];
-/***/ }),
-/* 10 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /*istanbul ignore start*/'use strict';
-
- exports.__esModule = true;
- exports. /*istanbul ignore end*/applyPatch = applyPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/applyPatches = applyPatches;
-
- var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/;
-
- var /*istanbul ignore start*/_distanceIterator = __webpack_require__(12) /*istanbul ignore end*/;
-
- /*istanbul ignore start*/var _distanceIterator2 = _interopRequireDefault(_distanceIterator);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- /*istanbul ignore end*/function applyPatch(source, uniDiff) {
- /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
- if (typeof uniDiff === 'string') {
- uniDiff = /*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(uniDiff);
- }
-
- if (Array.isArray(uniDiff)) {
- if (uniDiff.length > 1) {
- throw new Error('applyPatch only works with a single input.');
- }
-
- uniDiff = uniDiff[0];
- }
-
- // Apply the diff to the input
- var lines = source.split(/\r\n|[\n\v\f\r\x85]/),
- delimiters = source.match(/\r\n|[\n\v\f\r\x85]/g) || [],
- hunks = uniDiff.hunks,
- compareLine = options.compareLine || function (lineNumber, line, operation, patchContent) /*istanbul ignore start*/{
- return (/*istanbul ignore end*/line === patchContent
- );
- },
- errorCount = 0,
- fuzzFactor = options.fuzzFactor || 0,
- minLine = 0,
- offset = 0,
- removeEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/,
- addEOFNL = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
-
- /**
- * Checks if the hunk exactly fits on the provided location
- */
- function hunkFits(hunk, toPos) {
- for (var j = 0; j < hunk.lines.length; j++) {
- var line = hunk.lines[j],
- operation = line.length > 0 ? line[0] : ' ',
- content = line.length > 0 ? line.substr(1) : line;
-
- if (operation === ' ' || operation === '-') {
- // Context sanity check
- if (!compareLine(toPos + 1, lines[toPos], operation, content)) {
- errorCount++;
-
- if (errorCount > fuzzFactor) {
- return false;
- }
- }
- toPos++;
- }
- }
-
- return true;
- }
-
- // Search best fit offsets for each hunk based on the previous ones
- for (var i = 0; i < hunks.length; i++) {
- var hunk = hunks[i],
- maxLine = lines.length - hunk.oldLines,
- localOffset = 0,
- toPos = offset + hunk.oldStart - 1;
-
- var iterator = /*istanbul ignore start*/(0, _distanceIterator2['default']) /*istanbul ignore end*/(toPos, minLine, maxLine);
-
- for (; localOffset !== undefined; localOffset = iterator()) {
- if (hunkFits(hunk, toPos + localOffset)) {
- hunk.offset = offset += localOffset;
- break;
- }
- }
-
- if (localOffset === undefined) {
- return false;
- }
-
- // Set lower text limit to end of the current hunk, so next ones don't try
- // to fit over already patched text
- minLine = hunk.offset + hunk.oldStart + hunk.oldLines;
- }
-
- // Apply patch hunks
- var diffOffset = 0;
- for (var _i = 0; _i < hunks.length; _i++) {
- var _hunk = hunks[_i],
- _toPos = _hunk.oldStart + _hunk.offset + diffOffset - 1;
- diffOffset += _hunk.newLines - _hunk.oldLines;
-
- if (_toPos < 0) {
- // Creating a new file
- _toPos = 0;
- }
-
- for (var j = 0; j < _hunk.lines.length; j++) {
- var line = _hunk.lines[j],
- operation = line.length > 0 ? line[0] : ' ',
- content = line.length > 0 ? line.substr(1) : line,
- delimiter = _hunk.linedelimiters[j];
-
- if (operation === ' ') {
- _toPos++;
- } else if (operation === '-') {
- lines.splice(_toPos, 1);
- delimiters.splice(_toPos, 1);
- /* istanbul ignore else */
- } else if (operation === '+') {
- lines.splice(_toPos, 0, content);
- delimiters.splice(_toPos, 0, delimiter);
- _toPos++;
- } else if (operation === '\\') {
- var previousOperation = _hunk.lines[j - 1] ? _hunk.lines[j - 1][0] : null;
- if (previousOperation === '+') {
- removeEOFNL = true;
- } else if (previousOperation === '-') {
- addEOFNL = true;
- }
- }
- }
- }
-
- // Handle EOFNL insertion/removal
- if (removeEOFNL) {
- while (!lines[lines.length - 1]) {
- lines.pop();
- delimiters.pop();
- }
- } else if (addEOFNL) {
- lines.push('');
- delimiters.push('\n');
- }
- for (var _k = 0; _k < lines.length - 1; _k++) {
- lines[_k] = lines[_k] + delimiters[_k];
- }
- return lines.join('');
- }
+ if (oldFileName == newFileName) {
+ ret.push('Index: ' + oldFileName);
+ }
- // Wrapper that supports multiple file patches via callbacks.
- function applyPatches(uniDiff, options) {
- if (typeof uniDiff === 'string') {
- uniDiff = /*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(uniDiff);
- }
-
- var currentIndex = 0;
- function processIndex() {
- var index = uniDiff[currentIndex++];
- if (!index) {
- return options.complete();
- }
-
- options.loadFile(index, function (err, data) {
- if (err) {
- return options.complete(err);
- }
-
- var updatedContent = applyPatch(data, index, options);
- options.patched(index, updatedContent, function (err) {
- if (err) {
- return options.complete(err);
- }
-
- processIndex();
- });
- });
- }
- processIndex();
- }
+ ret.push('===================================================================');
+ ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
+ ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
+ for (var i = 0; i < diff.hunks.length; i++) {
+ var hunk = diff.hunks[i];
+ ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
+ ret.push.apply(ret, hunk.lines);
+ }
+ return ret.join('\n') + '\n';
+ }
+ function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
+ return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
+ }
-/***/ }),
-/* 11 */
-/***/ (function(module, exports) {
-
- /*istanbul ignore start*/'use strict';
-
- exports.__esModule = true;
- exports. /*istanbul ignore end*/parsePatch = parsePatch;
- function parsePatch(uniDiff) {
- /*istanbul ignore start*/var /*istanbul ignore end*/options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/),
- delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [],
- list = [],
- i = 0;
-
- function parseIndex() {
- var index = {};
- list.push(index);
-
- // Parse diff metadata
- while (i < diffstr.length) {
- var line = diffstr[i];
-
- // File header found, end parsing diff metadata
- if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
- break;
- }
-
- // Diff index
- var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
- if (header) {
- index.index = header[1];
- }
-
- i++;
- }
-
- // Parse file headers if they are defined. Unified diff requires them, but
- // there's no technical issues to have an isolated hunk without file header
- parseFileHeader(index);
- parseFileHeader(index);
-
- // Parse hunks
- index.hunks = [];
-
- while (i < diffstr.length) {
- var _line = diffstr[i];
-
- if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
- break;
- } else if (/^@@/.test(_line)) {
- index.hunks.push(parseHunk());
- } else if (_line && options.strict) {
- // Ignore unexpected content unless in strict mode
- throw new Error('Unknown line ' + (i + 1) + ' ' + JSON.stringify(_line));
- } else {
- i++;
- }
- }
- }
-
- // Parses the --- and +++ headers, if none are found, no lines
- // are consumed.
- function parseFileHeader(index) {
- var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i]);
- if (fileHeader) {
- var keyPrefix = fileHeader[1] === '---' ? 'old' : 'new';
- var data = fileHeader[2].split('\t', 2);
- var fileName = data[0].replace(/\\\\/g, '\\');
- if (/^".*"$/.test(fileName)) {
- fileName = fileName.substr(1, fileName.length - 2);
- }
- index[keyPrefix + 'FileName'] = fileName;
- index[keyPrefix + 'Header'] = (data[1] || '').trim();
-
- i++;
- }
- }
-
- // Parses a hunk
- // This assumes that we are at the start of a hunk.
- function parseHunk() {
- var chunkHeaderIndex = i,
- chunkHeaderLine = diffstr[i++],
- chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
-
- var hunk = {
- oldStart: +chunkHeader[1],
- oldLines: +chunkHeader[2] || 1,
- newStart: +chunkHeader[3],
- newLines: +chunkHeader[4] || 1,
- lines: [],
- linedelimiters: []
- };
-
- var addCount = 0,
- removeCount = 0;
- for (; i < diffstr.length; i++) {
- // Lines starting with '---' could be mistaken for the "remove line" operation
- // But they could be the header for the next file. Therefore prune such cases out.
- if (diffstr[i].indexOf('--- ') === 0 && i + 2 < diffstr.length && diffstr[i + 1].indexOf('+++ ') === 0 && diffstr[i + 2].indexOf('@@') === 0) {
- break;
- }
- var operation = diffstr[i].length == 0 && i != diffstr.length - 1 ? ' ' : diffstr[i][0];
-
- if (operation === '+' || operation === '-' || operation === ' ' || operation === '\\') {
- hunk.lines.push(diffstr[i]);
- hunk.linedelimiters.push(delimiters[i] || '\n');
-
- if (operation === '+') {
- addCount++;
- } else if (operation === '-') {
- removeCount++;
- } else if (operation === ' ') {
- addCount++;
- removeCount++;
- }
- } else {
- break;
- }
- }
-
- // Handle the empty block count case
- if (!addCount && hunk.newLines === 1) {
- hunk.newLines = 0;
- }
- if (!removeCount && hunk.oldLines === 1) {
- hunk.oldLines = 0;
- }
-
- // Perform optional sanity checking
- if (options.strict) {
- if (addCount !== hunk.newLines) {
- throw new Error('Added line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
- }
- if (removeCount !== hunk.oldLines) {
- throw new Error('Removed line count did not match for hunk at line ' + (chunkHeaderIndex + 1));
- }
- }
-
- return hunk;
- }
-
- while (i < diffstr.length) {
- parseIndex();
- }
-
- return list;
- }
+ function arrayEqual(a, b) {
+ if (a.length !== b.length) {
+ return false;
+ }
+ return arrayStartsWith(a, b);
+ }
+ function arrayStartsWith(array, start) {
+ if (start.length > array.length) {
+ return false;
+ }
+ for (var i = 0; i < start.length; i++) {
+ if (start[i] !== array[i]) {
+ return false;
+ }
+ }
-/***/ }),
-/* 12 */
-/***/ (function(module, exports) {
+ return true;
+ }
- /*istanbul ignore start*/"use strict";
+ function calcLineCount(hunk) {
+ var _calcOldNewLineCount = calcOldNewLineCount(hunk.lines),
+ oldLines = _calcOldNewLineCount.oldLines,
+ newLines = _calcOldNewLineCount.newLines;
- exports.__esModule = true;
+ if (oldLines !== undefined) {
+ hunk.oldLines = oldLines;
+ } else {
+ delete hunk.oldLines;
+ }
- exports["default"] = /*istanbul ignore end*/function (start, minLine, maxLine) {
- var wantForward = true,
- backwardExhausted = false,
- forwardExhausted = false,
- localOffset = 1;
+ if (newLines !== undefined) {
+ hunk.newLines = newLines;
+ } else {
+ delete hunk.newLines;
+ }
+ }
+ function merge(mine, theirs, base) {
+ mine = loadPatch(mine, base);
+ theirs = loadPatch(theirs, base);
+ var ret = {}; // For index we just let it pass through as it doesn't have any necessary meaning.
+ // Leaving sanity checks on this to the API consumer that may know more about the
+ // meaning in their own context.
+
+ if (mine.index || theirs.index) {
+ ret.index = mine.index || theirs.index;
+ }
+
+ if (mine.newFileName || theirs.newFileName) {
+ if (!fileNameChanged(mine)) {
+ // No header or no change in ours, use theirs (and ours if theirs does not exist)
+ ret.oldFileName = theirs.oldFileName || mine.oldFileName;
+ ret.newFileName = theirs.newFileName || mine.newFileName;
+ ret.oldHeader = theirs.oldHeader || mine.oldHeader;
+ ret.newHeader = theirs.newHeader || mine.newHeader;
+ } else if (!fileNameChanged(theirs)) {
+ // No header or no change in theirs, use ours
+ ret.oldFileName = mine.oldFileName;
+ ret.newFileName = mine.newFileName;
+ ret.oldHeader = mine.oldHeader;
+ ret.newHeader = mine.newHeader;
+ } else {
+ // Both changed... figure it out
+ ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
+ ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
+ ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
+ ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
+ }
+ }
- return function iterator() {
- if (wantForward && !forwardExhausted) {
- if (backwardExhausted) {
- localOffset++;
- } else {
- wantForward = false;
- }
+ ret.hunks = [];
+ var mineIndex = 0,
+ theirsIndex = 0,
+ mineOffset = 0,
+ theirsOffset = 0;
- // Check if trying to fit beyond text length, and if not, check it fits
- // after offset location (or desired location on first iteration)
- if (start + localOffset <= maxLine) {
- return localOffset;
- }
+ while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
+ var mineCurrent = mine.hunks[mineIndex] || {
+ oldStart: Infinity
+ },
+ theirsCurrent = theirs.hunks[theirsIndex] || {
+ oldStart: Infinity
+ };
- forwardExhausted = true;
- }
+ if (hunkBefore(mineCurrent, theirsCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
+ mineIndex++;
+ theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
+ } else if (hunkBefore(theirsCurrent, mineCurrent)) {
+ // This patch does not overlap with any of the others, yay.
+ ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
+ theirsIndex++;
+ mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
+ } else {
+ // Overlap, merge as best we can
+ var mergedHunk = {
+ oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
+ oldLines: 0,
+ newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
+ newLines: 0,
+ lines: []
+ };
+ mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
+ theirsIndex++;
+ mineIndex++;
+ ret.hunks.push(mergedHunk);
+ }
+ }
- if (!backwardExhausted) {
- if (!forwardExhausted) {
- wantForward = true;
- }
+ return ret;
+ }
- // Check if trying to fit before text beginning, and if not, check it fits
- // before offset location
- if (minLine <= start - localOffset) {
- return -localOffset++;
- }
+ function loadPatch(param, base) {
+ if (typeof param === 'string') {
+ if (/^@@/m.test(param) || /^Index:/m.test(param)) {
+ return parsePatch(param)[0];
+ }
- backwardExhausted = true;
- return iterator();
- }
+ if (!base) {
+ throw new Error('Must provide a base reference or pass in a patch');
+ }
- // We tried to fit hunk before text beginning and beyond text length, then
- // hunk can't fit on the text. Return undefined
- };
- };
+ return structuredPatch(undefined, undefined, base, param);
+ }
+ return param;
+ }
+ function fileNameChanged(patch) {
+ return patch.newFileName && patch.newFileName !== patch.oldFileName;
+ }
-/***/ }),
-/* 13 */
-/***/ (function(module, exports, __webpack_require__) {
+ function selectField(index, mine, theirs) {
+ if (mine === theirs) {
+ return mine;
+ } else {
+ index.conflict = true;
+ return {
+ mine: mine,
+ theirs: theirs
+ };
+ }
+ }
- /*istanbul ignore start*/'use strict';
+ function hunkBefore(test, check) {
+ return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
+ }
- exports.__esModule = true;
- exports. /*istanbul ignore end*/calcLineCount = calcLineCount;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/merge = merge;
+ function cloneHunk(hunk, offset) {
+ return {
+ oldStart: hunk.oldStart,
+ oldLines: hunk.oldLines,
+ newStart: hunk.newStart + offset,
+ newLines: hunk.newLines,
+ lines: hunk.lines
+ };
+ }
- var /*istanbul ignore start*/_create = __webpack_require__(14) /*istanbul ignore end*/;
+ function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
+ // This will generally result in a conflicted hunk, but there are cases where the context
+ // is the only overlap where we can successfully merge the content here.
+ var mine = {
+ offset: mineOffset,
+ lines: mineLines,
+ index: 0
+ },
+ their = {
+ offset: theirOffset,
+ lines: theirLines,
+ index: 0
+ }; // Handle any leading content
+
+ insertLeading(hunk, mine, their);
+ insertLeading(hunk, their, mine); // Now in the overlap content. Scan through and select the best changes from each.
+
+ while (mine.index < mine.lines.length && their.index < their.lines.length) {
+ var mineCurrent = mine.lines[mine.index],
+ theirCurrent = their.lines[their.index];
+
+ if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
+ // Both modified ...
+ mutualChange(hunk, mine, their);
+ } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
+ var _hunk$lines;
+
+ // Mine inserted
+ (_hunk$lines = hunk.lines).push.apply(_hunk$lines, _toConsumableArray(collectChange(mine)));
+ } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
+ var _hunk$lines2;
+
+ // Theirs inserted
+ (_hunk$lines2 = hunk.lines).push.apply(_hunk$lines2, _toConsumableArray(collectChange(their)));
+ } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
+ // Mine removed or edited
+ removal(hunk, mine, their);
+ } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
+ // Their removed or edited
+ removal(hunk, their, mine, true);
+ } else if (mineCurrent === theirCurrent) {
+ // Context identity
+ hunk.lines.push(mineCurrent);
+ mine.index++;
+ their.index++;
+ } else {
+ // Context mismatch
+ conflict(hunk, collectChange(mine), collectChange(their));
+ }
+ } // Now push anything that may be remaining
- var /*istanbul ignore start*/_parse = __webpack_require__(11) /*istanbul ignore end*/;
- var /*istanbul ignore start*/_array = __webpack_require__(15) /*istanbul ignore end*/;
+ insertTrailing(hunk, mine);
+ insertTrailing(hunk, their);
+ calcLineCount(hunk);
+ }
- /*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
+ function mutualChange(hunk, mine, their) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectChange(their);
- /*istanbul ignore end*/function calcLineCount(hunk) {
- /*istanbul ignore start*/var _calcOldNewLineCount = /*istanbul ignore end*/calcOldNewLineCount(hunk.lines),
- oldLines = _calcOldNewLineCount.oldLines,
- newLines = _calcOldNewLineCount.newLines;
+ if (allRemoves(myChanges) && allRemoves(theirChanges)) {
+ // Special case for remove changes that are supersets of one another
+ if (arrayStartsWith(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
+ var _hunk$lines3;
- if (oldLines !== undefined) {
- hunk.oldLines = oldLines;
- } else {
- delete hunk.oldLines;
- }
+ (_hunk$lines3 = hunk.lines).push.apply(_hunk$lines3, _toConsumableArray(myChanges));
- if (newLines !== undefined) {
- hunk.newLines = newLines;
- } else {
- delete hunk.newLines;
- }
- }
+ return;
+ } else if (arrayStartsWith(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
+ var _hunk$lines4;
- function merge(mine, theirs, base) {
- mine = loadPatch(mine, base);
- theirs = loadPatch(theirs, base);
-
- var ret = {};
-
- // For index we just let it pass through as it doesn't have any necessary meaning.
- // Leaving sanity checks on this to the API consumer that may know more about the
- // meaning in their own context.
- if (mine.index || theirs.index) {
- ret.index = mine.index || theirs.index;
- }
-
- if (mine.newFileName || theirs.newFileName) {
- if (!fileNameChanged(mine)) {
- // No header or no change in ours, use theirs (and ours if theirs does not exist)
- ret.oldFileName = theirs.oldFileName || mine.oldFileName;
- ret.newFileName = theirs.newFileName || mine.newFileName;
- ret.oldHeader = theirs.oldHeader || mine.oldHeader;
- ret.newHeader = theirs.newHeader || mine.newHeader;
- } else if (!fileNameChanged(theirs)) {
- // No header or no change in theirs, use ours
- ret.oldFileName = mine.oldFileName;
- ret.newFileName = mine.newFileName;
- ret.oldHeader = mine.oldHeader;
- ret.newHeader = mine.newHeader;
- } else {
- // Both changed... figure it out
- ret.oldFileName = selectField(ret, mine.oldFileName, theirs.oldFileName);
- ret.newFileName = selectField(ret, mine.newFileName, theirs.newFileName);
- ret.oldHeader = selectField(ret, mine.oldHeader, theirs.oldHeader);
- ret.newHeader = selectField(ret, mine.newHeader, theirs.newHeader);
- }
- }
-
- ret.hunks = [];
-
- var mineIndex = 0,
- theirsIndex = 0,
- mineOffset = 0,
- theirsOffset = 0;
-
- while (mineIndex < mine.hunks.length || theirsIndex < theirs.hunks.length) {
- var mineCurrent = mine.hunks[mineIndex] || { oldStart: Infinity },
- theirsCurrent = theirs.hunks[theirsIndex] || { oldStart: Infinity };
-
- if (hunkBefore(mineCurrent, theirsCurrent)) {
- // This patch does not overlap with any of the others, yay.
- ret.hunks.push(cloneHunk(mineCurrent, mineOffset));
- mineIndex++;
- theirsOffset += mineCurrent.newLines - mineCurrent.oldLines;
- } else if (hunkBefore(theirsCurrent, mineCurrent)) {
- // This patch does not overlap with any of the others, yay.
- ret.hunks.push(cloneHunk(theirsCurrent, theirsOffset));
- theirsIndex++;
- mineOffset += theirsCurrent.newLines - theirsCurrent.oldLines;
- } else {
- // Overlap, merge as best we can
- var mergedHunk = {
- oldStart: Math.min(mineCurrent.oldStart, theirsCurrent.oldStart),
- oldLines: 0,
- newStart: Math.min(mineCurrent.newStart + mineOffset, theirsCurrent.oldStart + theirsOffset),
- newLines: 0,
- lines: []
- };
- mergeLines(mergedHunk, mineCurrent.oldStart, mineCurrent.lines, theirsCurrent.oldStart, theirsCurrent.lines);
- theirsIndex++;
- mineIndex++;
-
- ret.hunks.push(mergedHunk);
- }
- }
-
- return ret;
- }
+ (_hunk$lines4 = hunk.lines).push.apply(_hunk$lines4, _toConsumableArray(theirChanges));
- function loadPatch(param, base) {
- if (typeof param === 'string') {
- if (/^@@/m.test(param) || /^Index:/m.test(param)) {
- return (/*istanbul ignore start*/(0, _parse.parsePatch) /*istanbul ignore end*/(param)[0]
- );
- }
-
- if (!base) {
- throw new Error('Must provide a base reference or pass in a patch');
- }
- return (/*istanbul ignore start*/(0, _create.structuredPatch) /*istanbul ignore end*/(undefined, undefined, base, param)
- );
- }
-
- return param;
- }
+ return;
+ }
+ } else if (arrayEqual(myChanges, theirChanges)) {
+ var _hunk$lines5;
- function fileNameChanged(patch) {
- return patch.newFileName && patch.newFileName !== patch.oldFileName;
- }
+ (_hunk$lines5 = hunk.lines).push.apply(_hunk$lines5, _toConsumableArray(myChanges));
- function selectField(index, mine, theirs) {
- if (mine === theirs) {
- return mine;
- } else {
- index.conflict = true;
- return { mine: mine, theirs: theirs };
- }
- }
+ return;
+ }
- function hunkBefore(test, check) {
- return test.oldStart < check.oldStart && test.oldStart + test.oldLines < check.oldStart;
- }
+ conflict(hunk, myChanges, theirChanges);
+ }
- function cloneHunk(hunk, offset) {
- return {
- oldStart: hunk.oldStart, oldLines: hunk.oldLines,
- newStart: hunk.newStart + offset, newLines: hunk.newLines,
- lines: hunk.lines
- };
- }
+ function removal(hunk, mine, their, swap) {
+ var myChanges = collectChange(mine),
+ theirChanges = collectContext(their, myChanges);
- function mergeLines(hunk, mineOffset, mineLines, theirOffset, theirLines) {
- // This will generally result in a conflicted hunk, but there are cases where the context
- // is the only overlap where we can successfully merge the content here.
- var mine = { offset: mineOffset, lines: mineLines, index: 0 },
- their = { offset: theirOffset, lines: theirLines, index: 0 };
-
- // Handle any leading content
- insertLeading(hunk, mine, their);
- insertLeading(hunk, their, mine);
-
- // Now in the overlap content. Scan through and select the best changes from each.
- while (mine.index < mine.lines.length && their.index < their.lines.length) {
- var mineCurrent = mine.lines[mine.index],
- theirCurrent = their.lines[their.index];
-
- if ((mineCurrent[0] === '-' || mineCurrent[0] === '+') && (theirCurrent[0] === '-' || theirCurrent[0] === '+')) {
- // Both modified ...
- mutualChange(hunk, mine, their);
- } else if (mineCurrent[0] === '+' && theirCurrent[0] === ' ') {
- /*istanbul ignore start*/var _hunk$lines;
-
- /*istanbul ignore end*/ // Mine inserted
- /*istanbul ignore start*/(_hunk$lines = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(mine)));
- } else if (theirCurrent[0] === '+' && mineCurrent[0] === ' ') {
- /*istanbul ignore start*/var _hunk$lines2;
-
- /*istanbul ignore end*/ // Theirs inserted
- /*istanbul ignore start*/(_hunk$lines2 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/collectChange(their)));
- } else if (mineCurrent[0] === '-' && theirCurrent[0] === ' ') {
- // Mine removed or edited
- removal(hunk, mine, their);
- } else if (theirCurrent[0] === '-' && mineCurrent[0] === ' ') {
- // Their removed or edited
- removal(hunk, their, mine, true);
- } else if (mineCurrent === theirCurrent) {
- // Context identity
- hunk.lines.push(mineCurrent);
- mine.index++;
- their.index++;
- } else {
- // Context mismatch
- conflict(hunk, collectChange(mine), collectChange(their));
- }
- }
-
- // Now push anything that may be remaining
- insertTrailing(hunk, mine);
- insertTrailing(hunk, their);
-
- calcLineCount(hunk);
- }
+ if (theirChanges.merged) {
+ var _hunk$lines6;
- function mutualChange(hunk, mine, their) {
- var myChanges = collectChange(mine),
- theirChanges = collectChange(their);
+ (_hunk$lines6 = hunk.lines).push.apply(_hunk$lines6, _toConsumableArray(theirChanges.merged));
+ } else {
+ conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
+ }
+ }
- if (allRemoves(myChanges) && allRemoves(theirChanges)) {
- // Special case for remove changes that are supersets of one another
- if ( /*istanbul ignore start*/(0, _array.arrayStartsWith) /*istanbul ignore end*/(myChanges, theirChanges) && skipRemoveSuperset(their, myChanges, myChanges.length - theirChanges.length)) {
- /*istanbul ignore start*/var _hunk$lines3;
+ function conflict(hunk, mine, their) {
+ hunk.conflict = true;
+ hunk.lines.push({
+ conflict: true,
+ mine: mine,
+ theirs: their
+ });
+ }
- /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines3 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges));
- return;
- } else if ( /*istanbul ignore start*/(0, _array.arrayStartsWith) /*istanbul ignore end*/(theirChanges, myChanges) && skipRemoveSuperset(mine, theirChanges, theirChanges.length - myChanges.length)) {
- /*istanbul ignore start*/var _hunk$lines4;
+ function insertLeading(hunk, insert, their) {
+ while (insert.offset < their.offset && insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ insert.offset++;
+ }
+ }
- /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines4 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines4 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges));
- return;
- }
- } else if ( /*istanbul ignore start*/(0, _array.arrayEqual) /*istanbul ignore end*/(myChanges, theirChanges)) {
- /*istanbul ignore start*/var _hunk$lines5;
+ function insertTrailing(hunk, insert) {
+ while (insert.index < insert.lines.length) {
+ var line = insert.lines[insert.index++];
+ hunk.lines.push(line);
+ }
+ }
- /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines5 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines5 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/myChanges));
- return;
- }
+ function collectChange(state) {
+ var ret = [],
+ operation = state.lines[state.index][0];
- conflict(hunk, myChanges, theirChanges);
- }
+ while (state.index < state.lines.length) {
+ var line = state.lines[state.index]; // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
- function removal(hunk, mine, their, swap) {
- var myChanges = collectChange(mine),
- theirChanges = collectContext(their, myChanges);
- if (theirChanges.merged) {
- /*istanbul ignore start*/var _hunk$lines6;
+ if (operation === '-' && line[0] === '+') {
+ operation = '+';
+ }
- /*istanbul ignore end*/ /*istanbul ignore start*/(_hunk$lines6 = /*istanbul ignore end*/hunk.lines).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_hunk$lines6 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/theirChanges.merged));
- } else {
- conflict(hunk, swap ? theirChanges : myChanges, swap ? myChanges : theirChanges);
- }
- }
+ if (operation === line[0]) {
+ ret.push(line);
+ state.index++;
+ } else {
+ break;
+ }
+ }
- function conflict(hunk, mine, their) {
- hunk.conflict = true;
- hunk.lines.push({
- conflict: true,
- mine: mine,
- theirs: their
- });
- }
+ return ret;
+ }
- function insertLeading(hunk, insert, their) {
- while (insert.offset < their.offset && insert.index < insert.lines.length) {
- var line = insert.lines[insert.index++];
- hunk.lines.push(line);
- insert.offset++;
- }
- }
- function insertTrailing(hunk, insert) {
- while (insert.index < insert.lines.length) {
- var line = insert.lines[insert.index++];
- hunk.lines.push(line);
- }
- }
+ function collectContext(state, matchChanges) {
+ var changes = [],
+ merged = [],
+ matchIndex = 0,
+ contextChanges = false,
+ conflicted = false;
- function collectChange(state) {
- var ret = [],
- operation = state.lines[state.index][0];
- while (state.index < state.lines.length) {
- var line = state.lines[state.index];
-
- // Group additions that are immediately after subtractions and treat them as one "atomic" modify change.
- if (operation === '-' && line[0] === '+') {
- operation = '+';
- }
-
- if (operation === line[0]) {
- ret.push(line);
- state.index++;
- } else {
- break;
- }
- }
-
- return ret;
- }
- function collectContext(state, matchChanges) {
- var changes = [],
- merged = [],
- matchIndex = 0,
- contextChanges = false,
- conflicted = false;
- while (matchIndex < matchChanges.length && state.index < state.lines.length) {
- var change = state.lines[state.index],
- match = matchChanges[matchIndex];
-
- // Once we've hit our add, then we are done
- if (match[0] === '+') {
- break;
- }
-
- contextChanges = contextChanges || change[0] !== ' ';
-
- merged.push(match);
- matchIndex++;
-
- // Consume any additions in the other block as a conflict to attempt
- // to pull in the remaining context after this
- if (change[0] === '+') {
- conflicted = true;
-
- while (change[0] === '+') {
- changes.push(change);
- change = state.lines[++state.index];
- }
- }
-
- if (match.substr(1) === change.substr(1)) {
- changes.push(change);
- state.index++;
- } else {
- conflicted = true;
- }
- }
-
- if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
- conflicted = true;
- }
-
- if (conflicted) {
- return changes;
- }
-
- while (matchIndex < matchChanges.length) {
- merged.push(matchChanges[matchIndex++]);
- }
-
- return {
- merged: merged,
- changes: changes
- };
- }
+ while (matchIndex < matchChanges.length && state.index < state.lines.length) {
+ var change = state.lines[state.index],
+ match = matchChanges[matchIndex]; // Once we've hit our add, then we are done
- function allRemoves(changes) {
- return changes.reduce(function (prev, change) {
- return prev && change[0] === '-';
- }, true);
- }
- function skipRemoveSuperset(state, removeChanges, delta) {
- for (var i = 0; i < delta; i++) {
- var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
- if (state.lines[state.index + i] !== ' ' + changeContent) {
- return false;
- }
- }
-
- state.index += delta;
- return true;
- }
+ if (match[0] === '+') {
+ break;
+ }
- function calcOldNewLineCount(lines) {
- var oldLines = 0;
- var newLines = 0;
-
- lines.forEach(function (line) {
- if (typeof line !== 'string') {
- var myCount = calcOldNewLineCount(line.mine);
- var theirCount = calcOldNewLineCount(line.theirs);
-
- if (oldLines !== undefined) {
- if (myCount.oldLines === theirCount.oldLines) {
- oldLines += myCount.oldLines;
- } else {
- oldLines = undefined;
- }
- }
-
- if (newLines !== undefined) {
- if (myCount.newLines === theirCount.newLines) {
- newLines += myCount.newLines;
- } else {
- newLines = undefined;
- }
- }
- } else {
- if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
- newLines++;
- }
- if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
- oldLines++;
- }
- }
- });
-
- return { oldLines: oldLines, newLines: newLines };
- }
+ contextChanges = contextChanges || change[0] !== ' ';
+ merged.push(match);
+ matchIndex++; // Consume any additions in the other block as a conflict to attempt
+ // to pull in the remaining context after this
+ if (change[0] === '+') {
+ conflicted = true;
+ while (change[0] === '+') {
+ changes.push(change);
+ change = state.lines[++state.index];
+ }
+ }
-/***/ }),
-/* 14 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /*istanbul ignore start*/'use strict';
-
- exports.__esModule = true;
- exports. /*istanbul ignore end*/structuredPatch = structuredPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/createTwoFilesPatch = createTwoFilesPatch;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/createPatch = createPatch;
-
- var /*istanbul ignore start*/_line = __webpack_require__(5) /*istanbul ignore end*/;
-
- /*istanbul ignore start*/function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
- /*istanbul ignore end*/function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
- if (!options) {
- options = {};
- }
- if (typeof options.context === 'undefined') {
- options.context = 4;
- }
-
- var diff = /*istanbul ignore start*/(0, _line.diffLines) /*istanbul ignore end*/(oldStr, newStr, options);
- diff.push({ value: '', lines: [] }); // Append an empty value to make cleanup easier
-
- function contextLines(lines) {
- return lines.map(function (entry) {
- return ' ' + entry;
- });
- }
-
- var hunks = [];
- var oldRangeStart = 0,
- newRangeStart = 0,
- curRange = [],
- oldLine = 1,
- newLine = 1;
-
- /*istanbul ignore start*/var _loop = function _loop( /*istanbul ignore end*/i) {
- var current = diff[i],
- lines = current.lines || current.value.replace(/\n$/, '').split('\n');
- current.lines = lines;
-
- if (current.added || current.removed) {
- /*istanbul ignore start*/var _curRange;
-
- /*istanbul ignore end*/ // If we have previous context, start with that
- if (!oldRangeStart) {
- var prev = diff[i - 1];
- oldRangeStart = oldLine;
- newRangeStart = newLine;
-
- if (prev) {
- curRange = options.context > 0 ? contextLines(prev.lines.slice(-options.context)) : [];
- oldRangeStart -= curRange.length;
- newRangeStart -= curRange.length;
- }
- }
-
- // Output our changes
- /*istanbul ignore start*/(_curRange = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/lines.map(function (entry) {
- return (current.added ? '+' : '-') + entry;
- })));
-
- // Track the updated file position
- if (current.added) {
- newLine += lines.length;
- } else {
- oldLine += lines.length;
- }
- } else {
- // Identical context lines. Track line changes
- if (oldRangeStart) {
- // Close out any changes that have been output (or join overlapping)
- if (lines.length <= options.context * 2 && i < diff.length - 2) {
- /*istanbul ignore start*/var _curRange2;
-
- /*istanbul ignore end*/ // Overlapping
- /*istanbul ignore start*/(_curRange2 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange2 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines)));
- } else {
- /*istanbul ignore start*/var _curRange3;
-
- /*istanbul ignore end*/ // end the range and output
- var contextSize = Math.min(lines.length, options.context);
- /*istanbul ignore start*/(_curRange3 = /*istanbul ignore end*/curRange).push. /*istanbul ignore start*/apply /*istanbul ignore end*/( /*istanbul ignore start*/_curRange3 /*istanbul ignore end*/, /*istanbul ignore start*/_toConsumableArray( /*istanbul ignore end*/contextLines(lines.slice(0, contextSize))));
-
- var hunk = {
- oldStart: oldRangeStart,
- oldLines: oldLine - oldRangeStart + contextSize,
- newStart: newRangeStart,
- newLines: newLine - newRangeStart + contextSize,
- lines: curRange
- };
- if (i >= diff.length - 2 && lines.length <= options.context) {
- // EOF is inside this hunk
- var oldEOFNewline = /\n$/.test(oldStr);
- var newEOFNewline = /\n$/.test(newStr);
- if (lines.length == 0 && !oldEOFNewline) {
- // special case: old has no eol and no trailing context; no-nl can end up before adds
- curRange.splice(hunk.oldLines, 0, '\\ No newline at end of file');
- } else if (!oldEOFNewline || !newEOFNewline) {
- curRange.push('\\ No newline at end of file');
- }
- }
- hunks.push(hunk);
-
- oldRangeStart = 0;
- newRangeStart = 0;
- curRange = [];
- }
- }
- oldLine += lines.length;
- newLine += lines.length;
- }
- };
-
- for (var i = 0; i < diff.length; i++) {
- /*istanbul ignore start*/_loop( /*istanbul ignore end*/i);
- }
-
- return {
- oldFileName: oldFileName, newFileName: newFileName,
- oldHeader: oldHeader, newHeader: newHeader,
- hunks: hunks
- };
- }
+ if (match.substr(1) === change.substr(1)) {
+ changes.push(change);
+ state.index++;
+ } else {
+ conflicted = true;
+ }
+ }
- function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
- var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
+ if ((matchChanges[matchIndex] || '')[0] === '+' && contextChanges) {
+ conflicted = true;
+ }
- var ret = [];
- if (oldFileName == newFileName) {
- ret.push('Index: ' + oldFileName);
- }
- ret.push('===================================================================');
- ret.push('--- ' + diff.oldFileName + (typeof diff.oldHeader === 'undefined' ? '' : '\t' + diff.oldHeader));
- ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
+ if (conflicted) {
+ return changes;
+ }
- for (var i = 0; i < diff.hunks.length; i++) {
- var hunk = diff.hunks[i];
- ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
- ret.push.apply(ret, hunk.lines);
- }
+ while (matchIndex < matchChanges.length) {
+ merged.push(matchChanges[matchIndex++]);
+ }
- return ret.join('\n') + '\n';
- }
+ return {
+ merged: merged,
+ changes: changes
+ };
+ }
- function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
- return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
- }
+ function allRemoves(changes) {
+ return changes.reduce(function (prev, change) {
+ return prev && change[0] === '-';
+ }, true);
+ }
+ function skipRemoveSuperset(state, removeChanges, delta) {
+ for (var i = 0; i < delta; i++) {
+ var changeContent = removeChanges[removeChanges.length - delta + i].substr(1);
+ if (state.lines[state.index + i] !== ' ' + changeContent) {
+ return false;
+ }
+ }
-/***/ }),
-/* 15 */
-/***/ (function(module, exports) {
+ state.index += delta;
+ return true;
+ }
- /*istanbul ignore start*/"use strict";
+ function calcOldNewLineCount(lines) {
+ var oldLines = 0;
+ var newLines = 0;
+ lines.forEach(function (line) {
+ if (typeof line !== 'string') {
+ var myCount = calcOldNewLineCount(line.mine);
+ var theirCount = calcOldNewLineCount(line.theirs);
- exports.__esModule = true;
- exports. /*istanbul ignore end*/arrayEqual = arrayEqual;
- /*istanbul ignore start*/exports. /*istanbul ignore end*/arrayStartsWith = arrayStartsWith;
- function arrayEqual(a, b) {
- if (a.length !== b.length) {
- return false;
- }
+ if (oldLines !== undefined) {
+ if (myCount.oldLines === theirCount.oldLines) {
+ oldLines += myCount.oldLines;
+ } else {
+ oldLines = undefined;
+ }
+ }
- return arrayStartsWith(a, b);
- }
+ if (newLines !== undefined) {
+ if (myCount.newLines === theirCount.newLines) {
+ newLines += myCount.newLines;
+ } else {
+ newLines = undefined;
+ }
+ }
+ } else {
+ if (newLines !== undefined && (line[0] === '+' || line[0] === ' ')) {
+ newLines++;
+ }
- function arrayStartsWith(array, start) {
- if (start.length > array.length) {
- return false;
- }
+ if (oldLines !== undefined && (line[0] === '-' || line[0] === ' ')) {
+ oldLines++;
+ }
+ }
+ });
+ return {
+ oldLines: oldLines,
+ newLines: newLines
+ };
+ }
- for (var i = 0; i < start.length; i++) {
- if (start[i] !== array[i]) {
- return false;
- }
- }
+ // See: http://code.google.com/p/google-diff-match-patch/wiki/API
+ function convertChangesToDMP(changes) {
+ var ret = [],
+ change,
+ operation;
- return true;
- }
+ for (var i = 0; i < changes.length; i++) {
+ change = changes[i];
+ if (change.added) {
+ operation = 1;
+ } else if (change.removed) {
+ operation = -1;
+ } else {
+ operation = 0;
+ }
+ ret.push([operation, change.value]);
+ }
-/***/ }),
-/* 16 */
-/***/ (function(module, exports) {
-
- /*istanbul ignore start*/"use strict";
-
- exports.__esModule = true;
- exports. /*istanbul ignore end*/convertChangesToDMP = convertChangesToDMP;
- // See: http://code.google.com/p/google-diff-match-patch/wiki/API
- function convertChangesToDMP(changes) {
- var ret = [],
- change = /*istanbul ignore start*/void 0 /*istanbul ignore end*/,
- operation = /*istanbul ignore start*/void 0 /*istanbul ignore end*/;
- for (var i = 0; i < changes.length; i++) {
- change = changes[i];
- if (change.added) {
- operation = 1;
- } else if (change.removed) {
- operation = -1;
- } else {
- operation = 0;
- }
-
- ret.push([operation, change.value]);
- }
- return ret;
- }
+ return ret;
+ }
+ function convertChangesToXML(changes) {
+ var ret = [];
+ for (var i = 0; i < changes.length; i++) {
+ var change = changes[i];
-/***/ }),
-/* 17 */
-/***/ (function(module, exports) {
+ if (change.added) {
+ ret.push('');
+ } else if (change.removed) {
+ ret.push('');
+ }
- /*istanbul ignore start*/'use strict';
+ ret.push(escapeHTML(change.value));
- exports.__esModule = true;
- exports. /*istanbul ignore end*/convertChangesToXML = convertChangesToXML;
- function convertChangesToXML(changes) {
- var ret = [];
- for (var i = 0; i < changes.length; i++) {
- var change = changes[i];
- if (change.added) {
- ret.push('');
- } else if (change.removed) {
- ret.push('');
- }
+ if (change.added) {
+ ret.push('');
+ } else if (change.removed) {
+ ret.push('');
+ }
+ }
- ret.push(escapeHTML(change.value));
+ return ret.join('');
+ }
- if (change.added) {
- ret.push('');
- } else if (change.removed) {
- ret.push('');
- }
- }
- return ret.join('');
- }
+ function escapeHTML(s) {
+ var n = s;
+ n = n.replace(/&/g, '&');
+ n = n.replace(//g, '>');
+ n = n.replace(/"/g, '"');
+ return n;
+ }
- function escapeHTML(s) {
- var n = s;
- n = n.replace(/&/g, '&');
- n = n.replace(//g, '>');
- n = n.replace(/"/g, '"');
+ /* See LICENSE file for terms of use */
- return n;
- }
+ exports.Diff = Diff;
+ exports.diffChars = diffChars;
+ exports.diffWords = diffWords;
+ exports.diffWordsWithSpace = diffWordsWithSpace;
+ exports.diffLines = diffLines;
+ exports.diffTrimmedLines = diffTrimmedLines;
+ exports.diffSentences = diffSentences;
+ exports.diffCss = diffCss;
+ exports.diffJson = diffJson;
+ exports.diffArrays = diffArrays;
+ exports.structuredPatch = structuredPatch;
+ exports.createTwoFilesPatch = createTwoFilesPatch;
+ exports.createPatch = createPatch;
+ exports.applyPatch = applyPatch;
+ exports.applyPatches = applyPatches;
+ exports.parsePatch = parsePatch;
+ exports.merge = merge;
+ exports.convertChangesToDMP = convertChangesToDMP;
+ exports.convertChangesToXML = convertChangesToXML;
+ exports.canonicalize = canonicalize;
+ Object.defineProperty(exports, '__esModule', { value: true });
+}));
-/***/ })
-/******/ ])
-});
-;
},{}],49:[function(require,module,exports){
'use strict';
@@ -13310,7 +13599,7 @@ module.exports = Function.prototype.bind || implementation;
},{"./implementation":51}],53:[function(require,module,exports){
'use strict';
-/* eslint complexity: [2, 17], max-statements: [2, 33] */
+/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
if (typeof Symbol.iterator === 'symbol') { return true; }
@@ -13788,24 +14077,28 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- ctor.prototype = Object.create(superCtor.prototype, {
- constructor: {
- value: ctor,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
+ if (superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ })
+ }
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
- ctor.super_ = superCtor
- var TempCtor = function () {}
- TempCtor.prototype = superCtor.prototype
- ctor.prototype = new TempCtor()
- ctor.prototype.constructor = ctor
+ if (superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
}
}
@@ -13833,115 +14126,6 @@ function isSlowBuffer (obj) {
}
},{}],58:[function(require,module,exports){
-var toString = {}.toString;
-
-module.exports = Array.isArray || function (arr) {
- return toString.call(arr) == '[object Array]';
-};
-
-},{}],59:[function(require,module,exports){
-(function (process){
-var path = require('path');
-var fs = require('fs');
-var _0777 = parseInt('0777', 8);
-
-module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
-
-function mkdirP (p, opts, f, made) {
- if (typeof opts === 'function') {
- f = opts;
- opts = {};
- }
- else if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- var cb = f || function () {};
- p = path.resolve(p);
-
- xfs.mkdir(p, mode, function (er) {
- if (!er) {
- made = made || p;
- return cb(null, made);
- }
- switch (er.code) {
- case 'ENOENT':
- mkdirP(path.dirname(p), opts, function (er, made) {
- if (er) cb(er, made);
- else mkdirP(p, opts, cb, made);
- });
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- xfs.stat(p, function (er2, stat) {
- // if the stat fails, then that's super weird.
- // let the original error be the failure reason.
- if (er2 || !stat.isDirectory()) cb(er, made)
- else cb(null, made);
- });
- break;
- }
- });
-}
-
-mkdirP.sync = function sync (p, opts, made) {
- if (!opts || typeof opts !== 'object') {
- opts = { mode: opts };
- }
-
- var mode = opts.mode;
- var xfs = opts.fs || fs;
-
- if (mode === undefined) {
- mode = _0777 & (~process.umask());
- }
- if (!made) made = null;
-
- p = path.resolve(p);
-
- try {
- xfs.mkdirSync(p, mode);
- made = made || p;
- }
- catch (err0) {
- switch (err0.code) {
- case 'ENOENT' :
- made = sync(path.dirname(p), opts, made);
- sync(p, opts, made);
- break;
-
- // In the case of any other error, just see if there's a dir
- // there already. If so, then hooray! If not, then something
- // is borked.
- default:
- var stat;
- try {
- stat = xfs.statSync(p);
- }
- catch (err1) {
- throw err0;
- }
- if (!stat.isDirectory()) throw err0;
- break;
- }
- }
-
- return made;
-};
-
-}).call(this,require('_process'))
-},{"_process":69,"fs":42,"path":42}],60:[function(require,module,exports){
/**
* Helpers.
*/
@@ -13972,7 +14156,7 @@ module.exports = function(val, options) {
var type = typeof val;
if (type === 'string' && val.length > 0) {
return parse(val);
- } else if (type === 'number' && isNaN(val) === false) {
+ } else if (type === 'number' && isFinite(val)) {
return options.long ? fmtLong(val) : fmtShort(val);
}
throw new Error(
@@ -13994,7 +14178,7 @@ function parse(str) {
if (str.length > 100) {
return;
}
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
@@ -14105,7 +14289,7 @@ function plural(ms, msAbs, n, name) {
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
}
-},{}],61:[function(require,module,exports){
+},{}],59:[function(require,module,exports){
'use strict';
var keysShim;
@@ -14139,6 +14323,8 @@ if (!Object.keys) {
$frames: true,
$innerHeight: true,
$innerWidth: true,
+ $onmozfullscreenchange: true,
+ $onmozfullscreenerror: true,
$outerHeight: true,
$outerWidth: true,
$pageXOffset: true,
@@ -14227,7 +14413,7 @@ if (!Object.keys) {
}
module.exports = keysShim;
-},{"./isArguments":63}],62:[function(require,module,exports){
+},{"./isArguments":61}],60:[function(require,module,exports){
'use strict';
var slice = Array.prototype.slice;
@@ -14261,7 +14447,7 @@ keysShim.shim = function shimObjectKeys() {
module.exports = keysShim;
-},{"./implementation":61,"./isArguments":63}],63:[function(require,module,exports){
+},{"./implementation":59,"./isArguments":61}],61:[function(require,module,exports){
'use strict';
var toStr = Object.prototype.toString;
@@ -14280,7 +14466,7 @@ module.exports = function isArguments(value) {
return isArgs;
};
-},{}],64:[function(require,module,exports){
+},{}],62:[function(require,module,exports){
'use strict';
// modified from https://github.com/es-shims/es6-shim
@@ -14323,7 +14509,7 @@ module.exports = function assign(target, source1) {
return objTarget;
};
-},{"function-bind":52,"has-symbols/shams":53,"object-keys":62}],65:[function(require,module,exports){
+},{"function-bind":52,"has-symbols/shams":53,"object-keys":60}],63:[function(require,module,exports){
'use strict';
var defineProperties = require('define-properties');
@@ -14342,7 +14528,7 @@ defineProperties(polyfill, {
module.exports = polyfill;
-},{"./implementation":64,"./polyfill":66,"./shim":67,"define-properties":47}],66:[function(require,module,exports){
+},{"./implementation":62,"./polyfill":64,"./shim":65,"define-properties":47}],64:[function(require,module,exports){
'use strict';
var implementation = require('./implementation');
@@ -14395,7 +14581,7 @@ module.exports = function getPolyfill() {
return Object.assign;
};
-},{"./implementation":64}],67:[function(require,module,exports){
+},{"./implementation":62}],65:[function(require,module,exports){
'use strict';
var define = require('define-properties');
@@ -14411,11 +14597,12 @@ module.exports = function shimAssign() {
return polyfill;
};
-},{"./polyfill":66,"define-properties":47}],68:[function(require,module,exports){
+},{"./polyfill":64,"define-properties":47}],66:[function(require,module,exports){
(function (process){
'use strict';
-if (!process.version ||
+if (typeof process === 'undefined' ||
+ !process.version ||
process.version.indexOf('v0.') === 0 ||
process.version.indexOf('v1.') === 0 && process.version.indexOf('v1.8.') !== 0) {
module.exports = { nextTick: nextTick };
@@ -14459,7 +14646,7 @@ function nextTick(fn, arg1, arg2, arg3) {
}).call(this,require('_process'))
-},{"_process":69}],69:[function(require,module,exports){
+},{"_process":67}],67:[function(require,module,exports){
// shim for using process in browser
var process = module.exports = {};
@@ -14645,10 +14832,10 @@ process.chdir = function (dir) {
};
process.umask = function() { return 0; };
-},{}],70:[function(require,module,exports){
+},{}],68:[function(require,module,exports){
module.exports = require('./lib/_stream_duplex.js');
-},{"./lib/_stream_duplex.js":71}],71:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":69}],69:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -14694,7 +14881,7 @@ var objectKeys = Object.keys || function (obj) {
module.exports = Duplex;
/**/
-var util = require('core-util-is');
+var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/**/
@@ -14780,7 +14967,7 @@ Duplex.prototype._destroy = function (err, cb) {
pna.nextTick(cb, err);
};
-},{"./_stream_readable":73,"./_stream_writable":75,"core-util-is":44,"inherits":56,"process-nextick-args":68}],72:[function(require,module,exports){
+},{"./_stream_readable":71,"./_stream_writable":73,"core-util-is":44,"inherits":56,"process-nextick-args":66}],70:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -14813,7 +15000,7 @@ module.exports = PassThrough;
var Transform = require('./_stream_transform');
/**/
-var util = require('core-util-is');
+var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/**/
@@ -14828,7 +15015,7 @@ function PassThrough(options) {
PassThrough.prototype._transform = function (chunk, encoding, cb) {
cb(null, chunk);
};
-},{"./_stream_transform":74,"core-util-is":44,"inherits":56}],73:[function(require,module,exports){
+},{"./_stream_transform":72,"core-util-is":44,"inherits":56}],71:[function(require,module,exports){
(function (process,global){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -14896,7 +15083,7 @@ function _isUint8Array(obj) {
/**/
/**/
-var util = require('core-util-is');
+var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/**/
@@ -15850,7 +16037,7 @@ function indexOf(xs, x) {
return -1;
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./_stream_duplex":71,"./internal/streams/BufferList":76,"./internal/streams/destroy":77,"./internal/streams/stream":78,"_process":69,"core-util-is":44,"events":50,"inherits":56,"isarray":58,"process-nextick-args":68,"safe-buffer":83,"string_decoder/":85,"util":40}],74:[function(require,module,exports){
+},{"./_stream_duplex":69,"./internal/streams/BufferList":74,"./internal/streams/destroy":75,"./internal/streams/stream":76,"_process":67,"core-util-is":44,"events":50,"inherits":56,"isarray":77,"process-nextick-args":66,"safe-buffer":82,"string_decoder/":84,"util":40}],72:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -15921,7 +16108,7 @@ module.exports = Transform;
var Duplex = require('./_stream_duplex');
/**/
-var util = require('core-util-is');
+var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/**/
@@ -16065,7 +16252,7 @@ function done(stream, er, data) {
return stream.push(null);
}
-},{"./_stream_duplex":71,"core-util-is":44,"inherits":56}],75:[function(require,module,exports){
+},{"./_stream_duplex":69,"core-util-is":44,"inherits":56}],73:[function(require,module,exports){
(function (process,global,setImmediate){
// Copyright Joyent, Inc. and other Node contributors.
//
@@ -16133,7 +16320,7 @@ var Duplex;
Writable.WritableState = WritableState;
/**/
-var util = require('core-util-is');
+var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/**/
@@ -16755,7 +16942,7 @@ Writable.prototype._destroy = function (err, cb) {
cb(err);
};
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("timers").setImmediate)
-},{"./_stream_duplex":71,"./internal/streams/destroy":77,"./internal/streams/stream":78,"_process":69,"core-util-is":44,"inherits":56,"process-nextick-args":68,"safe-buffer":83,"timers":86,"util-deprecate":87}],76:[function(require,module,exports){
+},{"./_stream_duplex":69,"./internal/streams/destroy":75,"./internal/streams/stream":76,"_process":67,"core-util-is":44,"inherits":56,"process-nextick-args":66,"safe-buffer":82,"timers":85,"util-deprecate":86}],74:[function(require,module,exports){
'use strict';
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -16835,7 +17022,7 @@ if (util && util.inspect && util.inspect.custom) {
return this.constructor.name + ' ' + obj;
};
}
-},{"safe-buffer":83,"util":40}],77:[function(require,module,exports){
+},{"safe-buffer":82,"util":40}],75:[function(require,module,exports){
'use strict';
/**/
@@ -16910,13 +17097,20 @@ module.exports = {
destroy: destroy,
undestroy: undestroy
};
-},{"process-nextick-args":68}],78:[function(require,module,exports){
+},{"process-nextick-args":66}],76:[function(require,module,exports){
module.exports = require('events').EventEmitter;
-},{"events":50}],79:[function(require,module,exports){
+},{"events":50}],77:[function(require,module,exports){
+var toString = {}.toString;
+
+module.exports = Array.isArray || function (arr) {
+ return toString.call(arr) == '[object Array]';
+};
+
+},{}],78:[function(require,module,exports){
module.exports = require('./readable').PassThrough
-},{"./readable":80}],80:[function(require,module,exports){
+},{"./readable":79}],79:[function(require,module,exports){
exports = module.exports = require('./lib/_stream_readable.js');
exports.Stream = exports;
exports.Readable = exports;
@@ -16925,13 +17119,13 @@ exports.Duplex = require('./lib/_stream_duplex.js');
exports.Transform = require('./lib/_stream_transform.js');
exports.PassThrough = require('./lib/_stream_passthrough.js');
-},{"./lib/_stream_duplex.js":71,"./lib/_stream_passthrough.js":72,"./lib/_stream_readable.js":73,"./lib/_stream_transform.js":74,"./lib/_stream_writable.js":75}],81:[function(require,module,exports){
+},{"./lib/_stream_duplex.js":69,"./lib/_stream_passthrough.js":70,"./lib/_stream_readable.js":71,"./lib/_stream_transform.js":72,"./lib/_stream_writable.js":73}],80:[function(require,module,exports){
module.exports = require('./readable').Transform
-},{"./readable":80}],82:[function(require,module,exports){
+},{"./readable":79}],81:[function(require,module,exports){
module.exports = require('./lib/_stream_writable.js');
-},{"./lib/_stream_writable.js":75}],83:[function(require,module,exports){
+},{"./lib/_stream_writable.js":73}],82:[function(require,module,exports){
/* eslint-disable node/no-deprecated-api */
var buffer = require('buffer')
var Buffer = buffer.Buffer
@@ -16995,7 +17189,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
return buffer.SlowBuffer(size)
}
-},{"buffer":43}],84:[function(require,module,exports){
+},{"buffer":43}],83:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17124,7 +17318,7 @@ Stream.prototype.pipe = function(dest, options) {
return dest;
};
-},{"events":50,"inherits":56,"readable-stream/duplex.js":70,"readable-stream/passthrough.js":79,"readable-stream/readable.js":80,"readable-stream/transform.js":81,"readable-stream/writable.js":82}],85:[function(require,module,exports){
+},{"events":50,"inherits":56,"readable-stream/duplex.js":68,"readable-stream/passthrough.js":78,"readable-stream/readable.js":79,"readable-stream/transform.js":80,"readable-stream/writable.js":81}],84:[function(require,module,exports){
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
@@ -17421,7 +17615,7 @@ function simpleWrite(buf) {
function simpleEnd(buf) {
return buf && buf.length ? this.write(buf) : '';
}
-},{"safe-buffer":83}],86:[function(require,module,exports){
+},{"safe-buffer":82}],85:[function(require,module,exports){
(function (setImmediate,clearImmediate){
var nextTick = require('process/browser.js').nextTick;
var apply = Function.prototype.apply;
@@ -17500,7 +17694,7 @@ exports.clearImmediate = typeof clearImmediate === "function" ? clearImmediate :
delete immediateIds[id];
};
}).call(this,require("timers").setImmediate,require("timers").clearImmediate)
-},{"process/browser.js":69,"timers":86}],87:[function(require,module,exports){
+},{"process/browser.js":67,"timers":85}],86:[function(require,module,exports){
(function (global){
/**
@@ -17571,6 +17765,31 @@ function config (name) {
}
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],87:[function(require,module,exports){
+if (typeof Object.create === 'function') {
+ // implementation from standard node.js 'util' module
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ // old school shim for old browsers
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
},{}],88:[function(require,module,exports){
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
@@ -18168,10 +18387,10 @@ function hasOwnProperty(obj, prop) {
}
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
-},{"./support/isBuffer":88,"_process":69,"inherits":56}],90:[function(require,module,exports){
+},{"./support/isBuffer":88,"_process":67,"inherits":87}],90:[function(require,module,exports){
module.exports={
"name": "mocha",
- "version": "7.1.1",
+ "version": "8.0.1",
"homepage": "https://mochajs.org/",
"notifyLogo": "https://ibin.co/4QuRuGjXvl36.png"
}
From 3f23f552846fa14d3fd67147fa9d9004d41c2a4d Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 26 Jul 2020 11:56:17 +0900
Subject: [PATCH 22/28] 3.18.0
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8b0c534..c4670b3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.17.0",
+ "version": "3.18.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index f961036..9ebb0e6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.17.0",
+ "version": "3.18.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From 402c7a38e8ddac27293c471c172483d95b72dcbb Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 6 Sep 2020 14:52:02 +0900
Subject: [PATCH 23/28] Update dev dependencies.
---
package-lock.json | 368 ++++++++++++++++++++++++++++++----------------
1 file changed, 239 insertions(+), 129 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index c4670b3..b8c0e2e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -43,6 +43,24 @@
}
}
},
+ "@eslint/eslintrc": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz",
+ "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.12.4",
+ "debug": "^4.1.1",
+ "espree": "^7.3.0",
+ "globals": "^12.1.0",
+ "ignore": "^4.0.6",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^3.13.1",
+ "lodash": "^4.17.19",
+ "minimatch": "^3.0.4",
+ "strip-json-comments": "^3.1.1"
+ }
+ },
"@types/color-name": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
@@ -50,9 +68,9 @@
"dev": true
},
"acorn": {
- "version": "7.3.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.3.1.tgz",
- "integrity": "sha512-tLc0wSnatxAQHVHUapaHdz72pi9KUyHjq5KyHjGg9Y8Ifdc79pTh2XvI6I1/chZbnM7QtNKzh66ooDogPZSleA==",
+ "version": "7.4.0",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz",
+ "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==",
"dev": true
},
"acorn-jsx": {
@@ -62,9 +80,9 @@
"dev": true
},
"ajv": {
- "version": "6.12.3",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz",
- "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==",
+ "version": "6.12.4",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz",
+ "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -242,9 +260,9 @@
"dev": true
},
"supports-color": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
- "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true,
"requires": {
"has-flag": "^4.0.0"
@@ -259,9 +277,9 @@
"dev": true
},
"chokidar": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz",
- "integrity": "sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg==",
+ "version": "3.4.2",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz",
+ "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==",
"dev": true,
"requires": {
"anymatch": "~3.1.1",
@@ -271,7 +289,7 @@
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
- "readdirp": "~3.3.0"
+ "readdirp": "~3.4.0"
}
},
"cliui": {
@@ -318,9 +336,9 @@
"dev": true
},
"comment-parser": {
- "version": "0.7.5",
- "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.5.tgz",
- "integrity": "sha512-iH9YA35ccw94nx5244GVkpyC9eVTsL71jZz6iz5w6RIf79JLF2AsXHXq9p6Oaohyl3sx5qSMnGsWUDFIAfWL4w==",
+ "version": "0.7.6",
+ "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.6.tgz",
+ "integrity": "sha512-GKNxVA7/iuTnAqGADlTWX4tkhzxZKXp5fLJqKTlQLHkE65XDUKutZ3BHaJC5IGcper2tT3QRD1xr4o3jNpgXXg==",
"dev": true
},
"concat-map": {
@@ -467,12 +485,13 @@
"dev": true
},
"eslint": {
- "version": "7.5.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.5.0.tgz",
- "integrity": "sha512-vlUP10xse9sWt9SGRtcr1LAC67BENcQMFeV+w5EvLEoFe3xJ8cF1Skd0msziRx/VMC+72B4DxreCE+OR12OA6Q==",
+ "version": "7.8.1",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz",
+ "integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
+ "@eslint/eslintrc": "^0.1.3",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.2",
@@ -482,7 +501,7 @@
"eslint-scope": "^5.1.0",
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^1.3.0",
- "espree": "^7.2.0",
+ "espree": "^7.3.0",
"esquery": "^1.2.0",
"esutils": "^2.0.2",
"file-entry-cache": "^5.0.1",
@@ -526,15 +545,15 @@
}
},
"eslint-plugin-jsdoc": {
- "version": "30.0.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.0.3.tgz",
- "integrity": "sha512-EviSu0Hgc9Bhz00WhA6829KYC9BaP6JWoycOTA1xFxjQ/2XguRlB3r6nGNA/jkmMDQp5dTQ22s1kAJIaC+dE8Q==",
+ "version": "30.3.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.3.2.tgz",
+ "integrity": "sha512-52p1xlKNm2Rodo51jUPIQ1ytKXH6Uj88mDJgmZ1znRKjynDQOO4ZS9cx5FqFoRXk/iqHv15QxHkQCBVeWViIog==",
"dev": true,
"requires": {
- "comment-parser": "^0.7.5",
+ "comment-parser": "^0.7.6",
"debug": "^4.1.1",
- "jsdoctypeparser": "^8.0.0",
- "lodash": "^4.17.15",
+ "jsdoctypeparser": "^9.0.0",
+ "lodash": "^4.17.20",
"regextras": "^0.7.1",
"semver": "^7.3.2",
"spdx-expression-parse": "^3.0.1"
@@ -575,12 +594,12 @@
"dev": true
},
"espree": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/espree/-/espree-7.2.0.tgz",
- "integrity": "sha512-H+cQ3+3JYRMEIOl87e7QdHX70ocly5iW4+dttuR8iYSPr/hXKFb+7dBsZ7+u1adC4VrnPlTkv0+OwuPnDop19g==",
+ "version": "7.3.0",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz",
+ "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==",
"dev": true,
"requires": {
- "acorn": "^7.3.1",
+ "acorn": "^7.4.0",
"acorn-jsx": "^5.2.0",
"eslint-visitor-keys": "^1.3.0"
}
@@ -601,20 +620,28 @@
},
"dependencies": {
"estraverse": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.1.0.tgz",
- "integrity": "sha512-FyohXK+R0vE+y1nHLoBM7ZTyqRpqAlhdZHCWIWEviFLiGB8b04H6bQs8G+XTthacvT8VuwvteiP7RJSxMs8UEw==",
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+ "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
"dev": true
}
}
},
"esrecurse": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
- "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
"dev": true,
"requires": {
- "estraverse": "^4.1.0"
+ "estraverse": "^5.2.0"
+ },
+ "dependencies": {
+ "estraverse": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+ "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
+ "dev": true
+ }
}
},
"estraverse": {
@@ -672,12 +699,12 @@
}
},
"find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"requires": {
- "locate-path": "^5.0.0",
+ "locate-path": "^6.0.0",
"path-exists": "^4.0.0"
}
},
@@ -919,10 +946,16 @@
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true
},
- "is-regex": {
+ "is-plain-obj": {
"version": "1.1.0",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
- "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==",
+ "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
+ "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
+ "dev": true
+ },
+ "is-regex": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
+ "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
"dev": true,
"requires": {
"has-symbols": "^1.0.1"
@@ -994,9 +1027,9 @@
}
},
"jsdoctypeparser": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-8.0.0.tgz",
- "integrity": "sha512-eLCs6s4JqN8TjFJfgdiLHRvogLhOAJz+5RIA2FtoMe6ZDyuvghvppnlIToqAEnVbxRqLMrfnNXpW8FpmR6IMBw==",
+ "version": "9.0.0",
+ "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz",
+ "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==",
"dev": true
},
"json-schema-traverse": {
@@ -1022,40 +1055,27 @@
}
},
"locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"requires": {
- "p-locate": "^4.1.0"
+ "p-locate": "^5.0.0"
}
},
"lodash": {
- "version": "4.17.19",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
- "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==",
+ "version": "4.17.20",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
+ "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==",
"dev": true
},
"log-symbols": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
- "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
+ "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
"dev": true,
"requires": {
- "chalk": "^2.4.2"
- },
- "dependencies": {
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- }
+ "chalk": "^4.0.0"
}
},
"minimatch": {
@@ -1083,28 +1103,28 @@
}
},
"mocha": {
- "version": "8.0.1",
- "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.0.1.tgz",
- "integrity": "sha512-vefaXfdYI8+Yo8nPZQQi0QO2o+5q9UIMX1jZ1XMmK3+4+CQjc7+B0hPdUeglXiTlr8IHMVRo63IhO9Mzt6fxOg==",
+ "version": "8.1.3",
+ "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.3.tgz",
+ "integrity": "sha512-ZbaYib4hT4PpF4bdSO2DohooKXIn4lDeiYqB+vTmCdr6l2woW0b6H3pf5x4sM5nwQMru9RvjjHYWVGltR50ZBw==",
"dev": true,
"requires": {
"ansi-colors": "4.1.1",
"browser-stdout": "1.3.1",
- "chokidar": "3.3.1",
- "debug": "3.2.6",
+ "chokidar": "3.4.2",
+ "debug": "4.1.1",
"diff": "4.0.2",
- "escape-string-regexp": "1.0.5",
- "find-up": "4.1.0",
+ "escape-string-regexp": "4.0.0",
+ "find-up": "5.0.0",
"glob": "7.1.6",
"growl": "1.10.5",
"he": "1.2.0",
- "js-yaml": "3.13.1",
- "log-symbols": "3.0.0",
+ "js-yaml": "3.14.0",
+ "log-symbols": "4.0.0",
"minimatch": "3.0.4",
"ms": "2.1.2",
"object.assign": "4.1.0",
"promise.allsettled": "1.0.2",
- "serialize-javascript": "3.0.0",
+ "serialize-javascript": "4.0.0",
"strip-json-comments": "3.0.1",
"supports-color": "7.1.0",
"which": "2.0.2",
@@ -1112,17 +1132,14 @@
"workerpool": "6.0.0",
"yargs": "13.3.2",
"yargs-parser": "13.1.2",
- "yargs-unparser": "1.6.0"
+ "yargs-unparser": "1.6.1"
},
"dependencies": {
- "debug": {
- "version": "3.2.6",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
- "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
- "dev": true,
- "requires": {
- "ms": "^2.1.1"
- }
+ "escape-string-regexp": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+ "dev": true
},
"has-flag": {
"version": "4.0.0",
@@ -1130,16 +1147,6 @@
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true
},
- "js-yaml": {
- "version": "3.13.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
- "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
- "dev": true,
- "requires": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- }
- },
"strip-json-comments": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
@@ -1223,21 +1230,21 @@
}
},
"p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz",
+ "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==",
"dev": true,
"requires": {
"p-try": "^2.0.0"
}
},
"p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"requires": {
- "p-limit": "^2.2.0"
+ "p-limit": "^3.0.2"
}
},
"p-try": {
@@ -1292,9 +1299,9 @@
"dev": true
},
"prettier": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz",
- "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.1.1.tgz",
+ "integrity": "sha512-9bY+5ZWCfqj3ghYBLxApy2zf6m+NJo5GzmLTpr9FsApsfjriNnS2dahWReHMi7qNPhhHl9SYHJs2cHZLgexNIw==",
"dev": true
},
"prettier-linter-helpers": {
@@ -1331,13 +1338,22 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
"dev": true
},
+ "randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "requires": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
"readdirp": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz",
- "integrity": "sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ==",
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz",
+ "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==",
"dev": true,
"requires": {
- "picomatch": "^2.0.7"
+ "picomatch": "^2.2.1"
}
},
"regexpp": {
@@ -1379,6 +1395,12 @@
"glob": "^7.1.3"
}
},
+ "safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true
+ },
"semver": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz",
@@ -1386,10 +1408,13 @@
"dev": true
},
"serialize-javascript": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-3.0.0.tgz",
- "integrity": "sha512-skZcHYw2vEX4bw90nAr2iTTsz6x2SrHEnfxgKYmZlvJYBEZrvbKtobJWlQ20zczKb3bsHHXXTYt48zBA7ni9cw==",
- "dev": true
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
+ "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
+ "dev": true,
+ "requires": {
+ "randombytes": "^2.1.0"
+ }
},
"set-blocking": {
"version": "2.0.0",
@@ -1572,15 +1597,15 @@
"dev": true
},
"uglify-js": {
- "version": "3.10.0",
- "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz",
- "integrity": "sha512-Esj5HG5WAyrLIdYU74Z3JdG2PxdIusvj6IWHMtlyESxc7kcDz7zYlYjpnSokn1UbpV0d/QX9fan7gkCNd/9BQA==",
+ "version": "3.10.3",
+ "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.3.tgz",
+ "integrity": "sha512-Lh00i69Uf6G74mvYpHCI9KVVXLcHW/xu79YTvH7Mkc9zyKUeSPz0owW0dguj0Scavns3ZOh3wY63J0Zb97Za2g==",
"dev": true
},
"uri-js": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
- "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz",
+ "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==",
"dev": true,
"requires": {
"punycode": "^2.1.0"
@@ -1741,6 +1766,15 @@
"path-exists": "^3.0.0"
}
},
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
"p-locate": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
@@ -1769,14 +1803,90 @@
}
},
"yargs-unparser": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
- "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz",
+ "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==",
"dev": true,
"requires": {
+ "camelcase": "^5.3.1",
+ "decamelize": "^1.2.0",
"flat": "^4.1.0",
- "lodash": "^4.17.15",
- "yargs": "^13.3.0"
+ "is-plain-obj": "^1.1.0",
+ "yargs": "^14.2.3"
+ },
+ "dependencies": {
+ "find-up": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+ "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+ "dev": true,
+ "requires": {
+ "locate-path": "^3.0.0"
+ }
+ },
+ "locate-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+ "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+ "dev": true,
+ "requires": {
+ "p-locate": "^3.0.0",
+ "path-exists": "^3.0.0"
+ }
+ },
+ "p-limit": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+ "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+ "dev": true,
+ "requires": {
+ "p-try": "^2.0.0"
+ }
+ },
+ "p-locate": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+ "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+ "dev": true,
+ "requires": {
+ "p-limit": "^2.0.0"
+ }
+ },
+ "path-exists": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+ "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+ "dev": true
+ },
+ "yargs": {
+ "version": "14.2.3",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
+ "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
+ "dev": true,
+ "requires": {
+ "cliui": "^5.0.0",
+ "decamelize": "^1.2.0",
+ "find-up": "^3.0.0",
+ "get-caller-file": "^2.0.1",
+ "require-directory": "^2.1.1",
+ "require-main-filename": "^2.0.0",
+ "set-blocking": "^2.0.0",
+ "string-width": "^3.0.0",
+ "which-module": "^2.0.0",
+ "y18n": "^4.0.0",
+ "yargs-parser": "^15.0.1"
+ }
+ },
+ "yargs-parser": {
+ "version": "15.0.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
+ "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
+ "dev": true,
+ "requires": {
+ "camelcase": "^5.0.0",
+ "decamelize": "^1.2.0"
+ }
+ }
}
}
}
From 0d0e03882313cf1c192fb4b68c4c78ab7d7d8c7a Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 6 Sep 2020 14:52:12 +0900
Subject: [PATCH 24/28] 3.19.0
---
package-lock.json | 2 +-
package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b8c0e2e..f8240f5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.18.0",
+ "version": "3.19.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 9ebb0e6..48c9185 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "blueimp-tmpl",
- "version": "3.18.0",
+ "version": "3.19.0",
"title": "JavaScript Templates",
"description": "1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like Node.js, module loaders like RequireJS, Browserify or webpack and all web browsers.",
"keywords": [
From 01cd382359d7091579668d04ed10d42f777759dd Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 26 Sep 2021 00:00:27 +0900
Subject: [PATCH 25/28] Update test workflow.
---
.github/workflows/test.yml | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index bf627ae..d8c4a79 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -5,21 +5,14 @@ on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
-
strategy:
matrix:
- node-version: [10.x, 12.x]
-
+ node-version: [14, 16]
steps:
- uses: actions/checkout@v2
- - name: Use Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v1
+ - uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- - name: npm install, build, and test
- run: |
- npm install
- npm run build --if-present
- npm test
- env:
- CI: true
+ - run: npm install
+ - run: npm run build --if-present
+ - run: npm run test
From 5a4bd15eea01b84dc36270f447f030ef156cab52 Mon Sep 17 00:00:00 2001
From: Sebastian Tschan
Date: Sun, 26 Sep 2021 00:03:11 +0900
Subject: [PATCH 26/28] Update dev dependencies.
---
js/compile.js | 3 +-
js/tmpl.js | 3 +-
js/tmpl.min.js | 2 +-
js/tmpl.min.js.map | 2 +-
package-lock.json | 3508 ++-
package.json | 8 +-
test/vendor/chai.js | 253 +-
test/vendor/mocha.js | 49197 ++++++++++++++++++++++++++---------------
8 files changed, 33643 insertions(+), 19333 deletions(-)
diff --git a/js/compile.js b/js/compile.js
index 122d034..3fdd1e5 100755
--- a/js/compile.js
+++ b/js/compile.js
@@ -21,7 +21,8 @@
// Retrieve the content of the minimal runtime:
var runtime = fs.readFileSync(path.join(__dirname, 'runtime.js'), 'utf8')
// A regular expression to parse templates from script tags in a HTML page:
- var regexp = /