Skip to content

Commit

Permalink
chore(*): upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Sep 22, 2022
1 parent 821542b commit 628451a
Show file tree
Hide file tree
Showing 16 changed files with 3,157 additions and 2,393 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ rules:

'import/first': 2
'import/newline-after-import': 2
'import/no-extraneous-dependencies': 2
'import/order':
[
2,
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ jobs:
node-version: 16

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

- name: 'Install dependencies'
run: |
npm install -g pnpm
npm install -g corepack
corepack enable
pnpm install
- name: Build TypeScript
Expand All @@ -60,7 +61,7 @@ jobs:
node-version: 16

- name: Cache NPM dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: npm-cache-${{ matrix.os }}-node@14-${{ hashFiles('pnpm-lock.yaml') }}
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
pnpm lint-staged
Binary file modified .npmrc
Binary file not shown.
41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@
"postinstall": "husky install"
},
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@babel/core": "^7.18.5",
"@babel/plugin-transform-typescript": "^7.18.4",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@swc-node/core": "workspace:*",
"@swc-node/jest": "workspace:*",
"@swc-node/register": "workspace:*",
"@types/babel__core": "^7.1.19",
"@types/benchmark": "^2.1.1",
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.29",
"@types/node": "^17.0.43",
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"ava": "^4.2.0",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"ava": "^4.3.0",
"benchmark": "^2.1.4",
"colorette": "^2.0.16",
"esbuild": "^0.14.38",
"eslint": "^8.14.0",
"colorette": "^2.0.19",
"esbuild": "^0.14.43",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"jest": "^28.0.2",
"lerna": "^4.0.0",
"lint-staged": "^12.4.1",
"husky": "^8.0.1",
"jest": "^28.1.1",
"lerna": "^5.1.2",
"lint-staged": "^13.0.1",
"lodash": "^4.17.21",
"prettier": "^2.6.2",
"react": "^18.1.0",
"prettier": "^2.7.0",
"react": "^18.2.0",
"rxjs": "^7.5.5",
"sinon": "^13.0.2",
"sinon": "^14.0.0",
"tslib": "^2.4.0",
"typescript": "^4.6.3"
"typescript": "^4.8.3"
},
"lint-staged": {
"*.@(js|ts|tsx)": ["prettier --write"],
Expand All @@ -87,5 +87,6 @@
"environmentVariables": {
"SWC_NODE_PROJECT": "./tsconfig.test.json"
}
}
},
"packageManager": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ Generated by [AVA](https://avajs.dev).
> Snapshot 1
`"use strict";␊
const Button = ({ text })=>/*#__PURE__*/ h("div", null, text)␊
;␊
const Button = ({ text })=>/*#__PURE__*/ h("div", null, text);␊
`

## should transform jsx into new jsx runtime

> Snapshot 1
`"use strict";␊
var _jsxRuntime = require("react/jsx-runtime");␊
const Button = ({ text })=>/*#__PURE__*/ (0, _jsxRuntime).jsx("div", {␊
Object.defineProperty(exports, "__esModule", {␊
value: true␊
});␊
const _jsxRuntime = require("react/jsx-runtime");␊
const Button = ({ text })=>/*#__PURE__*/ (0, _jsxRuntime.jsx)("div", {␊
children: text␊
})␊
;␊
});␊
`
Binary file not shown.
15 changes: 8 additions & 7 deletions packages/integrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"url": "https://github.com/swc-project/swc-node/issues"
},
"devDependencies": {
"@swc-node/core": "^1.8.2",
"@types/jest": "^27.4.1",
"@types/react": "^18.0.8",
"@types/react-dom": "^18.0.0",
"jest": "^28.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0"
"@swc-node/core": "^1.9.0",
"@types/jest": "^29.0.3",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.6",
"jest": "^29.0.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sinon": "^14.0.0"
}
}
9 changes: 3 additions & 6 deletions packages/jest/__test__/hoist-top-level.spec.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ Generated by [AVA](https://avajs.dev).
jest.enableAutomock();␊
jest.disableAutomock();␊
jest.mock('./foo');␊
jest.mock('./foo/bar', ()=>'bar'␊
);␊
jest.mock('./foo/bar', ()=>'bar');␊
jest.deepUnmock('./foo');␊
const foo = 'foo';␊
console.log(foo);␊
Expand All @@ -22,8 +21,7 @@ Generated by [AVA](https://avajs.dev).
const func = ()=>{␊
jest.unmock('./foo');␊
jest.mock('./bar');␊
jest.mock('./bar/foo', ()=>'foo'␊
);␊
jest.mock('./bar/foo', ()=>'foo');␊
jest.unmock('./foo/bar');␊
jest.deepUnmock('./bar');␊
const bar = 'bar';␊
Expand All @@ -34,8 +32,7 @@ Generated by [AVA](https://avajs.dev).
const func2 = ()=>{␊
jest.mock('./bar');␊
jest.unmock('./foo/bar');␊
jest.mock('./bar/foo', ()=>'foo'␊
);␊
jest.mock('./bar/foo', ()=>'foo');␊
jest.unmock('./foo');␊
jest.deepUnmock('./bar');␊
const bar = 'bar';␊
Expand Down
Binary file modified packages/jest/__test__/hoist-top-level.spec.ts.snap
Binary file not shown.
6 changes: 3 additions & 3 deletions packages/jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"access": "public"
},
"dependencies": {
"@node-rs/xxhash": "^1.2.0",
"@node-rs/xxhash": "^1.2.1",
"@swc-node/core": "^1.9.0",
"@swc-node/register": "^1.5.1"
},
"devDependencies": {
"@swc/core": "^1.2.172"
"peerDependencies": {
"@swc/core": ">= 1.3"
},
"repository": {
"type": "git",
Expand Down
7 changes: 6 additions & 1 deletion packages/loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
"@swc-node/core": "^1.9.0",
"@swc-node/register": "^1.5.1"
},
"peerDependencies": {
"typescript": ">= 4.3",
"webpack": ">= 5.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/swc-project/swc-node.git"
Expand All @@ -39,6 +43,7 @@
"url": "https://github.com/sponsors/Brooooooklyn"
},
"devDependencies": {
"webpack": "^5.72.0"
"webpack": "^5.74.0",
"typescript": "^4.8.3"
}
}
7 changes: 4 additions & 3 deletions packages/register/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dependencies": {
"@swc-node/core": "^1.9.0",
"@swc-node/sourcemap-support": "^0.2.0",
"colorette": "^2.0.16",
"colorette": "^2.0.19",
"debug": "^4.3.4",
"pirates": "^4.0.5",
"tslib": "^2.4.0"
Expand All @@ -44,9 +44,10 @@
"typescript": ">= 4.3"
},
"devDependencies": {
"@swc/core": "^1.2.172",
"@swc/core": "^1.3.2",
"@types/debug": "^4.1.7",
"typescript": "^4.6.3"
"lodash": "^4.17.21",
"sinon": "^14.0.0"
},
"funding": {
"type": "github",
Expand Down
4 changes: 2 additions & 2 deletions packages/register/read-default-tsconfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function toModule(moduleKind: ts.ModuleKind) {
case ts.ModuleKind.ES2020:
case ts.ModuleKind.ES2022:
case ts.ModuleKind.ESNext:
case ts.ModuleKind.Node12:
case ts.ModuleKind.Node16:
case ts.ModuleKind.NodeNext:
case ts.ModuleKind.None:
return 'es6'
Expand Down Expand Up @@ -129,7 +129,7 @@ export function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filena
paths: Object.fromEntries(
Object.entries(options.paths ?? {}).map(([aliasKey, aliasPaths]) => [
aliasKey,
(aliasPaths as string[] ?? []).map((path) => resolve(options.baseUrl ?? './', path)),
((aliasPaths as string[]) ?? []).map((path) => resolve(options.baseUrl ?? './', path)),
]),
) as Options['paths'],
}
Expand Down
2 changes: 1 addition & 1 deletion packages/sourcemap-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"url": "https://github.com/swc-project/swc-node/issues"
},
"devDependencies": {
"@types/source-map-support": "^0.5.4"
"@types/source-map-support": "^0.5.6"
}
}
Loading

0 comments on commit 628451a

Please sign in to comment.