Skip to content

Commit

Permalink
chore: update sveltekit and vite
Browse files Browse the repository at this point in the history
This fixes the underlying issue that required a `skipLibCheck` in the first place.
  • Loading branch information
jamesdabbs committed Jun 3, 2024
1 parent 0eed4ae commit 594be10
Show file tree
Hide file tree
Showing 9 changed files with 490 additions and 458 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
},
"devDependencies": {
"@types/node": "^20.14.0",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/coverage-v8": "^1.3.0",
"nodemon": "^2.0.22",
"npm-check-updates": "^16.14.12",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"vite": "^4.5.3",
"vitest": "^0.34.6"
"vite": "^5.0.0",
"vitest": "^1.3.0"
}
}
6 changes: 2 additions & 4 deletions packages/compile/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
"declaration": true,
"declarationDir": "dist/types",
"module": "es2022",
"moduleResolution": "node",
"moduleResolution": "bundler",
"noImplicitAny": true,
"outDir": "dist/esm",
"preserveConstEnums": true,
"removeComments": true,
"sourceMap": true,
"strict": true,
"target": "es2022",
// TODO: workaround for https://github.com/vitejs/vite/issues/15714
"skipLibCheck": true
"target": "es2022"
},
"include": [
"src/**/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/Parser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ it.todo('handles a missing id', () => {
})

it('handles an initial tag', () => {
expect(parse('{')).resolves.toEqual('{')
expect(parse('{')).rejects.toThrow()
})

