Build typescript in product building.

Issue: https://gitee.com/openharmony/third_party_typescript/issues/I8JZ9F

Signed-off-by: zhangchen <zhangchen168@huawei.com>
Change-Id: Ibe937ee215f6b73ec11130c6834479ed8b960315
This commit is contained in:
zhangchen 2023-11-28 15:14:09 +08:00
parent e2a8c20452
commit cf513dc830
4 changed files with 2329 additions and 1890 deletions

627
BUILD.gn Normal file
View File

@ -0,0 +1,627 @@
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
typescript_sources = [
"package.json",
"src/.eslintrc.json",
"src/cancellationToken/cancellationToken.ts",
"src/cancellationToken/tsconfig.json",
"src/compiler/binder.ts",
"src/compiler/builder.ts",
"src/compiler/builderPublic.ts",
"src/compiler/builderState.ts",
"src/compiler/builderStatePublic.ts",
"src/compiler/checker.ts",
"src/compiler/commandLineParser.ts",
"src/compiler/core.ts",
"src/compiler/corePublic.ts",
"src/compiler/debug.ts",
"src/compiler/diagnosticMessages.json",
"src/compiler/emitter.ts",
"src/compiler/factory/baseNodeFactory.ts",
"src/compiler/factory/emitHelpers.ts",
"src/compiler/factory/emitNode.ts",
"src/compiler/factory/nodeConverters.ts",
"src/compiler/factory/nodeFactory.ts",
"src/compiler/factory/nodeTests.ts",
"src/compiler/factory/parenthesizerRules.ts",
"src/compiler/factory/utilities.ts",
"src/compiler/factory/utilitiesPublic.ts",
"src/compiler/moduleNameResolver.ts",
"src/compiler/moduleSpecifiers.ts",
"src/compiler/ohApi.ts",
"src/compiler/parser.ts",
"src/compiler/path.ts",
"src/compiler/perfLogger.ts",
"src/compiler/performance.ts",
"src/compiler/performanceCore.ts",
"src/compiler/program.ts",
"src/compiler/resolutionCache.ts",
"src/compiler/scanner.ts",
"src/compiler/semver.ts",
"src/compiler/sourcemap.ts",
"src/compiler/symbolWalker.ts",
"src/compiler/sys.ts",
"src/compiler/tracing.ts",
"src/compiler/transformer.ts",
"src/compiler/transformers/classFields.ts",
"src/compiler/transformers/declarations.ts",
"src/compiler/transformers/declarations/diagnostics.ts",
"src/compiler/transformers/destructuring.ts",
"src/compiler/transformers/es2015.ts",
"src/compiler/transformers/es2016.ts",
"src/compiler/transformers/es2017.ts",
"src/compiler/transformers/es2018.ts",
"src/compiler/transformers/es2019.ts",
"src/compiler/transformers/es2020.ts",
"src/compiler/transformers/es2021.ts",
"src/compiler/transformers/es5.ts",
"src/compiler/transformers/esnext.ts",
"src/compiler/transformers/generators.ts",
"src/compiler/transformers/jsx.ts",
"src/compiler/transformers/legacyDecorators.ts",
"src/compiler/transformers/module/esnextAnd2015.ts",
"src/compiler/transformers/module/module.ts",
"src/compiler/transformers/module/node.ts",
"src/compiler/transformers/module/system.ts",
"src/compiler/transformers/taggedTemplate.ts",
"src/compiler/transformers/ts.ts",
"src/compiler/transformers/typeSerializer.ts",
"src/compiler/transformers/utilities.ts",
"src/compiler/tsbuild.ts",
"src/compiler/tsbuildPublic.ts",
"src/compiler/tsconfig.json",
"src/compiler/tsconfig.release.json",
"src/compiler/types.ts",
"src/compiler/utilities.ts",
"src/compiler/utilitiesPublic.ts",
"src/compiler/visitorPublic.ts",
"src/compiler/watch.ts",
"src/compiler/watchPublic.ts",
"src/compiler/watchUtilities.ts",
"src/debug/dbg.ts",
"src/debug/tsconfig.json",
"src/deprecatedCompat/4.0/nodeFactoryTopLevelExports.ts",
"src/deprecatedCompat/4.0/renamedMapInterfaces.ts",
"src/deprecatedCompat/4.0/renamedNodeTests.ts",
"src/deprecatedCompat/4.2/abstractConstructorTypes.ts",
"src/deprecatedCompat/4.2/renamedNodeTests.ts",
"src/deprecatedCompat/4.6/importTypeAssertions.ts",
"src/deprecatedCompat/4.7/typeParameterModifiers.ts",
"src/deprecatedCompat/4.8/mergeDecoratorsAndModifiers.ts",
"src/deprecatedCompat/deprecations.ts",
"src/deprecatedCompat/tsconfig.json",
"src/dynamicImportCompat/dynamicImportCompat.ts",
"src/dynamicImportCompat/tsconfig.json",
"src/executeCommandLine/executeCommandLine.ts",
"src/executeCommandLine/tsconfig.json",
"src/executeCommandLine/tsconfig.release.json",
"src/harness/client.ts",
"src/harness/collectionsImpl.ts",
"src/harness/compilerImpl.ts",
"src/harness/documentsUtil.ts",
"src/harness/evaluatorImpl.ts",
"src/harness/fakesHosts.ts",
"src/harness/findUpDir.ts",
"src/harness/fourslashImpl.ts",
"src/harness/fourslashInterfaceImpl.ts",
"src/harness/harnessGlobals.ts",
"src/harness/harnessIO.ts",
"src/harness/harnessLanguageService.ts",
"src/harness/harnessUtils.ts",
"src/harness/runnerbase.ts",
"src/harness/sourceMapRecorder.ts",
"src/harness/tsconfig.json",
"src/harness/typeWriter.ts",
"src/harness/util.ts",
"src/harness/vfsUtil.ts",
"src/harness/virtualFileSystemWithWatch.ts",
"src/harness/vpathUtil.ts",
"src/jsTyping/jsTyping.ts",
"src/jsTyping/shared.ts",
"src/jsTyping/tsconfig.json",
"src/jsTyping/types.ts",
"src/lib/README.md",
"src/lib/dom.generated.d.ts",
"src/lib/dom.iterable.d.ts",
"src/lib/dom.iterable.generated.d.ts",
"src/lib/es2015.collection.d.ts",
"src/lib/es2015.core.d.ts",
"src/lib/es2015.d.ts",
"src/lib/es2015.full.d.ts",
"src/lib/es2015.generator.d.ts",
"src/lib/es2015.iterable.d.ts",
"src/lib/es2015.promise.d.ts",
"src/lib/es2015.proxy.d.ts",
"src/lib/es2015.reflect.d.ts",
"src/lib/es2015.symbol.d.ts",
"src/lib/es2015.symbol.wellknown.d.ts",
"src/lib/es2016.array.include.d.ts",
"src/lib/es2016.d.ts",
"src/lib/es2016.full.d.ts",
"src/lib/es2017.d.ts",
"src/lib/es2017.full.d.ts",
"src/lib/es2017.intl.d.ts",
"src/lib/es2017.object.d.ts",
"src/lib/es2017.sharedmemory.d.ts",
"src/lib/es2017.string.d.ts",
"src/lib/es2017.typedarrays.d.ts",
"src/lib/es2018.asyncgenerator.d.ts",
"src/lib/es2018.asynciterable.d.ts",
"src/lib/es2018.d.ts",
"src/lib/es2018.full.d.ts",
"src/lib/es2018.intl.d.ts",
"src/lib/es2018.promise.d.ts",
"src/lib/es2018.regexp.d.ts",
"src/lib/es2019.array.d.ts",
"src/lib/es2019.d.ts",
"src/lib/es2019.full.d.ts",
"src/lib/es2019.intl.d.ts",
"src/lib/es2019.object.d.ts",
"src/lib/es2019.string.d.ts",
"src/lib/es2019.symbol.d.ts",
"src/lib/es2020.bigint.d.ts",
"src/lib/es2020.d.ts",
"src/lib/es2020.date.d.ts",
"src/lib/es2020.full.d.ts",
"src/lib/es2020.intl.d.ts",
"src/lib/es2020.number.d.ts",
"src/lib/es2020.promise.d.ts",
"src/lib/es2020.sharedmemory.d.ts",
"src/lib/es2020.string.d.ts",
"src/lib/es2020.symbol.wellknown.d.ts",
"src/lib/es2021.d.ts",
"src/lib/es2021.full.d.ts",
"src/lib/es2021.intl.d.ts",
"src/lib/es2021.promise.d.ts",
"src/lib/es2021.string.d.ts",
"src/lib/es2021.weakref.d.ts",
"src/lib/es2022.array.d.ts",
"src/lib/es2022.d.ts",
"src/lib/es2022.error.d.ts",
"src/lib/es2022.full.d.ts",
"src/lib/es2022.intl.d.ts",
"src/lib/es2022.object.d.ts",
"src/lib/es2022.sharedmemory.d.ts",
"src/lib/es2022.string.d.ts",
"src/lib/es5.d.ts",
"src/lib/es5.full.d.ts",
"src/lib/esnext.d.ts",
"src/lib/esnext.full.d.ts",
"src/lib/esnext.intl.d.ts",
"src/lib/header.d.ts",
"src/lib/libs.json",
"src/lib/scripthost.d.ts",
"src/lib/webworker.generated.d.ts",
"src/lib/webworker.importscripts.d.ts",
"src/lib/webworker.iterable.generated.d.ts",
"src/linter/Autofixer.ts",
"src/linter/Common.ts",
"src/linter/CookBookMsg.ts",
"src/linter/DiagnosticChecker.ts",
"src/linter/LibraryTypeCallDiagnosticChecker.ts",
"src/linter/LinterRunner.ts",
"src/linter/Problems.ts",
"src/linter/TSDiagnostics.ts",
"src/linter/TypeScriptLinter.ts",
"src/linter/TypeScriptLinterConfig.ts",
"src/linter/Utils.ts",
"src/linter/tsconfig.json",
"src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl",
"src/loggedIO/loggedIO.ts",
"src/loggedIO/tsconfig.json",
"src/server/editorServices.ts",
"src/server/moduleSpecifierCache.ts",
"src/server/packageJsonCache.ts",
"src/server/project.ts",
"src/server/protocol.ts",
"src/server/scriptInfo.ts",
"src/server/scriptVersionCache.ts",
"src/server/session.ts",
"src/server/tsconfig.json",
"src/server/types.ts",
"src/server/typesMap.json",
"src/server/typingsCache.ts",
"src/server/utilities.ts",
"src/server/utilitiesPublic.ts",
"src/services/breakpoints.ts",
"src/services/callHierarchy.ts",
"src/services/classifier.ts",
"src/services/classifier2020.ts",
"src/services/codeFixProvider.ts",
"src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts",
"src/services/codefixes/addEmptyExportDeclaration.ts",
"src/services/codefixes/addMissingAsync.ts",
"src/services/codefixes/addMissingAwait.ts",
"src/services/codefixes/addMissingConst.ts",
"src/services/codefixes/addMissingDeclareProperty.ts",
"src/services/codefixes/addMissingInvocationForDecorator.ts",
"src/services/codefixes/addNameToNamelessParameter.ts",
"src/services/codefixes/addOptionalPropertyUndefined.ts",
"src/services/codefixes/annotateWithTypeFromJSDoc.ts",
"src/services/codefixes/convertConstToLet.ts",
"src/services/codefixes/convertFunctionToEs6Class.ts",
"src/services/codefixes/convertLiteralTypeToMappedType.ts",
"src/services/codefixes/convertToAsyncFunction.ts",
"src/services/codefixes/convertToEsModule.ts",
"src/services/codefixes/convertToMappedObjectType.ts",
"src/services/codefixes/convertToTypeOnlyExport.ts",
"src/services/codefixes/convertToTypeOnlyImport.ts",
"src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts",
"src/services/codefixes/disableJsDiagnostics.ts",
"src/services/codefixes/fixAddMissingConstraint.ts",
"src/services/codefixes/fixAddMissingMember.ts",
"src/services/codefixes/fixAddMissingNewOperator.ts",
"src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts",
"src/services/codefixes/fixAddVoidToPromise.ts",
"src/services/codefixes/fixAwaitInSyncFunction.ts",
"src/services/codefixes/fixCannotFindModule.ts",
"src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts",
"src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts",
"src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts",
"src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts",
"src/services/codefixes/fixEnableExperimentalDecorators.ts",
"src/services/codefixes/fixEnableJsxFlag.ts",
"src/services/codefixes/fixExpectedComma.ts",
"src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts",
"src/services/codefixes/fixForgottenThisPropertyAccess.ts",
"src/services/codefixes/fixImplicitThis.ts",
"src/services/codefixes/fixImportNonExportedMember.ts",
"src/services/codefixes/fixIncorrectNamedTupleSyntax.ts",
"src/services/codefixes/fixInvalidImportSyntax.ts",
"src/services/codefixes/fixInvalidJsxCharacters.ts",
"src/services/codefixes/fixJSDocTypes.ts",
"src/services/codefixes/fixMissingCallParentheses.ts",
"src/services/codefixes/fixModuleAndTargetOptions.ts",
"src/services/codefixes/fixNaNEquality.ts",
"src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts",
"src/services/codefixes/fixOverrideModifier.ts",
"src/services/codefixes/fixPropertyAssignment.ts",
"src/services/codefixes/fixPropertyOverrideAccessor.ts",
"src/services/codefixes/fixReturnTypeInAsyncFunction.ts",
"src/services/codefixes/fixSpelling.ts",
"src/services/codefixes/fixStrictClassInitialization.ts",
"src/services/codefixes/fixUnmatchedParameter.ts",
"src/services/codefixes/fixUnreachableCode.ts",
"src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts",
"src/services/codefixes/fixUnusedIdentifier.ts",
"src/services/codefixes/fixUnusedLabel.ts",
"src/services/codefixes/generateAccessors.ts",
"src/services/codefixes/helpers.ts",
"src/services/codefixes/importFixes.ts",
"src/services/codefixes/inferFromUsage.ts",
"src/services/codefixes/removeAccidentalCallParentheses.ts",
"src/services/codefixes/removeUnnecessaryAwait.ts",
"src/services/codefixes/requireInTs.ts",
"src/services/codefixes/returnValueCorrect.ts",
"src/services/codefixes/splitTypeOnlyImport.ts",
"src/services/codefixes/useBigintLiteral.ts",
"src/services/codefixes/useDefaultImport.ts",
"src/services/codefixes/wrapJsxInFragment.ts",
"src/services/completions.ts",
"src/services/documentHighlights.ts",
"src/services/documentRegistry.ts",
"src/services/exportAsModule.ts",
"src/services/exportInfoMap.ts",
"src/services/findAllReferences.ts",
"src/services/formatting/README.md",
"src/services/formatting/formatting.ts",
"src/services/formatting/formattingContext.ts",
"src/services/formatting/formattingScanner.ts",
"src/services/formatting/rule.ts",
"src/services/formatting/rules.ts",
"src/services/formatting/rulesMap.ts",
"src/services/formatting/smartIndenter.ts",
"src/services/getEditsForFileRename.ts",
"src/services/globalThisShim.ts",
"src/services/goToDefinition.ts",
"src/services/importTracker.ts",
"src/services/inlayHints.ts",
"src/services/jsDoc.ts",
"src/services/navigateTo.ts",
"src/services/navigationBar.ts",
"src/services/organizeImports.ts",
"src/services/outliningElementsCollector.ts",
"src/services/patternMatcher.ts",
"src/services/preProcess.ts",
"src/services/refactorProvider.ts",
"src/services/refactors/addOrRemoveBracesToArrowFunction.ts",
"src/services/refactors/convertArrowFunctionOrFunctionExpression.ts",
"src/services/refactors/convertExport.ts",
"src/services/refactors/convertImport.ts",
"src/services/refactors/convertOverloadListToSingleSignature.ts",
"src/services/refactors/convertParamsToDestructuredObject.ts",
"src/services/refactors/convertStringOrTemplateLiteral.ts",
"src/services/refactors/convertToOptionalChainExpression.ts",
"src/services/refactors/extractSymbol.ts",
"src/services/refactors/extractType.ts",
"src/services/refactors/generateGetAccessorAndSetAccessor.ts",
"src/services/refactors/helpers.ts",
"src/services/refactors/inferFunctionReturnType.ts",
"src/services/refactors/moveToNewFile.ts",
"src/services/rename.ts",
"src/services/services.ts",
"src/services/shims.ts",
"src/services/signatureHelp.ts",
"src/services/smartSelection.ts",
"src/services/sourcemaps.ts",
"src/services/stringCompletions.ts",
"src/services/suggestionDiagnostics.ts",
"src/services/symbolDisplay.ts",
"src/services/textChanges.ts",
"src/services/transform.ts",
"src/services/transpile.ts",
"src/services/tsconfig.json",
"src/services/types.ts",
"src/services/utilities.ts",
"src/testRunner/compilerRef.ts",
"src/testRunner/compilerRunner.ts",
"src/testRunner/documentsRef.ts",
"src/testRunner/evaluatorRef.ts",
"src/testRunner/externalCompileRunner.ts",
"src/testRunner/fakesRef.ts",
"src/testRunner/fourslashRef.ts",
"src/testRunner/fourslashRunner.ts",
"src/testRunner/parallel/host.ts",
"src/testRunner/parallel/shared.ts",
"src/testRunner/parallel/worker.ts",
"src/testRunner/playbackRef.ts",
"src/testRunner/projectsRunner.ts",
"src/testRunner/runner.ts",
"src/testRunner/rwcRunner.ts",
"src/testRunner/test262Runner.ts",
"src/testRunner/tsconfig.json",
"src/testRunner/unittests/asserts.ts",
"src/testRunner/unittests/base64.ts",
"src/testRunner/unittests/builder.ts",
"src/testRunner/unittests/comments.ts",
"src/testRunner/unittests/compilerCore.ts",
"src/testRunner/unittests/config/commandLineParsing.ts",
"src/testRunner/unittests/config/configurationExtension.ts",
"src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts",
"src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts",
"src/testRunner/unittests/config/initializeTSConfig.ts",
"src/testRunner/unittests/config/matchFiles.ts",
"src/testRunner/unittests/config/projectReferences.ts",
"src/testRunner/unittests/config/showConfig.ts",
"src/testRunner/unittests/config/tsconfigParsing.ts",
"src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts",
"src/testRunner/unittests/convertToBase64.ts",
"src/testRunner/unittests/customTransforms.ts",
"src/testRunner/unittests/debugDeprecation.ts",
"src/testRunner/unittests/evaluation/arraySpread.ts",
"src/testRunner/unittests/evaluation/asyncArrow.ts",
"src/testRunner/unittests/evaluation/asyncGenerator.ts",
"src/testRunner/unittests/evaluation/autoAccessors.ts",
"src/testRunner/unittests/evaluation/awaiter.ts",
"src/testRunner/unittests/evaluation/destructuring.ts",
"src/testRunner/unittests/evaluation/externalModules.ts",
"src/testRunner/unittests/evaluation/forAwaitOf.ts",
"src/testRunner/unittests/evaluation/forOf.ts",
"src/testRunner/unittests/evaluation/generator.ts",
"src/testRunner/unittests/evaluation/objectRest.ts",
"src/testRunner/unittests/evaluation/optionalCall.ts",
"src/testRunner/unittests/evaluation/superInStaticInitializer.ts",
"src/testRunner/unittests/evaluation/templateLiteral.ts",
"src/testRunner/unittests/evaluation/updateExpressionInModule.ts",
"src/testRunner/unittests/factory.ts",
"src/testRunner/unittests/incrementalParser.ts",
"src/testRunner/unittests/jsDocParsing.ts",
"src/testRunner/unittests/jsonParserRecovery.ts",
"src/testRunner/unittests/moduleResolution.ts",
"src/testRunner/unittests/parsePseudoBigInt.ts",
"src/testRunner/unittests/paths.ts",
"src/testRunner/unittests/printer.ts",
"src/testRunner/unittests/programApi.ts",
"src/testRunner/unittests/publicApi.ts",
"src/testRunner/unittests/reuseProgramStructure.ts",
"src/testRunner/unittests/semver.ts",
"src/testRunner/unittests/services/cancellableLanguageServiceOperations.ts",
"src/testRunner/unittests/services/colorization.ts",
"src/testRunner/unittests/services/convertToAsyncFunction.ts",
"src/testRunner/unittests/services/documentRegistry.ts",
"src/testRunner/unittests/services/extract/constants.ts",
"src/testRunner/unittests/services/extract/functions.ts",
"src/testRunner/unittests/services/extract/helpers.ts",
"src/testRunner/unittests/services/extract/ranges.ts",
"src/testRunner/unittests/services/extract/symbolWalker.ts",
"src/testRunner/unittests/services/hostNewLineSupport.ts",
"src/testRunner/unittests/services/languageService.ts",
"src/testRunner/unittests/services/organizeImports.ts",
"src/testRunner/unittests/services/patternMatcher.ts",
"src/testRunner/unittests/services/preProcessFile.ts",
"src/testRunner/unittests/services/textChanges.ts",
"src/testRunner/unittests/services/transpile.ts",
"src/testRunner/unittests/transform.ts",
"src/testRunner/unittests/tsbuild/amdModulesWithOut.ts",
"src/testRunner/unittests/tsbuild/clean.ts",
"src/testRunner/unittests/tsbuild/configFileErrors.ts",
"src/testRunner/unittests/tsbuild/configFileExtends.ts",
"src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts",
"src/testRunner/unittests/tsbuild/declarationEmit.ts",
"src/testRunner/unittests/tsbuild/demo.ts",
"src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts",
"src/testRunner/unittests/tsbuild/emptyFiles.ts",
"src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts",
"src/testRunner/unittests/tsbuild/graphOrdering.ts",
"src/testRunner/unittests/tsbuild/helpers.ts",
"src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts",
"src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts",
"src/testRunner/unittests/tsbuild/lateBoundSymbol.ts",
"src/testRunner/unittests/tsbuild/moduleResolution.ts",
"src/testRunner/unittests/tsbuild/moduleSpecifiers.ts",
"src/testRunner/unittests/tsbuild/noEmit.ts",
"src/testRunner/unittests/tsbuild/noEmitOnError.ts",
"src/testRunner/unittests/tsbuild/outFile.ts",
"src/testRunner/unittests/tsbuild/outputPaths.ts",
"src/testRunner/unittests/tsbuild/publicApi.ts",
"src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts",
"src/testRunner/unittests/tsbuild/resolveJsonModule.ts",
"src/testRunner/unittests/tsbuild/sample.ts",
"src/testRunner/unittests/tsbuild/transitiveReferences.ts",
"src/testRunner/unittests/tsbuildWatch/configFileErrors.ts",
"src/testRunner/unittests/tsbuildWatch/demo.ts",
"src/testRunner/unittests/tsbuildWatch/moduleResolution.ts",
"src/testRunner/unittests/tsbuildWatch/noEmit.ts",
"src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts",
"src/testRunner/unittests/tsbuildWatch/programUpdates.ts",
"src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts",
"src/testRunner/unittests/tsbuildWatch/publicApi.ts",
"src/testRunner/unittests/tsbuildWatch/reexport.ts",
"src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts",
"src/testRunner/unittests/tsc/cancellationToken.ts",
"src/testRunner/unittests/tsc/composite.ts",
"src/testRunner/unittests/tsc/declarationEmit.ts",
"src/testRunner/unittests/tsc/etsTests.ts",
"src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts",
"src/testRunner/unittests/tsc/helpers.ts",
"src/testRunner/unittests/tsc/incremental.ts",
"src/testRunner/unittests/tsc/listFilesOnly.ts",
"src/testRunner/unittests/tsc/projectReferences.ts",
"src/testRunner/unittests/tsc/redirect.ts",
"src/testRunner/unittests/tsc/runWithoutArgs.ts",
"src/testRunner/unittests/tscWatch/consoleClearing.ts",
"src/testRunner/unittests/tscWatch/emit.ts",
"src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts",
"src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts",
"src/testRunner/unittests/tscWatch/helpers.ts",
"src/testRunner/unittests/tscWatch/incremental.ts",
"src/testRunner/unittests/tscWatch/moduleResolution.ts",
"src/testRunner/unittests/tscWatch/nodeNextWatch.ts",
"src/testRunner/unittests/tscWatch/programUpdates.ts",
"src/testRunner/unittests/tscWatch/projectsWithReferences.ts",
"src/testRunner/unittests/tscWatch/resolutionCache.ts",
"src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts",
"src/testRunner/unittests/tscWatch/watchApi.ts",
"src/testRunner/unittests/tscWatch/watchEnvironment.ts",
"src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts",
"src/testRunner/unittests/tsserver/autoImportProvider.ts",
"src/testRunner/unittests/tsserver/auxiliaryProject.ts",
"src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts",
"src/testRunner/unittests/tsserver/cancellationToken.ts",
"src/testRunner/unittests/tsserver/compileOnSave.ts",
"src/testRunner/unittests/tsserver/completions.ts",
"src/testRunner/unittests/tsserver/completionsIncomplete.ts",
"src/testRunner/unittests/tsserver/conditionCheck.ts",
"src/testRunner/unittests/tsserver/configFileSearch.ts",
"src/testRunner/unittests/tsserver/configuredProjects.ts",
"src/testRunner/unittests/tsserver/declarationFileMaps.ts",
"src/testRunner/unittests/tsserver/documentRegistry.ts",
"src/testRunner/unittests/tsserver/duplicatePackages.ts",
"src/testRunner/unittests/tsserver/dynamicFiles.ts",
"src/testRunner/unittests/tsserver/events/largeFileReferenced.ts",
"src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts",
"src/testRunner/unittests/tsserver/events/projectLoading.ts",
"src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts",
"src/testRunner/unittests/tsserver/exportMapCache.ts",
"src/testRunner/unittests/tsserver/externalProjects.ts",
"src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts",
"src/testRunner/unittests/tsserver/formatSettings.ts",
"src/testRunner/unittests/tsserver/getApplicableRefactors.ts",
"src/testRunner/unittests/tsserver/getEditsForFileRename.ts",
"src/testRunner/unittests/tsserver/getExportReferences.ts",
"src/testRunner/unittests/tsserver/getFileReferences.ts",
"src/testRunner/unittests/tsserver/helpers.ts",
"src/testRunner/unittests/tsserver/importHelpers.ts",
"src/testRunner/unittests/tsserver/inferredProjects.ts",
"src/testRunner/unittests/tsserver/inlayHints.ts",
"src/testRunner/unittests/tsserver/jsdocTag.ts",
"src/testRunner/unittests/tsserver/languageService.ts",
"src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts",
"src/testRunner/unittests/tsserver/metadataInResponse.ts",
"src/testRunner/unittests/tsserver/moduleResolution.ts",
"src/testRunner/unittests/tsserver/moduleSpecifierCache.ts",
"src/testRunner/unittests/tsserver/navTo.ts",
"src/testRunner/unittests/tsserver/occurences.ts",
"src/testRunner/unittests/tsserver/openFile.ts",
"src/testRunner/unittests/tsserver/packageJsonInfo.ts",
"src/testRunner/unittests/tsserver/partialSemanticServer.ts",
"src/testRunner/unittests/tsserver/plugins.ts",
"src/testRunner/unittests/tsserver/projectErrors.ts",
"src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts",
"src/testRunner/unittests/tsserver/projectReferenceErrors.ts",
"src/testRunner/unittests/tsserver/projectReferences.ts",
"src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts",
"src/testRunner/unittests/tsserver/projects.ts",
"src/testRunner/unittests/tsserver/projectsWithReferences.ts",
"src/testRunner/unittests/tsserver/refactors.ts",
"src/testRunner/unittests/tsserver/reload.ts",
"src/testRunner/unittests/tsserver/reloadProjects.ts",
"src/testRunner/unittests/tsserver/rename.ts",
"src/testRunner/unittests/tsserver/resolutionCache.ts",
"src/testRunner/unittests/tsserver/session.ts",
"src/testRunner/unittests/tsserver/skipLibCheck.ts",
"src/testRunner/unittests/tsserver/smartSelection.ts",
"src/testRunner/unittests/tsserver/symLinks.ts",
"src/testRunner/unittests/tsserver/symlinkCache.ts",
"src/testRunner/unittests/tsserver/syntacticServer.ts",
"src/testRunner/unittests/tsserver/syntaxOperations.ts",
"src/testRunner/unittests/tsserver/telemetry.ts",
"src/testRunner/unittests/tsserver/textStorage.ts",
"src/testRunner/unittests/tsserver/typeAquisition.ts",
"src/testRunner/unittests/tsserver/typeOnlyImportChains.ts",
"src/testRunner/unittests/tsserver/typeReferenceDirectives.ts",
"src/testRunner/unittests/tsserver/typingsInstaller.ts",
"src/testRunner/unittests/tsserver/versionCache.ts",
"src/testRunner/unittests/tsserver/watchEnvironment.ts",
"src/testRunner/unittests/tsserver/webServer.ts",
"src/testRunner/unittests/typeParameterIsPossiblyReferenced.ts",
"src/testRunner/utilsRef.ts",
"src/testRunner/vfsRef.ts",
"src/testRunner/vpathRef.ts",
"src/tsc/tsc.ts",
"src/tsc/tsconfig.json",
"src/tsc/tsconfig.release.json",
"src/tsconfig-base.json",
"src/tsconfig-library-base.json",
"src/tsconfig-noncomposite-base.json",
"src/tsconfig.json",
"src/tsserver/nodeServer.ts",
"src/tsserver/server.ts",
"src/tsserver/tsconfig.json",
"src/tsserver/webServer.ts",
"src/tsserverlibrary/tsconfig.json",
"src/tsserverlibrary/tsserverlibrary.ts",
"src/typescriptServices/tsconfig.json",
"src/typescriptServices/typescriptServices.ts",
"src/typingsInstaller/nodeTypingsInstaller.ts",
"src/typingsInstaller/tsconfig.json",
"src/typingsInstallerCore/tsconfig.json",
"src/typingsInstallerCore/typingsInstaller.ts",
"src/watchGuard/tsconfig.json",
"src/watchGuard/watchGuard.ts",
"src/webServer/tsconfig.json",
"src/webServer/webServer.ts",
]
action("build_typescript") {
sources = typescript_sources
script = "compile_typescript.py"
args = [
rebase_path(get_path_info("./", "abspath")),
rebase_path("${target_out_dir}"),
]
outputs = [ "${target_out_dir}/ohos-typescript-4.9.5-r4.tgz" ]
}

