diff --git a/bun.lockb b/bun.lockb index 989a50d0..759fbf21 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/unplugin-typia/package.json b/packages/unplugin-typia/package.json index 6b739c03..3031b2b3 100644 --- a/packages/unplugin-typia/package.json +++ b/packages/unplugin-typia/package.json @@ -86,7 +86,6 @@ "dependencies": { "@rollup/pluginutils": "^5.1.0", "magic-string": "^0.30.10", - "mlly": "^1.7.1", "pathe": "^1.1.2", "ts-patch": "^3.2.1", "typescript": "~5.5.3", diff --git a/packages/unplugin-typia/src/bun.ts b/packages/unplugin-typia/src/bun.ts index bd8bbf95..2d4e7b0a 100644 --- a/packages/unplugin-typia/src/bun.ts +++ b/packages/unplugin-typia/src/bun.ts @@ -6,7 +6,6 @@ import type { BunPlugin } from 'bun'; import type { UnpluginContextMeta, UnpluginOptions } from 'unplugin'; -import { hasCJSSyntax } from 'mlly'; import { resolveOptions, unplugin } from './api.js'; import { type Options, defaultOptions } from './core/options.js'; import { isBun } from './core/utils.js'; @@ -122,15 +121,6 @@ function bunTypiaPlugin( const source = wrap(await Bun.file(id).text()); - /* TODO: delete after [this issue](https://github.com/oven-sh/bun/issues/11783) is resolved. */ - if (id.includes('node_modules/typia/lib/index.js') && hasCJSSyntax(source)) { - const mjsFile = Bun.file(id.replace(/\.js$/, '.mjs')); - - if (await mjsFile.exists()) { - return { contents: await mjsFile.text() }; - } - } - const code = await taggedTransform( id, source, diff --git a/packages/unplugin-typia/src/core/options.ts b/packages/unplugin-typia/src/core/options.ts index ba539b83..794f5456 100644 --- a/packages/unplugin-typia/src/core/options.ts +++ b/packages/unplugin-typia/src/core/options.ts @@ -64,7 +64,7 @@ export type ResolvedOptions /** Default options */ export const defaultOptions = ({ - include: [/\.[cm]?[jt]sx?$/], + include: [/\.[cm]?tsx?$/], exclude: [/node_modules/], enforce: 'pre', typia: { },