From 5d4d6013af821b66c9e9682aec01728b16941a96 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 2 Sep 2024 22:03:47 +0100 Subject: [PATCH] chore: tidying workflows + add sherif workflow (#28793) --- .../{check-links.yml => docs-check-links.yml} | 2 +- .github/workflows/docs-deploy.yml | 4 +- .github/workflows/docs.yml | 2 +- .github/workflows/label-pr.yml | 2 +- .github/workflows/lint-sherif.yml | 36 ++++++++++ .../{introspect.yml => lint-workflows.yml} | 0 .../workflows/reproduire-sur-stackblitz.yml | 17 ----- .github/workflows/reproduire.yml | 2 +- .github/workflows/scorecards.yml | 2 +- .github/workflows/semantic-pull-requests.yml | 4 +- .github/workflows/stackblitz-link.yml | 17 +++++ .../{reproduire-close.yml => stale.yml} | 2 +- package.json | 1 + packages/nuxt/package.json | 2 +- pnpm-lock.yaml | 66 +++++++++++++++++++ pnpm-workspace.yaml | 2 + test/fixtures/remote-provider/package.json | 5 ++ 17 files changed, 138 insertions(+), 28 deletions(-) rename .github/workflows/{check-links.yml => docs-check-links.yml} (97%) create mode 100644 .github/workflows/lint-sherif.yml rename .github/workflows/{introspect.yml => lint-workflows.yml} (100%) delete mode 100644 .github/workflows/reproduire-sur-stackblitz.yml create mode 100644 .github/workflows/stackblitz-link.yml rename .github/workflows/{reproduire-close.yml => stale.yml} (96%) create mode 100644 test/fixtures/remote-provider/package.json diff --git a/.github/workflows/check-links.yml b/.github/workflows/docs-check-links.yml similarity index 97% rename from .github/workflows/check-links.yml rename to .github/workflows/docs-check-links.yml index 11c466bc25..e97699b3c4 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/docs-check-links.yml @@ -1,4 +1,4 @@ -name: Check links with Lychee +name: docs on: pull_request: diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index c4ad6fb3de..206d15e8d2 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -1,11 +1,11 @@ -name: Deploy docs +name: docs on: push: paths: - "docs/**" branches: - - main + - 3.x # Remove default permissions of GITHUB_TOKEN for security # https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d63689f9ca..bd12e4f3e7 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: Docs +name: docs on: push: diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index c173cee01d..82ec01db92 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -1,4 +1,4 @@ -name: Label PR +name: chore on: pull_request_target: diff --git a/.github/workflows/lint-sherif.yml b/.github/workflows/lint-sherif.yml new file mode 100644 index 0000000000..7774d89097 --- /dev/null +++ b/.github/workflows/lint-sherif.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + paths: + - "**/package.json" + branches: + - main + - 3.x + pull_request: + paths: + - "**/package.json" + branches: + - main + - 3.x + - "!v[0-9]*" + +permissions: + contents: read + +jobs: + lint-monorepo: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - run: corepack enable + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 + with: + node-version: 20 + cache: "pnpm" + + - name: Install dependencies + run: pnpm install + - name: Lint monorepo + run: pnpm sherif -r multiple-dependency-versions diff --git a/.github/workflows/introspect.yml b/.github/workflows/lint-workflows.yml similarity index 100% rename from .github/workflows/introspect.yml rename to .github/workflows/lint-workflows.yml diff --git a/.github/workflows/reproduire-sur-stackblitz.yml b/.github/workflows/reproduire-sur-stackblitz.yml deleted file mode 100644 index a4b84dc8fb..0000000000 --- a/.github/workflows/reproduire-sur-stackblitz.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: reproduire-sur-stackblitz -on: - issues: - types: - opened - -permissions: - issues: write - -jobs: - reproduire-sur-stackblitz: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: huang-julien/reproduire-sur-stackblitz@v1.0.1 - with: - reproduction-heading: '### Reproduction' \ No newline at end of file diff --git a/.github/workflows/reproduire.yml b/.github/workflows/reproduire.yml index e38add83d7..4f02b2ce3a 100644 --- a/.github/workflows/reproduire.yml +++ b/.github/workflows/reproduire.yml @@ -1,4 +1,4 @@ -name: Reproduire +name: chore on: issues: types: [labeled] diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index a5a7684cc9..9a776f2e2d 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -2,7 +2,7 @@ # by a third-party and are governed by separate terms of service, privacy # policy, and support documentation. -name: Scorecard supply-chain security +name: ossf on: # For Branch-Protection check. Only the default branch is supported. See # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection diff --git a/.github/workflows/semantic-pull-requests.yml b/.github/workflows/semantic-pull-requests.yml index 927a2b41a7..a3098e6f9e 100644 --- a/.github/workflows/semantic-pull-requests.yml +++ b/.github/workflows/semantic-pull-requests.yml @@ -1,4 +1,4 @@ -name: Semantic pull request +name: chore on: pull_request_target: @@ -11,7 +11,7 @@ permissions: contents: read jobs: - main: + semantic-pr: permissions: pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR diff --git a/.github/workflows/stackblitz-link.yml b/.github/workflows/stackblitz-link.yml new file mode 100644 index 0000000000..be76b626c9 --- /dev/null +++ b/.github/workflows/stackblitz-link.yml @@ -0,0 +1,17 @@ +name: chore +on: + issues: + types: + opened + +permissions: + issues: write + +jobs: + stackblitz: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: huang-julien/reproduire-sur-stackblitz@v1.0.1 + with: + reproduction-heading: '### Reproduction' diff --git a/.github/workflows/reproduire-close.yml b/.github/workflows/stale.yml similarity index 96% rename from .github/workflows/reproduire-close.yml rename to .github/workflows/stale.yml index cf72e9e0e0..23dccb624d 100644 --- a/.github/workflows/reproduire-close.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: Close incomplete issues +name: chore on: workflow_dispatch: schedule: diff --git a/package.json b/package.json index ce5399d0e2..c145c142cf 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "playwright-core": "1.46.1", "rimraf": "6.0.1", "semver": "7.6.3", + "sherif": "1.0.0", "std-env": "3.7.0", "tinyexec": "0.3.0", "tinyglobby": "0.2.5", diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index a9f13c1614..3f85a4e9b7 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -75,7 +75,6 @@ "compatx": "^0.1.8", "consola": "^3.2.3", "cookie-es": "^1.2.2", - "impound": "^0.1.0", "defu": "^6.1.4", "destr": "^2.0.3", "devalue": "^5.0.0", @@ -87,6 +86,7 @@ "h3": "npm:h3-nightly@2.0.0-1718872656.6765a6e", "hookable": "^5.5.3", "ignore": "^5.3.2", + "impound": "^0.1.0", "jiti": "^2.0.0-beta.3", "klona": "^2.0.6", "knitwork": "^1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c61e9a4244..0529223ae0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -146,6 +146,9 @@ importers: semver: specifier: 7.6.3 version: 7.6.3 + sherif: + specifier: 1.0.0 + version: 1.0.0 std-env: specifier: 3.7.0 version: 3.7.0 @@ -1036,6 +1039,8 @@ importers: specifier: 3.4.38 version: 3.4.38(typescript@5.5.4) + test/fixtures/remote-provider: {} + test/fixtures/runtime-compiler: dependencies: nuxt: @@ -6384,6 +6389,40 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} + sherif-darwin-arm64@1.0.0: + resolution: {integrity: sha512-BRzDsWGjdZ6JqaDQ0HdcpapfHcnZyN24wUWpnFkljZOH78N+vB4qr+wwhmM7oyePJiO4pZWEoIBvzVT4cn1+3g==} + cpu: [arm64] + os: [darwin] + + sherif-darwin-x64@1.0.0: + resolution: {integrity: sha512-forkTw6v2N2sjvDdHGL+MqSPdLc0e7Z0v9BsmSdIKv5kdCPncVn6tRv/4xfAE7q+Xqa2a2bH9EEXppGb4gR3Tw==} + cpu: [x64] + os: [darwin] + + sherif-linux-arm64@1.0.0: + resolution: {integrity: sha512-psjD3YupFQtphWbwptM8EnU2jRkS6cnhxdxqJhMG9/yJpGsk99JD4tEmrDq0j/+T9UXZ5g7kXvQZXzocl3J62A==} + cpu: [arm64] + os: [linux] + + sherif-linux-x64@1.0.0: + resolution: {integrity: sha512-4VM2Z0xfKOEEkZ2bZppq4PAxP4RYC2eWyUq23Jl/nQFeoPMQpA9IkF51UGzxZT4WZ2kZDFftgyJeB09yPvd1CA==} + cpu: [x64] + os: [linux] + + sherif-windows-arm64@1.0.0: + resolution: {integrity: sha512-tSEzytTz3guhKLtdMCKWWru6UtmuCXD+0RsUWcqOMpzPBZZwvSr7OrTc83z8Oabmo8k6SJ5fvQeg33JSthgTqw==} + cpu: [arm64] + os: [win32] + + sherif-windows-x64@1.0.0: + resolution: {integrity: sha512-R/KXUHBWVPU9hSlWS+Gea/ogP1h/3q/Dm/quqGrVq+MN/F+fiRsJlU52EAjAJ6G5r/4RsvQddD1ova8MKsffdw==} + cpu: [x64] + os: [win32] + + sherif@1.0.0: + resolution: {integrity: sha512-x5gZqXmBT0G6Xnr2N63FwbMjaOikk/mPszl2bl3pnDMMyRi89w1ynAfcdIJpOyqZXW445418zkMIXAkQEfEtHw==} + hasBin: true + shiki@1.1.2: resolution: {integrity: sha512-qNzFwTv5uhEDNUIwp7wHjsrffVeLbmOgWnM5mZZhoiz7G2qAUvqVfUzuWfieD45/YAKipzCtdV9SndacKtABow==} @@ -13882,6 +13921,33 @@ snapshots: shell-quote@1.8.1: {} + sherif-darwin-arm64@1.0.0: + optional: true + + sherif-darwin-x64@1.0.0: + optional: true + + sherif-linux-arm64@1.0.0: + optional: true + + sherif-linux-x64@1.0.0: + optional: true + + sherif-windows-arm64@1.0.0: + optional: true + + sherif-windows-x64@1.0.0: + optional: true + + sherif@1.0.0: + optionalDependencies: + sherif-darwin-arm64: 1.0.0 + sherif-darwin-x64: 1.0.0 + sherif-linux-arm64: 1.0.0 + sherif-linux-x64: 1.0.0 + sherif-windows-arm64: 1.0.0 + sherif-windows-x64: 1.0.0 + shiki@1.1.2: dependencies: '@shikijs/core': 1.1.2 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0b568a37d5..e6d4489e06 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,6 @@ packages: - "packages/**" + - "!packages/nuxi" + - "!packages/test-utils" - "playground" - "test/fixtures/*" diff --git a/test/fixtures/remote-provider/package.json b/test/fixtures/remote-provider/package.json new file mode 100644 index 0000000000..79fc018756 --- /dev/null +++ b/test/fixtures/remote-provider/package.json @@ -0,0 +1,5 @@ +{ + "name": "remote-provider", + "version": "0.0.0", + "private": true +} \ No newline at end of file