59
compile_typescript.py Executable file
View File

@ -0,0 +1,59 @@
#!/usr/bin/env python
# coding: utf-8
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import shutil
import sys
import subprocess
def copy_dir(source_path, dest_path):
try:
shutil.rmtree(dest_path)
shutil.copytree(source_path, dest_path, dirs_exist_ok=True, symlinks=True)
except Exception as err:
raise Exception(err.decode())
def run_cmd(cmd, execution_path=None):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stdin=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=execution_path)
stdout, stderr = proc.communicate()
if proc.returncode != 0:
print(stdout.decode(), stderr.decode())
raise Exception(stderr.decode())
def run_gulp(execution_path):
run_cmd(["npm", "run", "clean"], execution_path)
run_cmd(["npm", "run", "build"], execution_path)
run_cmd(["npm", "run", "release"], execution_path)
def run_pack(execution_path):
run_cmd(["npm", "pack"], execution_path)
def main(args):
source_path = args[0]
dest_and_exec_path = args[1]
copy_dir(source_path, dest_and_exec_path)
run_gulp(dest_and_exec_path)
run_pack(dest_and_exec_path)
if __name__ == '__main__':
main(sys.argv[1:])

3423
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@
},
"author": "Microsoft Corp",
"homepage": "https://www.typescriptlang.org/",
"version": "4.9.5-r3",
"version": "4.9.5-r4",
"license": "Apache-2.0",
"description": "TypeScript is a language for application scale JavaScript development",
"keywords": [
@ -42,61 +42,63 @@
"!**/.gitattributes"
],
"devDependencies": {
"@octokit/rest": "latest",
"@types/chai": "latest",
"@types/fancy-log": "^2.0.0",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^8.0.0",
"@types/gulp": "^4.0.9",
"@types/gulp-concat": "latest",
"@types/gulp-newer": "latest",
"@types/gulp-rename": "latest",
"@types/gulp-sourcemaps": "latest",
"@types/merge2": "latest",
"@types/microsoft__typescript-etw": "latest",
"@types/minimist": "latest",
"@types/mkdirp": "^1.0.2",
"@types/mocha": "latest",
"@types/ms": "latest",
"@octokit/rest": "19.0.5",
"@types/chai": "4.3.3",
"@types/fancy-log": "2.0.0",
"@types/fs-extra": "9.0.13",
"@types/glob": "8.0.0",
"@types/gulp": "4.0.10",
"@types/gulp-concat": "0.0.33",
"@types/gulp-newer": "0.0.32",
"@types/gulp-rename": "2.0.1",
"@types/gulp-sourcemaps": "0.0.35",
"@types/merge2": "1.3.1",
"@types/microsoft__typescript-etw": "0.1.1",
"@types/minimist": "1.2.4",
"@types/mkdirp": "1.0.2",
"@types/mocha": "10.0.3",
"@types/ms": "0.7.33",
"@types/node": "18.11.7",
"@types/source-map-support": "latest",
"@types/which": "^2.0.1",
"@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"@typescript-eslint/utils": "^5.33.1",
"azure-devops-node-api": "^11.2.0",
"chai": "latest",
"chalk": "^4.1.2",
"del": "^6.1.1",
"diff": "^5.1.0",
"eslint": "^8.22.0",
"eslint-formatter-autolinkable-stylish": "^1.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsdoc": "^39.3.6",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-no-null": "^1.0.2",
"fancy-log": "latest",
"fs-extra": "^9.1.0",
"glob": "^8.0.3",
"@types/source-map-support": "0.5.6",
"@types/which": "2.0.1",
"@types/xml2js": "0.4.13",
"@typescript-eslint/eslint-plugin": "5.33.1",
"@typescript-eslint/parser": "5.33.1",
"@typescript-eslint/utils": "5.33.1",
"azure-devops-node-api": "11.2.0",
"chai": "4.3.10",
"chalk": "4.1.2",
"del": "6.1.1",
"diff": "5.1.0",
"eslint": "8.22.0",
"eslint-formatter-autolinkable-stylish": "1.2.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jsdoc": "39.3.6",
"eslint-plugin-local": "1.0.0",
"eslint-plugin-no-null": "1.0.2",
"fancy-log": "2.0.0",
"fs-extra": "9.1.0",
"glob": "8.1.0",
"gulp": "4.0.2",
"gulp-concat": "latest",
"gulp-insert": "latest",
"gulp-newer": "latest",
"gulp-rename": "latest",
"gulp-sourcemaps": "latest",
"merge2": "latest",
"minimist": "latest",
"mkdirp": "^1.0.4",
"mocha": "latest",
"mocha-fivemat-progress-reporter": "latest",
"ms": "^2.1.3",
"node-fetch": "^3.2.10",
"source-map-support": "latest",
"typescript": "^4.8.4",
"vinyl": "latest",
"which": "^2.0.2",
"xml2js": "^0.4.23"
"gulp-concat": "2.6.1",
"gulp-insert": "0.5.0",
"gulp-newer": "1.4.0",
"gulp-rename": "2.0.0",
"gulp-sourcemaps": "3.0.0",
"merge2": "1.4.1",
"minimist": "1.2.8",
"mkdirp": "1.0.4",
"mocha": "10.2.0",
"mocha-fivemat-progress-reporter": "0.1.0",
"ms": "2.1.3",
"node-fetch": "3.2.10",
"source-map-support": "0.5.21",
"typescript": "4.8.4",
"vinyl": "3.0.0",
"which": "2.0.2",
"xml2js": "0.4.23",
"gulp-cli": "2.3.0",
"object.assign": "4.1.4"
},
"dependencies": {
"json5": "2.2.3"