diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57b48322c..0867e1c0a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,14 +11,14 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: '20' - name: cache package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} @@ -34,7 +34,7 @@ jobs: cp package-lock.json package-temp-dir - name: cache node_modules id: node_modules_cache_id - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -47,16 +47,16 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -66,20 +66,43 @@ jobs: needs: setup + tsc: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + + - name: restore cache from package-lock.json + uses: actions/cache@v4 + with: + path: package-temp-dir + key: lock-${{ github.sha }} + + - name: restore cache from node_modules + uses: actions/cache@v4 + with: + path: node_modules + key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} + + - name: tsc + run: npm run tsc + + needs: setup + compile: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} @@ -93,16 +116,16 @@ jobs: runs-on: ubuntu-latest steps: - name: checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: restore cache from package-lock.json - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: package-temp-dir key: lock-${{ github.sha }} - name: restore cache from node_modules - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: node_modules key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} diff --git a/docs/examples/shadow.tsx b/docs/examples/shadow.tsx index 1014cf3fb..29913ef94 100644 --- a/docs/examples/shadow.tsx +++ b/docs/examples/shadow.tsx @@ -16,7 +16,7 @@ interface DataType { gender: string; } -const columns: TableProps['columns'] = [ +const columns: ColumnsType = [ { title: 'Other', fixed: 'left', @@ -29,7 +29,6 @@ const columns: TableProps['columns'] = [ width: 150, fixed: 'left', ellipsis: true, - sorter: (a, b) => a.age - b.age, }, { title: 'Address', @@ -72,17 +71,6 @@ const columns: TableProps['columns'] = [ dataIndex: 'name', key: 'name', width: 100, - filters: [ - { - text: 'Joe', - value: 'Joe', - }, - { - text: 'John', - value: 'John', - }, - ], - onFilter: (value: string, record) => record.name.indexOf(value) === 0, }, { title: 'Company', diff --git a/package.json b/package.json index 0acd32faf..528ca2e67 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "coverage": "vitest run --coverage", "prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish", "lint": "eslint src/ --ext .tsx,.ts", - "lint:tsc": "tsc -p tsconfig.json --noEmit", + "tsc": "tsc -p tsconfig.json --noEmit", "now-build": "npm run docs:build", "prepare": "husky install" }, @@ -108,8 +108,7 @@ }, "lint-staged": { "**/*.{js,jsx,tsx,ts,md,json}": [ - "prettier --write", - "git add" + "prettier --write" ] } }