Comparing version 5.0.0-next.238 to 5.0.0-next.239
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "5.0.0-next.238", | ||
"version": "5.0.0-next.239", | ||
"type": "module", | ||
@@ -109,4 +109,4 @@ "types": "./types/index.d.ts", | ||
"devDependencies": { | ||
"@jridgewell/trace-mapping": "^0.3.22", | ||
"@playwright/test": "^1.35.1", | ||
"@jridgewell/trace-mapping": "^0.3.25", | ||
"@playwright/test": "^1.46.1", | ||
"@rollup/plugin-commonjs": "^25.0.7", | ||
@@ -117,16 +117,19 @@ "@rollup/plugin-node-resolve": "^15.2.3", | ||
"@types/aria-query": "^5.0.4", | ||
"@types/node": "^20.11.5", | ||
"dts-buddy": "^0.5.1", | ||
"esbuild": "^0.19.11", | ||
"rollup": "^4.9.5", | ||
"esbuild": "^0.21.5", | ||
"rollup": "^4.21.0", | ||
"source-map": "^0.7.4", | ||
"tiny-glob": "^0.2.9" | ||
"tiny-glob": "^0.2.9", | ||
"typescript": "^5.5.4", | ||
"vitest": "^2.0.5" | ||
}, | ||
"dependencies": { | ||
"@ampproject/remapping": "^2.2.1", | ||
"@jridgewell/sourcemap-codec": "^1.4.15", | ||
"@ampproject/remapping": "^2.3.0", | ||
"@jridgewell/sourcemap-codec": "^1.5.0", | ||
"@types/estree": "^1.0.5", | ||
"acorn": "^8.11.3", | ||
"acorn": "^8.12.1", | ||
"acorn-typescript": "^1.4.13", | ||
"aria-query": "^5.3.0", | ||
"axobject-query": "^4.0.0", | ||
"axobject-query": "^4.1.0", | ||
"esm-env": "^1.0.0", | ||
@@ -136,18 +139,5 @@ "esrap": "^1.2.2", | ||
"locate-character": "^3.0.0", | ||
"magic-string": "^0.30.5", | ||
"magic-string": "^0.30.11", | ||
"zimmerframe": "^1.1.2" | ||
}, | ||
"knip": { | ||
"entry": [ | ||
"src/*/index.js", | ||
"src/index-client.ts", | ||
"src/index-server.ts", | ||
"src/index.d.ts", | ||
"tests/**/*.js", | ||
"tests/**/*.ts" | ||
], | ||
"project": [ | ||
"src/**" | ||
] | ||
}, | ||
"scripts": { | ||
@@ -160,6 +150,4 @@ "build": "node scripts/process-messages && rollup -c && pnpm generate:types && node scripts/check-treeshakeability.js", | ||
"generate:types": "node ./scripts/generate-types.js && tsc -p tsconfig.generated.json", | ||
"format": "prettier --check --write .", | ||
"lint": "prettier --check . && eslint", | ||
"knip": "pnpm dlx knip" | ||
} | ||
} |
@@ -1250,11 +1250,2 @@ /* This file is generated by scripts/process-messages/index.js. Do not edit! */ | ||
/** | ||
* `<svelte:fragment>` slot attribute must have a static value | ||
* @param {null | number | NodeLike} node | ||
* @returns {never} | ||
*/ | ||
export function svelte_fragment_invalid_slot(node) { | ||
e(node, "svelte_fragment_invalid_slot", "`<svelte:fragment>` slot attribute must have a static value"); | ||
} | ||
/** | ||
* `<svelte:head>` cannot have attributes nor directives | ||
@@ -1261,0 +1252,0 @@ * @param {null | number | NodeLike} node |
@@ -355,3 +355,3 @@ /** @import * as ESTree from 'estree' */ | ||
export function prop_def(key, value, computed = false, is_static = false) { | ||
return { type: 'PropertyDefinition', key, value, computed, static: is_static }; | ||
return { type: 'PropertyDefinition', key, value, computed, static: is_static, decorators: [] }; | ||
} | ||
@@ -545,3 +545,4 @@ | ||
computed, | ||
static: is_static | ||
static: is_static, | ||
decorators: [] | ||
}; | ||
@@ -548,0 +549,0 @@ } |
@@ -331,3 +331,3 @@ /** @import { ValidatedCompileOptions } from '#compiler' */ | ||
}); | ||
return /** @type {SourceMap} */ (result_map); | ||
return /** @type {any} */ (result_map); | ||
} | ||
@@ -334,0 +334,0 @@ const regex_data_uri = /data:(?:application|text)\/json;(?:charset[:=]\S+?;)?base64,(\S*)/; |
@@ -97,3 +97,2 @@ /* This file is generated by scripts/process-messages/index.js. Do not edit! */ | ||
"options_renamed_ssr_dom", | ||
"derived_iife", | ||
"export_let_unused", | ||
@@ -579,10 +578,2 @@ "legacy_component_creation", | ||
/** | ||
* Use `$derived.by(() => {...})` instead of `$derived((() => {...})())` | ||
* @param {null | NodeLike} node | ||
*/ | ||
export function derived_iife(node) { | ||
w(node, "derived_iife", "Use `$derived.by(() => {...})` instead of `$derived((() => {...})())`"); | ||
} | ||
/** | ||
* Component has unused export property '%name%'. If it is for external reference only, please consider using `export const %name%` | ||
@@ -589,0 +580,0 @@ * @param {null | NodeLike} node |
@@ -92,3 +92,7 @@ import { DEV } from 'esm-env'; | ||
if (attribute === 'src' || attribute === 'href' || attribute === 'srcset') { | ||
if ( | ||
attribute === 'src' || | ||
attribute === 'srcset' || | ||
(attribute === 'href' && element.nodeName === 'LINK') | ||
) { | ||
if (!skip_warning) { | ||
@@ -392,3 +396,3 @@ check_src_in_dev_hydration(element, attribute, value); | ||
attribute, | ||
element.outerHTML.replace(element.innerHTML, '...'), | ||
element.outerHTML.replace(element.innerHTML, element.innerHTML && '...'), | ||
String(value) | ||
@@ -395,0 +399,0 @@ ); |
@@ -343,18 +343,2 @@ /* This file is generated by scripts/process-messages/index.js. Do not edit! */ | ||
} | ||
} | ||
/** | ||
* The `this={...}` property of a `<svelte:component>` must be a Svelte component, if defined | ||
* @returns {never} | ||
*/ | ||
export function svelte_component_invalid_this_value() { | ||
if (DEV) { | ||
const error = new Error(`svelte_component_invalid_this_value\nThe \`this={...}\` property of a \`<svelte:component>\` must be a Svelte component, if defined`); | ||
error.name = 'Svelte error'; | ||
throw error; | ||
} else { | ||
// TODO print a link to the documentation | ||
throw new Error("svelte_component_invalid_this_value"); | ||
} | ||
} |
@@ -36,2 +36,3 @@ /** @import { ProxyMetadata, ProxyStateObject, Source } from '#client' */ | ||
/** @type {Map<any, Source<any>>} */ | ||
var sources = new Map(); | ||
@@ -41,2 +42,8 @@ var is_proxied_array = is_array(value); | ||
if (is_proxied_array) { | ||
// We need to create the length source eagerly to ensure that | ||
// mutations to the array are properly synced with our proxy | ||
sources.set('length', source(/** @type {any[]} */ (value).length)); | ||
} | ||
/** @type {ProxyMetadata} */ | ||
@@ -192,2 +199,18 @@ var metadata; | ||
// variable.length = value -> clear all signals with index >= value | ||
if (is_proxied_array && prop === 'length') { | ||
for (var i = value; i < /** @type {Source<number>} */ (s).v; i += 1) { | ||
var other_s = sources.get(i + ''); | ||
if (other_s !== undefined) { | ||
set(other_s, UNINITIALIZED); | ||
} else if (i in target) { | ||
// If the item exists in the original, we need to create a uninitialized source, | ||
// else a later read of the property would result in a source being created with | ||
// the value of the original item at that index. | ||
other_s = source(UNINITIALIZED); | ||
sources.set(i + '', other_s); | ||
} | ||
} | ||
} | ||
// If we haven't yet created a source for this property, we need to ensure | ||
@@ -217,10 +240,2 @@ // we do so otherwise if we read it later, then the write won't be tracked and | ||
// variable.length = value -> clear all signals with index >= value | ||
if (is_proxied_array && prop === 'length') { | ||
for (var i = value; i < target.length; i += 1) { | ||
var other_s = sources.get(i + ''); | ||
if (other_s !== undefined) set(other_s, UNINITIALIZED); | ||
} | ||
} | ||
var descriptor = Reflect.getOwnPropertyDescriptor(target, prop); | ||
@@ -239,10 +254,7 @@ | ||
if (is_proxied_array && typeof prop === 'string') { | ||
var ls = sources.get('length'); | ||
var ls = /** @type {Source<number>} */ (sources.get('length')); | ||
var n = Number(prop); | ||
if (ls !== undefined) { | ||
var n = Number(prop); | ||
if (Number.isInteger(n) && n >= ls.v) { | ||
set(ls, n + 1); | ||
} | ||
if (Number.isInteger(n) && n >= ls.v) { | ||
set(ls, n + 1); | ||
} | ||
@@ -249,0 +261,0 @@ } |
@@ -9,3 +9,3 @@ // generated during release, do not modify | ||
*/ | ||
export const VERSION = '5.0.0-next.238'; | ||
export const VERSION = '5.0.0-next.239'; | ||
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2209822
15
48942
Updated@ampproject/remapping@^2.3.0
Updatedacorn@^8.12.1
Updatedaxobject-query@^4.1.0
Updatedmagic-string@^0.30.11