Skip to content

Commit

Permalink
chore: run svelte-check when building and releasing the library
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Dec 15, 2023
1 parent bcbdf38 commit 309315e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"build:vanilla:copy:readme": "cpy --rename README.md README-VANILLA.md package-vanilla",
"build:vanilla:copy:themes": "cpy --flat src/lib/themes package-vanilla/themes",
"build:vanilla:package-json": "node tools/createVanillaPackageJson.js",
"build-and-test": "npm run test-ci && npm run lint && npm run build",
"build-and-test": "npm run test-ci && npm run check && npm run lint && npm run build",
"test": "vitest",
"test-ci": "vitest run",
"coverage": "vitest run --coverage",
Expand All @@ -62,6 +62,7 @@
"release": "npm-run-all release:**",
"release:lint": "npm run lint",
"release:test": "npm run test-ci",
"release:check": "npm run check",
"release:version": "standard-version",
"release:build": "npm run build",
"release:push": "git push && git push --tag",
Expand Down
25 changes: 21 additions & 4 deletions src/lib/components/modes/tablemode/TableMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@
import { Mode, SortDirection, ValidationSeverity } from '$lib/types.js'
import TableMenu from './menu/TableMenu.svelte'
import type { JSONPatchDocument, JSONPath } from 'immutable-json-patch'
import { compileJSONPointer, existsIn, getIn, immutableJSONPatch, isJSONArray } from 'immutable-json-patch'
import {
compileJSONPointer,
existsIn,
getIn,
immutableJSONPatch,
isJSONArray
} from 'immutable-json-patch'
import {
isTextContent,
normalizeJsonParseError,
Expand Down Expand Up @@ -107,7 +113,12 @@
import memoizeOne from 'memoize-one'
import { validateJSON } from '$lib/logic/validation.js'
import ValidationErrorsOverview from '../../controls/ValidationErrorsOverview.svelte'
import { CONTEXT_MENU_HEIGHT, CONTEXT_MENU_WIDTH, SCROLL_DURATION, SIMPLE_MODAL_OPTIONS } from '$lib/constants.js'
import {
CONTEXT_MENU_HEIGHT,
CONTEXT_MENU_WIDTH,
SCROLL_DURATION,
SIMPLE_MODAL_OPTIONS
} from '$lib/constants.js'
import { noop } from '$lib/utils/noop.js'
import { createJump } from '$lib/assets/jump.js/src/jump.js'
import ValidationErrorIcon from '../treemode/ValidationErrorIcon.svelte'
Expand Down Expand Up @@ -1761,7 +1772,10 @@
<tr class="jse-table-row jse-table-row-header">
<th class="jse-table-cell jse-table-cell-header">
{#if !isEmpty(groupedValidationErrors?.root)}
{@const validationError = mergeValidationErrors([], groupedValidationErrors?.root)}
{@const validationError = mergeValidationErrors(
[],
groupedValidationErrors?.root
)}
{#if validationError}
<div class="jse-table-root-error">
<ValidationErrorIcon {validationError} onExpand={noop} />
Expand Down Expand Up @@ -1795,7 +1809,10 @@
{#each visibleSection.visibleItems as item, visibleIndex}
{@const rowIndex = visibleSection.startIndex + visibleIndex}
{@const validationErrorsByRow = groupedValidationErrors.rows[rowIndex]}
{@const validationError = mergeValidationErrors([String(rowIndex)], validationErrorsByRow?.row)}
{@const validationError = mergeValidationErrors(
[String(rowIndex)],
validationErrorsByRow?.row
)}
<tr class="jse-table-row">
{#key rowIndex}
<th
Expand Down
9 changes: 8 additions & 1 deletion src/lib/components/modes/treemode/TreeMode.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,14 @@
import { Mode, ValidationSeverity } from '$lib/types.js'
import memoizeOne from 'memoize-one'
import { measure } from '$lib/utils/timeUtils.js'
import { onCopy, onCut, onInsert, onInsertCharacter, onPaste, onRemove } from '$lib/logic/actions.js'
import {
onCopy,
onCut,
onInsert,
onInsertCharacter,
onPaste,
onRemove
} from '$lib/logic/actions.js'
import JSONPreview from '../../controls/JSONPreview.svelte'
import type { Context } from 'svelte-simple-modal'
Expand Down

0 comments on commit 309315e

Please sign in to comment.