@cucumber/cucumber-expressions
Advanced tools
Comparing version 17.0.1 to 17.0.2
@@ -25,19 +25,19 @@ "use strict"; | ||
function createAlternativeMayNotExclusivelyContainOptionals(node, expression) { | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An alternative may not exclusively contain optionals', "If you did not mean to use an optional you can use '\\(' to escape the the '('")); | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An alternative may not exclusively contain optionals', "If you did not mean to use an optional you can use '\\(' to escape the '('")); | ||
} | ||
exports.createAlternativeMayNotExclusivelyContainOptionals = createAlternativeMayNotExclusivelyContainOptionals; | ||
function createAlternativeMayNotBeEmpty(node, expression) { | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'Alternative may not be empty', "If you did not mean to use an alternative you can use '\\/' to escape the the '/'")); | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'Alternative may not be empty', "If you did not mean to use an alternative you can use '\\/' to escape the '/'")); | ||
} | ||
exports.createAlternativeMayNotBeEmpty = createAlternativeMayNotBeEmpty; | ||
function createOptionalMayNotBeEmpty(node, expression) { | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional must contain some text', "If you did not mean to use an optional you can use '\\(' to escape the the '('")); | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional must contain some text', "If you did not mean to use an optional you can use '\\(' to escape the '('")); | ||
} | ||
exports.createOptionalMayNotBeEmpty = createOptionalMayNotBeEmpty; | ||
function createParameterIsNotAllowedInOptional(node, expression) { | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional may not contain a parameter type', "If you did not mean to use an parameter type you can use '\\{' to escape the the '{'")); | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional may not contain a parameter type', "If you did not mean to use an parameter type you can use '\\{' to escape the '{'")); | ||
} | ||
exports.createParameterIsNotAllowedInOptional = createParameterIsNotAllowedInOptional; | ||
function createOptionalIsNotAllowedInOptional(node, expression) { | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional may not contain an other optional', "If you did not mean to use an optional type you can use '\\(' to escape the the '('. For more complicated expressions consider using a regular expression instead.")); | ||
return new CucumberExpressionError_js_1.default(message(node.start, expression, pointAtLocated(node), 'An optional may not contain an other optional', "If you did not mean to use an optional type you can use '\\(' to escape the '('. For more complicated expressions consider using a regular expression instead.")); | ||
} | ||
@@ -47,3 +47,3 @@ exports.createOptionalIsNotAllowedInOptional = createOptionalIsNotAllowedInOptional; | ||
var index = Array.from(expression).length - 1; | ||
return new CucumberExpressionError_js_1.default(message(index, expression, pointAt(index), 'The end of line can not be escaped', "You can use '\\\\' to escape the the '\\'")); | ||
return new CucumberExpressionError_js_1.default(message(index, expression, pointAt(index), 'The end of line can not be escaped', "You can use '\\\\' to escape the '\\'")); | ||
} | ||
@@ -59,3 +59,3 @@ exports.createTheEndOfLIneCanNotBeEscaped = createTheEndOfLIneCanNotBeEscaped; | ||
function createAlternationNotAllowedInOptional(expression, current) { | ||
return new CucumberExpressionError_js_1.default(message(current.start, expression, pointAtLocated(current), 'An alternation can not be used inside an optional', "You can use '\\/' to escape the the '/'")); | ||
return new CucumberExpressionError_js_1.default(message(current.start, expression, pointAtLocated(current), 'An alternation can not be used inside an optional', "If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead.")); | ||
} | ||
@@ -62,0 +62,0 @@ exports.createAlternationNotAllowedInOptional = createAlternationNotAllowedInOptional; |
import { purposeOf, symbolOf } from './Ast.js'; | ||
import CucumberExpressionError from './CucumberExpressionError.js'; | ||
export function createAlternativeMayNotExclusivelyContainOptionals(node, expression) { | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An alternative may not exclusively contain optionals', "If you did not mean to use an optional you can use '\\(' to escape the the '('")); | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An alternative may not exclusively contain optionals', "If you did not mean to use an optional you can use '\\(' to escape the '('")); | ||
} | ||
export function createAlternativeMayNotBeEmpty(node, expression) { | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'Alternative may not be empty', "If you did not mean to use an alternative you can use '\\/' to escape the the '/'")); | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'Alternative may not be empty', "If you did not mean to use an alternative you can use '\\/' to escape the '/'")); | ||
} | ||
export function createOptionalMayNotBeEmpty(node, expression) { | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional must contain some text', "If you did not mean to use an optional you can use '\\(' to escape the the '('")); | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional must contain some text', "If you did not mean to use an optional you can use '\\(' to escape the '('")); | ||
} | ||
export function createParameterIsNotAllowedInOptional(node, expression) { | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional may not contain a parameter type', "If you did not mean to use an parameter type you can use '\\{' to escape the the '{'")); | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional may not contain a parameter type', "If you did not mean to use an parameter type you can use '\\{' to escape the '{'")); | ||
} | ||
export function createOptionalIsNotAllowedInOptional(node, expression) { | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional may not contain an other optional', "If you did not mean to use an optional type you can use '\\(' to escape the the '('. For more complicated expressions consider using a regular expression instead.")); | ||
return new CucumberExpressionError(message(node.start, expression, pointAtLocated(node), 'An optional may not contain an other optional', "If you did not mean to use an optional type you can use '\\(' to escape the '('. For more complicated expressions consider using a regular expression instead.")); | ||
} | ||
export function createTheEndOfLIneCanNotBeEscaped(expression) { | ||
const index = Array.from(expression).length - 1; | ||
return new CucumberExpressionError(message(index, expression, pointAt(index), 'The end of line can not be escaped', "You can use '\\\\' to escape the the '\\'")); | ||
return new CucumberExpressionError(message(index, expression, pointAt(index), 'The end of line can not be escaped', "You can use '\\\\' to escape the '\\'")); | ||
} | ||
@@ -29,3 +29,3 @@ export function createMissingEndToken(expression, beginToken, endToken, current) { | ||
export function createAlternationNotAllowedInOptional(expression, current) { | ||
return new CucumberExpressionError(message(current.start, expression, pointAtLocated(current), 'An alternation can not be used inside an optional', "You can use '\\/' to escape the the '/'")); | ||
return new CucumberExpressionError(message(current.start, expression, pointAtLocated(current), 'An alternation can not be used inside an optional', "If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead.")); | ||
} | ||
@@ -32,0 +32,0 @@ export function createCantEscaped(expression, index) { |
{ | ||
"name": "@cucumber/cucumber-expressions", | ||
"version": "17.0.1", | ||
"version": "17.0.2", | ||
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions", | ||
@@ -50,26 +50,26 @@ "type": "module", | ||
"devDependencies": { | ||
"@stryker-mutator/core": "7.3.0", | ||
"@stryker-mutator/mocha-runner": "7.3.0", | ||
"@stryker-mutator/core": "8.2.4", | ||
"@stryker-mutator/mocha-runner": "8.2.4", | ||
"@types/glob": "8.1.0", | ||
"@types/js-yaml": "4.0.9", | ||
"@types/mocha": "10.0.6", | ||
"@types/node": "18.18.13", | ||
"@typescript-eslint/eslint-plugin": "6.12.0", | ||
"@typescript-eslint/parser": "6.12.0", | ||
"@types/node": "20.11.19", | ||
"@typescript-eslint/eslint-plugin": "6.21.0", | ||
"@typescript-eslint/parser": "6.21.0", | ||
"cross-env": "7.0.3", | ||
"esbuild": "0.19.7", | ||
"eslint": "8.54.0", | ||
"eslint-config-prettier": "9.0.0", | ||
"eslint-plugin-import": "2.29.0", | ||
"esbuild": "0.20.1", | ||
"eslint": "8.56.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-prettier": "5.0.1", | ||
"eslint-plugin-simple-import-sort": "10.0.0", | ||
"eslint-plugin-prettier": "5.1.3", | ||
"eslint-plugin-simple-import-sort": "12.0.0", | ||
"glob": "10.3.10", | ||
"js-yaml": "4.1.0", | ||
"mocha": "10.2.0", | ||
"npm-check-updates": "16.14.11", | ||
"prettier": "3.1.0", | ||
"mocha": "10.3.0", | ||
"npm-check-updates": "16.14.15", | ||
"prettier": "3.2.5", | ||
"pretty-quick": "3.1.3", | ||
"ts-node": "10.9.1", | ||
"typescript": "5.3.2" | ||
"ts-node": "10.9.2", | ||
"typescript": "5.3.3" | ||
}, | ||
@@ -76,0 +76,0 @@ "dependencies": { |
@@ -16,3 +16,3 @@ import { Located, Node, purposeOf, symbolOf, Token, TokenType } from './Ast.js' | ||
'An alternative may not exclusively contain optionals', | ||
"If you did not mean to use an optional you can use '\\(' to escape the the '('" | ||
"If you did not mean to use an optional you can use '\\(' to escape the '('" | ||
) | ||
@@ -31,3 +31,3 @@ ) | ||
'Alternative may not be empty', | ||
"If you did not mean to use an alternative you can use '\\/' to escape the the '/'" | ||
"If you did not mean to use an alternative you can use '\\/' to escape the '/'" | ||
) | ||
@@ -46,3 +46,3 @@ ) | ||
'An optional must contain some text', | ||
"If you did not mean to use an optional you can use '\\(' to escape the the '('" | ||
"If you did not mean to use an optional you can use '\\(' to escape the '('" | ||
) | ||
@@ -61,3 +61,3 @@ ) | ||
'An optional may not contain a parameter type', | ||
"If you did not mean to use an parameter type you can use '\\{' to escape the the '{'" | ||
"If you did not mean to use an parameter type you can use '\\{' to escape the '{'" | ||
) | ||
@@ -77,3 +77,3 @@ ) | ||
'An optional may not contain an other optional', | ||
"If you did not mean to use an optional type you can use '\\(' to escape the the '('. For more complicated expressions consider using a regular expression instead." | ||
"If you did not mean to use an optional type you can use '\\(' to escape the '('. For more complicated expressions consider using a regular expression instead." | ||
) | ||
@@ -91,3 +91,3 @@ ) | ||
'The end of line can not be escaped', | ||
"You can use '\\\\' to escape the the '\\'" | ||
"You can use '\\\\' to escape the '\\'" | ||
) | ||
@@ -124,3 +124,3 @@ ) | ||
'An alternation can not be used inside an optional', | ||
"You can use '\\/' to escape the the '/'" | ||
"If you did not mean to use an alternation you can use '\\/' to escape the '/'. Otherwise rephrase your expression or consider using a regular expression instead." | ||
) | ||
@@ -127,0 +127,0 @@ ) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
7189
615898