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

svelte

Package Overview
Dependencies
Maintainers
3
Versions
819
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.7.0 to 5.7.1

2

package.json

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

"license": "MIT",
"version": "5.7.0",
"version": "5.7.1",
"type": "module",

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

@@ -23,2 +23,4 @@ /** @import { BlockStatement, Expression, ExpressionStatement, Identifier, MemberExpression, Property, Statement } from 'estree' */

const props_and_spreads = [];
/** @type {Array<() => void>} */
const delayed_props = [];

@@ -67,10 +69,19 @@ /** @type {ExpressionStatement[]} */

* @param {Property} prop
* @param {boolean} [delay]
*/
function push_prop(prop) {
const current = props_and_spreads.at(-1);
const current_is_props = Array.isArray(current);
const props = current_is_props ? current : [];
props.push(prop);
if (!current_is_props) {
props_and_spreads.push(props);
function push_prop(prop, delay = false) {
const do_push = () => {
const current = props_and_spreads.at(-1);
const current_is_props = Array.isArray(current);
const props = current_is_props ? current : [];
props.push(prop);
if (!current_is_props) {
props_and_spreads.push(props);
}
};
if (delay) {
delayed_props.push(do_push);
} else {
do_push();
}

@@ -207,8 +218,10 @@ }

// Delay prop pushes so bindings come at the end, to avoid spreads overwriting them
if (is_store_sub) {
push_prop(
b.get(attribute.name, [b.stmt(b.call('$.mark_store_binding')), b.return(expression)])
b.get(attribute.name, [b.stmt(b.call('$.mark_store_binding')), b.return(expression)]),
true
);
} else {
push_prop(b.get(attribute.name, [b.return(expression)]));
push_prop(b.get(attribute.name, [b.return(expression)]), true);
}

@@ -218,3 +231,4 @@

push_prop(
b.set(attribute.name, [b.stmt(/** @type {Expression} */ (context.visit(assignment)))])
b.set(attribute.name, [b.stmt(/** @type {Expression} */ (context.visit(assignment)))]),
true
);

@@ -225,2 +239,4 @@ }

delayed_props.forEach((fn) => fn());
if (slot_scope_applies_to_itself) {

@@ -227,0 +243,0 @@ context.state.init.push(...lets);

@@ -16,2 +16,4 @@ /** @import { BlockStatement, Expression, Pattern, Property, Statement } from 'estree' */

const props_and_spreads = [];
/** @type {Array<() => void>} */
const delayed_props = [];

@@ -53,10 +55,19 @@ /** @type {Property[]} */

* @param {Property} prop
* @param {boolean} [delay]
*/
function push_prop(prop) {
const current = props_and_spreads.at(-1);
const current_is_props = Array.isArray(current);
const props = current_is_props ? current : [];
props.push(prop);
if (!current_is_props) {
props_and_spreads.push(props);
function push_prop(prop, delay = false) {
const do_push = () => {
const current = props_and_spreads.at(-1);
const current_is_props = Array.isArray(current);
const props = current_is_props ? current : [];
props.push(prop);
if (!current_is_props) {
props_and_spreads.push(props);
}
};
if (delay) {
delayed_props.push(do_push);
} else {
do_push();
}

@@ -86,7 +97,8 @@ }

} else if (attribute.type === 'BindDirective' && attribute.name !== 'this') {
// TODO this needs to turn the whole thing into a while loop because the binding could be mutated eagerly in the child
// Delay prop pushes so bindings come at the end, to avoid spreads overwriting them
push_prop(
b.get(attribute.name, [
b.return(/** @type {Expression} */ (context.visit(attribute.expression)))
])
]),
true
);

@@ -101,3 +113,4 @@ push_prop(

b.stmt(b.assignment('=', b.id('$$settled'), b.false))
])
]),
true
);

@@ -107,2 +120,4 @@ }

delayed_props.forEach((fn) => fn());
/** @type {Statement[]} */

@@ -109,0 +124,0 @@ const snippet_declarations = [];

@@ -86,3 +86,3 @@ /** @import { ComponentContext, ComponentContextLegacy } from '#client' */

*
* @deprecated Use callback props and/or the `$host()` rune instead — see https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events
* @deprecated Use callback props and/or the `$host()` rune instead — see [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Event-changes-Component-events)
* @template {Record<string, any>} [EventMap = any]

@@ -126,3 +126,3 @@ * @returns {EventDispatcher<EventMap>}

*
* @deprecated Use `$effect.pre` instead — see https://svelte.dev/docs/svelte/$effect#$effect.pre
* @deprecated Use [`$effect.pre`](https://svelte.dev/docs/svelte/$effect#$effect.pre) instead
* @param {() => void} fn

@@ -150,3 +150,3 @@ * @returns {void}

*
* @deprecated Use `$effect` instead — see https://svelte.dev/docs/svelte/$effect
* @deprecated Use [`$effect`](https://svelte.dev/docs/svelte/$effect) instead
* @param {() => void} fn

@@ -153,0 +153,0 @@ * @returns {void}

@@ -56,3 +56,3 @@ // This should contain all the public interfaces (not all of them are actually importable, check current Svelte for which ones are).

* is a stop-gap solution. Migrate towards using `mount` instead. See
* https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes for more info.
* [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes) for more info.
*/

@@ -87,3 +87,3 @@ constructor(options: ComponentConstructorOptions<Properties<Props, Slots>>);

* @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.

@@ -95,3 +95,3 @@ */

* @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.

@@ -106,3 +106,3 @@ */

* @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.

@@ -160,3 +160,3 @@ */

* @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.

@@ -167,3 +167,3 @@ */

* @deprecated This method only exists when using one of the legacy compatibility helpers, which
* is a stop-gap solution. See https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes
* is a stop-gap solution. See [migration guide](https://svelte.dev/docs/svelte/v5-migration-guide#Components-are-no-longer-classes)
* for more info.

@@ -170,0 +170,0 @@ */

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

*/
export const VERSION = '5.7.0';
export const VERSION = '5.7.1';
export const PUBLIC_VERSION = '5';

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

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

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