cabloy 5.1.221 → 5.1.223
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/.cabloy-version +1 -1
- package/.github/workflows/vona-test-sqlite3.yml +1 -1
- package/.github/workflows/vona-tsc.yml +4 -3
- package/CHANGELOG.md +24 -0
- package/package.json +11 -2
- package/repo-agent-governance/managed-assets.json +15 -15
- package/repo-agent-governance/policies/repository.md +1 -0
- package/repo-agent-governance/skills/cabloy-backend-scaffold/SKILL.md +5 -1
- package/repo-agent-governance/skills/cabloy-backend-scaffold/references/follow-up-checklist.md +7 -5
- package/repo-agent-governance/skills/cabloy-frontend-scaffold/SKILL.md +5 -1
- package/repo-agent-governance/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md +6 -4
- package/repo-docs/backend/unit-testing.md +5 -1
- package/repo-docs/frontend/scripts.md +8 -0
- package/repo-docs/reference/repo-scripts.md +31 -0
- package/scripts/release.ts +4 -1
- package/scripts/runIsolatedTest.test.ts +1 -1
- package/scripts/typecheck.test.ts +199 -0
- package/scripts/typecheck.ts +20 -0
- package/vona/package.original.json +3 -0
- package/vona/packages-cli/cabloy-cli/package.json +1 -1
- package/vona/packages-cli/cli/package.json +1 -1
- package/vona/packages-cli/cli-set-api/package.json +2 -2
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.dev.ts +0 -7
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.test.ts +22 -7
- package/vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.tsc.ts +34 -5
- package/vona/packages-cli/cli-set-api/src/lib/bean/toolsBin/testCleanupProcess.test.ts +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/bean/toolsBin/testCleanupProcess.ts +1 -1
- package/vona/packages-cli/cli-set-api/src/lib/command/bin.tsc.ts +11 -1
- package/vona/packages-cli/cli-set-api/src/lib/typescriptRunner.ts +61 -0
- package/vona/packages-cli/cli-set-api/templates/app/register.js +1 -1
- package/vona/packages-cli/cli-set-api/templates/config/_tsconfig_project.json +0 -3
- package/vona/packages-cli/cli-set-api/templates/config/_tsconfig_source.json +0 -3
- package/vona/packages-cli/cli-set-api/test/binTestPatterns.test.ts +57 -0
- package/vona/packages-utils/process-helper/package.json +1 -1
- package/vona/packages-utils/process-helper/src/index.test.ts +62 -0
- package/vona/packages-utils/process-helper/src/index.ts +9 -4
- package/vona/packages-vona/vona/package.json +1 -1
- package/vona/packages-vona/vona-core/package.json +1 -1
- package/vona/packages-vona/vona-core/src/lib/core/completedReadiness.test.ts +558 -0
- package/vona/packages-vona/vona-core/src/lib/core/completedReadiness.ts +389 -0
- package/vona/packages-vona/vona-core/src/lib/core/context.ts +3 -0
- package/vona/packages-vona/vona-core/src/lib/core/index.ts +11 -0
- package/vona/packages-vona/vona-core/src/lib/core/meta.ts +5 -0
- package/vona/packages-vona/vona-core/src/lib/framework/start.test.ts +10 -0
- package/vona/packages-vona/vona-core/src/lib/framework/start.ts +8 -0
- package/vona/packages-vona/vona-mock/package.json +1 -1
- package/vona/pnpm-lock.yaml +455 -117
- package/vona/src/suite-vendor/a-cabloy/modules/a-rbac/package.json +1 -1
- package/vona/src/suite-vendor/a-cabloy/package.json +2 -2
- package/vona/src/suite-vendor/a-vona/modules/a-core/package.json +3 -3
- package/vona/src/suite-vendor/a-vona/modules/a-executor/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-executor/src/bean/bean.executor.ts +124 -4
- package/vona/src/suite-vendor/a-vona/modules/a-executor/src/types/executor.ts +7 -0
- package/vona/src/suite-vendor/a-vona/modules/a-executor/test/readyExisting.test.ts +423 -0
- package/vona/src/suite-vendor/a-vona/modules/a-executor/test/readyExistingCommit.test.ts +174 -0
- package/vona/src/suite-vendor/a-vona/modules/a-instance/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/bean/bean.instance.ts +3 -1
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/lib/existingReadyAdmission.ts +125 -0
- package/vona/src/suite-vendor/a-vona/modules/a-instance/src/service/instance.ts +72 -25
- package/vona/src/suite-vendor/a-vona/modules/a-instance/test/existingReadyAdmission.test.ts +949 -0
- package/vona/src/suite-vendor/a-vona/modules/a-logger/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-logger/test/middlewareSystem.httpLog.test.ts +61 -59
- package/vona/src/suite-vendor/a-vona/modules/a-mail/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-mail/src/service/mail.ts +5 -0
- package/vona/src/suite-vendor/a-vona/modules/a-orm/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-orm/src/common/utils.ts +2 -1
- package/vona/src/suite-vendor/a-vona/modules/a-permission/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-redis/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-redis/test/redisCleanup.test.ts +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/package.json +1 -1
- package/vona/src/suite-vendor/a-vona/modules/a-startup/test/devSeed.test.ts +61 -2
- package/vona/src/suite-vendor/a-vona/package.json +1 -1
- package/vona/tsconfig.json +1 -4
- package/zova/package.original.json +2 -1
- package/zova/packages-cli/cli/package.json +4 -4
- package/zova/packages-cli/cli-set-front/package.json +2 -2
- package/zova/packages-zova/zova/package.json +2 -2
- package/zova/pnpm-lock.yaml +53 -88
- package/zova/src/suite-vendor/a-zova/modules/a-zova/package.json +2 -2
- package/zova/src/suite-vendor/a-zova/package.json +2 -2
package/.cabloy-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.1.
|
|
1
|
+
5.1.223
|
|
@@ -93,7 +93,7 @@ jobs:
|
|
|
93
93
|
- name: init
|
|
94
94
|
run: npm run init
|
|
95
95
|
- name: run isolated test infrastructure gate
|
|
96
|
-
run: node --test scripts/testClaimProcesses.test.ts scripts/runIsolatedTest.test.ts scripts/testClaimCleanup.test.ts scripts/testProcessGuardianWindows.test.ts vona/packages-vona/vona-core/src/lib/core/testClaim.test.ts vona/packages-vona/vona-core/src/lib/core/testClaimFilesystem.test.ts vona/packages-vona/vona-core/src/lib/framework/bootstrap.test.ts vona/packages-vona/vona-core/src/lib/framework/useApp.test.ts vona/packages-cli/cli-set-api/test/binBuildEntries.test.ts
|
|
96
|
+
run: node --test scripts/testClaimProcesses.test.ts scripts/runIsolatedTest.test.ts scripts/testClaimCleanup.test.ts scripts/testProcessGuardianWindows.test.ts vona/packages-vona/vona-core/src/lib/core/testClaim.test.ts vona/packages-vona/vona-core/src/lib/core/testClaimFilesystem.test.ts vona/packages-vona/vona-core/src/lib/framework/bootstrap.test.ts vona/packages-vona/vona-core/src/lib/framework/useApp.test.ts vona/packages-cli/cli-set-api/test/binBuildEntries.test.ts vona/packages-cli/cli-set-api/test/binTestPatterns.test.ts
|
|
97
97
|
- name: run A-Pay focused gate
|
|
98
98
|
run: npm run test -- test-pay/test/paymentSession.test.ts test-pay/test/payMock.test.ts test-pay/test/paypalProvider.test.ts test-pay/test/paypalLifecycle.test.ts test-pay/test/stripeProvider.test.ts test-pay/test/stripeLifecycle.test.ts test-pay/test/outbox.test.ts test-pay/test/webhook.test.ts
|
|
99
99
|
working-directory: vona
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 5.1.223
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- Add a CLI test command.
|
|
8
|
+
|
|
9
|
+
### Improvements
|
|
10
|
+
|
|
11
|
+
- Replace ts-node with swc-core.
|
|
12
|
+
- Refactor TypeScript compilation.
|
|
13
|
+
- Update isolated test coverage.
|
|
14
|
+
- Update dependency lockfile.
|
|
15
|
+
|
|
16
|
+
## 5.1.222
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- Apply feature updates, including MCP-related changes.
|
|
21
|
+
|
|
22
|
+
### Improvements
|
|
23
|
+
|
|
24
|
+
- Add end-to-end tests and email-sending tests.
|
|
25
|
+
- Update the pnpm lockfile.
|
|
26
|
+
|
|
3
27
|
## 5.1.221
|
|
4
28
|
|
|
5
29
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cabloy",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.223",
|
|
4
4
|
"gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
|
|
5
5
|
"description": "A Node.js fullstack framework",
|
|
6
6
|
"keywords": [
|
|
@@ -50,8 +50,16 @@
|
|
|
50
50
|
"contract:generate:isolated": "node scripts/generateOpenapiIsolated.ts",
|
|
51
51
|
"test:docs:e2e": "npm run docs:build && playwright test --config repo-e2e/docs/playwright.config.ts",
|
|
52
52
|
"db:reset": "cd vona && npm run db:reset",
|
|
53
|
-
"tsc": "npm run tsc:
|
|
53
|
+
"tsc": "npm run tsc:native",
|
|
54
|
+
"tsc:force": "npm run tsc:zova:native && npm run tsc:vona:native:force",
|
|
54
55
|
"tsc:zova": "pnpm --dir zova run tsc",
|
|
56
|
+
"tsc:native": "npm run tsc:zova:native && npm run tsc:vona:native",
|
|
57
|
+
"tsc:legacy": "npm run tsc:zova:legacy && pnpm --dir vona run tsc:legacy",
|
|
58
|
+
"tsc:zova:native": "node scripts/typecheck.ts native zova --noEmit --incremental false --project tsconfig.vue-tsc.json",
|
|
59
|
+
"tsc:zova:legacy": "node scripts/typecheck.ts typescript zova --noEmit --incremental false --project tsconfig.vue-tsc.json",
|
|
60
|
+
"tsc:vona:native": "pnpm --dir vona run tsc:native",
|
|
61
|
+
"tsc:vona:native:force": "pnpm --dir vona run tsc:native:force",
|
|
62
|
+
"test:typecheck": "node --test scripts/typecheck.test.ts",
|
|
55
63
|
"deps:vona": "pnpm --dir vona run vona :tools:deps",
|
|
56
64
|
"deps:zova": "pnpm --dir zova run zova :tools:deps",
|
|
57
65
|
"format": "oxfmt --check",
|
|
@@ -91,6 +99,7 @@
|
|
|
91
99
|
"@playwright/test": "^1.62.1",
|
|
92
100
|
"@types/fs-extra": "^11.0.4",
|
|
93
101
|
"@types/node": "^26.1.2",
|
|
102
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
94
103
|
"husky": "^9.1.7",
|
|
95
104
|
"lerna": "^10.0.0",
|
|
96
105
|
"lint-staged": "^17.0.5",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
{
|
|
19
19
|
"adapter": "codex",
|
|
20
20
|
"category": "skill",
|
|
21
|
-
"sha256": "
|
|
21
|
+
"sha256": "11a02f57b7fbccc004e2a8d9cacb0e2af9e6f9a881e53852b9d74cb6309f4fc3",
|
|
22
22
|
"source": "skills/cabloy-backend-scaffold/references/follow-up-checklist.md",
|
|
23
23
|
"target": ".agents/skills/cabloy-backend-scaffold/references/follow-up-checklist.md"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"adapter": "codex",
|
|
27
27
|
"category": "skill",
|
|
28
|
-
"sha256": "
|
|
28
|
+
"sha256": "45ac18019b253a8313b5a229528f6373f1a6814d90f27a70783f787b23936aa0",
|
|
29
29
|
"source": "skills/cabloy-backend-scaffold/SKILL.md",
|
|
30
30
|
"target": ".agents/skills/cabloy-backend-scaffold/SKILL.md"
|
|
31
31
|
},
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
{
|
|
82
82
|
"adapter": "codex",
|
|
83
83
|
"category": "skill",
|
|
84
|
-
"sha256": "
|
|
84
|
+
"sha256": "2bdeea2869862d1e52300da6b946b4b4cd2489b9271144e94e85d8377175c6af",
|
|
85
85
|
"source": "skills/cabloy-frontend-scaffold/references/follow-up-checklist.md",
|
|
86
86
|
"target": ".agents/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md"
|
|
87
87
|
},
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
{
|
|
96
96
|
"adapter": "codex",
|
|
97
97
|
"category": "skill",
|
|
98
|
-
"sha256": "
|
|
98
|
+
"sha256": "af5f73b8c1d52bf0bdd0464c9b29c1f9eccdddece2142da73657d164ab927f95",
|
|
99
99
|
"source": "skills/cabloy-frontend-scaffold/SKILL.md",
|
|
100
100
|
"target": ".agents/skills/cabloy-frontend-scaffold/SKILL.md"
|
|
101
101
|
},
|
|
@@ -354,14 +354,14 @@
|
|
|
354
354
|
{
|
|
355
355
|
"adapter": "claude",
|
|
356
356
|
"category": "skill",
|
|
357
|
-
"sha256": "
|
|
357
|
+
"sha256": "11a02f57b7fbccc004e2a8d9cacb0e2af9e6f9a881e53852b9d74cb6309f4fc3",
|
|
358
358
|
"source": "skills/cabloy-backend-scaffold/references/follow-up-checklist.md",
|
|
359
359
|
"target": ".claude/skills/cabloy-backend-scaffold/references/follow-up-checklist.md"
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
362
|
"adapter": "claude",
|
|
363
363
|
"category": "skill",
|
|
364
|
-
"sha256": "
|
|
364
|
+
"sha256": "45ac18019b253a8313b5a229528f6373f1a6814d90f27a70783f787b23936aa0",
|
|
365
365
|
"source": "skills/cabloy-backend-scaffold/SKILL.md",
|
|
366
366
|
"target": ".claude/skills/cabloy-backend-scaffold/SKILL.md"
|
|
367
367
|
},
|
|
@@ -417,7 +417,7 @@
|
|
|
417
417
|
{
|
|
418
418
|
"adapter": "claude",
|
|
419
419
|
"category": "skill",
|
|
420
|
-
"sha256": "
|
|
420
|
+
"sha256": "2bdeea2869862d1e52300da6b946b4b4cd2489b9271144e94e85d8377175c6af",
|
|
421
421
|
"source": "skills/cabloy-frontend-scaffold/references/follow-up-checklist.md",
|
|
422
422
|
"target": ".claude/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md"
|
|
423
423
|
},
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
{
|
|
432
432
|
"adapter": "claude",
|
|
433
433
|
"category": "skill",
|
|
434
|
-
"sha256": "
|
|
434
|
+
"sha256": "af5f73b8c1d52bf0bdd0464c9b29c1f9eccdddece2142da73657d164ab927f95",
|
|
435
435
|
"source": "skills/cabloy-frontend-scaffold/SKILL.md",
|
|
436
436
|
"target": ".claude/skills/cabloy-frontend-scaffold/SKILL.md"
|
|
437
437
|
},
|
|
@@ -683,7 +683,7 @@
|
|
|
683
683
|
{
|
|
684
684
|
"adapter": "cursor",
|
|
685
685
|
"category": "policy",
|
|
686
|
-
"sha256": "
|
|
686
|
+
"sha256": "b8453cbb90a6b75014615dea5ffb8f8e6b31be1e5c3392c1dc4bc0f4456adb57",
|
|
687
687
|
"source": "policies/repository.md",
|
|
688
688
|
"target": ".cursor/rules/cabloy-governance.mdc"
|
|
689
689
|
},
|
|
@@ -704,14 +704,14 @@
|
|
|
704
704
|
{
|
|
705
705
|
"adapter": "cursor",
|
|
706
706
|
"category": "skill",
|
|
707
|
-
"sha256": "
|
|
707
|
+
"sha256": "11a02f57b7fbccc004e2a8d9cacb0e2af9e6f9a881e53852b9d74cb6309f4fc3",
|
|
708
708
|
"source": "skills/cabloy-backend-scaffold/references/follow-up-checklist.md",
|
|
709
709
|
"target": ".cursor/skills/cabloy-backend-scaffold/references/follow-up-checklist.md"
|
|
710
710
|
},
|
|
711
711
|
{
|
|
712
712
|
"adapter": "cursor",
|
|
713
713
|
"category": "skill",
|
|
714
|
-
"sha256": "
|
|
714
|
+
"sha256": "45ac18019b253a8313b5a229528f6373f1a6814d90f27a70783f787b23936aa0",
|
|
715
715
|
"source": "skills/cabloy-backend-scaffold/SKILL.md",
|
|
716
716
|
"target": ".cursor/skills/cabloy-backend-scaffold/SKILL.md"
|
|
717
717
|
},
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
{
|
|
768
768
|
"adapter": "cursor",
|
|
769
769
|
"category": "skill",
|
|
770
|
-
"sha256": "
|
|
770
|
+
"sha256": "2bdeea2869862d1e52300da6b946b4b4cd2489b9271144e94e85d8377175c6af",
|
|
771
771
|
"source": "skills/cabloy-frontend-scaffold/references/follow-up-checklist.md",
|
|
772
772
|
"target": ".cursor/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md"
|
|
773
773
|
},
|
|
@@ -781,7 +781,7 @@
|
|
|
781
781
|
{
|
|
782
782
|
"adapter": "cursor",
|
|
783
783
|
"category": "skill",
|
|
784
|
-
"sha256": "
|
|
784
|
+
"sha256": "af5f73b8c1d52bf0bdd0464c9b29c1f9eccdddece2142da73657d164ab927f95",
|
|
785
785
|
"source": "skills/cabloy-frontend-scaffold/SKILL.md",
|
|
786
786
|
"target": ".cursor/skills/cabloy-frontend-scaffold/SKILL.md"
|
|
787
787
|
},
|
|
@@ -1005,14 +1005,14 @@
|
|
|
1005
1005
|
{
|
|
1006
1006
|
"adapter": "codex",
|
|
1007
1007
|
"category": "policy",
|
|
1008
|
-
"sha256": "
|
|
1008
|
+
"sha256": "18d072d31b706f8eadda5d757ee3db7d69c4a7ea5e4c14dc33ab3ac307ae89e0",
|
|
1009
1009
|
"source": "policies/repository.md",
|
|
1010
1010
|
"target": "AGENTS.md"
|
|
1011
1011
|
},
|
|
1012
1012
|
{
|
|
1013
1013
|
"adapter": "claude",
|
|
1014
1014
|
"category": "policy",
|
|
1015
|
-
"sha256": "
|
|
1015
|
+
"sha256": "18d072d31b706f8eadda5d757ee3db7d69c4a7ea5e4c14dc33ab3ac307ae89e0",
|
|
1016
1016
|
"source": "policies/repository.md",
|
|
1017
1017
|
"target": "CLAUDE.md"
|
|
1018
1018
|
}
|
|
@@ -106,4 +106,5 @@ Before inventing a custom implementation path:
|
|
|
106
106
|
- For docs changes: run the docs build and verify links/navigation where practical.
|
|
107
107
|
- For code-generation or workflow guidance changes: verify that the referenced scripts and command families still exist.
|
|
108
108
|
- For code changes: prefer the narrowest meaningful verification first, then use shared root scripts when broader confidence is needed.
|
|
109
|
+
- Keep frontend and backend verification proportional to the change: cover critical behavior using existing infrastructure, not exhaustive upfront test matrices or bespoke source-evaluation/mock harnesses. Prefer a few critical-flow E2E scenarios for frontend work and the smallest meaningful service/model/API/integration tests for backend work; add focused regressions for actual defects. Preserve applicable security, SSR, data-consistency, migration, and acceptance requirements.
|
|
109
110
|
- Any change to `meta.version.ts` requires running `npm run test` so the test database is reinitialized and schema/data consistency issues surface early.
|
|
@@ -237,7 +237,11 @@ Especially relevant pages include:
|
|
|
237
237
|
|
|
238
238
|
Always end with a verification path that matches the scope of the backend change.
|
|
239
239
|
|
|
240
|
-
|
|
240
|
+
Prefer focused tests of critical business behavior using the existing Vona testing infrastructure. Choose the smallest meaningful service/model, controller/API, or integration boundary for the changed contract; browser E2E is not the default backend test layer. Avoid exhaustive upfront mock/fake matrices and bespoke harnesses. Add focused regression coverage when actual defects are fixed; targeted unit and framework tests remain useful when they directly prove new or changed behavior.
|
|
241
|
+
|
|
242
|
+
Keep relevant static checks scope-dependent and preserve applicable authentication/authorization, tenant-isolation, transaction, concurrency, idempotency, migration, and acceptance requirements. These are selected by the affected behavior, not a mandatory matrix for every change. Retain `mockCtx(...)` ownership, test-resource isolation, precise fixture cleanup, and the required `npm run test` after `meta.version.ts` changes. Missing runtime access is a reported gap, not permission to reset resources or invent substitute test machinery. See [Unit Testing](../../../repo-docs/backend/unit-testing.md).
|
|
243
|
+
|
|
244
|
+
Shared checks, when applicable, include:
|
|
241
245
|
|
|
242
246
|
- `npm run test`
|
|
243
247
|
- `npm run tsc`
|
package/repo-agent-governance/skills/cabloy-backend-scaffold/references/follow-up-checklist.md
CHANGED
|
@@ -79,11 +79,13 @@ When the active edition and installed modules provide `@Passport.rbac(...)` and
|
|
|
79
79
|
|
|
80
80
|
## Verification follow-up
|
|
81
81
|
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
- `npm run
|
|
82
|
+
- focused critical-business-path tests using existing Vona service/model, controller/API, or integration infrastructure; browser E2E is not the default backend layer
|
|
83
|
+
- focused regressions for actual defects; avoid exhaustive upfront mock/fake matrices and bespoke harnesses
|
|
84
|
+
- applicable authentication/authorization, tenant-isolation, transaction, concurrency, idempotency, migration, and acceptance checks
|
|
85
|
+
- relevant format, lint, and type checks using the smallest supported scope
|
|
86
|
+
- `npm run test`, including the required run after `meta.version.ts` changes
|
|
87
|
+
- migration verification when affected; `db:reset` remains destructive and requires explicit approval
|
|
88
|
+
- `npm run build` only when the affected artifact or acceptance boundary requires it
|
|
87
89
|
|
|
88
90
|
## Escalation rule
|
|
89
91
|
|
|
@@ -278,7 +278,11 @@ Especially relevant pages include:
|
|
|
278
278
|
|
|
279
279
|
Always end with a verification path that matches the scope of the frontend change.
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
For ordinary frontend changes, prefer a few critical user flows through the existing E2E infrastructure, selected by affected behavior with spec names, tags, or `--grep`. Reuse existing scenarios or extend them narrowly; do not require exhaustive isolated-test matrices, extensive fake dependencies, or custom source-evaluation loaders before delivery. When an actual problem is fixed, add focused regression coverage. Targeted unit or framework tests remain useful when they efficiently prove the behavior being changed; this is not a ban on existing tests or managed test-resource isolation.
|
|
282
|
+
|
|
283
|
+
Keep relevant format, lint, and type checks lightweight and scope-dependent. Prepare only the affected flavor's required artifacts for runtime verification. Preserve applicable route, SSR/hydration, authentication, authorization, contract, and acceptance checks; frontend E2E does not replace server-side enforcement. If runtime verification is unavailable or not authorized, report the gap rather than building a substitute harness. See [Frontend Scripts](../../../repo-docs/frontend/scripts.md) for edition-aware preparation and filtered E2E commands.
|
|
284
|
+
|
|
285
|
+
Shared checks, when applicable, include:
|
|
282
286
|
|
|
283
287
|
- `npm run tsc`
|
|
284
288
|
- `npm run build:zova`
|
package/repo-agent-governance/skills/cabloy-frontend-scaffold/references/follow-up-checklist.md
CHANGED
|
@@ -42,10 +42,12 @@ After generating or extending a frontend thread, check which follow-up layers ap
|
|
|
42
42
|
|
|
43
43
|
## Verification follow-up
|
|
44
44
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
45
|
+
- relevant format, lint, and type checks using the smallest supported scope
|
|
46
|
+
- a few affected critical user flows through existing E2E scenarios, selected by spec, tag, or `--grep`
|
|
47
|
+
- focused regressions for actual defects; no exhaustive upfront fake matrices or custom source-evaluation harnesses
|
|
48
|
+
- affected-flavor artifact preparation when runtime verification needs updated output
|
|
49
|
+
- applicable route, SSR/hydration, authentication, authorization, and contract checks; do not replace server-side enforcement with UI coverage
|
|
50
|
+
- report unavailable or unauthorized runtime proof explicitly; do not create substitute test machinery
|
|
49
51
|
|
|
50
52
|
## Escalation rule
|
|
51
53
|
|
|
@@ -4,7 +4,11 @@ This guide explains the most important Vona testing workflows in the Cabloy mono
|
|
|
4
4
|
|
|
5
5
|
## Why testing is emphasized
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Keep testing proportional to the backend change: cover critical business behavior using the existing Vona testing infrastructure, and add focused regression coverage when actual problems are fixed. Choose the smallest meaningful service/model, controller/API, or integration boundary for the changed contract; browser E2E is not the default backend test layer.
|
|
8
|
+
|
|
9
|
+
Test-driven development and targeted unit or framework tests remain useful when they clarify and directly prove new or changed behavior. Exhaustive upfront mock/fake matrices and bespoke harnesses are not a delivery prerequisite.
|
|
10
|
+
|
|
11
|
+
Preserve applicable authentication/authorization, tenant-isolation, transaction, concurrency, idempotency, migration, and acceptance checks without turning them into an unrelated mandatory matrix. The context, fixture, and resource-isolation rules below still apply, including the required `npm run test` after `meta.version.ts` changes. Missing runtime access must be reported, not worked around with unauthorized resets or substitute test machinery.
|
|
8
12
|
|
|
9
13
|
Vona’s testing story is valuable because it is closely integrated with:
|
|
10
14
|
|
|
@@ -49,6 +49,14 @@ npm run build:zova:commerce:admin
|
|
|
49
49
|
|
|
50
50
|
The `dev:zova:*` commands start the Zova development server, which uses `9000` in the Cabloy Basic default environment. Use this Zova standalone SSR entry for page, route, and hydration iteration. It may be used as Vona's development proxy target, but direct access to `9000` does not prove the Vona request boundary or integrated acceptance.
|
|
51
51
|
|
|
52
|
+
## Proportionate frontend verification
|
|
53
|
+
|
|
54
|
+
For frontend changes, prefer a few critical user flows through the existing E2E infrastructure, together with relevant lightweight format, lint, and type checks. Select scenarios by the behavior being changed rather than running every spec or building exhaustive isolated-test matrices. Reuse the edition-aware preparation and spec/tag/`--grep` filtering below; prepare only the affected artifacts when they have changed.
|
|
55
|
+
|
|
56
|
+
Do not introduce custom source-evaluation loaders or extensive fake dependencies by default for ordinary page interactions. When an actual problem is fixed, add a focused regression test that reproduces it. Targeted unit and framework tests remain useful when they provide direct, low-cost proof; comprehensive upfront coverage is not a delivery prerequisite.
|
|
57
|
+
|
|
58
|
+
This preference does not relax applicable SSR/hydration, authentication, authorization, contract, or acceptance requirements, and UI coverage never replaces server-side enforcement. Managed E2E resource isolation remains required. If runtime verification is unavailable or not authorized, report the gap rather than adding substitute test machinery; live Provider and destructive operations retain their separate authorization boundaries.
|
|
59
|
+
|
|
52
60
|
## Vona integrated SSR browser acceptance
|
|
53
61
|
|
|
54
62
|
The default Basic Web and Admin sites have browser smoke commands that exercise Vona integrated SSR through Vona SSR dispatch at the managed run's dynamically allocated test listener, not through the ordinary Vona development listener (`7102` by default) or the Zova standalone SSR development-server port. Vona supplies the API origin at runtime, so no Zova `.env` change or rebuild is needed solely for the test port; see [Runtime API origins in Vona integrated SSR](/fullstack/ssr-entry-modes#runtime-api-origins-in-vona-integrated-ssr).
|
|
@@ -44,12 +44,43 @@ Cabloy Basic exposes these shared root scripts:
|
|
|
44
44
|
- `npm run contract:generate:isolated`
|
|
45
45
|
- `npm run db:reset`
|
|
46
46
|
- `npm run tsc`
|
|
47
|
+
- `npm run tsc:force`
|
|
48
|
+
- `npm run tsc:native`
|
|
49
|
+
- `npm run tsc:legacy`
|
|
50
|
+
- `npm run test:typecheck`
|
|
47
51
|
- `npm run docs:dev`
|
|
48
52
|
- `npm run docs:build`
|
|
49
53
|
- `npm run docs:preview`
|
|
50
54
|
|
|
51
55
|
`npm run init` prepares all Cabloy Basic SSR and REST artifacts with `npm run build:zova:all`, which sequentially builds the Basic and Commerce flavor batches before Vona initialization. Use `build:zova` or `build:zova:commerce` for focused artifact refreshes; use `build:zova:all` only when every shipped Basic flavor must be prepared.
|
|
52
56
|
|
|
57
|
+
## TypeScript toolchains in Cabloy Basic
|
|
58
|
+
|
|
59
|
+
Cabloy Basic keeps two TypeScript toolchains: root `@typescript/native` is the exact npm alias `npm:typescript@7.0.2`, while classic `typescript` 5.9.3 remains available for compiler-API consumers and existing tooling. The alias changes the dependency name, not the executable name: its package still declares `bin.tsc`, not a separate `native` or `tsgo` command.
|
|
60
|
+
|
|
61
|
+
Use the explicit root commands to select the verification toolchain:
|
|
62
|
+
|
|
63
|
+
| Root command | Scope |
|
|
64
|
+
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
65
|
+
| `npm run tsc` / `npm run tsc:native` | Check Zova, then the complete Vona graph, with native TypeScript; reuse Vona incremental results. |
|
|
66
|
+
| `npm run tsc:force` | Check the same scopes with native TypeScript, forcing Vona to rebuild. |
|
|
67
|
+
| `npm run tsc:legacy` | Check the same scopes with classic TypeScript. |
|
|
68
|
+
| `npm run tsc:zova:native` | Check Zova with native TypeScript. |
|
|
69
|
+
| `npm run tsc:zova:legacy` | Check Zova with classic TypeScript. |
|
|
70
|
+
| `npm run tsc:vona:native` | Check the complete Vona graph with native TypeScript, reusing incremental results. |
|
|
71
|
+
| `npm run tsc:vona:native:force` | Force native checking of the complete Vona graph. |
|
|
72
|
+
| `npm run test:typecheck` | Test compiler selection, argument and failure propagation, Vona graph traversal, and installed compiler versions/API availability. |
|
|
73
|
+
|
|
74
|
+
`scripts/typecheck.ts` delegates to the package-resolving runner in `vona/packages-cli/cli-set-api/src/lib/typescriptRunner.ts`. It resolves `@typescript/native` or `typescript` from the target workspace, reads that package's `bin.tsc`, and invokes it directly with Node. Native Vona checks use the same runner. This avoids relying on `PATH` or a shared `.bin/tsc` name to identify the selected compiler.
|
|
75
|
+
|
|
76
|
+
Both explicit Zova checks use `tsconfig.vue-tsc.json` with `--noEmit --incremental false`. Native Vona checks retain build mode (`-b`), visiting the project, every local suite, and every standalone local module, rather than replacing that graph with a root-only no-emit check. The default native check omits `--force`; `tsc:force` adds it without changing the traversal scope. Zova's cache policy is unchanged, so the force distinction applies to Vona. The explicit legacy check continues to force a rebuild. Vona's emitted files and build-info artifacts are shared between compiler versions: run native and legacy checks **serially**, and coordinate them with other operations writing the same artifacts. After switching from TS5 back to native, run `npm run tsc:force` before relying on incremental checks. Forced rebuilding prevents one compiler's incremental state from standing in for verification by the other; it does not isolate their output.
|
|
77
|
+
|
|
78
|
+
Root `npm run tsc` delegates to incremental `tsc:native` for daily development; use `tsc:force` for full forced verification and `tsc:legacy` for comparison or fallback. The nested Vona and Zova `tsc` defaults, frontend `prerun`, build commands, package publish emitters, and REST emitters remain unchanged. Classic TypeScript remains installed for compiler-JavaScript-API consumers, including SWC configuration loading, Rollup integration, and OpenAPI generation; the existing REST native-preview emitter dependency is also retained.
|
|
79
|
+
|
|
80
|
+
The native alias is installed at the repository root, not in either nested workspace. Run `pnpm install` at the root after updating the checkout; a missing alias fails with an installation diagnostic rather than silently selecting the legacy compiler. A standalone Vona project using `--compiler=native` must install that alias in its project or an ancestor. Do not use a bare root `tsc`/`pnpm exec tsc` to choose a compiler, because both packages declare the same binary name.
|
|
81
|
+
|
|
82
|
+
The `vona-tsc` CI workflow runs root `npm run test:typecheck`, then root `npm run tsc:force`, after its existing initialization. The root release workflow also runs `tsc:force` before versioning/publishing (excluding changelog-only and GitHub-release-only runs), and its post-release compensation verification uses the same forced entrypoint. These gates retain forced verification even though daily checking is incremental. Check the active repository before assuming the same aliases or commands exist in Cabloy Start.
|
|
83
|
+
|
|
53
84
|
## Test isolation and development data {#test-isolation-and-development-data}
|
|
54
85
|
|
|
55
86
|
<span id="test-isolation-and-development-data-in-cabloy-basic"></span>
|
package/scripts/release.ts
CHANGED
|
@@ -586,7 +586,7 @@ function verifyCompensationPatch(dryRun?: boolean): void {
|
|
|
586
586
|
// eslint-disable-next-line
|
|
587
587
|
console.log('\n✅ Verifying the refreshed zova-core patch...');
|
|
588
588
|
execInherited('pnpm exec tsc -p tsconfig.json --noEmit', dryRun, { cwd: VONA_DIR });
|
|
589
|
-
execInherited('npm run tsc', dryRun);
|
|
589
|
+
execInherited('npm run tsc:force', dryRun);
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
function commitCompensationChanges(targetVersion: string, dryRun?: boolean): void {
|
|
@@ -963,6 +963,9 @@ async function release(options: ReleaseOptions): Promise<void> {
|
|
|
963
963
|
}
|
|
964
964
|
|
|
965
965
|
runGovernancePreflight(options.dryRun);
|
|
966
|
+
if (!options.changelogOnly && !options.releaseOnly) {
|
|
967
|
+
execInherited('npm run tsc:force', options.dryRun);
|
|
968
|
+
}
|
|
966
969
|
|
|
967
970
|
// Determine the version to use
|
|
968
971
|
let version: string;
|
|
@@ -641,7 +641,6 @@ test(
|
|
|
641
641
|
try {
|
|
642
642
|
const script = `
|
|
643
643
|
import { writeFileSync } from 'node:fs';
|
|
644
|
-
writeFileSync(process.argv[1], 'ready');
|
|
645
644
|
process.on('SIGINT', () => {
|
|
646
645
|
setTimeout(() => {
|
|
647
646
|
writeFileSync(process.argv[2], 'stopped');
|
|
@@ -649,6 +648,7 @@ test(
|
|
|
649
648
|
}, 150);
|
|
650
649
|
});
|
|
651
650
|
setInterval(() => {}, 1000);
|
|
651
|
+
writeFileSync(process.argv[1], 'ready');
|
|
652
652
|
`;
|
|
653
653
|
const pending = runIsolatedProcess(
|
|
654
654
|
process.execPath,
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { mkdirSync, mkdtempSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { createRequire } from 'node:module';
|
|
5
|
+
import { tmpdir } from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import test from 'node:test';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
import { CliBinTsc } from '../vona/packages-cli/cli-set-api/src/lib/bean/cli.bin.tsc.ts';
|
|
11
|
+
import {
|
|
12
|
+
resolveTypeScriptCompiler,
|
|
13
|
+
runTypeScript,
|
|
14
|
+
} from '../vona/packages-cli/cli-set-api/src/lib/typescriptRunner.ts';
|
|
15
|
+
|
|
16
|
+
const root = fileURLToPath(new URL('../', import.meta.url));
|
|
17
|
+
|
|
18
|
+
function writeCompiler(root: string, packageName: string, report?: string) {
|
|
19
|
+
const dir = path.join(root, 'node_modules', packageName);
|
|
20
|
+
mkdirSync(dir, { recursive: true });
|
|
21
|
+
writeFileSync(
|
|
22
|
+
path.join(dir, 'package.json'),
|
|
23
|
+
JSON.stringify({ name: 'typescript', bin: { tsc: 'compiler.cjs' } }),
|
|
24
|
+
);
|
|
25
|
+
writeFileSync(
|
|
26
|
+
path.join(dir, 'compiler.cjs'),
|
|
27
|
+
`
|
|
28
|
+
const fs = require('node:fs');
|
|
29
|
+
if (process.argv[2] === '--fail') process.exit(3);
|
|
30
|
+
const report = ${JSON.stringify(report)};
|
|
31
|
+
if (report) fs.appendFileSync(report, JSON.stringify({ cwd: process.cwd(), args: process.argv.slice(2), compiler: ${JSON.stringify(packageName)} }) + '\\n');
|
|
32
|
+
`,
|
|
33
|
+
);
|
|
34
|
+
return path.join(dir, 'compiler.cjs');
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
test('selects exact packages, preserving compiler argv, cwd and failures', async () => {
|
|
38
|
+
const dir = realpathSync(mkdtempSync(path.join(tmpdir(), 'cabloy-typecheck-')));
|
|
39
|
+
try {
|
|
40
|
+
const projectPath = path.join(dir, 'project with spaces');
|
|
41
|
+
mkdirSync(projectPath);
|
|
42
|
+
await assert.rejects(
|
|
43
|
+
runTypeScript('native', [], { projectPath }),
|
|
44
|
+
/Cannot resolve @typescript\/native/,
|
|
45
|
+
);
|
|
46
|
+
const report = path.join(dir, 'calls.jsonl');
|
|
47
|
+
const native = writeCompiler(dir, '@typescript/native', report);
|
|
48
|
+
const legacy = writeCompiler(projectPath, 'typescript');
|
|
49
|
+
assert.equal(resolveTypeScriptCompiler('native', projectPath), native);
|
|
50
|
+
assert.equal(resolveTypeScriptCompiler('typescript', projectPath), legacy);
|
|
51
|
+
const args = ['--project', 'file with spaces.json', 'literal;argument', '$unchanged'];
|
|
52
|
+
await runTypeScript('native', args, { projectPath });
|
|
53
|
+
assert.deepEqual(JSON.parse(readFileSync(report, 'utf8')), {
|
|
54
|
+
cwd: projectPath,
|
|
55
|
+
args,
|
|
56
|
+
compiler: '@typescript/native',
|
|
57
|
+
});
|
|
58
|
+
await assert.rejects(runTypeScript('native', ['--fail'], { projectPath }), { exitCode: 3 });
|
|
59
|
+
await assert.rejects(
|
|
60
|
+
runTypeScript('native', [], { projectPath, cwd: path.join(dir, 'missing') }),
|
|
61
|
+
{ code: 'ENOENT' },
|
|
62
|
+
);
|
|
63
|
+
} finally {
|
|
64
|
+
rmSync(dir, { recursive: true, force: true });
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
test('Vona keeps its legacy default and visits the same graph with native', async () => {
|
|
69
|
+
const dir = realpathSync(mkdtempSync(path.join(tmpdir(), 'cabloy-check-graph-')));
|
|
70
|
+
try {
|
|
71
|
+
const report = path.join(dir, 'calls.jsonl');
|
|
72
|
+
writeCompiler(dir, '@typescript/native', report);
|
|
73
|
+
const suiteRoot = path.join(dir, 'suite');
|
|
74
|
+
const moduleRoot = path.join(dir, 'standalone');
|
|
75
|
+
mkdirSync(suiteRoot);
|
|
76
|
+
mkdirSync(moduleRoot);
|
|
77
|
+
const calls: unknown[] = [];
|
|
78
|
+
const cli = Object.create(CliBinTsc.prototype);
|
|
79
|
+
Object.defineProperties(cli, {
|
|
80
|
+
modulesMeta: {
|
|
81
|
+
value: {
|
|
82
|
+
suites: {
|
|
83
|
+
local: { root: suiteRoot, info: { originalName: 'local' } },
|
|
84
|
+
external: { info: { node_modules: true } },
|
|
85
|
+
},
|
|
86
|
+
modulesArray: [
|
|
87
|
+
{ root: moduleRoot, info: { originalName: 'standalone' } },
|
|
88
|
+
{ suite: 'local', info: {} },
|
|
89
|
+
{ info: { node_modules: true } },
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
helper: {
|
|
94
|
+
value: {
|
|
95
|
+
processHelper: {
|
|
96
|
+
tsc: async (...args: unknown[]) => {
|
|
97
|
+
calls.push(args);
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
await cli._tsc(dir, false);
|
|
104
|
+
assert.deepEqual(
|
|
105
|
+
calls,
|
|
106
|
+
[dir, suiteRoot, moduleRoot].map(cwd => [['-b'], { cwd }]),
|
|
107
|
+
);
|
|
108
|
+
for (const force of [false, true]) {
|
|
109
|
+
for (const builders of [undefined, 1, 2]) {
|
|
110
|
+
writeFileSync(report, '');
|
|
111
|
+
await cli._tsc(dir, force, 'native', builders);
|
|
112
|
+
const nativeCalls = readFileSync(report, 'utf8')
|
|
113
|
+
.trim()
|
|
114
|
+
.split('\n')
|
|
115
|
+
.map(line => JSON.parse(line));
|
|
116
|
+
const args = force ? ['-b', '--force'] : ['-b'];
|
|
117
|
+
if (builders !== undefined) args.push('--builders', String(builders));
|
|
118
|
+
assert.deepEqual(
|
|
119
|
+
nativeCalls,
|
|
120
|
+
[dir, suiteRoot, moduleRoot].map(cwd => ({
|
|
121
|
+
cwd,
|
|
122
|
+
args,
|
|
123
|
+
compiler: '@typescript/native',
|
|
124
|
+
})),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
assert.equal(calls.length, 3, 'native must not use the legacy binary helper');
|
|
129
|
+
} finally {
|
|
130
|
+
rmSync(dir, { recursive: true, force: true });
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
test('Vona rejects invalid or legacy builder limits before starting compilation', async () => {
|
|
135
|
+
const cli = Object.create(CliBinTsc.prototype);
|
|
136
|
+
for (const builders of [0, -1, 1.5, Number.NaN, Infinity, Number.MAX_SAFE_INTEGER + 1]) {
|
|
137
|
+
await assert.rejects(cli._tsc(root, true, 'native', builders), /positive safe integer/);
|
|
138
|
+
}
|
|
139
|
+
await assert.rejects(cli._tsc(root, true, 'typescript', 1), /requires --compiler=native/);
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
test('root commands retain optional native checks and use legacy in CI', () => {
|
|
143
|
+
const scripts = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8')).scripts;
|
|
144
|
+
const vonaScripts = JSON.parse(
|
|
145
|
+
readFileSync(path.join(root, 'vona/package.original.json'), 'utf8'),
|
|
146
|
+
).scripts;
|
|
147
|
+
assert.equal(scripts.tsc, 'npm run tsc:native');
|
|
148
|
+
assert.equal(scripts['tsc:native'], 'npm run tsc:zova:native && npm run tsc:vona:native');
|
|
149
|
+
assert.equal(scripts['tsc:force'], 'npm run tsc:zova:native && npm run tsc:vona:native:force');
|
|
150
|
+
assert.equal(scripts['tsc:vona:native'], 'pnpm --dir vona run tsc:native');
|
|
151
|
+
assert.equal(scripts['tsc:vona:native:force'], 'pnpm --dir vona run tsc:native:force');
|
|
152
|
+
assert.equal(
|
|
153
|
+
vonaScripts['tsc:native'],
|
|
154
|
+
'npm run prerun && npm run vona :bin:tsc -- --compiler=native',
|
|
155
|
+
);
|
|
156
|
+
assert.equal(vonaScripts['tsc:native:force'], `${vonaScripts['tsc:native']} --force`);
|
|
157
|
+
assert.equal(vonaScripts['tsc:legacy'], 'npm run prerun && npm run vona :bin:tsc -- --force');
|
|
158
|
+
assert.equal(scripts['tsc:legacy'], 'npm run tsc:zova:legacy && pnpm --dir vona run tsc:legacy');
|
|
159
|
+
assert.equal(
|
|
160
|
+
scripts['tsc:zova:legacy'],
|
|
161
|
+
'node scripts/typecheck.ts typescript zova --noEmit --incremental false --project tsconfig.vue-tsc.json',
|
|
162
|
+
);
|
|
163
|
+
const workflow = readFileSync(path.join(root, '.github/workflows/vona-tsc.yml'), 'utf8');
|
|
164
|
+
assert.match(workflow, /run: npm run tsc:legacy\s*$/m);
|
|
165
|
+
assert.doesNotMatch(workflow, /run:.*tsc(?::[\w-]+)*native|npm run tsc:force/);
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
test('release dry-run keeps forced checks before publishing only', () => {
|
|
169
|
+
for (const [mode, shouldCheck] of [
|
|
170
|
+
['--publish-only', true],
|
|
171
|
+
['--changelog-only', false],
|
|
172
|
+
['--release-only', false],
|
|
173
|
+
] as const) {
|
|
174
|
+
const result = spawnSync(process.execPath, ['scripts/release.ts', '--dry-run', mode], {
|
|
175
|
+
cwd: root,
|
|
176
|
+
encoding: 'utf8',
|
|
177
|
+
timeout: 30_000,
|
|
178
|
+
});
|
|
179
|
+
assert.equal(result.error, undefined);
|
|
180
|
+
assert.equal(result.status, 0, result.stderr);
|
|
181
|
+
const check = result.stdout.indexOf('[dry-run] npm run tsc:force');
|
|
182
|
+
assert.equal(check !== -1, shouldCheck, mode);
|
|
183
|
+
if (shouldCheck) {
|
|
184
|
+
assert.ok(result.stdout.indexOf('[dry-run] npm publish') > check);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
test('installation retains TS5 APIs and exact stable native compiler', () => {
|
|
190
|
+
for (const workspace of ['.', 'vona', 'zova']) {
|
|
191
|
+
const require = createRequire(path.join(root, workspace, 'package.json'));
|
|
192
|
+
const ts = require('typescript');
|
|
193
|
+
assert.equal(ts.version, '5.9.3');
|
|
194
|
+
assert.equal(typeof ts.createSourceFile, 'function');
|
|
195
|
+
assert.match(ts.transpileModule('const value: number = 1;', {}).outputText, /value/);
|
|
196
|
+
}
|
|
197
|
+
const require = createRequire(path.join(root, 'package.json'));
|
|
198
|
+
assert.equal(require('@typescript/native/package.json').version, '7.0.2');
|
|
199
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
|
|
4
|
+
import { runTypeScript } from '../vona/packages-cli/cli-set-api/src/lib/typescriptRunner.ts';
|
|
5
|
+
|
|
6
|
+
const [compiler, workspace, ...args] = process.argv.slice(2);
|
|
7
|
+
if ((compiler !== 'native' && compiler !== 'typescript') || !['vona', 'zova'].includes(workspace)) {
|
|
8
|
+
console.error(
|
|
9
|
+
'Usage: node scripts/typecheck.ts <native|typescript> <vona|zova> [compiler arguments]',
|
|
10
|
+
);
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
} else {
|
|
13
|
+
const projectPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..', workspace);
|
|
14
|
+
try {
|
|
15
|
+
await runTypeScript(compiler, args, { projectPath });
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error(error instanceof Error ? error.message : error);
|
|
18
|
+
process.exitCode = (error as { exitCode?: number }).exitCode ?? 1;
|
|
19
|
+
}
|
|
20
|
+
}
|