as-test 1.1.5 → 1.1.6
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 +3 -1
- package/package.json +1 -1
- package/transform/lib/coverage.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 2026-05-
|
|
3
|
+
## 2026-05-14 - v1.1.6
|
|
4
4
|
|
|
5
5
|
- fix: coverage `mode` and `dependencies` filtering now correctly handles AssemblyScript-normalized `~lib/<pkg>/...` paths, which are the actual runtime paths emitted for `node_modules` imports.
|
|
6
6
|
- fix: `ENTRY_FILE` injected by the transform now uses the full relative path instead of the basename, preventing snapshot key collisions between specs with the same filename in different directories; snapshot lookup normalizes the file prefix to maintain backward compatibility with existing `.snap` files.
|
|
7
7
|
- fix: transform visitor and coverage instrumentation now resolve `NodeKind` values at runtime instead of relying on compile-time const enum inlining, so they remain correct across AssemblyScript versions.
|
|
8
8
|
- fix: add a no-op `TupleType` case to the transform visitor so files using tuple types no longer throw during instrumentation.
|
|
9
|
+
- fix: coverage transform no longer wraps `return this` in constructors, preventing AS231 ("A class with a constructor explicitly returning something else than 'this' must be '@final'").
|
|
10
|
+
- fix: coverage transform preserves expression-body arrows instead of converting them to block bodies, preventing TS1140 ("Type argument expected") on typed arrow parameters such as `[1,2,3].map((x: i32) => x + 1)`.
|
|
9
11
|
|
|
10
12
|
## 2026-05-14 - v1.1.4
|
|
11
13
|
|
package/package.json
CHANGED
|
@@ -298,10 +298,8 @@ export class CoverageTransform extends Visitor {
|
|
|
298
298
|
node.body.statements.unshift(coverStmt);
|
|
299
299
|
}
|
|
300
300
|
else if (node.body instanceof ExpressionStatement) {
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
const bodyBlock = node.body;
|
|
304
|
-
bodyBlock.statements.unshift(coverStmt);
|
|
301
|
+
const exprBody = node.body;
|
|
302
|
+
exprBody.expression = createCoverExpression(point.hash, exprBody.expression, node);
|
|
305
303
|
}
|
|
306
304
|
this.withScope(point, () => {
|
|
307
305
|
this.visit(node.name, node);
|
|
@@ -445,6 +443,8 @@ export class CoverageTransform extends Visitor {
|
|
|
445
443
|
super.visitReturnStatement(node);
|
|
446
444
|
if (!node.value || isBuiltinCallExpression(node.value))
|
|
447
445
|
return;
|
|
446
|
+
if (node.value.kind === NodeKind.This)
|
|
447
|
+
return;
|
|
448
448
|
const path = node.range.source.normalizedPath;
|
|
449
449
|
const point = this.createPoint(path, node.value, "Return");
|
|
450
450
|
const replacer = new RangeTransform(node);
|