diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6f3ff1..f284e80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,26 +3,22 @@ name: CI on: push: branches: [ "*" ] - tags: [ "v*" ] + tags-ignore: [ "**" ] pull_request: branches: [ main, develop ] - workflow_dispatch: jobs: test: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [24.x] steps: - name: Checkout code uses: actions/checkout@v5 - - name: Setup Node.js ${{ matrix.node-version }} + - name: Setup Node.js uses: actions/setup-node@v6 with: - node-version: ${{ matrix.node-version }} + node-version: '24.x' cache: 'npm' - name: Install dependencies @@ -41,7 +37,6 @@ jobs: - name: Run full test suite run: xvfb-run -a npm test - continue-on-error: false build: needs: test @@ -66,26 +61,9 @@ jobs: - name: Compile extension run: npm run vscode:prepublish - - name: Determine version suffix + - name: Get build SHA id: version - run: | - if [ "${{ github.ref }}" = "refs/heads/main" ]; then - echo "suffix=" >> $GITHUB_OUTPUT - echo "release_type=release" >> $GITHUB_OUTPUT - elif [ "${{ github.ref }}" = "refs/heads/debug" ]; then - echo "suffix=-debug" >> $GITHUB_OUTPUT - echo "release_type=debug" >> $GITHUB_OUTPUT - fi - echo "sha_short=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT - - - name: Update package.json version for non-main builds - if: github.ref != 'refs/heads/main' - run: | - # Get current version and append build info - CURRENT_VERSION=$(node -p "require('./package.json').version") - NEW_VERSION="${CURRENT_VERSION}${{ steps.version.outputs.suffix }}-${GITHUB_RUN_NUMBER}+${{ steps.version.outputs.sha_short }}" - npm version "$NEW_VERSION" --no-git-tag-version - echo "Updated version to: $NEW_VERSION" + run: echo "sha_short=$(echo ${{ github.sha }} | cut -c1-8)" >> $GITHUB_OUTPUT - name: Package extension run: vsce package @@ -95,52 +73,10 @@ jobs: run: | PACKAGE_FILE=$(ls *.vsix | head -1) echo "filename=$PACKAGE_FILE" >> $GITHUB_OUTPUT - echo "name=$(basename "$PACKAGE_FILE" .vsix)" >> $GITHUB_OUTPUT - name: Upload VSIX artifact uses: actions/upload-artifact@v4 with: - name: vscode-extension-${{ steps.version.outputs.release_type }}-${{ steps.version.outputs.sha_short }} + name: vscode-extension-${{ steps.version.outputs.sha_short }} path: ${{ steps.package.outputs.filename }} retention-days: 30 - - release: - name: Update release info - needs: build - runs-on: ubuntu-latest - timeout-minutes: 10 - if: startsWith(github.ref, 'refs/tags/v') - permissions: - contents: write - - steps: - - name: Get version from tag - id: version - run: | - VERSION=${GITHUB_REF#refs/tags/v} - echo "version=$VERSION" >> $GITHUB_OUTPUT - echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT - - - name: Download VSIX artifact - uses: actions/download-artifact@v4 - with: - pattern: vscode-extension-* - merge-multiple: true - - - name: Get package filename - id: package - run: | - PACKAGE_FILE=$(ls *.vsix | head -1) - echo "filename=$PACKAGE_FILE" >> $GITHUB_OUTPUT - - - name: Create release - id: release - uses: secondlife-3p/action-gh-release@v1 - with: - # name the release page for the branch - name: "SL-VScode Plugin ${{ steps.version.outputs.version }} Release" - prerelease: true - generate_release_notes: true - target_commitish: ${{ github.sha }} - append_body: true - files: ${{ steps.package.outputs.filename }} diff --git a/.github/workflows/generate-release-notes.yml b/.github/workflows/generate-release-notes.yml new file mode 100644 index 0000000..ed5a7c4 --- /dev/null +++ b/.github/workflows/generate-release-notes.yml @@ -0,0 +1,48 @@ +name: Generate Release Notes + +on: + workflow_call: + inputs: + tag_name: + description: Tag name to generate release notes for + required: true + type: string + target_commitish: + description: Branch or commit SHA used as target for note generation + required: true + type: string + outputs: + release_notes: + description: Generated release notes body + value: ${{ jobs.generate.outputs.release_notes }} + +permissions: + contents: read + +jobs: + generate: + runs-on: ubuntu-latest + outputs: + release_notes: ${{ steps.generate.outputs.release_notes }} + + steps: + - name: Generate release notes body + id: generate + uses: actions/github-script@v7 + env: + TAG_NAME: ${{ inputs.tag_name }} + TARGET_COMMITISH: ${{ inputs.target_commitish }} + with: + script: | + const { owner, repo } = context.repo; + const tag_name = process.env.TAG_NAME; + const target_commitish = process.env.TARGET_COMMITISH; + + const response = await github.rest.repos.generateReleaseNotes({ + owner, + repo, + tag_name, + target_commitish, + }); + + core.setOutput('release_notes', response.data.body || ''); diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 18a488f..debd5c3 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -7,7 +7,6 @@ on: branches: [main, develop] permissions: - id-token: write contents: read jobs: @@ -20,18 +19,15 @@ jobs: - name: Setup Node uses: actions/setup-node@v6 with: - node-version: 'latest' + node-version: '24.x' cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Setup Python uses: actions/setup-python@v6 with: python-version: '3.x' - - name: Install pre-commit - run: pip install pre-commit - - name: Run pre-commit checks - run: pre-commit run --all-files + uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..055859b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,482 @@ +name: Cut Release + +on: + workflow_dispatch: + inputs: + tag_name: + description: Release tag to create, for example v1.0.3 + required: true + type: string + target_commitish: + description: Branch or commit SHA the tag should point to + required: true + default: develop + type: string + prerelease: + description: Mark the GitHub release as a prerelease + required: true + default: true + type: boolean + draft: + description: Create the GitHub release as a draft + required: true + default: false + type: boolean + publish_marketplace: + description: Publish the extension to the VS Code Marketplace + required: true + default: false + type: boolean + +permissions: + contents: write + pull-requests: write + +jobs: + authorize_actor: + name: Authorize triggering user + runs-on: ubuntu-latest + steps: + - name: Ensure actor has access + uses: actions/github-script@v7 + with: + script: | + const { owner, repo } = context.repo; + const username = context.actor; + + const response = await github.rest.repos.getCollaboratorPermissionLevel({ + owner, + repo, + username, + }); + + const allowed = ['admin', 'maintain']; + + if (!allowed.includes(response.data.permission)) { + core.setFailed( + `${username} must have maintain or admin access to run this workflow. Current permission: ${response.data.permission}` + ); + return; + } + + core.info(`${username} is authorized with permission: ${response.data.permission}`); + + validate: + name: Validate release inputs + needs: authorize_actor + runs-on: ubuntu-latest + outputs: + version: ${{ steps.set_variables.outputs.version }} + steps: + - name: Validate + shell: bash + run: | + if [ -z "${{ inputs.tag_name }}" ]; then + echo "tag_name is required and cannot be empty" >&2 + exit 1 + fi + + # Enforce plain vX.Y.Z — no pre-release suffixes or build metadata. + # The VS Code Marketplace does not support SemVer pre-release identifiers in + # extension versions. Use an odd minor number (e.g. v1.3.0) with the + # prerelease input flag instead of a suffix like v1.2.3-rc.1. + if [[ ! "${{ inputs.tag_name }}" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$ ]]; then + echo "tag_name must be plain vX.Y.Z (for example v1.0.3)." >&2 + echo "The VS Code Marketplace does not support pre-release suffixes in version numbers." >&2 + echo "Use an odd minor version (e.g. v1.3.0) with the prerelease flag for pre-release builds." >&2 + exit 1 + fi + + # Enforce odd/even minor version convention: + # even minor (0, 2, 4, ...) → stable release (prerelease must be false) + # odd minor (1, 3, 5, ...) → pre-release (prerelease must be true) + MINOR=$(echo "${{ inputs.tag_name }}" | cut -d. -f2) + IS_PRERELEASE="${{ inputs.prerelease }}" + if (( MINOR % 2 == 0 )) && [[ "$IS_PRERELEASE" == "true" ]]; then + echo "Even minor version (${{ inputs.tag_name }}) must not be marked as prerelease." >&2 + echo "Even minor = stable release. Use an odd minor version for pre-release builds." >&2 + exit 1 + fi + if (( MINOR % 2 == 1 )) && [[ "$IS_PRERELEASE" == "false" ]]; then + echo "Odd minor version (${{ inputs.tag_name }}) must be marked as prerelease." >&2 + echo "Odd minor = pre-release. Use an even minor version for stable releases." >&2 + exit 1 + fi + + echo "tag_name=${{ inputs.tag_name }}" >&2 + echo "target_commitish=${{ inputs.target_commitish }}" >&2 + echo "prerelease=${{ inputs.prerelease }}" >&2 + echo "draft=${{ inputs.draft }}" >&2 + + - name: Set Variables + id: set_variables + shell: bash + run: | + TAG_NAME="${{ inputs.tag_name }}" + SEMANTIC_VERSION="${TAG_NAME#v}" + echo "version=$SEMANTIC_VERSION" >> "$GITHUB_OUTPUT" + echo "version=$SEMANTIC_VERSION" >&2 + + release_notes: + needs: validate + name: Generate release notes + runs-on: ubuntu-latest + outputs: + release_notes: ${{ steps.generate.outputs.release_notes }} + permissions: + contents: write + + steps: + - name: Generate release notes body + id: generate + uses: actions/github-script@v7 + env: + TAG_NAME: ${{ inputs.tag_name }} + TARGET_COMMITISH: ${{ inputs.target_commitish }} + with: + script: | + const { owner, repo } = context.repo; + const tag_name = process.env.TAG_NAME; + const target_commitish = process.env.TARGET_COMMITISH; + + const response = await github.rest.repos.generateReleaseNotes({ + owner, + repo, + tag_name, + target_commitish, + }); + + core.setOutput('release_notes', response.data.body || ''); + + - name: Checkout target branch + uses: actions/checkout@v5 + with: + ref: ${{ inputs.target_commitish }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '24.x' + cache: 'npm' + + - name: Update version + shell: bash + run: | + VERSION="${{ needs.validate.outputs.version }}" + npm version "$VERSION" --no-git-tag-version --allow-same-version + + - name: Write release notes file + shell: bash + env: + RELEASE_NOTES: ${{ steps.generate.outputs.release_notes }} + run: | + printf '%s\n' "$RELEASE_NOTES" > release_notes.md + + - name: Update CHANGELOG.md + shell: bash + run: | + VERSION="${{ needs.validate.outputs.version }}" + RELEASE_DATE=$(date -u +%Y-%m-%d) + + { + echo "## [${VERSION}] - ${RELEASE_DATE}" + echo + cat release_notes.md + echo + } > changelog_entry.md + + awk ' + BEGIN { inserted = 0 } + /^## \[/ && inserted == 0 { + while ((getline line < "changelog_entry.md") > 0) print line + close("changelog_entry.md") + print "" + inserted = 1 + } + { print } + END { + if (inserted == 0) { + print "" + while ((getline line < "changelog_entry.md") > 0) print line + close("changelog_entry.md") + } + } + ' CHANGELOG.md > CHANGELOG.new.md + + mv CHANGELOG.new.md CHANGELOG.md + cat CHANGELOG.md >&2 + + - name: Update README badges from package.json + shell: bash + run: | + node - <<'NODE' + const fs = require('fs'); + + const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); + let vscodeVersion = pkg.engines && pkg.engines.vscode ? String(pkg.engines.vscode) : ''; + + if (vscodeVersion.startsWith('^')) { + vscodeVersion = `${vscodeVersion.slice(1)}+`; + } + + const versionBadge = `[![Version](https://img.shields.io/badge/version-${pkg.version}-blue.svg)](https://github.com/secondlife/sl-vscode-plugin)`; + const licenseBadge = `[![License](https://img.shields.io/badge/license-${pkg.license}-green.svg)](LICENSE)`; + const vscodeBadge = `[![VS Code](https://img.shields.io/badge/VS%20Code-${encodeURIComponent(vscodeVersion)}-red.svg)](https://code.visualstudio.com/)`; + + let readme = fs.readFileSync('README.md', 'utf8'); + + readme = readme.replace(/^\[!\[Version\]\(https:\/\/img\.shields\.io\/badge\/version-[^)]+\)\]\(https:\/\/github\.com\/secondlife\/sl-vscode-plugin\)$/m, versionBadge); + readme = readme.replace(/^\[!\[License\]\(https:\/\/img\.shields\.io\/badge\/license-[^)]+\)\]\(LICENSE\)$/m, licenseBadge); + readme = readme.replace(/^\[!\[VS Code\]\(https:\/\/img\.shields\.io\/badge\/VS%20Code-[^)]+\)\]\(https:\/\/code\.visualstudio\.com\/\)$/m, vscodeBadge); + + fs.writeFileSync('README.md', readme); + NODE + + - name: Package modified files for downstream jobs + shell: bash + run: | + rm -rf release-notes-files + mkdir -p release-notes-files + + git ls-files -m > modified-files.txt + git ls-files --others --exclude-standard >> modified-files.txt + + if [ ! -s modified-files.txt ]; then + echo "No modified files detected" >&2 + else + while IFS= read -r file; do + if [ -n "$file" ] && [ -e "$file" ]; then + mkdir -p "release-notes-files/$(dirname "$file")" + cp "$file" "release-notes-files/$file" + fi + done < modified-files.txt + fi + + - name: Upload modified files artifact + uses: actions/upload-artifact@v4 + with: + name: release-notes-modified-files-${{ github.run_id }} + path: | + release-notes-files + modified-files.txt + retention-days: 1 + + # - name: Commit and push changelog update + # shell: bash + # run: | + # TARGET_BRANCH="${{ inputs.target_commitish }}" + # TARGET_BRANCH="${TARGET_BRANCH#refs/heads/}" + + # if ! git ls-remote --exit-code --heads origin "$TARGET_BRANCH" > /dev/null; then + # echo "target_commitish must be a branch name (or refs/heads/) to update CHANGELOG.md" >&2 + # echo "Received: ${{ inputs.target_commitish }}" >&2 + # exit 1 + # fi + + # git config user.name "github-actions[bot]" + # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + # git add CHANGELOG.md + + # if git diff --cached --quiet; then + # echo "No changelog changes to commit" + # exit 0 + # fi + + # git commit -m "docs: update changelog for ${{ inputs.tag_name }}" + # git push origin HEAD:$TARGET_BRANCH + + build: + needs: release_notes + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v5 + with: + ref: ${{ inputs.target_commitish }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '24.x' + cache: 'npm' + + - name: Download modified files artifact + uses: actions/download-artifact@v4 + with: + name: release-notes-modified-files-${{ github.run_id }} + path: . + + - name: Apply modified files from release_notes job + shell: bash + run: | + if [ -d release-notes-files ]; then + cp -R release-notes-files/. . + fi + + - name: Create release branch, commit, and push tag + shell: bash + run: | + TARGET_BRANCH="${{ inputs.target_commitish }}" + TARGET_BRANCH="${TARGET_BRANCH#refs/heads/}" + RELEASE_BRANCH="release/${{ inputs.tag_name }}" + + if ! git ls-remote --exit-code --heads origin "$TARGET_BRANCH" > /dev/null; then + echo "target_commitish must be a branch name (or refs/heads/) to create a release branch" >&2 + echo "Received: ${{ inputs.target_commitish }}" >&2 + exit 1 + fi + + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + git checkout -b "$RELEASE_BRANCH" + git add -u + + if git diff --cached --quiet; then + echo "No repository changes to commit" + else + git commit -m "chore: prepare release ${{ inputs.tag_name }}" + fi + + git push origin "$RELEASE_BRANCH" + + git tag -a "${{ inputs.tag_name }}" -m "Release ${{ inputs.tag_name }}" + git push origin "refs/tags/${{ inputs.tag_name }}" + + - name: Create release PRs + uses: actions/github-script@v7 + env: + RELEASE_NOTES: ${{ needs.release_notes.outputs.release_notes }} + with: + script: | + const { owner, repo } = context.repo; + const releaseBranch = `release/${{ inputs.tag_name }}`; + const tagName = '${{ inputs.tag_name }}'; + const prTitle = `chore: prepare release ${tagName}`; + const releaseNotes = process.env.RELEASE_NOTES || ''; + const prBody = `Automated release PR for ${tagName}.\n\nUpdates CHANGELOG.md, package.json version, and README badges.\n\n## Release Notes\n\n${releaseNotes}`; + + for (const base of ['develop', 'main']) { + try { + const pr = await github.rest.pulls.create({ + owner, + repo, + title: prTitle, + head: releaseBranch, + base, + body: prBody, + }); + core.info(`Created PR into ${base}: ${pr.data.html_url}`); + } catch (err) { + core.warning(`Failed to create PR into ${base}: ${err.message}`); + } + } + + - name: Install dependencies + run: npm install + + - name: Compile extension + run: npm run vscode:prepublish + + - name: Install vsce + run: npm install -g @vscode/vsce + + - name: Package extension + run: vsce package + + - name: Get package filename + id: package + shell: bash + run: | + PACKAGE_FILE=$(ls *.vsix | head -1) + echo "filename=$PACKAGE_FILE" >> "$GITHUB_OUTPUT" + + - name: Upload VSIX artifact + uses: actions/upload-artifact@v4 + with: + name: vscode-extension-release-${{ github.run_id }} + path: ${{ steps.package.outputs.filename }} + retention-days: 30 + + release: + name: Publish release + needs: [build, release_notes, validate] + runs-on: ubuntu-latest + + steps: + - name: Download VSIX artifact + uses: actions/download-artifact@v4 + with: + name: vscode-extension-release-${{ github.run_id }} + path: vsix/ + + - name: Download modified files artifact + uses: actions/download-artifact@v4 + with: + name: release-notes-modified-files-${{ github.run_id }} + path: . + + - name: Apply modified files from release_notes job + shell: bash + run: | + if [ -d release-notes-files ]; then + cp -R release-notes-files/. . + fi + + - name: Get package filename + id: package + shell: bash + run: | + PACKAGE_FILE=$(ls vsix/*.vsix | head -1) + echo "filename=$PACKAGE_FILE" >> "$GITHUB_OUTPUT" + + - name: Create release page + id: release + uses: secondlife-3p/action-gh-release@v1 + with: + # name the release page for the branch + tag_name: ${{ inputs.tag_name }} + target_commitish: ${{ inputs.target_commitish }} + name: "SL-VScode Plugin ${{ needs.validate.outputs.version }} Release" + prerelease: ${{ inputs.prerelease }} + draft: ${{ inputs.draft }} + body_path: release_notes.md + files: ${{ steps.package.outputs.filename }} + + publish: + name: Publish to VS Code Marketplace + needs: [release, build, validate] + runs-on: ubuntu-latest + # Skip if publish not requested or if this is a draft release + if: ${{ inputs.publish_marketplace && !inputs.draft }} + + steps: + - name: Download VSIX artifact + uses: actions/download-artifact@v4 + with: + name: vscode-extension-release-${{ github.run_id }} + path: vsix/ + + - name: Get package filename + id: package + shell: bash + run: | + PACKAGE_FILE=$(ls vsix/*.vsix | head -1) + echo "filename=$PACKAGE_FILE" >> "$GITHUB_OUTPUT" + + - name: Publish to Marketplace + shell: bash + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }} + run: | + npm install -g @vscode/vsce + + if [[ "${{ inputs.prerelease }}" == "true" ]]; then + echo "Publishing pre-release to Marketplace..." >&2 + vsce publish --pre-release --packagePath "${{ steps.package.outputs.filename }}" --pat "$VSCE_PAT" + else + echo "Publishing stable release to Marketplace..." >&2 + vsce publish --packagePath "${{ steps.package.outputs.filename }}" --pat "$VSCE_PAT" + fi diff --git a/package-lock.json b/package-lock.json index befb184..a4cc9ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sl-vscode-plugin", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sl-vscode-plugin", - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", @@ -29,7 +29,6 @@ "eslint": "^9.34.0", "glob": "^11.1.0", "mocha": "^10.0.0", - "pre-commit": "^1.2.2", "typescript": "^5.9.2" }, "engines": { @@ -525,7 +524,6 @@ "integrity": "sha512-r1XG74QgShUgXph1BYseJ+KZd17bKQib/yF3SR+demvytiRXrwd12Blnz5eYGm8tXaeRdd4x88MlfwldHoudGg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.42.0", "@typescript-eslint/types": "8.42.0", @@ -932,7 +930,6 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1084,13 +1081,6 @@ "dev": true, "license": "ISC" }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true, - "license": "MIT" - }, "node_modules/c8": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", @@ -1329,22 +1319,6 @@ "dev": true, "license": "MIT" }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "license": "MIT", - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -1479,7 +1453,6 @@ "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.12.1", @@ -2849,15 +2822,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha512-jd0cvB8qQ5uVt0lvCIexBaROw1KyKm5sbulg2fWOHjETisuCzWyt+eTZKEMs8v6HwzoGs8xik26jg7eCM6pS+A==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -2984,78 +2948,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/pre-commit": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", - "integrity": "sha512-qokTiqxD6GjODy5ETAIgzsRgnBWWQHQH2ghy86PU7mIn/wuWeTwF3otyNQZxWBwVn8XNr8Tdzj/QfUXpH+gRZA==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "cross-spawn": "^5.0.1", - "spawn-sync": "^1.0.15", - "which": "1.2.x" - } - }, - "node_modules/pre-commit/node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==", - "dev": true, - "license": "MIT", - "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "node_modules/pre-commit/node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "license": "ISC", - "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "node_modules/pre-commit/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", - "dev": true, - "license": "MIT", - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pre-commit/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pre-commit/node_modules/which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw==", - "dev": true, - "license": "ISC", - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -3073,13 +2965,6 @@ "dev": true, "license": "MIT" }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==", - "dev": true, - "license": "ISC" - }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -3294,18 +3179,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha512-9DWBgrgYZzNghseho0JOuh+5fg9u6QWhAWa51QC7+U5rCheZ/j1DrEZnyE0RBBRqZ9uEXGPgSSM0nky6burpVw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "dependencies": { - "concat-stream": "^1.4.7", - "os-shim": "^0.1.2" - } - }, "node_modules/stdin-discarder": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.2.tgz", @@ -3569,20 +3442,12 @@ "node": ">= 0.8.0" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true, - "license": "MIT" - }, "node_modules/typescript": { "version": "5.9.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -3846,13 +3711,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==", - "dev": true, - "license": "ISC" - }, "node_modules/yargs": { "version": "17.7.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", diff --git a/package.json b/package.json index 88a3cb1..39e17a1 100644 --- a/package.json +++ b/package.json @@ -204,7 +204,6 @@ "eslint": "^9.34.0", "glob": "^11.1.0", "mocha": "^10.0.0", - "pre-commit": "^1.2.2", "typescript": "^5.9.2" }, "dependencies": {