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(package.json): automate generation of specific fields (#2428)

白熱44829130e5f3
diff --git a/common/shared/vite/build-locale.js b/common/shared/vite/build-locale.js
deleted file mode 100644
index 483de69f5f..0000000000
--- a/common/shared/vite/build-locale.js
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Copyright 2023-present DreamNum Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-const process = require('node:process');
-const fs = require('node:fs');
-const path = require('node:path');
-const esbuild = require('esbuild');
-
-exports.buildLocale = function buildLocale({ entryRoot, outDir }) {
- return {
- name: 'build-locale',
- enforce: 'pre',
- generateBundle() {
- const srcDir = path.resolve(process.cwd(), entryRoot);
-
- if (!fs.existsSync(srcDir)) {
- return;
- }
-
- const outputDir = path.resolve(process.cwd(), outDir);
-
- fs.readdirSync(srcDir)
- .filter((file) => file.includes('-') && fs.statSync(path.resolve(srcDir, file)).isFile())
- .forEach((file) => {
- const fullPath = path.join(srcDir, file);
-
- const syncResult = esbuild.buildSync({
- entryPoints: [fullPath],
- bundle: true,
- platform: 'node',
- format: 'cjs',
- write: false,
- });
-
- // eslint-disable-next-line no-new-func
- const module = new Function('module', `${syncResult.outputFiles[0].text};return module;`)({});
- const result = module.exports.default;
- const data = JSON.stringify(result, null, 2);
-
- if (!fs.existsSync(outputDir)) {
- fs.mkdirSync(outputDir, { recursive: true });
- }
-
- const outputPath = path.resolve(outputDir, file.replace('.ts', '.json'));
-
- fs.writeFileSync(outputPath, data);
-
- // eslint-disable-next-line no-console
- console.log(`[vite:build-locale] ${outputPath} generated`);
- });
-
- // generate exports
- const pkg = require(`${process.cwd()}/package.json`);
- pkg.exports = {
- ...pkg.exports,
- './locale/*': './src/locale/*.ts',
- };
- pkg.publishConfig = {
- ...pkg.publishConfig,
- exports: {
- ...pkg.publishConfig.exports,
- './locale/*': './lib/locale/*.json',
- },
- };
- fs.writeFileSync(
- `${process.cwd()}/package.json`,
- `${JSON.stringify(pkg, null, 4)}\n`
- );
- },
- };
-};
diff --git a/common/shared/vite/build-pkg.js b/common/shared/vite/build-pkg.js
new file mode 100644
index 0000000000..7ab94b7a6f
--- /dev/null
+++ b/common/shared/vite/build-pkg.js
@@ -0,0 +1,132 @@
+/**
+ * Copyright 2023-present DreamNum Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+const process = require('node:process');
+const fs = require('node:fs');
+const path = require('node:path');
+const esbuild = require('esbuild');
+
+exports.buildPkg = function buildPkg() {
+ return {
+ name: 'build-pkg',
+ enforce: 'pre',
+ generateBundle() {
+ const srcDir = path.resolve(process.cwd(), 'src/locale');
+ const outputDir = path.resolve(process.cwd(), 'lib/locale');
+ const pkgPath = path.resolve(process.cwd(), 'package.json');
+
+ if (!fs.existsSync(pkgPath)) {
+ return;
+ }
+
+ const pkg = require(pkgPath);
+
+ pkg.author = 'DreamNum <[email protected]>';
+ pkg.license = 'Apache-2.0';
+ pkg.funding = {
+ type: 'opencollective',
+ url: 'https://opencollective.com/univer',
+ };
+ pkg.homepage = 'https://univer.ai';
+ pkg.repository = {
+ type: 'git',
+ url: 'https://github.com/dream-num/univer',
+ };
+ pkg.bugs = {
+ url: 'https://github.com/dream-num/univer/issues',
+ };
+ pkg.keywords = pkg.keywords || [
+ 'univer',
+ ];
+
+ pkg.exports = {
+ '.': './src/index.ts',
+ './*': './src/*',
+ };
+ pkg.main = './lib/cjs/index.js';
+ pkg.module = './lib/es/index.js';
+ pkg.types = './lib/types/index.d.ts';
+ pkg.publishConfig = {
+ access: 'public',
+ main: './lib/cjs/index.js',
+ module: './lib/es/index.js',
+ exports: {
+ '.': {
+ import: './lib/es/index.js',
+ require: './lib/cjs/index.js',
+ types: './lib/types/index.d.ts',
+ },
+ './*': {
+ import: './lib/es/*',
+ require: './lib/cjs/*',
+ types: './lib/types/index.d.ts',
+ },
+ './lib/*': './lib/*',
+ },
+ };
+
+ pkg.directories = {
+ lib: 'lib',
+ };
+ pkg.files = [
+ 'lib',
+ ];
+
+ if (fs.existsSync(srcDir)) {
+ fs.readdirSync(srcDir)
+ .filter((file) => file.includes('-') && fs.statSync(path.resolve(srcDir, file)).isFile())
+ .forEach((file) => {
+ const fullPath = path.join(srcDir, file);
+
+ const syncResult = esbuild.buildSync({
+ entryPoints: [fullPath],
+ bundle: true,
+ platform: 'node',
+ format: 'cjs',
+ write: false,
+ });
+
+ // eslint-disable-next-line no-new-func
+ const module = new Function('module', `${syncResult.outputFiles[0].text};return module;`)({});
+ const result = module.exports.default;
+ const data = JSON.stringify(result, null, 2);
+
+ if (!fs.existsSync(outputDir)) {
+ fs.mkdirSync(outputDir, { recursive: true });
+ }
+
+ const outputPath = path.resolve(outputDir, file.replace('.ts', '.json'));
+
+ fs.writeFileSync(outputPath, data);
+
+ // eslint-disable-next-line no-console
+ console.log(`[vite:build-pkg] ${outputPath} generated`);
+
+ // exports
+ pkg.exports['./locale/*'] = './src/locale/*.ts';
+ pkg.publishConfig.exports['./locale/*'] = './lib/locale/*.json';
+ });
+ }
+
+ pkg.univerSpace = pkg.publishConfig.exports;
+
+ fs.writeFileSync(
+ `${process.cwd()}/package.json`,
+ `${JSON.stringify(pkg, null, 4)}\n`
+ );
+ },
+ };
+};
diff --git a/common/shared/vite/index.js b/common/shared/vite/index.js
index 7fb052bd41..aeee56bd1b 100644
--- a/common/shared/vite/index.js
+++ b/common/shared/vite/index.js
@@ -22,7 +22,7 @@ const { default: dts } = require('vite-plugin-dts');
const react = require('@vitejs/plugin-react');
const { autoExternalizeDependency } = require('./auto-externalize-dependency-plugin');
const { obfuscator } = require('./obfuscator');
-const { buildLocale } = require('./build-locale');
+const { buildPkg } = require('./build-pkg');
const { convertLibNameFromPackageName } = require('./utils');
/**
@@ -64,10 +64,7 @@ function createViteConfig(overrideConfig, /** @type {IOptions} */ options) {
outDir: 'lib/types',
}),
obfuscator(),
- buildLocale({
- entryRoot: 'src/locale',
- outDir: 'lib/locale',
- }),
+ buildPkg(),
],
define: {
'process.env.NODE_ENV': JSON.stringify(mode),
diff --git a/packages/core/package.json b/packages/core/package.json
index 06a87fb641..fd7f072dad 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -80,5 +76,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/data-validation/package.json b/packages/data-validation/package.json
index f5cd9144b0..3d6db47eb5 100644
--- a/packages/data-validation/package.json
+++ b/packages/data-validation/package.json
@@ -28,7 +28,7 @@
"./*": "./src/*"
},
"main": "./lib/cjs/index.js",
- "module": "./lib/esm/index.js",
+ "module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
"publishConfig": {
"access": "public",
@@ -79,5 +79,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/debugger/package.json b/packages/debugger/package.json
index bfea049f96..ea32bb6f9b 100644
--- a/packages/debugger/package.json
+++ b/packages/debugger/package.json
@@ -81,5 +81,18 @@
"vite": "^5.2.12",
"vitest": "^1.6.0",
"vue": "^3.4.27"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/design/package.json b/packages/design/package.json
index 9250ce9e55..4f78a8bde9 100644
--- a/packages/design/package.json
+++ b/packages/design/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -78,7 +74,7 @@
"@rc-component/trigger": "^2.2.0",
"@types/react-mentions": "^4.1.13",
"@univerjs/icons": "^0.1.56",
- "rc-dialog": "^9.5.0",
+ "rc-dialog": "^9.5.1",
"rc-dropdown": "^4.2.0",
"rc-input": "^1.5.1",
"rc-input-number": "^9.1.0",
@@ -95,7 +91,7 @@
"react-transition-group": "^4.4.5"
},
"devDependencies": {
- "@testing-library/react": "^14.2.2",
+ "@testing-library/react": "^16.0.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-grid-layout": "^1.3.5",
@@ -109,5 +105,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/docs-drawing-ui/package.json b/packages/docs-drawing-ui/package.json
index 857383882f..279f7cf3aa 100644
--- a/packages/docs-drawing-ui/package.json
+++ b/packages/docs-drawing-ui/package.json
@@ -44,8 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -54,10 +54,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -103,5 +99,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/docs-drawing/package.json b/packages/docs-drawing/package.json
index 94f74e3f25..3369ace9af 100644
--- a/packages/docs-drawing/package.json
+++ b/packages/docs-drawing/package.json
@@ -75,5 +75,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/docs-ui/package.json b/packages/docs-ui/package.json
index 6027d95dd1..dc5bc3ae2c 100644
--- a/packages/docs-ui/package.json
+++ b/packages/docs-ui/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -92,5 +88,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/docs/package.json b/packages/docs/package.json
index 2033ac2efc..d57a19f4e0 100644
--- a/packages/docs/package.json
+++ b/packages/docs/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -77,5 +73,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/drawing-ui/package.json b/packages/drawing-ui/package.json
index 2c5db45d74..b8c633e635 100644
--- a/packages/drawing-ui/package.json
+++ b/packages/drawing-ui/package.json
@@ -44,8 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -89,5 +89,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/drawing/package.json b/packages/drawing/package.json
index a1a7b70257..38841e3968 100644
--- a/packages/drawing/package.json
+++ b/packages/drawing/package.json
@@ -49,10 +49,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -81,5 +77,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/engine-formula/package.json b/packages/engine-formula/package.json
index d40cd9489e..5bb0c91bdc 100644
--- a/packages/engine-formula/package.json
+++ b/packages/engine-formula/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -82,5 +78,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/engine-numfmt/package.json b/packages/engine-numfmt/package.json
index a1e7b08d0c..57d055b30c 100644
--- a/packages/engine-numfmt/package.json
+++ b/packages/engine-numfmt/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -71,5 +67,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/engine-render/package.json b/packages/engine-render/package.json
index 18defded82..e0b1fab9f6 100644
--- a/packages/engine-render/package.json
+++ b/packages/engine-render/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -84,5 +80,18 @@
},
"browser": {
"fs": false
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/facade/package.json b/packages/facade/package.json
index ede99cef97..76ee85ca37 100644
--- a/packages/facade/package.json
+++ b/packages/facade/package.json
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -95,5 +91,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/find-replace/package.json b/packages/find-replace/package.json
index b5eef59398..0a5bffc5ac 100644
--- a/packages/find-replace/package.json
+++ b/packages/find-replace/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -94,5 +90,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/network/package.json b/packages/network/package.json
index 54f36b8a1a..7226643501 100644
--- a/packages/network/package.json
+++ b/packages/network/package.json
@@ -50,10 +50,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -74,5 +70,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/rpc/package.json b/packages/rpc/package.json
index bc505530b3..29b2819acc 100644
--- a/packages/rpc/package.json
+++ b/packages/rpc/package.json
@@ -50,10 +50,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"lint:types": "tsc --noEmit",
"build": "tsc && vite build"
@@ -71,5 +67,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/sheets-conditional-formatting-ui/package.json b/packages/sheets-conditional-formatting-ui/package.json
index 398432bf6c..e73ac3ae7f 100644
--- a/packages/sheets-conditional-formatting-ui/package.json
+++ b/packages/sheets-conditional-formatting-ui/package.json
@@ -12,7 +12,7 @@
"homepage": "https://univer.ai",
"repository": {
"type": "git",
- "url": "https://github.com/dream-num/univer.git"
+ "url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -112,5 +108,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-conditional-formatting/package.json b/packages/sheets-conditional-formatting/package.json
index b7f0267032..1674bd517d 100644
--- a/packages/sheets-conditional-formatting/package.json
+++ b/packages/sheets-conditional-formatting/package.json
@@ -12,7 +12,7 @@
"homepage": "https://univer.ai",
"repository": {
"type": "git",
- "url": "https://github.com/dream-num/univer.git"
+ "url": "https://github.com/dream-num/univer"
},
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
@@ -51,10 +51,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"prepare": "node ./scripts/build-icons",
"test": "vitest run",
@@ -89,5 +85,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/sheets-data-validation/package.json b/packages/sheets-data-validation/package.json
index 75203e8be6..35643ff926 100644
--- a/packages/sheets-data-validation/package.json
+++ b/packages/sheets-data-validation/package.json
@@ -26,7 +26,7 @@
"./locale/*": "./src/locale/*.ts"
},
"main": "./lib/cjs/index.js",
- "module": "./lib/esm/index.js",
+ "module": "./lib/es/index.js",
"types": "./lib/types/index.d.ts",
"publishConfig": {
"access": "public",
@@ -43,8 +43,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -100,5 +100,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-drawing-ui/package.json b/packages/sheets-drawing-ui/package.json
index a8b9ef00fd..e7eec52fc8 100644
--- a/packages/sheets-drawing-ui/package.json
+++ b/packages/sheets-drawing-ui/package.json
@@ -44,8 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -54,10 +54,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -102,5 +98,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-drawing/package.json b/packages/sheets-drawing/package.json
index 5c6e2cd625..286145bbcd 100644
--- a/packages/sheets-drawing/package.json
+++ b/packages/sheets-drawing/package.json
@@ -71,5 +71,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/sheets-filter-ui/package.json b/packages/sheets-filter-ui/package.json
index 2937a9a9c5..414bd403ab 100644
--- a/packages/sheets-filter-ui/package.json
+++ b/packages/sheets-filter-ui/package.json
@@ -44,8 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -96,5 +96,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-filter/package.json b/packages/sheets-filter/package.json
index 245d901f71..a78b177e52 100644
--- a/packages/sheets-filter/package.json
+++ b/packages/sheets-filter/package.json
@@ -72,5 +72,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/sheets-find-replace/package.json b/packages/sheets-find-replace/package.json
index aaffd572ac..45484b7454 100644
--- a/packages/sheets-find-replace/package.json
+++ b/packages/sheets-find-replace/package.json
@@ -43,8 +43,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -53,10 +53,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -89,5 +85,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-formula/package.json b/packages/sheets-formula/package.json
index f80af42661..46bdddea87 100644
--- a/packages/sheets-formula/package.json
+++ b/packages/sheets-formula/package.json
@@ -16,6 +16,9 @@
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
+ "keywords": [
+ "univer"
+ ],
"sideEffects": [
"**/*.css"
],
@@ -42,8 +45,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -52,10 +55,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -99,5 +98,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-hyper-link-ui/package.json b/packages/sheets-hyper-link-ui/package.json
index 7e2ced3e31..985837b321 100644
--- a/packages/sheets-hyper-link-ui/package.json
+++ b/packages/sheets-hyper-link-ui/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -97,5 +97,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-hyper-link/package.json b/packages/sheets-hyper-link/package.json
index 9e8bd5ef57..ee3e18cef9 100644
--- a/packages/sheets-hyper-link/package.json
+++ b/packages/sheets-hyper-link/package.json
@@ -72,5 +72,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/sheets-numfmt/package.json b/packages/sheets-numfmt/package.json
index c413280924..acc2ccf0fa 100644
--- a/packages/sheets-numfmt/package.json
+++ b/packages/sheets-numfmt/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -100,5 +96,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-thread-comment/package.json b/packages/sheets-thread-comment/package.json
index 4074b33d71..2f9117b7ad 100644
--- a/packages/sheets-thread-comment/package.json
+++ b/packages/sheets-thread-comment/package.json
@@ -41,8 +41,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -91,5 +91,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-ui/package.json b/packages/sheets-ui/package.json
index 6d61dcc86f..ca39f1bbc0 100644
--- a/packages/sheets-ui/package.json
+++ b/packages/sheets-ui/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -105,5 +101,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets-zen-editor/package.json b/packages/sheets-zen-editor/package.json
index eb3cfa5925..2041217d03 100644
--- a/packages/sheets-zen-editor/package.json
+++ b/packages/sheets-zen-editor/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -100,5 +96,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/sheets/package.json b/packages/sheets/package.json
index 74ab24cb8d..6c55e2fb69 100644
--- a/packages/sheets/package.json
+++ b/packages/sheets/package.json
@@ -43,8 +43,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -53,10 +53,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -87,5 +83,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/slides-ui/package.json b/packages/slides-ui/package.json
index 9954663d45..9a21d7c900 100644
--- a/packages/slides-ui/package.json
+++ b/packages/slides-ui/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -92,5 +88,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/slides/package.json b/packages/slides/package.json
index 787102e3e1..75104e57e6 100644
--- a/packages/slides/package.json
+++ b/packages/slides/package.json
@@ -17,6 +17,9 @@
"bugs": {
"url": "https://github.com/dream-num/univer/issues"
},
+ "keywords": [
+ "univer"
+ ],
"exports": {
".": "./src/index.ts",
"./*": "./src/*",
@@ -40,8 +43,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -50,10 +53,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -76,5 +75,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/thread-comment-ui/package.json b/packages/thread-comment-ui/package.json
index d112dc8ab9..3958d18a59 100644
--- a/packages/thread-comment-ui/package.json
+++ b/packages/thread-comment-ui/package.json
@@ -44,8 +44,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -91,5 +91,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/thread-comment/package.json b/packages/thread-comment/package.json
index db87a8b60a..a18ff18264 100644
--- a/packages/thread-comment/package.json
+++ b/packages/thread-comment/package.json
@@ -77,5 +77,18 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*"
}
}
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 782ed5474d..1f92e3d5fc 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -81,14 +77,14 @@
"dependencies": {
"@univerjs/icons": "^0.1.56",
"localforage": "^1.10.0",
- "rc-notification": "^5.5.0",
- "rc-util": "^5.39.3"
+ "rc-notification": "^5.6.0",
+ "rc-util": "^5.41.0"
},
"optionalDependencies": {
"vue": ">=3.0.0"
},
"devDependencies": {
- "@testing-library/react": "^14.2.2",
+ "@testing-library/react": "^16.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
@@ -108,5 +104,19 @@
"vite": "^5.2.12",
"vitest": "^1.6.0",
"vue": "^3.4.27"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/packages/umd/package.json b/packages/umd/package.json
index c2f71443ae..48bea148f8 100644
--- a/packages/umd/package.json
+++ b/packages/umd/package.json
@@ -33,10 +33,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"build:umd": "node ./scripts/index.mjs"
},
diff --git a/packages/uniscript/package.json b/packages/uniscript/package.json
index dac38fcd50..bff1945ae8 100644
--- a/packages/uniscript/package.json
+++ b/packages/uniscript/package.json
@@ -46,8 +46,8 @@
"require": "./lib/cjs/*",
"types": "./lib/types/index.d.ts"
},
- "./locale/*": "./lib/locale/*.json",
- "./lib/*": "./lib/*"
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
},
"directories": {
@@ -56,10 +56,6 @@
"files": [
"lib"
],
- "engines": {
- "node": ">=16.0.0",
- "npm": ">=8.0.0"
- },
"scripts": {
"test": "vitest run",
"test:watch": "vitest",
@@ -98,5 +94,19 @@
"typescript": "^5.4.5",
"vite": "^5.2.12",
"vitest": "^1.6.0"
+ },
+ "univerSpace": {
+ ".": {
+ "import": "./lib/es/index.js",
+ "require": "./lib/cjs/index.js",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./*": {
+ "import": "./lib/es/*",
+ "require": "./lib/cjs/*",
+ "types": "./lib/types/index.d.ts"
+ },
+ "./lib/*": "./lib/*",
+ "./locale/*": "./lib/locale/*.json"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 17d5a41dad..aa529497d1 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -133,10 +133,10 @@ importers:
version: 1.5.0([email protected])
'@storybook/addon-essentials':
specifier: 8.1.5
'@storybook/addon-interactions':
specifier: 8.1.5
'@storybook/addon-links':
specifier: 8.1.5
version: 8.1.5([email protected])
@@ -148,16 +148,16 @@ importers:
'@storybook/blocks':
specifier: 8.1.5
'@storybook/icons':
specifier: ^1.2.9
'@storybook/react':
specifier: 8.1.5
'@storybook/react-webpack5':
specifier: 8.1.5
'@storybook/types':
specifier: 8.1.5
version: 8.1.5
@@ -504,8 +504,8 @@ importers:
specifier: ^0.1.56
rc-dialog:
- specifier: ^9.5.0
+ specifier: ^9.5.1
rc-dropdown:
specifier: ^4.2.0
@@ -550,8 +550,8 @@ importers:
devDependencies:
'@testing-library/react':
- specifier: ^14.2.2
+ specifier: ^16.0.0
'@types/react':
specifier: ^18.3.3
version: 18.3.3
@@ -2123,19 +2123,19 @@ importers:
specifier: ^1.10.0
version: 1.10.0
rc-notification:
- specifier: ^5.5.0
+ specifier: ^5.6.0
rc-util:
- specifier: ^5.39.3
+ specifier: ^5.41.0
optionalDependencies:
vue:
specifier: '>=3.0.0'
version: 3.4.24([email protected])
devDependencies:
'@testing-library/react':
- specifier: ^14.2.2
+ specifier: ^16.0.0
'@testing-library/react-hooks':
specifier: ^8.0.1
@@ -4664,12 +4664,20 @@ packages:
react-test-renderer:
optional: true
- '@testing-library/[email protected]':
- resolution: {integrity: sha512-SOUuM2ysCvjUWBXTNfQ/ztmnKDmqaiPV3SvoIuyxMUca45rbSWWAT/qB8CUs/JQ/ux/8JFs9DNdFQ3f6jH3crA==}
- engines: {node: '>=14'}
+ '@testing-library/[email protected]':
+ resolution: {integrity: sha512-guuxUKRWQ+FgNX0h0NS0FIq3Q3uLtWVpBzcLOggmfMoUpgBnzBzvLLd4fbm6yS8ydJd94cIfY4yP9qUQjM2KwQ==}
+ engines: {node: '>=18'}
peerDependencies:
+ '@testing-library/dom': ^10.0.0
+ '@types/react': ^18.0.0
+ '@types/react-dom': ^18.0.0
react: ^18.0.0
react-dom: ^18.0.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
'@testing-library/[email protected]':
resolution: {integrity: sha512-YAh82Wh4TIrxYLmfGcixwD18oIjyC1pFQC2Y01F2lzV2HTMiYrI0nze0FD0ocB//CKS/7jIUgae+adPqxK5yCQ==}
@@ -9094,8 +9102,8 @@ packages:
resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==}
engines: {node: '>= 0.8'}
- resolution: {integrity: sha512-pe/PsTkhRLQPozbq0gPSMe+BPuMUrG92f7TL+Rm8WOTXfgaZzYumqJUoP+LB6pnX0GEa3JAGrGusuibn43cMUA==}
+ resolution: {integrity: sha512-vDcY1ww0STZKs4twKjPhcvyMY1fCjfscm+ihtpUqumdQ6YGGaPdmpurhRAnqAcw2SuZgzengj18j9JrQxoRQoQ==}
peerDependencies:
react: '>=16.9.0'
react-dom: '>=16.9.0'
@@ -9130,8 +9138,8 @@ packages:
react: '>=16.9.0'
react-dom: '>=16.9.0'
- resolution: {integrity: sha512-iLOOlWaHvVJQGrPa6VorHPE9oeHUN5VizshZhTTecpX9wIfb7gdlcLr34YgKGuINbmLcG+41KO+PImdgf3R6Ew==}
+ resolution: {integrity: sha512-TGQW5T7waOxLwgJG7fXcw8l7AQiFOjaZ7ISF5PrU526nunHRNcTMuzKihQHaF4E/h/KfOCDk3Mv8eqzbu2e28w==}
engines: {node: '>=8.x'}
peerDependencies:
react: '>=16.9.0'
@@ -9194,12 +9202,6 @@ packages:
react: '>=16.9.0'
react-dom: '>=16.9.0'
- resolution: {integrity: sha512-j9wOELkLQ8gC/NkUg3qg9mHZcJf+5mYYv40JrDHqnaf8VSycji4pCf7kJ5fdTXQPDIF0vr5zpb/T2HdrMs9rWA==}
- peerDependencies:
- react: '>=16.9.0'
- react-dom: '>=16.9.0'
-
resolution: {integrity: sha512-xtlCim9RpmVv0Ar2Nnc3WfJCxjQkTf3xHPWoFdjp1fSs2NirQwqiQrfqdU9HUe0kdfb168M/T8Dq0IaX50xeKg==}
peerDependencies:
@@ -12881,9 +12883,9 @@ snapshots:
memoizerific: 1.11.3
ts-dedent: 2.2.0
dependencies:
dequal: 2.0.3
lodash: 4.17.21
ts-dedent: 2.2.0
@@ -12896,11 +12898,11 @@ snapshots:
- react-dom
- supports-color
dependencies:
'@babel/core': 7.24.5
'@mdx-js/react': 3.0.1(@types/[email protected])([email protected])
'@storybook/client-logger': 8.1.5
'@storybook/csf-plugin': 8.1.5
@@ -12924,18 +12926,18 @@ snapshots:
- prettier
- supports-color
dependencies:
'@storybook/addon-actions': 8.1.5
'@storybook/addon-backgrounds': 8.1.5
- '@storybook/addon-docs': 8.1.5(@types/[email protected])([email protected])
+ '@storybook/addon-docs': 8.1.5(@types/[email protected])([email protected])
'@storybook/addon-highlight': 8.1.5
'@storybook/addon-measure': 8.1.5
'@storybook/addon-outline': 8.1.5
'@storybook/addon-toolbars': 8.1.5
'@storybook/addon-viewport': 8.1.5
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/manager-api': 8.1.5([email protected]([email protected]))([email protected])
'@storybook/node-logger': 8.1.5
'@storybook/preview-api': 8.1.5
@@ -12953,11 +12955,11 @@ snapshots:
dependencies:
'@storybook/global': 5.0.0
dependencies:
'@storybook/global': 5.0.0
'@storybook/instrumenter': 8.1.5
'@storybook/types': 8.1.5
polished: 4.3.1
ts-dedent: 2.2.0
@@ -13005,14 +13007,14 @@ snapshots:
- '@swc/helpers'
- webpack
dependencies:
'@storybook/channels': 8.1.5
'@storybook/client-logger': 8.1.5
'@storybook/core-events': 8.1.5
'@storybook/csf': 0.1.7
- '@storybook/docs-tools': 8.1.5([email protected])
+ '@storybook/docs-tools': 8.1.5([email protected])
'@storybook/global': 5.0.0
'@storybook/manager-api': 8.1.5([email protected]([email protected]))([email protected])
@@ -13041,10 +13043,10 @@ snapshots:
- prettier
- supports-color
dependencies:
'@fal-works/esbuild-plugin-global-externals': 2.1.2
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/manager': 8.1.5
'@storybook/node-logger': 8.1.5
'@types/ejs': 3.1.5
@@ -13062,13 +13064,13 @@ snapshots:
- prettier
- supports-color
dependencies:
'@storybook/channels': 8.1.5
'@storybook/client-logger': 8.1.5
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/core-events': 8.1.5
- '@storybook/core-webpack': 8.1.5([email protected])
+ '@storybook/core-webpack': 8.1.5([email protected])
'@storybook/node-logger': 8.1.5
'@storybook/preview': 8.1.5
'@storybook/preview-api': 8.1.5
@@ -13124,12 +13126,12 @@ snapshots:
'@babel/types': 7.24.5
'@ndelangen/get-tarball': 3.0.9
'@storybook/codemod': 8.1.5
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/core-events': 8.1.5
'@storybook/csf-tools': 8.1.5
'@storybook/node-logger': 8.1.5
- '@storybook/telemetry': 8.1.5([email protected])
+ '@storybook/telemetry': 8.1.5([email protected])
'@storybook/types': 8.1.5
'@types/semver': 7.5.8
'@yarnpkg/fslib': 2.10.3
@@ -13207,6 +13209,43 @@ snapshots:
- '@types/react'
- '@types/react-dom'
+ dependencies:
+ '@storybook/core-events': 8.1.5
+ '@storybook/csf-tools': 8.1.5
+ '@storybook/node-logger': 8.1.5
+ '@storybook/types': 8.1.5
+ '@yarnpkg/fslib': 2.10.3
+ '@yarnpkg/libzip': 2.3.0
+ chalk: 4.1.2
+ cross-spawn: 7.0.3
+ esbuild: 0.20.2
+ esbuild-register: 3.5.0([email protected])
+ execa: 5.1.1
+ file-system-cache: 2.3.0
+ find-cache-dir: 3.3.2
+ find-up: 5.0.0
+ fs-extra: 11.2.0
+ glob: 10.3.12
+ handlebars: 4.7.8
+ lazy-universal-dotenv: 4.0.0
+ node-fetch: 2.7.0
+ picomatch: 2.3.1
+ pkg-dir: 5.0.0
+ prettier-fallback: [email protected]
+ pretty-hrtime: 1.0.3
+ resolve-from: 5.0.0
+ semver: 7.6.2
+ tempy: 3.1.0
+ tiny-invariant: 1.3.3
+ ts-dedent: 2.2.0
+ util: 0.12.5
+ optionalDependencies:
+ prettier: 3.2.5
+ transitivePeerDependencies:
+ - encoding
+ - supports-color
+
dependencies:
'@storybook/core-events': 8.1.5
@@ -13249,15 +13288,15 @@ snapshots:
'@storybook/csf': 0.1.7
ts-dedent: 2.2.0
dependencies:
'@aw-web-design/x-default-browser': 1.4.126
'@babel/core': 7.24.5
'@babel/parser': 7.24.5
'@discoveryjs/json-ext': 0.5.7
- '@storybook/builder-manager': 8.1.5([email protected])
+ '@storybook/builder-manager': 8.1.5([email protected])
'@storybook/channels': 8.1.5
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/core-events': 8.1.5
'@storybook/csf': 0.1.7
'@storybook/csf-tools': 8.1.5
@@ -13267,7 +13306,7 @@ snapshots:
'@storybook/manager-api': 8.1.5([email protected]([email protected]))([email protected])
'@storybook/node-logger': 8.1.5
'@storybook/preview-api': 8.1.5
- '@storybook/telemetry': 8.1.5([email protected])
+ '@storybook/telemetry': 8.1.5([email protected])
'@storybook/types': 8.1.5
'@types/detect-port': 1.3.5
'@types/diff': 5.2.1
@@ -13306,9 +13345,9 @@ snapshots:
- supports-color
- utf-8-validate
dependencies:
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/node-logger': 8.1.5
'@storybook/types': 8.1.5
'@types/node': 18.19.28
@@ -13345,6 +13384,21 @@ snapshots:
'@storybook/[email protected]': {}
+ dependencies:
+ '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-events': 8.1.5
+ '@storybook/preview-api': 8.1.5
+ '@storybook/types': 8.1.5
+ '@types/doctrine': 0.0.3
+ assert: 2.1.0
+ doctrine: 3.0.0
+ lodash: 4.17.21
+ transitivePeerDependencies:
+ - encoding
+ - prettier
+ - supports-color
+
dependencies:
'@storybook/core-common': 8.1.5([email protected])
@@ -13404,12 +13458,12 @@ snapshots:
'@storybook/[email protected]': {}
dependencies:
- '@storybook/core-webpack': 8.1.5([email protected])
- '@storybook/docs-tools': 8.1.5([email protected])
+ '@storybook/core-webpack': 8.1.5([email protected])
+ '@storybook/docs-tools': 8.1.5([email protected])
'@storybook/node-logger': 8.1.5
'@storybook/react-docgen-typescript-plugin': 1.0.6--canary.9.0c3f3b7.0([email protected])([email protected](@swc/[email protected])([email protected]))
'@types/node': 18.19.28
'@types/semver': 7.5.8
@@ -13472,11 +13526,11 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
dependencies:
- '@storybook/builder-webpack5': 8.1.5(@swc/[email protected])([email protected])([email protected])([email protected])
+ '@storybook/builder-webpack5': 8.1.5(@swc/[email protected])([email protected])([email protected])([email protected])
'@storybook/types': 8.1.5
'@types/node': 18.19.28
react: 18.3.1
@@ -13493,6 +13547,38 @@ snapshots:
- uglify-js
- webpack-cli
+ dependencies:
+ '@storybook/client-logger': 8.1.5
+ '@storybook/docs-tools': 8.1.5([email protected])
+ '@storybook/global': 5.0.0
+ '@storybook/preview-api': 8.1.5
+ '@storybook/react-dom-shim': 8.1.5([email protected]([email protected]))([email protected])
+ '@storybook/types': 8.1.5
+ '@types/escodegen': 0.0.6
+ '@types/estree': 0.0.51
+ '@types/node': 18.19.28
+ acorn: 7.4.1
+ acorn-jsx: 5.3.2([email protected])
+ acorn-walk: 7.2.0
+ escodegen: 2.1.0
+ html-tags: 3.3.1
+ lodash: 4.17.21
+ prop-types: 15.8.1
+ react: 18.3.1
+ react-dom: 18.3.1([email protected])
+ react-element-to-jsx-string: 15.0.0([email protected]([email protected]))([email protected])
+ semver: 7.6.2
+ ts-dedent: 2.2.0
+ type-fest: 2.19.0
+ util-deprecate: 1.0.2
+ optionalDependencies:
+ typescript: 5.4.5
+ transitivePeerDependencies:
+ - encoding
+ - prettier
+ - supports-color
+
dependencies:
'@storybook/client-logger': 8.1.5
@@ -13531,10 +13617,10 @@ snapshots:
memoizerific: 1.11.3
qs: 6.12.0
dependencies:
'@storybook/client-logger': 8.1.5
- '@storybook/core-common': 8.1.5([email protected])
+ '@storybook/core-common': 8.1.5([email protected])
'@storybook/csf-tools': 8.1.5
chalk: 4.1.2
detect-package-manager: 2.0.1
@@ -13546,14 +13632,14 @@ snapshots:
- prettier
- supports-color
dependencies:
'@storybook/client-logger': 8.1.5
'@storybook/core-events': 8.1.5
'@storybook/instrumenter': 8.1.5
'@storybook/preview-api': 8.1.5
'@testing-library/dom': 9.3.4
'@testing-library/user-event': 14.5.2(@testing-library/[email protected])
'@vitest/expect': 1.3.1
'@vitest/spy': 1.6.0
@@ -13695,7 +13781,7 @@ snapshots:
lz-string: 1.5.0
pretty-format: 27.5.1
dependencies:
'@adobe/css-tools': 4.3.3
'@babel/runtime': 7.24.1
@@ -13706,7 +13792,7 @@ snapshots:
lodash: 4.17.21
redent: 3.0.0
optionalDependencies:
dependencies:
@@ -13717,13 +13803,15 @@ snapshots:
'@types/react': 18.3.3
react-dom: 18.3.1([email protected])
dependencies:
'@babel/runtime': 7.24.1
'@testing-library/dom': 9.3.4
- '@types/react-dom': 18.3.0
react: 18.3.1
react-dom: 18.3.1([email protected])
+ optionalDependencies:
+ '@types/react': 18.3.3
+ '@types/react-dom': 18.3.0
'@testing-library/[email protected](@testing-library/[email protected])':
dependencies:
@@ -18625,7 +18713,7 @@ snapshots:
iconv-lite: 0.4.24
unpipe: 1.0.0
dependencies:
'@babel/runtime': 7.24.1
'@rc-component/portal': 1.1.2([email protected]([email protected]))([email protected])
@@ -18681,7 +18769,7 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
dependencies:
'@babel/runtime': 7.24.1
classnames: 2.5.1
@@ -18760,13 +18848,6 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
- dependencies:
- '@babel/runtime': 7.24.1
- react: 18.3.1
- react-dom: 18.3.1([email protected])
- react-is: 18.2.0
-
dependencies:
'@babel/runtime': 7.24.1