Skip to content

Broken CanIUse repo link since switch from "master" to "main" #9

Description

@Beatboxace

Context

Compat uses the CanIUse repository to validate feature compatibility by grabbing the latest git commit.

Issue

This is hardcoded at line 181 from createTable.js: getLatestCommitSHA('fyrd', 'caniuse', 'heads/master')
In recent changes, the "master" branches got renamed to "main" to follow BLM movement, a seen here. Thus, it can no longer resolve and running compat now fails with an error:

stderr: (node:40588) UnhandledPromiseRejectionWarning: Error: Failed to load latest commit
at ClientRequest.<anonymous> ([MyPath]\node_modules\compat-cli\src\tableUpdater\createTable.js:158:16)

Impact:

No issues are found from compat, as the list fetching is never properly resolved. This makes the library's result unreliable (/unusable).

Fix

The easiest fix would be to hardcode the new main branch 'heads/main'. Maybe a better approach might be to have it fixed as the default but allow a config parameter url/branch name to be passed in case the repo or structure change in the future?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions