Skip to content

Commit 89013ed

Browse files
committed
fix(deps): complie @antfu/install-pkg
- Added a patch for tinyexec@1.0.1 in pnpm-lock.yaml and pnpm-workspace.yaml to address specific issues. - Updated the import of installPackage from @antfu/install-pkg to @mx-space/compiled/install-pkg in tool.util.ts for better module management. - Removed @antfu/install-pkg from core package.json to streamline dependencies. Signed-off-by: Innei <tukon479@gmail.com>
1 parent c527591 commit 89013ed

File tree

8 files changed

+28
-9
lines changed

8 files changed

+28
-9
lines changed

apps/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
},
5050
"dependencies": {
5151
"@algolia/client-search": "^4.22.1",
52-
"@antfu/install-pkg": "1.1.0",
5352
"@babel/core": "7.27.1",
5453
"@babel/plugin-transform-modules-commonjs": "7.27.1",
5554
"@babel/plugin-transform-typescript": "7.27.1",

apps/core/src/utils/tool.util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { createRequire } from 'node:module'
33
import { join } from 'node:path'
44
import { cloneDeep } from 'lodash'
55

6-
import { installPackage } from '@antfu/install-pkg'
6+
import { installPackage } from '@mx-space/compiled/install-pkg'
77

88
import { NODE_REQUIRE_PATH } from '~/constants/path.constant'
99
import { logger } from '~/global/consola.global'

packages/compiled/install-pkg.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './node_modules/@antfu/install-pkg'

packages/compiled/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
"exports": {
77
".": "./dist/index.cjs",
88
"./auth": "./dist/auth.cjs",
9-
"./zod": "./dist/zod.cjs"
9+
"./zod": "./dist/zod.cjs",
10+
"./install-pkg": "./dist/install-pkg.cjs"
1011
},
1112
"scripts": {
1213
"build": "tsup"
1314
},
1415
"devDependencies": {
16+
"@antfu/install-pkg": "1.1.0",
1517
"better-auth": "1.2.5",
1618
"nanoid": "5.1.5",
1719
"zod": "3.24.3",

packages/compiled/tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineConfig } from 'tsup'
33
export default defineConfig({
44
clean: true,
55
target: 'es2020',
6-
entry: ['index.ts', 'auth.ts', 'zod.ts'],
6+
entry: ['index.ts', 'auth.ts', 'zod.ts', 'install-pkg.ts'],
77
dts: true,
88
external: ['mongodb'],
99
format: ['cjs'],

patches/tinyexec@1.0.1.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/dist/main.js b/dist/main.js
2+
index cba25835975aa12fb3e01ee463bc89d7cf51ab92..d13e398b929b329c4f4664b38db6b897b31a257f 100644
3+
--- a/dist/main.js
4+
+++ b/dist/main.js
5+
@@ -1,4 +1,4 @@
6+
-import { createRequire as __tinyexec_cr } from "node:module";const require = __tinyexec_cr(import.meta.url);
7+
+
8+
var St = Object.create;
9+
var $ = Object.defineProperty;
10+
var kt = Object.getOwnPropertyDescriptor;

pnpm-lock.yaml

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ onlyBuiltDependencies:
1010
- sharp
1111
- simple-git-hooks
1212
- unrs-resolver
13+
patchedDependencies:
14+
tinyexec@1.0.1: patches/tinyexec@1.0.1.patch

0 commit comments

Comments
 (0)