Skip to content

Commit 7d8c5cc

Browse files
czoselcseufert
andauthored
chore: update dependencies (#1139)
* chore: update dependencies * chore: update dependencies This also includes major version bumps of prettier and eslint, which triggered some changes. * added typescript as dev dependency instead of installing globally * downgrade webpack to fix eslint-scopes type conflict * fix(ts): add @types/node See DefinitelyTyped/DefinitelyTyped#70562 (comment) --------- Co-authored-by: Chris Seufert <[email protected]>
1 parent 4d4bda2 commit 7d8c5cc

File tree

177 files changed

+2512
-2223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+2512
-2223
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 29 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest]
12-
node-version: [14.x, 16.x, 18.x, 20.x]
12+
node-version: [18.x, 20.x, 22.x]
1313

1414
steps:
1515
- uses: actions/checkout@v2
@@ -26,7 +26,6 @@ jobs:
2626
2727
- name: type check
2828
run: |
29-
npm i -g typescript
3029
yarn build-types
3130
[ $(git diff types.d.ts | wc -l) -gt 0 ] && echo 'Diff exists in types.d.ts. Please change jsdoc.' && exit 1
3231
tsc --noEmit types.d.ts

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarpm test

eslint.config.mjs

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import js from "@eslint/js";
2+
import jest from "eslint-plugin-jest";
3+
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
4+
import globals from "globals";
5+
6+
export default [
7+
{
8+
ignores: ["dist", "docs", "example", "tutorials"],
9+
},
10+
js.configs.recommended,
11+
{
12+
files: ["test/**"],
13+
...jest.configs["flat/recommended"],
14+
rules: {
15+
...jest.configs["flat/recommended"].rules,
16+
"no-console": "off",
17+
},
18+
languageOptions: {
19+
globals: jest.environments.globals.globals,
20+
},
21+
},
22+
{
23+
languageOptions: {
24+
globals: {
25+
...globals.browser,
26+
...globals.node,
27+
},
28+
sourceType: "commonjs",
29+
},
30+
31+
rules: {
32+
"prefer-const": "error",
33+
"no-var": "error",
34+
curly: ["error", "multi-line"],
35+
},
36+
},
37+
eslintPluginPrettierRecommended,
38+
];

package.json

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,15 @@
1414
"scripts": {
1515
"fix": "eslint . --fix",
1616
"test": "jest",
17-
"husky": "yarpm run test",
1817
"prepublishOnly": "yarpm run build",
1918
"prebuild": "yarpm run test",
2019
"build": "webpack --config webpack.config.js",
2120
"-postbuild": "yarpm run build-docs",
2221
"build-docs": "jsdoc -c .jsdoc.json",
2322
"build-types": "jsdoc -t node_modules/tsd-jsdoc/dist -r src -d . && prettier -w types.d.ts",
2423
"publish-docs": "git subtree push --prefix docs origin gh-pages",
25-
"benchmark": "node test/benchmark.js"
26-
},
27-
"husky": {
28-
"hooks": {
29-
"pre-commit": "yarpm run husky"
30-
}
24+
"benchmark": "node test/benchmark.js",
25+
"prepare": "husky"
3126
},
3227
"repository": {
3328
"type": "git",
@@ -62,24 +57,30 @@
6257
],
6358
"license": "BSD-3-Clause",
6459
"devDependencies": {
65-
"@babel/core": "^7.21.3",
66-
"@babel/preset-env": "^7.20.2",
67-
"babel-loader": "^9.1.2",
60+
"@babel/core": "^7.26.0",
61+
"@babel/preset-env": "^7.26.0",
62+
"@eslint/eslintrc": "^3.1.0",
63+
"@eslint/js": "^9.14.0",
64+
"@types/node": "^22.9.0",
65+
"babel-loader": "^9.2.1",
6866
"benchmark": "^2.1.4",
6967
"coveralls": "^3.0.3",
70-
"eslint": "^8.36.0",
71-
"eslint-plugin-jest": "^27.2.1",
72-
"eslint-plugin-prettier": "^4.2.1",
73-
"husky": "^8.0.3",
74-
"jest": "^29.5.0",
75-
"jest-runner-eslint": "^2.0.0",
68+
"eslint": "^9.14.0",
69+
"eslint-config-prettier": "^9.1.0",
70+
"eslint-plugin-jest": "^28.9.0",
71+
"eslint-plugin-prettier": "^5.2.1",
72+
"globals": "^15.12.0",
73+
"husky": "^9.1.6",
74+
"jest": "^29.7.0",
75+
"jest-runner-eslint": "^2.2.1",
7676
"jsdoc": "^3.6.11",
7777
"jsdoc-template": "^1.2.0",
7878
"lodash.template": ">=4.5.0",
79-
"prettier": "^2.8.6",
79+
"prettier": "^3.3.3",
8080
"tsd-jsdoc": "^2.5.0",
81-
"webpack": "^5.76.2",
82-
"webpack-cli": "^5.0.1",
81+
"typescript": "^5.6.3",
82+
"webpack": "5.96.0",
83+
"webpack-cli": "^5.1.4",
8384
"yarpm": "^1.2.0"
8485
},
8586
"dependencies": {}

