Repository navigation
refactor: split system info APIs - #6092
Merged
Merged
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The focused refactor preserves compatibility and keeps source, generated outputs, typings, and dependencies consistent.
0 open findings
What changed in this PR
Refactors system information access into field-specific APIs while preserving legacy compatibility and exports.
Changes:
- Adds cached app/device helpers and dynamic window information access.
- Updates affected components and preserves WeCom detection.
- Regenerates
dist/liboutputs and updates typings.
| File | Description |
|---|---|
package.json |
Raises typings minimum. |
yarn.lock |
Updates typings lock entry. |
packages/common/system.ts |
Adds system information helpers. |
packages/common/version.ts |
Uses app base information. |
packages/common/utils.ts |
Exports helpers and updates detection. |
packages/notify/index.ts |
Uses window status-bar data. |
packages/nav-bar/index.ts |
Uses window status-bar data. |
packages/dropdown-menu/index.ts |
Reads current window height. |
packages/circle/index.ts |
Reads DPR during initialization. |
lib/common/system.js |
CommonJS helper output. |
lib/common/system.d.ts |
CommonJS helper declarations. |
lib/common/version.js |
CommonJS version output. |
lib/common/version.d.ts |
CommonJS version declarations. |
lib/common/utils.js |
CommonJS utility output. |
lib/common/utils.d.ts |
CommonJS utility declarations. |
lib/notify/index.js |
CommonJS notify output. |
lib/nav-bar/index.js |
CommonJS nav-bar output. |
lib/dropdown-menu/index.js |
CommonJS dropdown output. |
lib/circle/index.js |
CommonJS circle output. |
dist/common/system.js |
ES helper output. |
dist/common/system.d.ts |
ES helper declarations. |
dist/common/version.js |
ES version output. |
dist/common/version.d.ts |
ES version declarations. |
dist/common/utils.js |
ES utility output. |
dist/common/utils.d.ts |
ES utility declarations. |
dist/notify/index.js |
ES notify output. |
dist/nav-bar/index.js |
ES nav-bar output. |
dist/dropdown-menu/index.js |
ES dropdown output. |
dist/circle/index.js |
ES circle output. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Components previously read SDK, device and window fields from a permanently cached
wx.getSystemInfoSync()result. Usewx.getAppBaseInfo(),wx.getDeviceInfo()andwx.getWindowInfo()for their respective fields, with independent legacy fallbacks and existing helper exports preserved.An upward DropdownMenu now uses the current window height whenever it positions its popup. Circle reads the pixel ratio only when initializing its 2D canvas. Preserve WeCom detection, raise the typings dependency minimum to
^3.4.4while keeping the locked version at3.12.2, and update the affecteddistandlibfiles.Validation:
git diff --checkpassed.