Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cucumber/cucumber-expressions

Package Overview
Dependencies
Maintainers
2
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/cucumber-expressions - npm Package Compare versions

Comparing version 15.2.0 to 16.0.0

4

dist/cjs/src/index.d.ts

@@ -8,7 +8,7 @@ import Argument from './Argument.js';

import Group from './Group.js';
import ParameterType from './ParameterType.js';
import ParameterType, { StringOrRegExp, RegExps } from './ParameterType.js';
import ParameterTypeRegistry from './ParameterTypeRegistry.js';
import RegularExpression from './RegularExpression.js';
import { Expression } from './types.js';
export { Argument, CucumberExpression, CucumberExpressionGenerator, Expression, ExpressionFactory, GeneratedExpression, Group, Located, Node, NodeType, ParameterType, ParameterTypeRegistry, RegularExpression, Token, TokenType, };
export { Argument, CucumberExpression, CucumberExpressionGenerator, Expression, ExpressionFactory, GeneratedExpression, Group, Located, Node, NodeType, ParameterType, ParameterTypeRegistry, RegExps, RegularExpression, StringOrRegExp, Token, TokenType, };
//# sourceMappingURL=index.d.ts.map

@@ -6,5 +6,7 @@ interface Constructor<T> extends Function {

declare type Factory<T> = (...args: unknown[]) => T;
export declare type RegExps = StringOrRegExp | readonly StringOrRegExp[];
export declare type StringOrRegExp = string | RegExp;
export default class ParameterType<T> {
readonly name: string | undefined;
readonly type: Constructor<T> | Factory<T> | string | null;
readonly type: Constructor<T> | Factory<T> | null;
readonly useForSnippets: boolean;

@@ -19,3 +21,3 @@ readonly preferForRegexpMatch: boolean;

* @param name {String} the name of the type
* @param regexps {Array.<RegExp>,RegExp,Array.<String>,String} that matches the type
* @param regexps {Array.<RegExp | String>,RegExp,String} that matche the type
* @param type {Function} the prototype (constructor) of the type. May be null.

@@ -26,3 +28,3 @@ * @param transform {Function} function transforming string to another type. May be null.

*/
constructor(name: string | undefined, regexps: readonly RegExp[] | readonly string[] | RegExp | string, type: Constructor<T> | Factory<T> | string | null, transform: (...match: string[]) => T | PromiseLike<T>, useForSnippets: boolean, preferForRegexpMatch: boolean);
constructor(name: string | undefined, regexps: RegExps, type: Constructor<T> | Factory<T> | null, transform: (...match: string[]) => T | PromiseLike<T>, useForSnippets: boolean, preferForRegexpMatch: boolean);
transform(thisObj: unknown, groupValues: string[] | null): any;

@@ -29,0 +31,0 @@ }

@@ -23,3 +23,3 @@ "use strict";

* @param name {String} the name of the type
* @param regexps {Array.<RegExp>,RegExp,Array.<String>,String} that matches the type
* @param regexps {Array.<RegExp | String>,RegExp,String} that matche the type
* @param type {Function} the prototype (constructor) of the type. May be null.

@@ -75,3 +75,2 @@ * @param transform {Function} function transforming string to another type. May be null.

function stringArray(regexps) {
// @ts-ignore
var array = Array.isArray(regexps) ? regexps : [regexps];

@@ -78,0 +77,0 @@ return array.map(function (r) { return (r instanceof RegExp ? regexpSource(r) : r); });

@@ -8,7 +8,7 @@ import Argument from './Argument.js';

import Group from './Group.js';
import ParameterType from './ParameterType.js';
import ParameterType, { StringOrRegExp, RegExps } from './ParameterType.js';
import ParameterTypeRegistry from './ParameterTypeRegistry.js';
import RegularExpression from './RegularExpression.js';
import { Expression } from './types.js';
export { Argument, CucumberExpression, CucumberExpressionGenerator, Expression, ExpressionFactory, GeneratedExpression, Group, Located, Node, NodeType, ParameterType, ParameterTypeRegistry, RegularExpression, Token, TokenType, };
export { Argument, CucumberExpression, CucumberExpressionGenerator, Expression, ExpressionFactory, GeneratedExpression, Group, Located, Node, NodeType, ParameterType, ParameterTypeRegistry, RegExps, RegularExpression, StringOrRegExp, Token, TokenType, };
//# sourceMappingURL=index.d.ts.map

@@ -6,5 +6,7 @@ interface Constructor<T> extends Function {

declare type Factory<T> = (...args: unknown[]) => T;
export declare type RegExps = StringOrRegExp | readonly StringOrRegExp[];
export declare type StringOrRegExp = string | RegExp;
export default class ParameterType<T> {
readonly name: string | undefined;
readonly type: Constructor<T> | Factory<T> | string | null;
readonly type: Constructor<T> | Factory<T> | null;
readonly useForSnippets: boolean;

@@ -19,3 +21,3 @@ readonly preferForRegexpMatch: boolean;

* @param name {String} the name of the type
* @param regexps {Array.<RegExp>,RegExp,Array.<String>,String} that matches the type
* @param regexps {Array.<RegExp | String>,RegExp,String} that matche the type
* @param type {Function} the prototype (constructor) of the type. May be null.

@@ -26,3 +28,3 @@ * @param transform {Function} function transforming string to another type. May be null.

*/
constructor(name: string | undefined, regexps: readonly RegExp[] | readonly string[] | RegExp | string, type: Constructor<T> | Factory<T> | string | null, transform: (...match: string[]) => T | PromiseLike<T>, useForSnippets: boolean, preferForRegexpMatch: boolean);
constructor(name: string | undefined, regexps: RegExps, type: Constructor<T> | Factory<T> | null, transform: (...match: string[]) => T | PromiseLike<T>, useForSnippets: boolean, preferForRegexpMatch: boolean);
transform(thisObj: unknown, groupValues: string[] | null): any;

@@ -29,0 +31,0 @@ }

@@ -7,3 +7,3 @@ import CucumberExpressionError from './CucumberExpressionError.js';

* @param name {String} the name of the type
* @param regexps {Array.<RegExp>,RegExp,Array.<String>,String} that matches the type
* @param regexps {Array.<RegExp | String>,RegExp,String} that matche the type
* @param type {Function} the prototype (constructor) of the type. May be null.

@@ -57,3 +57,2 @@ * @param transform {Function} function transforming string to another type. May be null.

function stringArray(regexps) {
// @ts-ignore
const array = Array.isArray(regexps) ? regexps : [regexps];

@@ -60,0 +59,0 @@ return array.map((r) => (r instanceof RegExp ? regexpSource(r) : r));

{
"name": "@cucumber/cucumber-expressions",
"version": "15.2.0",
"version": "16.0.0",
"description": "Cucumber Expressions - a simpler alternative to Regular Expressions",

@@ -54,6 +54,6 @@ "type": "module",

"devDependencies": {
"@codemirror/commands": "0.20.0",
"@codemirror/state": "0.20.0",
"@codemirror/view": "0.20.6",
"@headlessui/react": "1.6.2",
"@codemirror/commands": "6.0.0",
"@codemirror/state": "6.0.0",
"@codemirror/view": "6.0.0",
"@headlessui/react": "1.6.4",
"@stryker-mutator/core": "6.0.2",

@@ -65,12 +65,12 @@ "@stryker-mutator/mocha-runner": "6.0.2",

"@types/mocha": "9.1.1",
"@types/node": "17.0.35",
"@types/react": "18.0.9",
"@types/node": "17.0.42",
"@types/react": "18.0.12",
"@types/react-dom": "18.0.5",
"@types/react-router-dom": "5.3.3",
"@typescript-eslint/eslint-plugin": "5.26.0",
"@typescript-eslint/parser": "5.26.0",
"@typescript-eslint/eslint-plugin": "5.27.1",
"@typescript-eslint/parser": "5.27.1",
"autoprefixer": "10.4.7",
"cross-env": "7.0.3",
"esbuild": "0.14.39",
"eslint": "8.16.0",
"esbuild": "0.14.43",
"eslint": "8.17.0",
"eslint-config-prettier": "8.5.0",

@@ -86,3 +86,3 @@ "eslint-plugin-import": "2.26.0",

"mocha": "10.0.0",
"npm-check-updates": "13.0.3",
"npm-check-updates": "13.1.4",
"postcss": "8.4.14",

@@ -96,5 +96,5 @@ "postcss-cli": "9.1.0",

"react-router-dom": "5.3.3",
"tailwindcss": "3.0.24",
"ts-node": "10.8.0",
"typescript": "4.6.4",
"tailwindcss": "3.1.2",
"ts-node": "10.8.1",
"typescript": "4.7.3",
"use-query-params": "1.2.3"

@@ -101,0 +101,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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc