diff --git a/CHANGELOG.md b/CHANGELOG.md index fba777ad9c..e8b4979fde 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1043,7 +1043,7 @@ Also: ## 3.5.1 -* Accommodate webpack idiosyncracies +* Accommodate webpack idiosyncrasies ## 3.5.0 diff --git a/src/compiler/compile/compiler_errors.ts b/src/compiler/compile/compiler_errors.ts index e4d4ffddad..b0c836681c 100644 --- a/src/compiler/compile/compiler_errors.ts +++ b/src/compiler/compile/compiler_errors.ts @@ -44,7 +44,7 @@ export default { code: 'invalid-binding', message: 'Cannot bind to a variable declared with {@const ...}' }, - invalid_binding_writibale: { + invalid_binding_writable: { code: 'invalid-binding', message: 'Cannot bind to a variable which is not writable' }, diff --git a/src/compiler/compile/nodes/Binding.ts b/src/compiler/compile/nodes/Binding.ts index f826df4828..46112a03a3 100644 --- a/src/compiler/compile/nodes/Binding.ts +++ b/src/compiler/compile/nodes/Binding.ts @@ -80,7 +80,7 @@ export default class Binding extends Node { variable[this.expression.node.type === 'MemberExpression' ? 'mutated' : 'reassigned'] = true; if (info.expression.type === 'Identifier' && !variable.writable) { - component.error(this.expression.node as any, compiler_errors.invalid_binding_writibale); + component.error(this.expression.node as any, compiler_errors.invalid_binding_writable); return; } } diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts index 0d3e8a01bd..cb3d8c718f 100644 --- a/src/compiler/compile/nodes/Element.ts +++ b/src/compiler/compile/nodes/Element.ts @@ -1034,14 +1034,14 @@ export default class Element extends Node { } } -const regex_starts_with_vovel = /^[aeiou]/; +const regex_starts_with_vowel = /^[aeiou]/; function should_have_attribute( node, attributes: string[], name = node.name ) { - const article = regex_starts_with_vovel.test(attributes[0]) ? 'an' : 'a'; + const article = regex_starts_with_vowel.test(attributes[0]) ? 'an' : 'a'; const sequence = attributes.length > 1 ? attributes.slice(0, -1).join(', ') + ` or ${attributes[attributes.length - 1]}` : attributes[0]; diff --git a/test/js/samples/capture-inject-state/expected.js b/test/js/samples/capture-inject-state/expected.js index 882b3e9cf6..41f9b966b0 100644 --- a/test/js/samples/capture-inject-state/expected.js +++ b/test/js/samples/capture-inject-state/expected.js @@ -48,7 +48,7 @@ function create_fragment(ctx) { t8 = text(/*$prop*/ ctx[2]); t9 = space(); t10 = text(/*shadowedByModule*/ ctx[4]); - add_location(p, file, 22, 0, 430); + add_location(p, file, 22, 0, 431); }, l: function claim(nodes) { throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option"); @@ -91,7 +91,7 @@ function create_fragment(ctx) { } let moduleLiveBinding; -const moduleContantProps = 4; +const moduleConstantProps = 4; let moduleLet; const moduleConst = 2; let shadowedByModule; @@ -137,7 +137,7 @@ function instance($$self, $$props, $$invalidate) { $$self.$capture_state = () => ({ moduleLiveBinding, - moduleContantProps, + moduleConstantProps, moduleLet, moduleConst, shadowedByModule, @@ -197,4 +197,4 @@ class Component extends SvelteComponentDev { } export default Component; -export { moduleLiveBinding, moduleContantProps }; \ No newline at end of file +export { moduleLiveBinding, moduleConstantProps }; diff --git a/test/js/samples/capture-inject-state/input.svelte b/test/js/samples/capture-inject-state/input.svelte index a1051bc147..a80fecf00f 100644 --- a/test/js/samples/capture-inject-state/input.svelte +++ b/test/js/samples/capture-inject-state/input.svelte @@ -1,6 +1,6 @@