From b74003b131f78e94efd4b6b1c8d60a1cae56f04f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 08:18:47 +0000 Subject: [PATCH 1/5] build(deps-dev): bump @types/vscode from 1.108.1 to 1.109.0 Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.108.1 to 1.109.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode) --- updated-dependencies: - dependency-name: "@types/vscode" dependency-version: 1.109.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8e8aa02..4e38820 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "@eslint/js": "^9.17.0", "@types/mocha": "^10.0.10", "@types/node": "22.x", - "@types/vscode": "^1.108.0", + "@types/vscode": "^1.109.0", "@vscode/test-cli": "^0.0.12", "@vscode/test-electron": "^2.4.1", "@vscode/vsce": "^3.2.2", @@ -990,9 +990,9 @@ "license": "MIT" }, "node_modules/@types/vscode": { - "version": "1.108.1", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.108.1.tgz", - "integrity": "sha512-DerV0BbSzt87TbrqmZ7lRDIYaMiqvP8tmJTzW2p49ZBVtGUnGAu2RGQd1Wv4XMzEVUpaHbsemVM5nfuQJj7H6w==", + "version": "1.109.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.109.0.tgz", + "integrity": "sha512-0Pf95rnwEIwDbmXGC08r0B4TQhAbsHQ5UyTIgVgoieDe4cOnf92usuR5dEczb6bTKEp7ziZH4TV1TRGPPCExtw==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 25f5571..7ff4f77 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "@eslint/js": "^9.17.0", "@types/mocha": "^10.0.10", "@types/node": "22.x", - "@types/vscode": "^1.108.0", + "@types/vscode": "^1.109.0", "@vscode/test-cli": "^0.0.12", "@vscode/test-electron": "^2.4.1", "@vscode/vsce": "^3.2.2", From 33761b7da0be75a3de2aef8385a5511a496f61d2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:25:52 +0000 Subject: [PATCH 2/5] Initial plan From 16b94003d77c37c95aa8291003930b52904a43fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:27:55 +0000 Subject: [PATCH 3/5] chore: update engines.vscode to ^1.109.0 and add auto-sync workflow Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com> --- .github/workflows/sync-vscode-engine.yml | 94 ++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sync-vscode-engine.yml diff --git a/.github/workflows/sync-vscode-engine.yml b/.github/workflows/sync-vscode-engine.yml new file mode 100644 index 0000000..62766f5 --- /dev/null +++ b/.github/workflows/sync-vscode-engine.yml @@ -0,0 +1,94 @@ +# This workflow automatically updates engines.vscode when @types/vscode has a major or minor version change +name: Sync VSCode Engine Version + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - 'package.json' + - 'package-lock.json' + +permissions: + contents: write + pull-requests: write + +jobs: + sync-vscode-engine: + # Only run for dependabot PRs + if: github.actor == 'dependabot[bot]' + runs-on: ubuntu-latest + + steps: + - name: Checkout PR branch + uses: actions/checkout@v6 + with: + ref: ${{ github.head_ref }} + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '22' + + - name: Check if @types/vscode was updated + id: check_update + run: | + # Get the PR title + PR_TITLE="${{ github.event.pull_request.title }}" + echo "PR Title: $PR_TITLE" + + # Check if this PR is about @types/vscode + if [[ "$PR_TITLE" == *"@types/vscode"* ]]; then + echo "types_vscode_updated=true" >> $GITHUB_OUTPUT + + # Extract version from package.json + TYPES_VERSION=$(node -p "require('./package.json').devDependencies['@types/vscode']" | sed 's/[\^~]//g') + echo "types_version=$TYPES_VERSION" >> $GITHUB_OUTPUT + echo "Found @types/vscode version: $TYPES_VERSION" + else + echo "types_vscode_updated=false" >> $GITHUB_OUTPUT + fi + + - name: Update engines.vscode + if: steps.check_update.outputs.types_vscode_updated == 'true' + run: | + TYPES_VERSION="${{ steps.check_update.outputs.types_version }}" + + # Extract major.minor from the version (e.g., 1.109.0 -> 1.109) + MAJOR_MINOR=$(echo "$TYPES_VERSION" | cut -d. -f1,2) + ENGINE_VERSION="^${MAJOR_MINOR}.0" + + echo "Setting engines.vscode to: $ENGINE_VERSION" + + # Update package.json using node + node -e " + const fs = require('fs'); + const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); + const currentEngine = pkg.engines.vscode; + const newEngine = '$ENGINE_VERSION'; + + console.log('Current engines.vscode:', currentEngine); + console.log('New engines.vscode:', newEngine); + + if (currentEngine !== newEngine) { + pkg.engines.vscode = newEngine; + fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); + console.log('Updated engines.vscode'); + process.exit(0); + } else { + console.log('No update needed'); + process.exit(1); + } + " + + # Store the exit code + echo "update_needed=$?" >> $GITHUB_ENV + + - name: Commit changes + if: steps.check_update.outputs.types_vscode_updated == 'true' && env.update_needed == '0' + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add package.json + git commit -m "chore: update engines.vscode to match @types/vscode version" + git push diff --git a/package.json b/package.json index 7ff4f77..3b64cd4 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "homepage": "https://github.com/tlcsdm/vscode-java-method-sorter#readme", "engines": { - "vscode": "^1.108.0" + "vscode": "^1.109.0" }, "categories": [ "Formatters", From 5070c2a678d5477f98ae03566dd6f923e69d43ee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:28:30 +0000 Subject: [PATCH 4/5] fix: correct workflow exit code logic Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com> --- .github/workflows/sync-vscode-engine.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sync-vscode-engine.yml b/.github/workflows/sync-vscode-engine.yml index 62766f5..6dc7997 100644 --- a/.github/workflows/sync-vscode-engine.yml +++ b/.github/workflows/sync-vscode-engine.yml @@ -51,6 +51,7 @@ jobs: - name: Update engines.vscode if: steps.check_update.outputs.types_vscode_updated == 'true' + id: update_engine run: | TYPES_VERSION="${{ steps.check_update.outputs.types_version }}" @@ -74,18 +75,22 @@ jobs: pkg.engines.vscode = newEngine; fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); console.log('Updated engines.vscode'); - process.exit(0); + console.log('changes_made=true'); } else { console.log('No update needed'); - process.exit(1); + console.log('changes_made=false'); } - " + " | tee /tmp/update-output.txt - # Store the exit code - echo "update_needed=$?" >> $GITHUB_ENV + # Extract the changes_made value from output + if grep -q "changes_made=true" /tmp/update-output.txt; then + echo "changes_made=true" >> $GITHUB_OUTPUT + else + echo "changes_made=false" >> $GITHUB_OUTPUT + fi - name: Commit changes - if: steps.check_update.outputs.types_vscode_updated == 'true' && env.update_needed == '0' + if: steps.check_update.outputs.types_vscode_updated == 'true' && steps.update_engine.outputs.changes_made == 'true' run: | git config --local user.email "github-actions[bot]@users.noreply.github.com" git config --local user.name "github-actions[bot]" From 10c2372c133465a5d723d14ccf95769693b3d368 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 5 Feb 2026 11:36:04 +0000 Subject: [PATCH 5/5] revert: rollback package.json engines.vscode change Co-authored-by: unknowIfGuestInDream <57802425+unknowIfGuestInDream@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3b64cd4..7ff4f77 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ }, "homepage": "https://github.com/tlcsdm/vscode-java-method-sorter#readme", "engines": { - "vscode": "^1.109.0" + "vscode": "^1.108.0" }, "categories": [ "Formatters",