it('handles an incomplete internal link', () => {
Expand Down
22 changes: 11 additions & 11 deletions packages/core/test/__snapshots__/Parser.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`parses a complex example 1`] = `
"<p>Inline math <span class=\\"math math-inline\\"><span class=\\"katex\\"><span class=\\"katex-mathml\\"><math xmlns=\\"http://www.w3.org/1998/Math/MathML\\"><semantics><mrow><mn>2</mn><mo>+</mo><mn>2</mn><mo>=</mo><mn>4</mn></mrow><annotation encoding=\\"application/x-tex\\">2 + 2 = 4</annotation></semantics></math></span><span class=\\"katex-html\\" aria-hidden=\\"true\\"><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.7278em;vertical-align:-0.0833em;\\"></span><span class=\\"mord\\">2</span><span class=\\"mspace\\" style=\\"margin-right:0.2222em;\\"></span><span class=\\"mbin\\">+</span><span class=\\"mspace\\" style=\\"margin-right:0.2222em;\\"></span></span><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.6444em;\\"></span><span class=\\"mord\\">2</span><span class=\\"mspace\\" style=\\"margin-right:0.2778em;\\"></span><span class=\\"mrel\\">=</span><span class=\\"mspace\\" style=\\"margin-right:0.2778em;\\"></span></span><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.6444em;\\"></span><span class=\\"mord\\">4</span></span></span></span></span> and display math <span class=\\"math math-inline\\"><span class=\\"katex\\"><span class=\\"katex-mathml\\"><math xmlns=\\"http://www.w3.org/1998/Math/MathML\\"><semantics><mrow><mn>2</mn><mo>+</mo><mn>2</mn><mo>=</mo><mn>4</mn></mrow><annotation encoding=\\"application/x-tex\\">2 + 2 = 4</annotation></semantics></math></span><span class=\\"katex-html\\" aria-hidden=\\"true\\"><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.7278em;vertical-align:-0.0833em;\\"></span><span class=\\"mord\\">2</span><span class=\\"mspace\\" style=\\"margin-right:0.2222em;\\"></span><span class=\\"mbin\\">+</span><span class=\\"mspace\\" style=\\"margin-right:0.2222em;\\"></span></span><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.6444em;\\"></span><span class=\\"mord\\">2</span><span class=\\"mspace\\" style=\\"margin-right:0.2778em;\\"></span><span class=\\"mrel\\">=</span><span class=\\"mspace\\" style=\\"margin-right:0.2778em;\\"></span></span><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:0.6444em;\\"></span><span class=\\"mord\\">4</span></span></span></span></span>.</p>
"<p>Inline math <span class="math math-inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>2</mn><mo>+</mo><mn>2</mn><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2 + 2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7278em;vertical-align:-0.0833em;"></span><span class="mord">2</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></span> and display math <span class="math math-inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mn>2</mn><mo>+</mo><mn>2</mn><mo>=</mo><mn>4</mn></mrow><annotation encoding="application/x-tex">2 + 2 = 4</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7278em;vertical-align:-0.0833em;"></span><span class="mord">2</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">2</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">4</span></span></span></span></span>.</p>
<p>This is a list of links</p>
<ul>
<li><a href=\\"S://000123\\" title=\\"000123\\" class=\\"internal-link\\">000123</a></li>
<li><a href=\\"P://000123\\" title=\\"000123\\" class=\\"internal-link\\">000123</a></li>
<li><a href=\\"T://000123\\" title=\\"000123\\" class=\\"internal-link\\">000123</a></li>
<li><a href=\\"doi://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href=\\"mr://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href=\\"wikipedia://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href=\\"mathse://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href=\\"mo://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href=\\"zb://123\\" title=\\"123\\" class=\\"external-link\\">123</a></li>
<li><a href="S://000123" title="000123" class="internal-link">000123</a></li>
<li><a href="P://000123" title="000123" class="internal-link">000123</a></li>
<li><a href="T://000123" title="000123" class="internal-link">000123</a></li>
<li><a href="doi://123" title="123" class="external-link">123</a></li>
<li><a href="mr://123" title="123" class="external-link">123</a></li>
<li><a href="wikipedia://123" title="123" class="external-link">123</a></li>
<li><a href="mathse://123" title="123" class="external-link">123</a></li>
<li><a href="mo://123" title="123" class="external-link">123</a></li>
<li><a href="zb://123" title="123" class="external-link">123</a></li>
</ul>"
`;

exports[`truncate > preserves math 1`] = `"this is a fairly long sentence and it needs to be summarized because it is too long because it <span class=\\"math math-inline\\"><span class=\\"katex\\"><span class=\\"katex-mathml\\"><math xmlns=\\"http://www.w3.org/1998/Math/MathML\\"><semantics><mrow><msub><mi>T</mi><mrow><mn>3</mn><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msub></mrow><annotation encoding=\\"application/x-tex\\">T_{3\\\\frac{1}{2}}</annotation></semantics></math></span><span class=\\"katex-html\\" aria-hidden=\\"true\\"><span class=\\"base\\"><span class=\\"strut\\" style=\\"height:1.1704em;vertical-align:-0.487em;\\"></span><span class=\\"mord\\"><span class=\\"mord mathnormal\\" style=\\"margin-right:0.13889em;\\">T</span><span class=\\"msupsub\\"><span class=\\"vlist-t vlist-t2\\"><span class=\\"vlist-r\\"><span class=\\"vlist\\" style=\\"height:0.3448em;\\"><span style=\\"top:-2.7538em;margin-left:-0.1389em;margin-right:0.05em;\\"><span class=\\"pstrut\\" style=\\"height:3em;\\"></span><span class=\\"sizing reset-size6 size3 mtight\\"><span class=\\"mord mtight\\"><span class=\\"mord mtight\\">3</span><span class=\\"mord mtight\\"><span class=\\"mopen nulldelimiter sizing reset-size3 size6\\"></span><span class=\\"mfrac\\"><span class=\\"vlist-t vlist-t2\\"><span class=\\"vlist-r\\"><span class=\\"vlist\\" style=\\"height:0.8443em;\\"><span style=\\"top:-2.656em;\\"><span class=\\"pstrut\\" style=\\"height:3em;\\"></span><span class=\\"sizing reset-size3 size1 mtight\\"><span class=\\"mord mtight\\"><span class=\\"mord mtight\\">2</span></span></span></span><span style=\\"top:-3.2255em;\\"><span class=\\"pstrut\\" style=\\"height:3em;\\"></span><span class=\\"frac-line mtight\\" style=\\"border-bottom-width:0.049em;\\"></span></span><span style=\\"top:-3.384em;\\"><span class=\\"pstrut\\" style=\\"height:3em;\\"></span><span class=\\"sizing reset-size3 size1 mtight\\"><span class=\\"mord mtight\\"><span class=\\"mord mtight\\">1</span></span></span></span></span><span class=\\"vlist-s\\">​…</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>"`;
exports[`truncate > preserves math 1`] = `"this is a fairly long sentence and it needs to be summarized because it is too long because it <span class="math math-inline"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>T</mi><mrow><mn>3</mn><mfrac><mn>1</mn><mn>2</mn></mfrac></mrow></msub></mrow><annotation encoding="application/x-tex">T_{3\\frac{1}{2}}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.1704em;vertical-align:-0.487em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3448em;"><span style="top:-2.7538em;margin-left:-0.1389em;margin-right:0.05em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">3</span><span class="mord mtight"><span class="mopen nulldelimiter sizing reset-size3 size6"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8443em;"><span style="top:-2.656em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span><span style="top:-3.2255em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line mtight" style="border-bottom-width:0.049em;"></span></span><span style="top:-3.384em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">​…</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span>"`;
6 changes: 3 additions & 3 deletions packages/viewer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"unist-util-visit": "^4.1.2"
},
"devDependencies": {
"@sveltejs/adapter-cloudflare": "^2.3.4",
"@sveltejs/kit": "1.30.0",
"@sveltejs/vite-plugin-svelte": "^2.5.3",
"@sveltejs/adapter-cloudflare": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tsconfig/svelte": "^3.0.0",
"@types/debug": "^4.1.12",
"@types/hyperscript": "0.0.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ export const load: PageLoad = async function ({
}),
checked(spaceId),
).catch(() => {
throw error(404, `Trait not found ${spaceId} / ${propertyId}`)
error(404, `Trait not found ${spaceId} / ${propertyId}`)
})
}
2 changes: 1 addition & 1 deletion packages/viewer/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-cloudflare'
import { vitePreprocess } from '@sveltejs/kit/vite'
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand Down
1 change: 1 addition & 0 deletions packages/viewer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@
"node_modules/@types"
],
"module": "es2022",
"moduleResolution": "bundler"
}
}
Loading

0 comments on commit 594be10

Please sign in to comment.