From c0f6a60a66999e711b796fadfb631d0cb1e05ec5 Mon Sep 17 00:00:00 2001 From: Brooooooklyn Date: Wed, 13 Nov 2024 08:52:05 +0000 Subject: [PATCH] fix: migrate to standard import attributes (#8803) --- packages/backend/server/src/fundamentals/config/default.ts | 2 +- scripts/check-version.mjs | 2 +- tools/bump-blocksuite/index.js | 2 +- tools/cli/src/webpack/runtime-config.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/server/src/fundamentals/config/default.ts b/packages/backend/server/src/fundamentals/config/default.ts index 78f24a643bd7c..3559c9658977f 100644 --- a/packages/backend/server/src/fundamentals/config/default.ts +++ b/packages/backend/server/src/fundamentals/config/default.ts @@ -1,7 +1,7 @@ import { resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; -import pkg from '../../../package.json' assert { type: 'json' }; +import pkg from '../../../package.json' with { type: 'json' }; import { AFFINE_ENV, AFFiNEConfig, diff --git a/scripts/check-version.mjs b/scripts/check-version.mjs index a0cf70685cbd5..364ebc32c3dc4 100644 --- a/scripts/check-version.mjs +++ b/scripts/check-version.mjs @@ -2,7 +2,7 @@ const semver = await import('semver').catch( () => import('../packages/backend/server/node_modules/semver/index.js') ); -import packageJson from '../package.json' assert { type: 'json' }; +import packageJson from '../package.json' with { type: 'json' }; const { engines } = packageJson; diff --git a/tools/bump-blocksuite/index.js b/tools/bump-blocksuite/index.js index 88bd889cbdd11..c30bfd1009347 100644 --- a/tools/bump-blocksuite/index.js +++ b/tools/bump-blocksuite/index.js @@ -13,7 +13,7 @@ import { import chalk from 'chalk'; import { ProxyAgent, setGlobalDispatcher } from 'undici'; -import corePackage from '../../packages/frontend/core/package.json' assert { type: 'json' }; +import corePackage from '../../packages/frontend/core/package.json' with { type: 'json' }; const clipboard = new Clipboard(); diff --git a/tools/cli/src/webpack/runtime-config.ts b/tools/cli/src/webpack/runtime-config.ts index b9d8f12420e6d..f62d6d9cd1a59 100644 --- a/tools/cli/src/webpack/runtime-config.ts +++ b/tools/cli/src/webpack/runtime-config.ts @@ -1,6 +1,6 @@ import type { BUILD_CONFIG_TYPE } from '@affine/env/global'; -import packageJson from '../../package.json' assert { type: 'json' }; +import packageJson from '../../package.json' with { type: 'json' }; import type { BuildFlags } from '../config'; export function getBuildConfig(buildFlags: BuildFlags): BUILD_CONFIG_TYPE {