Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cannot import from alova in react (#404) #408

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/olive-apricots-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alova/shared': minor
---

fix: cannot import from alova in react
5 changes: 5 additions & 0 deletions .changeset/plenty-apricots-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alova/scripts': minor
---

fix: Cannot build when external is undefined
5 changes: 5 additions & 0 deletions .changeset/plenty-dryers-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alova/server': patch
---

chore: set version to 1.0.0
2 changes: 1 addition & 1 deletion packages/server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @alova/server

## 3.0.0-beta.0
## 1.0.0-beta.0

### Minor Changes

Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@alova/server",
"version": "3.0.0-beta.0",
"version": "1.0.0-beta.0",
"description": "server request strategies for alova.js",
"homepage": "https://alova.js.org",
"private": true,
Expand Down
61 changes: 61 additions & 0 deletions packages/shared/build.json
Original file line number Diff line number Diff line change
@@ -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
}
}
5 changes: 4 additions & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -35,5 +35,8 @@
],
"devDependencies": {
"@alova/scripts": "workspace:*"
},
"peerDependencies": {
"alova": "^3.0.0-beta.0"
}
}
3 changes: 0 additions & 3 deletions packages/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"declaration": true,
"declarationDir": "./dist",
"outDir": "./dist",
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
Expand Down
2 changes: 1 addition & 1 deletion scripts/src/build/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading