cucumber-expressions
Advanced tools
Comparing version 8.0.0 to 8.0.1
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -11,2 +11,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -13,0 +14,0 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -11,2 +11,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -13,0 +14,0 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -11,2 +11,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -13,0 +14,0 @@ Object.defineProperty(exports, "__esModule", { value: true }); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// @ts-ignore | ||
var xregexp_1 = __importDefault(require("xregexp")); | ||
// Needed for Node8 support, should be able to remove once Node 8 reaches end of life | ||
// (eta 2019-12-31) https://nodejs.org/en/about/releases/ | ||
var whitespacePunctuationPattern = xregexp_1.default('\\s|\\p{P}', 'u'); | ||
var ParameterTypeMatcher = /** @class */ (function () { | ||
@@ -45,3 +53,3 @@ function ParameterTypeMatcher(parameterType, regexpString, text, matchPosition) { | ||
get: function () { | ||
return this.start == 0 || this.text[this.start - 1].match(/\s|\p{P}/u); | ||
return this.start == 0 || this.text[this.start - 1].match(whitespacePunctuationPattern); | ||
}, | ||
@@ -54,3 +62,3 @@ enumerable: true, | ||
var next_character_index = this.start + this.group.length; | ||
return next_character_index === this.text.length || this.text[next_character_index].match(/\s|\p{P}/u); | ||
return next_character_index === this.text.length || this.text[next_character_index].match(whitespacePunctuationPattern); | ||
}, | ||
@@ -57,0 +65,0 @@ enumerable: true, |
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -11,2 +11,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -13,0 +14,0 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
"use strict"; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -11,2 +11,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -13,0 +14,0 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
'use strict'; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
@@ -40,3 +41,2 @@ }); | ||
}; | ||
var _this = this; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -154,5 +154,4 @@ var assert_1 = __importDefault(require("assert")); | ||
// JavaScript-specific | ||
it('creates arguments using async transform', function () { return __awaiter(_this, void 0, void 0, function () { | ||
it('creates arguments using async transform', function () { return __awaiter(void 0, void 0, void 0, function () { | ||
var expression, args, value; | ||
var _this = this; | ||
return __generator(this, function (_a) { | ||
@@ -163,3 +162,3 @@ switch (_a.label) { | ||
/// [add-async-parameter-type] | ||
parameterTypeRegistry.defineParameterType(new ParameterType_1.default('asyncColor', /red|blue|yellow/, Color, function (s) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) { | ||
parameterTypeRegistry.defineParameterType(new ParameterType_1.default('asyncColor', /red|blue|yellow/, Color, function (s) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) { | ||
return [2 /*return*/, new Color(s)]; | ||
@@ -166,0 +165,0 @@ }); }); }, false, true)); |
@@ -18,6 +18,6 @@ "use strict"; | ||
}; | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
var __values = (this && this.__values) || function(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
@@ -28,2 +28,3 @@ if (o && i >= o.length) o = void 0; | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
}; | ||
@@ -30,0 +31,0 @@ var __importDefault = (this && this.__importDefault) || function (mod) { |
{ | ||
"name": "cucumber-expressions", | ||
"version": "8.0.0", | ||
"version": "8.0.1", | ||
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions", | ||
@@ -33,11 +33,11 @@ "main": "dist/src/index.js", | ||
"@types/mocha": "^5.2.7", | ||
"@types/node": "^12.6.2", | ||
"mocha": "^6.1.4", | ||
"@types/node": "^12.7.11", | ||
"mocha": "^6.2.1", | ||
"nyc": "^14.1.1", | ||
"prettier": "^1.18.2", | ||
"ts-node": "^8.3.0", | ||
"tslint": "^5.18.0", | ||
"ts-node": "^8.4.1", | ||
"tslint": "^5.20.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-plugin-prettier": "^2.0.1", | ||
"typescript": "^3.5.3" | ||
"typescript": "^3.6.3" | ||
}, | ||
@@ -48,4 +48,5 @@ "files": [ | ||
"dependencies": { | ||
"becke-ch--regex--s0-0-v1--base--pl--lib": "^1.4.0" | ||
"becke-ch--regex--s0-0-v1--base--pl--lib": "^1.4.0", | ||
"xregexp": "^4.2.4" | ||
} | ||
} |
import ParameterType from './ParameterType' | ||
// @ts-ignore | ||
import XRegExp from 'xregexp'; | ||
// Needed for Node8 support, should be able to remove once Node 8 reaches end of life | ||
// (eta 2019-12-31) https://nodejs.org/en/about/releases/ | ||
const whitespacePunctuationPattern = XRegExp('\\s|\\p{P}', 'u') | ||
export default class ParameterTypeMatcher { | ||
@@ -55,3 +61,3 @@ private readonly match: RegExpExecArray | ||
get match_start_word() { | ||
return this.start == 0 || this.text[this.start - 1].match(/\s|\p{P}/u) | ||
return this.start == 0 || this.text[this.start - 1].match(whitespacePunctuationPattern) | ||
} | ||
@@ -61,3 +67,3 @@ | ||
const next_character_index = this.start + this.group.length | ||
return next_character_index === this.text.length || this.text[next_character_index].match(/\s|\p{P}/u) | ||
return next_character_index === this.text.length || this.text[next_character_index].match(whitespacePunctuationPattern) | ||
} | ||
@@ -64,0 +70,0 @@ |
@@ -15,2 +15,4 @@ { | ||
"allowJs": false, | ||
"jsx": "react", | ||
"resolveJsonModule": true, | ||
"module": "commonjs", | ||
@@ -21,3 +23,4 @@ "esModuleInterop": true, | ||
"outDir": "dist", | ||
"downlevelIteration": true | ||
"downlevelIteration": true, | ||
"skipLibCheck": true | ||
}, | ||
@@ -24,0 +27,0 @@ "include": [ |
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
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
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 too big to display
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
141
332293
2
6211
+ Addedxregexp@^4.2.4
+ Added@babel/runtime-corejs3@7.26.0(transitive)
+ Addedcore-js-pure@3.39.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedxregexp@4.4.1(transitive)