Skip to content

Commit

Permalink
Merge branch 'main' into feature/error-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
intcreator authored Dec 16, 2024
2 parents f13aba2 + b1dbf69 commit 1d1b9f7
Show file tree
Hide file tree
Showing 21 changed files with 6,553 additions and 3,507 deletions.
60 changes: 0 additions & 60 deletions .eslintrc

This file was deleted.

27 changes: 16 additions & 11 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
":pinOnlyDevDependencies",
"npm:unpublishSafe",
"docker:pinDigests",
"helpers:pinGitHubActionDigests",
"helpers:pinGitHubActionDigestsToSemver",
"security:openssf-scorecard"
],
"ignorePresets": [
Expand All @@ -25,19 +25,26 @@
"osvVulnerabilityAlerts": true,
"packageRules": [
{
"matchPackagePatterns": ["*"],
"semanticCommitType": "chore"
"semanticCommitType": "chore",
"matchPackageNames": ["*"]
},
{
"matchDepTypes": ["dependencies"],
"matchUpdateTypes": ["minor", "patch"],
"semanticCommitType": "build",
"automerge": true,
"automergeType": "branch"
},
{
"matchDepTypes": ["dependencies"],
"matchUpdateTypes": ["major"],
"semanticCommitType": "build"
},
{
"matchDepTypes": ["action"],
"semanticCommitType": "ci",
"semanticCommitScope": "action"
},

{
"extends": ["monorepo:semantic-release"],
"groupName": "semantic-release related packages",
Expand All @@ -49,14 +56,13 @@
"matchUpdateTypes": ["digest", "patch", "minor", "major"]
},
{
"matchPackagePatterns": [
"@insurgent/conventional-changelog-preset",
"@insurgent/commitlint-config"
],
"groupName": "semantic-release related packages",
"matchUpdateTypes": ["digest", "patch", "minor", "major"]
"matchUpdateTypes": ["digest", "patch", "minor", "major"],
"matchPackageNames": [
"/@insurgent/conventional-changelog-preset/",
"/@insurgent/commitlint-config/"
]
},

{
"extends": ["packages:linters"],
"groupName": "linters",
Expand All @@ -67,7 +73,6 @@
"groupName": "tests",
"addLabels": ["tests"]
},

{
"matchDepTypes": ["devDependencies"],
"matchUpdateTypes": ["minor", "patch"],
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -49,7 +49,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -62,6 +62,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
category: '/language:${{matrix.language}}'
3 changes: 2 additions & 1 deletion .github/workflows/lint_pr_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f # v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0

- uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
# When the previous steps fails, the workflow would stop. By adding this
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
persist-credentials: false

- name: Use Node.js LTS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: 'lts/*'
cache: npm
Expand All @@ -47,3 +47,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
HUSKY: 0
10 changes: 5 additions & 5 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: 'Checkout code'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: 'Run analysis'
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -63,14 +63,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: 'Upload artifact'
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
uses: github/codeql-action/upload-sarif@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
sarif_file: results.sarif
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [16, 18, 20]
node: [16, 18, 20, 22]

runs-on: ${{ matrix.os }}
timeout-minutes: 5
Expand All @@ -38,15 +38,15 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

- name: Checkout project
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
with:
node-version: ${{ matrix.node }}
cache: 'npm'
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,6 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# husky local debugging helper scripts
.husky/_
7 changes: 0 additions & 7 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/usr/bin/env sh

# https://typicode.github.io/husky/guide.html#disable-husky-in-ci-docker-prod
[ -n "$CI" ] && exit 0

# only run commitlint on main (for admins pushing directly to branch)
[ "$(git rev-parse --abbrev-ref HEAD)" != "main" ] && exit 0

. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stable
Loading

0 comments on commit 1d1b9f7

Please sign in to comment.