Skip to content

Commit

Permalink
replace assert with with
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed May 4, 2024
1 parent 3edf722 commit 1c8810a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/clean_font.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { rmSync } from 'fs'
import { rf } from './util.js'
import fonts from '../fonts.json' assert { type: 'json' }
import fonts from '../fonts.json' with { type: 'json' }

if (process.env.LIBRESERVICE_CDN) {
for (const { files } of fonts) {
Expand Down
2 changes: 1 addition & 1 deletion scripts/clean_ime.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rmSync, readdirSync } from 'fs'
import { exit } from 'process'
import { rf } from './util.js'
import targetFiles from '../target-files.json' assert { type: 'json' }
import targetFiles from '../target-files.json' with { type: 'json' }

const imeDir = 'public/ime'

Expand Down
2 changes: 1 addition & 1 deletion scripts/download_font.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { writeFileSync } from 'fs'
import fonts from '../fonts.json' assert { type: 'json' }
import fonts from '../fonts.json' with { type: 'json' }
import { exit } from 'process'

fonts.forEach(async ({ files, version }) => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/install_schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
GitHubDownloader
} from '@libreservice/micro-plum'
import { rf, utf8, ensure, md5sum } from './util.js'
import packageJson from '../package.json' assert { type: 'json' }
import schemas from '../schemas.json' assert { type: 'json' }
import packageJson from '../package.json' with { type: 'json' }
import schemas from '../schemas.json' with { type: 'json' }

const root = cwd()
const { version } = packageJson
Expand Down
2 changes: 1 addition & 1 deletion test/test-font.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
init,
callOnDownload
} from './util'
import fonts from '../fonts.json' assert { type: 'json' }
import fonts from '../fonts.json' with { type: 'json' }

async function expectFirstFont (page: Page, fontFamily: string) {
while (!await page.evaluate(() => document.fonts.keys().next().value));
Expand Down

0 comments on commit 1c8810a

Please sign in to comment.