Skip to content

Commit

Permalink
feat(jest): read tsconfig for default jest transform options
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Apr 27, 2022
1 parent f34801d commit 8c180e6
Show file tree
Hide file tree
Showing 25 changed files with 2,165 additions and 2,464 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

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

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16

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

- name: 'Install dependencies'
run: |
Expand All @@ -52,10 +52,10 @@ jobs:
- test

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16

Expand All @@ -73,7 +73,7 @@ jobs:
- name: Build TypeScript
run: |
pnpm build
rm ./packages/*/lib/tsconfig.project.tsbuildinfo
rm ./packages/**/tsconfig.project.tsbuildinfo
- name: Lerna publish
run: |
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
**_Fast `TypeScript/JavaScript` transformer without `node-gyp` and postinstall script_**.

<p>
<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>
<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>
<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>
<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>
<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>
</p>

## Usage
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
preset: '@swc-node/jest',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
testMatch: ['<rootDir>/packages/integrate/jest/**/*.test.ts'],
testMatch: ['<rootDir>/packages/integrate/jest/**/*.test.ts', '<rootDir>/packages/integrate/jest/**/*.test.tsx'],
testPathIgnorePatterns: ['<rootDir>/packages/jest'],
}
51 changes: 25 additions & 26 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,53 +19,53 @@
],
"private": true,
"workspaces": ["packages/*"],
"repository": "[email protected]:Brooooooklyn/swc-register.git",
"author": "LongYinan <[email protected]>",
"repository": "[email protected]:swc/swc-node.git",
"author": "LongYinan <[email protected]>",
"license": "MIT",
"scripts": {
"bench": "node -r @swc-node/register ./bench/index.ts",
"build": "tsc -b tsconfig.project.json",
"format": "prettier --config ./package.json . -w",
"format": "prettier . -w",
"lint": "eslint -c ./.eslintrc.yml \"packages/**/*.{js,ts,tsx}\"",
"test": "ava",
"test:jest": "jest --config jest.config.js",
"version": "pnpm install && git add .",
"postinstall": "husky install"
},
"devDependencies": {
"@babel/core": "^7.16.10",
"@babel/core": "^7.17.9",
"@babel/plugin-transform-typescript": "^7.16.8",
"@babel/preset-env": "^7.16.10",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@swc-node/core": "workspace:*",
"@swc-node/jest": "workspace:*",
"@swc-node/register": "workspace:*",
"@types/babel__core": "^7.1.18",
"@types/babel__core": "^7.1.19",
"@types/benchmark": "^2.1.1",
"@types/lodash": "^4.14.178",
"@types/node": "^17.0.10",
"@types/sinon": "^10.0.8",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
"ava": "^4.0.1",
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.29",
"@types/sinon": "^10.0.11",
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"ava": "^4.2.0",
"benchmark": "^2.1.4",
"colorette": "^2.0.16",
"esbuild": "^0.14.11",
"eslint": "^8.7.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"esbuild": "^0.14.38",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"jest": "^27.4.7",
"jest": "^28.0.2",
"lerna": "^4.0.0",
"lint-staged": "^12.2.1",
"lint-staged": "^12.4.1",
"lodash": "^4.17.21",
"prettier": "^2.5.1",
"react": "^17.0.2",
"rxjs": "^7.5.2",
"sinon": "^12.0.1",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
"prettier": "^2.6.2",
"react": "^18.1.0",
"rxjs": "^7.5.5",
"sinon": "^13.0.2",
"tslib": "^2.4.0",
"typescript": "^4.6.3"
},
"lint-staged": {
"*.@(js|ts|tsx)": ["prettier --write"],
Expand All @@ -78,8 +78,7 @@
"semi": false,
"trailingComma": "all",
"singleQuote": true,
"arrowParens": "always",
"parser": "typescript"
"arrowParens": "always"
},
"ava": {
"extensions": ["ts", "tsx"],
Expand Down
Loading

0 comments on commit 8c180e6

Please sign in to comment.