From 0e08ea62edeb599a86eaa336e3ecdd12a1e60e09 Mon Sep 17 00:00:00 2001 From: Peach Date: Thu, 9 Feb 2023 09:27:36 +0800 Subject: [PATCH] build: upgrade father to 4.0 (#628) * build: upgrade father to 4.0 * ci: upgrade node versions --- .fatherrc.ts | 6 +----- .github/workflows/ci.yml | 2 +- package.json | 6 +++--- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.fatherrc.ts b/.fatherrc.ts index 3009d3bb..9d2a4990 100644 --- a/.fatherrc.ts +++ b/.fatherrc.ts @@ -1,7 +1,3 @@ - export default { - target: 'node', - cjs: { - type: 'babel', - } + cjs: { output: 'lib' } } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e796019..d94e1bba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node_version: [10.x, 12.x, 14.x] + node_version: [14.x, 16.x, 18.x] os: [ubuntu-latest, macos-latest] steps: - uses: actions/checkout@v2 diff --git a/package.json b/package.json index ccffb213..d2109caf 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,13 @@ }, "main": "lib/index.js", "scripts": { - "build": "father-build", + "build": "father build", "test": "umi-test --coverage", "debug": "umi-test", "lint": "eslint --ext .js src", "coveralls": "cat ./coverage/lcov.info | coveralls", "prepack": "npm run build", - "prepublishOnly": "npm run build && np --no-cleanup --yolo --no-publish --any-branch" + "prepublishOnly": "npm run build && father doctor && np --no-cleanup --yolo --no-publish --any-branch" }, "husky": { "hooks": { @@ -45,7 +45,7 @@ "eslint-config-prettier": "^6.11.0", "eslint-plugin-import": "^2.20.2", "eslint-plugin-prettier": "^3.1.3", - "father-build": "^1.22.1", + "father": "^4.0.0", "husky": "^4.2.5", "lint-staged": "^10.2.8", "material-ui": "^0.20.2",