optimize: 包管理工具,使用 `pnpm` 替换掉 `lerna` (#395)

pull/391/head
star knight 3 weeks ago committed by GitHub
parent 8bb2d62c45
commit 1a3918b402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -17,17 +17,26 @@ jobs:
- ubuntu
- macos
node:
- 16
- 22
steps:
- name: 'Checkout'
uses: actions/checkout@v4.1.7
- name: 'Setup Node.js environment'
- name: 'Setup Node.js "${{ matrix.node }}.x" environment'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/
- name: 'Setup pnpm'
uses: pnpm/action-setup@v4
- name: 'Setup Python environment (Mac) Because of electron-builder install-app-deps requires Python setup tools'
if: matrix.os == 'macos'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Get package info'
id: package-info
uses: luizfelipelaviola/get-package-info@v1
@ -41,19 +50,7 @@ jobs:
echo "github.ref = ${{ github.ref }}";
echo "github.ref_name = ${{ github.ref_name }}";
- name: 'npm install -g lerna@6/yarn'
run: |
echo "======================================================================";
echo "npm install -g lerna@6";
echo "--------------------";
npm install -g lerna@6;
echo "======================================================================";
echo "npm install -g yarn";
echo "--------------------";
npm install -g yarn;
- name: 'npm -v | yarn -v | lerna -v'
- name: 'npm -v | pnpm -v | python --version'
run: |
echo "======================================================================";
echo "npm -v";
@ -61,24 +58,24 @@ jobs:
npm -v;
echo "======================================================================";
echo "yarn -v";
echo "pnpm -v";
echo "--------------------";
yarn -v;
pnpm -v;
echo "======================================================================";
echo "lerna -v";
echo "python --version";
echo "--------------------";
lerna -v;
python --version;
- name: 'lerna bootstrap'
- name: 'pnpm install'
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "lerna bootstrap --npm-client=yarn";
echo "pnpm install";
echo "--------------------";
lerna bootstrap --npm-client=yarn;
pnpm install;
- name: 'npm run electron:build'
run: |

@ -22,17 +22,26 @@ jobs:
- ubuntu
- macos
node:
- 16
- 22
steps:
- name: 'Checkout'
uses: actions/checkout@v4.1.7
- name: 'Setup Node.js environment'
- name: 'Setup Node.js "${{ matrix.node }}.x" environment'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
registry-url: https://npm.pkg.github.com/
- name: 'Setup pnpm'
uses: pnpm/action-setup@v4
- name: 'Setup Python environment (Mac) Because of electron-builder install-app-deps requires Python setup tools'
if: matrix.os == 'macos'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: 'Get package info'
id: package-info
uses: luizfelipelaviola/get-package-info@v1
@ -46,19 +55,7 @@ jobs:
echo "github.ref = ${{ github.ref }}";
echo "github.ref_name = ${{ github.ref_name }}";
- name: 'npm install -g lerna@6/yarn'
run: |
echo "======================================================================";
echo "npm install -g lerna@6";
echo "--------------------";
npm install -g lerna@6;
echo "======================================================================";
echo "npm install -g yarn";
echo "--------------------";
npm install -g yarn;
- name: 'npm -v | yarn -v | lerna -v'
- name: 'npm -v | pnpm -v | python --version'
run: |
echo "======================================================================";
echo "npm -v";
@ -66,24 +63,24 @@ jobs:
npm -v;
echo "======================================================================";
echo "yarn -v";
echo "pnpm -v";
echo "--------------------";
yarn -v;
pnpm -v;
echo "======================================================================";
echo "lerna -v";
echo "python --version";
echo "--------------------";
lerna -v;
python --version;
- name: 'lerna bootstrap'
- name: 'pnpm install'
run: |
echo "======================================================================";
dir || ls -lah;
echo "======================================================================";
echo "lerna bootstrap --npm-client=yarn";
echo "pnpm install";
echo "--------------------";
lerna bootstrap --npm-client=yarn;
pnpm install;
- name: 'npm run electron:build'
run: |

@ -0,0 +1 @@
shamefully-hoist=true

@ -1,7 +0,0 @@
cd ../
node -v
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install -g lerna@6

@ -0,0 +1,5 @@
cd ../
node -v
npm install -g pnpm --registry=https://registry.npmmirror.com

@ -2,4 +2,4 @@ cd ../
node -v
lerna bootstrap
pnpm install

@ -1,18 +0,0 @@
{
"packages": [
"packages/*"
],
"command": {
"publish": {
"ignoreChanges": [
"*.md",
"config",
"doc"
]
},
"bootstrap": {
"ignore": []
}
},
"version": "1.8.9"
}

@ -1,11 +1,7 @@
{
"name": "dev-sidecar-parent",
"packageManager": "pnpm@9.13.2",
"private": false,
"author": "Greper",
"license": "MPL-2.0",
"dependencies": {
},
"devDependencies": {
"lerna": "^6.6.2"
}
"license": "MPL-2.0"
}

@ -17,7 +17,7 @@
"test": "mocha"
},
"dependencies": {
"@docmirror/mitmproxy": "^1.8.9",
"@docmirror/mitmproxy": "workspace:*",
"agentkeepalive": "^2.1.1",
"babel-preset-es2020": "^1.0.2",
"charset": "^1.0.0",

@ -21,8 +21,8 @@
"electron:icons-black": "electron-icon-builder --input=./public/logo/win-black.png --output=build/black --flatten"
},
"dependencies": {
"@docmirror/dev-sidecar": "^1.8.9",
"@docmirror/mitmproxy": "^1.8.9",
"@docmirror/dev-sidecar": "workspace:*",
"@docmirror/mitmproxy": "workspace:*",
"@mihomo-party/sysproxy": "^2.0.4",
"@natmri/platform-napi": "^0.0.7",
"adm-zip": "^0.5.5",
@ -54,7 +54,7 @@
"@vue/eslint-config-standard": "^5.1.2",
"babel-eslint": "^10.1.0",
"electron": "^17.4.11",
"electron-builder": "^23.0.3",
"electron-builder": "^25.0.6",
"electron-devtools-installer": "^3.1.0",
"electron-icon-builder": "^2.0.1",
"eslint": "^6.7.2",

@ -15,6 +15,7 @@ module.exports = {
title: 'DevSidecar-给开发者的边车辅助工具',
},
},
lintOnSave: false,
configureWebpack: {
plugins: [
new webpack.DefinePlugin({ 'global.GENTLY': true }),

Loading…
Cancel
Save