From 1616cb533ee7099bdf8ea982ea0557b1081e9c6c Mon Sep 17 00:00:00 2001 From: sirsegv <56238661+squidink7@users.noreply.github.com> Date: Thu, 13 Jun 2024 10:48:01 +0930 Subject: [PATCH] Fix json module imports for node 22 (#13875) --- 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 82eb2af464..6decbc0ef7 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 eb9a944f47..9522d061e0 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 b5aa5eb4ab..2b275e12d6 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 b1862ad289..e9d8900aca 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 = [