Skip to content

[break]Resolve incorrect data structure in dump#542

Merged
star-e merged 17 commits into
cocos:mainfrom
qiuguohua:main_fix_dump
May 15, 2026
Merged

[break]Resolve incorrect data structure in dump#542
star-e merged 17 commits into
cocos:mainfrom
qiuguohua:main_fix_dump

Conversation

@qiuguohua
Copy link
Copy Markdown
Contributor

No description provided.

@qiuguohua qiuguohua changed the title Main fix dump Resolve incorrect data structure in dump May 8, 2026
@qiuguohua qiuguohua requested a review from knoxHuang May 8, 2026 08:17
qiuguohua and others added 12 commits May 14, 2026 10:50
* refactor: use lodash/get and lodash/set directly instead of reimplementation

- Replace hand-written get/set in dump/utils.ts with lodash/get and lodash/set
- Import lodash sub-paths directly at call sites, bypassing scene-bundle's lodash stub
- Fix removeComponent callers to pass Component objects instead of uuid strings

* fix: pass Component object instead of uuid string to removeComponent

removeComponent(component: Component) expects a Component object,
but three callers were passing uuid strings. Fix by passing the
Component object directly where available, and querying it first
where only a uuid is available.

* refactor: move scene i18n to main process with dynamic registration

- Move i18n files from scene-process/i18n/ to scene/i18n/
- Load scene i18n via registerLanguagePatch in main process init
- Remove synchronous require-based loading from worker process
- Fix: scene i18n was registered in worker process but translateDumpI18n
  calls main process via RPC, so translations were never reachable

* fix: default project type should be 3D, not 2D
* Add path property to dump data for inspector setProperty

- Make IProperty.path required, filled during encode instead of by consumers
- Add path to INode (node tree path) and IScene (hardcoded '/')
- Fill property-level path in encodeNode (top-level + __comps__) and
  encodeScene (top-level + _globals) for decodePatch compatibility
- Bump cocos-cli-types to 0.0.1-alpha.24.4

* Update dts snapshot to reflect optimized prefab interface

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Add unit tests for dump path property filling

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@qiuguohua qiuguohua changed the title Resolve incorrect data structure in dump [break]Resolve incorrect data structure in dump May 14, 2026
@qiuguohua qiuguohua requested review from bofeng-song and star-e May 14, 2026 07:43
@qiuguohua qiuguohua closed this May 14, 2026
@qiuguohua qiuguohua reopened this May 14, 2026
// 节点相关的接口
Node: NodeProxy,
// 组件相关的接口
Component: ComponentProxy,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么只有node,component有别名?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

其他接口涉及的比较少。后面优化在统一改一版

Animation,
AudioSource,
Label,
MeshRenderer,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些是移动到了哪个文件?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这些是没用到的,移除了。

@star-e star-e merged commit 87ea432 into cocos:main May 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants