Skip to content

Commit

Permalink
fix: ts-ignore comment prettier issue causing build error (#4611)
Browse files Browse the repository at this point in the history
* fix ts-ignore comment prettier issue

* update publish script to upgrade svelte devDeps
  • Loading branch information
KevinVandy authored Dec 18, 2022
1 parent c4dace9 commit eb80046
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/svelte/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/column-groups/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/column-ordering/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@faker-js/faker": "^7.6.0",
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/column-pinning/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@faker-js/faker": "^7.6.0",
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/column-visibility/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/svelte/sorting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@faker-js/faker": "^7.6.0",
"@rollup/plugin-replace": "^5.0.1",
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.42",
"@tanstack/svelte-table": "8.7.0",
"@tanstack/svelte-table": "8.7.3",
"@tsconfig/svelte": "^3.0.0",
"svelte": "^3.44.0",
"svelte-check": "^2.2.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/table-core/src/features/ColumnSizing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ export const ColumnSizing: TableFeature = {
? Math.round(e.touches[0]!.clientX)
: (e as MouseEvent).clientX

const newColumnSizing: ColumnSizingState = {}

const updateOffset = (
eventType: 'move' | 'end',
clientXPos?: number
Expand All @@ -226,8 +228,6 @@ export const ColumnSizing: TableFeature = {
return
}

let newColumnSizing: ColumnSizingState = {}

table.setColumnSizingInfo(old => {
const deltaOffset = clientXPos - (old?.startOffset ?? 0)
const deltaPercentage = Math.max(
Expand Down
8 changes: 4 additions & 4 deletions packages/table-core/src/features/Filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ export const Filters: TableFeature = {
? column.columnDef.filterFn
: column.columnDef.filterFn === 'auto'
? column.getAutoFilterFn()
: // @ts-ignore
table.options.filterFns?.[column.columnDef.filterFn as string] ??
// @ts-ignore
: table.options.filterFns?.[column.columnDef.filterFn as string] ??
filterFns[column.columnDef.filterFn as BuiltInFilterFn]
},
getCanFilter: () => {
Expand Down Expand Up @@ -368,8 +368,8 @@ export const Filters: TableFeature = {
? globalFilterFn
: globalFilterFn === 'auto'
? table.getGlobalAutoFilterFn()
: // @ts-ignore
table.options.filterFns?.[globalFilterFn as string] ??
// @ts-ignore
: table.options.filterFns?.[globalFilterFn as string] ??
filterFns[globalFilterFn as BuiltInFilterFn]
},

Expand Down
12 changes: 11 additions & 1 deletion scripts/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ async function run() {
'package.json'
)
)

//upgrade dependencies in react, solid, and vue
if (
config.dependencies?.[pkg.name] &&
config.dependencies[pkg.name] !== depVersion
Expand All @@ -510,6 +510,16 @@ async function run() {
)
config.dependencies[pkg.name] = depVersion
}
//upgrade devDependencies in svelte (svelte uses devDependencies instead of dependencies)
if (
config.devDependencies?.[pkg.name] &&
config.devDependencies[pkg.name] !== depVersion
) {
console.info(
` Updating ${exampleName}'s devDependencies on ${pkg.name} to version ${depVersion}.`
)
config.devDependencies[pkg.name] = depVersion
}
})
)
}
Expand Down

0 comments on commit eb80046

Please sign in to comment.