From 78e9ee2c2a1fdc8be219cc4cea74927aa1cfd3a3 Mon Sep 17 00:00:00 2001 From: MeAkib Date: Fri, 30 Oct 2026 18:15:52 +0600 Subject: [PATCH] fix(@schematics/angular): accept the project as a positional argument in refactor-jasmine-vitest The karma-to-vitest migration suggests running `ng g @schematics/angular:refactor-jasmine-vitest `, but the schematic only accepts the project through the `--project` option, so the suggested command fails with `Unknown argument`. Read the project from the first positional argument. When it is not provided, the schematic still uses the only project of the workspace. --- .../schematics/angular/refactor/jasmine-vitest/schema.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/schematics/angular/refactor/jasmine-vitest/schema.json b/packages/schematics/angular/refactor/jasmine-vitest/schema.json index 5b23618cbc48..7868568d97b6 100644 --- a/packages/schematics/angular/refactor/jasmine-vitest/schema.json +++ b/packages/schematics/angular/refactor/jasmine-vitest/schema.json @@ -16,9 +16,10 @@ }, "project": { "type": "string", - "description": "The name of the project where the tests should be refactored. If not specified, the CLI will determine the project from the current directory.", + "description": "The name of the project where the tests should be refactored. If not specified, the only project of the workspace is used.", "$default": { - "$source": "projectName" + "$source": "argv", + "index": 0 } }, "verbose": {