From a64dd25e820bfb387c6f81d5e4a2315c4eec07fa Mon Sep 17 00:00:00 2001 From: sirsegv Date: Fri, 24 May 2024 13:16:07 +0930 Subject: [PATCH] Fix json module imports for node 22 --- packages/frontend/vite.config.ts | 2 +- packages/sw/build.js | 2 +- scripts/build-assets.mjs | 2 +- scripts/tarball.mjs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index 82eb2af46410..6decbc0ef700 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -5,7 +5,7 @@ import { type UserConfig, defineConfig } from 'vite'; import locales from '../../locales/index.js'; import meta from '../../package.json'; -import packageInfo from './package.json' assert { type: 'json' }; +import packageInfo from './package.json' with { type: 'json' }; import pluginUnwindCssModuleClassName from './lib/rollup-plugin-unwind-css-module-class-name.js'; import pluginJson5 from './vite.json5.js'; diff --git a/packages/sw/build.js b/packages/sw/build.js index eb9a944f4765..9522d061e020 100644 --- a/packages/sw/build.js +++ b/packages/sw/build.js @@ -8,7 +8,7 @@ import { fileURLToPath } from 'node:url'; import * as esbuild from 'esbuild'; import locales from '../../locales/index.js'; -import meta from '../../package.json' assert { type: "json" }; +import meta from '../../package.json' with { type: "json" }; const watch = process.argv[2]?.includes('watch'); const __dirname = fileURLToPath(new URL('.', import.meta.url)) diff --git a/scripts/build-assets.mjs b/scripts/build-assets.mjs index b5aa5eb4ab55..2b275e12d687 100644 --- a/scripts/build-assets.mjs +++ b/scripts/build-assets.mjs @@ -13,7 +13,7 @@ import * as terser from 'terser'; import { build as buildLocales } from '../locales/index.js'; import generateDTS from '../locales/generateDTS.js'; -import meta from '../package.json' assert { type: "json" }; +import meta from '../package.json' with { type: "json" }; import buildTarball from './tarball.mjs'; const configDir = fileURLToPath(new URL('../.config', import.meta.url)); diff --git a/scripts/tarball.mjs b/scripts/tarball.mjs index b1862ad289b0..e9d8900aca0c 100644 --- a/scripts/tarball.mjs +++ b/scripts/tarball.mjs @@ -10,7 +10,7 @@ import { fileURLToPath } from 'node:url'; import glob from 'fast-glob'; import walk from 'ignore-walk'; import Pack from 'tar/lib/pack.js'; -import meta from '../package.json' assert { type: "json" }; +import meta from '../package.json' with { type: "json" }; const cwd = fileURLToPath(new URL('..', import.meta.url)); const ignore = [