@immense/vue-pom-generator 1.0.108 → 1.0.110

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/RELEASE_NOTES.md CHANGED
@@ -1,52 +1,34 @@
1
- Release window confirmed: only #72 and #71 fall in range (commit log matches). Now let me review the
2
- actual diffs to write accurate notes.
3
-
4
1
  Highlights
5
2
 
6
- - No more HMR regeneration loops on save: unchanged POM renders are now reused, and generated files
7
- are only rewritten when their bytes actually change — keeping mtimes and Vite watcher state intact
8
- (]8;id=md-di7kpu;https://github.com/immense/vue-pom-generator/pull/71#71]8;;]8;;).]8;;
9
- - Faster dev-server saves: a per-dev-server render cache memoizes TypeScript codegen per output
10
- file, keyed on the serialized render structure (]8;id=md-di7kpu;https://github.com/immense/vue-pom-generator/pull/71#71]8;;]8;;).]8;;
11
- - Correct v-for alias shadowing: slot-scope callback detection now uses Vue's parsed v-for bindings
12
- (value/key/index, including destructuring, defaults, and rest) instead of re-parsing alias
13
- expressions (]8;id=md-d87z0v;https://github.com/immense/vue-pom-generator/pull/72#72]8;;]8;;).]8;;
14
- - Clean lint is enforced: the release workflow now fails on any lint warning (--max-warnings 0)
15
- (]8;id=md-d87z0v;https://github.com/immense/vue-pom-generator/pull/72#72]8;;]8;;).]8;;
3
+ - Added a CI duplication gate ("deslop") that fails builds when duplicated code is reintroduced.
4
+ - Extracted shared Babel AST guard logic into a new compiler/babel-guards.ts module, removing
5
+ repeated inline guards across the compiler.
6
+ - Deduplicated the test suite with new shared helpers — net ~250 lines removed (596 insertions, 850
7
+ deletions).
16
8
 
17
9
  Changes
18
10
 
19
- Incremental generation (]8;id=md-di7kpu;https://github.com/immense/vue-pom-generator/pull/71#71]8;;]8;;)]8;;
11
+ CI / tooling
20
12
 
21
- - Add TypeScriptRenderCache and renderStructuredSourceFile in typescript-codegen.ts: renders are
22
- memoized per output path, with writer closures resolved to their emitted text before comparison so
23
- changed selectors, routes, and child methods still invalidate the cache.
24
- - Refactor class-generation/index.ts to render through cached structured structures; the dev plugin
25
- owns one cache per dev server and passes it into generateFiles.
26
- - Skip writing generated files when content is unchanged, repairing removed or externally modified
27
- outputs.
28
- - Render the POM manifest module via the structured, cache-aware path (manifest-generator.ts).
29
- - Add regression coverage (tests/incremental-generation.test.ts, tests/generated-outputs.test.ts)
30
- plus a repro script and write-up (scripts/repro-hmr-regeneration.mjs,
31
- docs/hmr-regeneration-reproduction.md).
13
+ - New .github/workflows/deslop.yml with a .deslop.toml config enforcing the duplication gate (#76).
14
+ - Added deslop artifacts to .gitignore.
32
15
 
33
- Vue template semantics & lint (]8;id=md-d87z0v;https://github.com/immense/vue-pom-generator/pull/72#72]8;;]8;;)]8;;
16
+ Refactoring
34
17
 
35
- - Track v-for alias shadowing via Vue's forParseResult bindings; binding-pattern parsing now
36
- matches Vue's function-parameter semantics for object/array destructuring.
37
- - Update test fixtures (MyList, MyRadioGroup) to use canonical Vue loop bindings and satisfy lint
38
- rules.
39
- - Add a Lint step (--max-warnings 0) to the release workflow.
18
+ - New compiler/babel-guards.ts centralizes Babel node-guard predicates; transform.ts,
19
+ routing/to-directive.ts, and utils.ts now consume them, substantially shrinking utils.ts.
20
+ - New shared test helpers: tests/helpers/ast-queries.ts and tests/helpers/component-deps.ts.
21
+ - Slimmed tests/transform.test.ts, tests/utils-coverage.test.ts,
22
+ tests/class-generation-coverage.test.ts, tests/generated-tsc.test.ts, and
23
+ tests/wrapper-contract.test.ts to use the shared helpers.
40
24
 
41
25
  Pull Requests Included
42
26
 
43
- - ]8;id=md-d87z0v;https://github.com/immense/vue-pom-generator/pull/72#72]8;;]8;; — fix: use Vue loop bindings and enforce clean lint]8;;
44
- - ]8;id=md-di7kpu;https://github.com/immense/vue-pom-generator/pull/71#71]8;;]8;; — fix: avoid rebuilding unchanged POMs on save]8;;
27
+ - ]8;id=md-c49k8z;https://github.com/immense/vue-pom-generator/pull/76#76]8;;]8;; — ci: Deslop duplication gate + test-suite deslop wave 1 (@dkattan)]8;;
45
28
 
