-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: don't print errors on migration errors
- Loading branch information
1 parent
fd78385
commit 151aef8
Showing
12 changed files
with
86 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'svelte': patch | ||
--- | ||
|
||
feat: don't print errors on migration errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/svelte/tests/migrate/samples/impossible-migrate-with-errors/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { test } from '../../test'; | ||
|
||
export default test({ | ||
logs: [ | ||
'One or more `@migration-task` comments were added to `output.svelte`, please check them and complete the migration manually.' | ||
], | ||
errors: [ | ||
'Error while migrating Svelte code', | ||
{ | ||
code: 'unexpected_eof', | ||
end: { | ||
character: 30, | ||
column: 21, | ||
line: 3 | ||
}, | ||
filename: 'output.svelte', | ||
frame: `1: <script | ||
2: | ||
3: unterminated template | ||
^`, | ||
message: 'Unexpected end of input', | ||
name: 'CompileError', | ||
position: [30, 30], | ||
start: { | ||
character: 30, | ||
column: 21, | ||
line: 3 | ||
} | ||
} | ||
] | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/svelte/tests/migrate/samples/impossible-migrate-with-errors/input.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<script | ||
|
||
unterminated template |
4 changes: 4 additions & 0 deletions
4
packages/svelte/tests/migrate/samples/impossible-migrate-with-errors/output.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!-- @migration-task Error while migrating Svelte code: Unexpected end of input --> | ||
<script | ||
|
||
unterminated template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters