Files
ts2lua-unreal/CHANGELOG.md
T

27 lines
2.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Changelog
All notable changes to `ts2lua-unreal` will be documented in this file.
The format is based on [Semantic Versioning](https://semver.org/).
## [0.1.0] - 2026-11-29
### Added
- **规范与接入文档**:
- [docs/ts-unlua-spec.md](docs/ts-unlua-spec.md):面向 UE 5.8 + UnLua 2.3.6(Lua 5.4)的 TypeScript 开发与语言约束规范。
- [docs/integration-guide.md](docs/integration-guide.md):UE 项目接入、错误码速查、版本升级与本地 `npm link` 联调手册。
- [docs/ai-rules-template.md](docs/ai-rules-template.md):可直接复用的业务项目规则模板。
- **UnLua TSTL 编译器插件 (`src/plugin/`)**:
- 编译期拦截全部禁用语言特性(`90001`~`90016`)与 `@unlua` 绑定类专项约束(`90101`~`90110`,含继承 `UE.UObject` 漏标 `@unlua` 防呆)。
- `@unlua` 类原生 UnLua 代码生成:`local ClassName = UnLua.Class(...)`、`function ClassName.Method(self, ...)`、`return ClassName`,消除 `____exports` / `__TS__Class` / `__TS__Decorate` 垫片。
- 精确 `super.Method(...)` 映射(UE 原生基类 -> `self.Overridden.Method(self, ...)`;`@unlua` TS 父类 -> `BaseClass.Method(self, ...)`)。
- `@unlua` 默认导入直连优化(`import Base from "./Base"` -> `local Base = require("...")`,不生成 `.default`)。
- 面向大项目(3000~5000+ 文件)的 `WeakMap` 类型与文件名缓存优化。
- **包导出与 CLI**:
- 暴露 `ts2lua-unreal`、`ts2lua-unreal/tsconfig.base.json`、`ts2lua-unreal/types/unlua.d.ts` 及全部文档导出。
- 提供 `ts2lua-unreal build` / `watch` / `info` CLI 命令与 `prepare` 自动构建脚本,支持通过 npm Git Tag 依赖无缝接入任意 UE 项目。
- **基础类型、示例与测试**:
- [types/unlua.d.ts](types/unlua.d.ts):全局 `@unlua` 装饰器及 UnLua/UE 核心基础类型声明。
- `examples/`:还原 `UnrealLuaDemo` 的端到端 TS -> UnLua 示例工程。
- `test/plugin.test.mjs`:16 组正反用例自动化测试套件。