@openrewrite/recipes-angular 1.35.0 → 1.38.0
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/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +38 -6
- package/dist/index.js.map +1 -1
- package/dist/libraries/components/package-version.d.ts +1 -1
- package/dist/libraries/components/package-version.d.ts.map +1 -1
- package/dist/libraries/components/package-version.js +1 -1
- package/dist/libraries/components/package-version.js.map +1 -1
- package/dist/migration/add-static-false-to-view-queries.d.ts.map +1 -1
- package/dist/migration/add-static-false-to-view-queries.js +16 -13
- package/dist/migration/add-static-false-to-view-queries.js.map +1 -1
- package/dist/migration/angular-version.d.ts +22 -2
- package/dist/migration/angular-version.d.ts.map +1 -1
- package/dist/migration/angular-version.js +65 -18
- package/dist/migration/angular-version.js.map +1 -1
- package/dist/migration/jasmine-to-vitest/add-vitest-imports.d.ts +11 -0
- package/dist/migration/jasmine-to-vitest/add-vitest-imports.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/add-vitest-imports.js +76 -0
- package/dist/migration/jasmine-to-vitest/add-vitest-imports.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-fake-async.d.ts +14 -0
- package/dist/migration/jasmine-to-vitest/migrate-fake-async.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-fake-async.js +225 -0
- package/dist/migration/jasmine-to-vitest/migrate-fake-async.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-lifecycle.d.ts +11 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-lifecycle.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-lifecycle.js +379 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-lifecycle.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-matchers.d.ts +18 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-matchers.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-matchers.js +446 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-matchers.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-misc.d.ts +11 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-misc.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-misc.js +209 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-misc.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-spies.d.ts +11 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-spies.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-spies.js +567 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-spies.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.d.ts +16 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.js +90 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-types.d.ts +11 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-types.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-types.js +142 -0
- package/dist/migration/jasmine-to-vitest/migrate-jasmine-types.js.map +1 -0
- package/dist/migration/jasmine-to-vitest/support.d.ts +88 -0
- package/dist/migration/jasmine-to-vitest/support.d.ts.map +1 -0
- package/dist/migration/jasmine-to-vitest/support.js +561 -0
- package/dist/migration/jasmine-to-vitest/support.js.map +1 -0
- package/dist/migration/remove-default-project.d.ts +1 -0
- package/dist/migration/remove-default-project.d.ts.map +1 -1
- package/dist/migration/remove-default-project.js +3 -1
- package/dist/migration/remove-default-project.js.map +1 -1
- package/dist/migration/upgrade-to-angular-10.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-10.js +3 -2
- package/dist/migration/upgrade-to-angular-10.js.map +1 -1
- package/dist/migration/upgrade-to-angular-11.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-11.js +3 -2
- package/dist/migration/upgrade-to-angular-11.js.map +1 -1
- package/dist/migration/upgrade-to-angular-12.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-12.js +3 -2
- package/dist/migration/upgrade-to-angular-12.js.map +1 -1
- package/dist/migration/upgrade-to-angular-13.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-13.js +4 -5
- package/dist/migration/upgrade-to-angular-13.js.map +1 -1
- package/dist/migration/upgrade-to-angular-14.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-14.js +6 -2
- package/dist/migration/upgrade-to-angular-14.js.map +1 -1
- package/dist/migration/upgrade-to-angular-15.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-15.js +3 -2
- package/dist/migration/upgrade-to-angular-15.js.map +1 -1
- package/dist/migration/upgrade-to-angular-16.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-16.js +3 -2
- package/dist/migration/upgrade-to-angular-16.js.map +1 -1
- package/dist/migration/upgrade-to-angular-17.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-17.js +3 -2
- package/dist/migration/upgrade-to-angular-17.js.map +1 -1
- package/dist/migration/upgrade-to-angular-18.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-18.js +3 -2
- package/dist/migration/upgrade-to-angular-18.js.map +1 -1
- package/dist/migration/upgrade-to-angular-19.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-19.js +3 -2
- package/dist/migration/upgrade-to-angular-19.js.map +1 -1
- package/dist/migration/upgrade-to-angular-20.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-20.js +3 -2
- package/dist/migration/upgrade-to-angular-20.js.map +1 -1
- package/dist/migration/upgrade-to-angular-21.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-21.js +3 -2
- package/dist/migration/upgrade-to-angular-21.js.map +1 -1
- package/dist/migration/upgrade-to-angular-22.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-22.js +3 -2
- package/dist/migration/upgrade-to-angular-22.js.map +1 -1
- package/dist/migration/upgrade-to-angular-8.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-8.js +3 -2
- package/dist/migration/upgrade-to-angular-8.js.map +1 -1
- package/dist/migration/upgrade-to-angular-9.d.ts.map +1 -1
- package/dist/migration/upgrade-to-angular-9.js +3 -2
- package/dist/migration/upgrade-to-angular-9.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +24 -0
- package/src/libraries/components/package-version.ts +2 -2
- package/src/migration/add-static-false-to-view-queries.ts +16 -12
- package/src/migration/angular-version.ts +65 -16
- package/src/migration/jasmine-to-vitest/add-vitest-imports.ts +51 -0
- package/src/migration/jasmine-to-vitest/migrate-fake-async.ts +211 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-lifecycle.ts +346 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-matchers.ts +410 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-misc.ts +190 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-spies.ts +533 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.ts +72 -0
- package/src/migration/jasmine-to-vitest/migrate-jasmine-types.ts +97 -0
- package/src/migration/jasmine-to-vitest/support.ts +516 -0
- package/src/migration/remove-default-project.ts +3 -1
- package/src/migration/upgrade-to-angular-10.ts +4 -3
- package/src/migration/upgrade-to-angular-11.ts +4 -3
- package/src/migration/upgrade-to-angular-12.ts +4 -3
- package/src/migration/upgrade-to-angular-13.ts +5 -6
- package/src/migration/upgrade-to-angular-14.ts +7 -3
- package/src/migration/upgrade-to-angular-15.ts +4 -3
- package/src/migration/upgrade-to-angular-16.ts +4 -3
- package/src/migration/upgrade-to-angular-17.ts +4 -3
- package/src/migration/upgrade-to-angular-18.ts +4 -3
- package/src/migration/upgrade-to-angular-19.ts +4 -3
- package/src/migration/upgrade-to-angular-20.ts +4 -3
- package/src/migration/upgrade-to-angular-21.ts +4 -3
- package/src/migration/upgrade-to-angular-22.ts +4 -3
- package/src/migration/upgrade-to-angular-8.ts +4 -3
- package/src/migration/upgrade-to-angular-9.ts +4 -3
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2026 the original author or authors.
|
|
4
|
+
*
|
|
5
|
+
* Moderne Proprietary. Only for use by Moderne customers under the terms of a commercial contract.
|
|
6
|
+
*/
|
|
7
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
12
|
+
};
|
|
13
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.MigrateJasmineToVitest = void 0;
|
|
24
|
+
const rewrite_1 = require("@openrewrite/rewrite");
|
|
25
|
+
const migrate_jasmine_lifecycle_1 = require("./migrate-jasmine-lifecycle");
|
|
26
|
+
const migrate_jasmine_matchers_1 = require("./migrate-jasmine-matchers");
|
|
27
|
+
const migrate_jasmine_spies_1 = require("./migrate-jasmine-spies");
|
|
28
|
+
const migrate_fake_async_1 = require("./migrate-fake-async");
|
|
29
|
+
const migrate_jasmine_misc_1 = require("./migrate-jasmine-misc");
|
|
30
|
+
const migrate_jasmine_types_1 = require("./migrate-jasmine-types");
|
|
31
|
+
const add_vitest_imports_1 = require("./add-vitest-imports");
|
|
32
|
+
class MigrateJasmineToVitest extends rewrite_1.Recipe {
|
|
33
|
+
constructor(options) {
|
|
34
|
+
super(options);
|
|
35
|
+
this.name = "org.openrewrite.angular.MigrateJasmineToVitest";
|
|
36
|
+
this.displayName = "Migrate Jasmine tests to Vitest";
|
|
37
|
+
this.description = "Rewrites the Jasmine APIs in an Angular project's tests (`*.spec.ts` files and the helpers " +
|
|
38
|
+
"that name `jasmine`) to Vitest, as the Angular CLI's `ng g @schematics/angular:refactor-jasmine-vitest` " +
|
|
39
|
+
"schematic does: spies and their strategies, matchers, focused, skipped and pending tests, `done` callbacks, " +
|
|
40
|
+
"`jasmine.clock()`, `fail()` and the `jasmine` types. What has no Vitest equivalent is left with a " +
|
|
41
|
+
"`// TODO: vitest-migration:` comment for a person. Files that name `jest` are left to the Jest migration. " +
|
|
42
|
+
"This covers the test code only: moving the workspace's builder, `tsconfig.spec.json` and dependencies off " +
|
|
43
|
+
"Karma is `org.openrewrite.angular.MigrateKarmaToVitest`'s part.";
|
|
44
|
+
}
|
|
45
|
+
recipeList() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
return [
|
|
48
|
+
// `fit` and `xdescribe` first, so the recipes below see `it.only` and `describe.skip`.
|
|
49
|
+
new migrate_jasmine_lifecycle_1.MigrateJasmineLifecycleToVitest(),
|
|
50
|
+
// Matchers before spies: `jasmine.any` inside a `createSpyObj` map is `expect.any` by then.
|
|
51
|
+
new migrate_jasmine_matchers_1.MigrateJasmineMatchersToVitest({ browserMode: !!this.browserMode }),
|
|
52
|
+
new migrate_jasmine_spies_1.MigrateJasmineSpiesToVitest(),
|
|
53
|
+
...(this.fakeAsync ? [new migrate_fake_async_1.MigrateFakeAsyncToVitestTimers()] : []),
|
|
54
|
+
// Last of the value rewrites: what is still `jasmine.*` by now is what no recipe handles.
|
|
55
|
+
new migrate_jasmine_misc_1.MigrateJasmineMiscToVitest(),
|
|
56
|
+
...(this.addImports ? [new add_vitest_imports_1.AddVitestImports()] : []),
|
|
57
|
+
// After the value imports, so `type Mock` joins an `import { vi } from 'vitest'` already there.
|
|
58
|
+
new migrate_jasmine_types_1.MigrateJasmineTypesToVitest(),
|
|
59
|
+
];
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
exports.MigrateJasmineToVitest = MigrateJasmineToVitest;
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, rewrite_1.Option)({
|
|
66
|
+
displayName: "Add imports",
|
|
67
|
+
description: "Whether to import the Vitest globals a test uses, such as `describe`, `it`, `expect` and `vi`. " +
|
|
68
|
+
"Angular's `unit-test` builder runs Vitest with globals on, so they are not needed unless a project turned them off.",
|
|
69
|
+
required: false,
|
|
70
|
+
example: "false"
|
|
71
|
+
})
|
|
72
|
+
], MigrateJasmineToVitest.prototype, "addImports", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, rewrite_1.Option)({
|
|
75
|
+
displayName: "Browser mode",
|
|
76
|
+
description: "Whether the tests run in Vitest's browser mode, which has a `toHaveClass` matcher of its own.",
|
|
77
|
+
required: false,
|
|
78
|
+
example: "false"
|
|
79
|
+
})
|
|
80
|
+
], MigrateJasmineToVitest.prototype, "browserMode", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, rewrite_1.Option)({
|
|
83
|
+
displayName: "Migrate fakeAsync",
|
|
84
|
+
description: "Whether to rewrite `fakeAsync`, `tick`, `flush` and `flushMicrotasks` to Vitest fake timers. " +
|
|
85
|
+
"Left off, they keep running under zone.js's Vitest patch.",
|
|
86
|
+
required: false,
|
|
87
|
+
example: "false"
|
|
88
|
+
})
|
|
89
|
+
], MigrateJasmineToVitest.prototype, "fakeAsync", void 0);
|
|
90
|
+
//# sourceMappingURL=migrate-jasmine-to-vitest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-jasmine-to-vitest.js","sourceRoot":"","sources":["../../../src/migration/jasmine-to-vitest/migrate-jasmine-to-vitest.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;AAEH,kDAAoD;AACpD,2EAA4E;AAC5E,yEAA0E;AAC1E,mEAAoE;AACpE,6DAAoE;AACpE,iEAAkE;AAClE,mEAAoE;AACpE,6DAAsD;AAEtD,MAAa,sBAAuB,SAAQ,gBAAM;IAqC9C,YAAY,OAA8E;QACtF,KAAK,CAAC,OAAO,CAAC,CAAC;QArCV,SAAI,GAAG,gDAAgD,CAAC;QACxD,gBAAW,GAAG,iCAAiC,CAAC;QAChD,gBAAW,GAAG,6FAA6F;YAChH,0GAA0G;YAC1G,8GAA8G;YAC9G,oGAAoG;YACpG,4GAA4G;YAC5G,4GAA4G;YAC5G,iEAAiE,CAAC;IA8BtE,CAAC;IAEK,UAAU;;YACZ,OAAO;gBACH,uFAAuF;gBACvF,IAAI,2DAA+B,EAAE;gBACrC,4FAA4F;gBAC5F,IAAI,yDAA8B,CAAC,EAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,EAAC,CAAC;gBACrE,IAAI,mDAA2B,EAAE;gBACjC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,mDAA8B,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjE,0FAA0F;gBAC1F,IAAI,iDAA0B,EAAE;gBAChC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,qCAAgB,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpD,gGAAgG;gBAChG,IAAI,mDAA2B,EAAE;aACpC,CAAC;QACN,CAAC;KAAA;CACJ;AAxDD,wDAwDC;AAtCG;IAPC,IAAA,gBAAM,EAAC;QACJ,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,iGAAiG;YAC1G,qHAAqH;QACzH,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,OAAO;KACnB,CAAC;0DACmB;AAQrB;IANC,IAAA,gBAAM,EAAC;QACJ,WAAW,EAAE,cAAc;QAC3B,WAAW,EAAE,+FAA+F;QAC5G,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,OAAO;KACnB,CAAC;2DACoB;AAStB;IAPC,IAAA,gBAAM,EAAC;QACJ,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,+FAA+F;YACxG,2DAA2D;QAC/D,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,OAAO;KACnB,CAAC;yDACkB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExecutionContext, Recipe, TreeVisitor } from "@openrewrite/rewrite";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/refactor/jasmine-vitest/transformers/jasmine-type.ts
|
|
4
|
+
*/
|
|
5
|
+
export declare class MigrateJasmineTypesToVitest extends Recipe {
|
|
6
|
+
readonly name = "org.openrewrite.angular.migration.migrate-jasmine-types-to-vitest";
|
|
7
|
+
readonly displayName = "Migrate Jasmine types to Vitest";
|
|
8
|
+
readonly description: string;
|
|
9
|
+
editor(): Promise<TreeVisitor<any, ExecutionContext>>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=migrate-jasmine-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-jasmine-types.d.ts","sourceRoot":"","sources":["../../../src/migration/jasmine-to-vitest/migrate-jasmine-types.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,gBAAgB,EAAE,MAAM,EAAE,WAAW,EAAW,MAAM,sBAAsB,CAAC;AAKrF;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,MAAM;IACnD,QAAQ,CAAC,IAAI,uEAAuE;IACpF,QAAQ,CAAC,WAAW,qCAAqC;IACzD,QAAQ,CAAC,WAAW,SAG6F;IAE3G,MAAM,IAAI,OAAO,CAAC,WAAW,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC;CAG9D"}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2026 the original author or authors.
|
|
4
|
+
*
|
|
5
|
+
* Moderne Proprietary. Only for use by Moderne customers under the terms of a commercial contract.
|
|
6
|
+
*/
|
|
7
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
17
|
+
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
18
|
+
var m = o[Symbol.asyncIterator], i;
|
|
19
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
20
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
21
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.MigrateJasmineTypesToVitest = void 0;
|
|
25
|
+
const rewrite_1 = require("@openrewrite/rewrite");
|
|
26
|
+
const java_1 = require("@openrewrite/rewrite/java");
|
|
27
|
+
const javascript_1 = require("@openrewrite/rewrite/javascript");
|
|
28
|
+
const support_1 = require("./support");
|
|
29
|
+
/**
|
|
30
|
+
* @see https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/refactor/jasmine-vitest/transformers/jasmine-type.ts
|
|
31
|
+
*/
|
|
32
|
+
class MigrateJasmineTypesToVitest extends rewrite_1.Recipe {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
this.name = "org.openrewrite.angular.migration.migrate-jasmine-types-to-vitest";
|
|
36
|
+
this.displayName = "Migrate Jasmine types to Vitest";
|
|
37
|
+
this.description = "Rewrites the `jasmine` namespace's types in Angular tests: `jasmine.Spy` becomes Vitest's " +
|
|
38
|
+
"`Mock` and `jasmine.SpyObj<T>` its `MockedObject<T>`, both imported with `import type` from `vitest`; " +
|
|
39
|
+
"`jasmine.Any` becomes `any`, `jasmine.ObjectContaining<T>` becomes `Partial<T>` (`object` without a type " +
|
|
40
|
+
"argument), and `jasmine.DoneFn` becomes `() => void`. A `/// <reference>` to the Jasmine types is removed.";
|
|
41
|
+
}
|
|
42
|
+
editor() {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
return new TypesVisitor();
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MigrateJasmineTypesToVitest = MigrateJasmineTypesToVitest;
|
|
49
|
+
/** `/// <reference types="jasmine" />` and `/// <reference path=".../@types/jasmine/index.d.ts" />`. */
|
|
50
|
+
const JASMINE_REFERENCE = /^\/\s*<reference\s+(types\s*=\s*["']jasmine["']|path\s*=\s*["'][^"']*@types\/jasmine\/[^"']*["'])\s*\/>\s*$/;
|
|
51
|
+
class TypesVisitor extends support_1.JasmineToVitestVisitor {
|
|
52
|
+
visitJsCompilationUnit(cu, p) {
|
|
53
|
+
const _super = Object.create(null, {
|
|
54
|
+
visitJsCompilationUnit: { get: () => super.visitJsCompilationUnit }
|
|
55
|
+
});
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
const visited = yield _super.visitJsCompilationUnit.call(this, cu, p);
|
|
58
|
+
// The base visitor returns a file that is not a Jasmine test unchanged.
|
|
59
|
+
if (!visited || visited.kind !== javascript_1.JS.Kind.CompilationUnit || !(0, support_1.isJasmineTestFile)(cu))
|
|
60
|
+
return visited;
|
|
61
|
+
const unit = visited;
|
|
62
|
+
const comments = unit.prefix.comments.filter(c => !(c.kind === java_1.J.Kind.TextComment
|
|
63
|
+
&& !c.multiline && JASMINE_REFERENCE.test(c.text)));
|
|
64
|
+
if (comments.length === unit.prefix.comments.length)
|
|
65
|
+
return visited;
|
|
66
|
+
return Object.assign(Object.assign({}, unit), { prefix: Object.assign(Object.assign({}, unit.prefix), { comments }) });
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
visitFieldAccess(fieldAccess, p) {
|
|
70
|
+
const _super = Object.create(null, {
|
|
71
|
+
visitFieldAccess: { get: () => super.visitFieldAccess }
|
|
72
|
+
});
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b;
|
|
75
|
+
const parent = (_a = this.cursor.parentTree()) === null || _a === void 0 ? void 0 : _a.value;
|
|
76
|
+
const visited = yield _super.visitFieldAccess.call(this, fieldAccess, p);
|
|
77
|
+
if (!visited || !(0, java_1.isFieldAccess)(visited) || !(0, support_1.isNamed)(visited.target, 'jasmine') || !(0, support_1.isTypePosition)(this.cursor)) {
|
|
78
|
+
return visited;
|
|
79
|
+
}
|
|
80
|
+
const generic = (parent === null || parent === void 0 ? void 0 : parent.kind) === java_1.J.Kind.ParameterizedType && parent.class === fieldAccess
|
|
81
|
+
&& !!((_b = parent.typeParameters) === null || _b === void 0 ? void 0 : _b.elements.length);
|
|
82
|
+
switch (visited.name.element.simpleName) {
|
|
83
|
+
case 'Spy':
|
|
84
|
+
return this.vitestType(visited, 'Mock');
|
|
85
|
+
case 'SpyObj':
|
|
86
|
+
return this.vitestType(visited, 'MockedObject');
|
|
87
|
+
case 'Any':
|
|
88
|
+
return typeName(visited, 'any');
|
|
89
|
+
case 'ObjectContaining':
|
|
90
|
+
return typeName(visited, generic ? 'Partial' : 'object');
|
|
91
|
+
case 'DoneFn':
|
|
92
|
+
return Object.assign(Object.assign({}, (0, support_1.freshIds)(yield parsedType('() => void'))), { prefix: visited.prefix });
|
|
93
|
+
}
|
|
94
|
+
return visited;
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
vitestType(f, member) {
|
|
98
|
+
var _a;
|
|
99
|
+
const local = (_a = (0, javascript_1.maybeBind)(this, { module: 'vitest', member, typeOnly: true, onlyIfReferenced: false })) !== null && _a !== void 0 ? _a : member;
|
|
100
|
+
return typeName(f, local);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const parsedTypes = new Map();
|
|
104
|
+
/** The tree the parser makes of a type, such as the function type `() => void`. */
|
|
105
|
+
function parsedType(text) {
|
|
106
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
+
var _a, e_1, _b, _c;
|
|
108
|
+
let type = parsedTypes.get(text);
|
|
109
|
+
if (!type) {
|
|
110
|
+
try {
|
|
111
|
+
for (var _d = true, _e = __asyncValues(new javascript_1.JavaScriptParser().parse({ text: `let t: ${text};`, sourcePath: 'type.ts' })), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) {
|
|
112
|
+
_c = _f.value;
|
|
113
|
+
_d = false;
|
|
114
|
+
const cu = _c;
|
|
115
|
+
const declarations = cu.statements[0].element;
|
|
116
|
+
type = declarations.typeExpression.typeIdentifier;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
120
|
+
finally {
|
|
121
|
+
try {
|
|
122
|
+
if (!_d && !_a && (_b = _e.return)) yield _b.call(_e);
|
|
123
|
+
}
|
|
124
|
+
finally { if (e_1) throw e_1.error; }
|
|
125
|
+
}
|
|
126
|
+
parsedTypes.set(text, type);
|
|
127
|
+
}
|
|
128
|
+
return type;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/** A type named in place of `jasmine.X`. The parser holds keyword types such as `any` as identifiers too. */
|
|
132
|
+
function typeName(f, name) {
|
|
133
|
+
return {
|
|
134
|
+
kind: java_1.J.Kind.Identifier,
|
|
135
|
+
id: (0, rewrite_1.randomId)(),
|
|
136
|
+
prefix: f.prefix,
|
|
137
|
+
markers: f.markers,
|
|
138
|
+
annotations: [],
|
|
139
|
+
simpleName: name,
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=migrate-jasmine-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migrate-jasmine-types.js","sourceRoot":"","sources":["../../../src/migration/jasmine-to-vitest/migrate-jasmine-types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;;;;;;;;;;;;;;AAEH,kDAAqF;AACrF,oDAAwE;AACxE,gEAAgF;AAChF,uCAAuG;AAEvG;;GAEG;AACH,MAAa,2BAA4B,SAAQ,gBAAM;IAAvD;;QACa,SAAI,GAAG,mEAAmE,CAAC;QAC3E,gBAAW,GAAG,iCAAiC,CAAC;QAChD,gBAAW,GAAG,4FAA4F;YAC/G,wGAAwG;YACxG,2GAA2G;YAC3G,4GAA4G,CAAC;IAKrH,CAAC;IAHS,MAAM;;YACR,OAAO,IAAI,YAAY,EAAE,CAAC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|
+
* call shapes, and how they leave a `// TODO: vitest-migration:` note for a person, the way the
|
|
4
|
+
* Angular CLI's `refactor-jasmine-vitest` schematic does.
|
|
5
|
+
*/
|
|
6
|
+
import { Cursor, ExecutionContext } from "@openrewrite/rewrite";
|
|
7
|
+
import { J } from "@openrewrite/rewrite/java";
|
|
8
|
+
import { JS, JavaScriptVisitor, raw, template } from "@openrewrite/rewrite/javascript";
|
|
9
|
+
export declare const ANGULAR_CORE_TESTING = "@angular/core/testing";
|
|
10
|
+
/**
|
|
11
|
+
* A spec file, or a helper of one: a TypeScript source that names the `jasmine` global. A file that
|
|
12
|
+
* names `jest` is a Jest suite, which these recipes leave to the Jest migration. Protractor's end-to-end
|
|
13
|
+
* specs (`*.e2e-spec.ts`, `*.e2e.spec.ts`, under `e2e/`, or importing `protractor` or `selenium-webdriver`) keep running
|
|
14
|
+
* on Jasmine, so they are left too.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isJasmineTestFile(cu: JS.CompilationUnit): boolean;
|
|
17
|
+
/** Visits every LST node below `tree`, types and markers excepted. */
|
|
18
|
+
export declare function walk(tree: any, fn: (node: any) => boolean | void): void;
|
|
19
|
+
/** Parentheses, `as`, `satisfies` and `<T>` casts do not change what an expression evaluates to. */
|
|
20
|
+
export declare function unwrap(e: J | undefined): J | undefined;
|
|
21
|
+
export declare function isTransparentWrapper(n: any): boolean;
|
|
22
|
+
export declare function isNamed(e: J | undefined, name: string): boolean;
|
|
23
|
+
/** `name(...)`, a call of a global by its bare name. */
|
|
24
|
+
export declare function isGlobalCall(e: J | undefined, ...names: string[]): e is J.MethodInvocation;
|
|
25
|
+
/** The member a `jasmine.member(...)` call names, if it is one. */
|
|
26
|
+
export declare function jasmineMethodName(e: J | undefined): string | undefined;
|
|
27
|
+
export declare function args(m: J.MethodInvocation): J[];
|
|
28
|
+
export declare function select(m: J.MethodInvocation): J | undefined;
|
|
29
|
+
export declare function isStringLiteral(e: J | undefined): e is J.Literal;
|
|
30
|
+
export declare function isFunctionLike(e: J | undefined): boolean;
|
|
31
|
+
/** The method declaration a `function () {}` expression is made of. */
|
|
32
|
+
export declare function functionExpression(e: J | undefined): J.MethodDeclaration | undefined;
|
|
33
|
+
/** The parameter names of an arrow function or function expression. */
|
|
34
|
+
export declare function parameterNames(fn: J): (string | undefined)[];
|
|
35
|
+
/** The body of an arrow function or function expression: a block, or the expression of an arrow. */
|
|
36
|
+
export declare function functionBody(fn: J): J | undefined;
|
|
37
|
+
/** `{ ... }` written as a template parses as a block, so it is written `(...)` and unwrapped here. */
|
|
38
|
+
export declare function unparenthesize(result: J): J;
|
|
39
|
+
export declare function printTrimmed(tree: J, cursor: Cursor): Promise<string>;
|
|
40
|
+
export declare function todoText(message: string, url?: string): string;
|
|
41
|
+
/** What a statement-level transformation does with the statement in a block. */
|
|
42
|
+
export type StatementResult = {
|
|
43
|
+
replace: J[];
|
|
44
|
+
}
|
|
45
|
+
/** Drops the statement and leaves the given comment lines (without `//`) where it was. */
|
|
46
|
+
| {
|
|
47
|
+
removeLeaving: string[];
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* A visitor for test files that the Jasmine to Vitest recipes extend. It skips files that are not
|
|
51
|
+
* Jasmine tests, lets a recipe note a TODO on any node, and writes each note as a line comment on
|
|
52
|
+
* the statement that holds the node, the statement a block or the file lists directly.
|
|
53
|
+
*/
|
|
54
|
+
export declare abstract class JasmineToVitestVisitor extends JavaScriptVisitor<ExecutionContext> {
|
|
55
|
+
private readonly todos;
|
|
56
|
+
/** Notes a TODO on `node`, which is placed before the statement holding it once that is visited. */
|
|
57
|
+
protected todo(node: J, message: string, url?: string): void;
|
|
58
|
+
/** Statement-level rewrites, which can drop a statement or split it in two. */
|
|
59
|
+
protected visitBlockStatement(_statement: J, _cursor: Cursor): Promise<StatementResult | undefined>;
|
|
60
|
+
visitJsCompilationUnit(cu: JS.CompilationUnit, p: ExecutionContext): Promise<J | undefined>;
|
|
61
|
+
visitBlock(block: J.Block, p: ExecutionContext): Promise<J | undefined>;
|
|
62
|
+
private finishStatements;
|
|
63
|
+
private collectTodos;
|
|
64
|
+
}
|
|
65
|
+
export type Piece = string | J | J[] | ReturnType<typeof raw>;
|
|
66
|
+
/** A template from alternating code and trees: `code('vi.mocked(', spy, ').mock')`. */
|
|
67
|
+
export declare function code(...pieces: Piece[]): ReturnType<typeof template>;
|
|
68
|
+
/** Applies a template in place of `tree`, keeping the place's leading whitespace and comments. */
|
|
69
|
+
export declare function replaceWith(tree: J, cursor: Cursor, ...pieces: Piece[]): Promise<J>;
|
|
70
|
+
export declare function hasMarker(tree: J, kind: string): boolean;
|
|
71
|
+
/** The quote the file writes its strings with, for the string literals a recipe adds. */
|
|
72
|
+
export declare function quoteOf(cu: JS.CompilationUnit): string;
|
|
73
|
+
export declare function stringLiteral(value: string, quote: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Whether the cursor's node is part of a type, where `jasmine.Foo` names a type rather than a
|
|
76
|
+
* value: an annotation, a type argument, or the type of an `as` or a cast.
|
|
77
|
+
*/
|
|
78
|
+
export declare function isTypePosition(cursor: Cursor): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Keeps a dropped statement's leading comments: they move in front of the statement that followed
|
|
81
|
+
* it, or to the end of the block.
|
|
82
|
+
*/
|
|
83
|
+
export declare function carryComments(dropped: J.Space, next: J.Space): J.Space;
|
|
84
|
+
/** The block without the statements `drop` picks, their comments kept and an emptied block written `{}`. */
|
|
85
|
+
export declare function withoutStatements(block: J.Block, drop: (s: J) => boolean): J.Block;
|
|
86
|
+
/** A copy of `tree` whose nodes all have new ids, for a subtree used a second time. */
|
|
87
|
+
export declare function freshIds<T>(tree: T): T;
|
|
88
|
+
//# sourceMappingURL=support.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"support.d.ts","sourceRoot":"","sources":["../../../src/migration/jasmine-to-vitest/support.ts"],"names":[],"mappings":"AAMA;;;;GAIG;AAEH,OAAO,EAAC,MAAM,EAAE,gBAA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