Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Sep 26, 2024
1 parent c449dd1 commit d5ec824
Show file tree
Hide file tree
Showing 6 changed files with 455 additions and 612 deletions.
8 changes: 5 additions & 3 deletions packages/engine-javascript/test/compare.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import type { LanguageRegistration, RegexEngine, ThemeRegistration } from '../..
import type { Instance } from './types'
import { describe, expect, it } from 'vitest'

import { createJavaScriptRegexEngine } from '../../engine-javascript'
import { loadWasm } from '../../engine-oniguruma'
import { OnigScanner, OnigString } from '../../engine-oniguruma/src/oniguruma'
import { createHighlighterCore, createJavaScriptRegexEngine, loadWasm } from '../../shiki/src/core'

await loadWasm(import('@shikijs/core/wasm-inlined'))
import { createHighlighterCore } from '../../shiki/src/core'

function createWasmOnigLibWrapper(): RegexEngine & { instances: Instance[] } {
const instances: Instance[] = []
Expand Down Expand Up @@ -143,6 +143,8 @@ const cases: Cases[] = [
]

describe('cases', async () => {
await loadWasm(import('@shikijs/core/wasm-inlined'))

const resolved = await Promise.all(cases.map(async (c) => {
const theme = await c.theme().then(r => r.default)
const lang = await c.lang().then(r => r.default)
Expand Down
1 change: 1 addition & 0 deletions packages/monaco/playground/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as monaco from 'monaco-editor-core'
import { createHighlighter } from 'shiki'

// Create the highlighter, it can be reused
// eslint-disable-next-line antfu/no-top-level-await
const highlighter = await createHighlighter({
themes: [
'min-dark',
Expand Down
4 changes: 3 additions & 1 deletion packages/shiki/test/cf.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { LanguageRegistration } from '@shikijs/types'
import { createHighlighterCore, loadWasm } from 'shiki/core'
import { loadWasm } from '@shikijs/engine-oniguruma'
import { createHighlighterCore } from 'shiki/core'

import js from 'shiki/langs/javascript.mjs'
import nord from 'shiki/themes/nord.mjs'
Expand All @@ -8,6 +9,7 @@ import nord from 'shiki/themes/nord.mjs'
// eslint-disable-next-line antfu/no-import-dist
import wasm from '../dist/onig.wasm'

// eslint-disable-next-line antfu/no-top-level-await
await loadWasm(wasm)

// cloudflare also supports dynamic import
Expand Down
1 change: 0 additions & 1 deletion packages/vitepress-twoslash/build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default defineBuildConfig({
],
hooks: {
'rollup:done': async () => {
// eslint-disable-next-line no-console
console.log('Building style.css')
const floatingVue = await fs.readFile(new URL('./node_modules/floating-vue/dist/style.css', import.meta.url), 'utf-8')
const twoslash = await fs.readFile(new URL('./../twoslash/style-rich.css', import.meta.url), 'utf-8')
Expand Down
Loading

0 comments on commit d5ec824

Please sign in to comment.