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

svelte

Package Overview
Dependencies
Maintainers
3
Versions
772
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte - npm Package Compare versions

Comparing version 2.4.1 to 2.4.2

6

CHANGELOG.md
# Svelte changelog
## 2.4.2
* Evaluate `each` key in child scope ([#1397](https://github.com/sveltejs/svelte/issues/1397))
* Prevent false negatives and positives when detecting cyclical computed store properties ([#1399](https://github.com/sveltejs/svelte/issues/1399))
* Only update dynamic component props ([#1394](https://github.com/sveltejs/svelte/issues/1394))
## 2.4.1

@@ -4,0 +10,0 @@

2

cli/index.ts.js

@@ -533,3 +533,3 @@ 'use strict';

var version = "2.4.1";
var version = "2.4.2";

@@ -536,0 +536,0 @@ const prog = lib$2('svelte').version(version);

{
"name": "svelte",
"version": "2.4.1",
"version": "2.4.2",
"description": "The magical disappearing UI framework",

@@ -5,0 +5,0 @@ "main": "compiler/svelte.js",

@@ -52,19 +52,21 @@ import {

var sorted = this._sortedComputedProperties = [];
var cycles;
var visited = blankObject();
var currentKey;
function visit(key) {
if (cycles[key]) {
throw new Error('Cyclical dependency detected');
}
var c = computed[key];
if (visited[key]) return;
visited[key] = true;
if (c) {
c.deps.forEach(dep => {
if (dep === currentKey) {
throw new Error(`Cyclical dependency detected between ${dep} <-> ${key}`);
}
var c = computed[key];
visit(dep);
});
if (c) {
cycles[key] = true;
c.deps.forEach(visit);
sorted.push(c);
if (!visited[key]) {
visited[key] = true;
sorted.push(c);
}
}

@@ -74,4 +76,3 @@ }

for (var key in this._computed) {
cycles = blankObject();
visit(key);
visit(currentKey = key);
}

@@ -78,0 +79,0 @@ },

@@ -97,19 +97,21 @@ (function (global, factory) {

var sorted = this._sortedComputedProperties = [];
var cycles;
var visited = blankObject();
var currentKey;
function visit(key) {
if (cycles[key]) {
throw new Error('Cyclical dependency detected');
}
var c = computed[key];
if (visited[key]) return;
visited[key] = true;
if (c) {
c.deps.forEach(dep => {
if (dep === currentKey) {
throw new Error(`Cyclical dependency detected between ${dep} <-> ${key}`);
}
var c = computed[key];
visit(dep);
});
if (c) {
cycles[key] = true;
c.deps.forEach(visit);
sorted.push(c);
if (!visited[key]) {
visited[key] = true;
sorted.push(c);
}
}

@@ -119,4 +121,3 @@ }

for (var key in this._computed) {
cycles = blankObject();
visit(key);
visit(currentKey = key);
}

@@ -123,0 +124,0 @@ },

Sorry, the diff of this file is too big to display

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