diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 1640dc6..8bcca2a 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -4,6 +4,7 @@ lockFileMaintenance: { enabled: true, }, + separateMinorPatch: true, packageRules: [ { description: "Disable docker pinning for devcontainer", diff --git a/.github/workflows/check-npm.yaml b/.github/workflows/check-npm.yaml new file mode 100644 index 0000000..0bc4260 --- /dev/null +++ b/.github/workflows/check-npm.yaml @@ -0,0 +1,23 @@ +name: Check - npm and dependencies + +on: + pull_request: + paths: + - ".github/actions/npm-tools-setup/**" + - ".github/workflows/check-npm.yaml" + - "package.json" + - "package-lock.json" + workflow_call: + workflow_dispatch: + +jobs: + duplicate-dependencies: + name: Check for duplicate dependencies + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Setup npm tools + uses: ./.github/actions/npm-tools-setup + - name: Check for duplicate dependencies + run: npm run check:npm:dedupe diff --git a/package.json b/package.json index 1053166..e0ed58f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "scripts": { "check:github-actions": "git ls-files '.github/**.yaml' | xargs -t -I {} action-validator {}", + "check:npm:dedupe": "npm find-dupes", "check:prettier": "prettier --check .", "check:pyright": "pyright", "check:renovateconfig": "npx --package=renovate -- renovate-config-validator --strict", diff --git a/pyproject.toml b/pyproject.toml index 6e24b4f..7c78e37 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ sync = ["sync:uv", "sync:npm"] "check:github-actions" = "npm run check:github-actions" "check:mypy" = "mypy ." +"check:npm:dedupe" = "npm run check:npm:dedupe" "check:prettier" = "npm run check:prettier" "check:pyright" = "npm run check:pyright" "check:renovateconfig" = "npm run check:renovateconfig" @@ -34,6 +35,7 @@ check = [ "check:mypy", "check:pytest", "check:github-actions", + "check:npm:dedupe", "check:renovateconfig" ]