@dbpath/pathparser
Advanced tools
Comparing version 0.3.12 to 0.3.13
@@ -64,5 +64,5 @@ "use strict"; | ||
const c = { pos: 0, tokens, validator }; | ||
const { context, error, result } = (0, exports.parseTableAndLinks)(c); | ||
if (error) | ||
return (0, parser_1.parserErrorMessage)(s, context, error); | ||
const { context, errors, result } = (0, exports.parseTableAndLinks)(c); | ||
if (errors) | ||
return (0, parser_1.parserErrorMessage)(s, context, errors); | ||
if (context.pos < tokens.length - 1) | ||
@@ -69,0 +69,0 @@ return (0, parser_1.parserErrorMessage)(s, context, ["Expected '.'"]); |
@@ -11,3 +11,3 @@ "use strict"; | ||
let pos = token ? token.pos : s.length; | ||
return { error: pr.error, token, pos, s }; | ||
return { error: pr.errors, token, pos, s }; | ||
} | ||
@@ -31,5 +31,5 @@ exports.errorData = errorData; | ||
let initialContext = makeContext(s); | ||
let { context, result, error } = (0, path_parser_1.parseTable)(initialContext); | ||
if (error) | ||
throw error; | ||
let { context, result, errors } = (0, path_parser_1.parseTable)(initialContext); | ||
if (errors) | ||
throw errors; | ||
expect(context.pos - initialContext.pos).toEqual(consume); | ||
@@ -40,5 +40,5 @@ return result; | ||
let initialContext = makeContext(s); | ||
let { context, result, error } = (0, path_parser_1.parseLink)(pt)(initialContext); | ||
if (error) | ||
throw error; | ||
let { context, result, errors } = (0, path_parser_1.parseLink)(pt)(initialContext); | ||
if (errors) | ||
throw errors; | ||
expect(context.pos - initialContext.pos).toEqual(consume); | ||
@@ -51,7 +51,7 @@ return result; | ||
let cr = (0, path_parser_1.parseTable)(initialContext); | ||
const { context, result, error } = cr; | ||
const { context, result, errors } = cr; | ||
expect(result).toBeUndefined(); | ||
const { pos } = errorData(cr, 'junk.' + s); | ||
expect(pos - 'junk.'.length).toEqual(errorPos); | ||
return error; | ||
return errors; | ||
} | ||
@@ -58,0 +58,0 @@ it("should parse drive", () => { |
{ | ||
"name": "@dbpath/pathparser", | ||
"description": "", | ||
"version": "0.3.12", | ||
"version": "0.3.13", | ||
"main": "dist/index", | ||
@@ -20,6 +20,6 @@ "types": "dist/index", | ||
"dependencies": { | ||
"@dbpath/types": "0.3.12", | ||
"@dbpath/utils": "0.3.12", | ||
"@dbpath/parser": "0.3.12", | ||
"@dbpath/fixtures": "0.3.12" | ||
"@dbpath/types": "0.3.13", | ||
"@dbpath/utils": "0.3.13", | ||
"@dbpath/parser": "0.3.13", | ||
"@dbpath/fixtures": "0.3.13" | ||
}, | ||
@@ -26,0 +26,0 @@ "devDependencies": { |
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
52617
+ Added@dbpath/fixtures@0.3.13(transitive)
+ Added@dbpath/parser@0.3.13(transitive)
+ Added@dbpath/types@0.3.13(transitive)
+ Added@dbpath/utils@0.3.13(transitive)
- Removed@dbpath/fixtures@0.3.12(transitive)
- Removed@dbpath/parser@0.3.12(transitive)
- Removed@dbpath/types@0.3.12(transitive)
- Removed@dbpath/utils@0.3.12(transitive)
Updated@dbpath/fixtures@0.3.13
Updated@dbpath/parser@0.3.13
Updated@dbpath/types@0.3.13
Updated@dbpath/utils@0.3.13