svelte 3.59.0 → 3.59.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Svelte changelog
2
2
 
3
+ ## 3.59.2
4
+
5
+ * Fix escaping `<textarea bind:value={...}>` values in SSR
6
+
7
+ ## 3.59.1
8
+
9
+ * Handle dynamic values in `a11y-autocomplete-valid` ([#8567](https://github.com/sveltejs/svelte/pull/8567))
10
+
3
11
  ## 3.59.0
4
12
 
5
13
  * Add `ResizeObserver` bindings `contentRect`/`contentBoxSize`/`borderBoxSize`/`devicePixelContentBoxSize` ([#8022](https://github.com/sveltejs/svelte/pull/8022))
@@ -12,6 +20,7 @@
12
20
  * Fix type of `VERSION` compiler export ([#8498](https://github.com/sveltejs/svelte/issues/8498))
13
21
  * Relax `a11y-no-redundant-roles` warning ([#8536](https://github.com/sveltejs/svelte/pull/8536))
14
22
  * Handle nested array rest destructuring ([#8552](https://github.com/sveltejs/svelte/issues/8552), [#8554](https://github.com/sveltejs/svelte/issues/8554))
23
+
15
24
  ## 3.58.0
16
25
 
17
26
  * Add `bind:innerText` for `contenteditable` elements ([#3311](https://github.com/sveltejs/svelte/issues/3311))
package/compiler.js CHANGED
@@ -14089,7 +14089,7 @@
14089
14089
  }),
14090
14090
  a11y_autocomplete_valid: (type, value) => ({
14091
14091
  code: 'a11y-autocomplete-valid',
14092
- message: `A11y: The value '${value}' is not supported by the attribute 'autocomplete' on element <input type="${type}">`
14092
+ message: `A11y: The value '${value}' is not supported by the attribute 'autocomplete' on element <input type="${type || '...'}">`
14093
14093
  }),
14094
14094
  a11y_img_redundant_alt: {
14095
14095
  code: 'a11y-img-redundant-alt',
@@ -30172,10 +30172,13 @@
30172
30172
  'email',
30173
30173
  'impp'
30174
30174
  ]);
30175
- function is_valid_autocomplete(type, autocomplete) {
30176
- if (typeof autocomplete !== 'string' || typeof type !== 'string') {
30175
+ function is_valid_autocomplete(autocomplete) {
30176
+ if (autocomplete === true) {
30177
30177
  return false;
30178
30178
  }
30179
+ else if (!autocomplete) {
30180
+ return true; // dynamic value
30181
+ }
30179
30182
  const tokens = autocomplete.trim().toLowerCase().split(regex_whitespaces);
30180
30183
  if (typeof tokens[0] === 'string' && tokens[0].startsWith('section-')) {
30181
30184
  tokens.shift();
@@ -30903,7 +30906,7 @@
30903
30906
  if (type && autocomplete) {
30904
30907
  const type_value = type.get_static_value();
30905
30908
  const autocomplete_value = autocomplete.get_static_value();
30906
- if (!is_valid_autocomplete(type_value, autocomplete_value)) {
30909
+ if (!is_valid_autocomplete(autocomplete_value)) {
30907
30910
  component.warn(autocomplete, compiler_warnings.a11y_autocomplete_valid(type_value, autocomplete_value));
30908
30911
  }
30909
30912
  }
@@ -38846,7 +38849,7 @@
38846
38849
  }
38847
38850
  else if (binding.name === 'value' && node.name === 'textarea') {
38848
38851
  const snippet = expression.node;
38849
- node_contents = x `${snippet} || ""`;
38852
+ node_contents = x `@escape(${snippet} || "")`;
38850
38853
  }
38851
38854
  else if (binding.name === 'value' && node.name === 'select') ;
38852
38855
  else {
@@ -42796,7 +42799,7 @@
42796
42799
  if (result) {
42797
42800
  const { compile_options, name } = this;
42798
42801
  const { format = 'esm' } = compile_options;
42799
- const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.59.0'}`;
42802
+ const banner = `${this.file ? `${this.file} ` : ''}generated by Svelte v${'3.59.2'}`;
42800
42803
  const program = { type: 'Program', body: result.js };
42801
42804
  walk(program, {
42802
42805
  enter: (node, parent, key) => {
@@ -44371,7 +44374,7 @@
44371
44374
  return result.to_processed();
44372
44375
  }
44373
44376
 
44374
- const VERSION = '3.59.0';
44377
+ const VERSION = '3.59.2';
44375
44378
  // additional exports added through generate-type-definitions.js
44376
44379
 
44377
44380
  exports.VERSION = VERSION;