Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,24 @@ export class SignalInputMigration extends TsurgeComplexMigration<

for (const [id, input] of Object.entries(globalMetadata.knownInputs)) {
fullCompilationInputs++;
if (input.seenAsSourceInput) {
sourceInputs++;

const isConsideredSourceInput =
input.seenAsSourceInput &&
input.memberIncompatibility !== InputIncompatibilityReason.OutsideOfMigrationScope &&
input.memberIncompatibility !== InputIncompatibilityReason.SkippedViaConfigFilter;

// We won't track incompatibilities to inputs that aren't considered source inputs.
// Tracking their statistics wouldn't provide any value.
if (!isConsideredSourceInput) {
continue;
}

sourceInputs++;

if (input.memberIncompatibility !== null || input.owningClassIncompatibility !== null) {
incompatibleInputs++;
}

if (input.memberIncompatibility !== null) {
const reasonName = InputIncompatibilityReason[input.memberIncompatibility];
const key = `input-field-incompatibility-${reasonName}` as const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {
PathSegment,
PathString,
} from '@angular/compiler-cli/src/ngtsc/file_system';
import * as path from 'node:path';
import * as posixPath from 'node:path/posix';

/**
* Angular compiler file system implementation that leverages an
Expand Down Expand Up @@ -64,7 +64,7 @@ export class DevkitMigrationFilesystem implements FileSystem {
}

basename(filePath: string, extension?: string): PathSegment {
return path.basename(filePath, extension) as PathSegment;
return posixPath.basename(filePath, extension) as PathSegment;
}

normalize<T extends PathString>(path: T): T {
Expand All @@ -76,7 +76,7 @@ export class DevkitMigrationFilesystem implements FileSystem {
// In dev-kit, the NodeJS working directory should never be
// considered, so `/` is the last resort over `cwd`.
return this.normalize(
path.resolve(normalize('/'), ...normalizedPaths),
posixPath.resolve(normalize('/'), ...normalizedPaths),
) as string as AbsoluteFsPath;
}

Expand Down