Skip to content

Commit 97f4695

Browse files
committed
chore(*): upgrade dependencies
1 parent d4274f7 commit 97f4695

File tree

16 files changed

+3157
-2393
lines changed

16 files changed

+3157
-2393
lines changed

.eslintrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ rules:
4040

4141
'import/first': 2
4242
'import/newline-after-import': 2
43+
'import/no-extraneous-dependencies': 2
4344
'import/order':
4445
[
4546
2,

.github/workflows/CI.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ jobs:
2626
node-version: 16
2727

2828
- name: Cache NPM dependencies
29-
uses: actions/cache@v2
29+
uses: actions/cache@v3
3030
with:
3131
path: ~/.pnpm-store
3232
key: npm-cache-${{ matrix.os }}-node@16
3333

3434
- name: 'Install dependencies'
3535
run: |
36-
npm install -g pnpm
36+
npm install -g corepack
37+
corepack enable
3738
pnpm install
3839
3940
- name: Build TypeScript
@@ -60,7 +61,7 @@ jobs:
6061
node-version: 16
6162

6263
- name: Cache NPM dependencies
63-
uses: actions/cache@v2
64+
uses: actions/cache@v3
6465
with:
6566
path: ~/.pnpm-store
6667
key: npm-cache-${{ matrix.os }}-node@14-${{ hashFiles('pnpm-lock.yaml') }}

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
pnpm lint-staged

.npmrc

-107 Bytes
Binary file not shown.

package.json

+21-20
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@
3333
"postinstall": "husky install"
3434
},
3535
"devDependencies": {
36-
"@babel/core": "^7.17.9",
37-
"@babel/plugin-transform-typescript": "^7.16.8",
38-
"@babel/preset-env": "^7.16.11",
39-
"@babel/preset-typescript": "^7.16.7",
36+
"@babel/core": "^7.18.5",
37+
"@babel/plugin-transform-typescript": "^7.18.4",
38+
"@babel/preset-env": "^7.18.2",
39+
"@babel/preset-typescript": "^7.17.12",
4040
"@swc-node/core": "workspace:*",
4141
"@swc-node/jest": "workspace:*",
4242
"@swc-node/register": "workspace:*",
4343
"@types/babel__core": "^7.1.19",
4444
"@types/benchmark": "^2.1.1",
4545
"@types/lodash": "^4.14.182",
46-
"@types/node": "^17.0.29",
46+
"@types/node": "^17.0.43",
4747
"@types/sinon": "^10.0.11",
48-
"@typescript-eslint/eslint-plugin": "^5.21.0",
49-
"@typescript-eslint/parser": "^5.21.0",
50-
"ava": "^4.2.0",
48+
"@typescript-eslint/eslint-plugin": "^5.28.0",
49+
"@typescript-eslint/parser": "^5.28.0",
50+
"ava": "^4.3.0",
5151
"benchmark": "^2.1.4",
52-
"colorette": "^2.0.16",
53-
"esbuild": "^0.14.38",
54-
"eslint": "^8.14.0",
52+
"colorette": "^2.0.19",
53+
"esbuild": "^0.14.43",
54+
"eslint": "^8.17.0",
5555
"eslint-config-prettier": "^8.5.0",
5656
"eslint-plugin-import": "^2.26.0",
5757
"eslint-plugin-prettier": "^4.0.0",
58-
"husky": "^7.0.4",
59-
"jest": "^28.0.2",
60-
"lerna": "^4.0.0",
61-
"lint-staged": "^12.4.1",
58+
"husky": "^8.0.1",
59+
"jest": "^28.1.1",
60+
"lerna": "^5.1.2",
61+
"lint-staged": "^13.0.1",
6262
"lodash": "^4.17.21",
63-
"prettier": "^2.6.2",
64-
"react": "^18.1.0",
63+
"prettier": "^2.7.0",
64+
"react": "^18.2.0",
6565
"rxjs": "^7.5.5",
66-
"sinon": "^13.0.2",
66+
"sinon": "^14.0.0",
6767
"tslib": "^2.4.0",
68-
"typescript": "^4.6.3"
68+
"typescript": "^4.8.3"
6969
},
7070
"lint-staged": {
7171
"*.@(js|ts|tsx)": ["prettier --write"],
@@ -87,5 +87,6 @@
8787
"environmentVariables": {
8888
"SWC_NODE_PROJECT": "./tsconfig.test.json"
8989
}
90-
}
90+
},
91+
"packageManager": "[email protected]"
9192
}

packages/integrate/__tests__/react-pragma/__snapshots__/react-pragma.spec.ts.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,19 @@ Generated by [AVA](https://avajs.dev).
99
> Snapshot 1
1010
1111
`"use strict";␊
12-
const Button = ({ text })=>/*#__PURE__*/ h("div", null, text)␊
13-
;␊
12+
const Button = ({ text })=>/*#__PURE__*/ h("div", null, text);␊
1413
`
1514

1615
## should transform jsx into new jsx runtime
1716

1817
> Snapshot 1
1918
2019
`"use strict";␊
21-
var _jsxRuntime = require("react/jsx-runtime");␊
22-
const Button = ({ text })=>/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {␊
20+
Object.defineProperty(exports, "__esModule", {␊
21+
value: true␊
22+
});␊
23+
const _jsxRuntime = require("react/jsx-runtime");␊
24+
const Button = ({ text })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)("div", {␊
2325
children: text␊
24-
})␊
25-
;␊
26+
});␊
2627
`
Binary file not shown.

packages/integrate/package.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
"url": "https://github.com/swc-project/swc-node/issues"
1616
},
1717
"devDependencies": {
18-
"@swc-node/core": "^1.8.2",
19-
"@types/jest": "^27.4.1",
20-
"@types/react": "^18.0.8",
21-
"@types/react-dom": "^18.0.0",
22-
"jest": "^28.0.2",
23-
"react": "^18.1.0",
24-
"react-dom": "^18.1.0"
18+
"@swc-node/core": "^1.9.0",
19+
"@types/jest": "^29.0.3",
20+
"@types/react": "^18.0.20",
21+
"@types/react-dom": "^18.0.6",
22+
"jest": "^29.0.3",
23+
"react": "^18.2.0",
24+
"react-dom": "^18.2.0",
25+
"sinon": "^14.0.0"
2526
}
2627
}

packages/jest/__test__/hoist-top-level.spec.ts.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Generated by [AVA](https://avajs.dev).
1212
jest.enableAutomock();␊
1313
jest.disableAutomock();␊
1414
jest.mock('./foo');␊
15-
jest.mock('./foo/bar', ()=>'bar'␊
16-
);␊
15+
jest.mock('./foo/bar', ()=>'bar');␊
1716
jest.deepUnmock('./foo');␊
1817
const foo = 'foo';␊
1918
console.log(foo);␊
@@ -22,8 +21,7 @@ Generated by [AVA](https://avajs.dev).
2221
const func = ()=>{␊
2322
jest.unmock('./foo');␊
2423
jest.mock('./bar');␊
25-
jest.mock('./bar/foo', ()=>'foo'␊
26-
);␊
24+
jest.mock('./bar/foo', ()=>'foo');␊
2725
jest.unmock('./foo/bar');␊
2826
jest.deepUnmock('./bar');␊
2927
const bar = 'bar';␊
@@ -34,8 +32,7 @@ Generated by [AVA](https://avajs.dev).
3432
const func2 = ()=>{␊
3533
jest.mock('./bar');␊
3634
jest.unmock('./foo/bar');␊
37-
jest.mock('./bar/foo', ()=>'foo'␊
38-
);␊
35+
jest.mock('./bar/foo', ()=>'foo');␊
3936
jest.unmock('./foo');␊
4037
jest.deepUnmock('./bar');␊
4138
const bar = 'bar';␊
Binary file not shown.

packages/jest/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
"access": "public"
1414
},
1515
"dependencies": {
16-
"@node-rs/xxhash": "^1.2.0",
16+
"@node-rs/xxhash": "^1.2.1",
1717
"@swc-node/core": "^1.9.0",
1818
"@swc-node/register": "^1.5.1"
1919
},
20-
"devDependencies": {
21-
"@swc/core": "^1.2.172"
20+
"peerDependencies": {
21+
"@swc/core": ">= 1.3"
2222
},
2323
"repository": {
2424
"type": "git",

packages/loader/package.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"@swc-node/core": "^1.9.0",
2828
"@swc-node/register": "^1.5.1"
2929
},
30+
"peerDependencies": {
31+
"typescript": ">= 4.3",
32+
"webpack": ">= 5.0.0"
33+
},
3034
"repository": {
3135
"type": "git",
3236
"url": "git+https://github.com/swc-project/swc-node.git"
@@ -39,6 +43,7 @@
3943
"url": "https://github.com/sponsors/Brooooooklyn"
4044
},
4145
"devDependencies": {
42-
"webpack": "^5.72.0"
46+
"webpack": "^5.74.0",
47+
"typescript": "^4.8.3"
4348
}
4449
}

packages/register/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"dependencies": {
3636
"@swc-node/core": "^1.9.0",
3737
"@swc-node/sourcemap-support": "^0.2.0",
38-
"colorette": "^2.0.16",
38+
"colorette": "^2.0.19",
3939
"debug": "^4.3.4",
4040
"pirates": "^4.0.5",
4141
"tslib": "^2.4.0"
@@ -44,9 +44,10 @@
4444
"typescript": ">= 4.3"
4545
},
4646
"devDependencies": {
47-
"@swc/core": "^1.2.172",
47+
"@swc/core": "^1.3.2",
4848
"@types/debug": "^4.1.7",
49-
"typescript": "^4.6.3"
49+
"lodash": "^4.17.21",
50+
"sinon": "^14.0.0"
5051
},
5152
"funding": {
5253
"type": "github",

packages/register/read-default-tsconfig.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function toModule(moduleKind: ts.ModuleKind) {
8787
case ts.ModuleKind.ES2020:
8888
case ts.ModuleKind.ES2022:
8989
case ts.ModuleKind.ESNext:
90-
case ts.ModuleKind.Node12:
90+
case ts.ModuleKind.Node16:
9191
case ts.ModuleKind.NodeNext:
9292
case ts.ModuleKind.None:
9393
return 'es6'
@@ -129,7 +129,7 @@ export function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filena
129129
paths: Object.fromEntries(
130130
Object.entries(options.paths ?? {}).map(([aliasKey, aliasPaths]) => [
131131
aliasKey,
132-
(aliasPaths as string[] ?? []).map((path) => resolve(options.baseUrl ?? './', path)),
132+
((aliasPaths as string[]) ?? []).map((path) => resolve(options.baseUrl ?? './', path)),
133133
]),
134134
) as Options['paths'],
135135
}

packages/sourcemap-support/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"url": "https://github.com/swc-project/swc-node/issues"
2525
},
2626
"devDependencies": {
27-
"@types/source-map-support": "^0.5.4"
27+
"@types/source-map-support": "^0.5.6"
2828
}
2929
}

0 commit comments

Comments
 (0)