src/ast.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ AST.prototype.swapLocations = function (target, first, last, parser) {
184184
if (this.withSource) {
185185
target.loc.source = parser.lexer._input.substring(
186186
target.loc.start.offset,
187-
target.loc.end.offset
187+
target.loc.end.offset,
188188
);
189189
}
190190
}
@@ -208,7 +208,7 @@ AST.prototype.resolveLocations = function (target, first, last, parser) {
208208
if (this.withSource) {
209209
target.loc.source = parser.lexer._input.substring(
210210
target.loc.start.offset,
211-
target.loc.end.offset
211+
target.loc.end.offset,
212212
);
213213
}
214214
}
@@ -376,7 +376,7 @@ AST.prototype.prepare = function (kind, docs, parser) {
376376
location = new Location(
377377
src,
378378
start,
379-
new Position(parser.prev[0], parser.prev[1], parser.prev[2])
379+
new Position(parser.prev[0], parser.prev[1], parser.prev[2]),
380380
);
381381
// last argument is always the location
382382
args.push(location);

src/ast/array.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ module.exports = Expr.extends(
4040
Expr.apply(this, [KIND, docs, location]);
4141
this.items = items;
4242
this.shortForm = shortForm;
43-
}
43+
},
4444
);

src/ast/arrowfunc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = Expression.extends(
3030
nullable,
3131
isStatic,
3232
docs,
33-
location
33+
location,
3434
) {
3535
Expression.apply(this, [KIND, docs, location]);
3636
this.arguments = args;
@@ -39,5 +39,5 @@ module.exports = Expression.extends(
3939
this.type = type;
4040
this.nullable = nullable;
4141
this.isStatic = isStatic || false;
42-
}
42+
},
4343
);

src/ast/assign.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ module.exports = Expression.extends(
2424
this.left = left;
2525
this.right = right;
2626
this.operator = operator;
27-
}
27+
},
2828
);

src/ast/assignref.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ module.exports = Expression.extends(
2323
Expression.apply(this, [KIND, docs, location]);
2424
this.left = left;
2525
this.right = right;
26-
}
26+
},
2727
);

src/ast/attribute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Node.extends(
2222
Node.apply(this, [KIND, docs, location]);
2323
this.name = name;
2424
this.args = args;
25-
}
25+
},
2626
);

src/ast/bin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ module.exports = Operation.extends(
2323
this.type = type;
2424
this.left = left;
2525
this.right = right;
26-
}
26+
},
2727
);

src/ast/block.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ module.exports = Statement.extends(
2020
function Block(kind, children, docs, location) {
2121
Statement.apply(this, [kind || KIND, docs, location]);
2222
this.children = children.filter(Boolean);
23-
}
23+
},
2424
);

src/ast/boolean.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ module.exports = Literal.extends(
1919
KIND,
2020
function Boolean(value, raw, docs, location) {
2121
Literal.apply(this, [KIND, value, raw, docs, location]);
22-
}
22+
},
2323
);

src/ast/call.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Expression.extends(
2222
Expression.apply(this, [KIND, docs, location]);
2323
this.what = what;
2424
this.arguments = args;
25-
}
25+
},
2626
);

