Merge pull request #207 from danmarcab/fix/html-script-embedded-crash

Use jsesc instead of JSON.stringify to avoid JSON/HTML issues
This commit is contained in:
Dillon Kearns 2021-08-25 10:32:59 -07:00 committed by GitHub
commit f2d64df12e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 54 additions and 334 deletions

View File

@ -22,8 +22,10 @@ jobs:
id: cache-node_modules
uses: actions/cache@v2
with:
path: node_modules
key: node_modules-${{ hashFiles('package-lock.json') }}
path: |
~/.cache/Cypress
node_modules
key: node_modules-node-v${{ matrix.node }}-${{ hashFiles('package-lock.json') }}
# Re-use ~/.elm between runs until elm.json, elm-tooling.json or
# review/elm.json changes. The Elm compiler saves downloaded Elm packages
@ -71,6 +73,7 @@ jobs:
start: npm start
wait-on: "http://localhost:1234"
wait-on-timeout: 60
- uses: actions/upload-artifact@v1
if: failure()
with:

View File

@ -29,6 +29,7 @@
"fs-extra": "^10.0.0",
"globby": "11.0.4",
"gray-matter": "^4.0.3",
"jsesc": "^3.0.2",
"kleur": "^4.1.4",
"micromatch": "^4.0.4",
"object-hash": "^2.2.0",
@ -52,6 +53,7 @@
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.0.0",
"elmi-to-json": "^1.2.0",
"mocha": "^8.4.0",
"typescript": "4.3.5"
}
@ -1502,9 +1504,11 @@
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.0.0",
"elmi-to-json": "^1.2.0",
"fs-extra": "^10.0.0",
"globby": "11.0.4",
"gray-matter": "^4.0.3",
"jsesc": "^3.0.2",
"kleur": "^4.1.4",
"micromatch": "^4.0.4",
"mocha": "^8.4.0",

View File

