diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2611b167..21583fad 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -36,11 +36,16 @@ jobs: uses: actions/cache@v2 with: path: '${{ env.ELM_HOME }}' - key: elm-${{ matrix.os }}-${{ hashFiles('elm/**/elm.json', 'example-*/**/elm.json', 'tests/**/elm.json') }} + key: elm-${{ matrix.os }}-${{ hashFiles('elm-tooling.json', 'elm/**/elm.json', 'example-*/**/elm.json', 'tests/**/elm.json') }} - name: npm ci if: steps.cache-node_modules.outputs.cache-hit != 'true' run: npm ci + env: + NO_ELM_TOOLING_INSTALL: 1 + + - name: elm-tooling install + run: npx --no-install elm-tooling install - name: Flow run: npx --no-install flow check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1642edf2..bf9c394c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -36,11 +36,16 @@ jobs: uses: actions/cache@v2 with: path: '${{ env.ELM_HOME }}' - key: elm-${{ matrix.os }}-${{ hashFiles('elm/**/elm.json', 'example-*/**/elm.json', 'tests/**/elm.json') }} + key: elm-${{ matrix.os }}-${{ hashFiles('elm-tooling.json', 'elm/**/elm.json', 'example-*/**/elm.json', 'tests/**/elm.json') }} - name: npm ci if: steps.cache-node_modules.outputs.cache-hit != 'true' run: npm ci + env: + NO_ELM_TOOLING_INSTALL: 1 + + - name: elm-tooling install + run: npx --no-install elm-tooling install - name: Mocha run: npx --no-install mocha tests diff --git a/elm-tooling.json b/elm-tooling.json new file mode 100644 index 00000000..f5699455 --- /dev/null +++ b/elm-tooling.json @@ -0,0 +1,7 @@ +{ + "tools": { + "elm": "0.19.1", + "elm-format": "0.8.4", + "elm-json": "0.2.8" + } +} diff --git a/lib/ElmCompiler.js b/lib/ElmCompiler.js index 5a8669a0..1985deaa 100644 --- a/lib/ElmCompiler.js +++ b/lib/ElmCompiler.js @@ -99,7 +99,7 @@ function compile( throw err; }); } catch (err) { - throw compilerErrorToString(err, optionsWithDefaults.pathToElm); + throw new Error(compilerErrorToString(err, optionsWithDefaults.pathToElm)); } } diff --git a/lib/Generate.js b/lib/Generate.js index e623a9bf..a3df7749 100644 --- a/lib/Generate.js +++ b/lib/Generate.js @@ -64,7 +64,10 @@ function getGeneratedSrcDir(generatedCodeDir /*: string */) /*: string */ { return path.join(generatedCodeDir, 'src'); } -function generateElmJson(project /*: typeof Project.Project */) /*: void */ { +async function generateElmJson( + project /*: typeof Project.Project */, + onSolveProgress /*: typeof Solve.OnProgress */ +) /*: Promise */ { const generatedSrc = getGeneratedSrcDir(project.generatedCodeDir); fs.mkdirSync(generatedSrc, { recursive: true }); @@ -95,7 +98,7 @@ function generateElmJson(project /*: typeof Project.Project */) /*: void */ { type: 'application', 'source-directories': sourceDirs, 'elm-version': '0.19.1', - dependencies: Solve.getDependenciesCached(project), + dependencies: await Solve.getDependenciesCached(project, onSolveProgress), 'test-dependencies': { direct: {}, indirect: {}, diff --git a/lib/RunTests.js b/lib/RunTests.js index 9358420d..1be5e40f 100644 --- a/lib/RunTests.js +++ b/lib/RunTests.js @@ -3,6 +3,7 @@ const chalk = require('chalk'); const chokidar = require('chokidar'); const path = require('path'); +const readline = require('readline'); const packageInfo = require('../package.json'); const Compile = require('./Compile'); const ElmJson = require('./ElmJson'); @@ -12,8 +13,6 @@ const Project = require('./Project'); const Report = require('./Report'); const Supervisor = require('./Supervisor'); -void Report; - // Incorporate the process PID into the socket name, so elm-test processes can // be run parallel without accidentally sharing each others' sockets. // @@ -29,21 +28,56 @@ function getPipeFilename(runsExecuted /*: number */) /*: string */ { : `/tmp/elm_test-${process.pid}.sock`; } -function infoLog( - report /*: typeof Report.Report */, - msg /*: string */ -) /*: void */ { - if (report === 'console') { - console.log(msg); - } -} - -function clearConsole(report /*: typeof Report.Report */) { - if (report === 'console') { - process.stdout.write( - process.platform === 'win32' ? '\x1B[2J\x1B[0f' : '\x1B[2J\x1B[3J\x1B[H' - ); - } +// This could have been a class, but I couldn’t figure out how to type it with +// Flow comments and Prettier. +// This lets you log something like `elm.json changed > Compiling > Starting tests` +// where each segment appears over time. +// `\r` moves the cursor to the start of the line. This is important when there +// are Elm compilation errors - they overwrite the progress text rather than +// weirdly ending up with stuff like: +// `elm.json changed > Compiling-- NAMING ERROR - File.elm` +// Also note that using too much `clearLine` or `clearConsole` causes flickering +// on Windows, so it's nicer to cleverly overwrite old output when possible. +function makeProgressLogger(report /*: typeof Report.Report */) { + const items = []; + return { + log(message) { + items.push(message); + if (!Report.isMachineReadable(report)) { + process.stdout.write(`${items.join(' > ')}\r`); + } + }, + logLine(message) { + this.log(message); + items.length = 0; + if (!Report.isMachineReadable(report)) { + process.stdout.write('\n'); + } + }, + overwrite(message) { + items.length = 0; + items.push(message); + if (!Report.isMachineReadable(report)) { + process.stdout.write(`${message}\r`); + } + }, + clearLine() { + items.length = 0; + if (!Report.isMachineReadable(report)) { + readline.clearLine(process.stdout, 0); + } + }, + clearConsole() { + items.length = 0; + if (!Report.isMachineReadable(report)) { + process.stdout.write( + process.platform === 'win32' + ? '\x1B[2J\x1B[0f' + : '\x1B[2J\x1B[3J\x1B[H' + ); + } + }, + }; } function diffArrays/*:: */( @@ -69,16 +103,14 @@ const Queue /*: Array<{ void Queue; function watcherEventMessage(queue /*: typeof Queue */) /*: string */ { - const suffix = '. Rebuilding!'; - const filePaths = Array.from(new Set(queue.map(({ filePath }) => filePath))); if (filePaths.length === 1) { const { event, filePath } = queue[0]; - return `${filePath} ${event}${suffix}`; + return `${filePath} ${event}`; } const events = Array.from(new Set(queue.map(({ event }) => event))).sort(); - return `${filePaths.length} files ${events.join('/')}${suffix}`; + return `${filePaths.length} files ${events.join('/')}`; } function runTests( @@ -104,6 +136,8 @@ function runTests( let currentRun /*: Promise | void */ = undefined; let queue /*: typeof Queue */ = []; + const progressLogger = makeProgressLogger(report); + async function run() /*: Promise */ { try { // Don’t delay the first run (that’s the only time the queue is empty). @@ -121,11 +155,14 @@ function runTests( // I tested touching 100 files at a time. All of them produced events // within 60 ms on Windows, and faster on Mac and Linux. So 100 ms sounds // like a reasonable number – not too short, not too long of a wait. - if (queue.length > 0) { + const queueLengthBeforeWaiting = queue.length; + if (queueLengthBeforeWaiting > 0) { await delay(100); // Re-print the message in case the queue has become longer while waiting. - clearConsole(report); - infoLog(report, watcherEventMessage(queue)); + if (queue.length > queueLengthBeforeWaiting) { + progressLogger.clearLine(); + progressLogger.log(watcherEventMessage(queue)); + } } queue = []; @@ -164,7 +201,23 @@ function runTests( const mainModule = Generate.getMainModule(project.generatedCodeDir); const dest = path.join(project.generatedCodeDir, 'elmTestOutput.js'); - Generate.generateElmJson(project); + await Generate.generateElmJson(project, (progress) => { + switch (progress.tag) { + case 'Download elm-json': + if (progress.percentage === 0) { + progressLogger.clearLine(); + } + progressLogger.overwrite( + `Downloading elm-json ${Math.round(progress.percentage * 100)}%` + ); + return null; + case 'Run elm-json': + progressLogger.log('Solving dependencies'); + return null; + } + }); + + progressLogger.log('Compiling'); Generate.generateMainModule( fuzz, @@ -187,6 +240,8 @@ function runTests( Generate.prepareCompiledJsFile(pipeFilename, dest); + progressLogger.logLine('Starting tests'); + return await Supervisor.run( packageInfo.version, pipeFilename, @@ -196,22 +251,24 @@ function runTests( watch ); } catch (err) { + progressLogger.logLine(''); console.error(err.message); return 1; } } if (watch) { - clearConsole(report); - infoLog(report, 'Running in watch mode'); + progressLogger.clearConsole(); const onRunFinish = () => { if (queue.length > 0) { - clearConsole(report); - infoLog(report, watcherEventMessage(queue)); + progressLogger.clearConsole(); + progressLogger.log(watcherEventMessage(queue)); currentRun = run().then(onRunFinish); } else { - infoLog(report, chalk.blue('Watching for changes...')); + if (!Report.isMachineReadable(report)) { + console.log(chalk.blue('Watching for changes...')); + } currentRun = undefined; } }; @@ -234,8 +291,8 @@ function runTests( filePath: path.relative(projectRootDir, absoluteFilePath), }); if (currentRun === undefined) { - clearConsole(report); - infoLog(report, watcherEventMessage(queue)); + progressLogger.clearConsole(); + progressLogger.log(watcherEventMessage(queue)); currentRun = run().then(onRunFinish); } } diff --git a/lib/Solve.js b/lib/Solve.js index f0d72d3d..fc88f2d3 100644 --- a/lib/Solve.js +++ b/lib/Solve.js @@ -2,6 +2,7 @@ const spawn = require('cross-spawn'); const crypto = require('crypto'); +const getExecutable = require('elm-tooling/getExecutable'); const fs = require('fs'); const path = require('path'); const ElmJson = require('./ElmJson'); @@ -9,14 +10,23 @@ const Project = require('./Project'); void Project; -function sha1(string) { - return crypto.createHash('sha1').update(string).digest('hex'); +function sha256(string) { + return crypto.createHash('sha256').update(string).digest('hex'); } -function getDependenciesCached( - project /*: typeof Project.Project */ -) /*: typeof ElmJson.DirectAndIndirectDependencies */ { - const hash = sha1( +// Poor man’s type alias. We can’t use /*:: type OnProgress = ... */ because of: +// https://github.com/prettier/prettier/issues/2597 +// `null` is used instead of `void` to make Flow force implementations to +// exhaustively switch on all variants of the parameter. +const OnProgress /*: ( + { tag: 'Download elm-json', percentage: number } | { tag: 'Run elm-json' } +) => null */ = () => null; + +async function getDependenciesCached( + project /*: typeof Project.Project */, + onProgress /*: typeof OnProgress */ +) /*: Promise */ { + const hash = sha256( JSON.stringify({ dependencies: project.elmJson.dependencies, 'test-dependencies': project.elmJson['test-dependencies'], @@ -38,7 +48,10 @@ function getDependenciesCached( } } - const dependencies = getDependencies(ElmJson.getPath(project.rootDir)); + const dependencies = await getDependencies( + ElmJson.getPath(project.rootDir), + onProgress + ); fs.writeFileSync(cacheFile, dependencies); @@ -48,9 +61,19 @@ function getDependenciesCached( ); } -function getDependencies(elmJsonPath /*: string */) /*: string */ { +async function getDependencies( + elmJsonPath /*: string */, + onProgress /*: typeof OnProgress */ +) /*: Promise */ { + const toolAbsolutePath = await getExecutable({ + name: 'elm-json', + version: '^0.2.8', + onProgress: (percentage) => + onProgress({ tag: 'Download elm-json', percentage }), + }); + onProgress({ tag: 'Run elm-json' }); const result = spawn.sync( - 'elm-json', + toolAbsolutePath, [ 'solve', '--test', @@ -74,4 +97,7 @@ function getDependencies(elmJsonPath /*: string */) /*: string */ { return result.stdout; } -module.exports = { getDependenciesCached }; +module.exports = { + OnProgress, + getDependenciesCached, +}; diff --git a/lib/elm-test.js b/lib/elm-test.js index 9157f2b0..8f9d8e68 100644 --- a/lib/elm-test.js +++ b/lib/elm-test.js @@ -62,7 +62,7 @@ function findClosestElmJson(dir /*: string */) /*: string | void */ { : findClosestElmJson(path.dirname(dir)); } -function getProjectRootDir(subcommand /*: string */) { +function getProjectRootDir(subcommand /*: string */) /*: string */ { const elmJsonPath = findClosestElmJson(process.cwd()); if (elmJsonPath === undefined) { const command = @@ -75,7 +75,7 @@ function getProjectRootDir(subcommand /*: string */) { return path.dirname(elmJsonPath); } -function getProject(subcommand /*: string */) { +function getProject(subcommand /*: string */) /*: typeof Project.Project */ { try { return Project.init(getProjectRootDir(subcommand), packageInfo.version); } catch (error) { @@ -84,17 +84,18 @@ function getProject(subcommand /*: string */) { } } -function getPathToElmBinary(compiler /*: string | void */) { +function getPathToElmBinary(compiler /*: string | void */) /*: string */ { const name = compiler === undefined ? 'elm' : compiler; try { return path.resolve(which.sync(name)); } catch (_error) { - throw new Error( + console.error( compiler === undefined ? `Cannot find elm executable, make sure it is installed. (If elm is not on your path or is called something different the --compiler flag might help.)` : `The elm executable passed to --compiler must exist and be exectuble. Got: ${compiler}` ); + throw process.exit(1); } } @@ -230,13 +231,16 @@ function main() { const options = program.opts(); const pathToElmBinary = getPathToElmBinary(options.compiler); const project = getProject('make'); - Generate.generateElmJson(project); - Compile.compileSources( - FindTests.resolveGlobs(testFileGlobs, project.rootDir), - project.generatedCodeDir, - pathToElmBinary, - options.report - ).then( + const make = async () => { + await Generate.generateElmJson(project, () => null); + await Compile.compileSources( + FindTests.resolveGlobs(testFileGlobs, project.rootDir), + project.generatedCodeDir, + pathToElmBinary, + options.report + ); + }; + make().then( () => process.exit(0), // `elm-test make` has never logged errors it seems. () => process.exit(1) diff --git a/package-lock.json b/package-lock.json index 254c6e8e..326d2d5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -169,6 +169,7 @@ "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": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -236,6 +237,7 @@ "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, "requires": { "safer-buffer": "~2.1.0" } @@ -243,7 +245,8 @@ "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true }, "astral-regex": { "version": "1.0.0", @@ -254,7 +257,8 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true }, "at-least-node": { "version": "1.0.0", @@ -265,12 +269,14 @@ "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true }, "aws4": { "version": "1.9.1", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==", + "dev": true }, "balanced-match": { "version": "1.0.0", @@ -281,6 +287,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, "requires": { "tweetnacl": "^0.14.3" } @@ -289,6 +296,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", + "dev": true, "requires": { "buffers": "~0.1.1", "chainsaw": "~0.1.0" @@ -303,6 +311,7 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/binwrap/-/binwrap-0.2.2.tgz", "integrity": "sha512-Y+Wvypk3JhH5GPZAvlwJAWOVH/OsOhQMSj37vySuWHwQivoALplPxfBA8b973rFJI7OS+O+1YmmYXIiEXVMAcw==", + "dev": true, "requires": { "mustache": "^3.0.1", "request": "^2.88.0", @@ -314,7 +323,8 @@ "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true }, "brace-expansion": { "version": "1.1.11", @@ -342,7 +352,8 @@ "buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=" + "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", + "dev": true }, "cacheable-lookup": { "version": "2.0.1", @@ -384,12 +395,14 @@ "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true }, "chainsaw": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", + "dev": true, "requires": { "traverse": ">=0.3.0 <0.4" } @@ -444,7 +457,8 @@ "chownr": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true }, "cli-cursor": { "version": "3.1.0", @@ -542,6 +556,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, "requires": { "delayed-stream": "~1.0.0" } @@ -559,7 +574,8 @@ "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true }, "cross-spawn": { "version": "7.0.3", @@ -621,6 +637,7 @@ "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -673,7 +690,8 @@ "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true }, "diff": { "version": "4.0.2", @@ -700,33 +718,17 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" } }, - "elm": { - "version": "0.19.1-3", - "resolved": "https://registry.npmjs.org/elm/-/elm-0.19.1-3.tgz", - "integrity": "sha512-6y36ewCcVmTOx8lj7cKJs3bhI5qMfoVEigePZ9PhEUNKpwjjML/pU2u2YSpHVAznuCcojoF6KIsrS1Ci7GtVaQ==", - "dev": true, - "requires": { - "request": "^2.88.0" - } - }, - "elm-format": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/elm-format/-/elm-format-0.8.4.tgz", - "integrity": "sha512-0KurHC4MBUljdA2Sr+yzcoyAVqCku0LuNpvq5B3UIAlCPZ9PnOW2tUhVnQOCvp9RXngwbnsf18dE48tQ+s8r7g==", - "dev": true, - "requires": { - "binwrap": "^0.2.2" - } - }, "elm-json": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/elm-json/-/elm-json-0.2.8.tgz", "integrity": "sha512-YfK39CNrHjB4LMnas6aAb2LP37YgqAnh69bWD7ojAs7lBNNkWIeBifeszAfmapylQt1MVuwj6zPPYwrqRQXEBA==", + "dev": true, "requires": { "binwrap": "^0.2.2" } @@ -895,6 +897,11 @@ } } }, + "elm-tooling": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/elm-tooling/-/elm-tooling-0.6.3.tgz", + "integrity": "sha512-Uri86NvnQyrpihEUOxcjvcYnlTQpzjOZaTG0mY3Dc/8TAA99paCYR8GyMx2zB3Ybe6Q/uOwCzGfGAAPr82F4LQ==" + }, "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", @@ -1085,22 +1092,26 @@ "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true }, "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==" + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==", + "dev": true }, "fast-json-stable-stringify": { "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==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -1212,12 +1223,14 @@ "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true }, "form-data": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, "requires": { "asynckit": "^0.4.0", "combined-stream": "^1.0.6", @@ -1228,6 +1241,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "dev": true, "requires": { "minipass": "^2.6.0" } @@ -1268,6 +1282,7 @@ "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, "requires": { "assert-plus": "^1.0.0" } @@ -1347,12 +1362,14 @@ "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true }, "har-validator": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "dev": true, "requires": { "ajv": "^6.5.5", "har-schema": "^2.0.0" @@ -1380,6 +1397,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "jsprim": "^1.2.2", @@ -1469,7 +1487,8 @@ "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true }, "isexe": { "version": "2.0.0", @@ -1479,7 +1498,8 @@ "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true }, "js-tokens": { "version": "4.0.0", @@ -1500,7 +1520,8 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true }, "json-buffer": { "version": "3.0.1", @@ -1511,12 +1532,14 @@ "json-schema": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -1527,12 +1550,14 @@ "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, "requires": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", @@ -1577,7 +1602,8 @@ "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true }, "log-symbols": { "version": "3.0.0", @@ -1637,12 +1663,14 @@ "mime-db": { "version": "1.43.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz", - "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==" + "integrity": "sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==", + "dev": true }, "mime-types": { "version": "2.1.26", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz", "integrity": "sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==", + "dev": true, "requires": { "mime-db": "1.43.0" } @@ -1670,12 +1698,14 @@ "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "dev": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1685,6 +1715,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "dev": true, "requires": { "minipass": "^2.9.0" } @@ -1693,6 +1724,7 @@ "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" } @@ -1840,7 +1872,8 @@ "mustache": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/mustache/-/mustache-3.2.1.tgz", - "integrity": "sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA==" + "integrity": "sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA==", + "dev": true }, "mute-stream": { "version": "0.0.8", @@ -1874,7 +1907,8 @@ "oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true }, "once": { "version": "1.4.0", @@ -2052,7 +2086,8 @@ "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true }, "picomatch": { "version": "2.2.2", @@ -2096,7 +2131,8 @@ "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "dev": true }, "pump": { "version": "3.0.0", @@ -2111,12 +2147,14 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true }, "ramda": { "version": "0.27.1", @@ -2151,6 +2189,7 @@ "version": "2.88.2", "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, "requires": { "aws-sign2": "~0.7.0", "aws4": "^1.8.0", @@ -2178,6 +2217,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -2189,6 +2229,7 @@ "version": "4.2.5", "resolved": "https://registry.npmjs.org/request-promise/-/request-promise-4.2.5.tgz", "integrity": "sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg==", + "dev": true, "requires": { "bluebird": "^3.5.0", "request-promise-core": "1.1.3", @@ -2200,6 +2241,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz", "integrity": "sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==", + "dev": true, "requires": { "lodash": "^4.17.15" } @@ -2252,12 +2294,14 @@ "safe-buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", - "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==", + "dev": true }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "sax": { "version": "1.2.4", @@ -2340,6 +2384,7 @@ "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -2355,7 +2400,8 @@ "stealthy-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true }, "string-width": { "version": "2.1.1", @@ -2478,6 +2524,7 @@ "version": "4.4.13", "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "dev": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", @@ -2547,6 +2594,7 @@ "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, "requires": { "psl": "^1.1.28", "punycode": "^2.1.1" @@ -2555,19 +2603,22 @@ "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true } } }, "traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", + "dev": true }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, "requires": { "safe-buffer": "^5.0.1" } @@ -2575,7 +2626,8 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true }, "type-check": { "version": "0.4.0", @@ -2596,6 +2648,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.0.tgz", "integrity": "sha512-NG1h/MdGIX3HzyqMjyj1laBCmlPYhcO4xEy7gEqqzGiSLw7XqDQCnY4nYSn5XSaH8mQ6TFkaujrO8d/PIZN85A==", + "dev": true, "requires": { "binary": "^0.3.0", "mkdirp": "^0.5.1" @@ -2605,6 +2658,7 @@ "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -2612,7 +2666,8 @@ "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true }, "v8-compile-cache": { "version": "2.2.0", @@ -2624,6 +2679,7 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, "requires": { "assert-plus": "^1.0.0", "core-util-is": "1.0.2", @@ -2759,7 +2815,8 @@ "yallist": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true }, "yargs": { "version": "13.3.2", diff --git a/package.json b/package.json index adcb7920..40cf2d8b 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,13 @@ "node": ">=10.13.0" }, "scripts": { + "prepare": "elm-tooling install", + "test": "npm run check && npm run test-only", "flow": "flow", "lint": "eslint --report-unused-disable-directives .", "review": "cd elm && elm-review", "elm-test": "cd elm && node ../bin/elm-test", "test-only": "mocha tests && npm run elm-test", - "test": "npm run check && npm run test-only", "check": "flow check && npm run lint && npm run format:check && npm run review", "format:check": "prettier --check . && elm-format elm --validate", "format:write": "prettier --write . && elm-format elm --yes" @@ -47,7 +48,7 @@ "chokidar": "^3.4.2", "commander": "^6.2.0", "cross-spawn": "^7.0.3", - "elm-json": "^0.2.8", + "elm-tooling": "^0.6.3", "glob": "^7.1.6", "graceful-fs": "^4.2.4", "rimraf": "^3.0.2", @@ -56,8 +57,6 @@ "xmlbuilder": "^15.1.0" }, "devDependencies": { - "elm": "0.19.1-3", - "elm-format": "0.8.4", "elm-review": "2.3.3", "eslint": "7.12.1", "eslint-plugin-mocha": "8.0.0", diff --git a/tests/flags.js b/tests/flags.js index 9e4130c5..ef0a65a6 100644 --- a/tests/flags.js +++ b/tests/flags.js @@ -9,6 +9,7 @@ const xml2js = require('xml2js'); const readline = require('readline'); const rimraf = require('rimraf'); const stripAnsi = require('strip-ansi'); +const which = require('which'); const { fixturesDir, spawnOpts, dummyBinPath } = require('./util'); const rootDir = path.join(__dirname, '..'); @@ -356,12 +357,12 @@ describe('flags', () => { describe('--compiler', () => { before(() => { - // Warning: this assumes the directory structure of the elm npm module. - // It may break with new npm versions of elm. - const ext = process.platform === 'win32' ? '.exe' : ''; - const elmExe = require.resolve('elm/bin/elm' + ext); + const elmExe = path.resolve(which.sync('elm')); fs.mkdirSync(dummyBinPath, { recursive: true }); - fs.copyFileSync(elmExe, path.join(dummyBinPath, 'different-elm' + ext)); + fs.copyFileSync( + elmExe, + path.join(dummyBinPath, 'different-elm' + path.extname(elmExe)) + ); }); it('Should fail if given no value', () => {