Comparing version 0.19.1-revision8 to 0.19.1-revision9
@@ -172,3 +172,15 @@ // @flow | ||
const VERSION = '1.2.2'; | ||
const VERSION_RANGE = '1.2.2 <= v < 2.0.0'; | ||
function getExpectedVersion( | ||
project /*: typeof Project.Project */ | ||
) /*: string */ { | ||
switch (project.elmJson.type) { | ||
case 'application': | ||
return VERSION; | ||
case 'package': | ||
return VERSION_RANGE; | ||
} | ||
} | ||
async function installUnstableTestMaster( | ||
@@ -179,7 +191,8 @@ project /*: typeof Project.Project */ | ||
const actualVersion = directTestDependencies[PKG]; | ||
if (actualVersion !== VERSION) { | ||
const expectedVersion = getExpectedVersion(project); | ||
if (actualVersion.replace(/\s/g, '') !== expectedVersion.replace(/\s/g, '')) { | ||
throw new Error( | ||
` | ||
Could not find ${JSON.stringify(PKG)}: ${JSON.stringify( | ||
VERSION | ||
expectedVersion | ||
)} in your elm.json file here: | ||
@@ -190,3 +203,3 @@ | ||
This command only works if you have ${PKG} as a (direct) test-dependency, | ||
and only if you use version ${VERSION}. | ||
and only if you use ${JSON.stringify(expectedVersion)}. | ||
@@ -196,3 +209,3 @@ ${ | ||
? 'I could not find it at all.' | ||
: `You seem to be using version ${actualVersion}.` | ||
: `You seem to be using ${JSON.stringify(actualVersion)}.` | ||
} | ||
@@ -199,0 +212,0 @@ `.trim() |
{ | ||
"name": "elm-test", | ||
"version": "0.19.1-revision8", | ||
"version": "0.19.1-revision9", | ||
"description": "Run elm-test suites.", | ||
@@ -5,0 +5,0 @@ "main": "elm-test.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
188541
3485
5