diff --git a/.eslintrc.js b/.eslintrc.js index c0b883a..2ddbc8a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,7 +5,10 @@ const commonRules = { "no-underscore-dangle": 0, "class-methods-use-this": 0, "no-param-reassign": 0, - "comma-dangle": 0 + "comma-dangle": 0, + "prefer-object-spread": 0, + // TODO: open rule indent, consider of MemberExpression + "indent": 0, }; const jsRules = deepmerge(eslint, { diff --git a/examples/basic-mpa/src/pages/Dashboard/app.ts b/examples/basic-mpa/src/pages/Dashboard/app.ts index 7c75c56..19657e8 100644 --- a/examples/basic-mpa/src/pages/Dashboard/app.ts +++ b/examples/basic-mpa/src/pages/Dashboard/app.ts @@ -1,9 +1,9 @@ import { createApp, IAppConfig } from 'ice'; -import Dashboard from './index'; +import routes from './routes'; const appConfig: IAppConfig = { router: { - routes: [{ path: '/', component: Dashboard }], + routes }, }; diff --git a/examples/basic-mpa/src/pages/Dashboard/routes.ts b/examples/basic-mpa/src/pages/Dashboard/routes.ts new file mode 100644 index 0000000..46305ce --- /dev/null +++ b/examples/basic-mpa/src/pages/Dashboard/routes.ts @@ -0,0 +1,3 @@ +import Index from './index'; + +export default [{ path: '/', component: Index }]; diff --git a/examples/basic-request/src/app.ts b/examples/basic-request/src/app.ts index 3170a52..4190244 100644 --- a/examples/basic-request/src/app.ts +++ b/examples/basic-request/src/app.ts @@ -8,10 +8,15 @@ const appConfig: IAppConfig = { baseURL: '/api', interceptors: { response: { + // 可选的 onConfig: (config) => { console.log({history}); return config; }, + // 可选的 + onError: (error) => { + return Promise.reject(error); + } }, } } diff --git a/examples/basic-service/mock/index.js b/examples/basic-service/mock/index.js index 1fed684..fd55c38 100644 --- a/examples/basic-service/mock/index.js +++ b/examples/basic-service/mock/index.js @@ -1,41 +1,41 @@ module.exports = { 'GET /todo_getAll': { - "errorCode": "0", - "errorMsg": "", - "data": [ + 'errorCode': '0', + 'errorMsg': '', + 'data': [ { - "id": "1", - "title": "安卓", - "dnoe": true + 'id': '1', + 'title': '安卓', + 'dnoe': true }, { - "id": "2", - "title": "iOS", - "dnoe": true + 'id': '2', + 'title': 'iOS', + 'dnoe': true } ], - "success": true + 'success': true }, 'GET /todo_getOne': { - "errorCode": "0", - "errorMsg": "", - "data": { - "id": "2222222", - "title": "安卓", - "dnoe": true + 'errorCode': '0', + 'errorMsg': '', + 'data': { + 'id': '2222222', + 'title': '安卓', + 'dnoe': true }, - "requestId": "@guid", - "success": true + 'requestId': '@guid', + 'success': true }, 'POST /todo_add': { - "errorCode": "0", - "errorMsg": "", - "data": { - "id": "2222222", - "title": "安卓", - "dnoe": true + 'errorCode': '0', + 'errorMsg': '', + 'data': { + 'id': '2222222', + 'title': '安卓', + 'dnoe': true }, - "requestId": "@guid", - "success": true + 'requestId': '@guid', + 'success': true }, }; diff --git a/examples/basic-spa/build.json b/examples/basic-spa/build.json index 71487ed..76c19f7 100644 --- a/examples/basic-spa/build.json +++ b/examples/basic-spa/build.json @@ -5,5 +5,9 @@ "prod": { "ignoreHtmlTemplate": false } + }, + "eslint": { + "disable": false, + "quiet": true } } diff --git a/examples/basic-spa/src/app.tsx b/examples/basic-spa/src/app.tsx index f49a73a..3f8324b 100644 --- a/examples/basic-spa/src/app.tsx +++ b/examples/basic-spa/src/app.tsx @@ -4,7 +4,8 @@ import { createApp, APP_MODE, IAppConfig } from 'ice'; const appConfig: IAppConfig = { app: { rootId: 'ice-container', - errorBoundary: true + errorBoundary: true, + parseSearchParams: true }, logger: { level: APP_MODE === 'build' ? 'error' : 'debug', diff --git a/examples/basic-spa/src/pages/Dashboard/index.tsx b/examples/basic-spa/src/pages/Dashboard/index.tsx index 170e486..388d64b 100644 --- a/examples/basic-spa/src/pages/Dashboard/index.tsx +++ b/examples/basic-spa/src/pages/Dashboard/index.tsx @@ -1,10 +1,31 @@ import React from 'react'; -import { Link } from 'ice'; +import { Link, useSearchParams, withSearchParams } from 'ice'; -const Dashboard = () => { +@withSearchParams +class Foo extends React.PureComponent { + public render() { + console.log('Foo:', this.props.searchParams); + return ( + <>Foo + ); + } +} + +const Bar = () => { + const searchParams = useSearchParams(); + console.log('Bar:', searchParams); + return ( + <>Bar + ); +}; + +const Dashboard = (props) => { + console.log('props:', props); return ( <>

Dashboard Page...

+ + About ); diff --git a/examples/basic-store/src/pages/NotFound/index.tsx b/examples/basic-store/src/pages/NotFound/index.tsx index 8dd42cc..02f2813 100644 --- a/examples/basic-store/src/pages/NotFound/index.tsx +++ b/examples/basic-store/src/pages/NotFound/index.tsx @@ -1,7 +1,7 @@ import React from 'react'; import { Link } from 'ice'; -const Home = () => { +const NotFound = () => { return ( <>

404 Page...

@@ -11,4 +11,4 @@ const Home = () => { ); }; -export default Home; +export { NotFound }; diff --git a/examples/basic-store/src/routes.ts b/examples/basic-store/src/routes.ts index 416471a..9895c6f 100644 --- a/examples/basic-store/src/routes.ts +++ b/examples/basic-store/src/routes.ts @@ -1,13 +1,13 @@ -import { lazy } from 'ice'; +// import { lazy } from 'ice'; import Layout from '@/layouts/index'; -// import Home from '@/pages/Home'; -// import About from '@/pages/About'; -// import NotFound from '@/pages/NotFound'; +import Home from '@/pages/Home'; +import About from '@/pages/About'; +import { NotFound } from '@/pages/NotFound'; -const Home = lazy(() => import('@/pages/Home')); -const About =lazy(() => import('@/pages/About')); -const NotFound = lazy(() => import('@/pages/NotFound')); +// const Home = lazy(() => import('@/pages/Home')); +// const About =lazy(() => import('@/pages/About')); +// const NotFound = lazy(() => import('@/pages/NotFound')); export default [ { diff --git a/lerna.json b/lerna.json index f03bcd6..2b42b20 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "1.1.9", + "version": "1.2.0", "npmClient": "yarn", "useWorkspaces": true, "packages": [ diff --git a/package.json b/package.json index fb8c99f..b85e1f2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ice.js", "private": true, - "version": "1.1.8", + "version": "1.2.0", "workspaces": [ "packages/*" ], @@ -30,7 +30,7 @@ }, "devDependencies": { "@commitlint/cli": "^8.2.0", - "@ice/spec": "^0.1.9", + "@ice/spec": "^1.0.0", "eslint": "^6.8.0", "esm": "^3.2.25", "execa": "^4.0.0", @@ -50,4 +50,4 @@ "dependencies": { "core-js": "^3.6.4" } -} +} \ No newline at end of file diff --git a/packages/create-ice/package.json b/packages/create-ice/package.json index 2f39c73..2aab5d0 100644 --- a/packages/create-ice/package.json +++ b/packages/create-ice/package.json @@ -1,6 +1,6 @@ { "name": "create-ice", - "version": "1.1.9", + "version": "1.2.0", "description": "npm init ice", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/icejs/package.json b/packages/icejs/package.json index ab9c430..2347362 100644 --- a/packages/icejs/package.json +++ b/packages/icejs/package.json @@ -1,6 +1,6 @@ { "name": "ice.js", - "version": "1.1.9", + "version": "1.2.0", "description": "command line interface and builtin plugin for icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", @@ -21,16 +21,16 @@ }, "dependencies": { "@alib/build-scripts": "^0.1.13", - "build-plugin-ice-config": "1.1.9", - "build-plugin-ice-core": "1.1.9", - "build-plugin-ice-helpers": "1.1.9", - "build-plugin-ice-logger": "1.1.9", - "build-plugin-ice-mpa": "1.1.9", - "build-plugin-ice-request": "1.1.9", - "build-plugin-ice-router": "1.1.9", - "build-plugin-ice-ssr": "1.1.9", - "build-plugin-ice-store": "1.1.9", - "build-plugin-react-app": "1.1.9", + "build-plugin-ice-config": "1.2.0", + "build-plugin-ice-core": "1.2.0", + "build-plugin-ice-helpers": "1.2.0", + "build-plugin-ice-logger": "1.2.0", + "build-plugin-ice-mpa": "1.2.0", + "build-plugin-ice-request": "1.2.0", + "build-plugin-ice-router": "1.2.0", + "build-plugin-ice-ssr": "1.2.0", + "build-plugin-ice-store": "1.2.0", + "build-plugin-react-app": "1.2.0", "chokidar": "^3.3.1", "commander": "^5.0.0", "detect-port": "^1.3.0", diff --git a/packages/plugin-config/package.json b/packages/plugin-config/package.json index e14c4e7..ae78417 100644 --- a/packages/plugin-config/package.json +++ b/packages/plugin-config/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-config", - "version": "1.1.9", + "version": "1.2.0", "description": "Define application config in icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-config/src/index.ts b/packages/plugin-config/src/index.ts index 4225af4..e1f4165 100644 --- a/packages/plugin-config/src/index.ts +++ b/packages/plugin-config/src/index.ts @@ -17,7 +17,7 @@ const plugin: IPlugin = async (api): Promise => { await fse.copy(srcPath, distPath); // add to ice exports - applyMethod('addIceExport', { source: `./config`, exportName }); + applyMethod('addIceExport', { source: './config', exportName }); } else { // remove config file applyMethod('removeIceExport', exportName); diff --git a/packages/plugin-core/package.json b/packages/plugin-core/package.json index 474cad2..e79256c 100644 --- a/packages/plugin-core/package.json +++ b/packages/plugin-core/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-core", - "version": "1.1.9", + "version": "1.2.0", "description": "the core plugin for icejs.", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-core/src/generator/index.ts b/packages/plugin-core/src/generator/index.ts index daf25b9..484a564 100644 --- a/packages/plugin-core/src/generator/index.ts +++ b/packages/plugin-core/src/generator/index.ts @@ -6,7 +6,7 @@ import * as prettier from 'prettier'; import generateExports from '../utils/generateExports'; import checkExportData from '../utils/checkExportData'; import removeExportData from '../utils/removeExportData'; -import { IExportData } from '../types'; +import { IExportData } from '../types/base'; interface IRenderData { [key: string]: any; @@ -20,7 +20,7 @@ interface IRenderFile { (templatePath: string, targetDir: string, extraData?: IRenderData): void; } -const API_MAP = ['addEntryImports', 'addEntryCode', 'addIceExport', 'addIceTypesExport']; +const API_MAP = ['addEntryImports', 'addEntryCode', 'addIceExport', 'addIceTypesExport', 'addIceAppConfigTypes']; export default class Generator { public templateDir: string; @@ -50,7 +50,7 @@ export default class Generator { this.showPrettierError = true; } - public addExport = (registerKey ,exportData: IExportData|IExportData[]) => { + public addExport = (registerKey, exportData: IExportData | IExportData[]) => { const exportList = this.contentRegistration[registerKey] || []; checkExportData(exportList, exportData, registerKey); this.addContent(registerKey, exportData); @@ -59,7 +59,7 @@ export default class Generator { } } - public removeExport = (registerKey: string, removeExportName: string|string[]) => { + public removeExport = (registerKey: string, removeExportName: string | string[]) => { const exportList = this.contentRegistration[registerKey] || []; this.contentRegistration[registerKey] = removeExportData(exportList, removeExportName); if (this.rerender) { @@ -86,20 +86,22 @@ export default class Generator { private getExportStr(registerKey, dataKeys) { const exportList = this.contentRegistration[registerKey] || []; - const { importStr, exportStr } = generateExports(exportList); - const [importStrKey, exportStrKey] = dataKeys; + const { importStr, exportStr, extraStr } = generateExports(exportList); + const [importStrKey, exportStrKey, extraStrKey] = dataKeys; return { [importStrKey]: importStr, [exportStrKey]: exportStr, + [extraStrKey]: extraStr, }; } public parseRenderData() { - const globalStyles = globby.sync(['src/global.@(scss|less|css)'], { cwd: this.projectRoot}); + const globalStyles = globby.sync(['src/global.@(scss|less|css)'], { cwd: this.projectRoot }); this.renderData = { ...this.renderData, ...this.getExportStr('addIceExport', ['iceImports', 'iceExports']), ...this.getExportStr('addIceTypesExport', ['iceTypesImports', 'iceTypesExports']), + ...this.getExportStr('addIceAppConfigTypes', ['iceIAppConfigTypesImports', 'iceIAppConfigTypesExports', 'iceIAppTypes']), // add types to the AppConfig & IApp globalStyle: globalStyles.length && globalStyles[0], entryImportsBefore: this.generateImportStr('addEntryImports_before'), entryImportsAfter: this.generateImportStr('addEntryImports_after'), @@ -118,7 +120,7 @@ export default class Generator { public async render() { this.rerender = true; - const ejsTemplates = await globby(['**/*'], { cwd: this.templateDir}); + const ejsTemplates = await globby(['**/*'], { cwd: this.templateDir }); this.parseRenderData(); ejsTemplates.forEach((template) => { const templatePath = path.join(this.templateDir, template); @@ -135,7 +137,7 @@ export default class Generator { public renderFile: IRenderFile = (templatePath, targetPath, extraData = {}) => { const templateContent = fse.readFileSync(templatePath, 'utf-8'); - let content = ejs.render(templateContent, {...this.renderData, ...extraData}); + let content = ejs.render(templateContent, { ...this.renderData, ...extraData }); try { content = prettier.format(content, { parser: 'typescript', diff --git a/packages/plugin-core/src/generator/pageGenerator.ts b/packages/plugin-core/src/generator/pageGenerator.ts index 4a201e6..33a4629 100644 --- a/packages/plugin-core/src/generator/pageGenerator.ts +++ b/packages/plugin-core/src/generator/pageGenerator.ts @@ -4,7 +4,7 @@ import getPages from '../utils/getPages'; import generateExports from '../utils/generateExports'; import checkExportData from '../utils/checkExportData'; import removeExportData from '../utils/removeExportData'; -import { IExportData } from '../types'; +import { IExportData } from '../types/base'; export default class PageGenerator { private generator: Generator; @@ -15,7 +15,7 @@ export default class PageGenerator { private rootDir: string; - private pageExports: {[key: string]: IExportData[]}; + private pageExports: { [key: string]: IExportData[] }; private rerender: boolean; @@ -43,7 +43,7 @@ export default class PageGenerator { }; } - public addPageExport = (pageName: string, exportData: IExportData|IExportData[]) => { + public addPageExport = (pageName: string, exportData: IExportData | IExportData[]) => { if (!this.pageExports[pageName]) { this.pageExports[pageName] = []; } @@ -57,7 +57,7 @@ export default class PageGenerator { } } - public removePageExport = (pageName: string, removeExportName: string|string[]) => { + public removePageExport = (pageName: string, removeExportName: string | string[]) => { this.pageExports[pageName] = removeExportData(this.pageExports[pageName] || [], removeExportName); if (this.rerender) { this.render(); diff --git a/packages/plugin-core/src/generator/templates/app/types.ts.ejs b/packages/plugin-core/src/generator/templates/app/types.ts.ejs index 05212ae..81fcd38 100644 --- a/packages/plugin-core/src/generator/templates/app/types.ts.ejs +++ b/packages/plugin-core/src/generator/templates/app/types.ts.ejs @@ -1,4 +1,5 @@ import React from 'react'; +<%- iceIAppConfigTypesImports %> <%- iceTypesImports %> export interface IApp { @@ -6,11 +7,17 @@ export interface IApp { mountNode?: HTMLElement; addProvider?: ({ children }: { children: React.ReactNode }) => React.ComponentType; getInitialData?: () => Promise; + ErrorBoundaryFallback?: React.ReactElement, + onErrorBoundaryHander?: (error: Error, componentStack: string) => any; + <% if (iceIAppConfigTypesImports) { %> + <%- iceIAppTypes %> + <% } %> + [key: string]: any; } -<% if (iceTypesExports) { %> +<% if (iceIAppConfigTypesImports) { %> export interface IAppConfig { app?: IApp -<%- iceTypesExports %> +<%- iceIAppConfigTypesExports %> } <% } %> diff --git a/packages/plugin-core/src/index.ts b/packages/plugin-core/src/index.ts index 98298cc..68d040d 100644 --- a/packages/plugin-core/src/index.ts +++ b/packages/plugin-core/src/index.ts @@ -14,7 +14,7 @@ export default (api) => { const iceTempPath = path.join(rootDir, '.ice'); setValue('ICE_TEMP', iceTempPath); - const tsEntryFiles = globby.sync(['src/app.@(ts?(x))'], { cwd: rootDir }); + const tsEntryFiles = globby.sync(['src/app.@(ts?(x))', 'src/pages/*/app.@(ts?(x))'], { cwd: rootDir }); const projectType = tsEntryFiles.length ? 'ts' : 'js'; setValue('PROJECT_TYPE', projectType); @@ -64,10 +64,10 @@ export default (api) => { ['react', rootDir], ['react-dom', rootDir] ]; - basicDependencies.forEach((dep: string[]|string): void => { + basicDependencies.forEach((dep: string[] | string): void => { const [depName, searchFolder] = Array.isArray(dep) ? dep : [dep]; const aliasPath = searchFolder - ? require.resolve(depName, { paths: [searchFolder]}) + ? require.resolve(depName, { paths: [searchFolder] }) : require.resolve(depName); config.resolve.alias.set(depName, path.dirname(aliasPath)); }); @@ -152,7 +152,7 @@ export default (api) => { // pageGenerator.addPageExport('Index', { exportName: 'store', source: './store' }); // registerMethod for add export - const regsiterKeys = ['addIceExport', 'addIceTypesExport']; + const regsiterKeys = ['addIceExport', 'addIceTypesExport', 'addIceAppConfigTypes']; regsiterKeys.forEach((registerKey) => { registerMethod(registerKey, (exportData) => { generator.addExport(registerKey, exportData); diff --git a/packages/plugin-core/src/types/index.ts b/packages/plugin-core/src/types/base.ts similarity index 78% rename from packages/plugin-core/src/types/index.ts rename to packages/plugin-core/src/types/base.ts index 22d685b..fd2c09c 100644 --- a/packages/plugin-core/src/types/index.ts +++ b/packages/plugin-core/src/types/base.ts @@ -2,4 +2,5 @@ export interface IExportData { specifier?: string; source: string; exportName: string; + extraExport?: boolean; } \ No newline at end of file diff --git a/packages/plugin-core/src/utils/checkExportData.ts b/packages/plugin-core/src/utils/checkExportData.ts index 5bc53cb..f6b338c 100644 --- a/packages/plugin-core/src/utils/checkExportData.ts +++ b/packages/plugin-core/src/utils/checkExportData.ts @@ -4,7 +4,7 @@ function checkExportData(currentList, exportData, apiName) { // check exportName and specifier if (specifier || exportName) { const defaultSpecifierName = specifier || exportName; - if (exportName === data.exportName || defaultSpecifierName === data.specifier) { + if ((exportName && exportName === data.exportName) || defaultSpecifierName === data.specifier) { throw new Error(`duplicate export data added by ${apiName}, ${data.exportName ? `exportName: ${data.exportName}, ` : ''}specifier: ${data.specifier} `); diff --git a/packages/plugin-core/src/utils/generateExports.ts b/packages/plugin-core/src/utils/generateExports.ts index 4da88dc..337ca97 100644 --- a/packages/plugin-core/src/utils/generateExports.ts +++ b/packages/plugin-core/src/utils/generateExports.ts @@ -1,21 +1,28 @@ -import { IExportData } from '../types'; +import { IExportData } from '../types/base'; function generateExports(exportList: IExportData[]) { const importStatements = []; const exportStatements = []; + const extraExportStatements = []; exportList.forEach(data => { - const { specifier, source, exportName } = data; + const { specifier, source, exportName, extraExport = false } = data; if (exportName && source) { const symbol = source.includes('types') ? ';' : ','; importStatements.push(`import ${specifier || exportName} from '${source}';`); - exportStatements.push(`${exportName}${symbol}`); - } else if(source) { - importStatements.push(`export * from '${source}';`); + const exportStr = `${exportName}${symbol}`; + if (extraExport) { + extraExportStatements.push(exportStr); + } else { + exportStatements.push(exportStr); + } + } else if (source) { + importStatements.push(`export ${specifier || '*'} from '${source}';`); } }); return { importStr: importStatements.join('\n'), exportStr: exportStatements.join('\n'), + extraStr: extraExportStatements.join('\n') }; } diff --git a/packages/plugin-core/src/utils/getRoutes.ts b/packages/plugin-core/src/utils/getRoutes.ts index b853afc..4accad0 100644 --- a/packages/plugin-core/src/utils/getRoutes.ts +++ b/packages/plugin-core/src/utils/getRoutes.ts @@ -6,6 +6,7 @@ interface IParams { tempDir: string; configPath: string; projectType: string; + isMpa: boolean; } interface IResult { @@ -13,7 +14,14 @@ interface IResult { isConfigRoutes: boolean; } -function getRoutes({ rootDir, tempDir, configPath, projectType }: IParams): IResult { +function getRoutes({ rootDir, tempDir, configPath, projectType, isMpa }: IParams): IResult { + // if is mpa use empty router file + if (isMpa) { + const routesTempPath = path.join(tempDir, 'routes.ts'); + fse.writeFileSync(routesTempPath, 'export default [];', 'utf-8'); + configPath = routesTempPath; + } + const routesPath = configPath ? path.join(rootDir, configPath) : path.join(rootDir, `src/routes.${projectType}`); diff --git a/packages/plugin-helpers/helpers/cookie.ts b/packages/plugin-helpers/helpers/cookie.ts index 44b5355..3daaa93 100644 --- a/packages/plugin-helpers/helpers/cookie.ts +++ b/packages/plugin-helpers/helpers/cookie.ts @@ -2,4 +2,4 @@ import * as cookie from 'cookie'; export { cookie -}; +}; \ No newline at end of file diff --git a/packages/plugin-helpers/package.json b/packages/plugin-helpers/package.json index 66d4042..6b34a43 100644 --- a/packages/plugin-helpers/package.json +++ b/packages/plugin-helpers/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-helpers", - "version": "1.1.9", + "version": "1.2.0", "description": "builtin helpers in icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-helpers/src/index.ts b/packages/plugin-helpers/src/index.ts index 25a2685..37dad2a 100644 --- a/packages/plugin-helpers/src/index.ts +++ b/packages/plugin-helpers/src/index.ts @@ -20,5 +20,4 @@ export default async function ({ // .ice/index.ts: // export * from './helpers'; applyMethod('addIceExport', { source: './helpers', exportName: 'helpers' }); - } diff --git a/packages/plugin-icestark/package.json b/packages/plugin-icestark/package.json index 173a94f..498655c 100644 --- a/packages/plugin-icestark/package.json +++ b/packages/plugin-icestark/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-icestark", - "version": "1.1.9", + "version": "1.2.0", "description": "Easy use `icestark` in icejs.", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-icestark/src/index.ts b/packages/plugin-icestark/src/index.ts index 0a81647..cf5a7a5 100644 --- a/packages/plugin-icestark/src/index.ts +++ b/packages/plugin-icestark/src/index.ts @@ -18,7 +18,7 @@ const plugin: IPlugin = async ({ onGetWebpackConfig, getValue, applyMethod, cont }); await fse.copy(path.join(__dirname, '..', 'src/types/index.ts'), path.join(iceTempPath, 'types/icestark.ts')); - applyMethod('addIceTypesExport', { source: './types/icestark', specifier: '{ IIceStark }', exportName: 'icestark?: IIceStark' }); + applyMethod('addIceAppConfigTypes', { source: './types/icestark', specifier: '{ IIceStark }', exportName: 'icestark?: IIceStark' }); }; export default plugin; diff --git a/packages/plugin-icestark/src/module.tsx b/packages/plugin-icestark/src/module.tsx index 2ee127a..eee3d4e 100644 --- a/packages/plugin-icestark/src/module.tsx +++ b/packages/plugin-icestark/src/module.tsx @@ -18,7 +18,7 @@ const { useEffect, useState } = React; const module = ({ appConfig, addDOMRender, setRenderRouter, modifyRoutes }) => { const { icestark, router } = appConfig; - const { type: appType } = (icestark || {}) as IIceStark; + const { type: appType, registerAppEnter: enterRegistration, registerAppLeave: leaveRegistration } = (icestark || {}) as IIceStark; const { type, basename, modifyRoutes: runtimeModifyRoutes } = router; if (runtimeModifyRoutes) { @@ -30,13 +30,22 @@ const module = ({ appConfig, addDOMRender, setRenderRouter, modifyRoutes }) => { addDOMRender(({ App, appMountNode }) => { return new Promise(resolve => { if (isInIcestark()) { - const mountNode = getMountNode(); registerAppEnter(() => { - ReactDOM.render(, mountNode, resolve); + const mountNode = getMountNode(); + if (enterRegistration) { + enterRegistration(mountNode, App, resolve); + } else { + ReactDOM.render(, mountNode, resolve); + } }); // make sure the unmount event is triggered registerAppLeave(() => { - ReactDOM.unmountComponentAtNode(mountNode); + const mountNode = getMountNode(); + if (leaveRegistration) { + leaveRegistration(mountNode); + } else { + ReactDOM.unmountComponentAtNode(mountNode); + } }); } else { ReactDOM.render(, appMountNode, resolve); diff --git a/packages/plugin-icestark/src/types/base.ts b/packages/plugin-icestark/src/types/base.ts new file mode 100644 index 0000000..e17cb1a --- /dev/null +++ b/packages/plugin-icestark/src/types/base.ts @@ -0,0 +1,15 @@ +import { AppConfig } from '@ice/stark'; + +export interface IAppRouter { + ErrorComponent?: React.ComponentType; + LoadingComponent?: React.ComponentType; + NotFoundComponent?: React.ComponentType; + shouldAssetsRemove?: ( + assetUrl?: string, + element?: HTMLElement | HTMLLinkElement | HTMLStyleElement | HTMLScriptElement, + ) => boolean; +} + +export interface IGetApps { + (): AppConfig[] | Promise; +} \ No newline at end of file diff --git a/packages/plugin-icestark/src/types/index.ts b/packages/plugin-icestark/src/types/index.ts index 1e28009..63e1293 100644 --- a/packages/plugin-icestark/src/types/index.ts +++ b/packages/plugin-icestark/src/types/index.ts @@ -1,18 +1,4 @@ -import { AppConfig } from '@ice/stark'; - -export interface IAppRouter { - ErrorComponent?: React.ComponentType; - LoadingComponent?: React.ComponentType; - NotFoundComponent?: React.ComponentType; - shouldAssetsRemove?: ( - assetUrl?: string, - element?: HTMLElement | HTMLLinkElement | HTMLStyleElement | HTMLScriptElement, - ) => boolean; -} - -export interface IGetApps { - (): AppConfig[]|Promise; -} +import { IGetApps, IAppRouter } from './base'; export interface IIceStark { type: 'framework' | 'child'; @@ -21,4 +7,6 @@ export interface IIceStark { removeRoutesLayout?: boolean; AppRoute?: React.ComponentType; Layout?: React.ComponentType; + registerAppEnter?: (mountNode: HTMLElement, App: React.ComponentType, resolve: (value?: unknown) => void) => void; + registerAppLeave?: (mountNode: HTMLElement) => void; } diff --git a/packages/plugin-logger/package.json b/packages/plugin-logger/package.json index 7c42eec..ed89387 100644 --- a/packages/plugin-logger/package.json +++ b/packages/plugin-logger/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-logger", - "version": "1.1.9", + "version": "1.2.0", "description": "builtin logger in icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-logger/src/index.ts b/packages/plugin-logger/src/index.ts index 7353c37..005ccd6 100644 --- a/packages/plugin-logger/src/index.ts +++ b/packages/plugin-logger/src/index.ts @@ -4,13 +4,14 @@ import { IPlugin } from '@alib/build-scripts'; const plugin: IPlugin = async ({ getValue, applyMethod, onGetWebpackConfig }): Promise => { const exportName = 'logger'; - const distPath = path.join(getValue('ICE_TEMP'), exportName); + const distPath = path.join(getValue('ICE_TEMP'), exportName); await fse.copy(path.join(__dirname, `../${exportName}`), distPath); + await fse.copy(path.join(__dirname, './types'), path.join(distPath, 'types')); // add ice exports applyMethod('addIceExport', { source: `./${exportName}`, exportName }); // add iceTypes exports - applyMethod('addIceTypesExport', { source: `./${exportName}/types`, specifier: '{ ILogger }', exportName: `${exportName}?: ILogger` }); + applyMethod('addIceAppConfigTypes', { source: `./${exportName}/types`, specifier: '{ ILogger }', exportName: `${exportName}?: ILogger` }); onGetWebpackConfig((config) => { // add alias for module.ts use $ice/logger diff --git a/packages/plugin-logger/logger/types.ts b/packages/plugin-logger/src/types/index.ts similarity index 100% rename from packages/plugin-logger/logger/types.ts rename to packages/plugin-logger/src/types/index.ts diff --git a/packages/plugin-mpa/package.json b/packages/plugin-mpa/package.json index 70f0dfa..85761d5 100644 --- a/packages/plugin-mpa/package.json +++ b/packages/plugin-mpa/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-mpa", - "version": "1.1.9", + "version": "1.2.0", "description": "enable mpa project for icejs framework", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-react-app/package.json b/packages/plugin-react-app/package.json index 9c2548a..7c06439 100644 --- a/packages/plugin-react-app/package.json +++ b/packages/plugin-react-app/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-react-app", - "version": "1.1.9", + "version": "1.2.0", "description": "The basic webpack configuration for ice project", "author": "ice-admin@alibaba-inc.com", "main": "src/index.js", @@ -18,6 +18,7 @@ "build-scripts-config": "^0.1.0", "copy-webpack-plugin": "^5.0.4", "core-js": "^3.3.1", + "eslint-loader": "^4.0.0", "fs-extra": "^8.1.0", "html-webpack-plugin": "^3.2.0", "lodash": "^4.17.15", diff --git a/packages/plugin-react-app/src/config/default.config.js b/packages/plugin-react-app/src/config/default.config.js index 3f57e62..2348191 100644 --- a/packages/plugin-react-app/src/config/default.config.js +++ b/packages/plugin-react-app/src/config/default.config.js @@ -11,9 +11,10 @@ module.exports = { disableHostCheck: true, compress: true, clientLogLevel: 'none', + logLevel: 'silent', hot: true, publicPath: '/', - quiet: true, + quiet: false, watchOptions: { ignored: /node_modules/, aggregateTimeout: 600, @@ -54,4 +55,5 @@ module.exports = { compileDependencies: [], babelPlugins: [], babelPresets: [], + eslint: true }; diff --git a/packages/plugin-react-app/src/config/validation.js b/packages/plugin-react-app/src/config/validation.js index cf61695..412e804 100644 --- a/packages/plugin-react-app/src/config/validation.js +++ b/packages/plugin-react-app/src/config/validation.js @@ -25,7 +25,6 @@ module.exports = { modules: 'array', devServer: 'object', entry: (val) => { - // entry: string | array // entry : { [name]: string | array } return validation('entry', val, 'string|array|object'); @@ -64,4 +63,7 @@ module.exports = { compileDependencies: 'array', babelPlugins: 'array', babelPresets: 'array', + eslint: (val) => { + return validation('eslint', val, 'boolean|object'); + } }; diff --git a/packages/plugin-react-app/src/index.js b/packages/plugin-react-app/src/index.js index ddc1a33..8ec4a9d 100644 --- a/packages/plugin-react-app/src/index.js +++ b/packages/plugin-react-app/src/index.js @@ -53,9 +53,12 @@ module.exports = ({ const mode = command === 'start' ? 'development' : 'production'; const config = getWebpackConfig(mode); + // set webpack name + config.name('Client'); + // setup DefinePlugin, HtmlWebpackPlugin and CopyWebpackPlugin out of onGetWebpackConfig // in case of registerUserConfig will be excute before onGetWebpackConfig - + // DefinePlugin const defineVariables = { 'process.env.NODE_ENV': JSON.stringify(mode || 'development'), diff --git a/packages/plugin-react-app/src/userConfig/entry.js b/packages/plugin-react-app/src/userConfig/entry.js index ed73c57..2c96b53 100644 --- a/packages/plugin-react-app/src/userConfig/entry.js +++ b/packages/plugin-react-app/src/userConfig/entry.js @@ -11,10 +11,21 @@ const resolveEntryPath = (entry, rootDir) => { return ''; }; +const addHotDevClient = (entry) => { + const webpackDevClientEntry = require.resolve('react-dev-utils/webpackHotDevClient'); + const hotEntries = {}; + + Object.keys(entry).forEach((key) => { + hotEntries[key] = [webpackDevClientEntry, ...entry[key]]; + }); + + return hotEntries; +}; + // entry: string | array // entry : { [name]: string | array } module.exports = (config, value, context) => { - const { rootDir, command, userConfig } = context; + const { rootDir, command, userConfig, commandArgs } = context; const ignoreHtmlTemplate = command === 'build' && userConfig.ignoreHtmlTemplate; let entry; if (Array.isArray(value) || typeof value === 'string') { @@ -73,6 +84,10 @@ module.exports = (config, value, context) => { }]]); } + // add webpackHotDevClient when execute command is start and enable HMR + if (!commandArgs.disableReload && command === 'start') { + entry = addHotDevClient(entry); + } // remove default entry then add new enrty to webpack config config.entryPoints.clear(); config.merge({ entry }); diff --git a/packages/plugin-react-app/src/userConfig/eslint.js b/packages/plugin-react-app/src/userConfig/eslint.js new file mode 100644 index 0000000..b3a7a36 --- /dev/null +++ b/packages/plugin-react-app/src/userConfig/eslint.js @@ -0,0 +1,27 @@ +const path = require('path'); + +module.exports = (config, eslint, { rootDir }) => { + if (typeof eslint === 'boolean' && eslint === false) { + return config; + } + const { disable, ...args } = eslint; + if (!disable) { + const appSrc = path.join(rootDir, 'src'); + config.module + .rule('eslint') + .test(/\.(jsx?|tsx?)$/) + .include + .add(appSrc) + .end() + .enforce('pre') + .use('eslint') + .loader(require.resolve('eslint-loader')) + .tap((options) => ({ + cache: true, + eslintPath: require.resolve('eslint'), + formatter: require.resolve('react-dev-utils/eslintFormatter'), + ...options, + ...args + })); + } +}; diff --git a/packages/plugin-react-app/src/userConfig/postcssrc.js b/packages/plugin-react-app/src/userConfig/postcssrc.js index abd276f..e2af012 100644 --- a/packages/plugin-react-app/src/userConfig/postcssrc.js +++ b/packages/plugin-react-app/src/userConfig/postcssrc.js @@ -2,17 +2,17 @@ module.exports = (config, postcssrc) => { if (postcssrc) { // remove postcss-loader options, use postcss config file [ - "scss", - "scss-module", - "css", - "css-module", - "less", - "less-module", + 'scss', + 'scss-module', + 'css', + 'css-module', + 'less', + 'less-module', ].forEach(rule => { if (config.module.rules.get(rule)) { config.module .rule(rule) - .use("postcss-loader") + .use('postcss-loader') .tap(() => ({})); } }); diff --git a/packages/plugin-rematch/package.json b/packages/plugin-rematch/package.json index 9c34fdc..b0fb5c3 100644 --- a/packages/plugin-rematch/package.json +++ b/packages/plugin-rematch/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-rematch", - "version": "1.1.9", + "version": "1.2.0", "description": "Easy use `rematch` in icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-request/package.json b/packages/plugin-request/package.json index ef6c9f3..bb92320 100644 --- a/packages/plugin-request/package.json +++ b/packages/plugin-request/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-request", - "version": "1.1.9", + "version": "1.2.0", "description": "request for build-plugin-ice-request", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-request/src/index.ts b/packages/plugin-request/src/index.ts index cddc5a2..7514061 100644 --- a/packages/plugin-request/src/index.ts +++ b/packages/plugin-request/src/index.ts @@ -8,14 +8,14 @@ export default async function (api) { // move requst to .ice/request await fse.copy(srcPath, distPath); - + await fse.copy(path.join(__dirname, 'types'), path.join(distPath, 'types')); // .ice/index.ts: // export * from './request'; applyMethod('addIceExport', { source: './request/request', exportName: 'request' }); applyMethod('addIceExport', { source: './request/useRequest', exportName: 'useRequest' }); // add iceTypes exports - applyMethod('addIceTypesExport', { source: './request/types', specifier: '{ IRequest }', exportName: 'request?: IRequest' }); + applyMethod('addIceAppConfigTypes', { source: './request/types', specifier: '{ IRequest }', exportName: 'request?: IRequest' }); onGetWebpackConfig((config) => { // add alias for module.ts use $ice/axiosInstance diff --git a/packages/plugin-request/src/module.ts b/packages/plugin-request/src/module.ts index 9c2937e..14d1273 100644 --- a/packages/plugin-request/src/module.ts +++ b/packages/plugin-request/src/module.ts @@ -12,16 +12,16 @@ const module = ({ appConfig }) => { // Add a request interceptor if (interceptors.request) { axiosInstance.interceptors.request.use( - interceptors.request.onConfig || function(){}, - interceptors.request.onError || function() {} + interceptors.request.onConfig || function(config){ return config; }, + interceptors.request.onError || function(error) { return Promise.reject(error); } ); } // Add a response interceptor if (interceptors.response) { axiosInstance.interceptors.response.use( - interceptors.response.onConfig || function(){}, - interceptors.response.onError || function(){} + interceptors.response.onConfig || function(response){ return response; }, + interceptors.response.onError || function(error){ return Promise.reject(error); } ); } } diff --git a/packages/plugin-request/request/types.ts b/packages/plugin-request/src/types/base.ts similarity index 84% rename from packages/plugin-request/request/types.ts rename to packages/plugin-request/src/types/base.ts index bb488db..37c1481 100644 --- a/packages/plugin-request/request/types.ts +++ b/packages/plugin-request/src/types/base.ts @@ -14,7 +14,3 @@ export interface IInterceptors { request?: IInterceptorRequest; response?: IInterceptorResponse; } - -export interface IRequest extends AxiosRequestConfig { - interceptors?: IInterceptors; -} diff --git a/packages/plugin-request/src/types/index.ts b/packages/plugin-request/src/types/index.ts new file mode 100644 index 0000000..fcd4286 --- /dev/null +++ b/packages/plugin-request/src/types/index.ts @@ -0,0 +1,6 @@ +import { AxiosRequestConfig } from 'axios'; +import { IInterceptors } from './base'; + +export interface IRequest extends AxiosRequestConfig { + interceptors?: IInterceptors; +} \ No newline at end of file diff --git a/packages/plugin-rml/package.json b/packages/plugin-rml/package.json index 6ecf5ab..2b7e0ec 100644 --- a/packages/plugin-rml/package.json +++ b/packages/plugin-rml/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-rml", - "version": "1.1.9", + "version": "1.2.0", "description": "RML loader for icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-router/package.json b/packages/plugin-router/package.json index c817cd4..0a98cf5 100644 --- a/packages/plugin-router/package.json +++ b/packages/plugin-router/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-router", - "version": "1.1.9", + "version": "1.2.0", "description": "build-plugin-ice-router", "author": "ice-admin@alibaba-inc.com", "homepage": "", @@ -14,6 +14,7 @@ "fs-extra": "^8.1.0", "glob": "^7.1.6", "history": "^4.10.1", + "query-string": "^6.12.1", "react": "^16.12.0", "react-dom": "^16.12.0", "react-router-dom": "^5.1.2" @@ -24,6 +25,7 @@ "@types/glob": "^7.1.1", "@types/history": "^4.7.5", "@types/node": "^12.12.12", + "@types/react-router-dom": "^5.1.4", "typescript": "^3.7.2" }, "files": [ diff --git a/packages/plugin-router/src/collector/amender.ts b/packages/plugin-router/src/collector/amender.ts index 791ad2b..00393a1 100644 --- a/packages/plugin-router/src/collector/amender.ts +++ b/packages/plugin-router/src/collector/amender.ts @@ -10,7 +10,7 @@ import { formatPathForWin, transformComponentName, } from '../utils'; -import { ICollectItem } from '../types'; +import { ICollectItem } from '../types/collector'; /** * loop amend diff --git a/packages/plugin-router/src/collector/nest.ts b/packages/plugin-router/src/collector/nest.ts index 21244a3..b22e5dad 100644 --- a/packages/plugin-router/src/collector/nest.ts +++ b/packages/plugin-router/src/collector/nest.ts @@ -2,7 +2,7 @@ * @file nest. * @author tony7lee */ -import { ICollectItem } from '../types'; +import { ICollectItem } from '../types/collector'; /** * recursive nest loop for layout page diff --git a/packages/plugin-router/src/collector/splicer.ts b/packages/plugin-router/src/collector/splicer.ts index 8e0b8ab..f72d27f 100644 --- a/packages/plugin-router/src/collector/splicer.ts +++ b/packages/plugin-router/src/collector/splicer.ts @@ -4,7 +4,7 @@ */ import { fillTabWith } from '../utils'; -import { ICollectItem } from '../types'; +import { ICollectItem } from '../types/collector'; interface IPlayload { nestImports: string[]; @@ -29,7 +29,7 @@ function loopSplice(payload: IPlayload, collect: ICollectItem[], routerOptions) payload.indent += 2; // nest the array stucture - payload.nestSlice.push(`[`); + payload.nestSlice.push('['); // run loop collect.forEach(item => { const { @@ -63,7 +63,7 @@ ${indentTabs}{ // loop children loopSplice(payload, children, routerOptions); // children field end - payload.nestSlice.push(`,`); + payload.nestSlice.push(','); } // nest object end payload.nestSlice.push(` diff --git a/packages/plugin-router/src/collector/walker.ts b/packages/plugin-router/src/collector/walker.ts index 443b332..408923f 100644 --- a/packages/plugin-router/src/collector/walker.ts +++ b/packages/plugin-router/src/collector/walker.ts @@ -5,7 +5,7 @@ import * as path from 'path'; import * as fse from 'fs-extra'; -import { IIgore, IgnoreOptions, IgnoreType } from '../types'; +import { IIgore, IgnoreOptions, IgnoreType } from '../types/collector'; import { getPagePaths, upperCaseFirst, diff --git a/packages/plugin-router/src/index.ts b/packages/plugin-router/src/index.ts index 44a42f0..c9244fe 100644 --- a/packages/plugin-router/src/index.ts +++ b/packages/plugin-router/src/index.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as fse from 'fs-extra'; import { IPlugin } from '@alib/build-scripts'; -import { IRouterOptions } from './types'; +import { IRouterOptions } from './types/router'; import walker from './collector/walker'; // compatible with $ice/routes @@ -16,21 +16,15 @@ const plugin: IPlugin = ({ context, onGetWebpackConfig, modifyUserConfig, getVal // .tmp path const iceTempPath = getValue('ICE_TEMP'); const routerOptions = (userConfig.router || {}) as IRouterOptions; - let { configPath } = routerOptions; - - const isMpa = userConfig.mpa; + const { configPath } = routerOptions; + const { mpa: isMpa } = userConfig; const routesTempPath = path.join(iceTempPath, `routes.${projectType}`); - // if is mpa use empty router file - if (isMpa) { - fse.writeFileSync(routesTempPath, 'export default [];', 'utf-8'); - configPath = routesTempPath; - } - const { routesPath, isConfigRoutes } = applyMethod('getRoutes', { rootDir, tempDir: iceTempPath, configPath, - projectType + projectType, + isMpa }); // add babel plugins for ice lazy @@ -51,9 +45,12 @@ const plugin: IPlugin = ({ context, onGetWebpackConfig, modifyUserConfig, getVal applyMethod('addIceExport', { source: './router' }); // copy types - fse.copySync(path.join(__dirname, '../src/types/index.ts'), path.join(iceTempPath, 'router/types.ts')); - applyMethod('addIceTypesExport', { source: './router/types', specifier: '{ IAppRouterProps }', exportName: 'router?: IAppRouterProps' }); - + fse.copySync(path.join(__dirname, '../src/types/index.ts'), path.join(iceTempPath, 'router/types/index.ts')); + fse.copySync(path.join(__dirname, '../src/types/base.ts'), path.join(iceTempPath, 'router/types/base.ts')); + // set IAppRouterProps to IAppConfig + applyMethod('addIceAppConfigTypes', { source: './router/types', specifier: '{ IAppRouterProps }', exportName: 'router?: IAppRouterProps' }); + // export IRouterConfig to the public + applyMethod('addIceTypesExport', { source: './router/types' }); // modify webpack config onGetWebpackConfig((config) => { // add alias diff --git a/packages/plugin-router/src/module.tsx b/packages/plugin-router/src/module.tsx index 26801e4..92602dc 100644 --- a/packages/plugin-router/src/module.tsx +++ b/packages/plugin-router/src/module.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; import defaultRoutes from '$ice/routes'; import { IceRouter } from './runtime/Router'; -import formatRoutes, { wrapperPage, wrapperPageWithSSR } from './runtime/formatRoutes'; +import formatRoutes, { wrapperPageWithCSR, wrapperPageWithSSR } from './runtime/formatRoutes'; const module = ({ setRenderRouter, appConfig, modifyRoutes, wrapperRouteComponent, buildConfig, context }) => { const { router: appConfigRouter = {} } = appConfig; @@ -11,7 +11,7 @@ const module = ({ setRenderRouter, appConfig, modifyRoutes, wrapperRouteComponen return formatRoutes(appConfigRouter.routes || defaultRoutes, ''); }); - const wrapperPageFn = process.env.__IS_SERVER__ ? wrapperPageWithSSR(context, defaultRoutes) : wrapperPage; + const wrapperPageFn = process.env.__IS_SERVER__ ? wrapperPageWithSSR(context, defaultRoutes, appConfig) : wrapperPageWithCSR(appConfig); wrapperRouteComponent(wrapperPageFn); if (appConfigRouter.modifyRoutes) { modifyRoutes(appConfigRouter.modifyRoutes); diff --git a/packages/plugin-router/src/runtime/Router.tsx b/packages/plugin-router/src/runtime/Router.tsx index c07f541..72c9469 100644 --- a/packages/plugin-router/src/runtime/Router.tsx +++ b/packages/plugin-router/src/runtime/Router.tsx @@ -9,7 +9,9 @@ import { RouteComponentProps } from 'react-router-dom'; -import { RoutesProps, RouterProps, IRouteWrapper, IDynamicImportComponent, RouteItemProps, IRenderRouteProps } from '../types'; +import { RoutesProps, RouterProps } from '../types/router'; +import { IRouteWrapper, IDynamicImportComponent, RouteItemProps } from '../types/base'; +import { IRouterConfig } from '../types'; function wrapperRoute(component, routerWrappers) { return (routerWrappers || []).reduce((acc, curr) => { @@ -37,7 +39,7 @@ function getRouteComponent(component, routerWrappers?: IRouteWrapper[]) { function parseRoutes(routes: RouteItemProps[]) { return routes.map((route) => { const { children, component, routeWrappers, ...others } = route; - const parsedRoute: IRenderRouteProps = { ...others }; + const parsedRoute: IRouterConfig = { ...others }; if (component) { parsedRoute.component = getRouteComponent(component, children ? [] : routeWrappers); } @@ -50,15 +52,17 @@ function parseRoutes(routes: RouteItemProps[]) { export function IceRouter(props: RouterProps) { const { type, routes, fallback, ...others } = props; - const RouterComponent = type === 'static' ? StaticRouter : Router; - // parse routes before render const parsedRoutes = parseRoutes(routes); - return ( - - - - ); + + const children = ; + return type === 'static' ? + + {children} + : + + {children} + ; } function Routes({ routes, fallback }: RoutesProps) { diff --git a/packages/plugin-router/src/runtime/formatRoutes.tsx b/packages/plugin-router/src/runtime/formatRoutes.tsx index 3fca778..4cf15f7 100644 --- a/packages/plugin-router/src/runtime/formatRoutes.tsx +++ b/packages/plugin-router/src/runtime/formatRoutes.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import * as path from 'path'; +import * as queryString from 'query-string'; import { matchPath } from 'react-router-dom'; const { useEffect, useState } = React; @@ -21,12 +22,14 @@ export default function formatRoutes(routes, parentPath) { }); } -export function wrapperPageWithSSR(context, routes) { +export function wrapperPageWithSSR(context, routes, appConfig) { const pageInitialProps = { ...context.pageInitialProps }; + const { app: { parseSearchParams } } = appConfig; const WrapperPageFn = () => { const ServerWrapperedPage = (props) => { + const searchParams = getSearchParams(parseSearchParams, props.location.search); const MatchedPageComponent = getComponentByPath(routes, context.pathname); - return ; + return ; }; return ServerWrapperedPage; }; @@ -34,37 +37,42 @@ export function wrapperPageWithSSR(context, routes) { } -export function wrapperPage(PageComponent) { - const { pageConfig } = PageComponent; - const { title, scrollToTop } = pageConfig || {}; +export function wrapperPageWithCSR(appConfig) { + const wrapperPage = (PageComponent) => { + const { app: { parseSearchParams } } = appConfig; + const { pageConfig } = PageComponent; + const { title, scrollToTop } = pageConfig || {}; - const RouterWrapperedPage = (props) => { - const [data, setData] = useState((window as any).__ICE_PAGE_PROPS__); - useEffect(() => { - if (title) { - document.title = title; - } + const RouterWrapperedPage = (props) => { + const searchParams = getSearchParams(parseSearchParams, props.location.search); + const [data, setData] = useState((window as any).__ICE_PAGE_PROPS__); + useEffect(() => { + if (title) { + document.title = title; + } - if (scrollToTop) { - window.scrollTo(0, 0); - } + if (scrollToTop) { + window.scrollTo(0, 0); + } - // When enter the page for the first time, need to use window.__ICE_PAGE_PROPS__ as props - // And don't need to re-request to switch routes - // Set the data to null after use, otherwise other pages will use - if ((window as any).__ICE_PAGE_PROPS__) { - (window as any).__ICE_PAGE_PROPS__ = null; - } else if (PageComponent.getInitialProps) { - // When the server does not return data, the client calls getinitialprops - (async () => { - const result = await PageComponent.getInitialProps(); - setData(result); - })(); - } - }, []); - return ; + // When enter the page for the first time, need to use window.__ICE_PAGE_PROPS__ as props + // And don't need to re-request to switch routes + // Set the data to null after use, otherwise other pages will use + if ((window as any).__ICE_PAGE_PROPS__) { + (window as any).__ICE_PAGE_PROPS__ = null; + } else if (PageComponent.getInitialProps) { + // When the server does not return data, the client calls getinitialprops + (async () => { + const result = await PageComponent.getInitialProps(); + setData(result); + })(); + } + }, []); + return ; + }; + return RouterWrapperedPage; }; - return RouterWrapperedPage; + return wrapperPage; } function getComponentByPath(routes, currPath) { @@ -77,3 +85,10 @@ function getComponentByPath(routes, currPath) { const matchedRoute = findMatchRoute(routes); return matchedRoute && matchedRoute.component; } + +function getSearchParams(parseSearchParams, locationSearch) { + if (parseSearchParams) { + const searchParams = queryString.parse(locationSearch); + return { searchParams }; + } +} diff --git a/packages/plugin-router/src/types/base.ts b/packages/plugin-router/src/types/base.ts new file mode 100644 index 0000000..a596829 --- /dev/null +++ b/packages/plugin-router/src/types/base.ts @@ -0,0 +1,33 @@ +import { + RouteProps as DefaultRouteProps, + RouteComponentProps, +} from 'react-router-dom'; + +interface IModifyFn { + (routes: RouteItemProps[]): RouteItemProps[]; +} + +export interface IModifyRoutes { + (modifyFn: IModifyFn): void; +} + +export interface IRouteWrapper { + (props: any): React.ComponentType; +} + +export interface IDynamicImportComponent { + __LAZY__: boolean; + dynamicImport: () => Promise<{ default: React.ComponentType }>; +} + +export interface RouteItemProps extends Omit { + children?: RouteItemProps[]; + // disable string[] + path?: string; + // for rediect ability + redirect?: string; + + component?: React.ComponentType> | React.ComponentType | IDynamicImportComponent; + + routeWrappers?: IRouteWrapper[]; +}; diff --git a/packages/plugin-router/src/types/collector.ts b/packages/plugin-router/src/types/collector.ts new file mode 100644 index 0000000..dc47a77 --- /dev/null +++ b/packages/plugin-router/src/types/collector.ts @@ -0,0 +1,16 @@ +export interface ICollectItem { + routePath: string; + component: string; + filePath: string; + isLayoutLike: boolean; + exact?: string; + routePathAmend?: string; + children?: ICollectItem[]; +} + +export interface IIgore { + pattern: RegExp; + attributes?: string; +} +export type IgnoreType = string | IIgore; +export type IgnoreOptions = IgnoreType | IgnoreType[]; diff --git a/packages/plugin-router/src/types/index.ts b/packages/plugin-router/src/types/index.ts index efdcd57..a8c2914 100644 --- a/packages/plugin-router/src/types/index.ts +++ b/packages/plugin-router/src/types/index.ts @@ -3,63 +3,7 @@ import { RouteComponentProps, } from 'react-router-dom'; import { History } from 'history'; - -export interface IDynamicImportComponent { - __LAZY__: boolean; - dynamicImport: () => Promise<{ default: React.ComponentType }>; -} - -export interface IRouteWrapper { - (props: any): React.ComponentType; -} - -export interface RouteItemProps extends DefaultRouteProps { - children?: RouteItemProps[]; - // disable string[] - path?: string; - // for rediect ability - redirect?: string; - - component?: React.ComponentType> | React.ComponentType | IDynamicImportComponent; - - routeWrappers?: IRouteWrapper[]; -}; - -export interface IRenderRouteProps extends DefaultRouteProps { - children?: IRenderRouteProps[]; - // disable string[] - path?: string; - // for rediect ability - redirect?: string; - - component?: React.ComponentType> | React.ComponentType; -} - -export interface RouterProps { - // custom props - routes: RouteItemProps[]; - type?: 'hash' | 'browser' | 'memory' | 'static'; - // common props for BrowserRouter&HashRouter&MemoryRouter - basename?: string; - getUserConfirmation?: ((message: string, callback: (ok: boolean) => void) => void); - forceRefresh?: boolean; - // for BrowserRouter - keyLength?: number; - // for HashRouter - hashType?: 'slash' | 'noslash' | 'hashbang'; - // for MemoryRouter - initialEntries?: string[]; - initialIndex?: number; - fallback?: React.ReactNode; -}; - -interface IModifyFn { - (routes: RouteItemProps[]): RouteItemProps[]; -} - -export interface IModifyRoutes { - (modifyFn: IModifyFn): void; -} +import { RouteItemProps, IModifyRoutes } from './base'; export interface IAppRouterProps { type?: 'hash' | 'browser' | 'memory'; @@ -70,32 +14,12 @@ export interface IAppRouterProps { history?: History; } -export interface RoutesProps { - routes: IRenderRouteProps[]; - fallback?: React.ReactNode; -}; - -export interface IRouterOptions { - caseSensitive?: boolean; - ignoreRoutes?: IgnoreOptions; - ignorePaths?: IgnoreOptions; - configPath?: string; - lazy?: boolean; -} - -export interface ICollectItem { - routePath: string; - component: string; - filePath: string; - isLayoutLike: boolean; - exact?: string; - routePathAmend?: string; - children?: ICollectItem[]; -} +export interface IRouterConfig extends DefaultRouteProps { + children?: IRouterConfig[]; + // disable string[] + path?: string; + // for rediect ability + redirect?: string; -export interface IIgore { - pattern: RegExp; - attributes?: string; + component?: React.ComponentType> | React.ComponentType; } -export type IgnoreType = string | IIgore; -export type IgnoreOptions = IgnoreType | IgnoreType[]; diff --git a/packages/plugin-router/src/types/router.ts b/packages/plugin-router/src/types/router.ts new file mode 100644 index 0000000..b4615d8 --- /dev/null +++ b/packages/plugin-router/src/types/router.ts @@ -0,0 +1,35 @@ +import { History } from 'history'; +import { IgnoreOptions } from './collector'; +import { IRouterConfig } from '.'; +import { RouteItemProps } from './base'; + +export interface RouterProps { + routes: RouteItemProps[]; + type?: 'hash' | 'browser' | 'memory' | 'static'; + // common props for BrowserRouter & HashRouter & MemoryRouter + basename?: string; + getUserConfirmation?: ((message: string, callback: (ok: boolean) => void) => void); + forceRefresh?: boolean; + // for BrowserRouter + keyLength?: number; + // for HashRouter + hashType?: 'slash' | 'noslash' | 'hashbang'; + // for MemoryRouter + initialEntries?: string[]; + initialIndex?: number; + fallback?: React.ReactNode; + history: History; +}; + +export interface RoutesProps { + routes: IRouterConfig[]; + fallback?: React.ReactNode; +}; + +export interface IRouterOptions { + caseSensitive?: boolean; + ignoreRoutes?: IgnoreOptions; + ignorePaths?: IgnoreOptions; + configPath?: string; + lazy?: boolean; +} \ No newline at end of file diff --git a/packages/plugin-router/templates/index.ts b/packages/plugin-router/templates/index.ts index 3e0e4c5..1ae7939 100644 --- a/packages/plugin-router/templates/index.ts +++ b/packages/plugin-router/templates/index.ts @@ -1,2 +1,4 @@ export * from './react-router-dom'; export * from './history'; +export * from './useSearchParams'; +export * from './withSearchParams'; diff --git a/packages/plugin-router/templates/useSearchParams.ts b/packages/plugin-router/templates/useSearchParams.ts new file mode 100644 index 0000000..3e8a325 --- /dev/null +++ b/packages/plugin-router/templates/useSearchParams.ts @@ -0,0 +1,7 @@ +import { useLocation } from 'react-router-dom'; +import * as queryString from 'query-string'; + +export const useSearchParams = () => { + const location = useLocation(); + return queryString.parse(location.search); +}; diff --git a/packages/plugin-router/templates/withSearchParams.tsx b/packages/plugin-router/templates/withSearchParams.tsx new file mode 100644 index 0000000..0f2ca58 --- /dev/null +++ b/packages/plugin-router/templates/withSearchParams.tsx @@ -0,0 +1,12 @@ +import React from 'react'; +import { useLocation } from 'react-router-dom'; +import * as queryString from 'query-string'; + +export const withSearchParams = Component => { + const SearchParamsWrappered = props => { + const location = useLocation(); + const searchParams = queryString.parse(location.search); + return ; + }; + return SearchParamsWrappered; +}; diff --git a/packages/plugin-service/package.json b/packages/plugin-service/package.json index fc4282d..01c7fee 100644 --- a/packages/plugin-service/package.json +++ b/packages/plugin-service/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-service", - "version": "1.1.9", + "version": "1.2.0", "description": "service pulgin", "author": "ice-admin@alibaba-inc.com", "homepage": "https://github.com/ice-lab/icejs#readme", diff --git a/packages/plugin-ssr/package.json b/packages/plugin-ssr/package.json index 80e318e..b6ae094 100644 --- a/packages/plugin-ssr/package.json +++ b/packages/plugin-ssr/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-ssr", - "version": "1.1.9", + "version": "1.2.0", "description": "ssr plugin", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-ssr/src/index.ts b/packages/plugin-ssr/src/index.ts index 7b9857c..017bbf4 100644 --- a/packages/plugin-ssr/src/index.ts +++ b/packages/plugin-ssr/src/index.ts @@ -135,6 +135,7 @@ const plugin = async (api): Promise => { const htmlFilePath = path.join(buildDir, 'index.html'); const bundle = fse.readFileSync(serverFilePath, 'utf-8'); const html = fse.readFileSync(htmlFilePath, 'utf-8'); + // eslint-disable-next-line quotes const minifedHtml = minify(html, { collapseWhitespace: true, quoteCharacter: "'" }); const newBundle = bundle.replace(/__ICE_SERVER_HTML_TEMPLATE__/, minifedHtml); fse.writeFileSync(serverFilePath, newBundle, 'utf-8'); diff --git a/packages/plugin-store/package.json b/packages/plugin-store/package.json index 5360b1d..1f1e2a7 100644 --- a/packages/plugin-store/package.json +++ b/packages/plugin-store/package.json @@ -1,6 +1,6 @@ { "name": "build-plugin-ice-store", - "version": "1.1.9", + "version": "1.2.0", "description": "builtin `icestore` in icejs", "author": "ice-admin@alibaba-inc.com", "homepage": "", diff --git a/packages/plugin-store/src/babelPluginReplacePath.ts b/packages/plugin-store/src/babelPluginReplacePath.ts index 8d5f40d..1f9c9ed 100644 --- a/packages/plugin-store/src/babelPluginReplacePath.ts +++ b/packages/plugin-store/src/babelPluginReplacePath.ts @@ -1,36 +1,39 @@ import * as path from 'path'; // match: -// eg: src/pages/home | src/pages/home/index(.tsx|.jsx) | src/pages/index(.tsx|jsx) -const pathRegExp = /src\/pages\/\w+((.tsx|.jsx?)$|(\/index(.tsx|.jsx?))?$)/; +// eg: src/pages/home | src/pages/home/index | src/pages/home/index(.tsx|.jsx) | src/pages/index(.tsx|jsx) +const pathRegExp = /src\/pages\/\w+((.tsx|.jsx?)$|(\/index(.tsx|.jsx?)?)?$)/; module.exports = ({ types: t }, { routesPath, alias, applyMethod }) => { return { visitor: { ImportDeclaration(nodePath, state) { - const isRoutesFile = (routesPath === state.filename); + const isRoutesFile = routesPath.includes(state.filename); if (isRoutesFile) { - const { source } = nodePath.node; - if (t.isStringLiteral(source)) { - const { value } = source; - // 约定式路由: - // e.g: import Home from '../src/pages/Home/index.tsx'; - // e.g: import Index from '../src/pages/index.tsx; - // 配置式路由: - // default alias: import Home from '@/pages/Home'; - // custom alias: import Home from '$pages/Home'; - // relative path: import Home from '../pages/Home' - const newValue = formatPagePath({ routesPath, value, alias, applyMethod }); - // replace to: import Home from 'ice/pages/Home' - if (newValue) { - replaceWith(t, nodePath, newValue); + const { source, specifiers } = nodePath.node; + // issue: https://github.com/ice-lab/icejs/issues/271 + if (t.isImportDefaultSpecifier(specifiers[0]) && specifiers.length === 1) { + if (t.isStringLiteral(source)) { + const { value } = source; + // 约定式路由: + // e.g: import Home from '../src/pages/Home/index.tsx'; + // e.g: import Index from '../src/pages/index.tsx; + // 配置式路由: + // default alias: import Home from '@/pages/Home'; + // custom alias: import Home from '$pages/Home'; + // relative path: import Home from '../pages/Home' + const newValue = formatPagePath({ routesPath: state.filename, value, alias, applyMethod }); + // replace to: import Home from 'ice/pages/Home' + if (newValue) { + replaceWith(t, nodePath, newValue); + } } } } }, CallExpression(nodePath, state) { - const isRoutesFile = (routesPath === state.filename); + const isRoutesFile = routesPath.includes(state.filename); if (isRoutesFile) { if (t.isImport(nodePath.node.callee)) { const args = nodePath.node.arguments; @@ -43,7 +46,7 @@ module.exports = ({ types: t }, { routesPath, alias, applyMethod }) => { // default alias: const Home = lazy(() => import('@/pages/Home')); // custom alias: const Home = lazy(() => import('$pages/home)); // relative path: const Home = lazy(() => import('../pages/Home')); - const newValue = formatPagePath({ routesPath, value, alias, applyMethod }); + const newValue = formatPagePath({ routesPath: state.filename, value, alias, applyMethod }); // replace to: const Home =lazy (() => import('ice/Home/Home')); if (newValue) { args[i].value = newValue; @@ -117,7 +120,6 @@ function formatPagePath({ routesPath, value, alias, applyMethod }: IGetConfigRou const [, , pageName] = matchedPagePath.split('/'); newValue = pageName ? `ice/${pageName}/${pageName}` : ''; } - return newValue; } } diff --git a/packages/plugin-store/src/index.ts b/packages/plugin-store/src/index.ts index 194d7f9..86fbb50 100644 --- a/packages/plugin-store/src/index.ts +++ b/packages/plugin-store/src/index.ts @@ -16,7 +16,7 @@ export default async (api) => { const projectType = getValue('PROJECT_TYPE'); // set IStore to IAppConfig - applyMethod('addIceTypesExport', { source: './store', specifier: '{ IStore }', exportName: 'store?: IStore' }); + applyMethod('addIceAppConfigTypes', { source: './store/types', specifier: '{ IStore }', exportName: 'store?: IStore' }); // render template/types.ts.ejs to .ice/store/types.ts const typesTemplateContent = fse.readFileSync(typesTemplatePath, 'utf-8'); @@ -28,18 +28,34 @@ export default async (api) => { // add babel plugins for ice lazy const { configPath } = userConfig.router || {}; - const { routesPath } = applyMethod('getRoutes', { + const { mpa: isMpa } = userConfig; + let { routesPath } = applyMethod('getRoutes', { rootDir, tempDir: targetPath, configPath, - projectType + projectType, + isMpa }); + + if (isMpa) { + const routesFile = `routes.${projectType}`; + const pagesPath = path.join(rootDir, 'src', 'pages'); + const pages = applyMethod('getPages', rootDir); + const pagesRoutePath = pages.map(pageName => { + return path.join(pagesPath, pageName, routesFile); + }); + routesPath = pagesRoutePath; + } modifyUserConfig('babelPlugins', [ ...(userConfig.babelPlugins as [] || []), [ require.resolve('./babelPluginReplacePath'), - { routesPath, alias: userConfig.alias, applyMethod } + { + routesPath, + alias: userConfig.alias, + applyMethod + } ] ] ); diff --git a/packages/plugin-store/src/template/appStore.ts.ejs b/packages/plugin-store/src/template/appStore.ts.ejs index d99aad9..fead236 100644 --- a/packages/plugin-store/src/template/appStore.ts.ejs +++ b/packages/plugin-store/src/template/appStore.ts.ejs @@ -1,5 +1,5 @@ <% if (importStr) { %> - import { createStore, IcestoreRootState, IcestoreDispatch, Models } from '@ice/store'; + import { createStore, Models } from '@ice/store'; <%- importStr %> interface AppModel extends Models { @@ -12,17 +12,7 @@ const appModel: AppModel = { <%- modelsStr %> }; const store = createStore(appModel); - export default store; - export type IRootDispatch = IcestoreDispatch; - export type IRootState = IcestoreRootState; + export { appModel }; + export default store; <% } %> - -interface IInitialStates { - [key: string]: any; -} - -export interface IStore { - initialStates?: IInitialStates; - getInitialStates?: (initialData) => IInitialStates; -} diff --git a/packages/plugin-store/src/template/types.ts.ejs b/packages/plugin-store/src/template/types.ts.ejs index d6567f9..d465ae8 100644 --- a/packages/plugin-store/src/template/types.ts.ejs +++ b/packages/plugin-store/src/template/types.ts.ejs @@ -1,4 +1,14 @@ -import * as types from '../appStore'; +import { IcestoreRootState, IcestoreDispatch } from '@ice/store'; +import { appModel } from '.'; -export type IRootDispatch = types.IRootDispatch; -export type IRootState = types.IRootState; +export type IRootDispatch = IcestoreDispatch; +export type IRootState = IcestoreRootState; + +interface IInitialStates { + [key: string]: any; +} + +export interface IStore { + initialStates?: IInitialStates; + getInitialStates?: (initialData) => IInitialStates; +} diff --git a/scripts/dependency-check.ts b/scripts/dependency-check.ts index 043c53b..1e2928b 100644 --- a/scripts/dependency-check.ts +++ b/scripts/dependency-check.ts @@ -13,6 +13,6 @@ const chalk = require('chalk'); }); }); })().catch((e) => { - console.log(chalk.red(`\n ⚠️ ⚠️ ⚠️ 依赖检查失败\n\n`), e); + console.log(chalk.red('\n ⚠️ ⚠️ ⚠️ 依赖检查失败\n\n'), e); process.exit(128); }); diff --git a/scripts/publish.ts b/scripts/publish.ts index 94c69f1..fdff316 100644 --- a/scripts/publish.ts +++ b/scripts/publish.ts @@ -51,11 +51,11 @@ async function publish() { } }); - log(`5. 🔖 🔖 🔖 Commit changes...`); + log('5. 🔖 🔖 🔖 Commit changes...'); await run(`git commit --all -m v${newVersion}`); await run('git push'); - log(`\n\n 🎉 🎉 🎉 Published successfully...`); + log('\n\n 🎉 🎉 🎉 Published successfully...'); log('6. 💡 💡 💡 Start syncing...'); await run('npm run sync'); diff --git a/scripts/rollback.ts b/scripts/rollback.ts index 577f133..91a556b 100644 --- a/scripts/rollback.ts +++ b/scripts/rollback.ts @@ -16,6 +16,6 @@ const chalk = require('chalk'); console.log(); }); })().catch((e) => { - console.log(chalk.red(`\n ⚠️ ⚠️ ⚠️ rollback failed\n\n`), e); + console.log(chalk.red('\n ⚠️ ⚠️ ⚠️ rollback failed\n\n'), e); process.exit(128); }); diff --git a/yarn.lock b/yarn.lock index 25a3a19..ee72840 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,7 +55,7 @@ invariant "^2.2.4" semver "^5.5.0" -"@babel/core@>=7.2.2", "@babel/core@^7.1.0": +"@babel/core@>=7.2.2", "@babel/core@^7.1.0", "@babel/core@^7.7.7": version "7.9.0" resolved "https://registry.npm.taobao.org/@babel/core/download/@babel/core-7.9.0.tgz?cache=0&sync_timestamp=1584720334651&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fcore%2Fdownload%2F%40babel%2Fcore-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e" integrity sha1-rJd7U4t34TL/cG87ik260JwDxW4= @@ -320,7 +320,7 @@ "@babel/helper-remap-async-to-generator" "^7.8.3" "@babel/plugin-syntax-async-generators" "^7.8.0" -"@babel/plugin-proposal-class-properties@^7.1.0": +"@babel/plugin-proposal-class-properties@^7.1.0", "@babel/plugin-proposal-class-properties@^7.7.4": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-class-properties/download/@babel/plugin-proposal-class-properties-7.8.3.tgz?cache=0&sync_timestamp=1578953962040&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-class-properties%2Fdownload%2F%40babel%2Fplugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e" integrity sha1-XgZlSvXNBLYIkVqtqbKmeIAERk4= @@ -328,7 +328,7 @@ "@babel/helper-create-class-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-proposal-decorators@^7.1.2": +"@babel/plugin-proposal-decorators@^7.1.2", "@babel/plugin-proposal-decorators@^7.7.4": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-decorators/download/@babel/plugin-proposal-decorators-7.8.3.tgz?cache=0&sync_timestamp=1578953963051&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-decorators%2Fdownload%2F%40babel%2Fplugin-proposal-decorators-7.8.3.tgz#2156860ab65c5abf068c3f67042184041066543e" integrity sha1-IVaGCrZcWr8GjD9nBCGEBBBmVD4= @@ -353,7 +353,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-dynamic-import" "^7.8.0" -"@babel/plugin-proposal-export-default-from@^7.0.0": +"@babel/plugin-proposal-export-default-from@^7.0.0", "@babel/plugin-proposal-export-default-from@^7.7.4": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-export-default-from/download/@babel/plugin-proposal-export-default-from-7.8.3.tgz#4cb7c2fdeaed490b60d9bfd3dc8a20f81f9c2e7c" integrity sha1-TLfC/ertSQtg2b/T3Iog+B+cLnw= @@ -361,7 +361,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-export-default-from" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.0.0": +"@babel/plugin-proposal-export-namespace-from@^7.0.0", "@babel/plugin-proposal-export-namespace-from@^7.7.4": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-export-namespace-from/download/@babel/plugin-proposal-export-namespace-from-7.8.3.tgz#63ad57265d0e3912afd666eb44ce26fa8cd2c774" integrity sha1-Y61XJl0OORKv1mbrRM4m+ozSx3Q= @@ -369,7 +369,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-function-bind@^7.0.0": +"@babel/plugin-proposal-function-bind@^7.0.0", "@babel/plugin-proposal-function-bind@^7.7.4": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-function-bind/download/@babel/plugin-proposal-function-bind-7.8.3.tgz#e34a1e984771b84b6e5322745edeadca7e500ced" integrity sha1-40oemEdxuEtuUyJ0Xt6tyn5QDO0= @@ -402,7 +402,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.8.3" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.0.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.7.4", "@babel/plugin-proposal-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-nullish-coalescing-operator/download/@babel/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz#e4572253fdeed65cddeecfdab3f928afeb2fd5d2" integrity sha1-5FciU/3u1lzd7s/as/kor+sv1dI= @@ -435,7 +435,7 @@ "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.0" -"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.9.0": +"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.7.5", "@babel/plugin-proposal-optional-chaining@^7.9.0": version "7.9.0" resolved "https://registry.npm.taobao.org/@babel/plugin-proposal-optional-chaining/download/@babel/plugin-proposal-optional-chaining-7.9.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fplugin-proposal-optional-chaining%2Fdownload%2F%40babel%2Fplugin-proposal-optional-chaining-7.9.0.tgz#31db16b154c39d6b8a645292472b98394c292a58" integrity sha1-MdsWsVTDnWuKZFKSRyuYOUwpKlg= @@ -488,7 +488,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-syntax-dynamic-import@^7.0.0", "@babel/plugin-syntax-dynamic-import@^7.8.0": +"@babel/plugin-syntax-dynamic-import@^7.0.0", "@babel/plugin-syntax-dynamic-import@^7.7.4", "@babel/plugin-syntax-dynamic-import@^7.8.0": version "7.8.3" resolved "https://registry.npm.taobao.org/@babel/plugin-syntax-dynamic-import/download/@babel/plugin-syntax-dynamic-import-7.8.3.tgz#62bf98b2da3cd21d626154fc96ee5b3cb68eacb3" integrity sha1-Yr+Ysto80h1iYVT8lu5bPLaOrLM= @@ -870,7 +870,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.3" -"@babel/plugin-transform-runtime@^7.1.0", "@babel/plugin-transform-runtime@^7.6.2": +"@babel/plugin-transform-runtime@^7.1.0", "@babel/plugin-transform-runtime@^7.6.2", "@babel/plugin-transform-runtime@^7.7.6": version "7.9.0" resolved "https://registry.npm.taobao.org/@babel/plugin-transform-runtime/download/@babel/plugin-transform-runtime-7.9.0.tgz#45468c0ae74cc13204e1d3b1f4ce6ee83258af0b" integrity sha1-RUaMCudMwTIE4dOx9M5u6DJYrws= @@ -934,7 +934,7 @@ "@babel/helper-create-regexp-features-plugin" "^7.8.3" "@babel/helper-plugin-utils" "^7.8.3" -"@babel/preset-env@^7.4.0": +"@babel/preset-env@^7.4.0", "@babel/preset-env@^7.7.7": version "7.9.5" resolved "https://registry.npm.taobao.org/@babel/preset-env/download/@babel/preset-env-7.9.5.tgz#8ddc76039bc45b774b19e2fc548f6807d8a8919f" integrity sha1-jdx2A5vEW3dLGeL8VI9oB9iokZ8= @@ -1000,7 +1000,7 @@ levenary "^1.1.1" semver "^5.5.0" -"@babel/preset-flow@^7.0.0": +"@babel/preset-flow@^7.0.0", "@babel/preset-flow@^7.7.4": version "7.9.0" resolved "https://registry.npm.taobao.org/@babel/preset-flow/download/@babel/preset-flow-7.9.0.tgz?cache=0&sync_timestamp=1584718993060&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-flow%2Fdownload%2F%40babel%2Fpreset-flow-7.9.0.tgz#fee847c3e090b0b2d9227c1949e4da1d1379280d" integrity sha1-/uhHw+CQsLLZInwZSeTaHRN5KA0= @@ -1019,7 +1019,7 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-react@^7.0.0": +"@babel/preset-react@^7.0.0", "@babel/preset-react@^7.7.4": version "7.9.4" resolved "https://registry.npm.taobao.org/@babel/preset-react/download/@babel/preset-react-7.9.4.tgz?cache=0&sync_timestamp=1585038764360&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Fpreset-react%2Fdownload%2F%40babel%2Fpreset-react-7.9.4.tgz#c6c97693ac65b6b9c0b4f25b948a8f665463014d" integrity sha1-xsl2k6xltrnAtPJblIqPZlRjAU0= @@ -1078,7 +1078,7 @@ globals "^11.1.0" lodash "^4.17.13" -"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": +"@babel/types@^7.0.0", "@babel/types@^7.3.0", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.0", "@babel/types@^7.7.0", "@babel/types@^7.7.4", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5": version "7.9.5" resolved "https://registry.npm.taobao.org/@babel/types/download/@babel/types-7.9.5.tgz?cache=0&sync_timestamp=1586287913117&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40babel%2Ftypes%2Fdownload%2F%40babel%2Ftypes-7.9.5.tgz#89231f82915a8a566a703b3b20133f73da6b9444" integrity sha1-iSMfgpFailZqcDs7IBM/c9prlEQ= @@ -1304,27 +1304,27 @@ resolved "https://registry.npm.taobao.org/@ice/sandbox/download/@ice/sandbox-1.0.2.tgz#8806bcb7d51a4e9ad1a25cd721a5946ea8d1a639" integrity sha1-iAa8t9UaTprRolzXIaWUbqjRpjk= -"@ice/spec@^0.1.9": - version "0.1.9" - resolved "https://registry.npm.taobao.org/@ice/spec/download/@ice/spec-0.1.9.tgz#a558cd2226c3edffb05cd2c607385b71e5d067b0" - integrity sha1-pVjNIibD7f+wXNLGBzhbceXQZ7A= +"@ice/spec@^1.0.0": + version "1.0.1" + resolved "https://registry.npm.taobao.org/@ice/spec/download/@ice/spec-1.0.1.tgz#b65652889ec2754c189ced5ff15b806ddb622bb3" + integrity sha1-tlZSiJ7CdUwYnO1f8VuAbdtiK7M= dependencies: "@commitlint/config-conventional" "^8.1.0" - "@typescript-eslint/eslint-plugin" "^1.11.0" - "@typescript-eslint/parser" "^1.11.0" + "@typescript-eslint/eslint-plugin" "^2.20.0" + "@typescript-eslint/parser" "^2.20.0" babel-eslint "^10.0.2" - eslint-config-airbnb "^17.1.1" + eslint-config-airbnb "^18.0.1" eslint-config-prettier "^6.0.0" eslint-plugin-import "^2.18.0" eslint-plugin-jsx-a11y "^6.2.3" eslint-plugin-react "^7.14.2" - eslint-plugin-react-hooks "^1.6.1" - stylelint-config-css-modules "^1.4.0" - stylelint-config-prettier "^5.2.0" + eslint-plugin-react-hooks "^2.4.0" + stylelint-config-css-modules "^2.2.0" + stylelint-config-prettier "^8.0.1" stylelint-config-rational-order "^0.1.2" - stylelint-config-standard "^18.3.0" - stylelint-order "^3.0.0" - stylelint-scss "^3.8.0" + stylelint-config-standard "^20.0.0" + stylelint-order "^4.0.0" + stylelint-scss "^3.14.2" "@ice/stark-app@^1.2.0": version "1.2.0" @@ -2339,6 +2339,40 @@ dependencies: "@types/node" ">= 8" +"@reactml/loader@^0.1.1": + version "0.1.3" + resolved "https://registry.npm.taobao.org/@reactml/loader/download/@reactml/loader-0.1.3.tgz#841ec7a988b50d7ed3359737ba2e3b580ef7d621" + integrity sha1-hB7HqYi1DX7TNZc3ui47WA731iE= + dependencies: + "@babel/core" "^7.7.7" + "@babel/plugin-proposal-class-properties" "^7.7.4" + "@babel/plugin-proposal-decorators" "^7.7.4" + "@babel/plugin-proposal-export-default-from" "^7.7.4" + "@babel/plugin-proposal-export-namespace-from" "^7.7.4" + "@babel/plugin-proposal-function-bind" "^7.7.4" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.7.4" + "@babel/plugin-proposal-optional-chaining" "^7.7.5" + "@babel/plugin-syntax-dynamic-import" "^7.7.4" + "@babel/plugin-transform-runtime" "^7.7.6" + "@babel/preset-env" "^7.7.7" + "@babel/preset-flow" "^7.7.4" + "@babel/preset-react" "^7.7.4" + "@babel/types" "^7.7.4" + babel-merge "^3.0.0" + babel-plugin-minify-dead-code-elimination "^0.5.1" + babel-plugin-transform-jsx-class "^0.1.3" + babel-plugin-transform-jsx-condition "^0.1.2" + babel-plugin-transform-jsx-fragment "^0.1.3" + babel-plugin-transform-jsx-list "^0.1.2" + babel-plugin-transform-jsx-memo "^0.1.3" + babel-plugin-transform-jsx-slot "^0.1.1" + babel-plugin-transform-jsx-stylesheet "^0.6.9" + babel-runtime-jsx-plus "^0.1.4" + chalk "^3.0.0" + htmlparser2 "^3.10.1" + loader-utils "^1.2.3" + stylesheet-loader "^0.6.10" + "@rematch/core@^1.3.0": version "1.4.0" resolved "https://registry.npm.taobao.org/@rematch/core/download/@rematch/core-1.4.0.tgz#686ce814e1cf125029c5e9fba23ef3ab7c3eb2a7" @@ -2415,7 +2449,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/history@^4.7.5": +"@types/history@*", "@types/history@^4.7.5": version "4.7.5" resolved "https://registry.npm.taobao.org/@types/history/download/@types/history-4.7.5.tgz#527d20ef68571a4af02ed74350164e7a67544860" integrity sha1-Un0g72hXGkrwLtdDUBZOemdUSGA= @@ -2498,6 +2532,23 @@ hoist-non-react-statics "^3.3.0" redux "^4.0.0" +"@types/react-router-dom@^5.1.4": + version "5.1.4" + resolved "https://registry.npm.taobao.org/@types/react-router-dom/download/@types/react-router-dom-5.1.4.tgz#8d3e0306df74af301cc896309e7d4758f1a4bf71" + integrity sha1-jT4DBt90rzAcyJYwnn1HWPGkv3E= + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react-router" "*" + +"@types/react-router@*": + version "5.1.5" + resolved "https://registry.npm.taobao.org/@types/react-router/download/@types/react-router-5.1.5.tgz#7b2f9b7cc3d350e92664c4e38c0ef529286fe628" + integrity sha1-ey+bfMPTUOkmZMTjjA71KShv5ig= + dependencies: + "@types/history" "*" + "@types/react" "*" + "@types/react@*", "@types/react@^16.9.19": version "16.9.34" resolved "https://registry.npm.taobao.org/@types/react/download/@types/react-16.9.34.tgz#f7d5e331c468f53affed17a8a4d488cd44ea9349" @@ -2549,43 +2600,48 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^1.11.0": - version "1.13.0" - resolved "https://registry.npm.taobao.org/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-1.13.0.tgz?cache=0&sync_timestamp=1586743059019&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Feslint-plugin%2Fdownload%2F%40typescript-eslint%2Feslint-plugin-1.13.0.tgz#22fed9b16ddfeb402fd7bcde56307820f6ebc49f" - integrity sha1-Iv7ZsW3f60Av17zeVjB4IPbrxJ8= +"@typescript-eslint/eslint-plugin@^2.20.0": + version "2.29.0" + resolved "https://registry.npm.taobao.org/@typescript-eslint/eslint-plugin/download/@typescript-eslint/eslint-plugin-2.29.0.tgz#c9efab7624e3dd6d144a0e4577a541d1bd42c2ac" + integrity sha1-ye+rdiTj3W0USg5Fd6VB0b1Cwqw= dependencies: - "@typescript-eslint/experimental-utils" "1.13.0" - eslint-utils "^1.3.1" + "@typescript-eslint/experimental-utils" "2.29.0" functional-red-black-tree "^1.0.1" - regexpp "^2.0.1" - tsutils "^3.7.0" + regexpp "^3.0.0" + tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@1.13.0": - version "1.13.0" - resolved "https://registry.npm.taobao.org/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-1.13.0.tgz?cache=0&sync_timestamp=1586742956309&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Fexperimental-utils%2Fdownload%2F%40typescript-eslint%2Fexperimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e" - integrity sha1-sIxg14DABn3i+0SwS0MvVAE4MB4= +"@typescript-eslint/experimental-utils@2.29.0": + version "2.29.0" + resolved "https://registry.npm.taobao.org/@typescript-eslint/experimental-utils/download/@typescript-eslint/experimental-utils-2.29.0.tgz#3cb8060de9265ba131625a96bbfec31ba6d4a0fe" + integrity sha1-PLgGDekmW6ExYlqWu/7DG6bUoP4= dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-scope "^4.0.0" + "@typescript-eslint/typescript-estree" "2.29.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" -"@typescript-eslint/parser@^1.11.0": - version "1.13.0" - resolved "https://registry.npm.taobao.org/@typescript-eslint/parser/download/@typescript-eslint/parser-1.13.0.tgz?cache=0&sync_timestamp=1586743057949&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Fparser%2Fdownload%2F%40typescript-eslint%2Fparser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" - integrity sha1-Yax4EepSeRxH3J/U3UoYT66aw1U= +"@typescript-eslint/parser@^2.20.0": + version "2.29.0" + resolved "https://registry.npm.taobao.org/@typescript-eslint/parser/download/@typescript-eslint/parser-2.29.0.tgz#6e3c4e21ed6393dc05b9d8b47f0b7e731ef21c9c" + integrity sha1-bjxOIe1jk9wFudi0fwt+cx7yHJw= dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.13.0" - "@typescript-eslint/typescript-estree" "1.13.0" - eslint-visitor-keys "^1.0.0" + "@typescript-eslint/experimental-utils" "2.29.0" + "@typescript-eslint/typescript-estree" "2.29.0" + eslint-visitor-keys "^1.1.0" -"@typescript-eslint/typescript-estree@1.13.0": - version "1.13.0" - resolved "https://registry.npm.taobao.org/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-1.13.0.tgz?cache=0&sync_timestamp=1586742956203&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40typescript-eslint%2Ftypescript-estree%2Fdownload%2F%40typescript-eslint%2Ftypescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" - integrity sha1-gUDxfQ9gwDYZeY8dYouENJE9wy4= +"@typescript-eslint/typescript-estree@2.29.0": + version "2.29.0" + resolved "https://registry.npm.taobao.org/@typescript-eslint/typescript-estree/download/@typescript-eslint/typescript-estree-2.29.0.tgz#1be6612bb02fc37ac9f466521c1459a4744e8d3a" + integrity sha1-G+ZhK7Avw3rJ9GZSHBRZpHROjTo= dependencies: - lodash.unescape "4.0.1" - semver "5.5.0" + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^6.3.0" + tsutils "^3.17.1" "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -3179,6 +3235,11 @@ asynckit@^0.4.0: resolved "https://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/at-least-node/download/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha1-YCzUtG6EStTv/JKoARo8RuAjjcI= + atob-lite@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/atob-lite/download/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696" @@ -3245,6 +3306,21 @@ babel-eslint@^10.0.2: eslint-visitor-keys "^1.0.0" resolve "^1.12.0" +babel-helper-evaluate-path@^0.5.0: + version "0.5.0" + resolved "https://registry.npm.taobao.org/babel-helper-evaluate-path/download/babel-helper-evaluate-path-0.5.0.tgz#a62fa9c4e64ff7ea5cea9353174ef023a900a67c" + integrity sha1-pi+pxOZP9+pc6pNTF07wI6kApnw= + +babel-helper-mark-eval-scopes@^0.4.3: + version "0.4.3" + resolved "https://registry.npm.taobao.org/babel-helper-mark-eval-scopes/download/babel-helper-mark-eval-scopes-0.4.3.tgz#d244a3bef9844872603ffb46e22ce8acdf551562" + integrity sha1-0kSjvvmESHJgP/tG4izorN9VFWI= + +babel-helper-remove-or-void@^0.4.3: + version "0.4.3" + resolved "https://registry.npm.taobao.org/babel-helper-remove-or-void/download/babel-helper-remove-or-void-0.4.3.tgz#a4f03b40077a0ffe88e45d07010dee241ff5ae60" + integrity sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA= + babel-jest@^24.9.0: version "24.9.0" resolved "https://registry.npm.taobao.org/babel-jest/download/babel-jest-24.9.0.tgz#3fc327cb8467b89d14d7bc70e315104a783ccd54" @@ -3269,6 +3345,14 @@ babel-loader@^8.0.6: pify "^4.0.1" schema-utils "^2.6.5" +babel-merge@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/babel-merge/download/babel-merge-3.0.0.tgz#9bd368d48116dab18b8f3e8022835479d80f3b50" + integrity sha1-m9No1IEW2rGLjz6AIoNUedgPO1A= + dependencies: + deepmerge "^2.2.1" + object.omit "^3.0.0" + babel-plugin-dynamic-import-node@^2.3.0: version "2.3.0" resolved "https://registry.npm.taobao.org/babel-plugin-dynamic-import-node/download/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f" @@ -3293,6 +3377,55 @@ babel-plugin-jest-hoist@^24.9.0: dependencies: "@types/babel__traverse" "^7.0.6" +babel-plugin-minify-dead-code-elimination@^0.5.1: + version "0.5.1" + resolved "https://registry.npm.taobao.org/babel-plugin-minify-dead-code-elimination/download/babel-plugin-minify-dead-code-elimination-0.5.1.tgz#1a0c68e44be30de4976ca69ffc535e08be13683f" + integrity sha1-Ggxo5EvjDeSXbKaf/FNeCL4TaD8= + dependencies: + babel-helper-evaluate-path "^0.5.0" + babel-helper-mark-eval-scopes "^0.4.3" + babel-helper-remove-or-void "^0.4.3" + lodash "^4.17.11" + +babel-plugin-transform-jsx-class@^0.1.3: + version "0.1.3" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-class/download/babel-plugin-transform-jsx-class-0.1.3.tgz#b59e501896280078a68fb8298b2968b060b86a6f" + integrity sha1-tZ5QGJYoAHimj7gpiylosGC4am8= + +babel-plugin-transform-jsx-condition@^0.1.2: + version "0.1.2" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-condition/download/babel-plugin-transform-jsx-condition-0.1.2.tgz#afea57fd319b42853029b57818f5f5d2b1ae4449" + integrity sha1-r+pX/TGbQoUwKbV4GPX10rGuREk= + +babel-plugin-transform-jsx-fragment@^0.1.3: + version "0.1.3" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-fragment/download/babel-plugin-transform-jsx-fragment-0.1.3.tgz#857456eb5e2b55de9327ba1dbf2a7745adcc43d8" + integrity sha1-hXRW614rVd6TJ7odvyp3Ra3MQ9g= + +babel-plugin-transform-jsx-list@^0.1.2: + version "0.1.2" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-list/download/babel-plugin-transform-jsx-list-0.1.2.tgz#24722c76b0a5c760996ae058edd25ff9173df5cd" + integrity sha1-JHIsdrClx2CZauBY7dJf+Rc99c0= + +babel-plugin-transform-jsx-memo@^0.1.3: + version "0.1.3" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-memo/download/babel-plugin-transform-jsx-memo-0.1.3.tgz#9eff489324f2da0c1b604bbd7e6a4385393f38fd" + integrity sha1-nv9IkyTy2gwbYEu9fmpDhTk/OP0= + +babel-plugin-transform-jsx-slot@^0.1.1: + version "0.1.2" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-slot/download/babel-plugin-transform-jsx-slot-0.1.2.tgz#9b3fc69d16747d7013a02018e233c1ae5f2fd092" + integrity sha1-mz/GnRZ0fXAToCAY4jPBrl8v0JI= + dependencies: + "@babel/types" "^7.5.0" + +babel-plugin-transform-jsx-stylesheet@^0.6.9: + version "0.6.9" + resolved "https://registry.npm.taobao.org/babel-plugin-transform-jsx-stylesheet/download/babel-plugin-transform-jsx-stylesheet-0.6.9.tgz#87ddbe20505709bb80f7bd8f02b1dfeaf1443ebe" + integrity sha1-h92+IFBXCbuA972PArHf6vFEPr4= + dependencies: + camelcase "^3.0.0" + babel-polyfill@6.26.0: version "6.26.0" resolved "https://registry.npm.taobao.org/babel-polyfill/download/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" @@ -3310,6 +3443,11 @@ babel-preset-jest@^24.9.0: "@babel/plugin-syntax-object-rest-spread" "^7.0.0" babel-plugin-jest-hoist "^24.9.0" +babel-runtime-jsx-plus@^0.1.4: + version "0.1.5" + resolved "https://registry.npm.taobao.org/babel-runtime-jsx-plus/download/babel-runtime-jsx-plus-0.1.5.tgz#57fc7ed49f09417584b8b61df2c43f463c738f32" + integrity sha1-V/x+1J8JQXWEuLYd8sQ/RjxzjzI= + babel-runtime@^6.23.0, babel-runtime@^6.26.0: version "6.26.0" resolved "https://registry.npm.taobao.org/babel-runtime/download/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" @@ -4284,9 +4422,9 @@ config-chain@^1.1.11: ini "^1.3.4" proto-list "~1.2.1" -confusing-browser-globals@^1.0.5: +confusing-browser-globals@^1.0.9: version "1.0.9" - resolved "https://registry.npm.taobao.org/confusing-browser-globals/download/confusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" + resolved "https://registry.npm.taobao.org/confusing-browser-globals/download/confusing-browser-globals-1.0.9.tgz?cache=0&sync_timestamp=1575504220073&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fconfusing-browser-globals%2Fdownload%2Fconfusing-browser-globals-1.0.9.tgz#72bc13b483c0276801681871d4898516f8f54fdd" integrity sha1-crwTtIPAJ2gBaBhx1ImFFvj1T90= connect-history-api-fallback@^1.6.0: @@ -4684,6 +4822,16 @@ css-what@^3.2.1: resolved "https://registry.npm.taobao.org/css-what/download/css-what-3.2.1.tgz#f4a8f12421064621b456755e34a03a2c22df5da1" integrity sha1-9KjxJCEGRiG0VnVeNKA6LCLfXaE= +css@^2.2.1: + version "2.2.4" + resolved "https://registry.npm.taobao.org/css/download/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + integrity sha1-xkZ1XHOXHyu6amAeLPL9cbEpiSk= + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" @@ -4904,6 +5052,11 @@ deepmerge@^1.5.2: resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-1.5.2.tgz?cache=0&sync_timestamp=1572279720382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" integrity sha1-EEmdhohEza1P7ghC34x/bwyVp1M= +deepmerge@^2.2.1: + version "2.2.1" + resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" + integrity sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA= + deepmerge@^4.0.0, deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.npm.taobao.org/deepmerge/download/deepmerge-4.2.2.tgz?cache=0&sync_timestamp=1572279720382&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdeepmerge%2Fdownload%2Fdeepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" @@ -5450,23 +5603,23 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^13.2.0: - version "13.2.0" - resolved "https://registry.npm.taobao.org/eslint-config-airbnb-base/download/eslint-config-airbnb-base-13.2.0.tgz?cache=0&sync_timestamp=1584078350368&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-config-airbnb-base%2Fdownload%2Feslint-config-airbnb-base-13.2.0.tgz#f6ea81459ff4dec2dda200c35f1d8f7419d57943" - integrity sha1-9uqBRZ/03sLdogDDXx2PdBnVeUM= +eslint-config-airbnb-base@^14.1.0: + version "14.1.0" + resolved "https://registry.npm.taobao.org/eslint-config-airbnb-base/download/eslint-config-airbnb-base-14.1.0.tgz#2ba4592dd6843258221d9bff2b6831bd77c874e4" + integrity sha1-K6RZLdaEMlgiHZv/K2gxvXfIdOQ= dependencies: - confusing-browser-globals "^1.0.5" + confusing-browser-globals "^1.0.9" object.assign "^4.1.0" - object.entries "^1.1.0" + object.entries "^1.1.1" -eslint-config-airbnb@^17.1.1: - version "17.1.1" - resolved "https://registry.npm.taobao.org/eslint-config-airbnb/download/eslint-config-airbnb-17.1.1.tgz#2272e0b86bb1e2b138cdf88d07a3b6f4cda3d626" - integrity sha1-InLguGux4rE4zfiNB6O29M2j1iY= +eslint-config-airbnb@^18.0.1: + version "18.1.0" + resolved "https://registry.npm.taobao.org/eslint-config-airbnb/download/eslint-config-airbnb-18.1.0.tgz#724d7e93dadd2169492ff5363c5aaa779e01257d" + integrity sha1-ck1+k9rdIWlJL/U2PFqqd54BJX0= dependencies: - eslint-config-airbnb-base "^13.2.0" + eslint-config-airbnb-base "^14.1.0" object.assign "^4.1.0" - object.entries "^1.1.0" + object.entries "^1.1.1" eslint-config-prettier@^6.0.0: version "6.10.1" @@ -5483,6 +5636,17 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.13.1" +eslint-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/eslint-loader/download/eslint-loader-4.0.0.tgz#ab096ce9168fa167e4159afff66692c173fc7b79" + integrity sha1-qwls6RaPoWfkFZr/9maSwXP8e3k= + dependencies: + fs-extra "^9.0.0" + loader-fs-cache "^1.0.3" + loader-utils "^2.0.0" + object-hash "^2.0.3" + schema-utils "^2.6.5" + eslint-module-utils@^2.4.1: version "2.6.0" resolved "https://registry.npm.taobao.org/eslint-module-utils/download/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" @@ -5524,10 +5688,10 @@ eslint-plugin-jsx-a11y@^6.2.3: has "^1.0.3" jsx-ast-utils "^2.2.1" -eslint-plugin-react-hooks@^1.6.1: - version "1.7.0" - resolved "https://registry.npm.taobao.org/eslint-plugin-react-hooks/download/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" - integrity sha1-YhC21aNyBfC5KFj4laToJwIKfQQ= +eslint-plugin-react-hooks@^2.4.0: + version "2.5.1" + resolved "https://registry.npm.taobao.org/eslint-plugin-react-hooks/download/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0" + integrity sha1-TvWTBZJYjOFxq+sm9ADH+8vCPNA= eslint-plugin-react@^7.14.2: version "7.19.0" @@ -5547,7 +5711,7 @@ eslint-plugin-react@^7.14.2: string.prototype.matchall "^4.0.2" xregexp "^4.3.0" -eslint-scope@^4.0.0, eslint-scope@^4.0.3: +eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.npm.taobao.org/eslint-scope/download/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" integrity sha1-ygODMxD2iJoyZHgaqC5j65z+eEg= @@ -5563,13 +5727,20 @@ eslint-scope@^5.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1, eslint-utils@^1.4.3: +eslint-utils@^1.4.3: version "1.4.3" resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" integrity sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8= dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-2.0.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-2.0.0.tgz#7be1cc70f27a72a76cd14aa698bcabed6890e1cd" + integrity sha1-e+HMcPJ6cqds0UqmmLyr7WiQ4c0= + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.npm.taobao.org/eslint-visitor-keys/download/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" @@ -6017,6 +6188,15 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" +find-cache-dir@^0.1.1: + version "0.1.1" + resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9" + integrity sha1-yN765XyKUqinhPnjHFfHQumToLk= + dependencies: + commondir "^1.0.1" + mkdirp "^0.5.1" + pkg-dir "^1.0.0" + find-cache-dir@^2.1.0: version "2.1.0" resolved "https://registry.npm.taobao.org/find-cache-dir/download/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" @@ -6177,6 +6357,16 @@ fs-extra@^8.1.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^9.0.0: + version "9.0.0" + resolved "https://registry.npm.taobao.org/fs-extra/download/fs-extra-9.0.0.tgz#b6afc31036e247b2466dc99c29ae797d5d4580a3" + integrity sha1-tq/DEDbiR7JGbcmcKa55fV1FgKM= + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^1.0.0" + fs-minipass@^1.2.5: version "1.2.7" resolved "https://registry.npm.taobao.org/fs-minipass/download/fs-minipass-1.2.7.tgz?cache=0&sync_timestamp=1579628575109&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffs-minipass%2Fdownload%2Ffs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" @@ -6839,7 +7029,7 @@ html-webpack-plugin@^3.2.0: toposort "^1.0.0" util.promisify "1.0.0" -htmlparser2@^3.10.0, htmlparser2@^3.3.0, htmlparser2@^3.9.1: +htmlparser2@^3.10.0, htmlparser2@^3.10.1, htmlparser2@^3.3.0, htmlparser2@^3.9.1: version "3.10.1" resolved "https://registry.npm.taobao.org/htmlparser2/download/htmlparser2-3.10.1.tgz#bd679dc3f59897b6a34bb10749c855bb53a9392f" integrity sha1-vWedw/WYl7ajS7EHSchVu1OpOS8= @@ -7443,7 +7633,7 @@ is-extendable@^0.1.0, is-extendable@^0.1.1: resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= -is-extendable@^1.0.1: +is-extendable@^1.0.0, is-extendable@^1.0.1: version "1.0.1" resolved "https://registry.npm.taobao.org/is-extendable/download/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" integrity sha1-p0cPnkJnM9gb2B4RVSZOOjUHyrQ= @@ -8267,6 +8457,15 @@ jsonfile@^4.0.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^6.0.1: + version "6.0.1" + resolved "https://registry.npm.taobao.org/jsonfile/download/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179" + integrity sha1-mJZsuiFDeMjIS4LghZB7QL9hQXk= + dependencies: + universalify "^1.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.npm.taobao.org/jsonparse/download/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" @@ -8478,6 +8677,14 @@ load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" +loader-fs-cache@^1.0.3: + version "1.0.3" + resolved "https://registry.npm.taobao.org/loader-fs-cache/download/loader-fs-cache-1.0.3.tgz?cache=0&sync_timestamp=1584820647539&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Floader-fs-cache%2Fdownload%2Floader-fs-cache-1.0.3.tgz#f08657646d607078be2f0a032f8bd69dd6f277d9" + integrity sha1-8IZXZG1gcHi+LwoDL4vWndbyd9k= + dependencies: + find-cache-dir "^0.1.1" + mkdirp "^0.5.1" + loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.npm.taobao.org/loader-runner/download/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -8511,6 +8718,15 @@ loader-utils@^1.0.2, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha1-5MrOW4FtQloWa18JfhDNErNgZLA= + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/locate-path/download/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -8614,11 +8830,6 @@ lodash.transform@^4.6.0: resolved "https://registry.npmjs.org/lodash.transform/-/lodash.transform-4.6.0.tgz#12306422f63324aed8483d3f38332b5f670547a0" integrity sha1-EjBkIvYzJK7YSD0/ODMrX2cFR6A= -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.npm.taobao.org/lodash.unescape/download/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= - lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.npm.taobao.org/lodash.uniq/download/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" @@ -9612,6 +9823,11 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" +object-hash@^2.0.3: + version "2.0.3" + resolved "https://registry.npm.taobao.org/object-hash/download/object-hash-2.0.3.tgz#d12db044e03cd2ca3d77c0570d87225b02e1e6ea" + integrity sha1-0S2wROA80so9d8BXDYciWwLh5uo= + object-inspect@^1.7.0: version "1.7.0" resolved "https://registry.npm.taobao.org/object-inspect/download/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" @@ -9644,7 +9860,7 @@ object.assign@^4.1.0: has-symbols "^1.0.0" object-keys "^1.0.11" -object.entries@^1.1.0, object.entries@^1.1.1: +object.entries@^1.1.1: version "1.1.1" resolved "https://registry.npm.taobao.org/object.entries/download/object.entries-1.1.1.tgz#ee1cf04153de02bb093fec33683900f57ce5399b" integrity sha1-7hzwQVPeArsJP+wzaDkA9XzlOZs= @@ -9672,6 +9888,13 @@ object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.0 define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +object.omit@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/object.omit/download/object.omit-3.0.0.tgz#0e3edc2fce2ba54df5577ff529f6d97bd8a522af" + integrity sha1-Dj7cL84rpU31V3/1KfbZe9ilIq8= + dependencies: + is-extendable "^1.0.0" + object.pick@^1.3.0: version "1.3.0" resolved "https://registry.npm.taobao.org/object.pick/download/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" @@ -10240,6 +10463,13 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" + integrity sha1-ektQio1bstYp1EcFb/TpyTFM89Q= + dependencies: + find-up "^1.0.0" + pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/pkg-dir/download/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -10945,6 +11175,15 @@ query-string@^4.1.0: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +query-string@^6.12.1: + version "6.12.1" + resolved "https://registry.npm.taobao.org/query-string/download/query-string-6.12.1.tgz#2ae4d272db4fba267141665374e49a1de09e8a7c" + integrity sha1-KuTScttPuiZxQWZTdOSaHeCeinw= + dependencies: + decode-uri-component "^0.2.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + querystring-es3@^0.2.0: version "0.2.1" resolved "https://registry.npm.taobao.org/querystring-es3/download/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73" @@ -11371,6 +11610,11 @@ regexpp@^2.0.1: resolved "https://registry.npm.taobao.org/regexpp/download/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha1-jRnTHPYySCtYkEn4KB+T28uk0H8= +regexpp@^3.0.0: + version "3.1.0" + resolved "https://registry.npm.taobao.org/regexpp/download/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" + integrity sha1-IG0K0KVkjP+9uK5GQ489xRyfeOI= + regexpu-core@^4.7.0: version "4.7.0" resolved "https://registry.npm.taobao.org/regexpu-core/download/regexpu-core-4.7.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fregexpu-core%2Fdownload%2Fregexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" @@ -11847,11 +12091,6 @@ semver-compare@^1.0.0: resolved "https://registry.npm.taobao.org/semver/download/semver-5.7.1.tgz?cache=0&sync_timestamp=1586534511518&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha1-qVT5Ma66UI0we78Gnv8MAclhFvc= -semver@5.5.0: - version "5.5.0" - resolved "https://registry.npm.taobao.org/semver/download/semver-5.5.0.tgz?cache=0&sync_timestamp=1586534511518&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha1-3Eu8emyp2Rbe5dQ1FvAJK1j3uKs= - semver@6.3.0, semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.npm.taobao.org/semver/download/semver-6.3.0.tgz?cache=0&sync_timestamp=1586534511518&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsemver%2Fdownload%2Fsemver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" @@ -12144,7 +12383,7 @@ source-list-map@^2.0.0: resolved "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz#3993bd873bfc48479cca9ea3a547835c7c154b34" integrity sha1-OZO9hzv8SEecyp6jpUeDXHwVSzQ= -source-map-resolve@^0.5.0: +source-map-resolve@^0.5.0, source-map-resolve@^0.5.2: version "0.5.3" resolved "https://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.5.3.tgz?cache=0&sync_timestamp=1584829515586&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsource-map-resolve%2Fdownload%2Fsource-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" integrity sha1-GQhmvs51U+H48mei7oLGBrVQmho= @@ -12239,6 +12478,11 @@ specificity@^0.4.1: resolved "https://registry.npm.taobao.org/specificity/download/specificity-0.4.1.tgz#aab5e645012db08ba182e151165738d00887b019" integrity sha1-qrXmRQEtsIuhguFRFlc40AiHsBk= +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.npm.taobao.org/split-on-first/download/split-on-first-1.1.0.tgz?cache=0&sync_timestamp=1573632118941&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsplit-on-first%2Fdownload%2Fsplit-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha1-9hCv7uOxK84dDDBCXnY5i3gkml8= + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -12377,6 +12621,11 @@ strict-uri-encode@^1.0.0: resolved "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/strict-uri-encode/download/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-length@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/string-length/download/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed" @@ -12593,15 +12842,15 @@ stylehacks@^4.0.0: postcss "^7.0.0" postcss-selector-parser "^3.0.0" -stylelint-config-css-modules@^1.4.0: - version "1.5.0" - resolved "https://registry.npm.taobao.org/stylelint-config-css-modules/download/stylelint-config-css-modules-1.5.0.tgz#c7d901db052f5a2ee3135dde51490d34c281add3" - integrity sha1-x9kB2wUvWi7jE13eUUkNNMKBrdM= +stylelint-config-css-modules@^2.2.0: + version "2.2.0" + resolved "https://registry.npm.taobao.org/stylelint-config-css-modules/download/stylelint-config-css-modules-2.2.0.tgz#8ed2a54b1bdf637219e37cdeea1950405fd022ff" + integrity sha1-jtKlSxvfY3IZ43ze6hlQQF/QIv8= -stylelint-config-prettier@^5.2.0: - version "5.3.0" - resolved "https://registry.npm.taobao.org/stylelint-config-prettier/download/stylelint-config-prettier-5.3.0.tgz#a6da626c2edabb2c5207bcf63fe449c16f5a24ec" - integrity sha1-ptpibC7auyxSB7z2P+RJwW9aJOw= +stylelint-config-prettier@^8.0.1: + version "8.0.1" + resolved "https://registry.npm.taobao.org/stylelint-config-prettier/download/stylelint-config-prettier-8.0.1.tgz#ec7cdd7faabaff52ebfa56c28fed3d995ebb8cab" + integrity sha1-7Hzdf6q6/1Lr+lbCj+09mV67jKs= stylelint-config-rational-order@^0.1.2: version "0.1.2" @@ -12611,17 +12860,17 @@ stylelint-config-rational-order@^0.1.2: stylelint "^9.10.1" stylelint-order "^2.2.1" -stylelint-config-recommended@^2.2.0: - version "2.2.0" - resolved "https://registry.npm.taobao.org/stylelint-config-recommended/download/stylelint-config-recommended-2.2.0.tgz#46ab139db4a0e7151fd5f94af155512886c96d3f" - integrity sha1-RqsTnbSg5xUf1flK8VVRKIbJbT8= +stylelint-config-recommended@^3.0.0: + version "3.0.0" + resolved "https://registry.npm.taobao.org/stylelint-config-recommended/download/stylelint-config-recommended-3.0.0.tgz#e0e547434016c5539fe2650afd58049a2fd1d657" + integrity sha1-4OVHQ0AWxVOf4mUK/VgEmi/R1lc= -stylelint-config-standard@^18.3.0: - version "18.3.0" - resolved "https://registry.npm.taobao.org/stylelint-config-standard/download/stylelint-config-standard-18.3.0.tgz#a2a1b788d2cf876c013feaff8ae276117a1befa7" - integrity sha1-oqG3iNLPh2wBP+r/iuJ2EXob76c= +stylelint-config-standard@^20.0.0: + version "20.0.0" + resolved "https://registry.npm.taobao.org/stylelint-config-standard/download/stylelint-config-standard-20.0.0.tgz#06135090c9e064befee3d594289f50e295b5e20d" + integrity sha1-BhNQkMngZL7+49WUKJ9Q4pW14g0= dependencies: - stylelint-config-recommended "^2.2.0" + stylelint-config-recommended "^3.0.0" stylelint-order@^2.2.1: version "2.2.1" @@ -12632,25 +12881,25 @@ stylelint-order@^2.2.1: postcss "^7.0.2" postcss-sorting "^4.1.0" -stylelint-order@^3.0.0: - version "3.1.1" - resolved "https://registry.npm.taobao.org/stylelint-order/download/stylelint-order-3.1.1.tgz#ba9ea6844d1482f97f31204e7c9605c7b792c294" - integrity sha1-up6mhE0Ugvl/MSBOfJYFx7eSwpQ= +stylelint-order@^4.0.0: + version "4.0.0" + resolved "https://registry.npm.taobao.org/stylelint-order/download/stylelint-order-4.0.0.tgz#2a945c2198caac3ff44687d7c8582c81d044b556" + integrity sha1-KpRcIZjKrD/0RofXyFgsgdBEtVY= dependencies: lodash "^4.17.15" - postcss "^7.0.17" + postcss "^7.0.26" postcss-sorting "^5.0.1" -stylelint-scss@^3.8.0: - version "3.16.1" - resolved "https://registry.npm.taobao.org/stylelint-scss/download/stylelint-scss-3.16.1.tgz?cache=0&sync_timestamp=1586421149136&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstylelint-scss%2Fdownload%2Fstylelint-scss-3.16.1.tgz#4164558f2113663e54101175588603e014cd0b9c" - integrity sha1-QWRVjyETZj5UEBF1WIYD4BTNC5w= +stylelint-scss@^3.14.2: + version "3.17.1" + resolved "https://registry.npm.taobao.org/stylelint-scss/download/stylelint-scss-3.17.1.tgz#1dc442cc5167be263d3d2ea37fe177b46b925c5d" + integrity sha1-HcRCzFFnviY9PS6jf+F3tGuSXF0= dependencies: lodash "^4.17.15" postcss-media-query-parser "^0.2.3" postcss-resolve-nested-selector "^0.1.1" postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.0.2" + postcss-value-parser "^4.0.3" stylelint@^9.10.1: version "9.10.1" @@ -12705,6 +12954,16 @@ stylelint@^9.10.1: svg-tags "^1.0.0" table "^5.0.0" +stylesheet-loader@^0.6.10: + version "0.6.10" + resolved "https://registry.npm.taobao.org/stylesheet-loader/download/stylesheet-loader-0.6.10.tgz#3350201762f04ab88756c519c41565499ff2b0dc" + integrity sha1-M1AgF2LwSriHVsUZxBVlSZ/ysNw= + dependencies: + camelcase "^3.0.0" + chalk "^1.1.3" + css "^2.2.1" + loader-utils "^1.2.3" + sugarss@^2.0.0: version "2.0.0" resolved "https://registry.npm.taobao.org/sugarss/download/sugarss-2.0.0.tgz#ddd76e0124b297d40bf3cca31c8b22ecb43bc61d" @@ -13109,7 +13368,7 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha1-6xXRKIJ/vuKEFUnhcfRe0zisfjU= -tsutils@^3.7.0: +tsutils@^3.17.1: version "3.17.1" resolved "https://registry.npm.taobao.org/tsutils/download/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" integrity sha1-7XGZF/EcoN7lhicrKsSeAVot11k= @@ -13352,6 +13611,11 @@ universalify@^0.1.0: resolved "https://registry.npm.taobao.org/universalify/download/universalify-0.1.2.tgz?cache=0&sync_timestamp=1583530825899&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Funiversalify%2Fdownload%2Funiversalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha1-tkb2m+OULavOzJ1mOcgNwQXvqmY= +universalify@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/universalify/download/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d" + integrity sha1-thodoXPoQ1sv48Z9Kbmt+FlL0W0= + unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npm.taobao.org/unpipe/download/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"