diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b9ee846..128639f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,6 +4,7 @@ on: push: paths: - 'package.json' + - '*/package.json' - 'biome.json' - '.npmrc' branches: @@ -11,6 +12,7 @@ on: pull_request: paths: - 'package.json' + - '*/package.json' - 'biome.json' - '.npmrc' branches: @@ -33,4 +35,17 @@ jobs: run: npm install -ws - name: Run npm lint run: npm run lint + # npm rejects a provenance publish when repository.url doesn't match the + # repo the release workflow runs in, so every package release.yml + # publishes has to name it + - name: Check published packages name this repository + run: | + status=0 + for ws in aliases core fetchindex newest oldest parsefiles ranges static; do + if ! jq -e '.repository.url == "git+https://github.com/cutenode/nodevu.git"' "$ws/package.json" > /dev/null; then + echo "::error file=$ws/package.json::repository.url must be git+https://github.com/cutenode/nodevu.git" + status=1 + fi + done + exit "$status" diff --git a/core/package.json b/core/package.json index 23067b2..357224e 100644 --- a/core/package.json +++ b/core/package.json @@ -30,5 +30,9 @@ "@biomejs/biome": "2.5.15", "c8": "^10.1.2", "undici": "^6.20.1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cutenode/nodevu.git" } } diff --git a/parsefiles/package.json b/parsefiles/package.json index 5e61866..78db837 100644 --- a/parsefiles/package.json +++ b/parsefiles/package.json @@ -26,5 +26,9 @@ "devDependencies": { "@biomejs/biome": "2.5.15", "c8": "^10.1.2" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/cutenode/nodevu.git" } }