Skip to content

Commit 8c180e6

Browse files
committed
feat(jest): read tsconfig for default jest transform options
1 parent f34801d commit 8c180e6

25 files changed

+2165
-2464
lines changed

.github/workflows/CI.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
1616

17-
name: stable - ${{ matrix.os }} - node@14
17+
name: stable - ${{ matrix.os }} - node@16
1818
runs-on: ${{ matrix.os }}
1919

2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v3
2222

2323
- name: Setup node
24-
uses: actions/setup-node@v1
24+
uses: actions/setup-node@v3
2525
with:
2626
node-version: 16
2727

2828
- name: Cache NPM dependencies
2929
uses: actions/cache@v2
3030
with:
3131
path: ~/.pnpm-store
32-
key: npm-cache-${{ matrix.os }}-node@14-${{ hashFiles('pnpm-lock.yaml') }}
32+
key: npm-cache-${{ matrix.os }}-node@16
3333

3434
- name: 'Install dependencies'
3535
run: |
@@ -52,10 +52,10 @@ jobs:
5252
- test
5353

5454
steps:
55-
- uses: actions/checkout@v2
55+
- uses: actions/checkout@v3
5656

5757
- name: Setup node
58-
uses: actions/setup-node@v1
58+
uses: actions/setup-node@v3
5959
with:
6060
node-version: 16
6161

@@ -73,7 +73,7 @@ jobs:
7373
- name: Build TypeScript
7474
run: |
7575
pnpm build
76-
rm ./packages/*/lib/tsconfig.project.tsbuildinfo
76+
rm ./packages/**/tsconfig.project.tsbuildinfo
7777
7878
- name: Lerna publish
7979
run: |

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
**_Fast `TypeScript/JavaScript` transformer without `node-gyp` and postinstall script_**.
66

77
<p>
8-
<a href="https://github.com/Brooooooklyn/swc-node/actions"><img src="https://github.com/Brooooooklyn/swc-node/workflows/CI/badge.svg" alt="Build Status" /></a>
8+
<a href="https://github.com/swc-project/swc-node/actions"><img src="https://github.com/swc-project/swc-node/workflows/CI/badge.svg" alt="Build Status" /></a>
99
<a href="https://npmcharts.com/compare/@swc-node/core?minimal=true"><img src="https://img.shields.io/npm/dm/@swc-node/core.svg?sanitize=true" alt="Downloads" /></a>
10-
<a href="https://github.com/Brooooooklyn/swc-node/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@swc-node/core.svg?sanitize=true" alt="License" /></a>
10+
<a href="https://github.com/swc-project/swc-node/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/@swc-node/core.svg?sanitize=true" alt="License" /></a>
1111
</p>
1212

1313
## Usage

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
preset: '@swc-node/jest',
33
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
4-
testMatch: ['<rootDir>/packages/integrate/jest/**/*.test.ts'],
4+
testMatch: ['<rootDir>/packages/integrate/jest/**/*.test.ts', '<rootDir>/packages/integrate/jest/**/*.test.tsx'],
55
testPathIgnorePatterns: ['<rootDir>/packages/jest'],
66
}

package.json

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,53 +19,53 @@
1919
],
2020
"private": true,
2121
"workspaces": ["packages/*"],
22-
"repository": "[email protected]:Brooooooklyn/swc-register.git",
23-
"author": "LongYinan <[email protected]>",
22+
"repository": "[email protected]:swc/swc-node.git",
23+
"author": "LongYinan <[email protected]>",
2424
"license": "MIT",
2525
"scripts": {
2626
"bench": "node -r @swc-node/register ./bench/index.ts",
2727
"build": "tsc -b tsconfig.project.json",
28-
"format": "prettier --config ./package.json . -w",
28+
"format": "prettier . -w",
2929
"lint": "eslint -c ./.eslintrc.yml \"packages/**/*.{js,ts,tsx}\"",
3030
"test": "ava",
3131
"test:jest": "jest --config jest.config.js",
3232
"version": "pnpm install && git add .",
3333
"postinstall": "husky install"
3434
},
3535
"devDependencies": {
36-
"@babel/core": "^7.16.10",
36+
"@babel/core": "^7.17.9",
3737
"@babel/plugin-transform-typescript": "^7.16.8",
38-
"@babel/preset-env": "^7.16.10",
38+
"@babel/preset-env": "^7.16.11",
3939
"@babel/preset-typescript": "^7.16.7",
4040
"@swc-node/core": "workspace:*",
4141
"@swc-node/jest": "workspace:*",
4242
"@swc-node/register": "workspace:*",
43-
"@types/babel__core": "^7.1.18",
43+
"@types/babel__core": "^7.1.19",
4444
"@types/benchmark": "^2.1.1",
45-
"@types/lodash": "^4.14.178",
46-
"@types/node": "^17.0.10",
47-
"@types/sinon": "^10.0.8",
48-
"@typescript-eslint/eslint-plugin": "^5.10.0",
49-
"@typescript-eslint/parser": "^5.10.0",
50-
"ava": "^4.0.1",
45+
"@types/lodash": "^4.14.182",
46+
"@types/node": "^17.0.29",
47+
"@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",
5151
"benchmark": "^2.1.4",
5252
"colorette": "^2.0.16",
53-
"esbuild": "^0.14.11",
54-
"eslint": "^8.7.0",
55-
"eslint-config-prettier": "^8.3.0",
56-
"eslint-plugin-import": "^2.25.4",
53+
"esbuild": "^0.14.38",
54+
"eslint": "^8.14.0",
55+
"eslint-config-prettier": "^8.5.0",
56+
"eslint-plugin-import": "^2.26.0",
5757
"eslint-plugin-prettier": "^4.0.0",
5858
"husky": "^7.0.4",
59-
"jest": "^27.4.7",
59+
"jest": "^28.0.2",
6060
"lerna": "^4.0.0",
61-
"lint-staged": "^12.2.1",
61+
"lint-staged": "^12.4.1",
6262
"lodash": "^4.17.21",
63-
"prettier": "^2.5.1",
64-
"react": "^17.0.2",
65-
"rxjs": "^7.5.2",
66-
"sinon": "^12.0.1",
67-
"tslib": "^2.3.1",
68-
"typescript": "^4.5.4"
63+
"prettier": "^2.6.2",
64+
"react": "^18.1.0",
65+
"rxjs": "^7.5.5",
66+
"sinon": "^13.0.2",
67+
"tslib": "^2.4.0",
68+
"typescript": "^4.6.3"
6969
},
7070
"lint-staged": {
7171
"*.@(js|ts|tsx)": ["prettier --write"],
@@ -78,8 +78,7 @@
7878
"semi": false,
7979
"trailingComma": "all",
8080
"singleQuote": true,
81-
"arrowParens": "always",
82-
"parser": "typescript"
81+
"arrowParens": "always"
8382
},
8483
"ava": {
8584
"extensions": ["ts", "tsx"],

0 commit comments

Comments
 (0)