Skip to content

Commit

Permalink
chore: fix cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Jun 30, 2024
1 parent 50c0e0e commit 3682e2d
Show file tree
Hide file tree
Showing 25 changed files with 24 additions and 558 deletions.
2 changes: 1 addition & 1 deletion schematics/collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"aliases": ["alain-shell"]
},
"ng-update": {
"factory": "./ng-update/index#updateToV17",
"factory": "./ng-update/index#updateToV18",
"description": "Just TEST"
},
"application": {
Expand Down
4 changes: 2 additions & 2 deletions schematics/migration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"schematics": {
"migration-v17": {
"version": "17",
"description": "Updates NG-ALAIN to v17 [https://github.com/ng-alain/ng-alain/issues/2440]",
"factory": "./ng-update/index#updateToV17"
"description": "Updates NG-ALAIN to v18 [https://github.com/ng-alain/ng-alain/issues/2502]",
"factory": "./ng-update/index#updateToV18"
},
"ng-post-update": {
"description": "Performs cleanup after ng-update.",
Expand Down
2 changes: 1 addition & 1 deletion schematics/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { DEFAULT_WORKSPACE_PATH, readJSON, readPackage } from '../utils';
import { getNodeMajorVersion } from '../utils/node';
import { Schema as NgAddOptions } from './schema';

const V = 17;
const V = 18;

function genRules(options: NgAddOptions): Rule {
return () => {
Expand Down
2 changes: 1 addition & 1 deletion schematics/ng-update/data/attribute-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AttributeSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const attributeSelectors: VersionChanges<AttributeSelectorUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/class-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClassNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const classNames: VersionChanges<ClassNameUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/constructor-checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import { ConstructorChecksUpgradeData, TargetVersion, VersionChanges } from '@an
* automatically through type checking.
*/
export const constructorChecks: VersionChanges<ConstructorChecksUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/css-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CssSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const cssSelectors: VersionChanges<CssSelectorUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
5 changes: 5 additions & 0 deletions schematics/ng-update/data/css-tokens.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { CssTokenUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const cssTokens: VersionChanges<CssTokenUpgradeData> = {
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/element-selectors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ElementSelectorUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const elementSelectors: VersionChanges<ElementSelectorUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
1 change: 1 addition & 0 deletions schematics/ng-update/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * from './input-names';
export * from './method-call-checks';
export * from './output-names';
export * from './property-names';
export * from './css-tokens';
2 changes: 1 addition & 1 deletion schematics/ng-update/data/input-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { InputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const inputNames: VersionChanges<InputNameUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/method-call-checks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MethodCallUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const methodCallChecks: VersionChanges<MethodCallUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/output-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OutputNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const outputNames: VersionChanges<OutputNameUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
2 changes: 1 addition & 1 deletion schematics/ng-update/data/property-names.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PropertyNameUpgradeData, TargetVersion, VersionChanges } from '@angular/cdk/schematics';

export const propertyNames: VersionChanges<PropertyNameUpgradeData> = {
[TargetVersion.V17]: []
[TargetVersion.V18]: []
};
5 changes: 2 additions & 3 deletions schematics/ng-update/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ import { createMigrationSchematicRule, NullableDevkitMigration, TargetVersion }
import { chain, Rule, SchematicContext } from '@angular-devkit/schematics';

import { ruleUpgradeData } from './upgrade-data';
import { v17Rule } from './upgrade-rules/v17';

const migrations: NullableDevkitMigration[] = [];

export function updateToV17(): Rule {
return chain([v17Rule(), createMigrationSchematicRule(TargetVersion.V17, migrations, ruleUpgradeData, postUpdate)]);
export function updateToV18(): Rule {
return chain([createMigrationSchematicRule(TargetVersion.V18, migrations, ruleUpgradeData, postUpdate)]);
}

/** Post-update schematic to be called when update is finished. */
Expand Down
4 changes: 3 additions & 1 deletion schematics/ng-update/upgrade-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
classNames,
constructorChecks,
cssSelectors,
cssTokens,
elementSelectors,
inputNames,
methodCallChecks,
Expand All @@ -22,5 +23,6 @@ export const ruleUpgradeData: UpgradeData = {
methodCallChecks,
outputNames,
propertyNames,
symbolRemoval
symbolRemoval,
cssTokens
};
23 changes: 0 additions & 23 deletions schematics/ng-update/upgrade-rules/v17/angularJson.ts

This file was deleted.

52 changes: 0 additions & 52 deletions schematics/ng-update/upgrade-rules/v17/autoRegisterFormWidgets.ts

This file was deleted.

20 changes: 0 additions & 20 deletions schematics/ng-update/upgrade-rules/v17/files/jsonSchemaModule.ts

This file was deleted.

145 changes: 0 additions & 145 deletions schematics/ng-update/upgrade-rules/v17/index.spec.ts

This file was deleted.

Loading

0 comments on commit 3682e2d

Please sign in to comment.