src/ast/case.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Statement.extends(
2222
Statement.apply(this, [KIND, docs, location]);
2323
this.test = test;
2424
this.body = body;
25-
}
25+
},
2626
);

src/ast/cast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ module.exports = Operation.extends(
2424
this.type = type;
2525
this.raw = raw;
2626
this.expr = expr;
27-
}
27+
},
2828
);

src/ast/catch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ module.exports = Statement.extends(
2525
this.body = body;
2626
this.what = what;
2727
this.variable = variable;
28-
}
28+
},
2929
);

src/ast/class.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ module.exports = Declaration.extends(
3232
this.body = body;
3333
this.attrGroups = [];
3434
this.parseFlags(flags);
35-
}
35+
},
3636
);

src/ast/classconstant.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ const ClassConstant = ConstantStatement.extends(
3434
type,
3535
attrGroups,
3636
docs,
37-
location
37+
location,
3838
) {
3939
ConstantStatement.apply(this, [kind || KIND, constants, docs, location]);
4040
this.parseFlags(flags);
4141
this.nullable = nullable;
4242
this.type = type;
4343
this.attrGroups = attrGroups;
44-
}
44+
},
4545
);
4646

4747
/**

src/ast/closure.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = Expression.extends(
3232
nullable,
3333
isStatic,
3434
docs,
35-
location
35+
location,
3636
) {
3737
Expression.apply(this, [KIND, docs, location]);
3838
this.uses = uses;
@@ -43,5 +43,5 @@ module.exports = Expression.extends(
4343
this.isStatic = isStatic || false;
4444
this.body = null;
4545
this.attrGroups = [];
46-
}
46+
},
4747
);

src/ast/comment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ module.exports = Node.extends(
1919
function Comment(kind, value, docs, location) {
2020
Node.apply(this, [kind, docs, location]);
2121
this.value = value;
22-
}
22+
},
2323
);

src/ast/commentblock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ module.exports = Comment.extends(
1818
KIND,
1919
function CommentBlock(value, docs, location) {
2020
Comment.apply(this, [KIND, value, docs, location]);
21-
}
21+
},
2222
);

src/ast/commentline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ module.exports = Comment.extends(
1818
KIND,
1919
function CommentLine(value, docs, location) {
2020
Comment.apply(this, [KIND, value, docs, location]);
21-
}
21+
},
2222
);

src/ast/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Node.extends(
2222
Node.apply(this, [KIND, docs, location]);
2323
this.name = name;
2424
this.value = value;
25-
}
25+
},
2626
);

src/ast/constantstatement.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ module.exports = Statement.extends(
2020
function ConstantStatement(kind, constants, docs, location) {
2121
Statement.apply(this, [kind || KIND, docs, location]);
2222
this.constants = constants;
23-
}
23+
},
2424
);

src/ast/continue.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ module.exports = Statement.extends(
2020
function Continue(level, docs, location) {
2121
Statement.apply(this, [KIND, docs, location]);
2222
this.level = level;
23-
}
23+
},
2424
);

src/ast/declaration.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Declaration = Statement.extends(
2525
function Declaration(kind, name, docs, location) {
2626
Statement.apply(this, [kind || KIND, docs, location]);
2727
this.name = name;
28-
}
28+
},
2929
);
3030

3131
/**

src/ast/declare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const Declare = Block.extends(
2323
Block.apply(this, [KIND, body, docs, location]);
2424
this.directives = directives;
2525
this.mode = mode;
26-
}
26+
},
2727
);
2828

2929
/**

src/ast/declaredirective.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Node.extends(
2222
Node.apply(this, [KIND, docs, location]);
2323
this.key = key;
2424
this.value = value;
25-
}
25+
},
2626
);

src/ast/do.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Statement.extends(
2222
Statement.apply(this, [KIND, docs, location]);
2323
this.test = test;
2424
this.body = body;
25-
}
25+
},
2626
);

src/ast/echo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ module.exports = Statement.extends(
2222
Statement.apply(this, [KIND, docs, location]);
2323
this.shortForm = shortForm;
2424
this.expressions = expressions;
25-
}
25+
},
2626
);

0 commit comments

Comments
 (0)