npm update with fix to new eslint issues

master
jfh 2020-10-25 17:54:04 +01:00
parent ea4a33dc83
commit f2698c2ca8
13 changed files with 151 additions and 195 deletions

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 51.11%</text><text class="high" x="5" y="14">Statements 51.11%</text><text class="shadow" x="125.5" y="15">Branches 40.85%</text><text class="high" x="125" y="14">Branches 40.85%</text><text class="shadow" x="234.5" y="15">Lines 51.82%</text><text class="high" x="234" y="14">Lines 51.82%</text><text class="shadow" x="321.5" y="15">Functions 58.62%</text><text class="high" x="321" y="14">Functions 58.62%</text></g></svg> <svg xmlns="http://www.w3.org/2000/svg" width="428" height="20"><defs><style>text{font-size:11px;font-family:Verdana,DejaVu Sans,Geneva,sans-serif}text.shadow{fill:#010101;fill-opacity:.3}text.high{fill:#fff}</style><linearGradient id="smooth" x2="0" y2="100%"><stop offset="0" stop-color="#aaa" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></linearGradient><mask id="round"><rect width="100%" height="100%" rx="3" fill="#fff"/></mask></defs><g id="bg" mask="url(#round)"><path fill="green" stroke="#000" d="M0 0h120v20H0zM120 0h109v20H120zM229 0h87v20h-87zM316 0h112v20H316z"/><path fill="url(#smooth)" d="M0 0h428v20H0z"/></g><g id="fg"><text class="shadow" x="5.5" y="15">Statements 51.21%</text><text class="high" x="5" y="14">Statements 51.21%</text><text class="shadow" x="125.5" y="15">Branches 40.94%</text><text class="high" x="125" y="14">Branches 40.94%</text><text class="shadow" x="234.5" y="15">Lines 51.94%</text><text class="high" x="234" y="14">Lines 51.94%</text><text class="shadow" x="321.5" y="15">Functions 58.24%</text><text class="high" x="321" y="14">Functions 58.24%</text></g></svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

180
package-lock.json generated
View File

@ -1966,6 +1966,7 @@
"version": "7.11.2", "version": "7.11.2",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz",
"integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==", "integrity": "sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw==",
"dev": true,
"requires": { "requires": {
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
} }
@ -1974,7 +1975,6 @@
"version": "7.12.1", "version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.1.tgz", "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.12.1.tgz",
"integrity": "sha512-umhPIcMrlBZ2aTWlWjUseW9LjQKxi1dpFlQS8DzsxB//5K+u6GLTC/JliPKHsd5kJVPIU6X/Hy0YvWOYPcMxBw==", "integrity": "sha512-umhPIcMrlBZ2aTWlWjUseW9LjQKxi1dpFlQS8DzsxB//5K+u6GLTC/JliPKHsd5kJVPIU6X/Hy0YvWOYPcMxBw==",
"dev": true,
"requires": { "requires": {
"core-js-pure": "^3.0.0", "core-js-pure": "^3.0.0",
"regenerator-runtime": "^0.13.4" "regenerator-runtime": "^0.13.4"
@ -2043,9 +2043,9 @@
"dev": true "dev": true
}, },
"@cypress/browserify-preprocessor": { "@cypress/browserify-preprocessor": {
"version": "3.0.0", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/@cypress/browserify-preprocessor/-/browserify-preprocessor-3.0.0.tgz", "resolved": "https://registry.npmjs.org/@cypress/browserify-preprocessor/-/browserify-preprocessor-3.0.1.tgz",
"integrity": "sha512-8CXLCKlXVUnad5TjwVswq4nwwWVyt5Z+HMgrFaD2yF7A62AA6OYDrShTQnG6M6+hr1cq1X4zYbo7VT4oxex5hA==", "integrity": "sha512-sErmFSEr5287bLMRl0POGnyFtJCs/lSk5yxrUIJUIHZ8eDvtTEr0V93xRgLjJVG54gJU4MbpHy1mRPA9VZbtQA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/core": "7.4.5", "@babel/core": "7.4.5",
@ -2167,14 +2167,25 @@
}, },
"dependencies": { "dependencies": {
"@babel/plugin-proposal-object-rest-spread": { "@babel/plugin-proposal-object-rest-spread": {
"version": "7.11.0", "version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.11.0.tgz", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz",
"integrity": "sha512-wzch41N4yztwoRw0ak+37wxwJM2oiIiy6huGCoqkvSTA9acYWcPfn9Y4aJqmFFJ70KTJUu29f3DQ43uJ9HXzEA==", "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/helper-plugin-utils": "^7.10.4", "@babel/helper-plugin-utils": "^7.10.4",
"@babel/plugin-syntax-object-rest-spread": "^7.8.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.0",
"@babel/plugin-transform-parameters": "^7.10.4" "@babel/plugin-transform-parameters": "^7.12.1"
},
"dependencies": {
"@babel/plugin-transform-parameters": {
"version": "7.12.1",
"resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz",
"integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==",
"dev": true,
"requires": {
"@babel/helper-plugin-utils": "^7.10.4"
}
}
} }
} }
} }
@ -2188,12 +2199,6 @@
"regenerator-runtime": "^0.12.0" "regenerator-runtime": "^0.12.0"
} }
}, },
"coffeescript": {
"version": "1.12.7",
"resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz",
"integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==",
"dev": true
},
"debug": { "debug": {
"version": "4.1.1", "version": "4.1.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
@ -2230,27 +2235,44 @@
} }
}, },
"@cypress/code-coverage": { "@cypress/code-coverage": {
"version": "3.8.1", "version": "3.8.2",
"resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.8.1.tgz", "resolved": "https://registry.npmjs.org/@cypress/code-coverage/-/code-coverage-3.8.2.tgz",
"integrity": "sha512-XkecqM/4xHZdAPUMOxOUi5yf2TDWUycqIi6Z6zdGiO9j04CxkRoVTOJYsE14i7uG7orudYSLcLFJEeJv237qXQ==", "integrity": "sha512-wgzUxWAbsMJVyxnfyqF0VcyDXz38mnWpTpEnr+DFugKnDF7CQ9uwmvnGX1KN4d8kIGT9WpwaycJaLMwIStB+yw==",
"dev": true, "dev": true,
"requires": { "requires": {
"@cypress/browserify-preprocessor": "3.0.0", "@cypress/browserify-preprocessor": "3.0.1",
"debug": "4.1.1", "debug": "4.2.0",
"execa": "4.0.2", "execa": "4.0.3",
"globby": "11.0.0", "globby": "11.0.1",
"istanbul-lib-coverage": "3.0.0", "istanbul-lib-coverage": "3.0.0",
"js-yaml": "3.14.0", "js-yaml": "3.14.0",
"nyc": "15.1.0" "nyc": "15.1.0"
}, },
"dependencies": { "dependencies": {
"debug": { "debug": {
"version": "4.1.1", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "^2.1.1" "ms": "2.1.2"
}
},
"execa": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz",
"integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==",
"dev": true,
"requires": {
"cross-spawn": "^7.0.0",
"get-stream": "^5.0.0",
"human-signals": "^1.1.1",
"is-stream": "^2.0.0",
"merge-stream": "^2.0.0",
"npm-run-path": "^4.0.0",
"onetime": "^5.1.0",
"signal-exit": "^3.0.2",
"strip-final-newline": "^2.0.0"
} }
}, },
"ms": { "ms": {
@ -2584,9 +2606,9 @@
} }
}, },
"@eslint/eslintrc": { "@eslint/eslintrc": {
"version": "0.1.3", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.0.tgz",
"integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", "integrity": "sha512-+cIGPCBdLCzqxdtwppswP+zTsH9BOIGzAeKfBIbtb4gW/giMlfMwP0HUSFfhzh20f9u8uZ8hOp62+4GPquTbwQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ajv": "^6.12.4", "ajv": "^6.12.4",
@ -6807,16 +6829,16 @@
"dev": true "dev": true
}, },
"canvg": { "canvg": {
"version": "3.0.6", "version": "3.0.7",
"resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.6.tgz", "resolved": "https://registry.npmjs.org/canvg/-/canvg-3.0.7.tgz",
"integrity": "sha512-eFUy8R/4DgocR93LF8lr+YUxW4PYblUe/Q1gz2osk/cI5n8AsYdassvln0D9QPhLXQ6Lx7l8hwtT8FLvOn2Ihg==", "integrity": "sha512-4sq6iL5Q4VOXS3PL1BapiXIZItpxYyANVzsAKpTPS5oq4u3SKbGfUcbZh2gdLCQ3jWpG/y5wRkMlBBAJhXeiZA==",
"requires": { "requires": {
"@babel/runtime": "^7.6.3", "@babel/runtime-corejs3": "^7.9.6",
"@types/raf": "^3.4.0", "@types/raf": "^3.4.0",
"core-js": "3",
"raf": "^3.4.1", "raf": "^3.4.1",
"rgbcolor": "^1.0.1", "rgbcolor": "^1.0.1",
"stackblur-canvas": "^2.0.0" "stackblur-canvas": "^2.0.0",
"svg-pathdata": "^5.0.5"
} }
}, },
"caseless": { "caseless": {
@ -7515,8 +7537,7 @@
"core-js-pure": { "core-js-pure": {
"version": "3.6.5", "version": "3.6.5",
"resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz",
"integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA=="
"dev": true
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.2",
@ -9536,13 +9557,13 @@
} }
}, },
"eslint": { "eslint": {
"version": "7.11.0", "version": "7.12.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.11.0.tgz", "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.12.0.tgz",
"integrity": "sha512-G9+qtYVCHaDi1ZuWzBsOWo2wSwd70TXnU6UHA3cTYHp7gCTXZcpggWFoUVAMRarg68qtPoNfFbzPh+VdOgmwmw==", "integrity": "sha512-n5pEU27DRxCSlOhJ2rO57GDLcNsxO0LPpAbpFdh7xmcDmjmlGUfoyrsB3I7yYdQXO5N3gkSTiDrPSPNFiiirXA==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/code-frame": "^7.0.0", "@babel/code-frame": "^7.0.0",
"@eslint/eslintrc": "^0.1.3", "@eslint/eslintrc": "^0.2.0",
"ajv": "^6.10.0", "ajv": "^6.10.0",
"chalk": "^4.0.0", "chalk": "^4.0.0",
"cross-spawn": "^7.0.2", "cross-spawn": "^7.0.2",
@ -9823,15 +9844,15 @@
} }
}, },
"eslint-config-ash-nazg": { "eslint-config-ash-nazg": {
"version": "22.8.0", "version": "22.9.0",
"resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-22.8.0.tgz", "resolved": "https://registry.npmjs.org/eslint-config-ash-nazg/-/eslint-config-ash-nazg-22.9.0.tgz",
"integrity": "sha512-MKl2kW6cbH28nMs9MAGcg10PB3YGpUenYLpbHKBpCNa1jjN3Q/SHQTm0VDgHO7KyczJjmLpZDN8rfRpmegbVsQ==", "integrity": "sha512-jlU9E06xrAdxHgM+nQLAKhH2QvpmFM7JVb7w4i7T4r0zNBsBk1nWEJbmD6b6mJN01S7dlO7QaOcLzymGKg+Alw==",
"dev": true "dev": true
}, },
"eslint-config-standard": { "eslint-config-standard": {
"version": "14.1.1", "version": "15.0.0",
"resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-15.0.0.tgz",
"integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", "integrity": "sha512-MZ8KRhUJLtMbjQo9PsEzFG29vqbQJfLoLBHrTaAaFMtDx9PIm1GZgyUanOLgf1xOE1aWrtZZSbxBYCy8dJCCBg==",
"dev": true "dev": true
}, },
"eslint-import-resolver-node": { "eslint-import-resolver-node": {
@ -10082,9 +10103,9 @@
} }
}, },
"eslint-plugin-jsdoc": { "eslint-plugin-jsdoc": {
"version": "30.6.5", "version": "30.7.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.6.5.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-30.7.3.tgz",
"integrity": "sha512-obC3wi1/b5hsPLXa3ZDs571QXGqkVsphndMsIsVQzWRdZOaRbxdvGiKhLzzZytbRZAL1M1Bkdc/3Af7eNxJ/Hg==", "integrity": "sha512-slzJeKrm3vXabRYcFBpbUgWgdnATN9rNOFAr7IhmkxmR9Vk/6qN1c/IdvTqVSEctDRQ08chR+Lvk8fRayXgYZg==",
"dev": true, "dev": true,
"requires": { "requires": {
"comment-parser": "^0.7.6", "comment-parser": "^0.7.6",
@ -10164,9 +10185,9 @@
} }
}, },
"eslint-plugin-mocha-cleanup": { "eslint-plugin-mocha-cleanup": {
"version": "1.8.0", "version": "1.9.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-mocha-cleanup/-/eslint-plugin-mocha-cleanup-1.8.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-mocha-cleanup/-/eslint-plugin-mocha-cleanup-1.9.1.tgz",
"integrity": "sha512-LvnHn1FPz9NdMcORRl9sytr/chV99KPMEBzqc9QIqVJvy+93BhtFjq135kKrnVW4Re8QHJNZpkC4QakuvQ3qbg==", "integrity": "sha512-pRlkXdEy9kDvOT1bG6IdOWX95Ykco2rUPVRZ8wEeU81NbQCUaI+qrMcD64PnOJFSw498jyST2919a2+KsbPXZw==",
"dev": true, "dev": true,
"requires": { "requires": {
"requireindex": "~1.2.0" "requireindex": "~1.2.0"
@ -10259,15 +10280,15 @@
"dev": true "dev": true
}, },
"eslint-plugin-standard": { "eslint-plugin-standard": {
"version": "4.0.1", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz",
"integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", "integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA==",
"dev": true "dev": true
}, },
"eslint-plugin-unicorn": { "eslint-plugin-unicorn": {
"version": "22.0.0", "version": "23.0.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-22.0.0.tgz", "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-23.0.0.tgz",
"integrity": "sha512-jXPOauNiVFYLr+AeU3l21Ao+iDl/G08vUWui21RCI2L1TJIIoJvAMjMR6I+QPKr8FgIumzuR6gzDKCtEx2IkzA==", "integrity": "sha512-Vabo3cjl6cjyhcf+76CdQEY6suOFzK0Xh3xo0uL9VDYrDJP5+B6PjV0tHTYm82WZmFWniugFJM3ywHSNYTi/ZQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"ci-info": "^2.0.0", "ci-info": "^2.0.0",
@ -11437,9 +11458,9 @@
"dev": true "dev": true
}, },
"globby": { "globby": {
"version": "11.0.0", "version": "11.0.1",
"resolved": "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz",
"integrity": "sha512-iuehFnR3xu5wBBtm4xi0dMe92Ob87ufyu/dHwpDYfbcpYpIbrO5OnS8M1vWvrBhSGEJ3/Ecj7gnX76P8YxpPEg==", "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"array-union": "^2.1.0", "array-union": "^2.1.0",
@ -11448,14 +11469,6 @@
"ignore": "^5.1.4", "ignore": "^5.1.4",
"merge2": "^1.3.0", "merge2": "^1.3.0",
"slash": "^3.0.0" "slash": "^3.0.0"
},
"dependencies": {
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
}
} }
}, },
"got": { "got": {
@ -13835,9 +13848,9 @@
} }
}, },
"lint-staged": { "lint-staged": {
"version": "10.4.1", "version": "10.4.2",
"resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.1.tgz", "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.4.2.tgz",
"integrity": "sha512-E2Y6Mu1haUD3ZefzwBG8tqy3QDQ9udWRS946YcuDCU8Mi22RjwxrEhLrqTLszxl80DG/sCtKdGCArzEkTsBzJQ==", "integrity": "sha512-OLCA9K1hS+Sl179SO6kX0JtnsaKj/MZalEhUj5yAgXsb63qPI/Gfn6Ua1KuZdbfkZNEu3/n5C/obYCu70IMt9g==",
"dev": true, "dev": true,
"requires": { "requires": {
"chalk": "^4.1.0", "chalk": "^4.1.0",
@ -13917,9 +13930,9 @@
"dev": true "dev": true
}, },
"commander": { "commander": {
"version": "6.1.0", "version": "6.2.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-6.1.0.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz",
"integrity": "sha512-wl7PNrYWd2y5mp1OK/LhTlv8Ff4kQJQRXXAvF+uU/TPNiVJUxZLRYGj/B0y/lPGAVcSbJqH2Za/cvHmrPMC8mA==", "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==",
"dev": true "dev": true
}, },
"cosmiconfig": { "cosmiconfig": {
@ -19036,9 +19049,9 @@
} }
}, },
"rollup": { "rollup": {
"version": "2.32.0", "version": "2.32.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.32.0.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.32.1.tgz",
"integrity": "sha512-0FIG1jY88uhCP2yP4CfvtKEqPDRmsUwfY1kEOOM+DH/KOGATgaIFd/is1+fQOxsvh62ELzcFfKonwKWnHhrqmw==", "integrity": "sha512-Op2vWTpvK7t6/Qnm1TTh7VjEZZkN8RWgf0DHbkKzQBwNf748YhXbozHVefqpPp/Fuyk/PQPAnYsBxAEtlMvpUw==",
"dev": true, "dev": true,
"requires": { "requires": {
"fsevents": "~2.1.2" "fsevents": "~2.1.2"
@ -19496,6 +19509,12 @@
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
"dev": true "dev": true
}, },
"slash": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
"integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
"dev": true
},
"slice-ansi": { "slice-ansi": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz",
@ -20293,6 +20312,11 @@
"has-flag": "^3.0.0" "has-flag": "^3.0.0"
} }
}, },
"svg-pathdata": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-5.0.5.tgz",
"integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow=="
},
"svg2pdf.js": { "svg2pdf.js": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/svg2pdf.js/-/svg2pdf.js-2.0.0.tgz", "resolved": "https://registry.npmjs.org/svg2pdf.js/-/svg2pdf.js-2.0.0.tgz",

View File

@ -135,7 +135,7 @@
], ],
"dependencies": { "dependencies": {
"@babel/polyfill": "^7.12.1", "@babel/polyfill": "^7.12.1",
"canvg": "^3.0.6", "canvg": "^3.0.7",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"jspdf": "^2.1.1", "jspdf": "^2.1.1",
"pathseg": "^1.2.0", "pathseg": "^1.2.0",
@ -147,7 +147,7 @@
"@babel/preset-env": "^7.12.1", "@babel/preset-env": "^7.12.1",
"@babel/register": "^7.12.1", "@babel/register": "^7.12.1",
"@babel/runtime-corejs3": "^7.12.1", "@babel/runtime-corejs3": "^7.12.1",
"@cypress/code-coverage": "^3.8.1", "@cypress/code-coverage": "^3.8.2",
"@cypress/fiddle": "^1.18.3", "@cypress/fiddle": "^1.18.3",
"@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2", "@fintechstudios/eslint-plugin-chai-as-promised": "^3.0.2",
"@hkdobrev/run-if-changed": "^0.3.1", "@hkdobrev/run-if-changed": "^0.3.1",
@ -172,9 +172,9 @@
"es-dev-commonjs-transformer": "^0.2.0", "es-dev-commonjs-transformer": "^0.2.0",
"es-dev-server": "^1.57.8", "es-dev-server": "^1.57.8",
"es-dev-server-rollup": "0.0.8", "es-dev-server-rollup": "0.0.8",
"eslint": "^7.11.0", "eslint": "^7.12.0",
"eslint-config-ash-nazg": "^22.8.0", "eslint-config-ash-nazg": "^22.9.0",
"eslint-config-standard": "^14.1.1", "eslint-config-standard": "^15.0.0",
"eslint-plugin-array-func": "^3.1.7", "eslint-plugin-array-func": "^3.1.7",
"eslint-plugin-chai-expect": "^2.2.0", "eslint-plugin-chai-expect": "^2.2.0",
"eslint-plugin-chai-expect-keywords": "^2.0.1", "eslint-plugin-chai-expect-keywords": "^2.0.1",
@ -184,23 +184,23 @@
"eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-html": "^6.1.0", "eslint-plugin-html": "^6.1.0",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.6.5", "eslint-plugin-jsdoc": "^30.7.3",
"eslint-plugin-markdown": "^1.0.2", "eslint-plugin-markdown": "^1.0.2",
"eslint-plugin-mocha": "^8.0.0", "eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-mocha-cleanup": "^1.8.0", "eslint-plugin-mocha-cleanup": "^1.9.1",
"eslint-plugin-no-unsanitized": "^3.1.4", "eslint-plugin-no-unsanitized": "^3.1.4",
"eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-no-use-extend-native": "^0.5.0",
"eslint-plugin-node": "^11.1.0", "eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1", "eslint-plugin-promise": "^4.2.1",
"eslint-plugin-sonarjs": "^0.5.0", "eslint-plugin-sonarjs": "^0.5.0",
"eslint-plugin-standard": "^4.0.1", "eslint-plugin-standard": "^4.0.2",
"eslint-plugin-unicorn": "^22.0.0", "eslint-plugin-unicorn": "^23.0.0",
"husky": "^4.3.0", "husky": "^4.3.0",
"imageoptim-cli": "^3.0.2", "imageoptim-cli": "^3.0.2",
"jamilih": "^0.53.2", "jamilih": "^0.53.2",
"jsdoc": "^3.6.6", "jsdoc": "^3.6.6",
"license-badger": "^0.18.0", "license-badger": "^0.18.0",
"lint-staged": "^10.4.1", "lint-staged": "^10.4.2",
"mocha": "^8.2.0", "mocha": "^8.2.0",
"mocha-badge-generator": "^0.8.0", "mocha-badge-generator": "^0.8.0",
"mochawesome": "^6.1.1", "mochawesome": "^6.1.1",
@ -217,7 +217,7 @@
"remark-lint-ordered-list-marker-value": "^2.0.1", "remark-lint-ordered-list-marker-value": "^2.0.1",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"rollup": "2.32.0", "rollup": "2.32.1",
"rollup-plugin-copy": "^3.3.0", "rollup-plugin-copy": "^3.3.0",
"rollup-plugin-filesize": "^9.0.2", "rollup-plugin-filesize": "^9.0.2",
"rollup-plugin-node-polyfills": "^0.2.1", "rollup-plugin-node-polyfills": "^0.2.1",

View File

@ -28,11 +28,7 @@ function transformToString (xform) {
text = 'translate(' + m.e + ',' + m.f + ')'; text = 'translate(' + m.e + ',' + m.f + ')';
break; break;
case 3: // SCALE case 3: // SCALE
if (m.a === m.d) { text = (m.a === m.d) ? `scale(${m.a})` : `scale(${m.a},${m.d})`;
text = 'scale(' + m.a + ')';
} else {
text = 'scale(' + m.a + ',' + m.d + ')';
}
break; break;
case 4: { // ROTATE case 4: { // ROTATE
let cx = 0; let cx = 0;

View File

@ -315,11 +315,7 @@ export const convertToXMLReferences = function (input) {
let output = ''; let output = '';
[...input].forEach((ch) => { [...input].forEach((ch) => {
const c = ch.charCodeAt(); const c = ch.charCodeAt();
if (c <= 127) { output += (c <= 127) ? ch : `&#${c};`;
output += ch;
} else {
output += `&#${c};`;
}
}); });
return output; return output;
}; };
@ -778,18 +774,17 @@ export const getPathDFromElement = function (elem) {
h = b.height; h = b.height;
num = 4 - num; // Why? Because! num = 4 - num; // Why? Because!
if (!rx && !ry) { d = (!rx && !ry)
// Regular rect // Regular rect
d = getPathDFromSegments([ ? getPathDFromSegments([
['M', [x, y]], ['M', [x, y]],
['L', [x + w, y]], ['L', [x + w, y]],
['L', [x + w, y + h]], ['L', [x + w, y + h]],
['L', [x, y + h]], ['L', [x, y + h]],
['L', [x, y]], ['L', [x, y]],
['Z', []] ['Z', []]
]); ])
} else { : getPathDFromSegments([
d = getPathDFromSegments([
['M', [x, y + ry]], ['M', [x, y + ry]],
['C', [x, y + ry / num, x + rx / num, y, x + rx, y]], ['C', [x, y + ry / num, x + rx / num, y, x + rx, y]],
['L', [x + w - rx, y]], ['L', [x + w - rx, y]],
@ -801,7 +796,6 @@ export const getPathDFromElement = function (elem) {
['L', [x, y + ry]], ['L', [x, y + ry]],
['Z', []] ['Z', []]
]); ]);
}
break; break;
} default: } default:
break; break;

View File

@ -58,11 +58,7 @@ export default {
svgCanvas.bind('setnonce', setArrowNonce); svgCanvas.bind('setnonce', setArrowNonce);
svgCanvas.bind('unsetnonce', unsetArrowNonce); svgCanvas.bind('unsetnonce', unsetArrowNonce);
if (randomizeIds) { arrowprefix = (randomizeIds) ? `${prefix}${nonce}_` : prefix;
arrowprefix = prefix + nonce + '_';
} else {
arrowprefix = prefix;
}
const pathdata = { const pathdata = {
fw: {d: 'm0,0l10,5l-10,5l5,-5l-5,-5z', refx: 8, id: arrowprefix + 'fw'}, fw: {d: 'm0,0l10,5l-10,5l5,-5l-5,-5z', refx: 8, id: arrowprefix + 'fw'},

View File

@ -189,10 +189,7 @@ export default {
let viewBox = '0 0 100 100'; let viewBox = '0 0 100 100';
let markerWidth = 5; let markerWidth = 5;
let markerHeight = 5; let markerHeight = 5;
let seType; const seType = (val.substr(0, 1) === '\\') ? val.substr(1) : 'textmarker';
if (val.substr(0, 1) === '\\') {
seType = val.substr(1);
} else { seType = 'textmarker'; }
if (!markerTypes[seType]) { return undefined; } // an unknown type! if (!markerTypes[seType]) { return undefined; } // an unknown type!

View File

@ -1,4 +1,4 @@
/* eslint-disable no-bitwise, max-len */ /* eslint-disable no-bitwise, max-len, unicorn/prefer-math-trunc, unicorn/prefer-ternary */
/** /**
* @file jPicker (Adapted from version 1.1.6) * @file jPicker (Adapted from version 1.1.6)
* *

View File

@ -2498,11 +2498,7 @@ editor.init = () => {
$(context).parentsUntil('#svgcontent > g').andSelf().each(function () { $(context).parentsUntil('#svgcontent > g').andSelf().each(function () {
if (this.id) { if (this.id) {
str += ' > ' + this.id; str += ' > ' + this.id;
if (this !== context) { linkStr += (this !== context) ? ` > <a href="#">${this.id}</a>` : ` > ${this.id}`;
linkStr += ' > <a href="#">' + this.id + '</a>';
} else {
linkStr += ' > ' + this.id;
}
} }
}); });
@ -2605,13 +2601,7 @@ editor.init = () => {
if (toolButtonClick(showSel)) { if (toolButtonClick(showSel)) {
options.fn(); options.fn();
} }
let icon; const icon = (options.icon) ? $.getSvgIcon(options.icon, true) : $(options.sel).children().eq(0).clone();
if (options.icon) {
icon = $.getSvgIcon(options.icon, true);
} else {
icon = $(options.sel).children().eq(0).clone();
}
icon[0].setAttribute('width', shower.width()); icon[0].setAttribute('width', shower.width());
icon[0].setAttribute('height', shower.height()); icon[0].setAttribute('height', shower.height());
shower.children(':not(.flyout_arrow_horiz)').remove(); shower.children(':not(.flyout_arrow_horiz)').remove();
@ -3199,11 +3189,7 @@ editor.init = () => {
const opts = {alpha: opac}; const opts = {alpha: opac};
if (color.startsWith('url(#')) { if (color.startsWith('url(#')) {
let refElem = svgCanvas.getRefElem(color); let refElem = svgCanvas.getRefElem(color);
if (refElem) { refElem = (refElem) ? refElem.cloneNode(true) : $('#' + type + '_color defs *')[0];
refElem = refElem.cloneNode(true);
} else {
refElem = $('#' + type + '_color defs *')[0];
}
opts[refElem.tagName] = refElem; opts[refElem.tagName] = refElem;
} else if (color.startsWith('#')) { } else if (color.startsWith('#')) {
opts.solidColor = color.substr(1); opts.solidColor = color.substr(1);
@ -3267,14 +3253,10 @@ editor.init = () => {
const colorBlocks = ['#FFF', '#888', '#000', 'chessboard']; const colorBlocks = ['#FFF', '#888', '#000', 'chessboard'];
str = ''; str = '';
$.each(colorBlocks, function (i, e) { $.each(colorBlocks, function (i, e) {
if (e === 'chessboard') { str += (e === 'chessboard')
str += '<div class="color_block" data-bgcolor="' + e + // eslint-disable-next-line max-len
'" style="background-image:url(data:image/gif;base64,' + ? `<div class="color_block" data-bgcolor="${e}" style="background-image:url(data:image/gif;base64,R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjGgq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7);"></div>`
'R0lGODlhEAAQAIAAAP///9bW1iH5BAAAAAAALAAAAAAQABAAAAIfjG+' + : `<div class="color_block" data-bgcolor="${e}" style="background-color:${e};"></div>`;
'gq4jM3IFLJgpswNly/XkcBpIiVaInlLJr9FZWAQA7);"></div>';
} else {
str += '<div class="color_block" data-bgcolor="' + e + '" style="background-color:' + e + ';"></div>';
}
}); });
$('#bg_blocks').append(str); $('#bg_blocks').append(str);
const blocks = $('#bg_blocks div'); const blocks = $('#bg_blocks div');
@ -4344,7 +4326,7 @@ editor.init = () => {
}; };
/** /**
* * @param {string} pos indicate the alignment relative to top, bottom, middle etc..
* @returns {void} * @returns {void}
*/ */
const clickAlign = (pos) => { const clickAlign = (pos) => {
@ -5520,12 +5502,7 @@ editor.init = () => {
const menu = ($(sel).parents('#main_menu').length); const menu = ($(sel).parents('#main_menu').length);
$(sel).each(function () { $(sel).each(function () {
let t; const t = (menu) ? $(this).text().split(' [')[0] : this.title.split(' [')[0];
if (menu) {
t = $(this).text().split(' [')[0];
} else {
t = this.title.split(' [')[0];
}
let keyStr = ''; let keyStr = '';
// Shift+Up // Shift+Up
$.each(keyval.split('/'), function (i, key) { $.each(keyval.split('/'), function (i, key) {

View File

@ -93,14 +93,11 @@ const fixIDs = function (svgEl, svgNum, force) {
const defs = svgEl.find('defs'); const defs = svgEl.find('defs');
if (!defs.length) return svgEl; if (!defs.length) return svgEl;
let idElems; const idElems = (isOpera)
if (isOpera) { ? defs.find('*').filter(function () {
idElems = defs.find('*').filter(function () {
return Boolean(this.id); return Boolean(this.id);
}); })
} else { : defs.find('[id]');
idElems = defs.find('[id]');
}
const allElems = svgEl[0].getElementsByTagName('*'), const allElems = svgEl[0].getElementsByTagName('*'),
len = allElems.length; len = allElems.length;

View File

@ -1893,10 +1893,9 @@ export const pathActions = (function () {
const absY = seglist.getItem(0).y; const absY = seglist.getItem(0).y;
sSeg = stretchy.pathSegList.getItem(1); sSeg = stretchy.pathSegList.getItem(1);
if (sSeg.pathSegType === 4) { newseg = (sSeg.pathSegType === 4)
newseg = drawnPath.createSVGPathSegLinetoAbs(absX, absY); ? drawnPath.createSVGPathSegLinetoAbs(absX, absY)
} else { : drawnPath.createSVGPathSegCurvetoCubicAbs(
newseg = drawnPath.createSVGPathSegCurvetoCubicAbs(
absX, absX,
absY, absY,
sSeg.x1 / currentZoom, sSeg.x1 / currentZoom,
@ -1904,8 +1903,6 @@ export const pathActions = (function () {
absX, absX,
absY absY
); );
}
const endseg = drawnPath.createSVGPathSegClosePath(); const endseg = drawnPath.createSVGPathSegClosePath();
seglist.appendItem(newseg); seglist.appendItem(newseg);
seglist.appendItem(endseg); seglist.appendItem(endseg);
@ -1960,13 +1957,12 @@ export const pathActions = (function () {
// Use the segment defined by stretchy // Use the segment defined by stretchy
sSeg = stretchy.pathSegList.getItem(1); sSeg = stretchy.pathSegList.getItem(1);
if (sSeg.pathSegType === 4) { newseg = (sSeg.pathSegType === 4)
newseg = drawnPath.createSVGPathSegLinetoAbs( ? drawnPath.createSVGPathSegLinetoAbs(
editorContext_.round(x), editorContext_.round(x),
editorContext_.round(y) editorContext_.round(y)
); )
} else { : drawnPath.createSVGPathSegCurvetoCubicAbs(
newseg = drawnPath.createSVGPathSegCurvetoCubicAbs(
editorContext_.round(x), editorContext_.round(x),
editorContext_.round(y), editorContext_.round(y),
sSeg.x1 / currentZoom, sSeg.x1 / currentZoom,
@ -1974,7 +1970,6 @@ export const pathActions = (function () {
sSeg.x2 / currentZoom, sSeg.x2 / currentZoom,
sSeg.y2 / currentZoom sSeg.y2 / currentZoom
); );
}
drawnPath.pathSegList.appendItem(newseg); drawnPath.pathSegList.appendItem(newseg);

View File

@ -269,13 +269,7 @@ export const recalculateDimensions = function (selected) {
const gangle = getRotationAngle(selected); const gangle = getRotationAngle(selected);
if (gangle) { if (gangle) {
const a = gangle * Math.PI / 180; const a = gangle * Math.PI / 180;
let s; const s = Math.abs(a) > (1.0e-10) ? Math.sin(a) / (1 - Math.cos(a)) : 2 / a;
if (Math.abs(a) > (1.0e-10)) {
s = Math.sin(a) / (1 - Math.cos(a));
} else {
// TODO: This blows up if the angle is exactly 0!
s = 2 / a;
}
for (let i = 0; i < tlist.numberOfItems; ++i) { for (let i = 0; i < tlist.numberOfItems; ++i) {
const xform = tlist.getItem(i); const xform = tlist.getItem(i);
if (xform.type === 4) { if (xform.type === 4) {

View File

@ -2689,11 +2689,7 @@ class SvgCanvas {
end = {x: 0, y: 0}; end = {x: 0, y: 0};
const coords = element.getAttribute('points'); const coords = element.getAttribute('points');
const commaIndex = coords.indexOf(','); const commaIndex = coords.indexOf(',');
if (commaIndex >= 0) { keep = commaIndex >= 0 ? coords.includes(',', commaIndex + 1) : coords.includes(' ', coords.indexOf(' ') + 1);
keep = coords.includes(',', commaIndex + 1);
} else {
keep = coords.includes(' ', coords.indexOf(' ') + 1);
}
if (keep) { if (keep) {
element = pathActions.smoothPolylineIntoPath(element); element = pathActions.smoothPolylineIntoPath(element);
} }
@ -4495,11 +4491,9 @@ function hideCursor () {
// set new svg document // set new svg document
// If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode() // If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode()
if (svgdoc.adoptNode) { svgcontent = svgdoc.adoptNode
svgcontent = svgdoc.adoptNode(newDoc.documentElement); ? svgdoc.adoptNode(newDoc.documentElement)
} else { : svgdoc.importNode(newDoc.documentElement, true);
svgcontent = svgdoc.importNode(newDoc.documentElement, true);
}
svgroot.append(svgcontent); svgroot.append(svgcontent);
const content = $(svgcontent); const content = $(svgcontent);
@ -4681,13 +4675,9 @@ function hideCursor () {
this.prepareSvg(newDoc); this.prepareSvg(newDoc);
// import new svg document into our document // import new svg document into our document
let svg;
// If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode() // If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode()
if (svgdoc.adoptNode) { const svg =
svg = svgdoc.adoptNode(newDoc.documentElement); svgdoc.adoptNode ? svgdoc.adoptNode(newDoc.documentElement) : svgdoc.importNode(newDoc.documentElement, true);
} else {
svg = svgdoc.importNode(newDoc.documentElement, true);
}
uniquifyElems(svg); uniquifyElems(svg);
@ -4705,11 +4695,7 @@ function hideCursor () {
canvash = Number(svgcontent.getAttribute('height')); canvash = Number(svgcontent.getAttribute('height'));
// imported content should be 1/3 of the canvas on its largest dimension // imported content should be 1/3 of the canvas on its largest dimension
if (innerh > innerw) { ts = innerh > innerw ? 'scale(' + (canvash / 3) / vb[3] + ')' : 'scale(' + (canvash / 3) / vb[2] + ')';
ts = 'scale(' + (canvash / 3) / vb[3] + ')';
} else {
ts = 'scale(' + (canvash / 3) / vb[2] + ')';
}
// Hack to make recalculateDimensions understand how to scale // Hack to make recalculateDimensions understand how to scale
ts = 'translate(0) ' + ts + ' translate(0)'; ts = 'translate(0) ' + ts + ' translate(0)';