@ngrx/store
Advanced tools
Comparing version 13.0.0-beta.0 to 13.0.0-rc.0
@@ -8,3 +8,3 @@ "use strict"; | ||
return function (tree) { | ||
schematics_core_1.visitTSSourceFiles(tree, function (sourceFile) { | ||
(0, schematics_core_1.visitTSSourceFiles)(tree, function (sourceFile) { | ||
var runMigration = sourceFile.statements | ||
@@ -26,3 +26,3 @@ .filter(ts.isImportDeclaration) | ||
ts.forEachChild(sourceFile, crawl); | ||
return schematics_core_1.commitChanges(tree, sourceFile.fileName, changes); | ||
return (0, schematics_core_1.commitChanges)(tree, sourceFile.fileName, changes); | ||
function crawl(node) { | ||
@@ -45,5 +45,5 @@ var _a; | ||
function default_1() { | ||
return schematics_1.chain([updateCreateFeatureSelectorGenerics()]); | ||
return (0, schematics_1.chain)([updateCreateFeatureSelectorGenerics()]); | ||
} | ||
exports["default"] = default_1; | ||
//# sourceMappingURL=index.js.map |
@@ -5,5 +5,5 @@ "use strict"; | ||
function default_1() { | ||
return schematics_core_1.updatePackage('store'); | ||
return (0, schematics_core_1.updatePackage)('store'); | ||
} | ||
exports["default"] = default_1; | ||
//# sourceMappingURL=index.js.map |
@@ -22,6 +22,10 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -36,10 +40,10 @@ exports.__esModule = true; | ||
return function (tree, context) { | ||
schematics_core_1.visitTSSourceFiles(tree, function (sourceFile) { | ||
(0, schematics_core_1.visitTSSourceFiles)(tree, function (sourceFile) { | ||
var createChange = function (node) { | ||
return schematics_core_1.createReplaceChange(sourceFile, node, META_REDUCERS, 'USER_PROVIDED_META_REDUCERS'); | ||
return (0, schematics_core_1.createReplaceChange)(sourceFile, node, META_REDUCERS, 'USER_PROVIDED_META_REDUCERS'); | ||
}; | ||
var changes = []; | ||
changes.push.apply(changes, __spreadArray([], __read(findMetaReducersImportStatements(sourceFile, createChange, context.logger)))); | ||
changes.push.apply(changes, __spreadArray([], __read(findMetaReducersAssignment(sourceFile, createChange)))); | ||
return schematics_core_1.commitChanges(tree, sourceFile.fileName, changes); | ||
changes.push.apply(changes, __spreadArray([], __read(findMetaReducersImportStatements(sourceFile, createChange, context.logger)), false)); | ||
changes.push.apply(changes, __spreadArray([], __read(findMetaReducersAssignment(sourceFile, createChange)), false)); | ||
return (0, schematics_core_1.commitChanges)(tree, sourceFile.fileName, changes); | ||
}); | ||
@@ -49,3 +53,3 @@ }; | ||
function default_1() { | ||
return schematics_1.chain([updateMetaReducersToken()]); | ||
return (0, schematics_1.chain)([updateMetaReducersToken()]); | ||
} | ||
@@ -52,0 +56,0 @@ exports["default"] = default_1; |
@@ -18,6 +18,10 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -31,4 +35,4 @@ exports.__esModule = true; | ||
// only add runtime checks when ngrx-store-freeze is used | ||
schematics_core_1.visitTSSourceFiles(tree, removeUsages) && | ||
schematics_core_1.visitTSSourceFiles(tree, insertRuntimeChecks); | ||
(0, schematics_core_1.visitTSSourceFiles)(tree, removeUsages) && | ||
(0, schematics_core_1.visitTSSourceFiles)(tree, insertRuntimeChecks); | ||
}; | ||
@@ -59,3 +63,3 @@ } | ||
function default_1() { | ||
return schematics_1.chain([removeNgRxStoreFreezePackage(), replaceWithRuntimeChecks()]); | ||
return (0, schematics_1.chain)([removeNgRxStoreFreezePackage(), replaceWithRuntimeChecks()]); | ||
} | ||
@@ -73,4 +77,4 @@ exports["default"] = default_1; | ||
var usageReplacements = findStoreFreezeUsagesToRemove(sourceFile); | ||
var changes = __spreadArray(__spreadArray([], __read(importRemovements)), __read(usageReplacements)); | ||
return schematics_core_1.commitChanges(tree, sourceFile.fileName, changes); | ||
var changes = __spreadArray(__spreadArray([], __read(importRemovements), false), __read(usageReplacements), false); | ||
return (0, schematics_core_1.commitChanges)(tree, sourceFile.fileName, changes); | ||
} | ||
@@ -83,3 +87,3 @@ function insertRuntimeChecks(sourceFile, tree) { | ||
var changes = findRuntimeCHecksToInsert(sourceFile); | ||
return schematics_core_1.commitChanges(tree, sourceFile.fileName, changes); | ||
return (0, schematics_core_1.commitChanges)(tree, sourceFile.fileName, changes); | ||
} | ||
@@ -86,0 +90,0 @@ function findStoreFreezeImportsToRemove(sourceFile) { |
{ | ||
"name": "@ngrx/store", | ||
"version": "13.0.0-beta.0", | ||
"version": "13.0.0-rc.0", | ||
"description": "RxJS powered Redux for Angular apps", | ||
@@ -24,3 +24,3 @@ "repository": { | ||
"peerDependencies": { | ||
"@angular/core": "^13.0.0-rc.0", | ||
"@angular/core": "^13.0.0", | ||
"rxjs": "^6.5.3 || ^7.4.0" | ||
@@ -47,8 +47,29 @@ }, | ||
}, | ||
"main": "bundles/ngrx-store.umd.js", | ||
"module": "fesm2015/ngrx-store.js", | ||
"es2015": "fesm2015/ngrx-store.js", | ||
"esm2015": "esm2015/ngrx-store.js", | ||
"fesm2015": "fesm2015/ngrx-store.js", | ||
"typings": "ngrx-store.d.ts" | ||
} | ||
"module": "fesm2015/ngrx-store.mjs", | ||
"es2020": "fesm2020/ngrx-store.mjs", | ||
"esm2020": "esm2020/ngrx-store.mjs", | ||
"fesm2020": "fesm2020/ngrx-store.mjs", | ||
"fesm2015": "fesm2015/ngrx-store.mjs", | ||
"typings": "ngrx-store.d.ts", | ||
"exports": { | ||
"./package.json": { | ||
"default": "./package.json" | ||
}, | ||
".": { | ||
"types": "./ngrx-store.d.ts", | ||
"esm2020": "./esm2020/ngrx-store.mjs", | ||
"es2020": "./fesm2020/ngrx-store.mjs", | ||
"es2015": "./fesm2015/ngrx-store.mjs", | ||
"node": "./fesm2015/ngrx-store.mjs", | ||
"default": "./fesm2020/ngrx-store.mjs" | ||
}, | ||
"./testing": { | ||
"types": "./testing/ngrx-store-testing.d.ts", | ||
"esm2020": "./esm2020/testing/ngrx-store-testing.mjs", | ||
"es2020": "./fesm2020/ngrx-store-testing.mjs", | ||
"es2015": "./fesm2015/ngrx-store-testing.mjs", | ||
"node": "./fesm2015/ngrx-store-testing.mjs", | ||
"default": "./fesm2020/ngrx-store-testing.mjs" | ||
} | ||
} | ||
} |
@@ -5,2 +5,3 @@ "use strict"; | ||
var core_1 = require("@angular-devkit/core"); | ||
var parser_1 = require("@angular-devkit/core/src/json/parser"); | ||
var json_utilts_1 = require("./json-utilts"); | ||
@@ -15,9 +16,9 @@ // https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/migrations/update-9/utils.ts | ||
} | ||
var tsCfgAst = core_1.parseJsonAst(buffer.toString(), core_1.JsonParseMode.Loose); | ||
var tsCfgAst = (0, parser_1.parseJsonAst)(buffer.toString()); | ||
if (tsCfgAst.kind !== 'object') { | ||
return true; | ||
} | ||
var ngCompilerOptions = json_utilts_1.findPropertyInAstObject(tsCfgAst, 'angularCompilerOptions'); | ||
var ngCompilerOptions = (0, json_utilts_1.findPropertyInAstObject)(tsCfgAst, 'angularCompilerOptions'); | ||
if (ngCompilerOptions && ngCompilerOptions.kind === 'object') { | ||
var enableIvy = json_utilts_1.findPropertyInAstObject(ngCompilerOptions, 'enableIvy'); | ||
var enableIvy = (0, json_utilts_1.findPropertyInAstObject)(ngCompilerOptions, 'enableIvy'); | ||
if (enableIvy) { | ||
@@ -27,5 +28,5 @@ return !!enableIvy.value; | ||
} | ||
var configExtends = json_utilts_1.findPropertyInAstObject(tsCfgAst, 'extends'); | ||
var configExtends = (0, json_utilts_1.findPropertyInAstObject)(tsCfgAst, 'extends'); | ||
if (configExtends && configExtends.kind === 'string') { | ||
var extendedTsConfigPath = core_1.resolve(core_1.dirname(core_1.normalize(tsConfigPath)), core_1.normalize(configExtends.value)); | ||
var extendedTsConfigPath = (0, core_1.resolve)((0, core_1.dirname)((0, core_1.normalize)(tsConfigPath)), (0, core_1.normalize)(configExtends.value)); | ||
return isIvyEnabled(tree, extendedTsConfigPath); | ||
@@ -32,0 +33,0 @@ } |
@@ -29,6 +29,10 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -104,3 +108,3 @@ exports.__esModule = true; | ||
if (node.getChildCount(sourceFile) >= 0) { | ||
nodes.unshift.apply(nodes, __spreadArray([], __read(node.getChildren()))); | ||
nodes.unshift.apply(nodes, __spreadArray([], __read(node.getChildren()), false)); | ||
} | ||
@@ -679,3 +683,3 @@ } | ||
if (!isAlreadyImported) { | ||
return change_1.createReplaceChange(sourceFile, specifier, importAsIs, importToBe); | ||
return (0, change_1.createReplaceChange)(sourceFile, specifier, importAsIs, importToBe); | ||
} | ||
@@ -685,6 +689,6 @@ var nextIdentifier = importSpecifiers[index + 1]; | ||
if (nextIdentifier) { | ||
return change_1.createRemoveChange(sourceFile, specifier, specifier.getStart(sourceFile), nextIdentifier.getStart(sourceFile)); | ||
return (0, change_1.createRemoveChange)(sourceFile, specifier, specifier.getStart(sourceFile), nextIdentifier.getStart(sourceFile)); | ||
} | ||
// there are no imports following, just remove it | ||
return change_1.createRemoveChange(sourceFile, specifier, specifier.getStart(sourceFile), specifier.getEnd()); | ||
return (0, change_1.createRemoveChange)(sourceFile, specifier, specifier.getStart(sourceFile), specifier.getEnd()); | ||
}); | ||
@@ -691,0 +695,0 @@ return importChanges.filter(Boolean); |
@@ -22,18 +22,18 @@ "use strict"; | ||
(options.flat ? '' : '/' + core_1.strings.dasherize(options.name)); | ||
return core_1.normalize(findComponent(host, pathToCheck)); | ||
return (0, core_1.normalize)(findComponent(host, pathToCheck)); | ||
} | ||
else { | ||
var componentPath = core_1.normalize('/' + options.path + '/' + options.component); | ||
var componentBaseName = core_1.normalize(componentPath).split('/').pop(); | ||
var componentPath = (0, core_1.normalize)('/' + options.path + '/' + options.component); | ||
var componentBaseName = (0, core_1.normalize)(componentPath).split('/').pop(); | ||
if (host.exists(componentPath)) { | ||
return core_1.normalize(componentPath); | ||
return (0, core_1.normalize)(componentPath); | ||
} | ||
else if (host.exists(componentPath + '.ts')) { | ||
return core_1.normalize(componentPath + '.ts'); | ||
return (0, core_1.normalize)(componentPath + '.ts'); | ||
} | ||
else if (host.exists(componentPath + '.component.ts')) { | ||
return core_1.normalize(componentPath + '.component.ts'); | ||
return (0, core_1.normalize)(componentPath + '.component.ts'); | ||
} | ||
else if (host.exists(componentPath + '/' + componentBaseName + '.component.ts')) { | ||
return core_1.normalize(componentPath + '/' + componentBaseName + '.component.ts'); | ||
return (0, core_1.normalize)(componentPath + '/' + componentBaseName + '.component.ts'); | ||
} | ||
@@ -55,3 +55,3 @@ else { | ||
if (matches.length == 1) { | ||
return core_1.join(dir.path, matches[0]); | ||
return (0, core_1.join)(dir.path, matches[0]); | ||
} | ||
@@ -74,3 +74,3 @@ else if (matches.length > 1) { | ||
var _b = parsePath(to), toPath = _b.path, toFileName = _b.filename, toDirectory = _b.directory; | ||
var relativePath = core_1.relative(fromDirectory, toDirectory); | ||
var relativePath = (0, core_1.relative)(fromDirectory, toDirectory); | ||
var fixedRelativePath = relativePath.startsWith('.') | ||
@@ -87,5 +87,5 @@ ? relativePath | ||
function parsePath(path) { | ||
var pathNormalized = core_1.normalize(path); | ||
var filename = core_1.extname(pathNormalized) ? core_1.basename(pathNormalized) : ''; | ||
var directory = filename ? core_1.dirname(pathNormalized) : pathNormalized; | ||
var pathNormalized = (0, core_1.normalize)(path); | ||
var filename = (0, core_1.extname)(pathNormalized) ? (0, core_1.basename)(pathNormalized) : ''; | ||
var directory = filename ? (0, core_1.dirname)(pathNormalized) : pathNormalized; | ||
return { | ||
@@ -92,0 +92,0 @@ path: pathNormalized, |
@@ -22,18 +22,18 @@ "use strict"; | ||
(options.flat ? '' : '/' + core_1.strings.dasherize(options.name)); | ||
return core_1.normalize(findModule(host, pathToCheck)); | ||
return (0, core_1.normalize)(findModule(host, pathToCheck)); | ||
} | ||
else { | ||
var modulePath = core_1.normalize('/' + options.path + '/' + options.module); | ||
var moduleBaseName = core_1.normalize(modulePath).split('/').pop(); | ||
var modulePath = (0, core_1.normalize)('/' + options.path + '/' + options.module); | ||
var moduleBaseName = (0, core_1.normalize)(modulePath).split('/').pop(); | ||
if (host.exists(modulePath)) { | ||
return core_1.normalize(modulePath); | ||
return (0, core_1.normalize)(modulePath); | ||
} | ||
else if (host.exists(modulePath + '.ts')) { | ||
return core_1.normalize(modulePath + '.ts'); | ||
return (0, core_1.normalize)(modulePath + '.ts'); | ||
} | ||
else if (host.exists(modulePath + '.module.ts')) { | ||
return core_1.normalize(modulePath + '.module.ts'); | ||
return (0, core_1.normalize)(modulePath + '.module.ts'); | ||
} | ||
else if (host.exists(modulePath + '/' + moduleBaseName + '.module.ts')) { | ||
return core_1.normalize(modulePath + '/' + moduleBaseName + '.module.ts'); | ||
return (0, core_1.normalize)(modulePath + '/' + moduleBaseName + '.module.ts'); | ||
} | ||
@@ -56,3 +56,3 @@ else { | ||
if (matches.length == 1) { | ||
return core_1.join(dir.path, matches[0]); | ||
return (0, core_1.join)(dir.path, matches[0]); | ||
} | ||
@@ -75,3 +75,3 @@ else if (matches.length > 1) { | ||
var _b = parsePath(to), toPath = _b.path, toFileName = _b.filename, toDirectory = _b.directory; | ||
var relativePath = core_1.relative(fromDirectory, toDirectory); | ||
var relativePath = (0, core_1.relative)(fromDirectory, toDirectory); | ||
var fixedRelativePath = relativePath.startsWith('.') | ||
@@ -88,5 +88,5 @@ ? relativePath | ||
function parsePath(path) { | ||
var pathNormalized = core_1.normalize(path); | ||
var filename = core_1.extname(pathNormalized) ? core_1.basename(pathNormalized) : ''; | ||
var directory = filename ? core_1.dirname(pathNormalized) : pathNormalized; | ||
var pathNormalized = (0, core_1.normalize)(path); | ||
var filename = (0, core_1.extname)(pathNormalized) ? (0, core_1.basename)(pathNormalized) : ''; | ||
var directory = filename ? (0, core_1.dirname)(pathNormalized) : pathNormalized; | ||
return { | ||
@@ -93,0 +93,0 @@ path: pathNormalized, |
@@ -29,6 +29,10 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -50,3 +54,3 @@ exports.__esModule = true; | ||
} | ||
var reducersPath = core_1.normalize("/" + options.path + "/" + options.reducers); | ||
var reducersPath = (0, core_1.normalize)("/" + options.path + "/" + options.reducers); | ||
if (!host.exists(reducersPath)) { | ||
@@ -66,4 +70,4 @@ throw new Error("Specified reducers path " + reducersPath + " does not exist"); | ||
'.reducer'; | ||
var relativePath = find_module_1.buildRelativePath(reducersPath, reducerPath); | ||
var reducerImport = ast_utils_1.insertImport(source, reducersPath, "* as from" + stringUtils.classify(options.name), relativePath, true); | ||
var relativePath = (0, find_module_1.buildRelativePath)(reducersPath, reducerPath); | ||
var reducerImport = (0, ast_utils_1.insertImport)(source, reducersPath, "* as from" + stringUtils.classify(options.name), relativePath, true); | ||
var stateInterfaceInsert = addReducerToStateInterface(source, reducersPath, options); | ||
@@ -199,3 +203,3 @@ var reducerMapInsert = addReducerToActionReducerMap(source, reducersPath, options); | ||
var commonImports = [ | ||
ast_utils_1.insertImport(source, modulePath, 'StoreModule', '@ngrx/store'), | ||
(0, ast_utils_1.insertImport)(source, modulePath, 'StoreModule', '@ngrx/store'), | ||
]; | ||
@@ -207,9 +211,9 @@ var reducerPath = "/" + options.path + "/" + | ||
'.reducer'; | ||
var relativePath = find_module_1.buildRelativePath(modulePath, reducerPath); | ||
var reducerImport = ast_utils_1.insertImport(source, modulePath, "* as from" + stringUtils.classify(options.name), relativePath, true); | ||
var relativePath = (0, find_module_1.buildRelativePath)(modulePath, reducerPath); | ||
var reducerImport = (0, ast_utils_1.insertImport)(source, modulePath, "* as from" + stringUtils.classify(options.name), relativePath, true); | ||
var state = options.plural | ||
? stringUtils.pluralize(options.name) | ||
: stringUtils.camelize(options.name); | ||
var _b = __read(ast_utils_1.addImportToModule(source, modulePath, "StoreModule.forFeature(from" + stringUtils.classify(options.name) + "." + state + "FeatureKey, from" + stringUtils.classify(options.name) + ".reducer)", relativePath), 1), storeNgModuleImport = _b[0]; | ||
var changes = __spreadArray(__spreadArray([], __read(commonImports)), [reducerImport, storeNgModuleImport]); | ||
var _b = __read((0, ast_utils_1.addImportToModule)(source, modulePath, "StoreModule.forFeature(from" + stringUtils.classify(options.name) + "." + state + "FeatureKey, from" + stringUtils.classify(options.name) + ".reducer)", relativePath), 1), storeNgModuleImport = _b[0]; | ||
var changes = __spreadArray(__spreadArray([], __read(commonImports), false), [reducerImport, storeNgModuleImport], false); | ||
var recorder = host.beginUpdate(modulePath); | ||
@@ -216,0 +220,0 @@ try { |
@@ -6,7 +6,7 @@ "use strict"; | ||
function parseName(path, name) { | ||
var nameWithoutPath = core_1.basename(name); | ||
var namePath = core_1.dirname((path + '/' + name)); | ||
var nameWithoutPath = (0, core_1.basename)(name); | ||
var namePath = (0, core_1.dirname)((path + '/' + name)); | ||
return { | ||
name: nameWithoutPath, | ||
path: core_1.normalize('/' + namePath) | ||
path: (0, core_1.normalize)('/' + namePath) | ||
}; | ||
@@ -13,0 +13,0 @@ } |
@@ -6,3 +6,3 @@ "use strict"; | ||
function getProject(host, options) { | ||
var workspace = config_1.getWorkspace(host); | ||
var workspace = (0, config_1.getWorkspace)(host); | ||
if (!options.project) { | ||
@@ -9,0 +9,0 @@ var defaultProject = workspace |
@@ -99,4 +99,4 @@ "use strict"; | ||
ts.isStringLiteralLike(n.initializer)) { | ||
var parts = core_1.normalize(source.fileName).split('/').slice(0, -1); | ||
var templatePath = core_1.resolve(core_1.normalize(parts.join('/')), core_1.normalize(n.initializer.text)); | ||
var parts = (0, core_1.normalize)(source.fileName).split('/').slice(0, -1); | ||
var templatePath = (0, core_1.resolve)((0, core_1.normalize)(parts.join('/')), (0, core_1.normalize)(n.initializer.text)); | ||
if (!tree.exists(templatePath)) { | ||
@@ -103,0 +103,0 @@ return; |
@@ -40,6 +40,10 @@ "use strict"; | ||
}; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -74,6 +78,6 @@ exports.__esModule = true; | ||
var statePath = "/" + options.path + "/" + options.statePath; | ||
var relativePath = schematics_core_1.buildRelativePath(modulePath, statePath); | ||
var _b = __read(schematics_core_1.addImportToModule(source, modulePath, storeModuleSetup, relativePath), 1), storeNgModuleImport = _b[0]; | ||
var relativePath = (0, schematics_core_1.buildRelativePath)(modulePath, statePath); | ||
var _b = __read((0, schematics_core_1.addImportToModule)(source, modulePath, storeModuleSetup, relativePath), 1), storeNgModuleImport = _b[0]; | ||
var changes = [ | ||
schematics_core_1.insertImport(source, modulePath, 'StoreModule', '@ngrx/store'), | ||
(0, schematics_core_1.insertImport)(source, modulePath, 'StoreModule', '@ngrx/store'), | ||
storeNgModuleImport, | ||
@@ -83,3 +87,3 @@ ]; | ||
changes = changes.concat([ | ||
schematics_core_1.insertImport(source, modulePath, 'reducers, metaReducers', relativePath), | ||
(0, schematics_core_1.insertImport)(source, modulePath, 'reducers, metaReducers', relativePath), | ||
]); | ||
@@ -109,3 +113,3 @@ } | ||
return function (host, context) { | ||
schematics_core_1.addPackageToPackageJson(host, 'dependencies', '@ngrx/store', schematics_core_1.platformVersion); | ||
(0, schematics_core_1.addPackageToPackageJson)(host, 'dependencies', '@ngrx/store', schematics_core_1.platformVersion); | ||
context.addTask(new tasks_1.NodePackageInstallTask()); | ||
@@ -124,3 +128,3 @@ return host; | ||
} | ||
schematics_core_1.addPackageToPackageJson(host, 'devDependencies', 'eslint-plugin-ngrx', '^1.0.0'); | ||
(0, schematics_core_1.addPackageToPackageJson)(host, 'devDependencies', 'eslint-plugin-ngrx', '^1.0.0'); | ||
context.addTask(new tasks_1.NodePackageInstallTask()); | ||
@@ -148,15 +152,15 @@ try { | ||
function configureESLintPlugin(json) { | ||
json.plugins = __spreadArray(__spreadArray([], __read((json.plugins || []))), ['ngrx']); | ||
json["extends"] = __spreadArray(__spreadArray([], __read((json["extends"] || []))), ['plugin:ngrx/recommended']); | ||
json.plugins = __spreadArray(__spreadArray([], __read((json.plugins || [])), false), ['ngrx'], false); | ||
json["extends"] = __spreadArray(__spreadArray([], __read((json["extends"] || [])), false), ['plugin:ngrx/recommended'], false); | ||
} | ||
function default_1(options) { | ||
return function (host, context) { | ||
options.path = schematics_core_1.getProjectPath(host, options); | ||
var parsedPath = schematics_core_1.parseName(options.path, ''); | ||
options.path = (0, schematics_core_1.getProjectPath)(host, options); | ||
var parsedPath = (0, schematics_core_1.parseName)(options.path, ''); | ||
options.path = parsedPath.path; | ||
var statePath = "/" + options.path + "/" + options.statePath + "/index.ts"; | ||
var srcPath = core_1.dirname(options.path); | ||
var environmentsPath = schematics_core_1.buildRelativePath(statePath, "/" + srcPath + "/environments/environment"); | ||
var srcPath = (0, core_1.dirname)(options.path); | ||
var environmentsPath = (0, schematics_core_1.buildRelativePath)(statePath, "/" + srcPath + "/environments/environment"); | ||
if (options.module) { | ||
options.module = schematics_core_1.findModuleFromOptions(host, { | ||
options.module = (0, schematics_core_1.findModuleFromOptions)(host, { | ||
name: '', | ||
@@ -170,11 +174,11 @@ module: options.module, | ||
} | ||
var templateSource = schematics_1.apply(schematics_1.url('./files'), [ | ||
schematics_1.filter(function () { return (options.minimal ? false : true); }), | ||
schematics_1.applyTemplates(__assign(__assign(__assign({}, schematics_core_1.stringUtils), options), { environmentsPath: environmentsPath })), | ||
schematics_1.move(parsedPath.path), | ||
var templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [ | ||
(0, schematics_1.filter)(function () { return (options.minimal ? false : true); }), | ||
(0, schematics_1.applyTemplates)(__assign(__assign(__assign({}, schematics_core_1.stringUtils), options), { environmentsPath: environmentsPath })), | ||
(0, schematics_1.move)(parsedPath.path), | ||
]); | ||
return schematics_1.chain([ | ||
schematics_1.branchAndMerge(schematics_1.chain([addImportToNgModule(options), schematics_1.mergeWith(templateSource)])), | ||
options && options.skipPackageJson ? schematics_1.noop() : addNgRxStoreToPackageJson(), | ||
options && options.skipESLintPlugin ? schematics_1.noop() : addNgRxESLintPlugin(), | ||
return (0, schematics_1.chain)([ | ||
(0, schematics_1.branchAndMerge)((0, schematics_1.chain)([addImportToNgModule(options), (0, schematics_1.mergeWith)(templateSource)])), | ||
options && options.skipPackageJson ? (0, schematics_1.noop)() : addNgRxStoreToPackageJson(), | ||
options && options.skipESLintPlugin ? (0, schematics_1.noop)() : addNgRxESLintPlugin(), | ||
])(host, context); | ||
@@ -181,0 +185,0 @@ }; |
{ | ||
"name": "@ngrx/store/testing", | ||
"typings": "ngrx-store-testing.d.ts", | ||
"main": "../bundles/ngrx-store-testing.umd.js", | ||
"module": "../fesm2015/ngrx-store-testing.js", | ||
"es2015": "../fesm2015/ngrx-store-testing.js", | ||
"main": "../bundles/core-testing.umd.js", | ||
"module": "../fesm2015/ngrx-store-testing.mjs", | ||
"es2015": "../fesm2015/testing.js", | ||
"esm5": "../esm5/testing/testing.js", | ||
"esm2015": "../esm2015/testing/ngrx-store-testing.js", | ||
"esm2015": "../esm2015/testing/testing.js", | ||
"fesm5": "../fesm5/testing.js", | ||
"fesm2015": "../fesm2015/ngrx-store-testing.js", | ||
"fesm2015": "../fesm2015/ngrx-store-testing.mjs", | ||
"es2020": "../fesm2020/ngrx-store-testing.mjs", | ||
"esm2020": "../esm2020/testing/ngrx-store-testing.mjs", | ||
"fesm2020": "../fesm2020/ngrx-store-testing.mjs", | ||
"sideEffects": false | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
1
100
944375
8362
1