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: cleanup package.json (#3710)

白熱0938e54cf92b
diff --git a/common/shared/vite/build-pkg.js b/common/shared/vite/build-pkg.js
index 7a4883cb9f..4c3cd8460a 100644
--- a/common/shared/vite/build-pkg.js
+++ b/common/shared/vite/build-pkg.js
@@ -14,9 +14,9 @@
* limitations under the License.
*/
-const process = require('node:process');
const fs = require('node:fs');
const path = require('node:path');
+const process = require('node:process');
const esbuild = require('esbuild');
exports.buildPkg = function buildPkg() {
@@ -52,10 +52,10 @@ exports.buildPkg = function buildPkg() {
'univer',
];
- pkg.exports = {
+ pkg.exports = Object.assign({
'.': './src/index.ts',
'./*': './src/*',
- };
+ }, pkg.exports);
pkg.main = './lib/cjs/index.js';
pkg.module = './lib/es/index.js';
pkg.types = './lib/types/index.d.ts';
diff --git a/packages/facade/package.json b/packages/facade/package.json
index 1457df9a63..3507b041bd 100644
--- a/packages/facade/package.json
+++ b/packages/facade/package.json
@@ -72,7 +72,6 @@
"@univerjs/sheets-filter": "workspace:*",
"@univerjs/sheets-filter-ui": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
- "@univerjs/sheets-formula-ui": "workspace:*",
"@univerjs/sheets-hyper-link-ui": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
"@univerjs/sheets-thread-comment": "workspace:*",
@@ -98,7 +97,6 @@
"@univerjs/sheets-filter": "workspace:*",
"@univerjs/sheets-filter-ui": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
- "@univerjs/sheets-formula-ui": "workspace:*",
"@univerjs/sheets-hyper-link": "workspace:*",
"@univerjs/sheets-hyper-link-ui": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
@@ -110,6 +108,7 @@
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
+ "@univerjs/sheets-formula-ui": "workspace:*",
"jest-canvas-mock": "^2.5.2",
"jsdom": "^24.1.1",
"rxjs": "^7.8.1",
diff --git a/packages/sheets-data-validation-ui/package.json b/packages/sheets-data-validation-ui/package.json
index f0da5a3a4b..b8eb63fc84 100644
--- a/packages/sheets-data-validation-ui/package.json
+++ b/packages/sheets-data-validation-ui/package.json
@@ -71,7 +71,6 @@
"@univerjs/engine-render": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-data-validation": "workspace:*",
- "@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
@@ -93,7 +92,6 @@
"@univerjs/protocol": "0.1.39-alpha.15",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-data-validation": "workspace:*",
- "@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
diff --git a/packages/sheets-data-validation/package.json b/packages/sheets-data-validation/package.json
index a553e1af9b..646dab4cc5 100644
--- a/packages/sheets-data-validation/package.json
+++ b/packages/sheets-data-validation/package.json
@@ -62,36 +62,26 @@
"peerDependencies": {
"@univerjs/core": "workspace:*",
"@univerjs/data-validation": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
- "clsx": ">=2.0.0",
"dayjs": ">=1.11.0",
- "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
},
"dependencies": {
"@flatten-js/interval-tree": "^1.1.3",
"@univerjs/core": "workspace:*",
"@univerjs/data-validation": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
- "@univerjs/engine-render": "workspace:*",
"@univerjs/icons": "^0.1.78",
"@univerjs/protocol": "0.1.39-alpha.15",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
- "clsx": "^2.1.1",
"dayjs": "^1.11.13"
},
"devDependencies": {
"@univerjs-infra/shared": "workspace:*",
"less": "^4.2.0",
- "react": "18.3.1",
"rxjs": "^7.8.1",
"typescript": "^5.6.3",
"vite": "^5.4.8",
diff --git a/packages/sheets-formula-ui/package.json b/packages/sheets-formula-ui/package.json
index 4cb5b42eb5..27532f99e1 100644
--- a/packages/sheets-formula-ui/package.json
+++ b/packages/sheets-formula-ui/package.json
@@ -70,9 +70,7 @@
"@univerjs/docs-ui": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
- "@univerjs/rpc": "workspace:*",
"@univerjs/sheets": "workspace:*",
- "@univerjs/sheets-filter": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-ui": "workspace:*",
"@univerjs/ui": "workspace:*",
@@ -87,7 +85,6 @@
"@univerjs/engine-formula": "workspace:*",
"@univerjs/engine-render": "workspace:*",
"@univerjs/icons": "^0.1.78",
- "@univerjs/rpc": "workspace:*",
"@univerjs/sheets": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
diff --git a/packages/sheets-formula/package.json b/packages/sheets-formula/package.json
index 7d8eb1e7e1..f0374e6c02 100644
--- a/packages/sheets-formula/package.json
+++ b/packages/sheets-formula/package.json
@@ -59,12 +59,9 @@
},
"peerDependencies": {
"@univerjs/core": "workspace:*",
- "@univerjs/design": "workspace:*",
- "@univerjs/docs": "workspace:*",
"@univerjs/engine-formula": "workspace:*",
"@univerjs/rpc": "workspace:*",
"@univerjs/sheets": "workspace:*",
- "react": "^16.9.0 || ^17.0.0 || ^18.0.0",
"rxjs": ">=7.0.0"
},
"dependencies": {
@@ -80,11 +77,8 @@
"@univerjs/ui": "workspace:*"
},
"devDependencies": {
- "@types/react": "^18.3.11",
"@univerjs-infra/shared": "workspace:*",
- "@vitejs/plugin-react": "^4.3.2",
"less": "^4.2.0",
- "react": "18.3.1",
"rxjs": "^7.8.1",
"typescript": "^5.6.3",
"vite": "^5.4.8",
diff --git a/packages/sheets-hyper-link/src/controllers/ref-range.controller.ts b/packages/sheets-hyper-link/src/controllers/ref-range.controller.ts
index 9981647401..a5bcd7bba8 100644
--- a/packages/sheets-hyper-link/src/controllers/ref-range.controller.ts
+++ b/packages/sheets-hyper-link/src/controllers/ref-range.controller.ts
@@ -16,11 +16,17 @@
import type { IDisposable, IRange, Nullable } from '@univerjs/core';
import type { EffectRefRangeParams } from '@univerjs/sheets';
-import type { IAddHyperLinkMutationParams, ICellHyperLink, IRemoveHyperLinkMutationParams, IUpdateHyperLinkMutationParams, IUpdateHyperLinkRefMutationParams } from '@univerjs/sheets-hyper-link';
+import type { IAddHyperLinkMutationParams } from '../commands/mutations/add-hyper-link.mutation';
+import type { IRemoveHyperLinkMutationParams } from '../commands/mutations/remove-hyper-link.mutation';
+import type { IUpdateHyperLinkMutationParams, IUpdateHyperLinkRefMutationParams } from '../commands/mutations/update-hyper-link.mutation';
+import type { ICellHyperLink } from '../types/interfaces/i-hyper-link';
import { Disposable, ICommandService, Inject, isValidRange, sequenceExecuteAsync, toDisposable } from '@univerjs/core';
import { deserializeRangeWithSheet, serializeRange } from '@univerjs/engine-formula';
import { handleCommonRangeChangeWithEffectRefCommandsSkipNoInterests, handleDefaultRangeChangeWithEffectRefCommandsSkipNoInterests, RefRangeService, SheetsSelectionsService } from '@univerjs/sheets';
-import { AddHyperLinkMutation, HyperLinkModel, RemoveHyperLinkMutation, UpdateHyperLinkMutation, UpdateHyperLinkRefMutation } from '@univerjs/sheets-hyper-link';
+import { AddHyperLinkMutation } from '../commands/mutations/add-hyper-link.mutation';
+import { RemoveHyperLinkMutation } from '../commands/mutations/remove-hyper-link.mutation';
+import { UpdateHyperLinkMutation, UpdateHyperLinkRefMutation } from '../commands/mutations/update-hyper-link.mutation';
+import { HyperLinkModel } from '../models/hyper-link.model';
import { ERROR_RANGE } from '../types/const';
export class SheetsHyperLinkRefRangeController extends Disposable {
diff --git a/packages/umd/package.json b/packages/umd/package.json
index a0386cf54a..5fde495887 100644
--- a/packages/umd/package.json
+++ b/packages/umd/package.json
@@ -62,12 +62,14 @@
"@univerjs/sheets-conditional-formatting-ui": "workspace:*",
"@univerjs/sheets-crosshair-highlight": "workspace:*",
"@univerjs/sheets-data-validation": "workspace:*",
+ "@univerjs/sheets-data-validation-ui": "workspace:*",
"@univerjs/sheets-drawing": "workspace:*",
"@univerjs/sheets-drawing-ui": "workspace:*",
"@univerjs/sheets-filter": "workspace:*",
"@univerjs/sheets-filter-ui": "workspace:*",
"@univerjs/sheets-find-replace": "workspace:*",
"@univerjs/sheets-formula": "workspace:*",
+ "@univerjs/sheets-formula-ui": "workspace:*",
"@univerjs/sheets-hyper-link": "workspace:*",
"@univerjs/sheets-hyper-link-ui": "workspace:*",
"@univerjs/sheets-numfmt": "workspace:*",
diff --git a/packages/umd/scripts/index.mjs b/packages/umd/scripts/index.mjs
index b32bc897fd..5d48096f2b 100644
--- a/packages/umd/scripts/index.mjs
+++ b/packages/umd/scripts/index.mjs
@@ -57,12 +57,12 @@ async function generateLocale() {
'@univerjs/find-replace',
'@univerjs/sheets',
'@univerjs/sheets-conditional-formatting-ui',
- '@univerjs/sheets-data-validation',
+ '@univerjs/sheets-data-validation-ui',
'@univerjs/sheets-drawing-ui',
'@univerjs/sheets-filter-ui',
'@univerjs/sheets-sort-ui',
'@univerjs/sheets-find-replace',
- '@univerjs/sheets-formula',
+ '@univerjs/sheets-formula-ui',
'@univerjs/sheets-hyper-link-ui',
'@univerjs/sheets-numfmt',
'@univerjs/sheets-thread-comment',
@@ -131,10 +131,10 @@ function buildCSS() {
'@univerjs/docs-ui',
'@univerjs/docs-drawing-ui',
'@univerjs/sheets-ui',
- '@univerjs/sheets-formula',
+ '@univerjs/sheets-formula-ui',
'@univerjs/sheets-numfmt',
'@univerjs/sheets-zen-editor',
- '@univerjs/sheets-data-validation',
+ '@univerjs/sheets-data-validation-ui',
'@univerjs/sheets-drawing-ui',
'@univerjs/sheets-conditional-formatting-ui',
'@univerjs/sheets-filter-ui',
@@ -205,6 +205,7 @@ function buildJS() {
'@univerjs/sheets',
'@univerjs/sheets-ui',
'@univerjs/sheets-formula',
+ '@univerjs/sheets-formula-ui',
'@univerjs/sheets-numfmt',
'@univerjs/sheets-zen-editor',
'@univerjs/sheets-conditional-formatting',
@@ -213,6 +214,7 @@ function buildJS() {
'@univerjs/sheets-find-replace',
'@univerjs/data-validation',
'@univerjs/sheets-data-validation',
+ '@univerjs/sheets-data-validation-ui',
'@univerjs/sheets-filter',
'@univerjs/sheets-filter-ui',
'@univerjs/sheets-sort',
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9ebd222da0..5e517be5a8 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -10,7 +10,7 @@ importers:
devDependencies:
'@antfu/eslint-config':
specifier: 3.7.3
'@commitlint/cli':
specifier: ^19.5.0
version: 19.5.0(@types/[email protected])([email protected])
@@ -1750,9 +1750,6 @@ importers:
'@univerjs/sheets-formula':
specifier: workspace:*
version: link:../sheets-formula
- '@univerjs/sheets-formula-ui':
- specifier: workspace:*
- version: link:../sheets-formula-ui
'@univerjs/sheets-hyper-link':
specifier: workspace:*
version: link:../sheets-hyper-link
@@ -1781,6 +1778,9 @@ importers:
'@univerjs-infra/shared':
specifier: workspace:*
version: link:../../common/shared
+ '@univerjs/sheets-formula-ui':
+ specifier: workspace:*
+ version: link:../sheets-formula-ui
jest-canvas-mock:
specifier: ^2.5.2
version: 2.5.2
@@ -2097,18 +2097,9 @@ importers:
'@univerjs/data-validation':
specifier: workspace:*
version: link:../data-validation
- '@univerjs/design':
- specifier: workspace:*
- version: link:../design
- '@univerjs/docs':
- specifier: workspace:*
- version: link:../docs
'@univerjs/engine-formula':
specifier: workspace:*
version: link:../engine-formula
- '@univerjs/engine-render':
- specifier: workspace:*
- version: link:../engine-render
'@univerjs/icons':
specifier: ^0.1.78
@@ -2121,9 +2112,6 @@ importers:
'@univerjs/sheets-formula':
specifier: workspace:*
version: link:../sheets-formula
- clsx:
- specifier: ^2.1.1
- version: 2.1.1
dayjs:
specifier: ^1.11.13
version: 1.11.13
@@ -2134,9 +2122,6 @@ importers:
less:
specifier: ^4.2.0
version: 4.2.0
- react:
- specifier: 18.3.1
- version: 18.3.1
rxjs:
specifier: ^7.8.1
version: 7.8.1
@@ -2188,9 +2173,6 @@ importers:
'@univerjs/sheets-data-validation':
specifier: workspace:*
version: link:../sheets-data-validation
- '@univerjs/sheets-formula':
- specifier: workspace:*
- version: link:../sheets-formula
'@univerjs/sheets-numfmt':
specifier: workspace:*
version: link:../sheets-numfmt
@@ -2471,21 +2453,12 @@ importers:
specifier: workspace:*
version: link:../ui
devDependencies:
- '@types/react':
- specifier: ^18.3.11
- version: 18.3.11
'@univerjs-infra/shared':
specifier: workspace:*
version: link:../../common/shared
- '@vitejs/plugin-react':
- specifier: ^4.3.2
less:
specifier: ^4.2.0
version: 4.2.0
- react:
- specifier: 18.3.1
- version: 18.3.1
rxjs:
specifier: ^7.8.1
version: 7.8.1
@@ -2522,15 +2495,9 @@ importers:
'@univerjs/icons':
specifier: ^0.1.78
- '@univerjs/rpc':
- specifier: workspace:*
- version: link:../rpc
'@univerjs/sheets':
specifier: workspace:*
version: link:../sheets
- '@univerjs/sheets-filter':
- specifier: workspace:*
- version: link:../sheets-filter
'@univerjs/sheets-formula':
specifier: workspace:*
version: link:../sheets-formula
@@ -3376,6 +3343,9 @@ importers:
'@univerjs/sheets-data-validation':
specifier: workspace:*
version: link:../sheets-data-validation
+ '@univerjs/sheets-data-validation-ui':
+ specifier: workspace:*
+ version: link:../sheets-data-validation-ui
'@univerjs/sheets-drawing':
specifier: workspace:*
version: link:../sheets-drawing
@@ -3394,6 +3364,9 @@ importers:
'@univerjs/sheets-formula':
specifier: workspace:*
version: link:../sheets-formula
+ '@univerjs/sheets-formula-ui':
+ specifier: workspace:*
+ version: link:../sheets-formula-ui
'@univerjs/sheets-hyper-link':
specifier: workspace:*
version: link:../sheets-hyper-link
@@ -10822,7 +10795,7 @@ snapshots:
dependencies:
'@babel/runtime': 7.25.0
dependencies:
'@antfu/install-pkg': 0.4.1
'@clack/prompts': 0.7.0
@@ -10831,7 +10804,7 @@ snapshots:
'@stylistic/eslint-plugin': 2.8.0([email protected]([email protected]))([email protected])
'@typescript-eslint/parser': 8.8.1([email protected]([email protected]))([email protected])
eslint: 9.12.0([email protected])
eslint-config-flat-gitignore: 0.3.0([email protected]([email protected]))
eslint-flat-config-utils: 0.4.0
@@ -12902,7 +12875,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
eslint: 9.12.0([email protected])
optionalDependencies: