diff --git a/PUB.md b/PUB.md index f422dbab..1e31575e 100644 --- a/PUB.md +++ b/PUB.md @@ -6,6 +6,8 @@ ### changeset 发布 +跟目录处先执行构建 `pnpm run build` + 使用 changeset 分以下几步: 1. 当代码变更后,执行 `pnpm changeset` ,会让你输入选择变更的包和输入变更日志. diff --git a/package.json b/package.json index cbb73078..ca86cec5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "helux", - "version": "4.3.1", + "version": "4.3.5", "description": "A reactive atomic state engine for React like.", "keywords": [], "author": { diff --git a/packages/helux-core/src/consts/user.ts b/packages/helux-core/src/consts/user.ts index d2fd06d9..0cd34bd2 100644 --- a/packages/helux-core/src/consts/user.ts +++ b/packages/helux-core/src/consts/user.ts @@ -1,6 +1,6 @@ import { VER as limuVer } from 'limu'; -export const VER = '4.3.2'; +export const VER = '4.3.5'; export const LIMU_VER = limuVer; diff --git a/packages/helux-core/src/helpers/state.ts b/packages/helux-core/src/helpers/state.ts index aae021d9..736e6782 100644 --- a/packages/helux-core/src/helpers/state.ts +++ b/packages/helux-core/src/helpers/state.ts @@ -81,12 +81,16 @@ export function recordMod(sharedState: Dict, options: ParsedOptions) { const existedShared = rootState[usefulName]; const existedInternal = getInternal(existedShared); if (moduleName && existedInternal && existedInternal.loc !== options.loc) { - const locInfo = `\nloc1:${existedInternal.loc} \nloc2:${options.loc}`; - return warn( - `only-dev-mode tip: moduleName ${moduleName} duplicate! ` - + 'this does not effect helux but the duplicated module will be ignored by devtool' - + locInfo, - ); + // 非 loading 模块才提示 + if (!moduleName.endsWith('@Loading')) { + const locInfo = `\nloc1:${existedInternal.loc} \nloc2:${options.loc}`; + warn( + `only-dev-mode tip: moduleName ${moduleName} duplicate! ` + + 'this does not effect helux but the duplicated module will be ignored by devtool' + + locInfo, + ); + } + return; } // may hot replace for dev mode or add new mod rootState[usefulName] = sharedState; diff --git a/packages/helux-core/src/types/api.d.ts b/packages/helux-core/src/types/api.d.ts index a8225425..9206802d 100644 --- a/packages/helux-core/src/types/api.d.ts +++ b/packages/helux-core/src/types/api.d.ts @@ -68,7 +68,7 @@ import type { } from './base'; export declare const cst: { - VER: '4.2.7'; + VER: '4.3.5'; LIMU_VER: string; EVENT_NAME: { /** 共享状态创建时的事件 */ diff --git a/packages/helux-plugin-devtool/package.json b/packages/helux-plugin-devtool/package.json index a055c2f0..421fe6e5 100644 --- a/packages/helux-plugin-devtool/package.json +++ b/packages/helux-plugin-devtool/package.json @@ -34,14 +34,14 @@ "helux": "^4.3.5", "redux": "^4.2.1" }, + "devDependencies": { + "terser": "^5.29.1" + }, "bundleDependencies": false, "publishConfig": { "access": "public", "main": "dist/index.js", "registry": "https://registry.npmjs.org/" }, - "deprecated": false, - "devDependencies": { - "terser": "^5.29.1" - } + "deprecated": false } diff --git a/packages/helux-plugin-devtool/src/index.ts b/packages/helux-plugin-devtool/src/index.ts index f1e74268..5970fd65 100644 --- a/packages/helux-plugin-devtool/src/index.ts +++ b/packages/helux-plugin-devtool/src/index.ts @@ -40,10 +40,7 @@ function tryInjectReduxDevTool() { if (!Object.keys(redecers).length) return; const g = getWindow(); // global this - reduxStore = createStore( - combineReducers(redecers), - g.__REDUX_DEVTOOLS_EXTENSION__ && g.__REDUX_DEVTOOLS_EXTENSION__(), - ); + reduxStore = createStore(combineReducers(redecers), g.__REDUX_DEVTOOLS_EXTENSION__ && g.__REDUX_DEVTOOLS_EXTENSION__()); injected = true; reduxStore.subscribe(function () {