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.

build(workspace): update package.json exports setting

Dushusirbab5a67fe733
diff --git a/.github/contributing-zh.md b/.github/contributing-zh.md
index ae05cbe9e8..12bdf8e5e5 100644
--- a/.github/contributing-zh.md
+++ b/.github/contributing-zh.md
@@ -1237,21 +1237,22 @@ npm run build
### 发布 npm
-以发布 `@univerjs/core` 为例
+1. 选择需要修改版本的包
```shell
-pnpm publish --filter @univerjs/core
+pnpm changeset add
```
-使用 Verdaccio 本地测试发包使用
+2. 更新版本号被依赖的版本号
```shell
-pnpm publish --filter @univerjs/core --registry http://localhost:4873/
+pnpm changeset version
```
-or
-
+3. 发布npm
```shell
-cd packages/core
-npm publish --access=public
+pnpm publish -r
+
+# 本地测试的话加上本地npm仓库地址
+pnpm publish -r --registry http://localhost:4873/
```
## 插件使用
diff --git a/packages/base-render/package.json b/packages/base-render/package.json
index 490e00b820..54d0132dcf 100644
--- a/packages/base-render/package.json
+++ b/packages/base-render/package.json
@@ -2,7 +2,11 @@
"name": "@univerjs/base-render",
"version": "0.0.1",
"description": "UniverSheet normal base-render",
- "keywords": ["univer","render","canvas"],
+ "keywords": [
+ "univer",
+ "render",
+ "canvas"
+ ],
"author": "DreamNum <[email protected]>",
"license": "MIT",
"main": "./src/index.ts",
@@ -12,6 +16,13 @@
"main": "./lib/univer-base-render.cjs.js",
"module": "./lib/univer-base-render.es.js",
"types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-base-render.cjs.js",
+ "default": "./lib/univer-base-render.es.js"
+ },
+ "./*": "./lib/*"
+ },
"access": "public"
},
"exports": {
diff --git a/packages/base-sheets/package.json b/packages/base-sheets/package.json
index b51907f559..e5b34341b0 100644
--- a/packages/base-sheets/package.json
+++ b/packages/base-sheets/package.json
@@ -2,7 +2,11 @@
"name": "@univerjs/base-sheets",
"version": "0.0.1",
"description": "UniverSheet normal base-sheets",
- "keywords": ["univer","sheets","spreadsheet"],
+ "keywords": [
+ "univer",
+ "sheets",
+ "spreadsheet"
+ ],
"author": "DreamNum <[email protected]>",
"license": "MIT",
"main": "./src/index.ts",
@@ -12,6 +16,13 @@
"main": "./lib/univer-base-sheets.cjs.js",
"module": "./lib/univer-base-sheets.es.js",
"types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-base-sheets.cjs.js",
+ "default": "./lib/univer-base-sheets.es.js"
+ },
+ "./*": "./lib/*"
+ },
"access": "public"
},
"exports": {
diff --git a/packages/base-ui/package.json b/packages/base-ui/package.json
index 7add120988..898847b3ad 100644
--- a/packages/base-ui/package.json
+++ b/packages/base-ui/package.json
@@ -2,7 +2,10 @@
"name": "@univerjs/base-ui",
"version": "0.0.1",
"description": "UniverSheet normal plugin UI manager",
- "keywords": ["univer","ui"],
+ "keywords": [
+ "univer",
+ "ui"
+ ],
"author": "DreamNum <[email protected]>",
"license": "MIT",
"main": "./src/index.ts",
@@ -12,6 +15,13 @@
"main": "./lib/univer-base-ui.cjs.js",
"module": "./lib/univer-base-ui.es.js",
"types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-base-ui.cjs.js",
+ "default": "./lib/univer-base-ui.es.js"
+ },
+ "./*": "./lib/*"
+ },
"access": "public"
},
"exports": {
diff --git a/packages/common-plugin-data/package.json b/packages/common-plugin-data/package.json
index f8a4fdc2c0..dad4824b45 100644
--- a/packages/common-plugin-data/package.json
+++ b/packages/common-plugin-data/package.json
@@ -9,7 +9,15 @@
"publishConfig": {
"main": "./lib/univer-common-plugin-data.cjs.js",
"module": "./lib/univer-common-plugin-data.es.js",
- "types": "./lib/index.d.ts"
+ "types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-common-plugin-data.cjs.js",
+ "default": "./lib/univer-common-plugin-data.es.js"
+ },
+ "./*": "./lib/*"
+ },
+ "access": "public"
},
"exports": {
".": "./src/index.ts",
diff --git a/packages/core/package.json b/packages/core/package.json
index 3197f47b7b..30a6e33b4e 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -2,7 +2,16 @@
"name": "@univerjs/core",
"version": "0.0.1",
"description": "Univer core",
- "keywords": ["univer","core","sheets","docs","slides","excel","word","ppt"],
+ "keywords": [
+ "univer",
+ "core",
+ "sheets",
+ "docs",
+ "slides",
+ "excel",
+ "word",
+ "ppt"
+ ],
"author": "DreamNum <[email protected]>",
"main": "./src/index.ts",
"module": "./src/index.ts",
@@ -11,6 +20,13 @@
"main": "./lib/univer-core.js",
"module": "./lib/univer-core.mjs",
"types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-core.js",
+ "default": "./lib/univer-core.mjs"
+ },
+ "./*": "./lib/*"
+ },
"access": "public"
},
"exports": {
diff --git a/packages/ui-plugin-sheets/package.json b/packages/ui-plugin-sheets/package.json
index 2b80bb3a46..8e676dc4cb 100644
--- a/packages/ui-plugin-sheets/package.json
+++ b/packages/ui-plugin-sheets/package.json
@@ -2,7 +2,11 @@
"name": "@univerjs/ui-plugin-sheets",
"version": "0.0.1",
"description": "UniverSheet normal ui-plugin-sheets",
- "keywords": ["univer","ui","sheets"],
+ "keywords": [
+ "univer",
+ "ui",
+ "sheets"
+ ],
"author": "DreamNum <[email protected]>",
"license": "MIT",
"main": "./src/index.ts",
@@ -12,6 +16,13 @@
"main": "./lib/univer-ui-plugin-sheets.cjs.js",
"module": "./lib/univer-ui-plugin-sheets.es.js",
"types": "./lib/index.d.ts",
+ "exports": {
+ ".": {
+ "require": "./lib/univer-ui-plugin-sheets.cjs.js",
+ "default": "./lib/univer-ui-plugin-sheets.es.js"
+ },
+ "./*": "./lib/*"
+ },
"access": "public"
},
"exports": {
diff --git a/packages/ui-plugin-sheets/src/View/App.tsx b/packages/ui-plugin-sheets/src/View/App.tsx
index 06f4acabff..eab6ccf4a3 100644
--- a/packages/ui-plugin-sheets/src/View/App.tsx
+++ b/packages/ui-plugin-sheets/src/View/App.tsx
@@ -42,8 +42,8 @@ export class App extends Component<BaseUIProps, IState> {
<div
style={{
position: 'fixed',
- right: '200px',
- top: '10px',
+ right: '250px',
+ top: '14px',
fontSize: '14px',
zIndex: 100,
}}
@@ -51,13 +51,13 @@ export class App extends Component<BaseUIProps, IState> {
<span
style={{
display: 'inline-block',
- width: 50,
+ width: 70,
margin: '5px 0 0 5px',
}}
>
- 语言
+ Language
</span>
- <select value={locale} onChange={this.setLocale.bind(this)} style={{ width: 55 }}>
+ <select value={locale} onChange={this.setLocale.bind(this)} style={{ width: 70 }}>
<option value="en">English</option>
<option value="zh">中文</option>
</select>
diff --git a/scripts/link.js b/scripts/link.js
index 8e3775119f..b3c9e00c02 100644
--- a/scripts/link.js
+++ b/scripts/link.js
@@ -7,7 +7,7 @@ const linkTargets = [
'@univerjs/base-ui', // success
'@univerjs/base-sheets', // success
- // '@univerjs/common-plugin-data',
+ '@univerjs/common-plugin-data',
// '@univerjs/sheets-plugin-format',
// '@univerjs/sheets-plugin-formula',