From ac286aebde92fde65f8138ca01fd16669f3d02f5 Mon Sep 17 00:00:00 2001 From: MeetinaXD Date: Sun, 23 Jun 2024 22:53:01 +0800 Subject: [PATCH 1/3] chore: set version to 1.0.0 --- .changeset/plenty-dryers-sell.md | 5 +++++ packages/server/CHANGELOG.md | 12 ++++++++++++ packages/server/package.json | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 .changeset/plenty-dryers-sell.md create mode 100644 packages/server/CHANGELOG.md diff --git a/.changeset/plenty-dryers-sell.md b/.changeset/plenty-dryers-sell.md new file mode 100644 index 00000000..5b6e1a87 --- /dev/null +++ b/.changeset/plenty-dryers-sell.md @@ -0,0 +1,5 @@ +--- +'@alova/server': patch +--- + +chore: set version to 1.0.0 diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md new file mode 100644 index 00000000..e949aea2 --- /dev/null +++ b/packages/server/CHANGELOG.md @@ -0,0 +1,12 @@ +# @alova/server + +## 1.0.0-beta.0 + +### Minor Changes + +- [#401](https://github.com/alovajs/alova/pull/401) [`2235032`](https://github.com/alovajs/alova/commit/2235032ce02ef6c53fd8e3aa81f2968bf933610c) Thanks [@MeetinaXD](https://github.com/MeetinaXD)! - fix: types + +### Patch Changes + +- Updated dependencies [[`9252e07`](https://github.com/alovajs/alova/commit/9252e07639446279c86cb58222793b514341f8a7)]: + - alova@3.0.0-beta.3 diff --git a/packages/server/package.json b/packages/server/package.json index 40e90ac2..3fd53f0c 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@alova/server", - "version": "2.0.0", + "version": "1.0.0-beta.0", "description": "server request strategies for alova.js", "homepage": "https://alova.js.org", "private": true, From 606b9c991606600ac313ab8d249ef607f79e38b1 Mon Sep 17 00:00:00 2001 From: MeetinaXD Date: Mon, 24 Jun 2024 15:33:19 +0800 Subject: [PATCH 2/3] build: cannot build when external is undefined --- .changeset/plenty-apricots-dress.md | 5 +++++ scripts/src/build/rollup.config.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/plenty-apricots-dress.md diff --git a/.changeset/plenty-apricots-dress.md b/.changeset/plenty-apricots-dress.md new file mode 100644 index 00000000..d2714021 --- /dev/null +++ b/.changeset/plenty-apricots-dress.md @@ -0,0 +1,5 @@ +--- +'@alova/scripts': minor +--- + +fix: Cannot build when external is undefined diff --git a/scripts/src/build/rollup.config.js b/scripts/src/build/rollup.config.js index b9876320..277160f5 100644 --- a/scripts/src/build/rollup.config.js +++ b/scripts/src/build/rollup.config.js @@ -37,7 +37,7 @@ module.exports = function createRollupConfig(bundleConfig, version) { const buildName = bundleConfig.packageName; const entryFile = bundleConfig.input; const outputPattern = bundleConfig.output; - const globalPackages = bundleConfig.external; + const globalPackages = bundleConfig.external ?? {}; /** * @param {object} options From a45db024bf7023420f39d27ea528a17b8c4fc0d7 Mon Sep 17 00:00:00 2001 From: MeetinaXD Date: Mon, 24 Jun 2024 15:33:43 +0800 Subject: [PATCH 3/3] fix: cannot import from alova in react --- .changeset/olive-apricots-deny.md | 5 +++ packages/shared/build.json | 61 +++++++++++++++++++++++++++++++ packages/shared/package.json | 5 ++- packages/shared/tsconfig.json | 3 -- 4 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 .changeset/olive-apricots-deny.md create mode 100644 packages/shared/build.json diff --git a/.changeset/olive-apricots-deny.md b/.changeset/olive-apricots-deny.md new file mode 100644 index 00000000..161a1664 --- /dev/null +++ b/.changeset/olive-apricots-deny.md @@ -0,0 +1,5 @@ +--- +'@alova/shared': minor +--- + +fix: cannot import from alova in react diff --git a/packages/shared/build.json b/packages/shared/build.json new file mode 100644 index 00000000..63edf217 --- /dev/null +++ b/packages/shared/build.json @@ -0,0 +1,61 @@ +{ + "assert": { + "packageName": "AlovaSharedAssert", + "input": "src/assert.ts", + "output": "dist/assert.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "function": { + "packageName": "AlovaSharedFunction", + "input": "src/function.ts", + "output": "dist/function.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "vars": { + "packageName": "AlovaSharedVars", + "input": "src/vars.ts", + "output": "dist/vars.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "types": { + "packageName": "AlovaSharedTypes", + "input": "src/types.ts", + "output": "dist/types.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "event": { + "packageName": "AlovaSharedEvent", + "input": "src/event.ts", + "output": "dist/event.{ext}", + "formats": ["esm"], + "external": { + "alova": null + }, + "withDTS": true + }, + "createEventManager": { + "packageName": "AlovaSharedEventManager", + "input": "src/createEventManager.ts", + "output": "dist/createEventManager.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "queueCallback": { + "packageName": "AlovaSharedQueueCallback", + "input": "src/queueCallback.ts", + "output": "dist/queueCallback.{ext}", + "formats": ["esm"], + "withDTS": true + }, + "FrameworkState": { + "packageName": "AlovaSharedFrameworkState", + "input": "src/model/FrameworkState.ts", + "output": "dist/model/FrameworkState.{ext}", + "formats": ["esm"], + "withDTS": true + } +} diff --git a/packages/shared/package.json b/packages/shared/package.json index 138c9f55..a8d0b3c9 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -8,7 +8,7 @@ "test": "jest", "lint": "eslint --ext .ts,.js src/**", "lint:fix": "eslint --ext .ts,.js src/** --fix", - "build": "tsc --project tsconfig.build.json", + "build": "npm run clean && alova-scripts build", "coveralls": "npm run test:coverage && coveralls < coverage/lcov.info", "commit": "git add . && git-cz && git push" }, @@ -35,5 +35,8 @@ ], "devDependencies": { "@alova/scripts": "workspace:*" + }, + "peerDependencies": { + "alova": "^3.0.0-beta.0" } } diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index d3ec65a5..571b001f 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -1,9 +1,6 @@ { "extends": "../../tsconfig.base.json", "compilerOptions": { - "declaration": true, - "declarationDir": "./dist", - "outDir": "./dist", "baseUrl": ".", "paths": { "@/*": ["src/*"],