mirror of https://github.com/sveltejs/svelte
parent
c67d585b38
commit
510ad4da3b
@ -1,2 +1,2 @@
|
||||
export default (items: string[], conjunction = 'or') =>
|
||||
items.length === 1 ? items[0] : items.slice(0, -1).join(', ') + `${conjunction} ${items[items.length - 1]}`;
|
||||
items.length === 1 ? items[0] : items.slice(0, -1).join(', ') + ` ${conjunction} ${items[items.length - 1]}`;
|
||||
|
@ -0,0 +1,15 @@
|
||||
import { whitespace } from './patterns';
|
||||
// cannot replace with str.trimStart() / str.trimEnd() as the tests would fail
|
||||
export function trim_start(str: string) {
|
||||
let i = 0;
|
||||
while (whitespace.test(str[i])) i += 1;
|
||||
|
||||
return str.slice(i);
|
||||
}
|
||||
|
||||
export function trim_end(str: string) {
|
||||
let i = str.length;
|
||||
while (whitespace.test(str[i - 1])) i -= 1;
|
||||
|
||||
return str.slice(0, i);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
dev: true,
|
||||
},
|
||||
error: `{#each} only iterates over array-like objects. You can use a spread to convert this iterable into an array.`
|
||||
error: `{#each} only iterates over Array-like Objects. Consider using a [...spread] to convert this iterable into an Array instead.`,
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
dev: true,
|
||||
},
|
||||
error: `{#each} only iterates over array-like objects.`
|
||||
error: `{#each} only iterates over Array-like Objects.`,
|
||||
};
|
||||
|
@ -1,5 +1,7 @@
|
||||
<script>
|
||||
while(true) {
|
||||
// do nothing
|
||||
}
|
||||
let t = Date.now();
|
||||
while (true) {
|
||||
// do nothing
|
||||
if (Date.now() > t + 15) throw new Error('Failed loop protect test');
|
||||
}
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
export default {
|
||||
html: `
|
||||
<div class="foo svelte-xg5rbo">red</div>
|
||||
<div class="qux svelte-xg5rbo">red</div>
|
||||
<div class="bar svelte-xg5rbo">red and bold</div>
|
||||
`
|
||||
<div class="foo svelte-1553ulx">red</div>
|
||||
<div class="qux svelte-1553ulx">red</div>
|
||||
<div class="bar svelte-1553ulx">red and bold</div>
|
||||
`,
|
||||
};
|
||||
|
@ -1,11 +1,11 @@
|
||||
export default {
|
||||
compileOptions: {
|
||||
dev: true
|
||||
dev: true,
|
||||
},
|
||||
|
||||
props: {
|
||||
count: 0
|
||||
count: 0,
|
||||
},
|
||||
|
||||
error: `'count' is not a store with a 'subscribe' method`
|
||||
error: `Could not subscribe to $count. A valid store is an object with a .subscribe method, consider setting count to null if this is expected.`,
|
||||
};
|
@ -1,13 +1,13 @@
|
||||
export default {
|
||||
props: {
|
||||
x: 'bar'
|
||||
x: 'bar',
|
||||
},
|
||||
|
||||
html: `
|
||||
<svg>
|
||||
<circle class="svelte-i03x00" cx=50 cy=50 r=50 />
|
||||
<circle class="foo svelte-i03x00" cx=150 cy=50 r=50 />
|
||||
<circle class="bar svelte-i03x00" cx=250 cy=50 r=50 />
|
||||
<circle class="svelte-1h4oike" cx=50 cy=50 r=50 />
|
||||
<circle class="foo svelte-1h4oike" cx=150 cy=50 r=50 />
|
||||
<circle class="bar svelte-1h4oike" cx=250 cy=50 r=50 />
|
||||
</svg>
|
||||
`
|
||||
`,
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
<title>Some Title</title>
|
||||
<link rel="canonical" href="/" data-svelte="svelte-1s8aodm">
|
||||
<meta name="description" content="some description" data-svelte="svelte-1s8aodm">
|
||||
<meta name="keywords" content="some keywords" data-svelte="svelte-1s8aodm">
|
||||
<link rel="canonical" href="/" data-svelte="svelte-1t0pfk9" />
|
||||
<meta name="description" content="some description" data-svelte="svelte-1t0pfk9" />
|
||||
<meta name="keywords" content="some keywords" data-svelte="svelte-1t0pfk9" />
|
||||
|
@ -1,2 +1,2 @@
|
||||
div.svelte-bzh57p{color:red}
|
||||
div.svelte-4yw8vx{color:green}
|
||||
div.svelte-awisl7{color:red}
|
||||
div.svelte-1us38kz{color:green}
|
@ -1,8 +1,8 @@
|
||||
<div class="svelte-bzh57p">red</div>
|
||||
<div class="svelte-4yw8vx">green: foo</div>
|
||||
<div class="svelte-awisl7">red</div>
|
||||
<div class="svelte-1us38kz">green: foo</div>
|
||||
|
||||
|
||||
|
||||
<div class="svelte-4yw8vx">green: bar</div>
|
||||
<div class="svelte-1us38kz">green: bar</div>
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
div.svelte-bzh57p{color:red}
|
||||
div.svelte-awisl7{color:red}
|
@ -1 +1 @@
|
||||
<div class="svelte-bzh57p">red</div>
|
||||
<div class="svelte-awisl7">red</div>
|
||||
|
@ -1,15 +1,17 @@
|
||||
[{
|
||||
"message": "The 'passive' and 'preventDefault' modifiers cannot be used together",
|
||||
"code": "invalid-event-modifier",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5,
|
||||
"character": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 50,
|
||||
"character": 50
|
||||
},
|
||||
"pos": 5
|
||||
}]
|
||||
[
|
||||
{
|
||||
"message": "The 'passive' and 'preventDefault' modifiers cannot be used together",
|
||||
"code": "invalid-event-modifier",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 5,
|
||||
"character": 5
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 50,
|
||||
"character": 50
|
||||
},
|
||||
"pos": 5
|
||||
}
|
||||
]
|
||||
|
@ -1,3 +0,0 @@
|
||||
export default {
|
||||
legacy: true
|
||||
};
|
@ -1,15 +0,0 @@
|
||||
[{
|
||||
"message": "The 'once' modifier cannot be used in legacy mode",
|
||||
"code": "invalid-event-modifier",
|
||||
"start": {
|
||||
"line": 1,
|
||||
"column": 8,
|
||||
"character": 8
|
||||
},
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 37,
|
||||
"character": 37
|
||||
},
|
||||
"pos": 8
|
||||
}]
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue