From 5890759a9f1501d94aa034d7a67c5715e65d6c83 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Tue, 18 Sep 2018 14:13:44 -0400 Subject: [PATCH] fix(@angular-devkit/build-optimizer): deprecate transform test functions These were not intended to be part of the public API and will eventually be removed completely. --- .../build_optimizer/src/transforms/import-tslib.ts | 4 +++- .../build_optimizer/src/transforms/prefix-classes.ts | 4 +++- .../build_optimizer/src/transforms/scrub-file.ts | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts index 458c4a540f79..61ec752db640 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/import-tslib.ts @@ -7,7 +7,9 @@ */ import * as ts from 'typescript'; - +/** + * @deprecated From 0.9.0 + */ export function testImportTslib(content: string) { const regex = /var (__extends|__decorate|__metadata|__param) = \(.*\r?\n( .*\r?\n)*\};/; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts index 678cab7a3205..3535cbf7cfaf 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/prefix-classes.ts @@ -7,7 +7,9 @@ */ import * as ts from 'typescript'; - +/** + * @deprecated From 0.9.0 + */ export function testPrefixClasses(content: string) { const exportVarSetter = /(?:export )?(?:var|const)\s+(\S+)\s*=\s*/; const multiLineComment = /\s*(?:\/\*[\s\S]*?\*\/)?\s*/; diff --git a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts index 5e7ed7afa48b..2f89eb1336d4 100644 --- a/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts +++ b/packages/angular_devkit/build_optimizer/src/transforms/scrub-file.ts @@ -8,7 +8,9 @@ import * as ts from 'typescript'; import { collectDeepNodes } from '../helpers/ast-utils'; - +/** + * @deprecated From 0.9.0 + */ export function testScrubFile(content: string) { const markers = [ 'decorators',