From db2731625286303a54914a34f16a0faaa36f90fe Mon Sep 17 00:00:00 2001 From: Chang Wei Date: Tue, 14 Feb 2023 03:41:37 +0800 Subject: [PATCH] feature/2022-11-25-asktug-home: use @rollup/plugin-typescript to replace rollup-plugin-ts --- packages/ui-scripts/package.json | 2 +- packages/ui-scripts/rollup.config.js | 2 +- pnpm-lock.yaml | 161 ++++----------------------- 3 files changed, 22 insertions(+), 143 deletions(-) diff --git a/packages/ui-scripts/package.json b/packages/ui-scripts/package.json index d6971bad..338dc7e6 100644 --- a/packages/ui-scripts/package.json +++ b/packages/ui-scripts/package.json @@ -45,7 +45,7 @@ "rollup-plugin-external-globals": "^0.6.1", "rollup-plugin-postcss": "^4.0.2", "rollup-plugin-terser": "^7.0.2", - "rollup-plugin-ts": "^2.0.4", + "@rollup/plugin-typescript": "^11.0.0", "rollup-plugin-visualizer": "^5.5.2", "serve": "^13.0.2", "swr": "^1.1.2" diff --git a/packages/ui-scripts/rollup.config.js b/packages/ui-scripts/rollup.config.js index e8360af6..17ec5739 100644 --- a/packages/ui-scripts/rollup.config.js +++ b/packages/ui-scripts/rollup.config.js @@ -11,7 +11,7 @@ import { defineConfig } from 'rollup' import externalGlobals from 'rollup-plugin-external-globals' import postcss from 'rollup-plugin-postcss' import { terser } from 'rollup-plugin-terser' -import ts from 'rollup-plugin-ts' +import ts from '@rollup/plugin-typescript' import { visualizer } from 'rollup-plugin-visualizer' const src = `index.${process.env.target}.tsx` diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b41ed32c..6343d4e1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,6 +234,7 @@ importers: '@rollup/plugin-json': ^4.1.0 '@rollup/plugin-node-resolve': ^13.1.3 '@rollup/plugin-replace': ^3.0.1 + '@rollup/plugin-typescript': ^11.0.0 '@svgr/rollup': ^6.2.0 '@types/node': ^18.11.11 '@types/react': ^17.0.38 @@ -256,7 +257,6 @@ importers: rollup-plugin-external-globals: ^0.6.1 rollup-plugin-postcss: ^4.0.2 rollup-plugin-terser: ^7.0.2 - rollup-plugin-ts: ^2.0.4 rollup-plugin-visualizer: ^5.5.2 serve: ^13.0.2 swr: ^1.1.2 @@ -268,6 +268,7 @@ importers: '@rollup/plugin-json': 4.1.0_rollup@2.79.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.79.1 '@rollup/plugin-replace': 3.1.0_rollup@2.79.1 + '@rollup/plugin-typescript': 11.0.0_rollup@2.79.1 '@svgr/rollup': 6.5.1 '@types/node': 18.11.11 '@types/react': 17.0.52 @@ -290,7 +291,6 @@ importers: rollup-plugin-external-globals: 0.6.1_rollup@2.79.1 rollup-plugin-postcss: 4.0.2_postcss@8.4.19 rollup-plugin-terser: 7.0.2_rollup@2.79.1 - rollup-plugin-ts: 2.0.7_rollup@2.79.1 rollup-plugin-visualizer: 5.8.3_rollup@2.79.1 serve: 13.0.4 swr: 1.3.0_react@17.0.2 @@ -1920,10 +1920,6 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 - /@mdn/browser-compat-data/4.2.1: - resolution: {integrity: sha512-EWUguj2kd7ldmrF9F+vI5hUOralPd+sdsUnYbRy33vZTuZkduC1shE9TtEMEjAQwyfyMb4ole5KtjF8MsnQOlA==} - dev: true - /@mdx-js/mdx/1.6.22: resolution: {integrity: sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA==} dependencies: @@ -2164,6 +2160,24 @@ packages: typescript: 4.5.5 dev: true + /@rollup/plugin-typescript/11.0.0_rollup@2.79.1: + resolution: {integrity: sha512-goPyCWBiimk1iJgSTgsehFD5OOFHiAknrRJjqFCudcW8JtWiBlK284Xnn4flqMqg6YAjVG/EE+3aVzrL5qNSzQ==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^2.14.0||^3.0.0 + tslib: '*' + typescript: '>=3.7.0' + peerDependenciesMeta: + rollup: + optional: true + tslib: + optional: true + dependencies: + '@rollup/pluginutils': 5.0.2_rollup@2.79.1 + resolve: 1.22.1 + rollup: 2.79.1 + dev: true + /@rollup/pluginutils/3.1.0_rollup@2.79.1: resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} @@ -3857,10 +3871,6 @@ packages: resolution: {integrity: sha512-WKG4gTr8przEZBiJ5r3s8ZIAoMXNbOgQ+j/d5O4X3x6kZJRLNvyUJuUK/KoG3+8BaOHPhp2m7WC6JKKeovDSzQ==} dev: true - /@types/object-path/0.11.1: - resolution: {integrity: sha512-219LSCO9HPcoXcRTC6DbCs0FRhZgBnEMzf16RRqkT40WbkKx3mOeQuz3e2XqbfhOz/AHfbru0kzB1n1RCAsIIg==} - dev: true - /@types/parse-json/4.0.0: resolution: {integrity: sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==} dev: true @@ -3908,10 +3918,6 @@ packages: /@types/scheduler/0.16.2: resolution: {integrity: sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==} - /@types/semver/7.3.13: - resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} - dev: true - /@types/source-list-map/0.1.2: resolution: {integrity: sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==} dev: true @@ -3920,10 +3926,6 @@ packages: resolution: {integrity: sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ==} dev: true - /@types/ua-parser-js/0.7.36: - resolution: {integrity: sha512-N1rW+njavs70y2cApeIw1vLMYXRwfBy+7trgavGuuTfOd7j1Yh7QTRc/yqsPl6ncokt72ZXuxEU0PiCp9bSwNQ==} - dev: true - /@types/uglify-js/3.17.1: resolution: {integrity: sha512-GkewRA4i5oXacU/n4MA9+bLgt5/L3F1mKrYvFGm7r2ouLXhRKjuWwo9XHNnbx6WF3vlGW21S3fCvgqxvxXXc5g==} dependencies: @@ -4185,11 +4187,6 @@ packages: '@xtuc/long': 4.2.2 dev: true - /@wessberg/stringutil/1.0.19: - resolution: {integrity: sha512-9AZHVXWlpN8Cn9k5BC/O0Dzb9E9xfEMXzYrNunwvkUTvuK7xgQPVRZpLo+jWCOZ5r8oBa8NIrHuPEu1hzbb6bg==} - engines: {node: '>=8.0.0'} - dev: true - /@xtuc/ieee754/1.2.0: resolution: {integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==} @@ -5060,34 +5057,6 @@ packages: pako: 1.0.11 dev: true - /browserslist-generator/1.0.66: - resolution: {integrity: sha512-aFDax4Qzh29DdyhHQBD2Yu2L5OvaDnvYFMbmpLrLwwaNK4H6dHEhC/Nxv93/+mfAA+a/t94ln0P2JZvHO6LZDA==} - engines: {node: '>=8.0.0'} - dependencies: - '@mdn/browser-compat-data': 4.2.1 - '@types/object-path': 0.11.1 - '@types/semver': 7.3.13 - '@types/ua-parser-js': 0.7.36 - browserslist: 4.20.2 - caniuse-lite: 1.0.30001436 - isbot: 3.4.5 - object-path: 0.11.8 - semver: 7.3.8 - ua-parser-js: 1.0.32 - dev: true - - /browserslist/4.20.2: - resolution: {integrity: sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001436 - electron-to-chromium: 1.4.284 - escalade: 3.1.1 - node-releases: 2.0.6 - picocolors: 1.0.0 - dev: true - /browserslist/4.21.4: resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} @@ -5583,15 +5552,6 @@ packages: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: true - /compatfactory/0.0.13: - resolution: {integrity: sha512-k9Sl/Qal3xQPnjAFZaRpl7jlCh0hDEhVaxyiTMfiHKC/w5TYn4Nds+7340X/v1OrAQC5xGBtaD2JpWgPhXWaAw==} - engines: {node: '>=10.0.0'} - peerDependencies: - typescript: '>=3.x || >= 4.x' - dependencies: - helpertypes: 0.0.18 - dev: true - /component-emitter/1.3.0: resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} dev: true @@ -5856,13 +5816,6 @@ packages: which: 2.0.2 dev: true - /crosspath/1.0.0: - resolution: {integrity: sha512-mpjkSErNO6vioL/Cde2aF4UBysPFEMyn+1AN1t7Oc4yqvzSRWe8iBte4P8BHyjo64OmC+ZBxwjIqmpSpIWiQ7Q==} - engines: {node: '>=10.0.0'} - dependencies: - '@types/node': 16.18.6 - dev: true - /crypto-browserify/3.12.0: resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} dependencies: @@ -7559,11 +7512,6 @@ packages: hasBin: true dev: true - /helpertypes/0.0.18: - resolution: {integrity: sha512-XRhfbSEmR+poXUC5/8AbmYNJb2riOT6qPzjGJZr0S9YedHiaY+/tzPYzWMUclYMEdCYo/1l8PDYrQFCj02v97w==} - engines: {node: '>=10.0.0'} - dev: true - /hmac-drbg/1.0.1: resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} dependencies: @@ -8226,11 +8174,6 @@ packages: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} dev: true - /isbot/3.4.5: - resolution: {integrity: sha512-+KD6q1BBtw0iK9aGBGSfxJ31/ZgizKRjhm8ebgJUBMx0aeeQuIJ1I72beCoIrltIZGrSm4vmrxRxrG5n1aUTtw==} - engines: {node: '>=12'} - dev: true - /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true @@ -8681,13 +8624,6 @@ packages: sourcemap-codec: 1.4.8 dev: true - /magic-string/0.26.7: - resolution: {integrity: sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow==} - engines: {node: '>=12'} - dependencies: - sourcemap-codec: 1.4.8 - dev: true - /make-dir/2.1.0: resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} engines: {node: '>=6'} @@ -9330,11 +9266,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /object-path/0.11.8: - resolution: {integrity: sha512-YJjNZrlXJFM42wTBn6zgOJVar9KFJvzx6sTWDte8sWZF//cnjl0BxHNpfZx+ZffXX63A9q0b1zsFiBX4g4X5KA==} - engines: {node: '>= 10.12.0'} - dev: true - /object-visit/1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} @@ -12056,45 +11987,6 @@ packages: terser: 5.16.1 dev: true - /rollup-plugin-ts/2.0.7_rollup@2.79.1: - resolution: {integrity: sha512-M9sppRKX6y/b2KXbGdUdHid0tshAEK/sEeYLBHBJiBa4swukSsoFVXKGGZasLcjaXhgUnnizFuvFFj6znxwvSA==} - engines: {node: '>=10.0.0', npm: '>=7.0.0', pnpm: '>=3.2.0', yarn: '>=1.13'} - peerDependencies: - '@babel/core': '>=6.x || >=7.x' - '@babel/plugin-transform-runtime': '>=6.x || >=7.x' - '@babel/preset-env': '>=6.x || >=7.x' - '@babel/runtime': '>=6.x || >=7.x' - '@swc/core': '>=1.x' - '@swc/helpers': '>=0.2' - rollup: '>=1.x || >=2.x' - typescript: '>=3.2.x || >= 4.x' - peerDependenciesMeta: - '@babel/core': - optional: true - '@babel/plugin-transform-runtime': - optional: true - '@babel/preset-env': - optional: true - '@babel/runtime': - optional: true - '@swc/core': - optional: true - '@swc/helpers': - optional: true - dependencies: - '@rollup/pluginutils': 4.2.1 - '@wessberg/stringutil': 1.0.19 - browserslist: 4.21.4 - browserslist-generator: 1.0.66 - chalk: 4.1.2 - compatfactory: 0.0.13 - crosspath: 1.0.0 - magic-string: 0.26.7 - rollup: 2.79.1 - ts-clone-node: 0.3.32 - tslib: 2.4.1 - dev: true - /rollup-plugin-visualizer/5.8.3_rollup@2.79.1: resolution: {integrity: sha512-QGJk4Bqe4AOat5AjipOh8esZH1nck5X2KFpf4VytUdSUuuuSwvIQZjMGgjcxe/zXexltqaXp5Vx1V3LmnQH15Q==} engines: {node: '>=14'} @@ -13127,15 +13019,6 @@ packages: resolution: {integrity: sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==} dev: true - /ts-clone-node/0.3.32: - resolution: {integrity: sha512-YYGvoWy2Ba98/YC/0leD7IRsU/q5pu/KRg9dD8omzkbgoZ8g7gfYfED9mWMTyNp7J3CQiiKyvM62B7mXXHKU7Q==} - engines: {node: '>=10.0.0'} - peerDependencies: - typescript: ^3.x || ^4.x - dependencies: - compatfactory: 0.0.13 - dev: true - /ts-dedent/2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -13204,10 +13087,6 @@ packages: hasBin: true dev: true - /ua-parser-js/1.0.32: - resolution: {integrity: sha512-dXVsz3M4j+5tTiovFVyVqssXBu5HM47//YSOeZ9fQkdDKkfzv2v3PP1jmH6FUyPW+yCSn7aBVK1fGGKNhowdDA==} - dev: true - /uglify-js/3.17.4: resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} engines: {node: '>=0.8.0'}