File tree Expand file tree Collapse file tree 1 file changed +2
-25
lines changed
packages/angular_devkit/build_optimizer/src/transforms Expand file tree Collapse file tree 1 file changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -10,31 +10,8 @@ import { drilldownNodes } from '../helpers/ast-utils';
1010
1111
1212export function testWrapEnums ( content : string ) {
13- const ts22EnumVarDecl = / v a r ( \S + ) = \{ \} ; / ;
14- // tslint:disable-next-line:max-line-length
15- const ts22EnumIife = / ( \1\. ( \S + ) = \d + ; \r ? \n ) + \1\[ \1\. ( \S + ) \] = " \4" ; \r ? \n ( \1\[ \1\. ( \S + ) \] = " \S + " ; \r ? \n * ) + / ;
16- const ts23To26VarDecl = / v a r ( \S + ) ; ( \/ \* @ _ _ P U R E _ _ \* \/ ) * / ;
17- // tslint:disable-next-line:max-line-length
18- const ts23To26Iife = / \( f u n c t i o n \( \1\) \{ \s + ( \1\[ \1\[ " ( \S + ) " \] = ( \S + ) \] = " \4" ; ( \s + \1\[ \1\[ " \S + " \] = ( \S + ) \] = " \S + " ; ) * \r ? \n ) \} \) \( \1 \| \| \( \1 = \{ \} \) \) ; / ;
19- const enumComment = / \/ \* \* @ e n u m \{ \w + \} \* \/ / ;
20- const multiLineComment = / \s * (?: \/ \* [ \s \S ] * ?\* \/ ) ? \s * / ;
21- const newLine = / \s * \r ? \n \s * / ;
22-
23- const regexes = [
24- [
25- ts22EnumVarDecl ,
26- newLine , multiLineComment ,
27- ts22EnumIife ,
28- ] ,
29- [
30- ts23To26VarDecl ,
31- newLine , multiLineComment ,
32- ts23To26Iife ,
33- ] ,
34- [ enumComment ] ,
35- ] . map ( arr => new RegExp ( arr . map ( x => x . source ) . join ( '' ) , 'm' ) ) ;
36-
37- return regexes . some ( ( regex ) => regex . test ( content ) ) ;
13+ // TODO: remove this method, it's not doing anything anymore.
14+ return true ;
3815}
3916
4017function isBlockLike ( node : ts . Node ) : node is ts . BlockLike {
You can’t perform that action at this time.
0 commit comments