diff --git a/modules/component-store/schematics-core/utility/angular-utils.ts b/modules/component-store/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/component-store/schematics-core/utility/angular-utils.ts +++ b/modules/component-store/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/component-store/schematics-core/utility/json-utilts.ts b/modules/component-store/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/component-store/schematics-core/utility/json-utilts.ts +++ b/modules/component-store/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/component/schematics-core/utility/angular-utils.ts b/modules/component/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/component/schematics-core/utility/angular-utils.ts +++ b/modules/component/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/component/schematics-core/utility/json-utilts.ts b/modules/component/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/component/schematics-core/utility/json-utilts.ts +++ b/modules/component/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/data/schematics-core/utility/angular-utils.ts b/modules/data/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/data/schematics-core/utility/angular-utils.ts +++ b/modules/data/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/data/schematics-core/utility/json-utilts.ts b/modules/data/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/data/schematics-core/utility/json-utilts.ts +++ b/modules/data/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/effects/schematics-core/utility/angular-utils.ts b/modules/effects/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/effects/schematics-core/utility/angular-utils.ts +++ b/modules/effects/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/effects/schematics-core/utility/json-utilts.ts b/modules/effects/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/effects/schematics-core/utility/json-utilts.ts +++ b/modules/effects/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/entity/schematics-core/utility/angular-utils.ts b/modules/entity/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/entity/schematics-core/utility/angular-utils.ts +++ b/modules/entity/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/entity/schematics-core/utility/json-utilts.ts b/modules/entity/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/entity/schematics-core/utility/json-utilts.ts +++ b/modules/entity/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/router-store/schematics-core/utility/angular-utils.ts b/modules/router-store/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/router-store/schematics-core/utility/angular-utils.ts +++ b/modules/router-store/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/router-store/schematics-core/utility/json-utilts.ts b/modules/router-store/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/router-store/schematics-core/utility/json-utilts.ts +++ b/modules/router-store/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/schematics-core/utility/angular-utils.ts b/modules/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/schematics-core/utility/angular-utils.ts +++ b/modules/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/schematics-core/utility/json-utilts.ts b/modules/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/schematics-core/utility/json-utilts.ts +++ b/modules/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/schematics/schematics-core/utility/angular-utils.ts b/modules/schematics/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/schematics/schematics-core/utility/angular-utils.ts +++ b/modules/schematics/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/schematics/schematics-core/utility/json-utilts.ts b/modules/schematics/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/schematics/schematics-core/utility/json-utilts.ts +++ b/modules/schematics/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/store-devtools/schematics-core/utility/angular-utils.ts b/modules/store-devtools/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/store-devtools/schematics-core/utility/angular-utils.ts +++ b/modules/store-devtools/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/store-devtools/schematics-core/utility/json-utilts.ts b/modules/store-devtools/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/store-devtools/schematics-core/utility/json-utilts.ts +++ b/modules/store-devtools/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/modules/store/schematics-core/utility/angular-utils.ts b/modules/store/schematics-core/utility/angular-utils.ts index 448eb24784..7436a9923f 100644 --- a/modules/store/schematics-core/utility/angular-utils.ts +++ b/modules/store/schematics-core/utility/angular-utils.ts @@ -1,11 +1,6 @@ -import { - JsonParseMode, - dirname, - normalize, - parseJsonAst, - resolve, -} from '@angular-devkit/core'; +import { dirname, normalize, resolve } from '@angular-devkit/core'; import { Tree } from '@angular-devkit/schematics'; +import { parseJsonAst } from '@angular-devkit/core/src/json/parser'; import { findPropertyInAstObject } from './json-utilts'; // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts @@ -18,7 +13,7 @@ export function isIvyEnabled(tree: Tree, tsConfigPath: string): boolean { return true; } - const tsCfgAst = parseJsonAst(buffer.toString(), JsonParseMode.Loose); + const tsCfgAst = parseJsonAst(buffer.toString()); if (tsCfgAst.kind !== 'object') { return true; diff --git a/modules/store/schematics-core/utility/json-utilts.ts b/modules/store/schematics-core/utility/json-utilts.ts index 4edbbc9edc..be6b7b88ad 100644 --- a/modules/store/schematics-core/utility/json-utilts.ts +++ b/modules/store/schematics-core/utility/json-utilts.ts @@ -1,11 +1,9 @@ -import { JsonAstNode, JsonAstObject } from '@angular-devkit/core'; - // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/utility/json-utils.ts export function findPropertyInAstObject( - node: JsonAstObject, + node: any, propertyName: string -): JsonAstNode | null { - let maybeNode: JsonAstNode | null = null; +): any | null { + let maybeNode: any | null = null; for (const property of node.properties) { if (property.key.value == propertyName) { maybeNode = property.value; diff --git a/tsconfig.json b/tsconfig.json index e183ac6bd0..7b4f4835ad 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,8 +11,8 @@ "noStrictGenericChecks": true, "lib": ["es2016", "dom"], "outDir": "../out-tsc/app", - "target": "es2015", - "module": "es2020", + "target": "es5", + "module": "commonjs", "baseUrl": ".", "rootDir": ".", "strict": true,