46
29
  Testing
47
30
 
48
- - Added tests/incremental-generation.test.ts covering cache reuse and invalidation; extended
49
- tests/utils.test.ts with v-for alias shadowing cases (simple, nested/defaulted/renamed/rest object
50
- patterns, array patterns with of) and updated tests/generated-outputs.test.ts.
51
- - Release CI now also runs the lint suite with warnings disallowed.
31
+ - No new runtime features; existing transform, utils-coverage, class-generation, generated-tsc, and
32
+ wrapper-contract suites were consolidated onto the new helpers and pass as part of the release
33
+ validation.
52
34
 
@@ -0,0 +1,85 @@
1
+ export declare const isNodeType: (node: object | null, type: string) => node is {
2
+ type: string;
3
+ };
4
+ export declare const isIdentifierNode: (node: object | null) => node is {
5
+ type: "Identifier";
6
+ name: string;
7
+ };
8
+ export declare const isStringLiteralNode: (node: object | null) => node is {
9
+ type: "StringLiteral";
10
+ value: string;
11
+ };
12
+ export declare const isBooleanLiteralNode: (node: object | null) => node is {
13
+ type: "BooleanLiteral";
14
+ value: boolean;
15
+ };
16
+ export declare const isNumericLiteralNode: (node: object | null) => node is {
17
+ type: "NumericLiteral";
18
+ value: number;
19
+ };
20
+ export declare const isNullLiteralNode: (node: object | null) => node is {
21
+ type: "NullLiteral";
22
+ };
23
+ export declare const isMemberExpressionNode: (node: object | null) => node is {
24
+ type: "MemberExpression";
25
+ computed: boolean;
26
+ object: object;
27
+ property: object;
28
+ };
29
+ export declare const isCallExpressionNode: (node: object | null) => node is {
30
+ type: "CallExpression";
31
+ callee: object;
32
+ arguments: object[];
33
+ };
34
+ export declare const isAwaitExpressionNode: (node: object | null) => node is {
35
+ type: "AwaitExpression";
36
+ argument: object;
37
+ };
38
+ export declare const isAssignmentExpressionNode: (node: object | null) => node is {
39
+ type: "AssignmentExpression";
40
+ left: object;
41
+ right: object;
42
+ };
43
+ export declare const isArrowFunctionExpressionNode: (node: object | null) => node is {
44
+ type: "ArrowFunctionExpression";
45
+ body: object;
46
+ };
47
+ export declare const isBlockStatementNode: (node: object | null) => node is {
48
+ type: "BlockStatement";
49
+ body: object[];
50
+ };
51
+ export declare const isExpressionStatementNode: (node: object | null) => node is {
52
+ type: "ExpressionStatement";
53
+ expression: object;
54
+ };
55
+ export declare const isReturnStatementNode: (node: object | null) => node is {
56
+ type: "ReturnStatement";
57
+ argument: object | null;
58
+ };
59
+ export declare const isObjectExpressionNode: (node: object | null) => node is {
60
+ type: "ObjectExpression";
61
+ properties: object[];
62
+ };
63
+ export declare const isObjectPropertyNode: (node: object | null) => node is {
64
+ type: "ObjectProperty";
65
+ computed: boolean;
66
+ key: object;
67
+ value: object;
68
+ };
69
+ /**
70
+ * Same shape test without the `computed` field check — matches the guard
71
+ * previously inlined in utils.ts's to-directive metadata reader and in
72
+ * routing/to-directive.ts.
73
+ */
74
+ export declare const isObjectPropertyNodeShallow: (node: object | null) => node is {
75
+ type: "ObjectProperty";
76
+ key: object;
77
+ value: object;
78
+ };
79
+ export declare const isLogicalExpressionNode: (node: object | null) => node is {
80
+ type: "LogicalExpression";
81
+ operator: string;
82
+ left: object;
83
+ right: object;
84
+ };
85
+ //# sourceMappingURL=babel-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel-guards.d.ts","sourceRoot":"","sources":["../../compiler/babel-guards.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,GAAI,MAAM,MAAM,GAAG,IAAI,EAAE,MAAM,MAAM,KAAG,IAAI,IAAI;IAAE,IAAI,EAAE,MAAM,CAAA;CAEpF,CAAC;AACF,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,GAAG,IAAI,KAAG,IAAI,IAAI;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAEhG,CAAC;AACF,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,GAAG,IAAI,KAAG,IAAI,IAAI;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAEvG,CAAC;AACF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,GAA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