Skip to content

Commit

Permalink
chore: upgrade svelte, fix (mostly invalid) svelte compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Oct 22, 2024
1 parent 86a65e2 commit e3bd1b2
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 17 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"@sveltejs/adapter-auto": "3.2.5",
"@sveltejs/kit": "2.7.2",
"@sveltejs/package": "2.3.5",
"@sveltejs/vite-plugin-svelte": "4.0.0-next.8",
"@sveltejs/vite-plugin-svelte": "4.0.0",
"@testing-library/jest-dom": "6.6.2",
"@testing-library/svelte": "5.2.4",
"@types/cookie": "0.6.0",
Expand Down Expand Up @@ -152,7 +152,7 @@
"rollup-plugin-postcss": "4.0.2",
"rollup-plugin-svelte": "7.2.2",
"standard-version": "9.5.0",
"svelte": "5.0.4",
"svelte": "5.0.5",
"svelte-check": "4.0.5",
"svelte-eslint-parser": "0.43.0",
"svelte-preprocess": "6.0.3",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/JSONEditor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@
default:
// We should never reach this default case
return exhaustiveGuard(name)
exhaustiveGuard(name)
}
}
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/modals/SortModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
$: {
// remember the selected values for the next time we open the SortModal
// just in memory, not persisted
// eslint-disable-next-line svelte/valid-compile
sortModalStates[stateId] = {
selectedProperty,
selectedDirection
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/modals/TransformModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
$: {
// remember the selected values for the next time we open the SortModal
// just in memory, not persisted
// eslint-disable-next-line svelte/valid-compile
transformModalStates[stateId] = {
queryOptions,
query,
Expand Down
3 changes: 3 additions & 0 deletions src/lib/components/modes/JSONEditorRoot.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,23 @@
type: 'button',
text: 'text',
title: `Switch to text mode (current mode: ${mode})`,
// eslint-disable-next-line svelte/valid-compile
className: 'jse-group-button jse-first' + (mode === Mode.text ? ' jse-selected' : ''),
onClick: () => onChangeMode(Mode.text)
},
{
type: 'button',
text: 'tree',
title: `Switch to tree mode (current mode: ${mode})`,
// eslint-disable-next-line svelte/valid-compile
className: 'jse-group-button ' + (mode === Mode.tree ? ' jse-selected' : ''),
onClick: () => onChangeMode(Mode.tree)
},
{
type: 'button',
text: 'table',
title: `Switch to table mode (current mode: ${mode})`,
// eslint-disable-next-line svelte/valid-compile
className: 'jse-group-button jse-last' + (mode === Mode.table ? ' jse-selected' : ''),
onClick: () => onChangeMode(Mode.table)
}
Expand Down
2 changes: 2 additions & 0 deletions src/lib/components/modes/tablemode/ColumnHeader.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
$: sortDirection =
sortedColumn && isEqual(path, sortedColumn?.path) ? sortedColumn.sortDirection : undefined
// eslint-disable-next-line svelte/valid-compile
$: sortDirectionName = sortDirection ? SORT_DIRECTION_NAMES[sortDirection] : undefined
function handleSort() {
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/modes/tablemode/TableMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@
let context: JSONEditorContext
$: context = {
// eslint-disable-next-line svelte/valid-compile
mode: Mode.table,
readOnly,
parser,
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/modes/treemode/TreeMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -1810,6 +1810,7 @@
// it should only change when a config option like readOnly or onClassName is changed
let context: TreeModeContext
$: context = {
// eslint-disable-next-line svelte/valid-compile
mode: Mode.tree,
readOnly,
parser,
Expand Down

0 comments on commit e3bd1b2

Please sign in to comment.