Skip to content

Replace js-green-licenses with a maintained alternative #4241

Description

@trevor-scheer

Context

#4240 patches js-green-licenses (jsgl) to fix a regex bug and works around a broken CLI invocation that's been silently no-op'ing the license check for most workspace packages. That unblocks the alpha release PR (#4239), but it leaves us pinned to an archived dependency.

Why replace it

google/js-green-licenses is archived:

We can't expect any future fixes, including for genuinely new SPDX licenses we'd want to allow.

What to evaluate

A few candidates to compare:

Whatever lands should:

  • Walk the whole monorepo (every packages/*/package.json), not just one
  • Skip workspace packages so unpublished alpha versions don't break the check
  • Have an allowlist mechanism for non-SPDX-but-known-good packages
  • Be fast enough for CI (jsgl currently takes ~1m of npm lookups)

Cleanup when this lands

  • Remove resources/patches/js-green-licenses+4.0.0.patch
  • Drop js-green-licenses from package.json dependencies
  • Update js-green-licenses.json schema or replace it with the new tool's config

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions