Merge remote-tracking branch 'origin/next' into v2.3

pull/4606/head
tangjinzhou 2021-08-26 22:32:55 +08:00
commit 5668d684a6
5 changed files with 25 additions and 27 deletions

View File

@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@master
- name: cache package-lock.json - name: cache package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
@ -27,7 +27,7 @@ jobs:
- name: cache node_modules - name: cache node_modules
id: node_modules_cache_id id: node_modules_cache_id
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -40,28 +40,28 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@master
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
- name: cache lib - name: cache lib
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: lib path: lib
key: lib-${{ github.sha }} key: lib-${{ github.sha }}
- name: cache es - name: cache es
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: es path: es
key: es-${{ github.sha }} key: es-${{ github.sha }}
@ -74,16 +74,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@master
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
@ -96,12 +96,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@master
# with: # with:
# token: ${{ secrets.ACCESS_TOKEN }} # token: ${{ secrets.ACCESS_TOKEN }}
# - name: Checkout submodules # - name: Checkout submodules
# uses: actions/checkout@v2 # uses: actions/checkout@master
# with: # with:
# repository: tangjinzhou/antdv-demo # repository: tangjinzhou/antdv-demo
# token: ${{ secrets.ACCESS_TOKEN }} # token: ${{ secrets.ACCESS_TOKEN }}
@ -109,13 +109,13 @@ jobs:
# submodules: true # submodules: true
- name: restore cache from package-lock.json - name: restore cache from package-lock.json
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: package-temp-dir path: package-temp-dir
key: lock-${{ github.sha }} key: lock-${{ github.sha }}
- name: restore cache from node_modules - name: restore cache from node_modules
uses: actions/cache@v1 uses: actions/cache@v2
with: with:
path: node_modules path: node_modules
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }} key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}

View File

@ -1,5 +1,4 @@
const { getProjectPath, resolve, injectRequire } = require('./utils/projectHelper'); const { getProjectPath, resolve } = require('./utils/projectHelper');
injectRequire();
const path = require('path'); const path = require('path');
const webpack = require('webpack'); const webpack = require('webpack');
const WebpackBar = require('webpackbar'); const WebpackBar = require('webpackbar');

View File

@ -1,9 +1,5 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
const { getProjectPath, injectRequire } = require('./utils/projectHelper'); const { getProjectPath } = require('./utils/projectHelper');
injectRequire();
// const install = require('./install')
const runCmd = require('./runCmd'); const runCmd = require('./runCmd');
const getBabelCommonConfig = require('./getBabelCommonConfig'); const getBabelCommonConfig = require('./getBabelCommonConfig');
const merge2 = require('merge2'); const merge2 = require('merge2');
@ -26,10 +22,10 @@ const ts = require('gulp-typescript');
const gulp = require('gulp'); const gulp = require('gulp');
const fs = require('fs'); const fs = require('fs');
const rimraf = require('rimraf'); const rimraf = require('rimraf');
const tsConfig = require('./getTSCommonConfig')();
const replaceLib = require('./replaceLib');
const stripCode = require('gulp-strip-code'); const stripCode = require('gulp-strip-code');
const compareVersions = require('compare-versions'); const compareVersions = require('compare-versions');
const getTSCommonConfig = require('./getTSCommonConfig');
const replaceLib = require('./replaceLib');
const packageJson = require(getProjectPath('package.json')); const packageJson = require(getProjectPath('package.json'));
const tsDefaultReporter = ts.reporter.defaultReporter(); const tsDefaultReporter = ts.reporter.defaultReporter();
@ -37,6 +33,8 @@ const cwd = process.cwd();
const libDir = getProjectPath('lib'); const libDir = getProjectPath('lib');
const esDir = getProjectPath('es'); const esDir = getProjectPath('es');
const tsConfig = getTSCommonConfig();
function dist(done) { function dist(done) {
rimraf.sync(path.join(cwd, 'dist')); rimraf.sync(path.join(cwd, 'dist'));
process.env.RUN_ENV = 'PRODUCTION'; process.env.RUN_ENV = 'PRODUCTION';

View File

@ -5,7 +5,7 @@ import type {
TransitionGroupProps, TransitionGroupProps,
TransitionProps, TransitionProps,
} from 'vue'; } from 'vue';
import { onBeforeUpdate } from 'vue'; import { onUpdated } from 'vue';
import { getCurrentInstance } from 'vue'; import { getCurrentInstance } from 'vue';
import { defineComponent, nextTick, Transition as T, TransitionGroup as TG } from 'vue'; import { defineComponent, nextTick, Transition as T, TransitionGroup as TG } from 'vue';
@ -59,7 +59,7 @@ if (process.env.NODE_ENV === 'test') {
inheritAttrs: false, inheritAttrs: false,
setup(_props, { slots, attrs }) { setup(_props, { slots, attrs }) {
const instance = getCurrentInstance(); const instance = getCurrentInstance();
onBeforeUpdate(() => { onUpdated(() => {
const child = instance.subTree.children[0]; const child = instance.subTree.children[0];
if (child && child.dirs && child.dirs[0]) { if (child && child.dirs && child.dirs[0]) {
const value = child.dirs[0].value; const value = child.dirs[0].value;

View File

@ -35,7 +35,7 @@
"generator-webtypes": "tsc -p antd-tools/generator-types/tsconfig.json && node antd-tools/generator-types/index.js", "generator-webtypes": "tsc -p antd-tools/generator-types/tsconfig.json && node antd-tools/generator-types/index.js",
"pub": "node --max_old_space_size=8192 antd-tools/cli/run.js pub", "pub": "node --max_old_space_size=8192 antd-tools/cli/run.js pub",
"pub-with-ci": "node antd-tools/cli/run.js pub-with-ci", "pub-with-ci": "node antd-tools/cli/run.js pub-with-ci",
"prepublish": "node antd-tools/cli/run.js guard", "prepublishOnly": "node antd-tools/cli/run.js guard",
"pre-publish": "node ./scripts/prepub && npm run generator-webtypes", "pre-publish": "node ./scripts/prepub && npm run generator-webtypes",
"prettier": "prettier -c --write '**/*'", "prettier": "prettier -c --write '**/*'",
"pretty-quick": "pretty-quick", "pretty-quick": "pretty-quick",
@ -152,6 +152,7 @@
"mkdirp": "^0.5.1", "mkdirp": "^0.5.1",
"mockdate": "^2.0.2", "mockdate": "^2.0.2",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"object-assign": "^4.1.1",
"postcss": "^8.2.12", "postcss": "^8.2.12",
"postcss-loader": "^6.0.0", "postcss-loader": "^6.0.0",
"prettier": "^2.2.0", "prettier": "^2.2.0",