diff --git a/.circleci/config.yml b/.circleci/config.yml index a546e6134..30b71ef1b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,6 +27,14 @@ references: requires: - setup - icons-svg + - icons-vue: + requires: + - setup + - icons-svg + - icons-react-native: + requires: + - setup + - icons-svg jobs: setup: @@ -47,8 +55,6 @@ jobs: paths: - node_modules - packages/icons-*/node_modules - - store_artifacts: - path: yarn.lock icons-svg: <<: *container_config @@ -79,6 +85,20 @@ jobs: - *attach_workspace - run: yarn angular:ci + icons-vue: + <<: *container_config + steps: + - checkout + - *attach_workspace + - run: yarn vue:ci + + icons-react-native: + <<: *container_config + steps: + - checkout + - *attach_workspace + - run: yarn react-native:ci + workflows: version: 2 build_test: diff --git a/package.json b/package.json index 3426c52dd..9ea163590 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "private": true, "scripts": { "bootstrap": "lerna bootstrap", + "clean": "lerna clean", "bootstrap:china": "lerna bootstrap --registry=https://registry.npm.taobao.org", "rn:generate": "lerna run --scope @ant-design/icons-react-native generate", "icons:generate": "lerna run --scope @ant-design/icons-svg generate", @@ -9,6 +10,8 @@ "icons:test": "lerna run --scope @ant-design/icons-svg test", "react:ci": "lerna run --scope @ant-design/icons ci", "angular:ci": "lerna run --scope @ant-design/icons-angular-workspace ci", + "vue:ci": "lerna run --scope @ant-design/icons-vue ci", + "react-native:ci": "lerna run --scope @ant-design/icons-react-native ci", "lint": "lerna run lint" }, "devDependencies": { diff --git a/packages/icons-angular/package.json b/packages/icons-angular/package.json index 92bafdab7..74b2162c4 100644 --- a/packages/icons-angular/package.json +++ b/packages/icons-angular/package.json @@ -15,7 +15,7 @@ "license": "MIT", "private": true, "dependencies": { - "@ant-design/colors": "^4.0.0", + "@ant-design/colors": "^5.0.0", "@angular/common": "^10.0.0", "@angular/core": "^10.0.0" }, @@ -31,7 +31,6 @@ "@angular/platform-browser-dynamic": "^10.0.0", "@angular/platform-browser": "^10.0.0", "@angular/router": "^10.0.0", - "@ant-design/colors": "^3.1.0", "@ant-design/icons-svg": "^4.0.0", "@types/jasmine": "~3.3.8", "@types/jasminewd2": "~2.0.3", diff --git a/packages/icons-angular/src/package.json b/packages/icons-angular/src/package.json index f420d0fdf..2d84dc6e5 100644 --- a/packages/icons-angular/src/package.json +++ b/packages/icons-angular/src/package.json @@ -7,7 +7,7 @@ "Wendell Hu " ], "dependencies": { - "@ant-design/colors": "^3.1.0", + "@ant-design/colors": "^5.0.0", "tslib": "^2.0.0" }, "peerDependencies": { diff --git a/packages/icons-react-native/package.json b/packages/icons-react-native/package.json index 9914b3680..4b30133b3 100644 --- a/packages/icons-react-native/package.json +++ b/packages/icons-react-native/package.json @@ -21,7 +21,9 @@ "pregenerate": "npm run clean", "clean": "rimraf -rf fonts iconfont src/*.tsx", "prepublishOnly": "npm run lint && npm run test && npm run compile", - "patch-package": "patch-package" + "postinstall": "npm run patch-package", + "patch-package": "patch-package", + "ci": "npm run lint && npm run test && npm run compile" }, "files": [ "es", diff --git a/packages/icons-react-native/test/IconFill.spec.tsx b/packages/icons-react-native/test/IconFill.spec.tsx index 7afa6e424..feb5e94f4 100644 --- a/packages/icons-react-native/test/IconFill.spec.tsx +++ b/packages/icons-react-native/test/IconFill.spec.tsx @@ -15,7 +15,7 @@ describe('IconFill', () => { it('should create Icon element.', () => { const icon = mount({ name: 'account-book' }); - expect(icon!.children![0]).toBe( + expect((icon as any).children![0]).toBe( String.fromCharCode(fillGlyphMap['account-book']) ); expect(icon).toMatchSnapshot(); diff --git a/packages/icons-react-native/test/IconOutline.spec.tsx b/packages/icons-react-native/test/IconOutline.spec.tsx index 6ab3fe3e5..bf7b095e7 100644 --- a/packages/icons-react-native/test/IconOutline.spec.tsx +++ b/packages/icons-react-native/test/IconOutline.spec.tsx @@ -15,7 +15,7 @@ describe('IconOutline', () => { it('should create Icon element.', () => { const icon = mount({ name: 'account-book' }); - expect(icon!.children![0]).toBe( + expect((icon as any).children![0]).toBe( String.fromCharCode(outlineGlyphMap['account-book']) ); expect(icon).toMatchSnapshot(); diff --git a/packages/icons-react/.eslintrc.js b/packages/icons-react/.eslintrc.js index 2ab96d552..125a1e392 100644 --- a/packages/icons-react/.eslintrc.js +++ b/packages/icons-react/.eslintrc.js @@ -1,13 +1,9 @@ -const base = require('@umijs/fabric/dist/eslint'); - module.exports = { - ...base, + extends: [require.resolve('@umijs/fabric/dist/eslint')], env: { - ...base.env, jest: true, }, rules: { - ...base.rules, '@typescript-eslint/no-explicit-any': 0, 'react/no-did-update-set-state': 0, 'react/no-find-dom-node': 0, diff --git a/packages/icons-react/package.json b/packages/icons-react/package.json index 890d4a6aa..47e39229e 100644 --- a/packages/icons-react/package.json +++ b/packages/icons-react/package.json @@ -31,7 +31,7 @@ "postcompile": "npm run clean && TS_NODE_PROJECT=scripts/tsconfig.json node -r ts-node/register scripts/generate.ts --target=entry" }, "peerDependencies": { - "react": "16.x" + "react": ">=16.0.0" }, "devDependencies": { "@types/classnames": "^2.2.9", @@ -43,7 +43,9 @@ "@types/react": "^16.9.23", "@types/react-dom": "^16.9.5", "@umijs/fabric": "^2.2.2", - "antd": "^3.20.7", + "@typescript-eslint/eslint-plugin": "^4.7.0", + "@typescript-eslint/parser": "^4.7.0", + "antd": "^4.8.2", "cross-env": "^5.2.0", "enzyme": "^3.10.0", "enzyme-to-json": "^3.3.5", @@ -56,11 +58,11 @@ "react-dom": "^16.4.2", "rimraf": "^3.0.0", "styled-components": "^3.3.3", - "ts-node": "^8.3.0", - "typescript": "^3.0.3" + "ts-node": "^9.0.0", + "typescript": "^4.0.2" }, "dependencies": { - "@ant-design/colors": "^3.1.0", + "@ant-design/colors": "^5.0.0", "@ant-design/icons-svg": "^4.0.0", "@babel/runtime": "^7.10.4", "classnames": "^2.2.6", diff --git a/packages/icons-react/tests/__snapshots__/index.test.tsx.snap b/packages/icons-react/tests/__snapshots__/index.test.tsx.snap index eb171f882..9e295a49e 100644 --- a/packages/icons-react/tests/__snapshots__/index.test.tsx.snap +++ b/packages/icons-react/tests/__snapshots__/index.test.tsx.snap @@ -53,7 +53,6 @@ exports[`Icon should render to a ... 1`] = ` >