diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..6c99ed2f5 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,40 @@ +import js from "@eslint/js"; +import jest from "eslint-plugin-jest"; +import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended"; +import globals from "globals"; + +export default [ + { + ignores: ["dist", "docs", "example", "tutorials"], + }, + js.configs.recommended, + { + files: ["test/**"], + ...jest.configs["flat/recommended"], + rules: { + ...jest.configs["flat/recommended"].rules, + "no-console": "off", + }, + languageOptions: { + globals: jest.environments.globals.globals, + }, + }, + { + languageOptions: { + globals: { + ...globals.browser, + ...globals.node, + }, + sourceType: "commonjs", + }, + + rules: { + "prefer-const": "error", + "no-var": "error", + "prettier/prettier": "error", + curly: ["error", "multi-line"], + }, + }, + eslintPluginPrettierRecommended, +]; + diff --git a/package.json b/package.json index 4788a354d..ed58a4b62 100644 --- a/package.json +++ b/package.json @@ -59,19 +59,23 @@ "devDependencies": { "@babel/core": "^7.26.0", "@babel/preset-env": "^7.26.0", + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.14.0", "babel-loader": "^9.2.1", "benchmark": "^2.1.4", "coveralls": "^3.0.3", - "eslint": "^8.36.0", - "eslint-plugin-jest": "^27.2.1", - "eslint-plugin-prettier": "^4.2.1", + "eslint": "^9.14.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-jest": "^28.9.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "^15.12.0", "husky": "^9.1.6", "jest": "^29.7.0", "jest-runner-eslint": "^2.2.1", "jsdoc": "^3.6.11", "jsdoc-template": "^1.2.0", "lodash.template": ">=4.5.0", - "prettier": "^2.8.6", + "prettier": "^3.3.3", "tsd-jsdoc": "^2.5.0", "webpack": "^5.96.1", "webpack-cli": "^5.1.4", diff --git a/src/ast.js b/src/ast.js index 7436bc612..d11b556b5 100644 --- a/src/ast.js +++ b/src/ast.js @@ -184,7 +184,7 @@ AST.prototype.swapLocations = function (target, first, last, parser) { if (this.withSource) { target.loc.source = parser.lexer._input.substring( target.loc.start.offset, - target.loc.end.offset + target.loc.end.offset, ); } } @@ -208,7 +208,7 @@ AST.prototype.resolveLocations = function (target, first, last, parser) { if (this.withSource) { target.loc.source = parser.lexer._input.substring( target.loc.start.offset, - target.loc.end.offset + target.loc.end.offset, ); } } @@ -376,7 +376,7 @@ AST.prototype.prepare = function (kind, docs, parser) { location = new Location( src, start, - new Position(parser.prev[0], parser.prev[1], parser.prev[2]) + new Position(parser.prev[0], parser.prev[1], parser.prev[2]), ); // last argument is always the location args.push(location); diff --git a/src/ast/array.js b/src/ast/array.js index b21a9a02c..ce518aa79 100644 --- a/src/ast/array.js +++ b/src/ast/array.js @@ -40,5 +40,5 @@ module.exports = Expr.extends( Expr.apply(this, [KIND, docs, location]); this.items = items; this.shortForm = shortForm; - } + }, ); diff --git a/src/ast/arrowfunc.js b/src/ast/arrowfunc.js index 9030f839f..695b6ef6a 100644 --- a/src/ast/arrowfunc.js +++ b/src/ast/arrowfunc.js @@ -30,7 +30,7 @@ module.exports = Expression.extends( nullable, isStatic, docs, - location + location, ) { Expression.apply(this, [KIND, docs, location]); this.arguments = args; @@ -39,5 +39,5 @@ module.exports = Expression.extends( this.type = type; this.nullable = nullable; this.isStatic = isStatic || false; - } + }, ); diff --git a/src/ast/assign.js b/src/ast/assign.js index 361423f27..4cf6a6857 100644 --- a/src/ast/assign.js +++ b/src/ast/assign.js @@ -24,5 +24,5 @@ module.exports = Expression.extends( this.left = left; this.right = right; this.operator = operator; - } + }, ); diff --git a/src/ast/assignref.js b/src/ast/assignref.js index b2b7cc72b..668bd058a 100644 --- a/src/ast/assignref.js +++ b/src/ast/assignref.js @@ -23,5 +23,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.left = left; this.right = right; - } + }, ); diff --git a/src/ast/attribute.js b/src/ast/attribute.js index 3cff0e54e..f617bb6d1 100644 --- a/src/ast/attribute.js +++ b/src/ast/attribute.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.name = name; this.args = args; - } + }, ); diff --git a/src/ast/bin.js b/src/ast/bin.js index e25b35d38..6221f4843 100644 --- a/src/ast/bin.js +++ b/src/ast/bin.js @@ -23,5 +23,5 @@ module.exports = Operation.extends( this.type = type; this.left = left; this.right = right; - } + }, ); diff --git a/src/ast/block.js b/src/ast/block.js index 2666837f9..1a51712f9 100644 --- a/src/ast/block.js +++ b/src/ast/block.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function Block(kind, children, docs, location) { Statement.apply(this, [kind || KIND, docs, location]); this.children = children.filter(Boolean); - } + }, ); diff --git a/src/ast/boolean.js b/src/ast/boolean.js index b0bc5eb0f..9480d662d 100644 --- a/src/ast/boolean.js +++ b/src/ast/boolean.js @@ -19,5 +19,5 @@ module.exports = Literal.extends( KIND, function Boolean(value, raw, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); - } + }, ); diff --git a/src/ast/call.js b/src/ast/call.js index c1aa0fbc5..51daf3485 100644 --- a/src/ast/call.js +++ b/src/ast/call.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.what = what; this.arguments = args; - } + }, ); diff --git a/src/ast/case.js b/src/ast/case.js index 4a13d6078..8e25b0537 100644 --- a/src/ast/case.js +++ b/src/ast/case.js @@ -22,5 +22,5 @@ module.exports = Statement.extends( Statement.apply(this, [KIND, docs, location]); this.test = test; this.body = body; - } + }, ); diff --git a/src/ast/cast.js b/src/ast/cast.js index d28e4d65b..8dadffa0a 100644 --- a/src/ast/cast.js +++ b/src/ast/cast.js @@ -24,5 +24,5 @@ module.exports = Operation.extends( this.type = type; this.raw = raw; this.expr = expr; - } + }, ); diff --git a/src/ast/catch.js b/src/ast/catch.js index a7297af9d..4560ffb97 100644 --- a/src/ast/catch.js +++ b/src/ast/catch.js @@ -25,5 +25,5 @@ module.exports = Statement.extends( this.body = body; this.what = what; this.variable = variable; - } + }, ); diff --git a/src/ast/class.js b/src/ast/class.js index 637783077..cfa620c2c 100644 --- a/src/ast/class.js +++ b/src/ast/class.js @@ -32,5 +32,5 @@ module.exports = Declaration.extends( this.body = body; this.attrGroups = []; this.parseFlags(flags); - } + }, ); diff --git a/src/ast/classconstant.js b/src/ast/classconstant.js index e2810248d..bea667188 100644 --- a/src/ast/classconstant.js +++ b/src/ast/classconstant.js @@ -34,14 +34,14 @@ const ClassConstant = ConstantStatement.extends( type, attrGroups, docs, - location + location, ) { ConstantStatement.apply(this, [kind || KIND, constants, docs, location]); this.parseFlags(flags); this.nullable = nullable; this.type = type; this.attrGroups = attrGroups; - } + }, ); /** diff --git a/src/ast/closure.js b/src/ast/closure.js index 112ca7cb4..059f47e12 100644 --- a/src/ast/closure.js +++ b/src/ast/closure.js @@ -32,7 +32,7 @@ module.exports = Expression.extends( nullable, isStatic, docs, - location + location, ) { Expression.apply(this, [KIND, docs, location]); this.uses = uses; @@ -43,5 +43,5 @@ module.exports = Expression.extends( this.isStatic = isStatic || false; this.body = null; this.attrGroups = []; - } + }, ); diff --git a/src/ast/comment.js b/src/ast/comment.js index cfde90c2e..71f99fe0d 100644 --- a/src/ast/comment.js +++ b/src/ast/comment.js @@ -19,5 +19,5 @@ module.exports = Node.extends( function Comment(kind, value, docs, location) { Node.apply(this, [kind, docs, location]); this.value = value; - } + }, ); diff --git a/src/ast/commentblock.js b/src/ast/commentblock.js index c6217c43e..9b94b8326 100644 --- a/src/ast/commentblock.js +++ b/src/ast/commentblock.js @@ -18,5 +18,5 @@ module.exports = Comment.extends( KIND, function CommentBlock(value, docs, location) { Comment.apply(this, [KIND, value, docs, location]); - } + }, ); diff --git a/src/ast/commentline.js b/src/ast/commentline.js index 8c5105b1e..d92d6f2d1 100644 --- a/src/ast/commentline.js +++ b/src/ast/commentline.js @@ -18,5 +18,5 @@ module.exports = Comment.extends( KIND, function CommentLine(value, docs, location) { Comment.apply(this, [KIND, value, docs, location]); - } + }, ); diff --git a/src/ast/constant.js b/src/ast/constant.js index a6a28658f..698a7b14e 100644 --- a/src/ast/constant.js +++ b/src/ast/constant.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.name = name; this.value = value; - } + }, ); diff --git a/src/ast/constantstatement.js b/src/ast/constantstatement.js index 161876255..eac6ca245 100644 --- a/src/ast/constantstatement.js +++ b/src/ast/constantstatement.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function ConstantStatement(kind, constants, docs, location) { Statement.apply(this, [kind || KIND, docs, location]); this.constants = constants; - } + }, ); diff --git a/src/ast/continue.js b/src/ast/continue.js index c968b9a88..8344bc1b4 100644 --- a/src/ast/continue.js +++ b/src/ast/continue.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function Continue(level, docs, location) { Statement.apply(this, [KIND, docs, location]); this.level = level; - } + }, ); diff --git a/src/ast/declaration.js b/src/ast/declaration.js index cfc6245fb..33ffbf5e0 100644 --- a/src/ast/declaration.js +++ b/src/ast/declaration.js @@ -25,7 +25,7 @@ const Declaration = Statement.extends( function Declaration(kind, name, docs, location) { Statement.apply(this, [kind || KIND, docs, location]); this.name = name; - } + }, ); /** diff --git a/src/ast/declare.js b/src/ast/declare.js index 8ed52fa83..dab989f21 100644 --- a/src/ast/declare.js +++ b/src/ast/declare.js @@ -23,7 +23,7 @@ const Declare = Block.extends( Block.apply(this, [KIND, body, docs, location]); this.directives = directives; this.mode = mode; - } + }, ); /** diff --git a/src/ast/declaredirective.js b/src/ast/declaredirective.js index 15f82e606..ed65937d0 100644 --- a/src/ast/declaredirective.js +++ b/src/ast/declaredirective.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.key = key; this.value = value; - } + }, ); diff --git a/src/ast/do.js b/src/ast/do.js index c002402c5..801790893 100644 --- a/src/ast/do.js +++ b/src/ast/do.js @@ -22,5 +22,5 @@ module.exports = Statement.extends( Statement.apply(this, [KIND, docs, location]); this.test = test; this.body = body; - } + }, ); diff --git a/src/ast/echo.js b/src/ast/echo.js index 5453cdb08..5bf5765bb 100644 --- a/src/ast/echo.js +++ b/src/ast/echo.js @@ -22,5 +22,5 @@ module.exports = Statement.extends( Statement.apply(this, [KIND, docs, location]); this.shortForm = shortForm; this.expressions = expressions; - } + }, ); diff --git a/src/ast/empty.js b/src/ast/empty.js index cb86e2801..d2c5809b7 100644 --- a/src/ast/empty.js +++ b/src/ast/empty.js @@ -19,5 +19,5 @@ module.exports = Expression.extends( function Empty(expression, docs, location) { Expression.apply(this, [KIND, docs, location]); this.expression = expression; - } + }, ); diff --git a/src/ast/encapsed.js b/src/ast/encapsed.js index a7762c986..ac34a4365 100644 --- a/src/ast/encapsed.js +++ b/src/ast/encapsed.js @@ -22,7 +22,7 @@ const Encapsed = Literal.extends( function Encapsed(value, raw, type, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); this.type = type; - } + }, ); /** diff --git a/src/ast/encapsedpart.js b/src/ast/encapsedpart.js index 90f852f9c..cb5d836b1 100644 --- a/src/ast/encapsedpart.js +++ b/src/ast/encapsedpart.js @@ -24,5 +24,5 @@ module.exports = Expression.extends( this.expression = expression; this.syntax = syntax; this.curly = curly; - } + }, ); diff --git a/src/ast/entry.js b/src/ast/entry.js index c28481acb..4300e2366 100644 --- a/src/ast/entry.js +++ b/src/ast/entry.js @@ -26,5 +26,5 @@ module.exports = Expression.extends( this.value = value; this.byRef = byRef; this.unpack = unpack; - } + }, ); diff --git a/src/ast/enum.js b/src/ast/enum.js index 2cfc3fcd4..eee63b58d 100644 --- a/src/ast/enum.js +++ b/src/ast/enum.js @@ -26,5 +26,5 @@ module.exports = Declaration.extends( this.implements = impl; this.body = body; this.attrGroups = []; - } + }, ); diff --git a/src/ast/enumcase.js b/src/ast/enumcase.js index 565d3217f..a182d25a7 100644 --- a/src/ast/enumcase.js +++ b/src/ast/enumcase.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.name = name; this.value = value; - } + }, ); diff --git a/src/ast/error.js b/src/ast/error.js index 918ed399f..a715469c4 100644 --- a/src/ast/error.js +++ b/src/ast/error.js @@ -26,5 +26,5 @@ module.exports = Node.extends( this.token = token; this.line = line; this.expected = expected; - } + }, ); diff --git a/src/ast/eval.js b/src/ast/eval.js index 1c5f38b95..950414823 100644 --- a/src/ast/eval.js +++ b/src/ast/eval.js @@ -20,5 +20,5 @@ module.exports = Expression.extends( function Eval(source, docs, location) { Expression.apply(this, [KIND, docs, location]); this.source = source; - } + }, ); diff --git a/src/ast/exit.js b/src/ast/exit.js index 0a34b4edd..3d895dd6e 100644 --- a/src/ast/exit.js +++ b/src/ast/exit.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.expression = expression; this.useDie = useDie; - } + }, ); diff --git a/src/ast/expressionstatement.js b/src/ast/expressionstatement.js index 05a4e697a..77f40d51c 100644 --- a/src/ast/expressionstatement.js +++ b/src/ast/expressionstatement.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function ExpressionStatement(expr, docs, location) { Statement.apply(this, [KIND, docs, location]); this.expression = expr; - } + }, ); diff --git a/src/ast/for.js b/src/ast/for.js index 6db689492..37ad87004 100644 --- a/src/ast/for.js +++ b/src/ast/for.js @@ -29,5 +29,5 @@ module.exports = Statement.extends( this.increment = increment; this.shortForm = shortForm; this.body = body; - } + }, ); diff --git a/src/ast/foreach.js b/src/ast/foreach.js index 60c9ba648..dbb70e0e5 100644 --- a/src/ast/foreach.js +++ b/src/ast/foreach.js @@ -29,5 +29,5 @@ module.exports = Statement.extends( this.value = value; this.shortForm = shortForm; this.body = body; - } + }, ); diff --git a/src/ast/function.js b/src/ast/function.js index 388b8f77e..796903ab1 100644 --- a/src/ast/function.js +++ b/src/ast/function.js @@ -30,5 +30,5 @@ module.exports = Declaration.extends( this.nullable = nullable; this.body = null; this.attrGroups = []; - } + }, ); diff --git a/src/ast/global.js b/src/ast/global.js index a9dab2c71..ba9692f53 100644 --- a/src/ast/global.js +++ b/src/ast/global.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function Global(items, docs, location) { Statement.apply(this, [KIND, docs, location]); this.items = items; - } + }, ); diff --git a/src/ast/identifier.js b/src/ast/identifier.js index b193f3488..557c8f557 100644 --- a/src/ast/identifier.js +++ b/src/ast/identifier.js @@ -20,7 +20,7 @@ const Identifier = Node.extends( function Identifier(name, docs, location) { Node.apply(this, [KIND, docs, location]); this.name = name; - } + }, ); module.exports = Identifier; diff --git a/src/ast/if.js b/src/ast/if.js index 00cb0e988..c04b61246 100644 --- a/src/ast/if.js +++ b/src/ast/if.js @@ -26,5 +26,5 @@ module.exports = Statement.extends( this.body = body; this.alternate = alternate; this.shortForm = shortForm; - } + }, ); diff --git a/src/ast/include.js b/src/ast/include.js index a4f019b25..a6312cda1 100644 --- a/src/ast/include.js +++ b/src/ast/include.js @@ -24,5 +24,5 @@ module.exports = Expression.extends( this.once = once; this.require = require; this.target = target; - } + }, ); diff --git a/src/ast/inline.js b/src/ast/inline.js index eefe269b4..822ab0698 100644 --- a/src/ast/inline.js +++ b/src/ast/inline.js @@ -19,5 +19,5 @@ module.exports = Literal.extends( KIND, function Inline(value, raw, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); - } + }, ); diff --git a/src/ast/interface.js b/src/ast/interface.js index d1cfff699..fcdd3f833 100644 --- a/src/ast/interface.js +++ b/src/ast/interface.js @@ -24,5 +24,5 @@ module.exports = Declaration.extends( this.extends = ext; this.body = body; this.attrGroups = attrGroups; - } + }, ); diff --git a/src/ast/intersectiontype.js b/src/ast/intersectiontype.js index 9936ea3ca..0a316d950 100644 --- a/src/ast/intersectiontype.js +++ b/src/ast/intersectiontype.js @@ -20,5 +20,5 @@ module.exports = Declaration.extends( function IntersectionType(types, docs, location) { Declaration.apply(this, [KIND, null, docs, location]); this.types = types; - } + }, ); diff --git a/src/ast/isset.js b/src/ast/isset.js index 9dc33e3a4..9ea1e2a5d 100644 --- a/src/ast/isset.js +++ b/src/ast/isset.js @@ -19,5 +19,5 @@ module.exports = Expression.extends( function Isset(variables, docs, location) { Expression.apply(this, [KIND, docs, location]); this.variables = variables; - } + }, ); diff --git a/src/ast/list.js b/src/ast/list.js index b07e12bd3..efe7ef5c4 100644 --- a/src/ast/list.js +++ b/src/ast/list.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.items = items; this.shortForm = shortForm; - } + }, ); diff --git a/src/ast/literal.js b/src/ast/literal.js index 99cc53e6f..fcb849e06 100644 --- a/src/ast/literal.js +++ b/src/ast/literal.js @@ -24,5 +24,5 @@ module.exports = Expression.extends( if (raw) { this.raw = raw; } - } + }, ); diff --git a/src/ast/lookup.js b/src/ast/lookup.js index 752fc52c3..e0bf88a59 100644 --- a/src/ast/lookup.js +++ b/src/ast/lookup.js @@ -22,5 +22,5 @@ module.exports = Expr.extends( Expr.apply(this, [kind || KIND, docs, location]); this.what = what; this.offset = offset; - } + }, ); diff --git a/src/ast/magic.js b/src/ast/magic.js index b7ed97c27..2ff5511cd 100644 --- a/src/ast/magic.js +++ b/src/ast/magic.js @@ -18,5 +18,5 @@ module.exports = Literal.extends( KIND, function Magic(value, raw, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); - } + }, ); diff --git a/src/ast/match.js b/src/ast/match.js index f3f2e5119..ab76fe85a 100644 --- a/src/ast/match.js +++ b/src/ast/match.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.cond = cond; this.arms = arms; - } + }, ); diff --git a/src/ast/matcharm.js b/src/ast/matcharm.js index 1de633500..b8aea6a2d 100644 --- a/src/ast/matcharm.js +++ b/src/ast/matcharm.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.conds = conds; this.body = body; - } + }, ); diff --git a/src/ast/name.js b/src/ast/name.js index e4d3ed538..ae7ffcb21 100644 --- a/src/ast/name.js +++ b/src/ast/name.js @@ -22,7 +22,7 @@ const Name = Reference.extends( Reference.apply(this, [KIND, docs, location]); this.name = name.replace(/\\$/, ""); this.resolution = resolution; - } + }, ); /** diff --git a/src/ast/namedargument.js b/src/ast/namedargument.js index ee0cb8319..63e35b2d0 100644 --- a/src/ast/namedargument.js +++ b/src/ast/namedargument.js @@ -23,5 +23,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.name = name; this.value = value; - } + }, ); diff --git a/src/ast/namespace.js b/src/ast/namespace.js index 3a7a78d7a..60b72086c 100644 --- a/src/ast/namespace.js +++ b/src/ast/namespace.js @@ -22,5 +22,5 @@ module.exports = Block.extends( Block.apply(this, [KIND, children, docs, location]); this.name = name; this.withBrackets = withBrackets || false; - } + }, ); diff --git a/src/ast/new.js b/src/ast/new.js index 7f492b31f..554a21aa3 100644 --- a/src/ast/new.js +++ b/src/ast/new.js @@ -22,5 +22,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.what = what; this.arguments = args; - } + }, ); diff --git a/src/ast/node.js b/src/ast/node.js index 6522967cc..111ae757d 100644 --- a/src/ast/node.js +++ b/src/ast/node.js @@ -43,14 +43,14 @@ Node.prototype.destroy = function (node) { if (!node) { /* istanbul ignore next */ throw new Error( - "Node already initialized, you must swap with another node" + "Node already initialized, you must swap with another node", ); } if (this.leadingComments) { if (node.leadingComments) { node.leadingComments = Array.concat( this.leadingComments, - node.leadingComments + node.leadingComments, ); } else { node.leadingComments = this.leadingComments; @@ -60,7 +60,7 @@ Node.prototype.destroy = function (node) { if (node.trailingComments) { node.trailingComments = Array.concat( this.trailingComments, - node.trailingComments + node.trailingComments, ); } else { node.trailingComments = this.trailingComments; @@ -85,7 +85,7 @@ Node.prototype.includeToken = function (parser) { if (parser.ast.withSource) { this.loc.source = parser.lexer._input.substring( this.loc.start.offset, - parser.lexer.offset + parser.lexer.offset, ); } } diff --git a/src/ast/nowdoc.js b/src/ast/nowdoc.js index 01414df2b..726a3f954 100644 --- a/src/ast/nowdoc.js +++ b/src/ast/nowdoc.js @@ -22,5 +22,5 @@ module.exports = Literal.extends( function Nowdoc(value, raw, label, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); this.label = label; - } + }, ); diff --git a/src/ast/nullsafepropertylookup.js b/src/ast/nullsafepropertylookup.js index 42db04932..16003ec51 100644 --- a/src/ast/nullsafepropertylookup.js +++ b/src/ast/nullsafepropertylookup.js @@ -18,5 +18,5 @@ module.exports = Lookup.extends( KIND, function NullSafePropertyLookup(what, offset, docs, location) { Lookup.apply(this, [KIND, what, offset, docs, location]); - } + }, ); diff --git a/src/ast/number.js b/src/ast/number.js index 071ceda9d..0c1f9d4ee 100644 --- a/src/ast/number.js +++ b/src/ast/number.js @@ -19,5 +19,5 @@ module.exports = Literal.extends( KIND, function Number(value, raw, docs, location) { Literal.apply(this, [KIND, value, raw, docs, location]); - } + }, ); diff --git a/src/ast/offsetlookup.js b/src/ast/offsetlookup.js index 6b1d080f2..a9318855c 100644 --- a/src/ast/offsetlookup.js +++ b/src/ast/offsetlookup.js @@ -18,5 +18,5 @@ module.exports = Lookup.extends( KIND, function OffsetLookup(what, offset, docs, location) { Lookup.apply(this, [KIND, what, offset, docs, location]); - } + }, ); diff --git a/src/ast/parameter.js b/src/ast/parameter.js index 9149a9f35..7e417d528 100644 --- a/src/ast/parameter.js +++ b/src/ast/parameter.js @@ -46,7 +46,7 @@ module.exports = Declaration.extends( nullable, flags, docs, - location + location, ) { Declaration.apply(this, [KIND, name, docs, location]); this.value = value; @@ -57,5 +57,5 @@ module.exports = Declaration.extends( this.nullable = nullable; this.flags = flags || 0; this.attrGroups = []; - } + }, ); diff --git a/src/ast/parentreference.js b/src/ast/parentreference.js index 5b41d01da..0ba489aa0 100644 --- a/src/ast/parentreference.js +++ b/src/ast/parentreference.js @@ -19,6 +19,6 @@ const ParentReference = Reference.extends( function ParentReference(raw, docs, location) { Reference.apply(this, [KIND, docs, location]); this.raw = raw; - } + }, ); module.exports = ParentReference; diff --git a/src/ast/post.js b/src/ast/post.js index 4ea93506f..56b48b937 100644 --- a/src/ast/post.js +++ b/src/ast/post.js @@ -22,5 +22,5 @@ module.exports = Operation.extends( Operation.apply(this, [KIND, docs, location]); this.type = type; this.what = what; - } + }, ); diff --git a/src/ast/pre.js b/src/ast/pre.js index 974a91ec9..58b84a710 100644 --- a/src/ast/pre.js +++ b/src/ast/pre.js @@ -22,5 +22,5 @@ module.exports = Operation.extends( Operation.apply(this, [KIND, docs, location]); this.type = type; this.what = what; - } + }, ); diff --git a/src/ast/print.js b/src/ast/print.js index 1d9317afb..3455263c9 100644 --- a/src/ast/print.js +++ b/src/ast/print.js @@ -19,5 +19,5 @@ module.exports = Expression.extends( function Print(expression, docs, location) { Expression.apply(this, [KIND, docs, location]); this.expression = expression; - } + }, ); diff --git a/src/ast/program.js b/src/ast/program.js index 9080332f0..5ea3d764f 100644 --- a/src/ast/program.js +++ b/src/ast/program.js @@ -28,5 +28,5 @@ module.exports = Block.extends( if (tokens) { this.tokens = tokens; } - } + }, ); diff --git a/src/ast/property.js b/src/ast/property.js index 6f1c39130..ad01986ce 100644 --- a/src/ast/property.js +++ b/src/ast/property.js @@ -30,7 +30,7 @@ module.exports = Statement.extends( type, attrGroups, docs, - location + location, ) { Statement.apply(this, [KIND, docs, location]); this.name = name; @@ -39,5 +39,5 @@ module.exports = Statement.extends( this.nullable = nullable; this.type = type; this.attrGroups = attrGroups; - } + }, ); diff --git a/src/ast/propertylookup.js b/src/ast/propertylookup.js index 0df2d405e..ef2b14a80 100644 --- a/src/ast/propertylookup.js +++ b/src/ast/propertylookup.js @@ -18,5 +18,5 @@ module.exports = Lookup.extends( KIND, function PropertyLookup(what, offset, docs, location) { Lookup.apply(this, [KIND, what, offset, docs, location]); - } + }, ); diff --git a/src/ast/propertystatement.js b/src/ast/propertystatement.js index a76110783..271c8e6a8 100644 --- a/src/ast/propertystatement.js +++ b/src/ast/propertystatement.js @@ -28,7 +28,7 @@ const PropertyStatement = Statement.extends( Statement.apply(this, [KIND, docs, location]); this.properties = properties; this.parseFlags(flags); - } + }, ); /** diff --git a/src/ast/retif.js b/src/ast/retif.js index 2b4e85d49..70a044f60 100644 --- a/src/ast/retif.js +++ b/src/ast/retif.js @@ -24,5 +24,5 @@ module.exports = Expression.extends( this.test = test; this.trueExpr = trueExpr; this.falseExpr = falseExpr; - } + }, ); diff --git a/src/ast/selfreference.js b/src/ast/selfreference.js index 68f546fdc..0259e9752 100644 --- a/src/ast/selfreference.js +++ b/src/ast/selfreference.js @@ -19,6 +19,6 @@ const SelfReference = Reference.extends( function SelfReference(raw, docs, location) { Reference.apply(this, [KIND, docs, location]); this.raw = raw; - } + }, ); module.exports = SelfReference; diff --git a/src/ast/silent.js b/src/ast/silent.js index fb0fe4712..8bf60defc 100644 --- a/src/ast/silent.js +++ b/src/ast/silent.js @@ -20,5 +20,5 @@ module.exports = Expression.extends( function Silent(expr, docs, location) { Expression.apply(this, [KIND, docs, location]); this.expr = expr; - } + }, ); diff --git a/src/ast/static.js b/src/ast/static.js index f340e2724..33f00145a 100644 --- a/src/ast/static.js +++ b/src/ast/static.js @@ -20,5 +20,5 @@ module.exports = Statement.extends( function Static(variables, docs, location) { Statement.apply(this, [KIND, docs, location]); this.variables = variables; - } + }, ); diff --git a/src/ast/staticlookup.js b/src/ast/staticlookup.js index 83bac113f..5bbd2d594 100644 --- a/src/ast/staticlookup.js +++ b/src/ast/staticlookup.js @@ -18,5 +18,5 @@ module.exports = Lookup.extends( KIND, function StaticLookup(what, offset, docs, location) { Lookup.apply(this, [KIND, what, offset, docs, location]); - } + }, ); diff --git a/src/ast/staticreference.js b/src/ast/staticreference.js index e6962a58f..c3b0755f2 100644 --- a/src/ast/staticreference.js +++ b/src/ast/staticreference.js @@ -19,6 +19,6 @@ const StaticReference = Reference.extends( function StaticReference(raw, docs, location) { Reference.apply(this, [KIND, docs, location]); this.raw = raw; - } + }, ); module.exports = StaticReference; diff --git a/src/ast/staticvariable.js b/src/ast/staticvariable.js index 1a8c0caee..2388c4f24 100644 --- a/src/ast/staticvariable.js +++ b/src/ast/staticvariable.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.variable = variable; this.defaultValue = defaultValue; - } + }, ); diff --git a/src/ast/string.js b/src/ast/string.js index 9da5fb98a..c2c7423a1 100644 --- a/src/ast/string.js +++ b/src/ast/string.js @@ -24,5 +24,5 @@ module.exports = Literal.extends( Literal.apply(this, [KIND, value, raw, docs, location]); this.unicode = unicode; this.isDoubleQuote = isDoubleQuote; - } + }, ); diff --git a/src/ast/switch.js b/src/ast/switch.js index 2748b9d0d..6f48d2142 100644 --- a/src/ast/switch.js +++ b/src/ast/switch.js @@ -24,5 +24,5 @@ module.exports = Statement.extends( this.test = test; this.body = body; this.shortForm = shortForm; - } + }, ); diff --git a/src/ast/trait.js b/src/ast/trait.js index 8cf40cf66..62151e911 100644 --- a/src/ast/trait.js +++ b/src/ast/trait.js @@ -20,5 +20,5 @@ module.exports = Declaration.extends( function Trait(name, body, docs, location) { Declaration.apply(this, [KIND, name, docs, location]); this.body = body; - } + }, ); diff --git a/src/ast/traitalias.js b/src/ast/traitalias.js index b113de981..d6a9ecdf0 100644 --- a/src/ast/traitalias.js +++ b/src/ast/traitalias.js @@ -40,5 +40,5 @@ module.exports = Node.extends( this.visibility = IS_PRIVATE; } } - } + }, ); diff --git a/src/ast/traitprecedence.js b/src/ast/traitprecedence.js index b61c2b678..99ad43940 100644 --- a/src/ast/traitprecedence.js +++ b/src/ast/traitprecedence.js @@ -24,5 +24,5 @@ module.exports = Node.extends( this.trait = trait; this.method = method; this.instead = instead; - } + }, ); diff --git a/src/ast/traituse.js b/src/ast/traituse.js index ce9276900..fc163dc57 100644 --- a/src/ast/traituse.js +++ b/src/ast/traituse.js @@ -22,5 +22,5 @@ module.exports = Node.extends( Node.apply(this, [KIND, docs, location]); this.traits = traits; this.adaptations = adaptations; - } + }, ); diff --git a/src/ast/try.js b/src/ast/try.js index 8f4272756..9a97f0728 100644 --- a/src/ast/try.js +++ b/src/ast/try.js @@ -24,5 +24,5 @@ module.exports = Statement.extends( this.body = body; this.catches = catches; this.always = always; - } + }, ); diff --git a/src/ast/typereference.js b/src/ast/typereference.js index e55a7f7b2..944f74665 100644 --- a/src/ast/typereference.js +++ b/src/ast/typereference.js @@ -21,7 +21,7 @@ const TypeReference = Reference.extends( Reference.apply(this, [KIND, docs, location]); this.name = name; this.raw = raw; - } + }, ); TypeReference.types = [ diff --git a/src/ast/unary.js b/src/ast/unary.js index 94aee3073..7d086c0a0 100644 --- a/src/ast/unary.js +++ b/src/ast/unary.js @@ -22,5 +22,5 @@ module.exports = Operation.extends( Operation.apply(this, [KIND, docs, location]); this.type = type; this.what = what; - } + }, ); diff --git a/src/ast/uniontype.js b/src/ast/uniontype.js index 2dcab3273..e4d2bc318 100644 --- a/src/ast/uniontype.js +++ b/src/ast/uniontype.js @@ -20,5 +20,5 @@ module.exports = Declaration.extends( function UnionType(types, docs, location) { Declaration.apply(this, [KIND, null, docs, location]); this.types = types; - } + }, ); diff --git a/src/ast/unset.js b/src/ast/unset.js index b33ee595a..36f110cc8 100644 --- a/src/ast/unset.js +++ b/src/ast/unset.js @@ -19,5 +19,5 @@ module.exports = Statement.extends( function Unset(variables, docs, location) { Statement.apply(this, [KIND, docs, location]); this.variables = variables; - } + }, ); diff --git a/src/ast/usegroup.js b/src/ast/usegroup.js index f42d305ea..d00cfd74e 100644 --- a/src/ast/usegroup.js +++ b/src/ast/usegroup.js @@ -26,5 +26,5 @@ module.exports = Statement.extends( this.name = name; this.type = type; this.items = items; - } + }, ); diff --git a/src/ast/useitem.js b/src/ast/useitem.js index b35870018..17af88c4f 100644 --- a/src/ast/useitem.js +++ b/src/ast/useitem.js @@ -26,7 +26,7 @@ const UseItem = Statement.extends( this.name = name; this.alias = alias; this.type = type; - } + }, ); /** diff --git a/src/ast/variable.js b/src/ast/variable.js index 28838590a..cd6609036 100644 --- a/src/ast/variable.js +++ b/src/ast/variable.js @@ -32,5 +32,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.name = name; this.curly = curly || false; - } + }, ); diff --git a/src/ast/variadic.js b/src/ast/variadic.js index 3be60ace9..c9783ae3f 100644 --- a/src/ast/variadic.js +++ b/src/ast/variadic.js @@ -21,5 +21,5 @@ module.exports = Expression.extends( function variadic(what, docs, location) { Expression.apply(this, [KIND, docs, location]); this.what = what; - } + }, ); diff --git a/src/ast/variadicplaceholder.js b/src/ast/variadicplaceholder.js index e969f05bd..4e1fe657d 100644 --- a/src/ast/variadicplaceholder.js +++ b/src/ast/variadicplaceholder.js @@ -20,5 +20,5 @@ module.exports = Node.extends( KIND, function VariadicPlaceholder(docs, location) { Node.apply(this, [KIND, docs, location]); - } + }, ); diff --git a/src/ast/while.js b/src/ast/while.js index 5bc1e5f88..d92972717 100644 --- a/src/ast/while.js +++ b/src/ast/while.js @@ -24,5 +24,5 @@ module.exports = Statement.extends( this.test = test; this.body = body; this.shortForm = shortForm; - } + }, ); diff --git a/src/ast/yield.js b/src/ast/yield.js index b38fee38d..4cd92e54c 100644 --- a/src/ast/yield.js +++ b/src/ast/yield.js @@ -23,5 +23,5 @@ module.exports = Expression.extends( Expression.apply(this, [KIND, docs, location]); this.value = value; this.key = key; - } + }, ); diff --git a/src/ast/yieldfrom.js b/src/ast/yieldfrom.js index 3e604592d..11cf8df97 100644 --- a/src/ast/yieldfrom.js +++ b/src/ast/yieldfrom.js @@ -21,5 +21,5 @@ module.exports = Expression.extends( function YieldFrom(value, docs, location) { Expression.apply(this, [KIND, docs, location]); this.value = value; - } + }, ); diff --git a/src/lexer.js b/src/lexer.js index f19a2ccee..fbf1c561b 100644 --- a/src/lexer.js +++ b/src/lexer.js @@ -533,7 +533,7 @@ Lexer.prototype.next = function () { this.yylloc.last_column + '\t"' + this.yytext + - '"' + '"', ); // eslint-disable-next-line no-console console.error(e.stack); diff --git a/src/lexer/attribute.js b/src/lexer/attribute.js index 683cd8210..b3421baea 100644 --- a/src/lexer/attribute.js +++ b/src/lexer/attribute.js @@ -79,7 +79,7 @@ module.exports = { /* istanbul ignore next */ throw new Error( - `Bad terminal sequence "${ch}" at line ${this.yylineno} (offset ${this.offset})` + `Bad terminal sequence "${ch}" at line ${this.yylineno} (offset ${this.offset})`, ); }, }; diff --git a/src/lexer/scripting.js b/src/lexer/scripting.js index 61d868f31..0a6a1a1a3 100644 --- a/src/lexer/scripting.js +++ b/src/lexer/scripting.js @@ -96,7 +96,7 @@ module.exports = { this.yylineno + " (offset " + this.offset + - ")" + ")", ); }, diff --git a/src/lexer/strings.js b/src/lexer/strings.js index d51310f2a..689213e5f 100644 --- a/src/lexer/strings.js +++ b/src/lexer/strings.js @@ -130,7 +130,7 @@ module.exports = { if (this.yytext.length > 2) { this.appendToken( this.tok.T_ENCAPSED_AND_WHITESPACE, - this.yytext.length - prefix + this.yytext.length - prefix, ); } this.unput(this.yytext.length - prefix); @@ -182,7 +182,7 @@ module.exports = { if ( this._input.substring( offset - 1, - offset - 1 + this.heredoc_label.length + offset - 1 + this.heredoc_label.length, ) === this.heredoc_label.label ) { const ch = this._input[offset - 1 + this.heredoc_label.length]; @@ -201,7 +201,7 @@ module.exports = { this.yylineno + " (offset " + this.offset + - ")" + ")", ); } } else { diff --git a/src/parser.js b/src/parser.js index 785f86dfe..35d714c2a 100644 --- a/src/parser.js +++ b/src/parser.js @@ -123,7 +123,7 @@ const Parser = function (lexer, ast) { this.tok.T_VAR, this.tok.T_WHILE, this.tok.T_YIELD, - ].map(mapIt) + ].map(mapIt), ), VARIABLE: new Map( [ @@ -136,7 +136,7 @@ const Parser = function (lexer, ast) { this.tok.T_NAME_FULLY_QUALIFIED, this.tok.T_NAMESPACE, this.tok.T_STATIC, - ].map(mapIt) + ].map(mapIt), ), SCALAR: new Map( [ @@ -159,7 +159,7 @@ const Parser = function (lexer, ast) { 'B"', "-", this.tok.T_NS_SEPARATOR, - ].map(mapIt) + ].map(mapIt), ), T_MAGIC_CONST: new Map( [ @@ -171,7 +171,7 @@ const Parser = function (lexer, ast) { this.tok.T_FILE, this.tok.T_DIR, this.tok.T_NS_C, - ].map(mapIt) + ].map(mapIt), ), T_MEMBER_FLAGS: new Map( [ @@ -181,7 +181,7 @@ const Parser = function (lexer, ast) { this.tok.T_STATIC, this.tok.T_ABSTRACT, this.tok.T_FINAL, - ].map(mapIt) + ].map(mapIt), ), EOS: new Map([";", this.EOF, this.tok.T_INLINE_HTML].map(mapIt)), EXPR: new Map( @@ -248,7 +248,7 @@ const Parser = function (lexer, ast) { 'B"', "-", this.tok.T_NS_SEPARATOR, - ].map(mapIt) + ].map(mapIt), ), }; }; @@ -326,7 +326,7 @@ Parser.prototype.parse = function (code, filename) { "Node at line " + error.position.line + ", column " + - error.position.column + error.position.column, ); } // eslint-disable-next-line no-console @@ -349,7 +349,7 @@ Parser.prototype.raiseError = function (message, msgExpect, expect, token) { const err = new SyntaxError( message, this.filename, - this.lexer.yylloc.first_line + this.lexer.yylloc.first_line, ); err.lineNumber = this.lexer.yylloc.first_line; err.fileName = this.filename; @@ -361,7 +361,7 @@ Parser.prototype.raiseError = function (message, msgExpect, expect, token) { message, token, this.lexer.yylloc.first_line, - expect + expect, ); this._errors.push(node); return node; @@ -408,7 +408,7 @@ Parser.prototype.position = function () { return new Position( this.lexer.yylloc.first_line, this.lexer.yylloc.first_column, - this.lexer.yylloc.first_offset + this.lexer.yylloc.first_offset, ); }; @@ -474,7 +474,7 @@ Parser.prototype.node = function (name) { if (max > this._docIndex) { // inject trailing comment on child node this._lastNode.setTrailingComments( - this._docs.slice(this._docIndex, max) + this._docs.slice(this._docIndex, max), ); this._docIndex = max; } @@ -547,7 +547,7 @@ Parser.prototype.showlog = function () { this.lexer.yytext + "<" + " @-->" + - line + line, ); return this; }; @@ -662,7 +662,7 @@ Parser.prototype.lex = function () { if ( Object.prototype.hasOwnProperty.call( this.lexer.engine.tokens.values, - this.token + this.token, ) ) { entry = [ diff --git a/src/parser/array.js b/src/parser/array.js index 19b3b40cd..0d354b209 100644 --- a/src/parser/array.js +++ b/src/parser/array.js @@ -46,7 +46,7 @@ module.exports = { return self.read_array_pair(shortForm); }, ",", - true + true, ); }, /* diff --git a/src/parser/class.js b/src/parser/class.js index e21cf8da1..996f5acf3 100644 --- a/src/parser/class.js +++ b/src/parser/class.js @@ -211,14 +211,14 @@ module.exports = { readonly, nullable, type, - attrs || [] + attrs || [], ); } else { this.expect([",", ";", "="]); return result(propName, null, nullable, type, attrs || []); } }, - "," + ",", ); return result(null, properties, flags); @@ -267,7 +267,7 @@ module.exports = { } return result(constName, value); }, - "," + ",", ); return result(null, items, flags, nullable, type, attrs || []); @@ -367,7 +367,7 @@ module.exports = { let type = this.read_types(); if (nullable && !type) { this.raiseError( - "Expecting a type definition combined with nullable operator" + "Expecting a type definition combined with nullable operator", ); } if (!nullable && !type) { @@ -452,7 +452,7 @@ module.exports = { 2, flags, attrs, - locStart + locStart, ); method.parseFlags(flags); result.push(method); @@ -574,7 +574,7 @@ module.exports = { "traitprecedence", trait, method, - this.next().read_name_list() + this.next().read_name_list(), ); } else if (this.token === this.tok.T_AS) { // handle trait alias diff --git a/src/parser/comment.js b/src/parser/comment.js index e2e905dfe..fdddb2529 100644 --- a/src/parser/comment.js +++ b/src/parser/comment.js @@ -14,7 +14,7 @@ module.exports = { let result = this.ast.prepare( text.substring(0, 2) === "/*" ? "commentblock" : "commentline", null, - this + this, ); const offset = this.lexer.yylloc.first_offset; // handle location on comment diff --git a/src/parser/expr.js b/src/parser/expr.js index 1efe98a13..1e280d5b9 100644 --- a/src/parser/expr.js +++ b/src/parser/expr.js @@ -102,7 +102,7 @@ module.exports = { "bin", "instanceof", expr, - this.next().read_class_name_reference() + this.next().read_class_name_reference(), ); if ( this.token !== ";" && @@ -311,7 +311,7 @@ module.exports = { /* istanbul ignore next */ this.raiseError( "Fatal Error : Cannot use empty list on line " + - this.lexer.yylloc.first_line + this.lexer.yylloc.first_line, ); } @@ -322,7 +322,7 @@ module.exports = { return assign( result(assignList, false), this.next().read_expr(), - "=" + "=", ); } else { // error fallback : list($a, $b); @@ -371,7 +371,7 @@ module.exports = { case this.tok.T_STRING_CAST: return this.read_expr_cast( - this.text().indexOf("binary") !== -1 ? "binary" : "string" + this.text().indexOf("binary") !== -1 ? "binary" : "string", ); case this.tok.T_ARRAY_CAST: @@ -651,7 +651,7 @@ module.exports = { body, returnType, nullable, - flags ? true : false + flags ? true : false, ); result.attrGroups = attrs; return result; diff --git a/src/parser/function.js b/src/parser/function.js index 5497d9339..314eca2d4 100644 --- a/src/parser/function.js +++ b/src/parser/function.js @@ -37,7 +37,7 @@ module.exports = { closure ? 1 : flag ? 2 : 0, flag && flag[1] === 1, attrs || [], - locStart + locStart, ); if (flag && flag[2] == 1) { // abstract function : @@ -140,7 +140,7 @@ module.exports = { if (node.loc.source) { node.loc.source = this.lexer._input.substr( node.loc.start.offset, - node.loc.end.offset - node.loc.start.offset + node.loc.end.offset - node.loc.start.offset, ); } } @@ -150,11 +150,11 @@ module.exports = { if (type === 1) { // closure return apply_attrgroup_location( - result(params, isRef, use, returnType, nullable, isStatic) + result(params, isRef, use, returnType, nullable, isStatic), ); } return apply_attrgroup_location( - result(name, params, isRef, returnType, nullable) + result(name, params, isRef, returnType, nullable), ); }, @@ -227,7 +227,7 @@ module.exports = { // variadic parameters can only be defined at the end of the parameter list if (wasVariadic) { this.raiseError( - "Unexpected parameter after a variadic parameter" + "Unexpected parameter after a variadic parameter", ); } if (parameter.variadic) { @@ -236,7 +236,7 @@ module.exports = { } return parameter; }.bind(this), - "," + ",", ); } @@ -264,7 +264,7 @@ module.exports = { readonly = true; } else { this.raiseError( - "readonly properties can be used only on class constructor" + "readonly properties can be used only on class constructor", ); } } @@ -281,7 +281,7 @@ module.exports = { readonly = true; } else { this.raiseError( - "readonly properties can be used only on class constructor" + "readonly properties can be used only on class constructor", ); } } @@ -293,7 +293,7 @@ module.exports = { types = this.read_types(); if (nullable && !types) { this.raiseError( - "Expecting a type definition combined with nullable operator" + "Expecting a type definition combined with nullable operator", ); } const isRef = this.is_reference(); @@ -315,7 +315,7 @@ module.exports = { isVariadic, readonly, nullable, - flags + flags, ); if (attrs) result.attrGroups = attrs; return result; @@ -358,7 +358,7 @@ module.exports = { (mode === MODE_INTERSECTION && this.token !== "&") ) { this.raiseError( - 'Unexpect token "' + this.token + '", "|" and "&" can not be mixed' + 'Unexpect token "' + this.token + '", "|" and "&" can not be mixed', ); } } @@ -426,7 +426,7 @@ module.exports = { // variadic arguments can only be followed by other variadic arguments if (wasVariadic && !isVariadic) { this.raiseError( - "Unexpected non-variadic argument after a variadic argument" + "Unexpected non-variadic argument after a variadic argument", ); } if (isVariadic) { @@ -435,7 +435,7 @@ module.exports = { } return argument; }.bind(this), - "," + ",", ); }, /* @@ -458,7 +458,7 @@ module.exports = { } return this.node("namedargument")( this.text(), - this.next().next().read_expr() + this.next().next().read_expr(), ); } } diff --git a/src/parser/scalar.js b/src/parser/scalar.js index 788c21b66..f8ccea1f6 100644 --- a/src/parser/scalar.js +++ b/src/parser/scalar.js @@ -39,7 +39,7 @@ module.exports = { } else { return String.fromCodePoint(parseInt(p1, 8)); } - } + }, ); }, @@ -54,7 +54,7 @@ module.exports = { text, indentation, indentation_uses_spaces, - first_encaps_node + first_encaps_node, ) { if (indentation === 0) { return text; @@ -64,16 +64,16 @@ module.exports = { text, indentation, indentation_uses_spaces, - first_encaps_node + first_encaps_node, ); const matchedChar = indentation_uses_spaces ? " " : "\t"; const removementRegExp = new RegExp( `\\n${matchedChar}{${indentation}}`, - "g" + "g", ); const removementFirstEncapsNodeRegExp = new RegExp( - `^${matchedChar}{${indentation}}` + `^${matchedChar}{${indentation}}`, ); // Rough replace, need more check @@ -97,7 +97,7 @@ module.exports = { text, indentation, indentation_uses_spaces, - first_encaps_node + first_encaps_node, ) { const textSize = text.length; let offset = 0; @@ -135,7 +135,7 @@ module.exports = { leadingWhitespaceCharCount < indentation ) { this.raiseError( - `Invalid body indentation level (expecting an indentation at least ${indentation})` + `Invalid body indentation level (expecting an indentation at least ${indentation})`, ); } else { inCheckState = false; @@ -169,13 +169,13 @@ module.exports = { this.next(); const textValue = this.resolve_special_chars( text.substring(offset + 1, text.length - 1), - isDoubleQuote + isDoubleQuote, ); value = value( isDoubleQuote, textValue, offset === 1, // unicode flag - text + text, ); if (this.token === this.tok.T_DOUBLE_COLON) { // https://github.com/php/php-src/blob/master/Zend/zend_language_parser.y#L1151 @@ -231,7 +231,7 @@ module.exports = { if (this.lexer.heredoc_label.indentation > 0) { value = value.substring( 0, - value.length - this.lexer.heredoc_label.indentation + value.length - this.lexer.heredoc_label.indentation, ); } const lastCh = value[value.length - 1]; @@ -251,17 +251,17 @@ module.exports = { this.expect(this.tok.T_END_HEREDOC) && this.next(); const raw = this.lexer._input.substring( start, - this.lexer.yylloc.first_offset + this.lexer.yylloc.first_offset, ); node = node( this.remove_heredoc_leading_whitespace_chars( value, this.lexer.heredoc_label.indentation, this.lexer.heredoc_label.indentation_uses_spaces, - this.lexer.heredoc_label.first_encaps_node + this.lexer.heredoc_label.first_encaps_node, ), raw, - this.lexer.heredoc_label.label + this.lexer.heredoc_label.label, ); this.lexer.heredoc_label.finished = true; return node; @@ -346,11 +346,11 @@ module.exports = { this.resolve_special_chars(text, isDoubleQuote), this.lexer.heredoc_label.indentation, this.lexer.heredoc_label.indentation_uses_spaces, - this.lexer.heredoc_label.first_encaps_node + this.lexer.heredoc_label.first_encaps_node, ) : text, false, - text + text, ); } else if (this.token === this.tok.T_DOLLAR_OPEN_CURLY_BRACES) { syntax = "simple"; @@ -470,7 +470,7 @@ module.exports = { this.expect(expect) && this.next(); const raw = this.lexer._input.substring( type === "heredoc" ? labelStart : start - 1, - this.lexer.yylloc.first_offset + this.lexer.yylloc.first_offset, ); node = node(value, raw, type); diff --git a/src/parser/statement.js b/src/parser/statement.js index ebcf7d1bd..09b8f7ddf 100644 --- a/src/parser/statement.js +++ b/src/parser/statement.js @@ -121,7 +121,7 @@ module.exports = { } }, ",", - false + false, ); }, /* @@ -180,7 +180,7 @@ module.exports = { return this.read_enum_declaration_statement(); case this.tok.T_HALT_COMPILER: { this.raiseError( - "__HALT_COMPILER() can only be used from the outermost scope" + "__HALT_COMPILER() can only be used from the outermost scope", ); // fallback : returns a node but does not stop the parsing let node = this.node("halt"); @@ -238,7 +238,7 @@ module.exports = { case this.tok.T_BREAK: case this.tok.T_CONTINUE: { const result = this.node( - this.token === this.tok.T_CONTINUE ? "continue" : "break" + this.token === this.tok.T_CONTINUE ? "continue" : "break", ); this.next(); const level = this.read_optional_expr(";"); diff --git a/src/parser/variable.js b/src/parser/variable.js index 2a2f2b9ec..4fd36d6d5 100644 --- a/src/parser/variable.js +++ b/src/parser/variable.js @@ -27,7 +27,7 @@ module.exports = { // check the byref flag if (this.token === "&") { return this.read_byref( - this.read_variable.bind(this, read_only, encapsed) + this.read_variable.bind(this, read_only, encapsed), ); } diff --git a/src/tokens.js b/src/tokens.js index 9fbd2812b..fbb5e220c 100644 --- a/src/tokens.js +++ b/src/tokens.js @@ -169,7 +169,7 @@ const TokenNames = { const tokens = { values: Object.entries(TokenNames).reduce( (result, [key, value]) => ({ ...result, [value]: key }), - {} + {}, ), names: TokenNames, }; diff --git a/test/debug.js b/test/debug.js index 9662d1c42..27d30f754 100644 --- a/test/debug.js +++ b/test/debug.js @@ -34,6 +34,6 @@ function foo() { withPositions: true, withSource: true, }, - } + }, ); console.log(util.inspect(ast, false, 10, true)); diff --git a/test/precedence.test.js b/test/precedence.test.js index 6b11adaae..50e60606e 100644 --- a/test/precedence.test.js +++ b/test/precedence.test.js @@ -16,7 +16,7 @@ function filterKey(fn, obj) { ...result, [key]: filterKey(fn, obj[key]), }), - {} + {}, ); } @@ -26,7 +26,7 @@ function filterKey(fn, obj) { function shouldBeSame(a, b) { const fn = (key) => key !== "parenthesizedExpression"; expect(filterKey(fn, parser.parseEval(a))).toEqual( - filterKey(fn, parser.parseEval(b)) + filterKey(fn, parser.parseEval(b)), ); } @@ -36,13 +36,13 @@ describe("Test infrastructure", function () { it("should filter parenthesizedExpression prop", function () { const fn = (key) => key !== "parenthesizedExpression"; expect( - filterKey(fn, { foo: "bar", parenthesizedExpression: true }) + filterKey(fn, { foo: "bar", parenthesizedExpression: true }), ).toEqual({ foo: "bar" }); expect( - filterKey(fn, { x: { foo: "bar", parenthesizedExpression: true } }) + filterKey(fn, { x: { foo: "bar", parenthesizedExpression: true } }), ).toEqual({ x: { foo: "bar" } }); expect( - filterKey(fn, [{ foo: "bar", parenthesizedExpression: true }]) + filterKey(fn, [{ foo: "bar", parenthesizedExpression: true }]), ).toEqual([{ foo: "bar" }]); }); }); @@ -130,7 +130,7 @@ describe("Test precedence", function () { it("test retif", function () { shouldBeSame( "$a ? 1 : $b ? 2 : $c ? 3 : 4", - "(($a ? 1 : $b) ? 2 : $c) ? 3 : 4" + "(($a ? 1 : $b) ? 2 : $c) ? 3 : 4", ); }); it("test + / *", function () { @@ -161,13 +161,13 @@ describe("Test precedence", function () { it("test silent node / ret if", function () { shouldBeSame( "@$i == true ? @$foo : @$bar;", - "@($i) == true ? @($foo) : @($bar);" + "@($i) == true ? @($foo) : @($bar);", ); }); it("test silent node - bugfix #355", function () { shouldBeSame( "echo 'pre' . (@$_GET['foo'] === 'bar' ? 'ok' : 'ko') . 'post'", - "echo 'pre' . (@($_GET['foo']) === 'bar' ? 'ok' : 'ko') . 'post'" + "echo 'pre' . (@($_GET['foo']) === 'bar' ? 'ok' : 'ko') . 'post'", ); }); it("test silent node - bugfix #356", function () { diff --git a/test/snapshot/acid.test.js b/test/snapshot/acid.test.js index 480ccb875..f3bde007b 100644 --- a/test/snapshot/acid.test.js +++ b/test/snapshot/acid.test.js @@ -170,8 +170,8 @@ THE END ... parser: { extractDoc: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/array.test.js b/test/snapshot/array.test.js index 232e1eb5b..a8d498df7 100644 --- a/test/snapshot/array.test.js +++ b/test/snapshot/array.test.js @@ -4,14 +4,14 @@ describe("Array without keys", () => { it("deference array", () => { expect( parser.parseEval( - ["$a = [", '"a", "b"', "]($foo)[$foo->bar()[1]]->foo()"].join("\r") - ) + ["$a = [", '"a", "b"', "]($foo)[$foo->bar()[1]]->foo()"].join("\r"), + ), ).toMatchSnapshot(); }); it("of strings", () => { expect( - parser.parseEval('array("item1", "item2", "item3")') + parser.parseEval('array("item1", "item2", "item3")'), ).toMatchSnapshot(); }); @@ -29,7 +29,7 @@ describe("Array without keys", () => { it("of objects", () => { expect( - parser.parseEval("[new foo(), new stdClass(), new bar()]") + parser.parseEval("[new foo(), new stdClass(), new bar()]"), ).toMatchSnapshot(); }); @@ -40,7 +40,7 @@ describe("Array without keys", () => { array("item1", "item2"), array("item3", "item4"), array("item5", "item6") - )`) + )`), ).toMatchSnapshot(); }); @@ -50,7 +50,7 @@ describe("Array without keys", () => { }); it("test short form / keys", function () { expect( - parser.parseEval('[0 => &$foo, $bar => "foobar"];') + parser.parseEval('[0 => &$foo, $bar => "foobar"];'), ).toMatchSnapshot(); }); }); @@ -106,8 +106,8 @@ describe("Array without keys", () => { it("non empty array", () => { expect( parser.parseEval( - "$var = [true, 1, 1.1, 'test', \"test\", [1, 2, 3], new Foo(), call(), null];" - ) + "$var = [true, 1, 1.1, 'test', \"test\", [1, 2, 3], new Foo(), call(), null];", + ), ).toMatchSnapshot(); }); @@ -121,7 +121,7 @@ $var = array(...$arr1, ...$arr2, 111); $var = [...$arr1, ...$arr1]; $var = [...getArr(), 'c']; $var = [...new ArrayIterator(['a', 'b', 'c'])]; -`) +`), ).toMatchSnapshot(); }); @@ -138,7 +138,7 @@ $var = [...new ArrayIterator(['a', 'b', 'c'])]; expect( parser.parseEval(` $var = [1, 'test', &$var, 'test' => &$var]; -`) +`), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/arrowfunc.test.js b/test/snapshot/arrowfunc.test.js index d6924a3be..1031e0cda 100644 --- a/test/snapshot/arrowfunc.test.js +++ b/test/snapshot/arrowfunc.test.js @@ -18,7 +18,7 @@ describe("arrow function", () => { parser: { version: "7.3", // disable the php 7.4 support }, - }) + }), ).toMatchSnapshot(); }); it("error / fn fails on php7.4", () => { @@ -28,7 +28,7 @@ describe("arrow function", () => { version: "7.4", // enable the php 7.4 support suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); it("error / empty not allowed", () => { @@ -37,7 +37,7 @@ describe("arrow function", () => { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); it("error / arrow functions before PHP 7.4", () => { @@ -47,7 +47,7 @@ describe("arrow function", () => { version: "7.3", suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/ast.test.js b/test/snapshot/ast.test.js index 7af333a02..812d6c3cc 100644 --- a/test/snapshot/ast.test.js +++ b/test/snapshot/ast.test.js @@ -29,8 +29,8 @@ describe("Test AST structure", function () { withPositions: true, withSource: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -48,7 +48,7 @@ describe("Test AST structure", function () { }); it("test inline", function () { expect( - parser.parseCode("Hello \n !") + parser.parseCode("Hello \n !"), ).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe("Test AST structure", function () { expect( parser.parseCode("\r\n !", { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); @@ -81,7 +81,7 @@ describe("Test AST structure", function () { isset($foo, $bar); unset($var); empty($var); - `) + `), ).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ describe("Test AST structure", function () { parser.parseEval(` die("bye"); exit(-1); - `) + `), ).toMatchSnapshot(); }); @@ -112,7 +112,7 @@ describe("Test AST structure", function () { include_once (PATH . "/file.php"); require "req.php"; require_once "file.php"; - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/attributes.test.js b/test/snapshot/attributes.test.js index 4534b8839..843001e80 100644 --- a/test/snapshot/attributes.test.js +++ b/test/snapshot/attributes.test.js @@ -7,7 +7,7 @@ describe("Parse Attributes", () => { #[Deprecated] #[replace("use NewClass")] class DepClass {} - `) + `), ).toMatchSnapshot(); }); it("can parse method attributes", () => { @@ -17,7 +17,7 @@ describe("Parse Attributes", () => { #[Pure] function m() {} } - `) + `), ).toMatchSnapshot(); }); it("can parse param attributes", () => { @@ -26,7 +26,7 @@ describe("Parse Attributes", () => { function f( #[Unsigned] int $n) {} - `) + `), ).toMatchSnapshot(); }); it("can parse params with comments", () => { @@ -45,8 +45,8 @@ describe("Parse Attributes", () => { parser: { extractDoc: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); it("can parse parms with array values", () => { @@ -54,7 +54,7 @@ describe("Parse Attributes", () => { parser.parseEval(` #[List(["a"=>1, 'b' => Test::class, 'c'=>[]])] function a() {} - `) + `), ).toMatchSnapshot(); }); it("can parse params with argument labels", () => { @@ -62,7 +62,7 @@ describe("Parse Attributes", () => { parser.parseEval(` #[MyAttribute(value: 1234)] function a() {} - `) + `), ).toMatchSnapshot(); }); it("can parse params with mathematical expressions", () => { @@ -72,8 +72,8 @@ describe("Parse Attributes", () => { #[Att1(-20 * (+10 / 5) % 2 + 8 ** 2 - +-2)] class A {} `, - { parser: { extractDoc: true } } - ) + { parser: { extractDoc: true } }, + ), ).toMatchSnapshot(); }); it("can parse params with bitwise operations", () => { @@ -88,8 +88,8 @@ describe("Parse Attributes", () => { #[Att6(Att6::BAR << 1)] class A {} `, - { parser: { extractDoc: true } } - ) + { parser: { extractDoc: true } }, + ), ).toMatchSnapshot(); }); it("can parse params with logical operations", () => { @@ -104,8 +104,8 @@ describe("Parse Attributes", () => { #[Att6(!Att6::FOO)] class A {} `, - { parser: { extractDoc: true } } - ) + { parser: { extractDoc: true } }, + ), ).toMatchSnapshot(); }); it("can parse params with string concatenation", () => { @@ -138,8 +138,8 @@ describe("Parse Attributes", () => { )] class A {} `, - { parser: { extractDoc: true } } - ) + { parser: { extractDoc: true } }, + ), ).toMatchSnapshot(); }); it("can parse params with end characters", () => { @@ -147,7 +147,7 @@ describe("Parse Attributes", () => { parser.parseEval(` #[End(["])}>"])] class End {} - `) + `), ).toMatchSnapshot(); }); it("can parse multi-line attributes", () => { @@ -160,7 +160,7 @@ describe("Parse Attributes", () => { ] #[Four] class Multi {} - `) + `), ).toMatchSnapshot(); }); it("can parse anonymous function attributes", () => { @@ -168,7 +168,7 @@ describe("Parse Attributes", () => { parser.parseEval(` $a = #[Pure] fn() => true; $b = #[A] function() {}; - `) + `), ).toMatchSnapshot(); }); it("can't parse anonymous function attributes in PHP < 8", () => { @@ -181,8 +181,8 @@ describe("Parse Attributes", () => { parser: { version: "7.4", }, - } - ) + }, + ), ).toThrow(SyntaxError); }); it("can parse class property attributes", () => { @@ -196,7 +196,7 @@ describe("Parse Attributes", () => { #[D] protected $d; } - `) + `), ).toMatchSnapshot(); }); it("can parse class const attributes", () => { @@ -206,7 +206,7 @@ describe("Parse Attributes", () => { #[B] const B = 1; } - `) + `), ).toMatchSnapshot(); }); it("can parse anon-class attributes", () => { @@ -218,7 +218,7 @@ describe("Parse Attributes", () => { parser: { version: "7.4", }, - }) + }), ).toThrow(SyntaxError); }); it("can parse interface attributes", () => { @@ -231,7 +231,7 @@ describe("Parse Attributes", () => { #[E] public function f(); } - `) + `), ).toMatchSnapshot(); }); it("can parse attributes in inner statements", () => { @@ -241,7 +241,7 @@ describe("Parse Attributes", () => { function b() { return #[C] fn() => #[Pure] function() {}; } - }`) + }`), ).toMatchSnapshot(); }); it("can parse attributes with namespace", () => { @@ -249,7 +249,7 @@ describe("Parse Attributes", () => { parser.parseEval(` #[\\JetBrains\\PhpStorm\\Pure] function b() {} - `) + `), ).toMatchSnapshot(); }); @@ -262,7 +262,7 @@ describe("Parse Attributes", () => { function c(){} function d(){} } - `) + `), ).toMatchSnapshot(); }); @@ -281,8 +281,8 @@ describe("Parse Attributes", () => { version: "7.4", extractDoc: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -299,8 +299,8 @@ describe("Parse Attributes", () => { Assert\\Length(max: 255, groups: ['foo']), ] public ?string $value = null; - }` - ) + }`, + ), ).toMatchSnapshot(); }); @@ -311,8 +311,8 @@ describe("Parse Attributes", () => { #[Att1] $a = 1; `, - { parser: { extractDoc: true } } - ) + { parser: { extractDoc: true } }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/bin.test.js b/test/snapshot/bin.test.js index 164cb91f9..b8c7e1df4 100644 --- a/test/snapshot/bin.test.js +++ b/test/snapshot/bin.test.js @@ -96,7 +96,7 @@ describe("bin", () => { }); it("multiple instanceof static", () => { expect( - parser.parseEval("$foo instanceof static && $bar instanceof self;") + parser.parseEval("$foo instanceof static && $bar instanceof self;"), ).toMatchSnapshot(); }); diff --git a/test/snapshot/block.test.js b/test/snapshot/block.test.js index 71d0503cd..43dbe72ef 100644 --- a/test/snapshot/block.test.js +++ b/test/snapshot/block.test.js @@ -39,7 +39,7 @@ describe("block", () => { parser: { extractDoc: true, }, - }) + }), ).toMatchSnapshot(); }); it("check empty php blocks", function () { @@ -58,8 +58,8 @@ SOME HTML OUTPUT parser: { extractDoc: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -76,8 +76,8 @@ SOME HTML OUTPUT parser: { extractDoc: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/break.test.js b/test/snapshot/break.test.js index 3c75c5ad5..d4db2ec99 100644 --- a/test/snapshot/break.test.js +++ b/test/snapshot/break.test.js @@ -24,7 +24,7 @@ describe("break", () => { expect( parser.parseEval("break", { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/byref.test.js b/test/snapshot/byref.test.js index a95f03af5..6a062130a 100644 --- a/test/snapshot/byref.test.js +++ b/test/snapshot/byref.test.js @@ -16,12 +16,12 @@ describe("byref", () => { parser: { version: "5.6", }, - }) + }), ).toMatchSnapshot(); expect(() => { parser.parseEval("$a =& new foo();"); }).toThrow( - "Parse Error : syntax error, unexpected 'new' (T_NEW) on line 1" + "Parse Error : syntax error, unexpected 'new' (T_NEW) on line 1", ); }); it("call result", () => { @@ -41,12 +41,12 @@ describe("byref", () => { }); it("foreach (key/value)", () => { expect( - parser.parseEval("foreach ($arr as $key => &$val) { }") + parser.parseEval("foreach ($arr as $key => &$val) { }"), ).toMatchSnapshot(); }); it("closure", () => { expect( - parser.parseEval("$var = function () use (&$message) { };") + parser.parseEval("$var = function () use (&$message) { };"), ).toMatchSnapshot(); }); // https://github.com/php/php-src/blob/php-7.4.0beta4/Zend/zend_language_parser.y#L1165 @@ -95,12 +95,12 @@ describe("byref", () => { }); it("staticlookup #7", () => { expect( - parser.parseEval("$var = &parent::getElementByPath();") + parser.parseEval("$var = &parent::getElementByPath();"), ).toMatchSnapshot(); }); it("staticlookup #8", () => { expect( - parser.parseEval(" $var = &self::getElementByPath();") + parser.parseEval(" $var = &self::getElementByPath();"), ).toMatchSnapshot(); }); // https://github.com/php/php-src/blob/php-7.4.0beta4/Zend/zend_language_parser.y#L1169 diff --git a/test/snapshot/call.test.js b/test/snapshot/call.test.js index 9bb30292e..0ab555383 100644 --- a/test/snapshot/call.test.js +++ b/test/snapshot/call.test.js @@ -84,7 +84,7 @@ describe("Test call", function () { "class Foo { function foo() { parent::call(); } }", { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -93,7 +93,7 @@ describe("Test call", function () { "class Foo { function foo() { self::call(); } }", { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -102,7 +102,7 @@ describe("Test call", function () { "class Foo { function foo() { static::call(); } }", { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -177,7 +177,7 @@ describe("Test call", function () { "get_class($obj)::$property::$property::$property;", { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -198,7 +198,7 @@ describe("Test call", function () { "get_class($var)::${$property}::${$property}::${$property};", { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -260,7 +260,7 @@ describe("Test call", function () { version: "7.2", debug: false, }, - }) + }), ).toThrow("PHP 8+ is required to use named arguments"); }); it("doesnt confused static methods with named arguments", function () { @@ -299,7 +299,7 @@ describe("Test call", function () { extractDoc: true, debug: false, }, - } + }, ); expect(astErr).toMatchSnapshot(); }); @@ -309,7 +309,7 @@ describe("Test call", function () { foo(...$bar); foo($bar, ...$baz); foo(...$bar, ...$baz); - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/class.test.js b/test/snapshot/class.test.js index a4c66f769..b93d642cb 100644 --- a/test/snapshot/class.test.js +++ b/test/snapshot/class.test.js @@ -13,7 +13,7 @@ describe("Test classes", function () { $this->fooBaz(); } } - `) + `), ).toMatchSnapshot(); }); @@ -24,7 +24,7 @@ describe("Test classes", function () { public ?int $prop = null; protected static float|string $y; } - `) + `), ).toMatchSnapshot(); }); @@ -40,8 +40,8 @@ describe("Test classes", function () { parser: { version: "8.1", }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -77,7 +77,7 @@ describe("Test classes", function () { * Some informations */ abstract protected function &foo() : bar; - }`) + }`), ).toMatchSnapshot(); }); @@ -112,8 +112,8 @@ describe("Test classes", function () { `, { parser: { extractDoc: true }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -127,8 +127,8 @@ describe("Test classes", function () { }`, { parser: { suppressErrors: true }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -142,7 +142,7 @@ describe("Test classes", function () { $this->constructor = null; self::$constructor = null; } - }`) + }`), ).toMatchSnapshot(); }); @@ -157,7 +157,7 @@ describe("Test classes", function () { version: "8.0", suppressErrors: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -176,7 +176,7 @@ describe("Test classes", function () { parser: { version: "8.1", }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -192,7 +192,7 @@ describe("Test classes", function () { version: "8.1", suppressErrors: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -208,7 +208,7 @@ describe("Test classes", function () { version: "8.0", suppressErrors: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -226,7 +226,7 @@ describe("Test classes", function () { parser.parseEval(` ${token} class Foo { } - `) + `), ).toMatchSnapshot(); }); }); @@ -244,7 +244,7 @@ describe("Test classes", function () { expect( parser.parseEval(`final abstract class foo {}`, { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); @@ -252,7 +252,7 @@ describe("Test classes", function () { expect( parser.parseEval(`abstract final class foo {}`, { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); @@ -272,10 +272,10 @@ class b { const funcStart = ast.children[0].body[0].loc.start.offset; const funcEnd = ast.children[0].body[0].loc.end.offset; expect(phpCode.substr(funcStart, funcEnd - funcStart)).toEqual( - "public static function a() {}" + "public static function a() {}", ); expect(ast.children[0].body[0].loc.source).toEqual( - "public static function a()" + "public static function a()", ); }); @@ -285,7 +285,7 @@ class b { class Foo { public \\Bar $baz; } - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/classconstant.test.js b/test/snapshot/classconstant.test.js index 6448a77b3..8e5557ede 100644 --- a/test/snapshot/classconstant.test.js +++ b/test/snapshot/classconstant.test.js @@ -3,54 +3,56 @@ const parser = require("../main"); describe("classconstant", () => { it("simple", () => { expect( - parser.parseEval('class Foo { const CONSTANT = "Hello world!"; }') + parser.parseEval('class Foo { const CONSTANT = "Hello world!"; }'), ).toMatchSnapshot(); }); it("multiple", () => { expect( parser.parseEval( - 'class Foo { const CONSTANT = "Hello world!", OTHER_CONSTANT = "Other hello world!"; }' - ) + 'class Foo { const CONSTANT = "Hello world!", OTHER_CONSTANT = "Other hello world!"; }', + ), ).toMatchSnapshot(); }); it("public", () => { expect( - parser.parseEval('class Foo { public const CONSTANT = "Hello world!"; }') + parser.parseEval('class Foo { public const CONSTANT = "Hello world!"; }'), ).toMatchSnapshot(); }); it("protected", () => { expect( parser.parseEval( - 'class Foo { protected const CONSTANT = "Hello world!"; }' - ) + 'class Foo { protected const CONSTANT = "Hello world!"; }', + ), ).toMatchSnapshot(); }); it("private", () => { expect( - parser.parseEval('class Foo { private const CONSTANT = "Hello world!"; }') + parser.parseEval( + 'class Foo { private const CONSTANT = "Hello world!"; }', + ), ).toMatchSnapshot(); }); it("final", () => { expect( parser.parseEval( - 'class Foo { final public const CONSTANT = "Hello world!"; }' - ) + 'class Foo { final public const CONSTANT = "Hello world!"; }', + ), ).toMatchSnapshot(); }); it("type hinted (supported)", () => { expect( parser.parseEval( 'class Foo { public const string CONSTANT = "Hello world!"; }', - { parser: { version: 830 } } - ) + { parser: { version: 830 } }, + ), ).toMatchSnapshot(); }); it("type hinted (unsupported)", () => { expect(() => parser.parseEval( 'class Foo { public const string CONSTANT = "Hello world!"; }', - { parser: { version: 820 } } - ) + { parser: { version: 820 } }, + ), ).toThrowErrorMatchingSnapshot(); }); }); diff --git a/test/snapshot/classreference.test.js b/test/snapshot/classreference.test.js index 44d3f4756..c4687e687 100644 --- a/test/snapshot/classreference.test.js +++ b/test/snapshot/classreference.test.js @@ -15,7 +15,7 @@ describe("classreference", function () { }); it("argument type (2)", function () { expect( - parser.parseEval("function foo(Foo\\Foo $arg) {}") + parser.parseEval("function foo(Foo\\Foo $arg) {}"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/closure.test.js b/test/snapshot/closure.test.js index 9c8500a62..5dfa6395f 100644 --- a/test/snapshot/closure.test.js +++ b/test/snapshot/closure.test.js @@ -3,7 +3,7 @@ const parser = require("../main"); describe("closure", () => { it("simple", () => { expect( - parser.parseEval('$var = function() { echo "something"; };') + parser.parseEval('$var = function() { echo "something"; };'), ).toMatchSnapshot(); }); it("empty", () => { @@ -11,59 +11,59 @@ describe("closure", () => { }); it("argument", () => { expect( - parser.parseEval('$var = function($arg) { echo "something"; };') + parser.parseEval('$var = function($arg) { echo "something"; };'), ).toMatchSnapshot(); }); it("argument by ref", () => { expect( - parser.parseEval('$var = function(&$arg) { echo "something"; };') + parser.parseEval('$var = function(&$arg) { echo "something"; };'), ).toMatchSnapshot(); }); it("arguments", () => { expect( parser.parseEval( - '$var = function($arg, $arg, $arg) { echo "something"; };' - ) + '$var = function($arg, $arg, $arg) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("use", () => { expect( parser.parseEval( - '$var = function() use ($message) { echo "something"; };' - ) + '$var = function() use ($message) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("use multiple", () => { expect( parser.parseEval( - '$var = function() use ($message, $message1, $message2) { echo "something"; };' - ) + '$var = function() use ($message, $message1, $message2) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("use by ref", () => { expect( parser.parseEval( - '$var = function() use (&$message) { echo "something"; };' - ) + '$var = function() use (&$message) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("argument and use", () => { expect( parser.parseEval( - '$var = function($arg) use ($use) { echo "something"; };' - ) + '$var = function($arg) use ($use) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("arguments and uses", () => { expect( parser.parseEval( - '$var = function($arg, $arg, $arg) use ($use, $use, $use) { echo "something"; };' - ) + '$var = function($arg, $arg, $arg) use ($use, $use, $use) { echo "something"; };', + ), ).toMatchSnapshot(); }); it("inside call", () => { expect( - parser.parseEval(`call(function ($arg) { return $arg; });`) + parser.parseEval(`call(function ($arg) { return $arg; });`), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/comment.test.js b/test/snapshot/comment.test.js index 4f764d145..a20ddf4d6 100644 --- a/test/snapshot/comment.test.js +++ b/test/snapshot/comment.test.js @@ -21,8 +21,8 @@ bar() /* inner */ ; withPositions: true, withSource: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -42,8 +42,8 @@ call(array // comment withPositions: true, withSource: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -64,7 +64,7 @@ call(array // comment parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -82,7 +82,7 @@ call(array // comment extractDoc: true, // debug: true }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -101,7 +101,7 @@ call(array // comment extractDoc: true, // debug: true }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -120,7 +120,7 @@ call(array // comment extractDoc: true, // debug: true }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -164,7 +164,7 @@ class FooClass extractDoc: true, // debug: true }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -183,7 +183,7 @@ class FooClass extractDoc: true, // debug: true }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -201,7 +201,7 @@ class FooClass parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -222,7 +222,7 @@ class FooClass parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -244,7 +244,7 @@ class FooClass parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -263,7 +263,7 @@ class FooClass parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -292,7 +292,7 @@ class FooClass parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); diff --git a/test/snapshot/constantstatement.test.js b/test/snapshot/constantstatement.test.js index 71dc3a6cc..f7d9718ec 100644 --- a/test/snapshot/constantstatement.test.js +++ b/test/snapshot/constantstatement.test.js @@ -3,14 +3,14 @@ const parser = require("../main"); describe("constantstatement", () => { it("simple", () => { expect( - parser.parseEval('const CONSTANT = "Hello world!";') + parser.parseEval('const CONSTANT = "Hello world!";'), ).toMatchSnapshot(); }); it("multiple", () => { expect( parser.parseEval( - 'const CONSTANT = "Hello world!", OTHER_CONSTANT = "Other hello world!";' - ) + 'const CONSTANT = "Hello world!", OTHER_CONSTANT = "Other hello world!";', + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/continue.test.js b/test/snapshot/continue.test.js index 82626d802..39ea5e648 100644 --- a/test/snapshot/continue.test.js +++ b/test/snapshot/continue.test.js @@ -24,7 +24,7 @@ describe("continue", () => { expect( parser.parseEval("continue", { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/declare.test.js b/test/snapshot/declare.test.js index 24778f096..5c4808532 100644 --- a/test/snapshot/declare.test.js +++ b/test/snapshot/declare.test.js @@ -9,7 +9,7 @@ describe("declare", function () { }); it("encoding", function () { expect( - parser.parseEval("declare(encoding='ISO-8859-1');") + parser.parseEval("declare(encoding='ISO-8859-1');"), ).toMatchSnapshot(); }); it("nested", function () { @@ -17,7 +17,7 @@ describe("declare", function () { }); it("mode short", function () { expect( - parser.parseEval('declare(ticks=1): echo "something"; enddeclare;') + parser.parseEval('declare(ticks=1): echo "something"; enddeclare;'), ).toMatchSnapshot(); }); it("multiple", function () { diff --git a/test/snapshot/enum.test.js b/test/snapshot/enum.test.js index 0b7807e8c..8b3c1a8e8 100644 --- a/test/snapshot/enum.test.js +++ b/test/snapshot/enum.test.js @@ -14,7 +14,7 @@ describe("Test enums", function () { case Clubs; case Spades; } - `) + `), ).toMatchSnapshot(); }); @@ -27,7 +27,7 @@ describe("Test enums", function () { case Clubs = 'C'; case Spades = 'S'; } - `) + `), ).toMatchSnapshot(); }); @@ -38,7 +38,7 @@ describe("Test enums", function () { case Bar; public const Baz = self::Bar; } - `) + `), ).toMatchSnapshot(); }); @@ -46,7 +46,7 @@ describe("Test enums", function () { expect( parser.parseEval(` enum Foo implements Bar, Baz {} - `) + `), ).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe("Test enums", function () { } use Bax; } - `) + `), ).toMatchSnapshot(); }); @@ -76,7 +76,7 @@ describe("Test enums", function () { echo self::MyCase->value; } } - `) + `), ).toMatchSnapshot(); }); @@ -102,7 +102,7 @@ describe("Test enums", function () { class Enum implements Foo {} class Enum exTends Foo {} enum extendsFoo {} - `) + `), ).toMatchSnapshot(); }); diff --git a/test/snapshot/expr.test.js b/test/snapshot/expr.test.js index ba5cf8e6b..89dcb2b41 100644 --- a/test/snapshot/expr.test.js +++ b/test/snapshot/expr.test.js @@ -16,7 +16,7 @@ describe("Test expressions", function () { 1 ** 3; 1 << 3; 1 >> 3; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -39,7 +39,7 @@ describe("Test expressions", function () { $a <= $b; $a <=> $b; $a instanceof $b; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -60,7 +60,7 @@ describe("Test expressions", function () { $a ^= $b; $a <<= $b; $a >>= $b; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -71,7 +71,7 @@ describe("Test expressions", function () { $a ?? false; $a > 5 ? true : false; $a ?: false; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -89,7 +89,7 @@ describe("Test expressions", function () { yield from foo(); // keys 0-2 yield 1 => $a; // key 1 } - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -101,7 +101,7 @@ describe("Test expressions", function () { ~$var; !$var; -$var; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -121,7 +121,7 @@ describe("Test expressions", function () { (array)$var; (object)$var; (unset)$var; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -152,7 +152,7 @@ describe("Test expressions", function () { return expr; }, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -163,7 +163,7 @@ describe("Test expressions", function () { exit(1); die(); exit; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -180,7 +180,7 @@ describe("Test expressions", function () { ast: { withPositions: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -216,7 +216,7 @@ describe("Test expressions", function () { `, { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -228,8 +228,8 @@ describe("Test expressions", function () { new foo; $a = (new foo)[0]; `, - { parser: { debug: false } } - ) + { parser: { debug: false } }, + ), ).toMatchSnapshot(); }); @@ -246,8 +246,8 @@ describe("Test expressions", function () { new static(); new parent(); `, - { parser: { debug: false } } - ) + { parser: { debug: false } }, + ), ).toMatchSnapshot(); }); @@ -260,8 +260,8 @@ describe("Test expressions", function () { new static(); new parent(); `, - { parser: { debug: false } } - ) + { parser: { debug: false } }, + ), ).toMatchSnapshot(); }); @@ -271,8 +271,8 @@ describe("Test expressions", function () { ` $a = new foo[0]; `, - { parser: { suppressErrors: true } } - ) + { parser: { suppressErrors: true } }, + ), ).toMatchSnapshot(); }); @@ -286,18 +286,18 @@ describe("Test expressions", function () { `, { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); it("chaining calls (derefenceable)", function () { expect( - parser.parseEval(`($a->b)::call()->foo[10]->bar;`) + parser.parseEval(`($a->b)::call()->foo[10]->bar;`), ).toMatchSnapshot(); expect(parser.parseEval(`array(1, 2, 3)[0]->foo;`)).toMatchSnapshot(); expect( - parser.parseEval(`($a++)($foo)->bar{$baz}::foo();`) + parser.parseEval(`($a++)($foo)->bar{$baz}::foo();`), ).toMatchSnapshot(); // expect error : expect( @@ -305,7 +305,7 @@ describe("Test expressions", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); // should pass expect(parser.parseEval(`bar()::foo()::baz();`)).toMatchSnapshot(); diff --git a/test/snapshot/foreach.test.js b/test/snapshot/foreach.test.js index fe3051c51..939f3bfe5 100644 --- a/test/snapshot/foreach.test.js +++ b/test/snapshot/foreach.test.js @@ -7,7 +7,7 @@ describe("foreach", function () { foreach ($array as $var) { echo $a; } - `) + `), ).toMatchSnapshot(); }); @@ -17,7 +17,7 @@ foreach ($array as $var) { foreach ($array as &$var) { echo $a; } - `) + `), ).toMatchSnapshot(); }); @@ -27,7 +27,7 @@ foreach ($array as &$var) { foreach ($array as list($a, $b)) { echo $a; } - `) + `), ).toMatchSnapshot(); }); @@ -37,7 +37,7 @@ foreach ($array as list($a, $b)) { foreach ($array as [$a, $b]) { echo $a; } - `) + `), ).toMatchSnapshot(); }); @@ -47,7 +47,7 @@ foreach ($array as [$a, $b]) { foreach ($array as $v => list($a, $b)) { echo $v; } - `) + `), ).toMatchSnapshot(); }); @@ -57,7 +57,7 @@ foreach ($array as $v => list($a, $b)) { foreach ($array as $v => [$a, $b]) { echo $v; } - `) + `), ).toMatchSnapshot(); }); @@ -67,7 +67,7 @@ foreach ($array as $v => [$a, $b]) { foreach ([...$var, 2, 3, 4] as $value) { print_r($value); } - `) + `), ).toMatchSnapshot(); }); @@ -77,7 +77,7 @@ foreach ([...$var, 2, 3, 4] as $value) { foreach (array(...$var, 2, 3, 4) as $value) { print_r($value); } - `) + `), ).toMatchSnapshot(); }); @@ -87,7 +87,7 @@ foreach (array(...$var, 2, 3, 4) as $value) { foreach ([[...$var], 2, 3, 4] as $value) { print_r($value); } - `) + `), ).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ foreach ([[...$var], 2, 3, 4] as $value) { foreach (array(array(...$var), 2, 3, 4) as $value) { print_r($value); } - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/function.test.js b/test/snapshot/function.test.js index f819f9183..77d58e1df 100644 --- a/test/snapshot/function.test.js +++ b/test/snapshot/function.test.js @@ -9,7 +9,7 @@ describe("Function tests", function () { return true; }; $b = foo(...[1, null, 1, 2, 3]); - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -18,7 +18,7 @@ describe("Function tests", function () { const ast = parser.parseEval( ` function foo(int|float $a = 1, Foo|Bar $b) : string|int {} - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -27,7 +27,7 @@ describe("Function tests", function () { const ast = parser.parseEval( ` fn (int|float $a = 1, Foo|Bar $b) : string|int => ""; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -36,7 +36,7 @@ describe("Function tests", function () { const ast = parser.parseEval( ` function foo(int&float $a = 1, Foo&Bar $b) : string&int {} - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -45,7 +45,7 @@ describe("Function tests", function () { const ast = parser.parseEval( ` fn (int&float $a = 1, Foo&Bar $b) : string&int => ""; - ` + `, ); expect(ast).toMatchSnapshot(); }); @@ -57,8 +57,8 @@ describe("Function tests", function () { function foo(array &$params) { // inner comment } - ` - ) + `, + ), ).toMatchSnapshot(); }); @@ -69,8 +69,8 @@ describe("Function tests", function () { function &foo(array &$params) { // inner comment } - ` - ) + `, + ), ).toMatchSnapshot(); }); @@ -81,8 +81,8 @@ describe("Function tests", function () { function &foo(int $a = 1, float $b = 1, bool $c = 1, string $d, callable $e, int\\bar $f, ?array &...$params) : ?object { // inner comment } - ` - ) + `, + ), ).toMatchSnapshot(); }); @@ -95,26 +95,26 @@ describe("Function tests", function () { parser: { extractDoc: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); it("test variadic call error", function () { expect(() => - parser.parseEval(`$b = foo(...[1, 2, 3], $a);`) + parser.parseEval(`$b = foo(...[1, 2, 3], $a);`), ).toThrowErrorMatchingSnapshot(); }); it("test variadic function error 1", function () { expect(() => - parser.parseEval(`function foo(...$bar, $baz) {}`) + parser.parseEval(`function foo(...$bar, $baz) {}`), ).toThrowErrorMatchingSnapshot(); }); it("test variadic function error 2", function () { expect(() => - parser.parseEval(`function foo(...$bar, ...$baz) {}`) + parser.parseEval(`function foo(...$bar, ...$baz) {}`), ).toThrowErrorMatchingSnapshot(); }); @@ -154,7 +154,7 @@ describe("Function tests", function () { parser: { version: "8.0", }, - } + }, ); expect(astErr).toMatchSnapshot(); }); @@ -211,7 +211,7 @@ describe("Function tests", function () { parser: { version: "8.0", }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -236,7 +236,7 @@ describe("Function tests", function () { version: "8.1", suppressErrors: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -254,8 +254,8 @@ describe("Function tests", function () { parser: { version: "8.1", }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -270,8 +270,8 @@ describe("Function tests", function () { suppressErrors: true, version: "8.0", }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/graceful.test.js b/test/snapshot/graceful.test.js index 576fbf8d3..a55d2cca9 100644 --- a/test/snapshot/graceful.test.js +++ b/test/snapshot/graceful.test.js @@ -17,8 +17,8 @@ describe("Test graceful mode", function () { "$foo = ", // 3. <-- missing expr "}", // 4. "}", // 5. <-- extra '}' token here - ].join("\n") - ) + ].join("\n"), + ), ).toMatchSnapshot(); }); @@ -35,7 +35,7 @@ describe("Test graceful mode", function () { test.parseEval(` final final interface foo { abstract function func() - `) + `), ).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe("Test graceful mode", function () { test.parseEval(` final final class foo { abstract function func() - `) + `), ).toMatchSnapshot(); }); @@ -53,19 +53,19 @@ describe("Test graceful mode", function () { test.parseEval(` final final trait foo { abstract function func() - `) + `), ).toMatchSnapshot(); }); it("interface", function () { expect( - test.parseEval("interface foo implement baz {}") + test.parseEval("interface foo implement baz {}"), ).toMatchSnapshot(); }); it("trait", function () { expect( - test.parseEval("trait foo extends bar implement baz {}") + test.parseEval("trait foo extends bar implement baz {}"), ).toMatchSnapshot(); }); @@ -74,7 +74,7 @@ describe("Test graceful mode", function () { test.parseEval(` $foo->bar($arg, ); $foo = new bar($baz, ,$foo); - `) + `), ).toMatchSnapshot(); }); @@ -83,7 +83,7 @@ describe("Test graceful mode", function () { test.parseEval(` $controller->expects($this->once()) -> - `) + `), ).toMatchSnapshot(); }); diff --git a/test/snapshot/heredoc.test.js b/test/snapshot/heredoc.test.js index 61f41bc37..801949d37 100644 --- a/test/snapshot/heredoc.test.js +++ b/test/snapshot/heredoc.test.js @@ -9,7 +9,7 @@ Example of string spanning multiple lines using heredoc syntax. EOD; - `) + `), ).toMatchSnapshot(); }); @@ -21,7 +21,7 @@ Example of string spanning multiple lines using heredoc syntax. EOD; - `) + `), ).toMatchSnapshot(); }); @@ -33,7 +33,7 @@ Example of string spanning multiple lines using heredoc syntax. EOD; - `) + `), ).toMatchSnapshot(); }); @@ -45,7 +45,7 @@ My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT; - `) + `), ).toMatchSnapshot(); }); @@ -56,7 +56,7 @@ var_dump(array(<< { expect( - parser.parseEval("[,,,'foo',,, 'bar',,,'baz'] = $a") + parser.parseEval("[,,,'foo',,, 'bar',,,'baz'] = $a"), ).toMatchSnapshot(); }); it("array with empty values #2", () => { expect( - parser.parseEval("[,,,'foo',,, 'bar',,,'baz',] = $a") + parser.parseEval("[,,,'foo',,, 'bar',,,'baz',] = $a"), ).toMatchSnapshot(); }); it("array with empty values #3", () => { expect( - parser.parseEval("[,,,'foo',,, 'bar',,,'baz',,] = $a") + parser.parseEval("[,,,'foo',,, 'bar',,,'baz',,] = $a"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/location.test.js b/test/snapshot/location.test.js index 030467e40..8759f01cf 100644 --- a/test/snapshot/location.test.js +++ b/test/snapshot/location.test.js @@ -215,7 +215,7 @@ string";`, withPositions: true, withSource: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -226,7 +226,7 @@ string";`, withPositions: true, withSource: true, }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/loop.test.js b/test/snapshot/loop.test.js index 4ccb3bb5c..dd9601ecc 100644 --- a/test/snapshot/loop.test.js +++ b/test/snapshot/loop.test.js @@ -8,7 +8,7 @@ describe("Test loops statements (for, while)", function () { while(true) { echo "go"; } - `) + `), ).toMatchSnapshot(); }); @@ -18,7 +18,7 @@ describe("Test loops statements (for, while)", function () { while(true): echo "short"; endwhile; - `) + `), ).toMatchSnapshot(); }); }); @@ -33,8 +33,8 @@ describe("Test loops statements (for, while)", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -52,8 +52,8 @@ describe("Test loops statements (for, while)", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -73,8 +73,8 @@ describe("Test loops statements (for, while)", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); it("fix #122", function () { @@ -87,8 +87,8 @@ describe("Test loops statements (for, while)", function () { `, { parser: { suppressErrors: true }, - } - ) + }, + ), ).toMatchSnapshot(); expect( parser.parseEval( @@ -98,8 +98,8 @@ describe("Test loops statements (for, while)", function () { `, { parser: { suppressErrors: true }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/namespace.test.js b/test/snapshot/namespace.test.js index a70df42bf..b39f1602d 100644 --- a/test/snapshot/namespace.test.js +++ b/test/snapshot/namespace.test.js @@ -5,7 +5,7 @@ describe("Test namespace statements", function () { expect( parser.parseEval(` $obj = new \\Foo(); - `) + `), ).toMatchSnapshot(); }); it("allow trailing comma for grouped namespaces #177", function () { @@ -15,7 +15,7 @@ describe("Test namespace statements", function () { Foo, Bar, Baz, - };`) + };`), ).toMatchSnapshot(); }); it("test single namespace", function () { @@ -43,8 +43,8 @@ describe("Test namespace statements", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -63,8 +63,8 @@ describe("Test namespace statements", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -79,8 +79,8 @@ describe("Test namespace statements", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -97,8 +97,8 @@ describe("Test namespace statements", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -108,7 +108,7 @@ describe("Test namespace statements", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -123,8 +123,8 @@ describe("Test namespace statements", function () { debug: false, suppressErrors: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -151,8 +151,8 @@ describe("Test namespace statements", function () { debug: false, suppressErrors: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -162,7 +162,7 @@ describe("Test namespace statements", function () { declare(strict_types=1); namespace foo; class bar {} - `) + `), ).toMatchSnapshot(); }); @@ -195,7 +195,7 @@ describe("Test namespace statements", function () { ast: { withPositions: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -208,7 +208,7 @@ describe("Test namespace statements", function () { parser: { extractDoc: true, }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/new.test.js b/test/snapshot/new.test.js index 440f5ff09..db340d959 100644 --- a/test/snapshot/new.test.js +++ b/test/snapshot/new.test.js @@ -7,7 +7,7 @@ describe("new", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); it("simple", function () { @@ -39,12 +39,12 @@ describe("new", function () { }); it("anonymous with multiple argument", function () { expect( - parser.parseEval("new class($one, $two, $three) {};") + parser.parseEval("new class($one, $two, $three) {};"), ).toMatchSnapshot(); }); it("static array", () => { expect( - parser.parseEval("return new self::$mapping[$map]();") + parser.parseEval("return new self::$mapping[$map]();"), ).toMatchSnapshot(); }); it("parent", function () { @@ -58,12 +58,12 @@ describe("new", function () { }); it("with arguments", function () { expect( - parser.parseEval('new Foo("constructor", "bar");') + parser.parseEval('new Foo("constructor", "bar");'), ).toMatchSnapshot(); }); it("trailing comma", function () { expect( - parser.parseEval('new Foo("constructor", "bar",);') + parser.parseEval('new Foo("constructor", "bar",);'), ).toMatchSnapshot(); }); it("anonymous class", function () { @@ -75,8 +75,8 @@ describe("new", function () { it("anonymous class #3", function () { expect( parser.parseEval( - "$var = new class($var) extends SomeClass implements SomeInterface {};" - ) + "$var = new class($var) extends SomeClass implements SomeInterface {};", + ), ).toMatchSnapshot(); }); it("result from function", function () { diff --git a/test/snapshot/nowdoc.test.js b/test/snapshot/nowdoc.test.js index 1db1bc3f9..4690d23fc 100644 --- a/test/snapshot/nowdoc.test.js +++ b/test/snapshot/nowdoc.test.js @@ -9,7 +9,7 @@ Example of string spanning multiple lines using heredoc syntax. EOD; - `) + `), ).toMatchSnapshot(); }); @@ -21,7 +21,7 @@ Example of string spanning multiple lines using heredoc syntax. EOD; - `) + `), ).toMatchSnapshot(); }); @@ -33,7 +33,7 @@ My name is "$name". I am printing some $foo->foo. Now, I am printing some {$foo->bar[1]}. This should print a capital 'A': \x41 EOT; - `) + `), ).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ var_dump(array(<<<'EOD' foobar! EOD )); - `) + `), ).toMatchSnapshot(); }); @@ -57,7 +57,7 @@ function foo() Nothing in here... LABEL; } - `) + `), ).toMatchSnapshot(); }); @@ -73,7 +73,7 @@ FOOBAR; Property example FOOBAR; } - `) + `), ).toMatchSnapshot(); }); @@ -82,7 +82,7 @@ FOOBAR; parser.parseEval(` echo <<<'TEST' TEST; - `) + `), ).toMatchSnapshot(); }); @@ -92,7 +92,7 @@ TEST; echo <<<'TEST' TEST; - `) + `), ).toMatchSnapshot(); }); @@ -104,7 +104,7 @@ echo <<< 'TEST' b c TEST; - `) + `), ).toMatchSnapshot(); }); @@ -116,7 +116,7 @@ echo <<<\t'TEST' b c TEST; - `) + `), ).toMatchSnapshot(); }); @@ -128,7 +128,7 @@ TEST; b c END; - `) + `), ).toMatchSnapshot(); }); @@ -141,7 +141,7 @@ TEST; b c END; - `) + `), ).toMatchSnapshot(); }); @@ -153,7 +153,7 @@ TEST; NOWDOC; $y = "_$z"; - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/nullsavepropertylookup.test.js b/test/snapshot/nullsavepropertylookup.test.js index f8f9bde62..50e82ac32 100644 --- a/test/snapshot/nullsavepropertylookup.test.js +++ b/test/snapshot/nullsavepropertylookup.test.js @@ -12,7 +12,7 @@ describe("nullsavepropertylookup", function () { }); it("multiple", function () { expect( - parser.parseEval("$obj?->property_1?->property_2;") + parser.parseEval("$obj?->property_1?->property_2;"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/number.test.js b/test/snapshot/number.test.js index 01742454c..84b6960b0 100644 --- a/test/snapshot/number.test.js +++ b/test/snapshot/number.test.js @@ -15,7 +15,7 @@ describe("Test numbers", function () { $f = 0123; $g = 1.2e3; $h = 7E-10; - `) + `), ).toMatchSnapshot(); }); diff --git a/test/snapshot/offsetlookup.test.js b/test/snapshot/offsetlookup.test.js index 64e43dc77..6e65f832c 100644 --- a/test/snapshot/offsetlookup.test.js +++ b/test/snapshot/offsetlookup.test.js @@ -33,7 +33,7 @@ $foo->bzr_['string']; $foo->bzr_[$baz]; $foo->bzr_[$baz->foo]; $foo->bzr_[$var ? 'one' : 'two']; - `) + `), ).toMatchSnapshot(); }); it("inside propertylookup (curly)", function () { @@ -44,7 +44,7 @@ $foo->bzr_{'string'}; $foo->bzr_{$baz}; $foo->bzr_{$baz->foo}; $foo->bzr_{$var ? 'one' : 'two'}; - `) + `), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/php73.test.js b/test/snapshot/php73.test.js index 159d097d3..8bc4d9d54 100644 --- a/test/snapshot/php73.test.js +++ b/test/snapshot/php73.test.js @@ -8,7 +8,7 @@ describe("Test syntax parsing with PHP 73 support", function () { parser: { version: "7.3", }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe("Test syntax parsing with PHP 73 support", function () { parser: { version: "7.3", }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -69,7 +69,7 @@ describe("Test syntax parsing with PHP 73 support", function () { version: "7.3", suppressErrors: true, }, - } + }, ); expect(ast).toMatchSnapshot(); }); diff --git a/test/snapshot/property.test.js b/test/snapshot/property.test.js index 44b81cb60..0761a087a 100644 --- a/test/snapshot/property.test.js +++ b/test/snapshot/property.test.js @@ -6,82 +6,82 @@ describe("property", () => { }); it("var with value", () => { expect( - parser.parseEval("class Foo { var $property = 10; }") + parser.parseEval("class Foo { var $property = 10; }"), ).toMatchSnapshot(); }); it("public", () => { expect( - parser.parseEval("class Foo { public $property; }") + parser.parseEval("class Foo { public $property; }"), ).toMatchSnapshot(); }); it("public with value", () => { expect( - parser.parseEval("class Foo { public $property = 10; }") + parser.parseEval("class Foo { public $property = 10; }"), ).toMatchSnapshot(); }); it("protected", () => { expect( - parser.parseEval("class Foo { protected $property; }") + parser.parseEval("class Foo { protected $property; }"), ).toMatchSnapshot(); }); it("protected with value", () => { expect( - parser.parseEval("class Foo { protected $property = 10; }") + parser.parseEval("class Foo { protected $property = 10; }"), ).toMatchSnapshot(); }); it("private", () => { expect( - parser.parseEval("class Foo { private $property; }") + parser.parseEval("class Foo { private $property; }"), ).toMatchSnapshot(); }); it("private with value", () => { expect( - parser.parseEval("class Foo { private $property = 10; }") + parser.parseEval("class Foo { private $property = 10; }"), ).toMatchSnapshot(); }); it("public static", () => { expect( - parser.parseEval("class Foo { public static $property; }") + parser.parseEval("class Foo { public static $property; }"), ).toMatchSnapshot(); }); it("public static with value", () => { expect( - parser.parseEval("class Foo { public static $property = 10; }") + parser.parseEval("class Foo { public static $property = 10; }"), ).toMatchSnapshot(); }); it("without value", () => { expect( - parser.parseEval("class Foo { public $property; }") + parser.parseEval("class Foo { public $property; }"), ).toMatchSnapshot(); }); it("with string number value", () => { expect( - parser.parseEval("class Foo { public $property = 10; }") + parser.parseEval("class Foo { public $property = 10; }"), ).toMatchSnapshot(); }); it("with single quotes string value", () => { expect( - parser.parseEval("class Foo { public $property = 'string'; }") + parser.parseEval("class Foo { public $property = 'string'; }"), ).toMatchSnapshot(); }); it("with double quotes string value", () => { expect( - parser.parseEval('class Foo { public $property = "string"; }') + parser.parseEval('class Foo { public $property = "string"; }'), ).toMatchSnapshot(); }); it("with boolean value", () => { expect( - parser.parseEval("class Foo { public $property = true; }") + parser.parseEval("class Foo { public $property = true; }"), ).toMatchSnapshot(); }); it("with bin value", () => { expect( - parser.parseEval("class Foo { public $property = 'hello ' . 'world'; }") + parser.parseEval("class Foo { public $property = 'hello ' . 'world'; }"), ).toMatchSnapshot(); }); it("with bin value 2", () => { expect( - parser.parseEval("class Foo { public $property = 1 + 2; }") + parser.parseEval("class Foo { public $property = 1 + 2; }"), ).toMatchSnapshot(); }); it("with heredoc value", () => { @@ -92,7 +92,7 @@ class Foo { hello world EOD; } - `) + `), ).toMatchSnapshot(); }); it("with nowdoc value", () => { @@ -103,22 +103,22 @@ class Foo { hello world EOD; } - `) + `), ).toMatchSnapshot(); }); it("with constant value", () => { expect( - parser.parseEval("class Foo { public $property = CONSTANT; }") + parser.parseEval("class Foo { public $property = CONSTANT; }"), ).toMatchSnapshot(); }); it("with array value", () => { expect( - parser.parseEval("class Foo { public $property = array(true, false); }") + parser.parseEval("class Foo { public $property = array(true, false); }"), ).toMatchSnapshot(); }); it("with short array value", () => { expect( - parser.parseEval("class Foo { public $property = [true, false]; }") + parser.parseEval("class Foo { public $property = [true, false]; }"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/propertystatement.test.js b/test/snapshot/propertystatement.test.js index 41bdc7e64..6c9707a51 100644 --- a/test/snapshot/propertystatement.test.js +++ b/test/snapshot/propertystatement.test.js @@ -9,12 +9,12 @@ describe("propertystatement", () => { }); it("multiple", () => { expect( - parser.parseEval("class Foo { public $dsn, $username, $password; }") + parser.parseEval("class Foo { public $dsn, $username, $password; }"), ).toMatchSnapshot(); }); it("multiple (var)", () => { expect( - parser.parseEval("class Foo { var $dsn, $username, $password; }") + parser.parseEval("class Foo { var $dsn, $username, $password; }"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/return.test.js b/test/snapshot/return.test.js index c45a0d707..031888e2f 100644 --- a/test/snapshot/return.test.js +++ b/test/snapshot/return.test.js @@ -11,7 +11,7 @@ describe("return", function () { expect( parser.parseEval("return", { parser: { suppressErrors: true }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/statement.test.js b/test/snapshot/statement.test.js index dfde4ed18..6f4128d90 100644 --- a/test/snapshot/statement.test.js +++ b/test/snapshot/statement.test.js @@ -7,7 +7,7 @@ describe("Test statements", function () { start: $i++; goto start; - `) + `), ).toMatchSnapshot(); }); @@ -17,7 +17,7 @@ describe("Test statements", function () { function foo() { global $a, $b; } - `) + `), ).toMatchSnapshot(); }); @@ -32,8 +32,8 @@ describe("Test statements", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -58,8 +58,8 @@ describe("Test statements", function () { `, { parser: { suppressErrors: true }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); @@ -75,8 +75,8 @@ describe("Test statements", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -98,8 +98,8 @@ describe("Test statements", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -118,8 +118,8 @@ describe("Test statements", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -138,8 +138,8 @@ describe("Test statements", function () { `, { parser: { debug: false }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/static.test.js b/test/snapshot/static.test.js index f3cd1c3eb..553954444 100644 --- a/test/snapshot/static.test.js +++ b/test/snapshot/static.test.js @@ -9,7 +9,7 @@ describe("static", function () { }); it("multiple", function () { expect( - parser.parseEval("static $foo = 1, $bar = 2, $baz = 3;") + parser.parseEval("static $foo = 1, $bar = 2, $baz = 3;"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/string.test.js b/test/snapshot/string.test.js index 8b981c74e..20d876177 100644 --- a/test/snapshot/string.test.js +++ b/test/snapshot/string.test.js @@ -3,7 +3,7 @@ const parser = require("../main"); describe("Test strings", function () { it("fix #251", function () { expect( - parser.parseEval("$var = \"string ${juices['FOO']} string\";") + parser.parseEval("$var = \"string ${juices['FOO']} string\";"), ).toMatchSnapshot(); }); @@ -27,15 +27,15 @@ describe("Test strings", function () { it("fix #124", function () { expect( - parser.parseEval('$string = "He drank some $juices[koolaid1] juice.";') + parser.parseEval('$string = "He drank some $juices[koolaid1] juice.";'), ).toMatchSnapshot(); }); it("fix #123", function () { expect( parser.parseEval( - "$string = 'Avoid converting \n chars, but \\' or \\\\ is ok.';" - ) + "$string = 'Avoid converting \n chars, but \\' or \\\\ is ok.';", + ), ).toMatchSnapshot(); }); @@ -49,7 +49,7 @@ describe("Test strings", function () { it("test binary with double quotes", function () { expect( - parser.parseEval(`echo b"\\colors contains >$colors<\\n";`) + parser.parseEval(`echo b"\\colors contains >$colors<\\n";`), ).toMatchSnapshot(); }); @@ -59,7 +59,7 @@ describe("Test strings", function () { parser.parseEval(`echo "$`, { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe("Test strings", function () { parser.parseEval("echo `$", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -77,7 +77,7 @@ describe("Test strings", function () { parser.parseEval("echo ` -> $", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); }); @@ -88,7 +88,7 @@ describe("Test strings", function () { parser.parseEval(`echo "{`, { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -97,7 +97,7 @@ describe("Test strings", function () { parser.parseEval("echo `{", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -106,7 +106,7 @@ describe("Test strings", function () { parser.parseEval("echo ` -> {", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); }); @@ -117,7 +117,7 @@ describe("Test strings", function () { parser.parseEval('echo "${', { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -126,7 +126,7 @@ describe("Test strings", function () { parser.parseEval("echo `${", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -135,7 +135,7 @@ describe("Test strings", function () { parser.parseEval("echo ` -> ${", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); }); @@ -146,7 +146,7 @@ describe("Test strings", function () { parser.parseEval('echo "{$', { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -155,7 +155,7 @@ describe("Test strings", function () { parser.parseEval("echo `{$", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); @@ -164,14 +164,14 @@ describe("Test strings", function () { parser.parseEval("echo ` -> {$", { parser: { suppressErrors: true, debug: false }, lexer: { debug: false }, - }) + }), ).toMatchSnapshot(); }); }); it.skip("binary cast", function () { expect( - parser.parseEval(`echo (binary)"\\colors[1] contains >$colors[1]<\\n";`) + parser.parseEval(`echo (binary)"\\colors[1] contains >$colors[1]<\\n";`), ).toMatchSnapshot(); }); @@ -181,7 +181,7 @@ describe("Test strings", function () { echo "Hello $obj->name !"; echo "Hello $obj->foo->bar !"; echo "Hello $obj[1]->foo !"; - `) + `), ).toMatchSnapshot(); }); @@ -221,8 +221,8 @@ describe("Test strings", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -260,8 +260,8 @@ describe("Test strings", function () { parser: { debug: false, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -271,7 +271,7 @@ describe("Test strings", function () { parser: { debug: false, }, - }) + }), ).toMatchSnapshot(); }); @@ -283,7 +283,7 @@ describe("Test strings", function () { \\$catalogue%s->addFallbackCatalogue(\\$catalogue%s); EOF2 ) - `) + `), ).toMatchSnapshot(); }); @@ -302,8 +302,8 @@ describe("Test strings", function () { parser: { suppressErrors: true, }, - } - ) + }, + ), ).toMatchSnapshot(); }); @@ -313,7 +313,7 @@ describe("Test strings", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -323,7 +323,7 @@ describe("Test strings", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -343,8 +343,8 @@ describe("Test strings", function () { "$a = `-{`;", "$a = `-$`;", "$a = `$`;", - ].join("\r") - ) + ].join("\r"), + ), ).toMatchSnapshot(); }); @@ -364,7 +364,7 @@ $var = '\\'foo'; $var = 'foo\\''; $var = 'foo\\'foo'; $var = '\\\\\\''; -`) +`), ).toMatchSnapshot(); }); it("double quotes", function () { @@ -396,7 +396,7 @@ $var = "🌟"; $var = "'"; $var = "\\'"; $var = "\\n | \\r | \\t | \\v | \\e | \\f | \\\\ | \\$ | \\" | \\141 | \\x61 | \\u{0061}"; -`) +`), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/switch.test.js b/test/snapshot/switch.test.js index 44904283f..b716c4ca4 100644 --- a/test/snapshot/switch.test.js +++ b/test/snapshot/switch.test.js @@ -33,154 +33,154 @@ describe("switch statements", function () { it("colon and one case", function () { const ast = parser.parseEval( - 'switch (true): case 1: return "1"; endswitch;' + 'switch (true): case 1: return "1"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and one case #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1: return "1"; endswitch;' + 'switch (true):; case 1: return "1"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple difference cases", function () { const ast = parser.parseEval( - 'switch (true) { case 1: return "1"; case 2: return "2"; case 3: return "3"; }' + 'switch (true) { case 1: return "1"; case 2: return "2"; case 3: return "3"; }', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple difference cases #2", function () { const ast = parser.parseEval( - 'switch (true) {; case 1: return "1"; case 2: return "2"; case 3: return "3"; }' + 'switch (true) {; case 1: return "1"; case 2: return "2"; case 3: return "3"; }', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple difference cases", function () { const ast = parser.parseEval( - 'switch (true): case 1: return "1"; case 2: return "2"; case 3: return "3"; endswitch;' + 'switch (true): case 1: return "1"; case 2: return "2"; case 3: return "3"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple difference cases #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1: return "1"; case 2: return "2"; case 3: return "3"; endswitch;' + 'switch (true):; case 1: return "1"; case 2: return "2"; case 3: return "3"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple same cases", function () { const ast = parser.parseEval( - 'switch (true) { case 1: case 2: case 3: return "3"; }' + 'switch (true) { case 1: case 2: case 3: return "3"; }', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple same cases #2", function () { const ast = parser.parseEval( - 'switch (true) {; case 1: case 2: case 3: return "3"; }' + 'switch (true) {; case 1: case 2: case 3: return "3"; }', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple same cases", function () { const ast = parser.parseEval( - 'switch (true): case 1: case 2: case 3: return "3"; endswitch;' + 'switch (true): case 1: case 2: case 3: return "3"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple same cases #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1: case 2: case 3: return "3"; endswitch;' + 'switch (true):; case 1: case 2: case 3: return "3"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple difference cases with default", function () { const ast = parser.parseEval( - 'switch (true) { case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; }' + 'switch (true) { case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple difference cases with default #2", function () { const ast = parser.parseEval( - 'switch (true) {; case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; }' + 'switch (true) {; case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple difference cases with default", function () { const ast = parser.parseEval( - 'switch (true): case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; endswitch;' + 'switch (true): case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple difference cases with default #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; endswitch;' + 'switch (true):; case 1: return "1"; case 2: return "2"; case 3: return "3"; default: return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple same cases with default", function () { const ast = parser.parseEval( - 'switch (true) { case 1: case 2: case 3: return "3"; default: return "5"; }' + 'switch (true) { case 1: case 2: case 3: return "3"; default: return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("curly and multiple same cases with default #2", function () { const ast = parser.parseEval( - 'switch (true) {; case 1: case 2: case 3: return "3"; default: return "5"; }' + 'switch (true) {; case 1: case 2: case 3: return "3"; default: return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple same cases with default", function () { const ast = parser.parseEval( - 'switch (true): case 1: case 2: case 3: return "3"; default: return "5"; endswitch;' + 'switch (true): case 1: case 2: case 3: return "3"; default: return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and multiple same cases with default #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1: case 2: case 3: return "3"; default: return "5"; endswitch;' + 'switch (true):; case 1: case 2: case 3: return "3"; default: return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("curly and ';' separator", function () { const ast = parser.parseEval( - 'switch (true) { case 1; case 2; case 3; return "3"; default; return "5"; }' + 'switch (true) { case 1; case 2; case 3; return "3"; default; return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("curly and ';' separator #2", function () { const ast = parser.parseEval( - 'switch (true) {; case 1; case 2; case 3; return "3"; default; return "5"; }' + 'switch (true) {; case 1; case 2; case 3; return "3"; default; return "5"; }', ); expect(ast).toMatchSnapshot(); }); it("colon and ';' separator", function () { const ast = parser.parseEval( - 'switch (true): case 1; case 2; case 3; return "3"; default; return "5"; endswitch;' + 'switch (true): case 1; case 2; case 3; return "3"; default; return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); it("colon and ';' separator #2", function () { const ast = parser.parseEval( - 'switch (true):; case 1; case 2; case 3; return "3"; default; return "5"; endswitch;' + 'switch (true):; case 1; case 2; case 3; return "3"; default; return "5"; endswitch;', ); expect(ast).toMatchSnapshot(); }); @@ -206,7 +206,7 @@ describe("switch statements", function () { `, { parser: { debug: false }, - } + }, ); expect(ast).toMatchSnapshot(); }); @@ -222,7 +222,7 @@ describe("switch statements", function () { `, { parser: { suppressErrors: true }, - } + }, ); expect(errAst).toMatchSnapshot(); expect(errAst.errors.length).not.toBe(0); diff --git a/test/snapshot/throw.test.js b/test/snapshot/throw.test.js index e683a3ece..bd70a479e 100644 --- a/test/snapshot/throw.test.js +++ b/test/snapshot/throw.test.js @@ -6,14 +6,14 @@ describe("throw", function () { }); it("arrow function", function () { expect( - parser.parseEval('$fn = fn() => throw new Exception("oops");') + parser.parseEval('$fn = fn() => throw new Exception("oops");'), ).toMatchSnapshot(); }); it("arrow function in PHP < 8", function () { expect(() => parser.parseEval('$fn = fn() => throw new Exception("oops");', { parser: { version: "7.4" }, - }) + }), ).toThrow(); }); }); diff --git a/test/snapshot/traitprecedence.test.js b/test/snapshot/traitprecedence.test.js index 6545af47b..c2e33a906 100644 --- a/test/snapshot/traitprecedence.test.js +++ b/test/snapshot/traitprecedence.test.js @@ -11,8 +11,8 @@ class MyHelloWorld extends Base { A::bigTalk insteadof B; } } - ` - ) + `, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/try.test.js b/test/snapshot/try.test.js index 9f399cd70..7f6c70371 100644 --- a/test/snapshot/try.test.js +++ b/test/snapshot/try.test.js @@ -4,78 +4,78 @@ describe("boolean", () => { it("simple", () => { expect( parser.parseEval( - "try { call(); } catch (Exception $e) { do_something(); }" - ) + "try { call(); } catch (Exception $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("without variable", () => { expect( - parser.parseEval("try { call(); } catch (Exception) { do_something(); }") + parser.parseEval("try { call(); } catch (Exception) { do_something(); }"), ).toMatchSnapshot(); }); it("without variable in PHP < 8", () => { expect(() => parser.parseEval( "try { call(); } catch (Exception) { do_something(); }", - { parser: { version: "7.4" } } - ) + { parser: { version: "7.4" } }, + ), ).toThrow(SyntaxError); }); it("qualified name", () => { expect( parser.parseEval( - "try { call(); } catch (Foo\\Exception $e) { do_something(); }" - ) + "try { call(); } catch (Foo\\Exception $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("fully qualified name", () => { expect( parser.parseEval( - "try { call(); } catch (\\Exception $e) { do_something(); }" - ) + "try { call(); } catch (\\Exception $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("fully qualified name #2", () => { expect( parser.parseEval( - "try { call(); } catch (\\Exception\\Foo $e) { do_something(); }" - ) + "try { call(); } catch (\\Exception\\Foo $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("relative name", () => { expect( parser.parseEval( - "try { call(); } catch (namespace\\Exception $e) { do_something(); }" - ) + "try { call(); } catch (namespace\\Exception $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("finally", () => { expect( parser.parseEval( - "try { call(); } catch (Exception $e) { do_something(); } finally { do_something_other(); }" - ) + "try { call(); } catch (Exception $e) { do_something(); } finally { do_something_other(); }", + ), ).toMatchSnapshot(); }); it("multiple catch", () => { expect( parser.parseEval( - "try { call(); } catch (MyException | MyOtherException $e) { do_something(); }" - ) + "try { call(); } catch (MyException | MyOtherException $e) { do_something(); }", + ), ).toMatchSnapshot(); }); it("multiple catch without variable", () => { expect( parser.parseEval( - "try { call(); } catch (MyException | MyOtherException) { do_something(); }" - ) + "try { call(); } catch (MyException | MyOtherException) { do_something(); }", + ), ).toMatchSnapshot(); }); it("multiple catch #2", () => { expect( parser.parseEval( - "try { call(); } catch (MyException | Foo\\Exception | \\Exception | \\Exception\\Foo | namespace\\Exception $e) { do_something(); }" - ) + "try { call(); } catch (MyException | Foo\\Exception | \\Exception | \\Exception\\Foo | namespace\\Exception $e) { do_something(); }", + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/typereference.test.js b/test/snapshot/typereference.test.js index c1d494cc8..1c7777db9 100644 --- a/test/snapshot/typereference.test.js +++ b/test/snapshot/typereference.test.js @@ -63,22 +63,22 @@ describe("typereference", function () { }); it("callable (argument)", function () { expect( - parser.parseEval("function foo(callable $arg) {}") + parser.parseEval("function foo(callable $arg) {}"), ).toMatchSnapshot(); }); it("callable (argument) (uppercase)", function () { expect( - parser.parseEval("function foo(CALLABLE $arg) {}") + parser.parseEval("function foo(CALLABLE $arg) {}"), ).toMatchSnapshot(); }); it("callable (return type declarations)", function () { expect( - parser.parseEval("function foo($arg): callable {}") + parser.parseEval("function foo($arg): callable {}"), ).toMatchSnapshot(); }); it("callable (return type declarations) (uppercase)", function () { expect( - parser.parseEval("function foo($arg): CALLABLE {}") + parser.parseEval("function foo($arg): CALLABLE {}"), ).toMatchSnapshot(); }); it("object (argument)", function () { @@ -95,22 +95,22 @@ describe("typereference", function () { }); it("iterable (argument)", function () { expect( - parser.parseEval("function foo(iterable $arg) {}") + parser.parseEval("function foo(iterable $arg) {}"), ).toMatchSnapshot(); }); it("iterable (argument) (uppercase)", function () { expect( - parser.parseEval("function foo(ITERABLE $arg) {}") + parser.parseEval("function foo(ITERABLE $arg) {}"), ).toMatchSnapshot(); }); it("iterable (return type declarations)", function () { expect( - parser.parseEval("function foo($arg): iterable {}") + parser.parseEval("function foo($arg): iterable {}"), ).toMatchSnapshot(); }); it("iterable (return type declarations) (uppercase)", function () { expect( - parser.parseEval("function foo($arg): ITERABLE {}") + parser.parseEval("function foo($arg): ITERABLE {}"), ).toMatchSnapshot(); }); it("void (argument)", function () { @@ -130,7 +130,7 @@ describe("typereference", function () { }); it("class (2)", function () { expect( - parser.parseEval("function foo(Foo\\Foo $arg) {}") + parser.parseEval("function foo(Foo\\Foo $arg) {}"), ).toMatchSnapshot(); }); it("class (3)", function () { @@ -138,7 +138,7 @@ describe("typereference", function () { }); it("class (4)", function () { expect( - parser.parseEval("function foo($arg): Foo\\Foo {}") + parser.parseEval("function foo($arg): Foo\\Foo {}"), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/union.test.js b/test/snapshot/union.test.js index b881c167e..8e54971d0 100644 --- a/test/snapshot/union.test.js +++ b/test/snapshot/union.test.js @@ -27,13 +27,13 @@ describe("Test unions", function () { it("union with three types", function () { expect( - parser.parseEval("function(foo|bar|baz $test) {}") + parser.parseEval("function(foo|bar|baz $test) {}"), ).toMatchSnapshot(); }); it("intersection with three types", function () { expect( - parser.parseEval("function(foo&bar&baz $test) {}") + parser.parseEval("function(foo&bar&baz $test) {}"), ).toMatchSnapshot(); }); diff --git a/test/snapshot/usegroup.test.js b/test/snapshot/usegroup.test.js index 7a06c2845..5cedc5096 100644 --- a/test/snapshot/usegroup.test.js +++ b/test/snapshot/usegroup.test.js @@ -3,36 +3,38 @@ const parser = require("../main"); describe("usegroup", () => { it("simple", () => { expect( - parser.parseEval("use My\\Full\\Classname as Another;") + parser.parseEval("use My\\Full\\Classname as Another;"), ).toMatchSnapshot(); }); it("multiple", () => { expect( - parser.parseEval("use My\\Full\\Classname as Another, My\\Full\\NSname;") + parser.parseEval("use My\\Full\\Classname as Another, My\\Full\\NSname;"), ).toMatchSnapshot(); }); it("multiple 2", () => { expect( parser.parseEval( - "use My\\Full\\Classname as Another, My\\Full\\NSname, \\Full\\NSname\\With\\Leading\\Backslash;" - ) + "use My\\Full\\Classname as Another, My\\Full\\NSname, \\Full\\NSname\\With\\Leading\\Backslash;", + ), ).toMatchSnapshot(); }); it("nested", () => { expect( - parser.parseEval("use some\\my_namespace\\{ClassA, ClassB, ClassC as C};") + parser.parseEval( + "use some\\my_namespace\\{ClassA, ClassB, ClassC as C};", + ), ).toMatchSnapshot(); }); it("nested 2", () => { expect( - parser.parseEval("use function some\\my_namespace\\{fn_a, fn_b, fn_c};") + parser.parseEval("use function some\\my_namespace\\{fn_a, fn_b, fn_c};"), ).toMatchSnapshot(); }); it("nested 3", () => { expect( parser.parseEval( - "use const some\\my_namespace\\{ConstA, ConstB, ConstC};" - ) + "use const some\\my_namespace\\{ConstA, ConstB, ConstC};", + ), ).toMatchSnapshot(); }); it("nested 4", () => { @@ -41,8 +43,8 @@ describe("usegroup", () => { `use Vendor\\Package\\SomeNamespace\\{ SubnamespaceOne\\ClassA, SubnamespaceOne\\ClassB - };` - ) + };`, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/useitem.test.js b/test/snapshot/useitem.test.js index 8faab6644..bdb931da8 100644 --- a/test/snapshot/useitem.test.js +++ b/test/snapshot/useitem.test.js @@ -9,27 +9,27 @@ describe("useitem", () => { }); it("with type", () => { expect( - parser.parseEval("use My\\Full\\Classname as Another;") + parser.parseEval("use My\\Full\\Classname as Another;"), ).toMatchSnapshot(); }); it("importing a function", () => { expect( - parser.parseEval("use function My\\Full\\functionName;") + parser.parseEval("use function My\\Full\\functionName;"), ).toMatchSnapshot(); }); it("importing a function with type", () => { expect( - parser.parseEval("use function My\\Full\\functionName as func;") + parser.parseEval("use function My\\Full\\functionName as func;"), ).toMatchSnapshot(); }); it("importing a class", () => { expect( - parser.parseEval("use some\\my_namespace\\ClassC;") + parser.parseEval("use some\\my_namespace\\ClassC;"), ).toMatchSnapshot(); }); it("importing a class with type", () => { expect( - parser.parseEval("use some\\my_namespace\\ClassC as C;") + parser.parseEval("use some\\my_namespace\\ClassC as C;"), ).toMatchSnapshot(); }); it("importing a constant", () => { @@ -37,7 +37,7 @@ describe("useitem", () => { }); it("importing a constant with type", () => { expect( - parser.parseEval("use const My\\Full\\CONSTANT as MY_CONST;") + parser.parseEval("use const My\\Full\\CONSTANT as MY_CONST;"), ).toMatchSnapshot(); }); it("invalid use", () => { @@ -55,8 +55,8 @@ describe("useitem", () => { };`, { parser: { suppressErrors: true }, - } - ) + }, + ), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/variable.test.js b/test/snapshot/variable.test.js index 8c600e673..dff819c9b 100644 --- a/test/snapshot/variable.test.js +++ b/test/snapshot/variable.test.js @@ -5,7 +5,7 @@ describe("Test variables", function () { expect( parser.parseEval(` global $$foo; - `) + `), ).toMatchSnapshot(); }); @@ -16,7 +16,7 @@ describe("Test variables", function () { $foo::\${$property}; $bar->$$property; $bar->\${$property}; - `) + `), ).toMatchSnapshot(); }); @@ -26,7 +26,7 @@ describe("Test variables", function () { $bar->{$property->foo}; $bar->\${$property}; $bar->foo_{$property}; - `) + `), ).toMatchSnapshot(); }); @@ -39,7 +39,7 @@ describe("Test variables", function () { parser.parseEval(` $a = "foo"; $b = &$c; - $a->b = true;`) + $a->b = true;`), ).toMatchSnapshot(); }); @@ -49,13 +49,13 @@ describe("Test variables", function () { it("fix #167", function () { expect( - parser.parseEval("$var = Foo::{$bar['baz']}();Foo::$bar['baz']();") + parser.parseEval("$var = Foo::{$bar['baz']}();Foo::$bar['baz']();"), ).toMatchSnapshot(); }); it("valid offset lookup", function () { expect( - parser.parseEval("get_class($var)::$$$$$property;") + parser.parseEval("get_class($var)::$$$$$property;"), ).toMatchSnapshot(); }); @@ -68,7 +68,7 @@ describe("Test variables", function () { $var = (($var[0])[1])::foo; $var = (new Foo())::bar; get_class($this->resource)::$wrap; - `) + `), ).toMatchSnapshot(); }); @@ -81,7 +81,7 @@ describe("Test variables", function () { foo::class; $this->foo(); foo::$bar; - $this->foo::bar["baz"]::qux();`) + $this->foo::bar["baz"]::qux();`), ).toMatchSnapshot(); }); @@ -90,7 +90,7 @@ describe("Test variables", function () { parser.parseEval(` $a = "{$a[1]}"; $a = "{$a["a"]}"; - $a = "{$a[$b]}";`) + $a = "{$a[$b]}";`), ).toMatchSnapshot(); }); @@ -99,8 +99,8 @@ describe("Test variables", function () { parser.parseEval( ` $a = "{$a->foo()[$bar[$foo]]}"; - ` - ) + `, + ), ).toMatchSnapshot(); }); @@ -111,7 +111,7 @@ describe("Test variables", function () { $$$a = "bar"; \${$a."bar"} = "bar"; $foo{$a."bar"} = "bar"; - `) + `), ).toMatchSnapshot(); }); @@ -122,7 +122,7 @@ describe("Test variables", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -132,7 +132,7 @@ describe("Test variables", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -142,7 +142,7 @@ describe("Test variables", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -152,7 +152,7 @@ describe("Test variables", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); @@ -162,7 +162,7 @@ describe("Test variables", function () { parser: { suppressErrors: true, }, - }) + }), ).toMatchSnapshot(); }); }); diff --git a/test/snapshot/yield.test.js b/test/snapshot/yield.test.js index 4eda072cc..4b82a19e5 100644 --- a/test/snapshot/yield.test.js +++ b/test/snapshot/yield.test.js @@ -15,7 +15,7 @@ describe("yield", function () { }); it("assign (key and value)", function () { expect( - parser.parseEval("$data = (yield $key => $value);") + parser.parseEval("$data = (yield $key => $value);"), ).toMatchSnapshot(); }); it("inside function", function () { @@ -23,7 +23,7 @@ describe("yield", function () { }); it("expression as generator key", function () { expect( - parser.parseEval('function foo() { yield "bar {$test}" => 123; }') + parser.parseEval('function foo() { yield "bar {$test}" => 123; }'), ).toMatchSnapshot(); }); it("null", function () { diff --git a/test/snapshot/yieldfrom.test.js b/test/snapshot/yieldfrom.test.js index 167f4ab58..f7480feb9 100644 --- a/test/snapshot/yieldfrom.test.js +++ b/test/snapshot/yieldfrom.test.js @@ -9,7 +9,7 @@ describe("yieldfrom", function () { }); it("new", function () { expect( - parser.parseEval("yield from new ArrayIterator([5, 6]);") + parser.parseEval("yield from new ArrayIterator([5, 6]);"), ).toMatchSnapshot(); }); it("return", function () { diff --git a/test/version.test.js b/test/version.test.js index e678a82bc..9d82d1e45 100644 --- a/test/version.test.js +++ b/test/version.test.js @@ -23,7 +23,7 @@ describe("Test versions", function () { parser: { version: [701], }, - }) + }), ).toThrow(new Error("Expecting a number for version")); }); it("fail to parse bad version numbers", function () { @@ -32,7 +32,7 @@ describe("Test versions", function () { parser: { version: "x.y.z", }, - }) + }), ).toThrow(new Error("Bad version number : x.y.z")); }); it("unhandled version", function () { @@ -41,14 +41,14 @@ describe("Test versions", function () { parser: { version: "4.9", }, - }) + }), ).toThrow(new Error("Can only handle versions between 5.x to 8.x")); expect( parser.create.bind(null, { parser: { version: "9.9", }, - }) + }), ).toThrow(new Error("Can only handle versions between 5.x to 8.x")); }); }); diff --git a/yarn.lock b/yarn.lock index 504981a55..bcc2831d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1170,49 +1170,91 @@ dependencies: eslint-visitor-keys "^3.3.0" -"@eslint-community/regexpp@^4.4.0": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" - integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== +"@eslint-community/eslint-utils@^4.4.0": + version "4.4.1" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz#d1145bf2c20132d6400495d6df4bf59362fd9d56" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" -"@eslint/eslintrc@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331" - integrity sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ== +"@eslint-community/regexpp@^4.12.1": + version "4.12.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.12.1.tgz#cfc6cffe39df390a3841cde2abccf92eaa7ae0e0" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/config-array@^0.18.0": + version "0.18.0" + resolved "https://registry.yarnpkg.com/@eslint/config-array/-/config-array-0.18.0.tgz#37d8fe656e0d5e3dbaea7758ea56540867fd074d" + integrity sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw== + dependencies: + "@eslint/object-schema" "^2.1.4" + debug "^4.3.1" + minimatch "^3.1.2" + +"@eslint/core@^0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@eslint/core/-/core-0.7.0.tgz#a1bb4b6a4e742a5ff1894b7ee76fbf884ec72bd3" + integrity sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw== + +"@eslint/eslintrc@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-3.1.0.tgz#dbd3482bfd91efa663cbe7aa1f506839868207b6" + integrity sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.5.2" - globals "^13.19.0" + espree "^10.0.1" + globals "^14.0.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.42.0": - version "8.42.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.42.0.tgz#484a1d638de2911e6f5a30c12f49c7e4a3270fb6" - integrity sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw== +"@eslint/js@9.14.0", "@eslint/js@^9.14.0": + version "9.14.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-9.14.0.tgz#2347a871042ebd11a00fd8c2d3d56a265ee6857e" + integrity sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg== + +"@eslint/object-schema@^2.1.4": + version "2.1.4" + resolved "https://registry.yarnpkg.com/@eslint/object-schema/-/object-schema-2.1.4.tgz#9e69f8bb4031e11df79e03db09f9dbbae1740843" + integrity sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ== + +"@eslint/plugin-kit@^0.2.0": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz#5eff371953bc13e3f4d88150e2c53959f64f74f6" + integrity sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw== + dependencies: + levn "^0.4.1" + +"@humanfs/core@^0.19.1": + version "0.19.1" + resolved "https://registry.yarnpkg.com/@humanfs/core/-/core-0.19.1.tgz#17c55ca7d426733fe3c561906b8173c336b40a77" + integrity sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA== -"@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== +"@humanfs/node@^0.16.6": + version "0.16.6" + resolved "https://registry.yarnpkg.com/@humanfs/node/-/node-0.16.6.tgz#ee2a10eaabd1131987bf0488fd9b820174cd765e" + integrity sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" + "@humanfs/core" "^0.19.1" + "@humanwhocodes/retry" "^0.3.0" "@humanwhocodes/module-importer@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@humanwhocodes/retry@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.3.1.tgz#c72a5c76a9fbaf3488e231b13dc52c0da7bab42a" + integrity sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA== + +"@humanwhocodes/retry@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/retry/-/retry-0.4.1.tgz#9a96ce501bc62df46c4031fbd970e3cc6b10f07b" + integrity sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA== "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" @@ -1528,7 +1570,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": +"@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -1536,6 +1578,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@pkgr/core@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.1.tgz#1ec17e2edbec25c8306d424ecfbf13c7de1aaa31" + integrity sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA== + "@sinclair/typebox@^0.27.8": version "0.27.8" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" @@ -1645,6 +1692,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.12.tgz#d70faba7039d5fca54c83c7dbab41051d2b6f6cb" integrity sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA== +"@types/json-schema@^7.0.15": + version "7.0.15" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.15.tgz#596a1747233694d50f6ad8a7869fcb6f56cf5841" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== + "@types/json-schema@^7.0.9": version "7.0.11" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" @@ -1678,11 +1730,6 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/semver@^7.3.12": - version "7.3.13" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.13.tgz#da4bfd73f49bd541d28920ab0e2bf0ee80f71c91" - integrity sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw== - "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -1700,53 +1747,50 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/scope-manager@5.47.1": - version "5.47.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.47.1.tgz#0d302b3c2f20ab24e4787bf3f5a0d8c449b823bd" - integrity sha512-9hsFDsgUwrdOoW1D97Ewog7DYSHaq4WKuNs0LHF9RiCmqB0Z+XRR4Pf7u7u9z/8CciHuJ6yxNws1XznI3ddjEw== +"@typescript-eslint/scope-manager@8.13.0": + version "8.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-8.13.0.tgz#2f4aed0b87d72360e64e4ea194b1fde14a59082e" + integrity sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA== dependencies: - "@typescript-eslint/types" "5.47.1" - "@typescript-eslint/visitor-keys" "5.47.1" + "@typescript-eslint/types" "8.13.0" + "@typescript-eslint/visitor-keys" "8.13.0" -"@typescript-eslint/types@5.47.1": - version "5.47.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.47.1.tgz#459f07428aec5a8c4113706293c2ae876741ac8e" - integrity sha512-CmALY9YWXEpwuu6377ybJBZdtSAnzXLSQcxLSqSQSbC7VfpMu/HLVdrnVJj7ycI138EHqocW02LPJErE35cE9A== +"@typescript-eslint/types@8.13.0": + version "8.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-8.13.0.tgz#3f35dead2b2491a04339370dcbcd17bbdfc204d8" + integrity sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng== -"@typescript-eslint/typescript-estree@5.47.1": - version "5.47.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.47.1.tgz#b9d8441308aca53df7f69b2c67a887b82c9ed418" - integrity sha512-4+ZhFSuISAvRi2xUszEj0xXbNTHceV9GbH9S8oAD2a/F9SW57aJNQVOCxG8GPfSWH/X4eOPdMEU2jYVuWKEpWA== +"@typescript-eslint/typescript-estree@8.13.0": + version "8.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-8.13.0.tgz#db8c93dd5437ca3ce417a255fb35ddc3c12c3e95" + integrity sha512-v7SCIGmVsRK2Cy/LTLGN22uea6SaUIlpBcO/gnMGT/7zPtxp90bphcGf4fyrCQl3ZtiBKqVTG32hb668oIYy1g== dependencies: - "@typescript-eslint/types" "5.47.1" - "@typescript-eslint/visitor-keys" "5.47.1" + "@typescript-eslint/types" "8.13.0" + "@typescript-eslint/visitor-keys" "8.13.0" debug "^4.3.4" - globby "^11.1.0" + fast-glob "^3.3.2" is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" + minimatch "^9.0.4" + semver "^7.6.0" + ts-api-utils "^1.3.0" -"@typescript-eslint/utils@^5.10.0": - version "5.47.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.47.1.tgz#595f25ac06e9ee28c339fd43c709402820b13d7b" - integrity sha512-l90SdwqfmkuIVaREZ2ykEfCezepCLxzWMo5gVfcJsJCaT4jHT+QjgSkYhs5BMQmWqE9k3AtIfk4g211z/sTMVw== +"@typescript-eslint/utils@^6.0.0 || ^7.0.0 || ^8.0.0": + version "8.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-8.13.0.tgz#f6d40e8b5053dcaeabbd2e26463857abf27d62c0" + integrity sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ== dependencies: - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.47.1" - "@typescript-eslint/types" "5.47.1" - "@typescript-eslint/typescript-estree" "5.47.1" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.47.1": - version "5.47.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.47.1.tgz#d35c2da544dbb685db9c5b5b85adac0a1d74d1f2" - integrity sha512-rF3pmut2JCCjh6BLRhNKdYjULMb1brvoaiWDlHfLNVgmnZ0sBVJrs3SyaKE1XoDDnJuAx/hDQryHYmPUuNq0ig== - dependencies: - "@typescript-eslint/types" "5.47.1" - eslint-visitor-keys "^3.3.0" + "@eslint-community/eslint-utils" "^4.4.0" + "@typescript-eslint/scope-manager" "8.13.0" + "@typescript-eslint/types" "8.13.0" + "@typescript-eslint/typescript-estree" "8.13.0" + +"@typescript-eslint/visitor-keys@8.13.0": + version "8.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-8.13.0.tgz#e97b0d92b266ef38a1faf40a74da289b66683a5b" + integrity sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw== + dependencies: + "@typescript-eslint/types" "8.13.0" + eslint-visitor-keys "^3.4.3" "@webassemblyjs/ast@1.13.1", "@webassemblyjs/ast@^1.12.1": version "1.13.1" @@ -1904,7 +1948,7 @@ acorn@^8.14.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.14.0.tgz#063e2c70cac5fb4f6467f0b11152e04c682795b0" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== -acorn@^8.8.0, acorn@^8.8.2: +acorn@^8.8.2: version "8.8.2" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== @@ -1928,7 +1972,7 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -2026,11 +2070,6 @@ array-differ@^1.0.0: resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" integrity sha512-LeZY+DZDRnvP7eMuQ6LHfCzUGxAAIViUBliK24P3hWXL6y4SortgR6Nim6xrkfSLlmH0+k+9NYNwVC2s53ZrYQ== -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - array-uniq@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -2198,6 +2237,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2567,20 +2613,6 @@ diff-sequences@^29.6.3: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-29.6.3.tgz#4deaf894d11407c51efc8418012f9e70b84ea921" integrity sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q== -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - dot-prop@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-6.0.1.tgz#fc26b3cf142b9e59b74dbd39ed66ce620c681083" @@ -2678,21 +2710,27 @@ escape-string-regexp@^4.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-plugin-jest@^27.2.1: - version "27.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.2.1.tgz#b85b4adf41c682ea29f1f01c8b11ccc39b5c672c" - integrity sha512-l067Uxx7ZT8cO9NJuf+eJHvt6bqJyz2Z29wykyEdz/OtmcELQl2MQGQLX8J94O1cSJWAwUSEvCjwjA7KEK3Hmg== +eslint-config-prettier@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== + +eslint-plugin-jest@^28.9.0: + version "28.9.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-28.9.0.tgz#19168dfaed124339cd2252c4c4d1ac3688aeb243" + integrity sha512-rLu1s1Wf96TgUUxSw6loVIkNtUjq1Re7A9QdCCHSohnvXEBAjuL420h0T/fMmkQlNsQP2GhQzEUpYHPfxBkvYQ== dependencies: - "@typescript-eslint/utils" "^5.10.0" + "@typescript-eslint/utils" "^6.0.0 || ^7.0.0 || ^8.0.0" -eslint-plugin-prettier@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" - integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== +eslint-plugin-prettier@^5.2.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz#d1c8f972d8f60e414c25465c163d16f209411f95" + integrity sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw== dependencies: prettier-linter-helpers "^1.0.0" + synckit "^0.9.1" -eslint-scope@5.1.1, eslint-scope@^5.1.1: +eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -2700,94 +2738,88 @@ eslint-scope@5.1.1, eslint-scope@^5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== +eslint-scope@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.2.0.tgz#377aa6f1cb5dc7592cfd0b7f892fd0cf352ce442" + integrity sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: +eslint-visitor-keys@^3.3.0: version "3.4.1" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -eslint@^8.36.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.42.0.tgz#7bebdc3a55f9ed7167251fe7259f75219cade291" - integrity sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A== +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-visitor-keys@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz#687bacb2af884fcdda8a6e7d65c606f46a14cd45" + integrity sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw== + +eslint@^9.14.0: + version "9.14.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-9.14.0.tgz#534180a97c00af08bcf2b60b0ebf0c4d6c1b2c95" + integrity sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g== dependencies: "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.0.3" - "@eslint/js" "8.42.0" - "@humanwhocodes/config-array" "^0.11.10" + "@eslint-community/regexpp" "^4.12.1" + "@eslint/config-array" "^0.18.0" + "@eslint/core" "^0.7.0" + "@eslint/eslintrc" "^3.1.0" + "@eslint/js" "9.14.0" + "@eslint/plugin-kit" "^0.2.0" + "@humanfs/node" "^0.16.6" "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + "@humanwhocodes/retry" "^0.4.0" + "@types/estree" "^1.0.6" + "@types/json-schema" "^7.0.15" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" - doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.1" - espree "^9.5.2" - esquery "^1.4.2" + eslint-scope "^8.2.0" + eslint-visitor-keys "^4.2.0" + espree "^10.3.0" + esquery "^1.5.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" + file-entry-cache "^8.0.0" find-up "^5.0.0" glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" + optionator "^0.9.3" text-table "^0.2.0" -espree@^9.5.2: - version "9.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" - integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== +espree@^10.0.1, espree@^10.3.0: + version "10.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-10.3.0.tgz#29267cf5b0cb98735b65e64ba07e0ed49d1eed8a" + integrity sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg== dependencies: - acorn "^8.8.0" + acorn "^8.14.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" + eslint-visitor-keys "^4.2.0" esprima@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== +esquery@^1.5.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.6.0.tgz#91419234f804d852a82dceec3e16cdc22cf9dae7" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -2884,10 +2916,10 @@ fast-diff@^1.1.2: resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== -fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== +fast-glob@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" + integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -2924,12 +2956,12 @@ fb-watchman@^2.0.0: dependencies: bser "2.1.1" -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== +file-entry-cache@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-8.0.0.tgz#7787bddcf1131bffb92636c69457bbc0edd6d81f" + integrity sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ== dependencies: - flat-cache "^3.0.4" + flat-cache "^4.0.0" fill-range@^7.0.1: version "7.0.1" @@ -2970,18 +3002,18 @@ find-up@^6.3.0: locate-path "^7.1.0" path-exists "^5.0.0" -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== +flat-cache@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-4.0.1.tgz#0ece39fcb14ee012f4b0410bd33dd9c1f011127c" + integrity sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw== dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" + flatted "^3.2.9" + keyv "^4.5.4" -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flatted@^3.2.9: + version "3.3.1" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.3.1.tgz#21db470729a6734d4997002f439cb308987f567a" + integrity sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw== forever-agent@~0.6.1: version "0.6.1" @@ -3075,24 +3107,15 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" +globals@^14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e" + integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ== -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" +globals@^15.12.0: + version "15.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.12.0.tgz#1811872883ad8f41055b61457a130221297de5b5" + integrity sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ== glogg@^1.0.0: version "1.0.2" @@ -3111,11 +3134,6 @@ graceful-fs@^4.1.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - gulp-css-base64@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/gulp-css-base64/-/gulp-css-base64-1.3.4.tgz#afca45e83401045f472c67b776d1b1514e11489f" @@ -3233,7 +3251,7 @@ ignore@^5.2.0: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -3316,11 +3334,6 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -3877,6 +3890,11 @@ jsesc@~0.5.0: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" @@ -3922,6 +3940,13 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +keyv@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -4136,13 +4161,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-dir@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" @@ -4188,7 +4206,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0, merge2@^1.4.1: +merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -4223,13 +4241,20 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: +minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.4: + version "9.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" + integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== + dependencies: + brace-expansion "^2.0.1" + minimist@^1.1.0, minimist@^1.2.5: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" @@ -4318,17 +4343,17 @@ onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.4.tgz#7ea1c1a5d91d764fb282139c88fe11e182a3a734" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" + word-wrap "^1.2.5" p-limit@^2.2.0: version "2.3.0" @@ -4485,10 +4510,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.8.6: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105" + integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew== pretty-format@^29.7.0: version "29.7.0" @@ -4742,13 +4767,6 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" @@ -4809,14 +4827,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.7: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -semver@^7.5.3, semver@^7.5.4: +semver@^7.5.3, semver@^7.5.4, semver@^7.6.0: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -5004,6 +5015,14 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== +synckit@^0.9.1: + version "0.9.2" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.9.2.tgz#a3a935eca7922d48b9e7d6c61822ee6c3ae4ec62" + integrity sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw== + dependencies: + "@pkgr/core" "^0.1.0" + tslib "^2.6.2" + taffydb@2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" @@ -5092,6 +5111,11 @@ tough-cookie@~2.5.0: psl "^1.1.28" punycode "^2.1.1" +ts-api-utils@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.4.0.tgz#709c6f2076e511a81557f3d07a0cbd566ae8195c" + integrity sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ== + tsd-jsdoc@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tsd-jsdoc/-/tsd-jsdoc-2.5.0.tgz#0677aa952e1a8e3ebbb5bcf7d6e2f0301d71e151" @@ -5099,17 +5123,10 @@ tsd-jsdoc@^2.5.0: dependencies: typescript "^3.2.1" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" +tslib@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" + integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== tunnel-agent@^0.6.0: version "0.6.0" @@ -5135,11 +5152,6 @@ type-detect@4.0.8: resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - type-fest@^0.21.3: version "0.21.3" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" @@ -5331,10 +5343,10 @@ wildcard@^2.0.0: resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67" integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== +word-wrap@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== wrap-ansi@^7.0.0: version "7.0.0" @@ -5378,11 +5390,6 @@ yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yaml@^1.10.0: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"