Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ngrx/schematics

Package Overview
Dependencies
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/schematics - npm Package Compare versions

Comparing version 12.0.0-beta.1 to 12.0.0-rc.0

2

package.json
{
"name": "@ngrx/schematics",
"version": "12.0.0-beta.1",
"version": "12.0.0-rc.0",
"description": "NgRx Schematics for Angular",

@@ -5,0 +5,0 @@ "repository": {

@@ -260,3 +260,3 @@ "use strict";

var nodes = getDecoratorMetadata(source, 'NgModule', '@angular/core');
var node = nodes[0]; // tslint:disable-line:no-any
var node = nodes[0]; // eslint-disable-line @typescript-eslint/no-explicit-any
// Find the decorator declaration.

@@ -417,3 +417,3 @@ if (!node) {

var nodes = getDecoratorMetadata(source, 'Component', '@angular/core');
var node = nodes[0]; // tslint:disable-line:no-any
var node = nodes[0]; // eslint-disable-line @typescript-eslint/no-explicit-any
// Find the decorator declaration.

@@ -662,4 +662,8 @@ if (!node) {

var changes = imports.map(function (p) {
var importSpecifiers = p.importClause.namedBindings
.elements;
var _a;
var namedImports = (_a = p === null || p === void 0 ? void 0 : p.importClause) === null || _a === void 0 ? void 0 : _a.namedBindings;
if (!namedImports) {
return [];
}
var importSpecifiers = namedImports.elements;
var isAlreadyImported = importSpecifiers

@@ -666,0 +670,0 @@ .map(importText)

"use strict";
exports.__esModule = true;
exports.platformVersion = void 0;
exports.platformVersion = '^12.0.0-beta.1';
exports.platformVersion = '^12.0.0-rc.0';
//# sourceMappingURL=libs-version.js.map

@@ -116,3 +116,3 @@ "use strict";

var matches = text.match(/^\r?\n+(\s*)/);
if (matches.length > 0) {
if (matches && matches.length > 0) {
toInsert = "" + matches[1] + keyInsert + "\n";

@@ -167,3 +167,3 @@ }

var matches = text.match(/^\r?\n+(\s*)/);
if (matches.length > 0) {
if (matches && matches.length > 0) {
toInsert = "\n" + matches[1] + keyInsert;

@@ -170,0 +170,0 @@ }

@@ -8,4 +8,5 @@ "use strict";

function addPackageToPackageJson(host, type, pkg, version) {
var _a, _b;
if (host.exists('package.json')) {
var sourceText = host.read('package.json').toString('utf-8');
var sourceText = (_b = (_a = host.read('package.json')) === null || _a === void 0 ? void 0 : _a.toString('utf-8')) !== null && _b !== void 0 ? _b : '{}';
var json = JSON.parse(sourceText);

@@ -12,0 +13,0 @@ if (!json[type]) {

@@ -94,3 +94,3 @@ import {

);
expect(content).toMatch(/import\ {\ Store\ }\ from\ '@ngrx\/store';/);
expect(content).toMatch(/import { Store } from '@ngrx\/store';/);
});

@@ -108,3 +108,3 @@

expect(content).toMatch(/constructor\(private store\: Store\) { }\n\n/);
expect(content).toMatch(/constructor\(private store: Store\) { }\n\n/);
});

@@ -111,0 +111,0 @@

@@ -53,3 +53,9 @@ "use strict";

.map(function (effect) {
if (!effect.initializer) {
return [];
}
var decorator = (effect.decorators || []).find(isEffectDecorator);
if (!decorator) {
return [];
}
var effectArguments = getDispatchProperties(host, sourceFile.text, decorator);

@@ -65,4 +71,6 @@ var end = effectArguments ? ", " + effectArguments + ")" : ')';

.map(function (effect) { return effect.decorators; })
.filter(function (decorators) { return decorators; })
.map(function (decorators) {
if (!decorators) {
return [];
}
var effectDecorators = decorators.filter(isEffectDecorator);

@@ -69,0 +77,0 @@ return effectDecorators.map(function (decorator) {

@@ -307,3 +307,3 @@ import {

expect(content).toMatch(
/import \{ FooActionTypes, FooActions } from \'\.\.\/\.\.\/actions\/foo\/foo\.actions';/
/import \{ FooActionTypes, FooActions } from '\.\.\/\.\.\/actions\/foo\/foo\.actions';/
);

@@ -310,0 +310,0 @@ });

@@ -202,4 +202,4 @@ import {

).toBeGreaterThanOrEqual(0);
expect(content).toMatch(/\[fromUser.usersFeatureKey\]\: fromUser.State/);
expect(content).toMatch(/\[fromUser.usersFeatureKey\]\: fromUser.reducer/);
expect(content).toMatch(/\[fromUser.usersFeatureKey\]: fromUser.State/);
expect(content).toMatch(/\[fromUser.usersFeatureKey\]: fromUser.reducer/);
});

@@ -229,4 +229,4 @@

expect(fileContent).toMatch(/export const loadFoos = createAction\(/);
expect(fileContent).toMatch(/\[Foo\/API\] Load Foos\'/);
expect(fileContent).toMatch(/props\<\{ foos\: Foo\[\] }>\(\)/);
expect(fileContent).toMatch(/\[Foo\/API\] Load Foos'/);
expect(fileContent).toMatch(/props<\{ foos: Foo\[\] }>\(\)/);
});

@@ -242,3 +242,3 @@

expect(fileContent).toMatch(
/import \* as FooActions from \'\.\/foo.actions\';/
/import \* as FooActions from '\.\/foo.actions';/
);

@@ -245,0 +245,0 @@ expect(fileContent).toMatch(/on\(FooActions.addFoo,/);

@@ -24,3 +24,5 @@ "use strict";

var m = match.toString();
changes.push(new schematics_core_1.ReplaceChange(template.fileName, template.start + match.index, m, m.replace('async', 'ngrxPush')));
changes.push(new schematics_core_1.ReplaceChange(template.fileName,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
template.start + match.index, m, m.replace('async', 'ngrxPush')));
}

@@ -27,0 +29,0 @@ return schematics_core_1.commitChanges(host, template.fileName, changes);

@@ -262,3 +262,3 @@ import {

expect(reducers).toMatch(/\[fromFoo.fooFeatureKey\]\: fromFoo.State/);
expect(reducers).toMatch(/\[fromFoo.fooFeatureKey\]: fromFoo.State/);
});

@@ -276,3 +276,3 @@

expect(reducers).toMatch(/\[fromFoo.fooFeatureKey\]\: fromFoo.reducer/);
expect(reducers).toMatch(/\[fromFoo.fooFeatureKey\]: fromFoo.reducer/);
});

@@ -279,0 +279,0 @@

@@ -174,3 +174,3 @@ import { tags } from '@angular-devkit/core';

expect(selectorContent).toMatch(
/import\ \* as fromFoo from\ \'\.\.\/\.\.\/reducers\/foo\/foo\.reducer';/
/import \* as fromFoo from '\.\.\/\.\.\/reducers\/foo\/foo\.reducer';/
);

@@ -180,6 +180,6 @@

expect(specContent).toMatch(
/import\ \* as fromFoo from\ \'\.\.\/\.\.\/reducers\/foo\/foo\.reducer';/
/import \* as fromFoo from '\.\.\/\.\.\/reducers\/foo\/foo\.reducer';/
);
expect(specContent).toMatch(
/import\ \{ selectFooState \} from\ \'\.\/foo\.selectors';/
/import \{ selectFooState \} from '\.\/foo\.selectors';/
);

@@ -186,0 +186,0 @@ });

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc