svelte 3.44.3 → 3.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/internal/index.js CHANGED
@@ -1724,7 +1724,7 @@ function create_ssr_component(fn) {
1724
1724
  function add_attribute(name, value, boolean) {
1725
1725
  if (value == null || (boolean && !value))
1726
1726
  return '';
1727
- return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`;
1727
+ return ` ${name}${value === true && boolean_attributes.has(name) ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`;
1728
1728
  }
1729
1729
  function add_classes(classes) {
1730
1730
  return classes ? ` class="${classes}"` : '';
@@ -1916,7 +1916,7 @@ class SvelteComponent {
1916
1916
  }
1917
1917
 
1918
1918
  function dispatch_dev(type, detail) {
1919
- document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.3' }, detail), true));
1919
+ document.dispatchEvent(custom_event(type, Object.assign({ version: '3.45.0' }, detail), true));
1920
1920
  }
1921
1921
  function append_dev(target, node) {
1922
1922
  dispatch_dev('SvelteDOMInsert', { target, node });
@@ -1721,7 +1721,7 @@ function create_ssr_component(fn) {
1721
1721
  function add_attribute(name, value, boolean) {
1722
1722
  if (value == null || (boolean && !value))
1723
1723
  return '';
1724
- return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`;
1724
+ return ` ${name}${value === true && boolean_attributes.has(name) ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `"${value}"`}`}`;
1725
1725
  }
1726
1726
  function add_classes(classes) {
1727
1727
  return classes ? ` class="${classes}"` : '';
@@ -1914,7 +1914,7 @@ class SvelteComponent {
1914
1914
  }
1915
1915
 
1916
1916
  function dispatch_dev(type, detail) {
1917
- document.dispatchEvent(custom_event(type, Object.assign({ version: '3.44.3' }, detail), true));
1917
+ document.dispatchEvent(custom_event(type, Object.assign({ version: '3.45.0' }, detail), true));
1918
1918
  }
1919
1919
  function append_dev(target, node) {
1920
1920
  dispatch_dev('SvelteDOMInsert', { target, node });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelte",
3
- "version": "3.44.3",
3
+ "version": "3.45.0",
4
4
  "description": "Cybernetically enhanced web apps",
5
5
  "module": "index.mjs",
6
6
  "main": "index",
@@ -83,8 +83,8 @@
83
83
  },
84
84
  "types": "types/runtime/index.d.ts",
85
85
  "scripts": {
86
- "test": "mocha",
87
- "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts",
86
+ "test": "mocha --exit",
87
+ "test:unit": "mocha --require sucrase/register --recursive src/**/__test__.ts --exit",
88
88
  "quicktest": "mocha",
89
89
  "precoverage": "c8 mocha",
90
90
  "coverage": "c8 report --reporter=text-lcov > coverage.lcov && c8 report --reporter=html",
@@ -132,7 +132,7 @@
132
132
  "acorn": "^8.4.1",
133
133
  "agadoo": "^1.1.0",
134
134
  "c8": "^5.0.1",
135
- "code-red": "^0.2.3",
135
+ "code-red": "^0.2.4",
136
136
  "codecov": "^3.5.0",
137
137
  "css-tree": "^1.1.2",
138
138
  "eslint": "^7.32.0",
@@ -1,8 +1,17 @@
1
1
  import { Node, Identifier } from 'estree';
2
+ import Component from '../../Component';
3
+ import TemplateScope from './TemplateScope';
2
4
  export interface Context {
3
5
  key: Identifier;
4
6
  name?: string;
5
7
  modifier: (node: Node) => Node;
6
8
  default_modifier: (node: Node, to_ctx: (name: string) => Node) => Node;
7
9
  }
8
- export declare function unpack_destructuring(contexts: Context[], node: Node, modifier?: Context['modifier'], default_modifier?: Context['default_modifier']): void;
10
+ export declare function unpack_destructuring({ contexts, node, modifier, default_modifier, scope, component }: {
11
+ contexts: Context[];
12
+ node: Node;
13
+ modifier?: Context['modifier'];
14
+ default_modifier?: Context['default_modifier'];
15
+ scope: TemplateScope;
16
+ component: Component;
17
+ }): void;
@@ -18,6 +18,7 @@ export default class BindingWrapper {
18
18
  needs_lock: boolean;
19
19
  constructor(block: Block, node: Binding, parent: ElementWrapper | InlineComponentWrapper);
20
20
  get_dependencies(): Set<string>;
21
+ get_update_dependencies(): Set<string>;
21
22
  is_readonly_media_attribute(): boolean;
22
23
  render(block: Block, lock: Identifier): void;
23
24
  }
@@ -1,4 +1,4 @@
1
- export declare const foreign = "https://svelte.dev/docs#svelte_options";
1
+ export declare const foreign = "https://svelte.dev/docs#template-syntax-svelte-options";
2
2
  export declare const html = "http://www.w3.org/1999/xhtml";
3
3
  export declare const mathml = "http://www.w3.org/1998/Math/MathML";
4
4
  export declare const svg = "http://www.w3.org/2000/svg";