Skip to content

Build your own AI office with Univer Office SDK. Bring editing, calculation, collaboration, and file processing into your product for people and AI agents. Built on an extensible open-source core.

chore(ci): add cnpm sync (#2503)

#FF0000ff4ca95da10c
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6302c69562..8227290cef 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -154,6 +154,27 @@ jobs:
vercel-org-id: ${{ secrets.ORG_ID}}
vercel-project-id: ${{ secrets.PROJECT_ID}}
+ sync-cnpm:
+ runs-on: ubuntu-latest
+ needs: [release-npm]
+
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: ./.github/actions/setup-node
+
+ - name: Install Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: 20
+ - name: 🚚 Install dependencies
+ run: pnpm install cnpm -g
+
+ - name: 🐙 Sync to cnpm
+ run: pnpm sync-cnpm
+
build-storybook:
runs-on: ubuntu-latest
needs: [release-npm]
diff --git a/package.json b/package.json
index 82c4478927..93564b9821 100644
--- a/package.json
+++ b/package.json
@@ -42,7 +42,8 @@
"release": "release-it",
"release:alpha": "release-it preminor --preRelease=alpha",
"release:beta": "release-it preminor --preRelease=beta",
- "release:rc": "release-it prerelease --preRelease=rc"
+ "release:rc": "release-it prerelease --preRelease=rc",
+ "sync:cnpm": "turbo sync:cnpm"
},
"devDependencies": {
"@antfu/eslint-config": "^2.21.0",
diff --git a/packages/core/package.json b/packages/core/package.json
index c9bdf62478..7cdfe9c972 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@wendellhu/redi": "0.15.4",
diff --git a/packages/data-validation/package.json b/packages/data-validation/package.json
index e595e831e4..b01035516c 100644
--- a/packages/data-validation/package.json
+++ b/packages/data-validation/package.json
@@ -59,7 +59,8 @@
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/debugger/package.json b/packages/debugger/package.json
index 99b3437e50..52b214a078 100644
--- a/packages/debugger/package.json
+++ b/packages/debugger/package.json
@@ -51,7 +51,8 @@
],
"scripts": {
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/design/package.json b/packages/design/package.json
index 4a37a748fd..997a118b74 100644
--- a/packages/design/package.json
+++ b/packages/design/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"clsx": ">=2.0.0",
diff --git a/packages/docs-drawing-ui/package.json b/packages/docs-drawing-ui/package.json
index 3dd821ce58..80c2f449b7 100644
--- a/packages/docs-drawing-ui/package.json
+++ b/packages/docs-drawing-ui/package.json
@@ -59,7 +59,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/docs-drawing/package.json b/packages/docs-drawing/package.json
index 041bdee72c..82817a3bb8 100644
--- a/packages/docs-drawing/package.json
+++ b/packages/docs-drawing/package.json
@@ -54,7 +54,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/docs-ui/package.json b/packages/docs-ui/package.json
index f8a45a77d3..20f9d4a144 100644
--- a/packages/docs-ui/package.json
+++ b/packages/docs-ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 228de918ca..3ce20a3ca6 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/drawing-ui/package.json b/packages/drawing-ui/package.json
index 21c38a3c7e..69e00c4534 100644
--- a/packages/drawing-ui/package.json
+++ b/packages/drawing-ui/package.json
@@ -59,7 +59,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/drawing/package.json b/packages/drawing/package.json
index 969f7984fc..ddf52c3ed2 100644
--- a/packages/drawing/package.json
+++ b/packages/drawing/package.json
@@ -54,7 +54,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/engine-formula/package.json b/packages/engine-formula/package.json
index a0edf1d9fc..7d22fdd6df 100644
--- a/packages/engine-formula/package.json
+++ b/packages/engine-formula/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/engine-numfmt/package.json b/packages/engine-numfmt/package.json
index a016e2fb89..e9e17b28f5 100644
--- a/packages/engine-numfmt/package.json
+++ b/packages/engine-numfmt/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {},
"dependencies": {
diff --git a/packages/engine-render/package.json b/packages/engine-render/package.json
index 2405bd2a5f..cb6e3ecd35 100644
--- a/packages/engine-render/package.json
+++ b/packages/engine-render/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/facade/package.json b/packages/facade/package.json
index 154a833024..c1a4841f22 100644
--- a/packages/facade/package.json
+++ b/packages/facade/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/find-replace/package.json b/packages/find-replace/package.json
index 75711f3a1d..8ba67c96b1 100644
--- a/packages/find-replace/package.json
+++ b/packages/find-replace/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/network/package.json b/packages/network/package.json
index e6f8874910..0c09769126 100644
--- a/packages/network/package.json
+++ b/packages/network/package.json
@@ -55,7 +55,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/rpc/package.json b/packages/rpc/package.json
index c413604e7d..54e84cb769 100644
--- a/packages/rpc/package.json
+++ b/packages/rpc/package.json
@@ -52,7 +52,8 @@
],
"scripts": {
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-conditional-formatting-ui/package.json b/packages/sheets-conditional-formatting-ui/package.json
index ec988063f2..f6123e4d40 100644
--- a/packages/sheets-conditional-formatting-ui/package.json
+++ b/packages/sheets-conditional-formatting-ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-conditional-formatting/package.json b/packages/sheets-conditional-formatting/package.json
index fccc0e3d1d..cc643f43bc 100644
--- a/packages/sheets-conditional-formatting/package.json
+++ b/packages/sheets-conditional-formatting/package.json
@@ -57,7 +57,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-data-validation/package.json b/packages/sheets-data-validation/package.json
index 66437505b6..426bedb3c1 100644
--- a/packages/sheets-data-validation/package.json
+++ b/packages/sheets-data-validation/package.json
@@ -58,7 +58,8 @@
"test": "vitest run",
"test:watch": "vitest",
"coverage": "vitest run --coverage",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-drawing-ui/package.json b/packages/sheets-drawing-ui/package.json
index c165474992..29c61b3a48 100644
--- a/packages/sheets-drawing-ui/package.json
+++ b/packages/sheets-drawing-ui/package.json
@@ -59,7 +59,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-drawing/package.json b/packages/sheets-drawing/package.json
index 36ca4c5d1c..f601b45d69 100644
--- a/packages/sheets-drawing/package.json
+++ b/packages/sheets-drawing/package.json
@@ -54,7 +54,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-filter-ui/package.json b/packages/sheets-filter-ui/package.json
index 725a7a0eb0..b4361b69ef 100644
--- a/packages/sheets-filter-ui/package.json
+++ b/packages/sheets-filter-ui/package.json
@@ -59,7 +59,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-filter/package.json b/packages/sheets-filter/package.json
index 3c23139d0b..f97b801f22 100644
--- a/packages/sheets-filter/package.json
+++ b/packages/sheets-filter/package.json
@@ -54,7 +54,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-find-replace/package.json b/packages/sheets-find-replace/package.json
index 5b008ad874..c4e3cfdc29 100644
--- a/packages/sheets-find-replace/package.json
+++ b/packages/sheets-find-replace/package.json
@@ -58,7 +58,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-formula/package.json b/packages/sheets-formula/package.json
index 1276583079..3d5e3ca257 100644
--- a/packages/sheets-formula/package.json
+++ b/packages/sheets-formula/package.json
@@ -60,7 +60,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-hyper-link-ui/package.json b/packages/sheets-hyper-link-ui/package.json
index 80bdf083ec..a9d05cd92a 100644
--- a/packages/sheets-hyper-link-ui/package.json
+++ b/packages/sheets-hyper-link-ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-hyper-link/package.json b/packages/sheets-hyper-link/package.json
index 777a69db69..a7016b18c3 100644
--- a/packages/sheets-hyper-link/package.json
+++ b/packages/sheets-hyper-link/package.json
@@ -54,7 +54,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-numfmt/package.json b/packages/sheets-numfmt/package.json
index 1efc588e9d..10844fed5c 100644
--- a/packages/sheets-numfmt/package.json
+++ b/packages/sheets-numfmt/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-thread-comment/package.json b/packages/sheets-thread-comment/package.json
index 77a19714cd..377dc9d812 100644
--- a/packages/sheets-thread-comment/package.json
+++ b/packages/sheets-thread-comment/package.json
@@ -56,7 +56,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-ui/package.json b/packages/sheets-ui/package.json
index 3e25a6fccc..ab0bfed8c0 100644
--- a/packages/sheets-ui/package.json
+++ b/packages/sheets-ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets-zen-editor/package.json b/packages/sheets-zen-editor/package.json
index acd69e3bef..7094b08ac9 100644
--- a/packages/sheets-zen-editor/package.json
+++ b/packages/sheets-zen-editor/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/sheets/package.json b/packages/sheets/package.json
index d6ecec355d..11b3021a57 100644
--- a/packages/sheets/package.json
+++ b/packages/sheets/package.json
@@ -58,7 +58,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/slides-ui/package.json b/packages/slides-ui/package.json
index 8f037e4fef..016725f834 100644
--- a/packages/slides-ui/package.json
+++ b/packages/slides-ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/slides/package.json b/packages/slides/package.json
index 25e36d211b..51c6d45ca9 100644
--- a/packages/slides/package.json
+++ b/packages/slides/package.json
@@ -58,7 +58,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/thread-comment-ui/package.json b/packages/thread-comment-ui/package.json
index e638b55754..375fc34365 100644
--- a/packages/thread-comment-ui/package.json
+++ b/packages/thread-comment-ui/package.json
@@ -59,7 +59,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/thread-comment/package.json b/packages/thread-comment/package.json
index 957f341d1f..753ec3f573 100644
--- a/packages/thread-comment/package.json
+++ b/packages/thread-comment/package.json
@@ -57,7 +57,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/ui/package.json b/packages/ui/package.json
index b457c5253a..ff07924241 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/umd/package.json b/packages/umd/package.json
index 92017848c2..51f478b55c 100644
--- a/packages/umd/package.json
+++ b/packages/umd/package.json
@@ -34,7 +34,8 @@
"lib"
],
"scripts": {
- "build:umd": "node ./scripts/index.mjs"
+ "build:umd": "node ./scripts/index.mjs",
+ "sync:cnpm": "cnpm sync"
},
"dependencies": {
"@univerjs/core": "workspace:*",
diff --git a/packages/uniscript/package.json b/packages/uniscript/package.json
index fa9cba0dc4..7887280452 100644
--- a/packages/uniscript/package.json
+++ b/packages/uniscript/package.json
@@ -61,7 +61,8 @@
"test:watch": "vitest",
"coverage": "vitest run --coverage",
"lint:types": "tsc --noEmit",
- "build": "tsc && vite build"
+ "build": "tsc && vite build",
+ "sync:cnpm": "cnpm sync"
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
diff --git a/turbo.json b/turbo.json
index cc5284971a..03ef340b5e 100644
--- a/turbo.json
+++ b/turbo.json
@@ -23,6 +23,8 @@
"cache": false
},
- "lint:types": {}
+ "lint:types": {},
+
+ "sync:cnpm": {}
}
}