diff --git a/arkoala/arkts-loader/package.json b/arkoala/arkts-loader/package.json index 37ecb726c30d6e1ac3f98f7ec70bef4480c72447..b6ed9b0a9325bcccc9649c2a67b8df7457389142 100644 --- a/arkoala/arkts-loader/package.json +++ b/arkoala/arkts-loader/package.json @@ -6,9 +6,9 @@ "scripts": { "clean": "rimraf generated unmemoized", "compile:plugin": "cd ../ets-plugin && npm run compile", - "compile:ets": "npm run compile:plugin && cd src/ets && ../../../node_modules/ohos-typescript/bin/tsc -p ./tsconfig.ets.json", + "compile:ets": "npm run compile:plugin && cd src/ets && ets-tsc -p ./tsconfig.ets.json", "panda:sdk:install": "cd ../../incremental/tools/panda && npm run panda:sdk:install", - "unmemoize": "npm run compile:ets && ../node_modules/typescript/bin/tsc -b tsconfig-unmemoize.json", + "unmemoize": "npm run compile:ets && memo-tsc -b tsconfig-unmemoize.json", "run": "npm run unmemoize && bash ../../incremental/tools/panda/arkts/arktsc --arktsconfig ./arktsconfig-run-unmemoized.json" }, "keywords": [], diff --git a/arkoala/arkui-common/package.json b/arkoala/arkui-common/package.json index 639dd54683148a6ae730135aa9df6966535b12fe..9767cf938957459ef4c6a6d00ff9e1588ca19ae1 100644 --- a/arkoala/arkui-common/package.json +++ b/arkoala/arkui-common/package.json @@ -26,13 +26,13 @@ ], "scripts": { "docs": "typedoc", - "compile": "npm run ohos-sdk && tsc -b .", + "compile": "npm run ohos-sdk && memo-tsc -b .", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json", "clean": "rimraf build dist ; npm run ets:clean", "ohos-sdk:download": "node scripts/download-oh-sdk.mjs", "ohos-sdk:patch": "node scripts/patch-oh-sdk.mjs", "ohos-sdk": "npm run ohos-sdk:download && npm run ohos-sdk:patch", - "ets:test": "cd test/ets; ../../../node_modules/ohos-typescript/bin/tsc", + "ets:test": "cd test/ets; ets-tsc", "test-gen": "npm run compile && npm run ets:test && mocha --gen-golden=$npm_config_gdir", "ets:clean": "rimraf test/generated/*.ts test/ets/js_output", "test": "npm run compile && TS_NODE_PROJECT=./test/tsconfig.json mocha -r tsconfig-paths/register", diff --git a/arkoala/arkui/package.json b/arkoala/arkui/package.json index e09428f0629496f1242786365eea361ab7379fba..9dfe5381583d1bf26aa6e584bb67c63557e6670b 100644 --- a/arkoala/arkui/package.json +++ b/arkoala/arkui/package.json @@ -25,10 +25,10 @@ ], "scripts": { "docs": "typedoc", - "compile": "npm run ohos-sdk --prefix ../arkui-common && tsc -b .", + "compile": "npm run ohos-sdk --prefix ../arkui-common && memo-tsc -b .", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json", "clean": "rimraf build dist ; npm run ets:clean", - "ets:test": "cd test/ets; ../../../node_modules/ohos-typescript/bin/tsc", + "ets:test": "cd test/ets; ets-tsc", "test-gen": "npm run compile && npm run ets:test && mocha --gen-golden=$npm_config_gdir", "ets:clean": "rimraf test/generated/*.ts test/ets/js_output", "test": "npm run compile && npm run ets:test && mocha", diff --git a/arkoala/ets-plugin/package.json b/arkoala/ets-plugin/package.json index 794f88b0ea21515c5a254a932facc3a2dc6c2826..c451250ed169ea4e2dcf752a774c11642a3d6110 100644 --- a/arkoala/ets-plugin/package.json +++ b/arkoala/ets-plugin/package.json @@ -9,19 +9,17 @@ "build/lib/**/*.d.ts" ], "scripts": { - "patch-ts-patch": "node ../tools/patch-ts-patch.mjs ../node_modules/ts-patch", - "patch-ohos-typescript": "cd ../node_modules/ohos-typescript && ts-patch install", - "compile": "npm run patch-ts-patch && npm run patch-ohos-typescript && node ../node_modules/ohos-typescript/bin/tsc -b .", + "compile": "memo-tsc -b .", "clean": "rimraf build dist test/dump test/generated test/ets/specification test/specification/ets2bundle", - "ets:test": "cd test/ets; ../../../node_modules/ohos-typescript/bin/tsc -p ./tsconfig.ets.json", + "ets:test": "cd test/ets; ets-tsc -p ./tsconfig.ets.json", "test": "npm run compile && npm run ets:test && mocha --reporter-option maxDiffSize=0", "test:coverage": "nyc mocha", "test:all": "npm run test:spec; npm run test", "canonize": "npm run test:all; cp -r test/generated/. test/golden/", - "compile:spec": "cd test/ets && ../../../node_modules/ohos-typescript/bin/tsc -p spec-tsconfig.ets.json", + "compile:spec": "cd test/ets && ets-tsc -p spec-tsconfig.ets.json", "test:spec": "npm run compile && npm run sync:spec && npm run compile:spec && mocha --config spec.mocharc.json", - "compile:sync:spec": "cd test/scripts && ../../../node_modules/typescript/bin/tsc -p tsconfig-sync-specification.json", + "compile:sync:spec": "cd test/scripts && memo-tsc -p tsconfig-sync-specification.json", "sync:spec": "npm run compile:sync:spec && cd build/test/scripts && node sync-specification.js" }, "keywords": [], diff --git a/arkoala/ets-plugin/src/AbilityTransformer.ts b/arkoala/ets-plugin/src/AbilityTransformer.ts index 2a55450e1b3b66e2f9e9c9d0ceebd2ae76b10e17..981eb598d2c4f6d96576c75366b44ec20225f0ef 100644 --- a/arkoala/ets-plugin/src/AbilityTransformer.ts +++ b/arkoala/ets-plugin/src/AbilityTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { Importer } from './Importer' import { isDefined } from "./utils"; diff --git a/arkoala/ets-plugin/src/AbstractVisitor.ts b/arkoala/ets-plugin/src/AbstractVisitor.ts index 453c6e5ce5f2b52bba243c70ec01b1901734f328..035db10b0859524c81977ebc53626a3b69f994dd 100644 --- a/arkoala/ets-plugin/src/AbstractVisitor.ts +++ b/arkoala/ets-plugin/src/AbstractVisitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { asString } from './utils' export abstract class AbstractVisitor { diff --git a/arkoala/ets-plugin/src/ApiUtils.ts b/arkoala/ets-plugin/src/ApiUtils.ts index e15a9d40a3fd2fc5cb155b03ec30a44eb1f25c2f..218f990cff36c5313245d5af89278ca788ec40cd 100644 --- a/arkoala/ets-plugin/src/ApiUtils.ts +++ b/arkoala/ets-plugin/src/ApiUtils.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "ohos-typescript" +import * as ts from "@koalaui/ets-tsc" import { filterDecorators } from "./utils" export function parameter( diff --git a/arkoala/ets-plugin/src/ArkExpander.ts b/arkoala/ets-plugin/src/ArkExpander.ts index fe1068375a14f8db17eb3aae1265eb691cb61d2a..48327c6c3318ba7375427edebdc082dcdcf2eb90 100644 --- a/arkoala/ets-plugin/src/ArkExpander.ts +++ b/arkoala/ets-plugin/src/ArkExpander.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import * as fs from "fs" import * as path from "path" import { Importer } from './Importer' diff --git a/arkoala/ets-plugin/src/CallExpressionCollector.ts b/arkoala/ets-plugin/src/CallExpressionCollector.ts index 7648479e28ccd3422708a4768e26f8724b03b73a..f7456a4f5bf45ee393709d4f408c82b0292dcb57 100644 --- a/arkoala/ets-plugin/src/CallExpressionCollector.ts +++ b/arkoala/ets-plugin/src/CallExpressionCollector.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' export class CallExpressionCollector extends AbstractVisitor { diff --git a/arkoala/ets-plugin/src/CallTransformer.ts b/arkoala/ets-plugin/src/CallTransformer.ts index cd0747d84301dc1be8ac3c3354c007e091d387aa..9afacf7636f53cd36e43e1b50e0950adeee7c137 100644 --- a/arkoala/ets-plugin/src/CallTransformer.ts +++ b/arkoala/ets-plugin/src/CallTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { getDeclarationsByNode, hasDecorator } from './ApiUtils' import { asString, CallTable, findBuilderLambdaRedirect, isGlobalBuilder, hasLocalDeclaration, isBuiltinComponentName, CustomDialogDecorator, ComponentDecorator } from './utils' diff --git a/arkoala/ets-plugin/src/CustomBuilderTransformer.ts b/arkoala/ets-plugin/src/CustomBuilderTransformer.ts index 5653139f91c74dff9438f425a8cf3c8a4f9f6973..bd2ba6d694b54a4e82a357443e907817b0b1ab89 100644 --- a/arkoala/ets-plugin/src/CustomBuilderTransformer.ts +++ b/arkoala/ets-plugin/src/CustomBuilderTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from "./AbstractVisitor" import { asString, CallTable, isBuilder, isGlobalBuilder, prependMemoComment } from './utils' import { Void, getDeclarationsByNode, prependComment } from './ApiUtils' diff --git a/arkoala/ets-plugin/src/DiagnosticFilter.ts b/arkoala/ets-plugin/src/DiagnosticFilter.ts index 19ab849eaccfa471d83e7ee35be7b0892d8bee00..df3be9be6c852833bda3c4ea0f973d2df01211cb 100644 --- a/arkoala/ets-plugin/src/DiagnosticFilter.ts +++ b/arkoala/ets-plugin/src/DiagnosticFilter.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "ohos-typescript"; +import * as ts from "@koalaui/ets-tsc"; import { IssueTable, NameTable } from "./utils"; import { getLineNumber } from "./ApiUtils"; diff --git a/arkoala/ets-plugin/src/DollarTransformer.ts b/arkoala/ets-plugin/src/DollarTransformer.ts index 874c69e62488c5d2a46b291b52fdcf683764752c..caac6830f671108fa7611fdd0c3ac129ea539d6b 100644 --- a/arkoala/ets-plugin/src/DollarTransformer.ts +++ b/arkoala/ets-plugin/src/DollarTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "ohos-typescript" +import * as ts from "@koalaui/ets-tsc" import { AbstractVisitor } from "./AbstractVisitor"; import { NameTable } from "./utils"; diff --git a/arkoala/ets-plugin/src/EntryTracker.ts b/arkoala/ets-plugin/src/EntryTracker.ts index c8972e1d4a826f8d47f473ab1561b6a9098fbc51..1f393362551f3ef180a4cf1150eb6877d0aaf11f 100644 --- a/arkoala/ets-plugin/src/EntryTracker.ts +++ b/arkoala/ets-plugin/src/EntryTracker.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import * as path from 'path' export class EntryTracker { diff --git a/arkoala/ets-plugin/src/ExtensionStylesTransformer.ts b/arkoala/ets-plugin/src/ExtensionStylesTransformer.ts index 185300f331cbe03dc9283a581faa643752583f12..9c5900649bc0801fc4bdaa04cf7c3992de6cf494 100644 --- a/arkoala/ets-plugin/src/ExtensionStylesTransformer.ts +++ b/arkoala/ets-plugin/src/ExtensionStylesTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { Importer } from './Importer' import { diff --git a/arkoala/ets-plugin/src/Importer.ts b/arkoala/ets-plugin/src/Importer.ts index 1c877ba635676425ecebcfca26495f9b2fad19b5..0736a080c3fe060b188b59d740f0981be289f073 100644 --- a/arkoala/ets-plugin/src/Importer.ts +++ b/arkoala/ets-plugin/src/Importer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { id } from './ApiUtils' import { assertUnreachable } from "./utils"; diff --git a/arkoala/ets-plugin/src/LazyTransformer.ts b/arkoala/ets-plugin/src/LazyTransformer.ts index 6740687cc6cabe48b4d7238b1bcf7400151c0b6a..7ec432a8acde32470d291180b64a117061421b7b 100644 --- a/arkoala/ets-plugin/src/LazyTransformer.ts +++ b/arkoala/ets-plugin/src/LazyTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { Importer } from './Importer' import { id } from './ApiUtils' diff --git a/arkoala/ets-plugin/src/LegacyCallTransformer.ts b/arkoala/ets-plugin/src/LegacyCallTransformer.ts index e597fb1d16d86256b45df352b1274523b459df02..e8fcf623fc52866a1cb679e28d2a592f01f337ba 100644 --- a/arkoala/ets-plugin/src/LegacyCallTransformer.ts +++ b/arkoala/ets-plugin/src/LegacyCallTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from "./AbstractVisitor" import { asString, CallTable } from './utils' import { Importer } from './Importer' diff --git a/arkoala/ets-plugin/src/NameCollector.ts b/arkoala/ets-plugin/src/NameCollector.ts index 52389d354ca543969879710dcdf442c122a2d1ad..3c06be72aeca7c5a400cc33468e1cb2bd3ed4de3 100644 --- a/arkoala/ets-plugin/src/NameCollector.ts +++ b/arkoala/ets-plugin/src/NameCollector.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { getLineNumber, isCallDecorator } from './ApiUtils' import { NameTable, asString, isBuilderLambda, IssueTable, BuilderLambdaDecorator, filterDecorators } from './utils' diff --git a/arkoala/ets-plugin/src/NewTransformer.ts b/arkoala/ets-plugin/src/NewTransformer.ts index d7c9e64c4091515f3db0c23d5c8261fa09a44f44..3e5e44380de38cc97604c5efe310ba821eba6ea4 100644 --- a/arkoala/ets-plugin/src/NewTransformer.ts +++ b/arkoala/ets-plugin/src/NewTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from "./AbstractVisitor" import { Importer } from './Importer' import { IssueTable, adaptorComponentName } from './utils' diff --git a/arkoala/ets-plugin/src/PropertyTranslators.ts b/arkoala/ets-plugin/src/PropertyTranslators.ts index a26948e2279cb5fb4c13f1cd2c28bfd687f7df8a..0dcd23d97062a0a8221d8d7dbbf75a7e24a2338c 100644 --- a/arkoala/ets-plugin/src/PropertyTranslators.ts +++ b/arkoala/ets-plugin/src/PropertyTranslators.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "ohos-typescript" +import * as ts from "@koalaui/ets-tsc" import { Any, assignment, diff --git a/arkoala/ets-plugin/src/StructTransformer.ts b/arkoala/ets-plugin/src/StructTransformer.ts index 729a97031bbe14c75213e98f84f4df8f5af1facc..6ee6828d4658e85a1b2fd6fb2a77cad51bdd17ca 100644 --- a/arkoala/ets-plugin/src/StructTransformer.ts +++ b/arkoala/ets-plugin/src/StructTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { CallExpressionCollector } from './CallExpressionCollector' import { EntryTracker } from './EntryTracker' diff --git a/arkoala/ets-plugin/src/StyleTransformer.ts b/arkoala/ets-plugin/src/StyleTransformer.ts index 7d76bfa487d8150214ce73c8d50b3fa36d71686e..cd7871de0e5b705b2550313a5641f3d29b021e7a 100644 --- a/arkoala/ets-plugin/src/StyleTransformer.ts +++ b/arkoala/ets-plugin/src/StyleTransformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import { AbstractVisitor } from './AbstractVisitor' import { ExtensionStylesTransformer } from './ExtensionStylesTransformer' import { Importer } from './Importer' diff --git a/arkoala/ets-plugin/src/import-export.ts b/arkoala/ets-plugin/src/import-export.ts index 872a5476f91dbca0ed2f2bba9608f2cbf7a41e94..da3542d4191a201d97b8e9ba1de470ce32f034d3 100644 --- a/arkoala/ets-plugin/src/import-export.ts +++ b/arkoala/ets-plugin/src/import-export.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript'; +import * as ts from '@koalaui/ets-tsc'; import { getDeclarationsByNode } from "./ApiUtils" diff --git a/arkoala/ets-plugin/src/utils.ts b/arkoala/ets-plugin/src/utils.ts index 9294b70f81c141d1cb25514bb2cb8518af544600..b316457b97a96128617c490eeeab97a99979a8f9 100644 --- a/arkoala/ets-plugin/src/utils.ts +++ b/arkoala/ets-plugin/src/utils.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'ohos-typescript' +import * as ts from '@koalaui/ets-tsc' import * as path from 'path' import { getDeclarationsByNode, getDecorator, hasDecorator, id, isCallDecorator, isDecorator, prependComment, Void } from './ApiUtils' import { Importer } from "./Importer"; diff --git a/arkoala/extension-component/package.json b/arkoala/extension-component/package.json index 2b3b118c9630ab184df4952dce4c3f6b104e4684..09655f9041ac5b2cbe88371e16f6b22fb13b524a 100644 --- a/arkoala/extension-component/package.json +++ b/arkoala/extension-component/package.json @@ -12,7 +12,7 @@ "keywords": [], "scripts": { "compile": "tsc", - "unmemoize": "tsc && tsc -b tsconfig-unmemoize.json" + "unmemoize": "memo-tsc && memo-tsc -b tsconfig-unmemoize.json" }, "author": "", "license": "ISC" diff --git a/arkoala/framework/package.json b/arkoala/framework/package.json index 107ed100adebf5e8ad8ea53cfb0c867cd6e976d4..c09905edd922d501a6f89c9893f69391678796d2 100644 --- a/arkoala/framework/package.json +++ b/arkoala/framework/package.json @@ -18,14 +18,14 @@ "keywords": [], "dependencies": { "node-addon-api": "^8.0.0", - "typescript": "4.9.5", "@types/node": "^18.0.0" }, "devDependencies": { + "@koalaui/memo-tsc": "4.9.5", "@koalaui/node-api-headers": "1.0.0" }, "scripts": { - "clean": "tsc -b . --clean && rimraf build dist lib generated native/build-* native/*.ini", + "clean": "memo-tsc -b . --clean && rimraf build dist lib generated native/build-* native/*.ini", "configure:native-node-host": "cd native && meson setup -D vm_kind=node build-node-host", "compile:native-node-host": "npm run configure:native-node-host && cd native && meson compile -C build-node-host && meson install -C build-node-host", "configure:native-hzvm-host": "cd native && meson setup -D vm_kind=hzvm build-hzvm-host", @@ -39,10 +39,10 @@ "configure:native-hzvm-ohos-arm32": "npm run --prefix ../ohos-sdk download && cd native && node ../scripts/configure.mjs hzvm-ohos-arm32", "compile:native-hzvm-ohos-arm32": "npm run configure:native-hzvm-ohos-arm32 && cd native && meson compile -C build-hzvm-ohos-arm32 && meson install -C build-hzvm-ohos-arm32", "configure:native-hzvm-ohos": "npm run configure:native-hzvm-ohos-arm64", - "compile:native-hzvm-ohos": "tsc -b . && npm run compile:native-hzvm-ohos-arm64", - "compile:node-host": "tsc -b . && npm run compile:native-node-host", + "compile:native-hzvm-ohos": "memo-tsc -b . && npm run compile:native-hzvm-ohos-arm64", + "compile:node-host": "memo-tsc -b . && npm run compile:native-node-host", "compile": "npm run compile:node-host", - "compile:hzvm-host": "tsc -b . && npm run compile:native-hzvm-host", - "compile:hzvm-ohos": "tsc -b . && npm run compile:native-hzvm-ohos" + "compile:hzvm-host": "memo-tsc -b . && npm run compile:native-hzvm-host", + "compile:hzvm-ohos": "memo-tsc -b . && npm run compile:native-hzvm-ohos" } } diff --git a/arkoala/loader/package.json b/arkoala/loader/package.json index 8e129790005c6a6b5b18f545f550065a73586ca0..cd1d7e0563129702a931e7597f63cbd05c789afc 100644 --- a/arkoala/loader/package.json +++ b/arkoala/loader/package.json @@ -14,21 +14,21 @@ "test:loader": "npm run compile:node-test-host && node ./lib/js/loader.js", "test:loader:unmemoizing": "npm run compile:node-test-host:unmemoizing && node ./lib/unmemoized/js/loader.js", "plugins:compile": "cd ../; npm run compile -w koala-arkui && npm run compiler:plugin:compile && npm run ets:plugin:compile", - "ets": "cd src/ets; ../../../node_modules/ohos-typescript/bin/tsc", + "ets": "cd src/ets; ets-tsc", "test:hzvm:loader": "npm run compile:hzvm-host", - "clean": "tsc -b . --clean && rimraf build dist lib generated unmemoized", - "compile:node-test-host": "npm run gen-resources && tsc -b ../extension-component && npm run ets && npm run compile:node-test", - "compile:node-test-host:unmemoizing": "npm run gen-resources && npm run unmemoize --prefix ../extension-component && npm run ets && tsc -b tsconfig-unmemoize.json && npm run compile:node-test:unmemoizing", + "clean": "memo-tsc -b . --clean && rimraf build dist lib generated unmemoized", + "compile:node-test-host": "npm run gen-resources && memo-tsc -b ../extension-component && npm run ets && npm run compile:node-test", + "compile:node-test-host:unmemoizing": "npm run gen-resources && npm run unmemoize --prefix ../extension-component && npm run ets && memo-tsc -b tsconfig-unmemoize.json && npm run compile:node-test:unmemoizing", "compile:node-test": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-test.js", "compile:node-test:unmemoizing": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-test.js --env tsconfig=tsconfig-run-unmemoized.json --env unmemoized=unmemoized", "compile:node-test:unmemoizing:arkts": "bash ../external/incremental/tools/panda/arkts/arktsc --extension sts unmemoized/generated/ets/page.ts --arktsconfig arktsconfig-run-unmemoized.json", - "compile:perf-ets": "npm run plugins:compile && HOS_SDK_HOME='../ohos-sdk/ohos-sdk/HarmonyOS-NEXT-DB1/openharmony' npm run gen-resources && tsc -p ../extension-component && npm run ets", + "compile:perf-ets": "npm run plugins:compile && HOS_SDK_HOME='../ohos-sdk/ohos-sdk/HarmonyOS-NEXT-DB1/openharmony' npm run gen-resources && memo-tsc -p ../extension-component && npm run ets", "compile:perf-node": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-perf.js", "compile:web": "WEBPACK_NO_MINIMIZE=true webpack serve --open --config webpack.config.web.js", "pack:perf": "npm run compile:perf-ets && npm run compile:perf-node && webpack ./lib/index-perf.js && echo 'Packed to dist/main.js'", "run:perf-node": "npm run compile:perf-ets && npm run compile:perf-node && node --expose-gc ./lib/js/arkoala-perf-node.js", "run:web": "npm run compile:perf-ets && npm run compile:web", - "compile-gen-resources": "npm run --prefix ../ohos-sdk download; cd scripts; tsc gen-resources.ts --target es6 --module commonjs; cd ..", + "compile-gen-resources": "npm run --prefix ../ohos-sdk download; cd scripts; memo-tsc gen-resources.ts --target es6 --module commonjs; cd ..", "gen-resources": "npm run compile-gen-resources && node ./scripts/gen-resources.js", "compile:hzvm-host": "npm run gen-resources && npm run ets && npm run compile:hzvm", "compile:hzvm-ohos": "npm run gen-resources && npm run ets && npm run compile:hzvm -- --env os=ohos --env arch=arm64", diff --git a/arkoala/package.json b/arkoala/package.json index 5b7d4081bc9dd27c35ec27fea7d9dbc8108f6a57..2ed458105840fa2cca36462dd3063764b0a8d9fc 100644 --- a/arkoala/package.json +++ b/arkoala/package.json @@ -20,11 +20,10 @@ "../arkoala-arkts/arkui" ], "devDependencies": { - "ohos-typescript": "4.9.5-r4", - "typescript": "4.9.5", + "@koalaui/ets-tsc": "4.9.5-r4", + "@koalaui/memo-tsc": "4.9.5", "bin-links": "^4.0.4", "read-package-json-fast": "^3.0.2", - "ts-patch": "^2.1.0", "tslib": "^2.3.1", "ts-node": "^10.7.0", "chai": "^4.3.6", @@ -42,7 +41,5 @@ "commander": "10.0.1" }, "scripts": { - "prepare": "cd node_modules/typescript && ts-patch install", - "postinstall": "node tools/force_tsc.js" } } diff --git a/arkoala/tests/package.json b/arkoala/tests/package.json index 5222f5c8ee8caee0b8ac25f9e6a3283df61ed309..e846ac5911a2d5849635e36bffa4e03e5325261f 100644 --- a/arkoala/tests/package.json +++ b/arkoala/tests/package.json @@ -9,10 +9,8 @@ }, "keywords": [], "scripts": { - "patch-ts-patch": "node ../tools/patch-ts-patch.mjs ../node_modules/ts-patch", - "patch-ohos-typescript": "cd ../node_modules/ohos-typescript && ts-patch install", - "ets:test": "npm run patch-ts-patch && npm run patch-ohos-typescript && cd src/ets-tests && ../../../node_modules/ohos-typescript/bin/tsc", - "clean": "tsc -b . --clean && rimraf build dist lib generated unmemoized", + "ets:test": "cd src/ets-tests && ets-tsc", + "clean": "memo-tsc -b . --clean && rimraf build dist lib generated unmemoized", "compile-arkui": "cd ../arkui; npm run compile", "compile:test-node": "npm run ets:test && WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node-test.js", "run:test-node": "npm run compile:test-node && node lib/js/arkoala-test-node.js", diff --git a/arkoala/tools/arkoala-transformer/index.ts b/arkoala/tools/arkoala-transformer/index.ts index 96db4bd1c6e2809a0f994faa5ea803eab8683ae8..96f2577dd957036b5467b7bbce4fdf74edd4743c 100644 --- a/arkoala/tools/arkoala-transformer/index.ts +++ b/arkoala/tools/arkoala-transformer/index.ts @@ -1,6 +1,6 @@ import memoPlugin from "@koalaui/compiler-plugin"; import { makeEtsExpander } from "@koalaui/ets-plugin"; -import type * as ts from "typescript" +import type * as ts from "@koalaui/memo-tsc" import * as fs from "fs" import chalk from "chalk" diff --git a/incremental/common/package.json b/incremental/common/package.json index b2d4eccc04d9e673d203b5f82e5e475af21b9389..e3396e15b56ef1eeb42e79166043ff54035d806d 100644 --- a/incremental/common/package.json +++ b/incremental/common/package.json @@ -26,7 +26,7 @@ } }, "scripts": { - "compile": "tsc -b .", + "compile": "memo-tsc -b .", "clean": "rimraf build dist", "test": "mocha", "test:coverage": "nyc mocha", diff --git a/incremental/compat/package.json b/incremental/compat/package.json index cbae1d54ceb75588e39288939ef188f1c03d341b..8af5baf767b23c4203a0d11118e8a3ebf1af21b7 100644 --- a/incremental/compat/package.json +++ b/incremental/compat/package.json @@ -22,8 +22,8 @@ }, "scripts": { "clean": "rimraf build dist", - "compile": "tsc -b .", - "compile:ohos": "tsc -b ./tsconfig-ohos.json", + "compile": "memo-tsc -b .", + "compile:ohos": "memo-tsc -b ./tsconfig-ohos.json", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json --ets-module", "compile:all": "npm run compile && npm run compile:ohos" }, diff --git a/incremental/compiler-plugin/package.json b/incremental/compiler-plugin/package.json index 67a553067f64f96fa3ef938ad3fcf48ceb8ce0ef..7cc206c78bfc904f8dd0eba513d4b04fac701672 100644 --- a/incremental/compiler-plugin/package.json +++ b/incremental/compiler-plugin/package.json @@ -25,8 +25,7 @@ "source-map-support": "^0.5.21" }, "scripts": { - "prepare": "ts-patch install", - "compile": "tsc -b .", + "compile": "memo-tsc -b .", "clean": "rimraf build dist test/dump", "unmemoize:tests": "cd test && tsc -p tsconfig-unmemoize.json && rimraf build", "test": "npm run unmemoize:tests && npm run compile && mocha", diff --git a/incremental/compiler-plugin/src/AbstractVisitor.ts b/incremental/compiler-plugin/src/AbstractVisitor.ts index b0e7e279d54f596fe78031e11b3a6a30da226912..876feee5d392e8f88cbf8d1cc268f63e52230883 100644 --- a/incremental/compiler-plugin/src/AbstractVisitor.ts +++ b/incremental/compiler-plugin/src/AbstractVisitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; export abstract class AbstractVisitor { constructor( diff --git a/incremental/compiler-plugin/src/MemoArgumentDetector.ts b/incremental/compiler-plugin/src/MemoArgumentDetector.ts index 8f35a302116c76295ce1f65122ac4fda4dff4967..9c8a2eaf294f066eff1fa82ce536a36be0ca52e0 100644 --- a/incremental/compiler-plugin/src/MemoArgumentDetector.ts +++ b/incremental/compiler-plugin/src/MemoArgumentDetector.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript' +import * as ts from '@koalaui/memo-tsc' import { Rewrite } from './transformation-context'; import { AbstractVisitor } from './AbstractVisitor' import { FunctionKind, isAnyMemoKind } from './util'; diff --git a/incremental/compiler-plugin/src/ScopedVisitor.ts b/incremental/compiler-plugin/src/ScopedVisitor.ts index 5df96aff615cf38abb23feac0b483407d07e7799..e704bea7532dc63b206b42f3dd73fbef54809579 100644 --- a/incremental/compiler-plugin/src/ScopedVisitor.ts +++ b/incremental/compiler-plugin/src/ScopedVisitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { AbstractVisitor } from "./AbstractVisitor" import { FunctionKind, isAnyMemoKind, isMemoKind } from "./util" diff --git a/incremental/compiler-plugin/src/analysis-visitor.ts b/incremental/compiler-plugin/src/analysis-visitor.ts index f8d75d9a9a7ae22675d75c3d5dcb5d37634e1662..f4ebdb1c5b0d223c2bde61abca72b0cd8c4b9e36 100644 --- a/incremental/compiler-plugin/src/analysis-visitor.ts +++ b/incremental/compiler-plugin/src/analysis-visitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { AbstractVisitor } from "./AbstractVisitor" import { Rewrite } from './transformation-context'; import { diff --git a/incremental/compiler-plugin/src/diagnostics-visitor.ts b/incremental/compiler-plugin/src/diagnostics-visitor.ts index 10d1f943c4f357e3be9fcf4a3801753fbf5ddd76..770b12473d9c354fa6a3ebe63edc6a2b7d5edaf9 100644 --- a/incremental/compiler-plugin/src/diagnostics-visitor.ts +++ b/incremental/compiler-plugin/src/diagnostics-visitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { MemoArgumentDetector } from './MemoArgumentDetector'; import { ScopedVisitor } from './ScopedVisitor'; import { Rewrite } from './transformation-context'; diff --git a/incremental/compiler-plugin/src/dump-visitor.ts b/incremental/compiler-plugin/src/dump-visitor.ts index 4aafe22783cf7b7fef33e62ec26a45009c7ff452..1d4b822477902a950913f0fee1629da154aa205d 100644 --- a/incremental/compiler-plugin/src/dump-visitor.ts +++ b/incremental/compiler-plugin/src/dump-visitor.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "typescript" +import * as ts from "@koalaui/memo-tsc" import { AbstractVisitor } from "./AbstractVisitor"; import { FunctionKind, FunctionTable, isAnyMemoKind, isFunctionOrMethod, Tracer } from "./util"; diff --git a/incremental/compiler-plugin/src/function-transformer.ts b/incremental/compiler-plugin/src/function-transformer.ts index 711fa2838ad5993085cb3db3e1d085564aeaa7c3..75bf20cc148249045c386e7f1ef5aefb1edfa1d4 100644 --- a/incremental/compiler-plugin/src/function-transformer.ts +++ b/incremental/compiler-plugin/src/function-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { AbstractVisitor } from "./AbstractVisitor" import { Rewrite } from './transformation-context'; import { diff --git a/incremental/compiler-plugin/src/import-export.ts b/incremental/compiler-plugin/src/import-export.ts index 6ead6179130071fd60f5a8b4b99a4686ae759c2b..a5a1a08b16c3446cff147bf091da7d2562de4264 100644 --- a/incremental/compiler-plugin/src/import-export.ts +++ b/incremental/compiler-plugin/src/import-export.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { arrayAt, error, diff --git a/incremental/compiler-plugin/src/koala-transformer.ts b/incremental/compiler-plugin/src/koala-transformer.ts index 70252c97469a89ba409508a791c9cfba0975112f..41b54064a17fb4c4330af935dae832afa8c22537 100644 --- a/incremental/compiler-plugin/src/koala-transformer.ts +++ b/incremental/compiler-plugin/src/koala-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import * as path from "path" import { AnalysisVisitor } from './analysis-visitor'; import { DiagnosticsVisitor } from './diagnostics-visitor'; diff --git a/incremental/compiler-plugin/src/parameter-transformer.ts b/incremental/compiler-plugin/src/parameter-transformer.ts index 6bc8bf28ce167a936a92de81a4cea9dda77c5f26..e2e0d7a12e0895c436e59947789a365e3db2dab9 100644 --- a/incremental/compiler-plugin/src/parameter-transformer.ts +++ b/incremental/compiler-plugin/src/parameter-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { ScopedVisitor } from './ScopedVisitor'; import { FunctionKind, diff --git a/incremental/compiler-plugin/src/return-transformer.ts b/incremental/compiler-plugin/src/return-transformer.ts index b8cf1933d692d2fcfc619c6551bf40b4e6d163cc..1e638aa7441b089f9ce8a21b8d38fe075fd852ad 100644 --- a/incremental/compiler-plugin/src/return-transformer.ts +++ b/incremental/compiler-plugin/src/return-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { ScopedVisitor } from "./ScopedVisitor" import { FunctionKind, isFunctionOrMethod, isMemoKind, isVoidOrNotSpecified, runtimeIdentifier, RuntimeNames } from './util' diff --git a/incremental/compiler-plugin/src/this-transformer.ts b/incremental/compiler-plugin/src/this-transformer.ts index d7687685905319ec4d525815dfddf749b8daf336..8e8bedc71ce246b95ff7ff17ea784b4dadeffd15 100644 --- a/incremental/compiler-plugin/src/this-transformer.ts +++ b/incremental/compiler-plugin/src/this-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import { ScopedVisitor } from './ScopedVisitor'; import { FunctionKind, diff --git a/incremental/compiler-plugin/src/transformation-context.ts b/incremental/compiler-plugin/src/transformation-context.ts index 73c7ae48bf5f976e4d515e7c791a10645aeebe60..792c5c1579ff4eb1b036ba205b5f1c1f92414d45 100644 --- a/incremental/compiler-plugin/src/transformation-context.ts +++ b/incremental/compiler-plugin/src/transformation-context.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "typescript" +import * as ts from "@koalaui/memo-tsc" import { CallTable, EntryTable, FunctionKind, FunctionTable, PositionalIdTracker, TransformerOptions, VariableTable } from "./util" export class Rewrite { diff --git a/incremental/compiler-plugin/src/util.ts b/incremental/compiler-plugin/src/util.ts index 88d57bbd88ad07d58c108cf33e8a07200f35dd72..e71c7b2e2df90103a8542950c7b98f580fc23143 100644 --- a/incremental/compiler-plugin/src/util.ts +++ b/incremental/compiler-plugin/src/util.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from 'typescript'; +import * as ts from '@koalaui/memo-tsc'; import * as fs from "fs" import { UniqueId } from "@koalaui/common" import { Rewrite } from './transformation-context'; diff --git a/incremental/compiler-plugin/src/variable-type-transformer.ts b/incremental/compiler-plugin/src/variable-type-transformer.ts index c2541b2e53a19594d27d73d4e4c599e91fb7d493..705bc5bebbc660389c0700ea1d3138a0b74e76a1 100644 --- a/incremental/compiler-plugin/src/variable-type-transformer.ts +++ b/incremental/compiler-plugin/src/variable-type-transformer.ts @@ -13,7 +13,7 @@ * limitations under the License. */ -import * as ts from "typescript" +import * as ts from "@koalaui/memo-tsc" import { AbstractVisitor } from "./AbstractVisitor"; import { Rewrite } from "./transformation-context"; import { asString, createContextTypeImport, FunctionKind, hiddenParameters, skipParenthesizedType, Tracer } from "./util"; diff --git a/incremental/demo-playground/package.json b/incremental/demo-playground/package.json index c43217fd298fa9d834f4cae57ed1b2d32484f608..a30fd5b65bfa5ad9c5eb12a96b17e51aa1157899 100644 --- a/incremental/demo-playground/package.json +++ b/incremental/demo-playground/package.json @@ -16,7 +16,7 @@ }, "scripts": { "compile": "WEBPACK_NO_MINIMIZE=true webpack --config webpack.config.node.js", - "compile:unmemoize": "tsc -b tsconfig-unmemoize.json", + "compile:unmemoize": "memo-tsc -b tsconfig-unmemoize.json", "compile:run-unmemoized": "npm run compile -- --env tsconfig=tsconfig-run-unmemoized.json --env unmemoized=unmemoized", "compile:unmemoizing": "npm run compile:unmemoize && npm run compile:run-unmemoized", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json", diff --git a/incremental/package.json b/incremental/package.json index 8c38f9c6767822b08b62f8752664b2c85c437e49..324643e99e7c06a0bcc9208b12d099cb337b5071 100644 --- a/incremental/package.json +++ b/incremental/package.json @@ -10,17 +10,16 @@ "compiler-plugin" ], "devDependencies": { + "@koalaui/memo-tsc": "4.9.5", "@types/chai": "4.3.10", "chai": "4.3.10", "ts-node": "^10.7.0", "ts-patch": "^2.1.0", - "tslib": "^2.3.1", - "typescript": "4.9.5" + "tslib": "^2.3.1" }, "scripts": { "all:clean": "npm run clean --ws --if-present -s", "all:clean:unmemoized": "npm run clean:unmemoized --ws --if-present -s", - "prepare": "cd node_modules/typescript && ts-patch install", "compile": "npm run compile -w ./compat && npm run compile -w ./common && npm run compile -w ./runtime && npm run compile -w ./demo-playground && npm run compile -w ./compiler-plugin" }, "dependencies": { diff --git a/incremental/runtime/package.json b/incremental/runtime/package.json index f72d929167212a49c25a696db35b52bfb2b8e49e..87723b368da753e184a9023fea2b056d2c273879 100644 --- a/incremental/runtime/package.json +++ b/incremental/runtime/package.json @@ -10,16 +10,16 @@ "oh-package.json5" ], "scripts": { - "compile": "tsc -b .", - "compile:unmemoize": "../node_modules/typescript/bin/tsc -b tsconfig-unmemoize.json", - "compile:test": "tsc -b tsconfig-test.json", + "compile": "memo-tsc -b .", + "compile:unmemoize": "memo-tsc -b tsconfig-unmemoize.json", + "compile:test": "memo-tsc -b tsconfig-test.json", "clean": "rimraf build unmemoized", "clean:unmemoized": "rimraf unmemoized", "test": "mocha", "test:coverage": "nyc mocha", "panda:sdk:install": "cd ../tools/panda && npm run panda:sdk:install", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json --ets-module", - "compile:arkts:unmemoize": "../node_modules/typescript/bin/tsc -b arktsconfig-unmemoize.json", + "compile:arkts:unmemoize": "memo-tsc -b arktsconfig-unmemoize.json", "compile:arkts:unmemoizing": "npm run compile:arkts:unmemoize && bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig-run-unmemoized.json --ets-module", "arkts:compile:test:lib": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig-test-lib.json --ets-module", "arkts:compile:test:app": "find unmemoized/test-arkts -name '*.test.ts' -exec mkdir -p build/test/app/{} \\; -exec bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig-test-app.json --output build/test/app/{}/test.abc {} \\;", diff --git a/interop/package.json b/interop/package.json index 666b653692b5c3053df3ae064ee8d33f48ccfbf9..257b5601456f44062e4f8cdf7dac856c7b1d5371 100644 --- a/interop/package.json +++ b/interop/package.json @@ -36,8 +36,8 @@ } }, "scripts": { - "clean": "tsc -b . --clean && rimraf dist build types", - "compile": "tsc -b .", + "clean": "memo-tsc -b . --clean && rimraf dist build types", + "compile": "memo-tsc -b .", "compile:arkts": "bash ../tools/panda/arkts/arktsc --arktsconfig arktsconfig.json", "lint": "eslint src test components", "test:wasm:coverage": "NODE_OPTIONS='--conditions browser --no-experimental-fetch' nyc mocha", @@ -46,7 +46,7 @@ "test:node": "mocha", "test:coverage": "npm run test:node:coverage", "test": "npm run test:node", - "watch": "tsc -b . --watch" + "watch": "memo-tsc -b . --watch" }, "keywords": [], "dependencies": {