Some more cleanup

This commit is contained in:
2025-07-15 11:10:06 -05:00
parent 90df726b47
commit 9b25a964f7
6 changed files with 11 additions and 175 deletions

View File

@@ -1,26 +0,0 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
versioning-strategy: auto
labels:
- "dependencies"
commit-message:
prefix: "chore"
include: "scope"
allow:
- dependency-type: "direct"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
labels:
- "dependencies"
- "github-actions"

View File

@@ -1,45 +0,0 @@
name: CI - Dependabot Auto-merge
on:
pull_request:
branches: [main]
permissions:
contents: write
pull-requests: write
checks: read
jobs:
auto-merge-dependabot:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Run linting
run: npm run lint
- name: Auto-approve PR
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
if: success()
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,37 +0,0 @@
name: CI - Dependency Check
on:
schedule:
- cron: '0 5 * * 1' # Run at 5 AM UTC every Monday
workflow_dispatch: # Allow manual triggering
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run npm audit
run: npm audit
- name: Check for outdated dependencies
run: npm outdated || true
- name: Run tests
run: npm test
- name: Run linting
run: npm run lint
- name: Build project
run: npm run build

View File

@@ -1,66 +0,0 @@
name: CI - Semantic Release
# This workflow is triggered on every push to the main branch
# It analyzes commits and automatically releases a new version when needed
on:
push:
branches: [main]
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
# Permissions needed for creating releases, updating issues, and publishing packages
permissions:
contents: write # Needed to create releases and tags
issues: write # Needed to comment on issues
pull-requests: write # Needed to comment on pull requests
# packages permission removed as we're not using GitHub Packages
steps:
# Step 1: Check out the full Git history for proper versioning
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetches all history for all branches and tags
# Step 2: Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22 # Using Node.js 22
cache: 'npm' # Enable npm caching
# Step 3: Install dependencies with clean install
- name: Install dependencies
run: npm ci # Clean install preserving package-lock.json
# Step 4: Build the package
- name: Build
run: npm run build # Compiles TypeScript to JavaScript
# Step 5: Ensure executable permissions
- name: Set executable permissions
run: chmod +x dist/index.js
# Step 6: Run tests to ensure quality
- name: Verify tests
run: npm test # Runs Jest tests
# Step 7: Configure Git identity for releases
- name: Configure Git User
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
# Step 8: Run semantic-release to analyze commits and publish to npm
- name: Semantic Release
id: semantic
env:
# Tokens needed for GitHub and npm authentication
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For creating releases and commenting
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # For publishing to npm
run: |
echo "Running semantic-release for version bump and npm publishing"
npx semantic-release
# Note: GitHub Packages publishing has been removed

View File

@@ -42,5 +42,16 @@ export default tseslint.config(
'@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-unused-vars': 'off',
}, },
}, },
// Rules for scripts
{
files: ['scripts/**/*.js'], // Target all JS files in the scripts directory
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
env: {
node: true, // Enable Node.js global variables and Node.js scoping
},
},
eslintConfigPrettier, eslintConfigPrettier,
); );

View File

@@ -20,7 +20,6 @@
"test": "jest", "test": "jest",
"test:coverage": "jest --coverage", "test:coverage": "jest --coverage",
"lint": "eslint src --ext .ts --config eslint.config.mjs", "lint": "eslint src --ext .ts --config eslint.config.mjs",
"update:deps": "npx npm-check-updates -u && npm install --legacy-peer-deps",
"format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'", "format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
"cli": "npm run build && node dist/index.js", "cli": "npm run build && node dist/index.js",
"mcp:stdio": "TRANSPORT_MODE=stdio npm run build && node dist/index.js", "mcp:stdio": "TRANSPORT_MODE=stdio npm run build && node dist/index.js",