Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Please make checkTypeScriptVersions aggregate version mismatches #505

@SimonSchick

Description

@SimonSchick

It's rather tedious that you have to re-run the tester every time you fix a version mismatch.

I "hacked" my local installation with something like this:

function checkTypeScriptVersions(allPackages) {
    const violations = [];
    for (const pkg of allPackages.allTypings()) {
        for (const dep of allPackages.allDependencyTypings(pkg)) {
            if (dep.minTypeScriptVersion > pkg.minTypeScriptVersion) {
                violations.push({
                    dep,
                    pkg,
                });
            }
        }
    }
    if (violations.length === 0) {
        return;
    }
    throw new Error(
        violations.map(
            ({ pkg, dep }) =>
                `${pkg.desc} depends on ${dep.desc} but has a lower required TypeScript version (${dep.minTypeScriptVersion} > ${pkg.minTypeScriptVersion}).`,
        )
        .join('\n'),
    );
}

Please consider this change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions