From 1cc982a3c81c31ff2513bcbd6317410ac0ebf876 Mon Sep 17 00:00:00 2001 From: Jack Works Date: Sun, 22 Sep 2019 14:04:04 +0800 Subject: [PATCH] feat: upgrade @kit to enable Watcher debugger --- config-overrides/index.js | 3 +++ scripts/postinstall.js | 2 +- src/setup.ui.ts | 4 ++-- yarn.lock | 12 +++++++++--- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/config-overrides/index.js b/config-overrides/index.js index 8f2f37af26d..8c5b88f1457 100644 --- a/config-overrides/index.js +++ b/config-overrides/index.js @@ -191,6 +191,9 @@ function override(config, env) { polyfills.map(x => void fs.copyFileSync(x, path.join(publicPolyfill, path.basename(x)))) } + const tsCheckerPlugin = config.plugins.filter(x => x.constructor.name === 'ForkTsCheckerWebpackPlugin')[0] + tsCheckerPlugin.compilerOptions.isolatedModules = false + // Let webpack build to es2017 instead of es5 config.module.rules = [ // from cra diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 0d82aaadf02..601c4b25179 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -7,5 +7,5 @@ process.chdir(base) if (process.argv.indexOf('--upgrade') !== -1) await spawn('yarn', ['upgrade', '@holoflows/kit']) process.chdir('node_modules/@holoflows/kit') await spawn('yarn', ['install']) - await spawn('yarn', ['build']) + await spawn('yarn', ['build:tsc']) })() diff --git a/src/setup.ui.ts b/src/setup.ui.ts index 114df40f0ba..c1b27c2e882 100644 --- a/src/setup.ui.ts +++ b/src/setup.ui.ts @@ -1,10 +1,10 @@ import { MessageCenter } from './utils/messages' import { definedSocialNetworkUIs, activateSocialNetworkUI } from './social-network/ui' import './provider.ui' -import { LiveSelector } from '@holoflows/kit/es' +import { LiveSelector, Watcher } from '@holoflows/kit/es' LiveSelector.enhanceDebugger() - +Watcher.enhanceDebugger() Object.assign(globalThis, { definedSocialNetworkUIs: definedSocialNetworkUIs, }) diff --git a/yarn.lock b/yarn.lock index 824a8da27b4..5603d37078a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1276,11 +1276,12 @@ "@holoflows/kit@https://github.com/DimensionDev/holoflows-kit": version "0.5.0" - resolved "https://github.com/DimensionDev/holoflows-kit#49311a763b8c9038772a134057db15098225e295" + resolved "https://github.com/DimensionDev/holoflows-kit#81efcc09b7fb838ce07c97e0a45061a0738394ff" dependencies: "@types/lodash-es" "^4.1.4" + async-call-rpc "^1.0.0" concurrent-lock "^1.0.7" - jsx-jsonml-devtools-renderer "^1.1.0" + jsx-jsonml-devtools-renderer "^1.3.0" lodash-es "^4.17.15" memorize-decorator "^0.2.2" mitt "^1.1.3" @@ -3327,6 +3328,11 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-call-rpc@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/async-call-rpc/-/async-call-rpc-1.0.0.tgz#a2dd6a192b353b717fdf0881da9c805c58e3cb44" + integrity sha512-J2bj2HfUPKJCf7i/Lgxjj51+L0xg5xzENK1zkH3xZhsg2PFj2rxwwIRhqSKvGW6z3d6ukjcQWHg/0UbtsuFD2g== + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -9956,7 +9962,7 @@ jsx-ast-utils@^2.1.0, jsx-ast-utils@^2.2.1: array-includes "^3.0.3" object.assign "^4.1.0" -jsx-jsonml-devtools-renderer@^1.1.0: +jsx-jsonml-devtools-renderer@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsx-jsonml-devtools-renderer/-/jsx-jsonml-devtools-renderer-1.3.0.tgz#1af53802a49898db3bd2f9070a5f6e56d8c2ef13" integrity sha512-DjsZ+XvwkInWB5Cr3xfibfE5+PmIibGk/MCLR5QBRttgUWX0Uzr0g+IpPi4Rb0U0U9D+BkhbvrE9gSSm08M8Nw==