@yarnpkg/plugin-constraints
Advanced tools
Comparing version 3.0.0 to 3.0.1-rc.1
@@ -29,4 +29,2 @@ "use strict"; | ||
if (value instanceof tau_prolog_1.default.type.Term) { | ||
if (value.args.length === 0) | ||
return value.id; | ||
switch (value.indicator) { | ||
@@ -38,3 +36,10 @@ case `throw/1`: | ||
case `error/2`: | ||
return Object.assign(extractErrorImpl(value.args[0]), ...extractErrorImpl(value.args[1])); | ||
if (value.args[0] instanceof tau_prolog_1.default.type.Term && value.args[0].indicator === `syntax_error/1`) { | ||
return Object.assign(extractErrorImpl(value.args[0]), ...extractErrorImpl(value.args[1])); | ||
} | ||
else { | ||
const err = extractErrorImpl(value.args[0]); | ||
err.message += ` (in ${extractErrorImpl(value.args[1])})`; | ||
return err; | ||
} | ||
case `syntax_error/1`: | ||
@@ -44,2 +49,4 @@ return new core_1.ReportError(core_1.MessageName.PROLOG_SYNTAX_ERROR, `Syntax error: ${extractErrorImpl(value.args[0])}`); | ||
return new core_1.ReportError(core_1.MessageName.PROLOG_EXISTENCE_ERROR, `Existence error: ${extractErrorImpl(value.args[0])} ${extractErrorImpl(value.args[1])} not found`); | ||
case `instantiation_error/0`: | ||
return new core_1.ReportError(core_1.MessageName.PROLOG_INSTANTIATION_ERROR, `Instantiation error: an argument is variable when an instantiated argument was expected`); | ||
case `line/1`: | ||
@@ -55,2 +62,4 @@ return { line: extractErrorImpl(value.args[0]) }; | ||
return `${extractErrorImpl(value.args[0])}/${extractErrorImpl(value.args[1])}`; | ||
default: | ||
return value.id; | ||
} | ||
@@ -57,0 +66,0 @@ } |
@@ -26,3 +26,3 @@ "use strict"; | ||
if (!isAtom(descriptorIdent) || !isAtom(descriptorRange)) { | ||
thread.throwError(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
thread.throw_error(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
return; | ||
@@ -51,3 +51,3 @@ } | ||
if (!isAtom(workspaceCwd) || !isAtom(fieldName)) { | ||
thread.throwError(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
thread.throw_error(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
return; | ||
@@ -68,3 +68,3 @@ } | ||
fieldValue, | ||
new tau_prolog_1.default.type.Term(String(value)), | ||
new tau_prolog_1.default.type.Term(JSON.stringify(value)), | ||
])]); | ||
@@ -84,3 +84,3 @@ }, | ||
if (!isAtom(workspaceCwd) || !isAtom(fieldName) || !isAtom(checkCode) || !isInstantiatedList(checkArgv)) { | ||
thread.throwError(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
thread.throw_error(tau_prolog_1.default.error.instantiation(atom.indicator)); | ||
return; | ||
@@ -87,0 +87,0 @@ } |
@@ -208,3 +208,3 @@ /* eslint-disable */ | ||
public throwError(error: Term<1, 'error'>): void; | ||
public throw_error(error: Term<1, 'error'>): void; | ||
@@ -211,0 +211,0 @@ public success(state: State, parent?: State): void; |
{ | ||
"name": "@yarnpkg/plugin-constraints", | ||
"version": "3.0.0", | ||
"version": "3.0.1-rc.1", | ||
"license": "BSD-2-Clause", | ||
@@ -12,3 +12,3 @@ "repository": { | ||
"dependencies": { | ||
"@yarnpkg/fslib": "^2.5.0", | ||
"@yarnpkg/fslib": "^2.6.0-rc.1", | ||
"clipanion": "^3.0.1", | ||
@@ -21,10 +21,10 @@ "lodash": "^4.17.15", | ||
"peerDependencies": { | ||
"@yarnpkg/cli": "^3.0.0", | ||
"@yarnpkg/core": "^3.0.0" | ||
"@yarnpkg/cli": "^3.1.0-rc.1", | ||
"@yarnpkg/core": "^3.1.0-rc.2" | ||
}, | ||
"devDependencies": { | ||
"@types/lodash": "^4.14.136", | ||
"@yarnpkg/builder": "3.0.0", | ||
"@yarnpkg/cli": "3.0.0", | ||
"@yarnpkg/core": "3.0.0", | ||
"@yarnpkg/builder": "3.0.2-rc.2", | ||
"@yarnpkg/cli": "3.1.0-rc.1", | ||
"@yarnpkg/core": "3.1.0-rc.2", | ||
"typescript": "^4.3.2" | ||
@@ -48,3 +48,4 @@ }, | ||
}, | ||
"stableVersion": "3.0.0", | ||
"typings": "./lib/index.d.ts" | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
47729
984
2
Updated@yarnpkg/fslib@^2.6.0-rc.1