@feng0531/dsh-code-review 0.33.0 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/import-bindings.mjs +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
# 变更记录
|
|
2
2
|
|
|
3
|
+
## 0.33.1
|
|
4
|
+
|
|
5
|
+
- 修正named import alias同一调用行再次出现别名(重赋值/逃逸/嵌套调用)仍产生绑定提示的误关联;保留字面导航而不证明真实绑定。
|
|
6
|
+
- 314离线测试通过。该patch候选待pack/隔离安装、固定标签四矩阵及原工件发布核验;B3整体未完成。
|
|
7
|
+
|
|
3
8
|
## 0.33.0
|
|
4
9
|
|
|
5
10
|
- 新增Git历史显式oldContextPaths,baseline对象只读捕获及版本/OID/hash身份;不伪造目标正文,不绕过所选变更边界。
|
|
6
11
|
- reader与导入/C#关系消费者按侧分派;schema/service预览显示旧侧元数据,生成/综合/复核提示纳入共享输入预算。
|
|
7
|
-
- 链接/submodule/凭据、重复及重叠路径、root无baseline、字节/槽/快照预算拒绝;真实Git零发送预览、工作树隔离、证据receipt验收。311
|
|
12
|
+
- 链接/submodule/凭据、重复及重叠路径、root无baseline、字节/槽/快照预算拒绝;真实Git零发送预览、工作树隔离、证据receipt验收。311离线测试通过;标签CI37904841884及发布37905053267成功,npm/正式Release原字节87754及SHA512/SHA256核验匹配。
|
|
8
13
|
|
|
9
14
|
## 0.32.0
|
|
10
15
|
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## 当前状态
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
当前正式版本为 0.33.0(轮103固定标签四矩阵及npm/Release原工件字节双hash门禁通过)
|
|
8
8
|
|
|
9
9
|
Git历史预览新增oldContextPaths:最多20个显式仓库相对文件,与contextPaths/自动上下文共享20槽、256KiB每blob及4MiB快照。仅从baseline普通Git blob捕获,不checkout/fetch/读取工作树;根提交无baseline拒绝,working/SVN明确拒绝。旧侧条目携带oldRevision/oldBlobOid/oldHash,仅进入context-old;oldOnly表示仅批准旧侧,不证明target路径不存在。所选变更复用原changed-old,不重复上下文;excluded/blocked变更、链接/submodule、凭据路径不能重新进入。预览显示身份元数据、不显示正文,确认执行才按宿主正常权限发送。主审/综合/复核按侧提示,计入原输入预算,旧证据不能冒充新侧回归证明。
|
|
10
10
|
|
package/package.json
CHANGED
package/src/import-bindings.mjs
CHANGED
|
@@ -11,6 +11,10 @@ export function directImportBindings(lines, importLine, calls, targetText) {
|
|
|
11
11
|
const token = new RegExp('(^|[^A-Za-z0-9_$])' + local.replaceAll('$', '\\$') + '([^A-Za-z0-9_$]|$)');
|
|
12
12
|
const positions = calls.filter(c => c.local === local);
|
|
13
13
|
if (!positions.length) continue;
|
|
14
|
+
// Arguments may mutate/escape the alias on the SAME indexed call line.
|
|
15
|
+
// Keep a hint only when the sole local token is the call callee.
|
|
16
|
+
const occurrences = new RegExp('(^|[^A-Za-z0-9_$])' + local.replaceAll('$', '\\$') + '(?=[^A-Za-z0-9_$]|$)', 'g');
|
|
17
|
+
if (positions.some(call => [...lines[call.line - 1].matchAll(occurrences)].length !== 1)) continue;
|
|
14
18
|
// Every other occurrence may be declaration, parameter, mutation or escape.
|
|
15
19
|
if (lines.some((line, i) => i + 1 !== importLine && !positions.some(c => c.line === i + 1) && token.test(line))) continue;
|
|
16
20
|
const declarations = targets.map((line, i) => ({ line, number: i + 1 })).filter(item => /^\s*export\s+(?:async\s+)?function\s+([A-Za-z_$][A-Za-z0-9_$]*)\s*\(/.exec(item.line)?.[1] === imported);
|