From d70e7b8af23c3598aa9db94d09eed1087d123e6e Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Fri, 28 Jun 2024 13:11:27 +0100 Subject: [PATCH] feat(cache.ts): import typia package.json with json type The import statement for typia's package.json has been updated to use the json type. This change ensures that the version of typia is correctly extracted and used within the cache.ts file. --- packages/unplugin-typia/src/core/cache.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/unplugin-typia/src/core/cache.ts b/packages/unplugin-typia/src/core/cache.ts index 57298b7d..4e5b679e 100644 --- a/packages/unplugin-typia/src/core/cache.ts +++ b/packages/unplugin-typia/src/core/cache.ts @@ -3,12 +3,14 @@ import { createHash } from 'node:crypto'; import { tmpdir } from 'node:os'; import process from 'node:process'; import { basename, dirname, join } from 'pathe'; -import { version as typiaVersion } from 'typia/package.json'; +import typiaPackageJson from 'typia/package.json' with {type: 'json'}; import type { CacheKey, CachePath, Data, FilePath, ID, Source } from './types.js'; import { wrap } from './types.js'; import type { ResolvedOptions } from './options.js'; import { isBun } from './utils.js'; +const { version: typiaVersion } = typiaPackageJson; + type ResolvedCacheOptions = ResolvedOptions['cache']; /**