Socket
Socket
Sign inDemoInstall

svelte

Package Overview
Dependencies
Maintainers
3
Versions
752
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 5.0.0-next.266 to 5.0.0-next.267

2

package.json

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "5.0.0-next.266",
"version": "5.0.0-next.267",
"type": "module",

@@ -8,0 +8,0 @@ "types": "./types/index.d.ts",

@@ -276,3 +276,3 @@ /** @import { VariableDeclarator, Node, Identifier, AssignmentExpression, LabeledStatement, ExpressionStatement } from 'estree' */

str.move(start, end, /** @type {number} */ (parsed.instance?.content.end));
str.remove(start - (source[start - 2] === '\r' ? 2 : 1), start);
str.update(start - (source[start - 2] === '\r' ? 2 : 1), start, '');
}

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

@@ -21,3 +21,7 @@ /** @import { BlockStatement, Expression, Pattern, Statement } from 'estree' */

if (node.then) {
const argument = node.value && create_derived_block_argument(node.value, context);
const then_context = {
...context,
state: { ...context.state, transform: { ...context.state.transform } }
};
const argument = node.value && create_derived_block_argument(node.value, then_context);

@@ -29,3 +33,3 @@ /** @type {Pattern[]} */

const declarations = argument?.declarations ?? [];
const block = /** @type {BlockStatement} */ (context.visit(node.then));
const block = /** @type {BlockStatement} */ (then_context.visit(node.then, then_context.state));

@@ -36,3 +40,4 @@ then_block = b.arrow(args, b.block([...declarations, ...block.body]));

if (node.catch) {
const argument = node.error && create_derived_block_argument(node.error, context);
const catch_context = { ...context, state: { ...context.state } };
const argument = node.error && create_derived_block_argument(node.error, catch_context);

@@ -44,3 +49,5 @@ /** @type {Pattern[]} */

const declarations = argument?.declarations ?? [];
const block = /** @type {BlockStatement} */ (context.visit(node.catch));
const block = /** @type {BlockStatement} */ (
catch_context.visit(node.catch, catch_context.state)
);

@@ -47,0 +54,0 @@ catch_block = b.arrow(args, b.block([...declarations, ...block.body]));

@@ -228,2 +228,10 @@ /** @import { EachItem, EachState, Effect, MaybeSource, Source, TemplateNode, TransitionManager, Value } from '#client' */

}
// When we mount the each block for the first time, the collection won't be
// connected to this effect as the effect hasn't finished running yet and its deps
// won't be assigned. However, it's possible that when reconciling the each block
// that a mutation occurred and it's made the collection MAYBE_DIRTY, so reading the
// collection again can provide consistency to the reactive graph again as the deriveds
// will now be `CLEAN`.
get_collection();
});

@@ -230,0 +238,0 @@

@@ -34,3 +34,3 @@ /** @import { Derived, Effect } from '#client' */

export function derived(fn) {
let flags = DERIVED | DIRTY;
var flags = DERIVED | DIRTY;

@@ -62,5 +62,2 @@ if (active_effect === null) {

}
if (active_effect !== null) {
(active_effect.deriveds ??= []).push(signal);
}

@@ -67,0 +64,0 @@ return signal;

@@ -804,6 +804,13 @@ /** @import { ComponentContext, Derived, Effect, Reaction, Signal, Source, Value } from '#client' */

}
} else if (is_derived) {
var derived = /** @type {Derived} */ (signal);
var parent = derived.parent;
if (parent !== null && !parent.deriveds?.includes(derived)) {
(parent.deriveds ??= []).push(derived);
}
}
if (is_derived) {
var derived = /** @type {Derived} */ (signal);
derived = /** @type {Derived} */ (signal);

@@ -810,0 +817,0 @@ if (check_dirtiness(derived)) {

@@ -9,3 +9,3 @@ // generated during release, do not modify

*/
export const VERSION = '5.0.0-next.266';
export const VERSION = '5.0.0-next.267';
export const PUBLIC_VERSION = '5';

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