@ -1,6 +1,7 @@
const renderer = require("../../generator/src/render");
const path = require("path");
const fs = require("./dir-helpers.js");
const jsesc = require("jsesc");
const compiledElmPath = path.join(process.cwd(), "elm-stuff/elm-pages/elm.js");
const { parentPort, threadId, workerData } = require("worker_threads");
let Elm;
@ -45,7 +46,7 @@ function requireElm(mode) {
if (mode === "build") {
if (!Elm) {
const warnOriginal = console.warn;
console.warn = function () {};
console.warn = function () { };
Elm = require(compiledElmPath);
console.warn = warnOriginal;
@ -66,11 +67,11 @@ async function outputString(
const args = fromElm;
const normalizedRoute = args.route.replace(/index$/, "");
await fs.tryMkdir(`./dist/${normalizedRoute}`);
const contentJsonString = JSON.stringify({
const contentJsonString = jsesc({
is404: args.is404,
staticData: args.contentJson,
path: args.route,
});
}, { 'isScriptContext': true, 'json': true });
fs.writeFileSync(`dist/${normalizedRoute}/index.html`, args.htmlString);
fs.writeFileSync(
`dist/${normalizedRoute}/content.json`,

View File

@ -4,6 +4,7 @@ const path = require("path");
const matter = require("gray-matter");
const globby = require("globby");
const fsPromises = require("fs").promises;
const jsesc = require("jsesc");
const preRenderHtml = require("./pre-render-html.js");
const { lookupOrPerform } = require("./request-cache.js");
const kleur = require("kleur");
@ -182,7 +183,7 @@ async function outputString(
contentJson["is404"] = args.is404;
contentJson["path"] = args.route;
const normalizedRoute = args.route.replace(/index$/, "");
const contentJsonString = JSON.stringify(contentJson);
const contentJsonString = jsesc(contentJson, { 'isScriptContext': true, 'json': true });
return {
is404: args.is404,

361
package-lock.json generated
View File

@ -17,6 +17,7 @@
"fs-extra": "^10.0.0",
"globby": "11.0.4",
"gray-matter": "^4.0.3",
"jsesc": "^3.0.2",
"kleur": "^4.1.4",
"micromatch": "^4.0.4",
"object-hash": "^2.2.0",
@ -34,12 +35,13 @@
"@types/micromatch": "^4.0.1",
"@types/node": "12.20.12",
"@types/serve-static": "1.13.10",
"cypress": "^8.0.0",
"cypress": "^8.3.0",
"elm-optimize-level-2": "^0.1.5",
"elm-review": "^2.5.3",
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.0.0",
"elmi-to-json": "^1.2.0",
"mocha": "^8.4.0",
"typescript": "4.3.5"
}
@ -139,9 +141,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/is?sponsor=1"
}
},
"node_modules/@szmarczak/http-timer": {
@ -310,10 +309,6 @@
"fast-json-stable-stringify": "^2.0.0",
"json-schema-traverse": "^0.4.1",
"uri-js": "^4.2.2"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/epoberezkin"
}
},
"node_modules/ansi-colors": {
@ -335,9 +330,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-escapes/node_modules/type-fest": {
@ -347,9 +339,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ansi-regex": {
@ -370,9 +359,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/anymatch": {
@ -391,21 +377,7 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/arch/-/arch-2.2.0.tgz",
"integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
"dev": true
},
"node_modules/argparse": {
"version": "1.0.10",
@ -505,21 +477,7 @@
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
"dev": true
},
"node_modules/batch": {
"version": "0.6.1",
@ -543,9 +501,6 @@
"dependencies": {
"buffers": "~0.1.1",
"chainsaw": "~0.1.0"
},
"engines": {
"node": "*"
}
},
"node_modules/binary-extensions": {
@ -676,20 +631,6 @@
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
@ -788,9 +729,6 @@
"dev": true,
"dependencies": {
"traverse": ">=0.3.0 <0.4"
},
"engines": {
"node": "*"
}
},
"node_modules/chalk": {
@ -804,9 +742,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
}
},
"node_modules/check-more-types": {
@ -878,9 +813,6 @@
"dev": true,
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cli-table3": {
@ -910,9 +842,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/cliui": {
@ -1174,9 +1103,9 @@
}
},
"node_modules/cypress": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-8.0.0.tgz",
"integrity": "sha512-Hhbc7FtbeCSg5Ui2zxXQLynk7IYGIygG8NqTauS4EtCWyp2k6s4g8P4KUZXwRbhuryN/+/dCd1kPtFbhBx8MuQ==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-8.3.0.tgz",
"integrity": "sha512-zA5Rcq8AZIfRfPXU0CCcauofF+YpaU9HYbfqkunFTmFV0Kdlo14tNjH2E3++MkjXKFnv3/pXq+HgxWtw8CSe8Q==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
@ -1254,11 +1183,6 @@
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/cypress/node_modules/fs-extra": {
@ -1292,9 +1216,6 @@
},
"bin": {
"rimraf": "bin.js"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/cypress/node_modules/supports-color": {
@ -1307,9 +1228,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/cypress/node_modules/tmp": {
@ -1583,9 +1501,6 @@
},
"engines": {
"node": ">=10.0.0"
},
"funding": {
"url": "https://github.com/sponsors/jfmengels"
}
},
"node_modules/elm-review/node_modules/fs-extra": {
@ -1795,9 +1710,7 @@
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
"deprecated": "\"Please update to latest v2.3 or v2.2\"",
"dev": true,
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
@ -1828,7 +1741,7 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"optionalDependencies": {
"dependencies": {
"graceful-fs": "^4.1.6"
}
},
@ -2075,7 +1988,7 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
"dev": true,
"optionalDependencies": {
"dependencies": {
"graceful-fs": "^4.1.6"
}
},
@ -2105,7 +2018,6 @@
"resolved": "https://registry.npmjs.org/elmi-to-json/-/elmi-to-json-1.2.0.tgz",
"integrity": "sha512-zNinzt6/YMr11HgeBlC9Z0UM3qHkYrGsWJTjrCmgBkKnaOLUzTP5K9N3z1RltyunItXtHAxb8DFPvMxlYRPv/Q==",
"dev": true,
"hasInstallScript": true,
"dependencies": {
"binwrap": "0.2.2"
},
@ -2214,9 +2126,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/execa?sponsor=1"
}
},
"node_modules/executable": {
@ -2280,9 +2189,6 @@
},
"engines": {
"node": ">=4.5.0"
},
"peerDependencies": {
"express": "^4.0.0 || ^5.0.0-alpha.1"
}
},
"node_modules/express-ws/node_modules/ws": {
@ -2348,11 +2254,6 @@
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/extract-zip/node_modules/ms": {
@ -2440,9 +2341,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/fill-range": {
@ -2553,11 +2451,6 @@
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/folder-hash/node_modules/ms": {
@ -2636,7 +2529,6 @@
"version": "2.3.2",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
@ -2663,9 +2555,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/getos": {
@ -2700,9 +2589,6 @@
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob-parent": {
@ -2726,9 +2612,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/global-dirs/node_modules/ini": {
@ -2754,9 +2637,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/got": {
@ -2783,9 +2663,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sindresorhus/got?sponsor=1"
}
},
"node_modules/graceful-fs": {
@ -2829,7 +2706,6 @@
"version": "5.1.5",
"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz",
"integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==",
"deprecated": "this library is no longer supported",
"dev": true,
"dependencies": {
"ajv": "^6.12.3",
@ -2915,21 +2791,7 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"dev": true,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
"dev": true
},
"node_modules/ignore": {
"version": "5.1.8",
@ -3007,9 +2869,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-extendable": {
@ -3059,9 +2918,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-interactive": {
@ -3121,9 +2977,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-wsl": {
@ -3166,6 +3019,17 @@
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true
},
"node_modules/jsesc": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
"integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==",
"bin": {
"jsesc": "bin/jsesc"
},
"engines": {
"node": ">=6"
}
},
"node_modules/json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
@ -3195,10 +3059,8 @@
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
"dependencies": {
"graceful-fs": "^4.1.6",
"universalify": "^2.0.0"
},
"optionalDependencies": {
"graceful-fs": "^4.1.6"
}
},
"node_modules/jsprim": {
@ -3277,9 +3139,6 @@
},
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"enquirer": ">= 2.3.0 < 3"
}
},
"node_modules/listr2/node_modules/wrap-ansi": {
@ -3294,9 +3153,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/locate-path": {
@ -3334,9 +3190,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/log-update": {
@ -3352,9 +3205,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/log-update/node_modules/slice-ansi": {
@ -3369,9 +3219,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/slice-ansi?sponsor=1"
}
},
"node_modules/lowercase-keys": {
@ -3475,9 +3322,6 @@
"dev": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/minimatch": {
@ -3565,10 +3409,6 @@
},
"engines": {
"node": ">= 10.12.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/mochajs"
}
},
"node_modules/mocha/node_modules/argparse": {
@ -3619,11 +3459,6 @@
},
"engines": {
"node": ">=6.0"
},
"peerDependenciesMeta": {
"supports-color": {
"optional": true
}
}
},
"node_modules/mocha/node_modules/debug/node_modules/ms": {
@ -3639,9 +3474,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/find-up": {
@ -3655,9 +3487,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/js-yaml": {
@ -3682,9 +3511,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/log-symbols": {
@ -3715,9 +3541,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/p-locate": {
@ -3730,9 +3553,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/mocha/node_modules/readdirp": {
@ -3757,9 +3577,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/supports-color?sponsor=1"
}
},
"node_modules/mocha/node_modules/wrap-ansi": {
@ -3774,9 +3591,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/mocha/node_modules/y18n": {
@ -4020,9 +3834,6 @@
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/open": {
@ -4035,9 +3846,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ora": {
@ -4058,9 +3866,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/ospath": {
@ -4088,9 +3893,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-finally": {
@ -4112,9 +3914,6 @@
},
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-locate": {
@ -4139,9 +3938,6 @@
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/p-timeout": {
@ -4396,9 +4192,6 @@
"integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==",
"engines": {
"node": ">=8.6"
},
"funding": {
"url": "https://github.com/sponsors/jonschlinkert"
}
},
"node_modules/pify": {
@ -4425,9 +4218,6 @@
"dev": true,
"engines": {
"node": ">=6"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/prompts": {
@ -4501,7 +4291,6 @@
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
"integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
"deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
"dev": true,
"engines": {
"node": ">=0.4.x"
@ -4510,21 +4299,7 @@
"node_modules/queue-microtask": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="
},
"node_modules/ramda": {
"version": "0.27.1",
@ -4656,7 +4431,6 @@
"version": "2.88.2",
"resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz",
"integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==",
"deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142",
"dev": true,
"dependencies": {
"aws-sign2": "~0.7.0",
@ -4697,7 +4471,6 @@
"version": "4.2.6",
"resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.6.tgz",
"integrity": "sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ==",
"deprecated": "request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142",
"dev": true,
"dependencies": {
"bluebird": "^3.5.0",
@ -4707,9 +4480,6 @@
},
"engines": {
"node": ">=0.10.0"
},
"peerDependencies": {
"request": "^2.34"
}
},
"node_modules/request-promise-core": {
@ -4722,9 +4492,6 @@
},
"engines": {
"node": ">=0.10.0"
},
"peerDependencies": {
"request": "^2.34"
}
},
"node_modules/require-directory": {
@ -4788,20 +4555,6 @@
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
"integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"queue-microtask": "^1.2.2"
}
@ -5094,21 +4847,7 @@
"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,
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
"dev": true
},
"node_modules/string-width": {
"version": "4.2.2",
@ -5160,9 +4899,6 @@
"dev": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/supports-color": {
@ -5243,9 +4979,6 @@
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/terser": {
@ -5345,10 +5078,7 @@
"version": "0.3.9",
"resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz",
"integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=",
"dev": true,
"engines": {
"node": "*"
}
"dev": true
},
"node_modules/ts-union": {
"version": "2.3.0",
@ -5387,9 +5117,6 @@
"dev": true,
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/type-is": {
@ -5514,7 +5241,6 @@
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
"dev": true,
"bin": {
"uuid": "bin/uuid"
@ -5654,18 +5380,6 @@
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
"engines": {
"node": ">=8.3.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/xmlbuilder": {
@ -5739,9 +5453,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/yargs-unparser/node_modules/decamelize": {
@ -5751,9 +5462,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/yargs/node_modules/ansi-regex": {
@ -5869,9 +5577,6 @@
"dev": true,
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
}
},
@ -6763,9 +6468,9 @@
}
},
"cypress": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-8.0.0.tgz",
"integrity": "sha512-Hhbc7FtbeCSg5Ui2zxXQLynk7IYGIygG8NqTauS4EtCWyp2k6s4g8P4KUZXwRbhuryN/+/dCd1kPtFbhBx8MuQ==",
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/cypress/-/cypress-8.3.0.tgz",
"integrity": "sha512-zA5Rcq8AZIfRfPXU0CCcauofF+YpaU9HYbfqkunFTmFV0Kdlo14tNjH2E3++MkjXKFnv3/pXq+HgxWtw8CSe8Q==",
"dev": true,
"requires": {
"@cypress/request": "^2.88.5",
@ -8277,6 +7982,11 @@
"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
"dev": true
},
"jsesc": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz",
"integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g=="
},
"json-buffer": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
@ -10140,8 +9850,7 @@
"ws": {
"version": "7.4.6",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
"requires": {}
"integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A=="
},
"xmlbuilder": {
"version": "13.0.2",

View File

@ -7,7 +7,7 @@
"main": "index.js",
"scripts": {
"start": "cd examples/end-to-end && npm start",
"test": "elm-verify-examples --run-tests && elm-test && (cd generator && mocha) && (cd examples/routing && npm i && npm run build -- --debug && elm-test)",
"test": "npx elmi-to-json --version && elm-verify-examples --run-tests && elm-test && (cd generator && mocha) && (cd examples/routing && npm i && npm run build -- --debug && elm-test)",
"cypress": "npm start & cypress run --spec cypress/integration/elm-pages-dev.spec.js",
"review": "elm-review"
},
@ -31,6 +31,7 @@
"fs-extra": "^10.0.0",
"globby": "11.0.4",
"gray-matter": "^4.0.3",
"jsesc": "^3.0.2",
"kleur": "^4.1.4",
"micromatch": "^4.0.4",
"object-hash": "^2.2.0",
@ -45,12 +46,13 @@
"@types/micromatch": "^4.0.1",
"@types/node": "12.20.12",
"@types/serve-static": "1.13.10",
"cypress": "^8.0.0",
"cypress": "^8.3.0",
"elm-optimize-level-2": "^0.1.5",
"elm-review": "^2.5.3",
"elm-test": "^0.19.1-revision7",
"elm-tooling": "^1.3.0",
"elm-verify-examples": "^5.0.0",
"elmi-to-json": "^1.2.0",
"mocha": "^8.4.0",
"typescript": "4.3.5"
},