feat:包管理器改为yarn
This commit is contained in:
parent
ef811c1e8a
commit
279768e320
6
.github/workflows/build.yaml
vendored
6
.github/workflows/build.yaml
vendored
@ -26,13 +26,13 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22.x'
|
node-version: '22.x'
|
||||||
cache: 'npm'
|
cache: 'yarn'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
- name: Build all
|
- name: Build all
|
||||||
run: npm run build
|
run: yarn build
|
||||||
|
|
||||||
- name: Package VSIX
|
- name: Package VSIX
|
||||||
run: npx vsce package --out dist/openmcp.vsix
|
run: npx vsce package --out dist/openmcp.vsix
|
||||||
|
8
.github/workflows/test.yaml
vendored
8
.github/workflows/test.yaml
vendored
@ -26,10 +26,10 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '22.x'
|
node-version: '22.x'
|
||||||
cache: 'npm'
|
cache: 'yarn'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: yarn install --frozen-lockfile
|
||||||
|
|
||||||
- name: Install xvfb (Linux only)
|
- name: Install xvfb (Linux only)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
@ -37,8 +37,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Run Test with XVFB (Linux)
|
- name: Run Test with XVFB (Linux)
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: xvfb-run --auto-servernum npm run test
|
run: xvfb-run --auto-servernum yarn test
|
||||||
|
|
||||||
- name: Run Test (Windows/macOS)
|
- name: Run Test (Windows/macOS)
|
||||||
if: runner.os != 'Linux'
|
if: runner.os != 'Linux'
|
||||||
run: npm run test
|
run: yarn test
|
@ -8,9 +8,13 @@ build({
|
|||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
outfile: 'dist/extension.cjs.js',
|
outfile: 'dist/extension.cjs.js',
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
external: ['vscode'], // 只排除 vscode,其他依赖全部打包进来
|
external: ['vscode'],
|
||||||
target: ['node18'], // 你可以根据实际 node 版本调整
|
target: ['node22'],
|
||||||
loader: {
|
loader: {
|
||||||
'.json': 'json'
|
'.json': 'json'
|
||||||
}
|
},
|
||||||
|
define: { 'import.meta.url': '_importMetaUrl' },
|
||||||
|
banner: {
|
||||||
|
js: "const _importMetaUrl=require('url').pathToFileURL(__filename)",
|
||||||
|
},
|
||||||
}).catch(() => process.exit(1));
|
}).catch(() => process.exit(1));
|
9261
package-lock.json
generated
9261
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,7 @@
|
|||||||
"description": "An all in one MCP Client/TestTool",
|
"description": "An all in one MCP Client/TestTool",
|
||||||
"version": "0.1.8",
|
"version": "0.1.8",
|
||||||
"publisher": "kirigaya",
|
"publisher": "kirigaya",
|
||||||
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "kirigaya",
|
"name": "kirigaya",
|
||||||
"email": "1193466151@qq.com"
|
"email": "1193466151@qq.com"
|
||||||
@ -220,14 +221,14 @@
|
|||||||
"renderer"
|
"renderer"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": "npm i && npm run prepare:ocr",
|
"setup": "yarn install && yarn prepare:ocr",
|
||||||
"serve": "turbo serve",
|
"serve": "turbo serve",
|
||||||
"build": "turbo build && tsc -p ./ && node esbuild.config.js",
|
"build": "turbo build && tsc -p ./ && node esbuild.config.js",
|
||||||
"build:plugin": "npm run build && tsc && vsce package",
|
"build:plugin": "yarn build && tsc && vsce package",
|
||||||
"vscode:prepublish": "node esbuild.config.js",
|
"vscode:prepublish": "node esbuild.config.js",
|
||||||
"compile": "tsc -p ./",
|
"compile": "tsc -p ./",
|
||||||
"watch": "tsc -watch -p ./",
|
"watch": "tsc -watch -p ./",
|
||||||
"pretest": "npm run build",
|
"pretest": "yarn build",
|
||||||
"lint": "eslint src --ext ts",
|
"lint": "eslint src --ext ts",
|
||||||
"test": "node ./dist/test/e2e/runTest.js",
|
"test": "node ./dist/test/e2e/runTest.js",
|
||||||
"prepare:ocr": "rollup -c rollup.tesseract.js --bundleConfigAsCjs",
|
"prepare:ocr": "rollup -c rollup.tesseract.js --bundleConfigAsCjs",
|
||||||
@ -288,5 +289,5 @@
|
|||||||
"webpack": "^5.99.5",
|
"webpack": "^5.99.5",
|
||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
},
|
},
|
||||||
"packageManager": "npm@10.0.0"
|
"packageManager": "yarn@1.22.22"
|
||||||
}
|
}
|
4713
renderer/package-lock.json
generated
4713
renderer/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -62,5 +62,7 @@
|
|||||||
"vite": "^6.2.4",
|
"vite": "^6.2.4",
|
||||||
"vite-plugin-vue-devtools": "^7.7.2",
|
"vite-plugin-vue-devtools": "^7.7.2",
|
||||||
"vue-tsc": "^2.2.8"
|
"vue-tsc": "^2.2.8"
|
||||||
}
|
},
|
||||||
|
"main": "index.js",
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
4633
service/package-lock.json
generated
4633
service/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -6,13 +6,13 @@
|
|||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "nodemon --watch src --exec tsx src/main.ts",
|
"serve": "tsx watch src/main.ts",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build:watch": "tsc --watch",
|
"build:watch": "tsc --watch",
|
||||||
"postbuild": "node ./scripts/post-build.mjs",
|
"postbuild": "node ./scripts/post-build.mjs",
|
||||||
"start": "node --experimental-specifier-resolution=node dist/main.js",
|
"start": "node dist/main.js",
|
||||||
"start:prod": "NODE_ENV=production node --experimental-specifier-resolution=node dist/main.js",
|
"start:prod": "NODE_ENV=production node dist/main.js",
|
||||||
"debug": "node --inspect --no-warnings=ExperimentalWarning -r tsx/esm src/main.ts",
|
"debug": "tsx --inspect src/main.ts",
|
||||||
"clean": "rm -rf dist",
|
"clean": "rm -rf dist",
|
||||||
"lint": "eslint src --ext .ts,.tsx",
|
"lint": "eslint src --ext .ts,.tsx",
|
||||||
"typecheck": "tsc --noEmit"
|
"typecheck": "tsc --noEmit"
|
||||||
|
@ -13,9 +13,6 @@ export interface VSCodeMessage {
|
|||||||
callbackId?: string;
|
callbackId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 适配 ESM 的 __dirname
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = dirname(__filename);
|
|
||||||
|
|
||||||
// 统一路径变量
|
// 统一路径变量
|
||||||
const devHome = join(__dirname, '..', '..');
|
const devHome = join(__dirname, '..', '..');
|
||||||
|
@ -9,9 +9,6 @@ import path from 'path';
|
|||||||
import { setRunningCWD } from './hook/setting.js';
|
import { setRunningCWD } from './hook/setting.js';
|
||||||
import { exit } from 'process';
|
import { exit } from 'process';
|
||||||
|
|
||||||
// 适配 ESM 的 __dirname
|
|
||||||
const __filename = fileURLToPath(import.meta.url);
|
|
||||||
const __dirname = dirname(__filename);
|
|
||||||
|
|
||||||
export interface VSCodeMessage {
|
export interface VSCodeMessage {
|
||||||
command: string;
|
command: string;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user