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

@ngrx/component-store

Package Overview
Dependencies
Maintainers
4
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ngrx/component-store - npm Package Compare versions

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

2

bundles/ngrx-component-store.umd.js

@@ -429,2 +429,3 @@ (function (global, factory) {

var _b = __read(_a, 2), value = _b[0], currentState = _b[1];
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
_this.stateSubject$.next(updaterFn(currentState, value));

@@ -489,2 +490,3 @@ },

});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return value;

@@ -491,0 +493,0 @@ };

4

esm2015/src/component-store.js

@@ -60,2 +60,3 @@ import { isObservable, of, ReplaySubject, throwError, combineLatest, Subject, queueScheduler, scheduled, } from 'rxjs';

next: ([value, currentState]) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.stateSubject$.next(updaterFn(currentState, value));

@@ -119,2 +120,3 @@ },

});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return value;

@@ -196,2 +198,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LXN0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbW9kdWxlcy9jb21wb25lbnQtc3RvcmUvc3JjL2NvbXBvbmVudC1zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsWUFBWSxFQUVaLEVBQUUsRUFDRixhQUFhLEVBRWIsVUFBVSxFQUNWLGFBQWEsRUFDYixPQUFPLEVBQ1AsY0FBYyxFQUNkLFNBQVMsR0FDVixNQUFNLE1BQU0sQ0FBQztBQUNkLE9BQU8sRUFDTCxTQUFTLEVBQ1QsU0FBUyxFQ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0geyBkZWJvdW5jZTogZmFsc2UgfTtcbiAgbGV0IHByb2plY3RvcjogUHJvamVjdG9yRm47XG4gIC8vIExhc3QgYXJndW1lbnQgaXMgZWl0aGVyIHByb2plY3RvciBvciBjb25maWdcbiAgY29uc3QgcHJvamVjdG9yT3JDb25maWcgPSBzZWxlY3RvckFyZ3MucG9wKCkgYXMgUHJvamVjdG9yRm4gfCBTZWxlY3RDb25maWc7XG5cbiAgaWYgKHR5cGVvZiBwcm9qZWN0b3JPckNvbmZpZyAhPT0gJ2Z1bmN0aW9uJykge1xuICAgIC8vIFdlIGdvdCB0aGUgY29uZmlnIGFzIHRoZSBsYXN0IGFyZ3VtZW50LCByZXBsYWNlIGFueSBkZWZhdWx0IHZhbHVlcyB3aXRoIGl0LlxuICAgIGNvbmZpZyA9IHsgLi4uY29uZmlnLCAuLi5wcm9qZWN0b3JPckNvbmZpZyB9O1xuICAgIC8vIFBvcCB0aGUgbmV4dCBhcmdzLCB3aGljaCB3b3VsZCBiZSB0aGUgcHJvamVjdG9yIGZuLlxuICAgIHByb2plY3RvciA9IHNlbGVjdG9yQXJncy5wb3AoKSBhcyBQcm9qZWN0b3JGbjtcbiAgfSBlbHNlIHtcbiAgICBwcm9qZWN0b3IgPSBwcm9qZWN0b3JPckNvbmZpZztcbiAgfVxuICAvLyBUaGUgT2JzZXJ2YWJsZXMgdG8gY29tYmluZSwgaWYgdGhlcmUgYXJlIGFueS5cbiAgY29uc3Qgb2JzZXJ2YWJsZXMgPSBzZWxlY3RvckFyZ3MgYXMgT2JzZXJ2YWJsZTx1bmtub3duPltdO1xuICByZXR1cm4ge1xuICAgIG9ic2VydmFibGVzLFxuICAgIHByb2plY3RvcixcbiAgICBjb25maWcsXG4gIH07XG59XG4iXX0=

@@ -113,2 +113,3 @@ import { Observable, Subscription, asapScheduler, ReplaySubject, isObservable, of, scheduled, queueScheduler, throwError, combineLatest, Subject, EMPTY } from 'rxjs';

next: ([value, currentState]) => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.stateSubject$.next(updaterFn(currentState, value));

@@ -172,2 +173,3 @@ },

});
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return value;

@@ -174,0 +176,0 @@ }

{
"name": "@ngrx/component-store",
"version": "12.0.0-beta.1",
"version": "12.0.0-rc.0",
"description": "Reactive store for component state",

@@ -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]) {

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