Skip to content

Bump webpack from 5.109.2 to 5.110.1 #627

Bump webpack from 5.109.2 to 5.110.1

Bump webpack from 5.109.2 to 5.110.1 #627

Workflow file for this run

# Copyright (C) 2019-2025
# Julian Valentin, Daniel Spitzer, LTeX+ Development Community
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
name: "CI"
on:
push:
branches:
- "*"
tags:
- "*"
pull_request:
branches:
- "develop"
release:
types:
- "published"
workflow_dispatch:
jobs:
buildForVsCode:
name: "CI - Build for VS Code Job"
if: "${{ github.event_name != 'release' }}"
runs-on: "${{ matrix.os }}"
permissions:
contents: read
strategy:
matrix:
os:
- "ubuntu-latest"
- "ubuntu-24.04-arm"
- "macos-latest"
- "windows-latest"
- "windows-11-arm"
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v7"
- name: "Set up Node.js"
uses: "actions/setup-node@v7"
with:
node-version: 22
- name: "Install Node.js Dependencies"
run: "npm install && npm install -g @vscode/vsce"
- name: "Set up Python"
uses: "actions/setup-python@v7"
with:
python-version: "3.13"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install semver"
- name: "Start X Virtual Frame Buffer"
if: "${{ startsWith(matrix.os, 'ubuntu-') }}"
run: "echo \"DISPLAY=:99.0\" >> $GITHUB_ENV && Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &"
- name: "Build Package with vsce"
run: "vsce package"
- name: "Run Biome (Linux)"
if: "${{ startsWith(matrix.os, 'ubuntu-') }}"
run: "npm run lint"
- name: "Run Mocha Tests (Linux)"
if: "${{ startsWith(matrix.os, 'ubuntu-') }}"
env:
LTEX_GITHUB_OAUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# to suppress "async hook stack has become corrupted" errors
# (https://github.com/microsoft/vscode/issues/85601)
NODE_OPTIONS: "--no-force-async-hooks-checks"
run: "npm run test"
- name: "Run Mocha Tests (Windows)"
if: "${{ startsWith(matrix.os, 'windows-') }}"
env:
LTEX_GITHUB_OAUTH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# to suppress "async hook stack has become corrupted" errors
# (https://github.com/microsoft/vscode/issues/85601)
NODE_OPTIONS: "--no-force-async-hooks-checks"
# otherwise, git clean fails to remove lib/ with "Invalid argument" errors
run: "npm run --fast test"
validate:
name: "CI - Validate Job"
if: "${{ github.event_name != 'release' }}"
runs-on: "ubuntu-latest"
permissions:
contents: read
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v7"
- name: "Set up Python"
uses: "actions/setup-python@v7"
with:
python-version: "3.13"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install jsonschema xmlschema"
- name: "Validate changelog.xml"
run: "python -u -c 'import xmlschema; xmlschema.XMLSchema(\"schemas/changes-1.0.0.xsd\").validate(\"changelog.xml\")'"
- name: "Validate JSON files"
run: "python -u tools/validateJsonFiles.py"
deployForVsCode:
name: "CI - Deploy for VS Code Job"
if: "${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}"
needs:
- "buildForVsCode"
- "validate"
runs-on: "ubuntu-latest"
permissions:
contents: write
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v7"
- name: "Set up Node.js"
uses: "actions/setup-node@v7"
with:
node-version: 22
- name: "Install Node.js Dependencies"
run: "npm install && npm install -g @vscode/vsce ovsx"
- name: "Set up Python"
uses: "actions/setup-python@v7"
with:
python-version: "3.13"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install semver"
- name: "Set VSCODE_LTEX_VERSION"
run: "echo \"VSCODE_LTEX_VERSION=$(python -u -c \"import json; print(json.load(open('package.json', 'r'))['version'], end='')\")\" >> $GITHUB_ENV"
- name: "Check VSCODE_LTEX_VERSION"
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_VERSION set to '$VSCODE_LTEX_VERSION'\""
- name: "Set VSCODE_LTEX_IS_PRERELEASE"
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE=$(python -u -c \"import semver; print('true' if semver.VersionInfo.parse('$VSCODE_LTEX_VERSION').prerelease is not None else 'false', end='')\")\" >> $GITHUB_ENV"
- name: "Check VSCODE_LTEX_IS_PRERELEASE"
run: "if [[ -z \"$VSCODE_LTEX_IS_PRERELEASE\" ]]; then echo 'Error: VSCODE_LTEX_IS_PRERELEASE not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE set to '$VSCODE_LTEX_IS_PRERELEASE'\""
- name: "Write release notes"
# Write the notes to a file and feed gh via --notes-file. Passing the
# multi-line changelog inline (--notes='${{ ... }}') breaks shell quoting:
# apostrophes in the prose close the quote and the markdown runs as commands.
# Use the actual version, not 'latest' -- 'latest' resolves to the topmost
# changelog entry, which is the still-upcoming next version (empty notes).
run: |
if [ "$VSCODE_LTEX_IS_PRERELEASE" = "false" ]; then
python -u tools/convertChangelog.py --xml-file changelog.xml --version "$VSCODE_LTEX_VERSION" > release-notes.md
else
echo "This is a pre-release. Use at your own risk." > release-notes.md
fi
- name: "Build Package with vsce"
run: "vsce package"
- name: "Build Offline Packages"
run: "python -u tools/createOfflinePackages.py"
- name: "Create GitHub Release"
# Stage as a draft so a maintainer can review the release and its assets,
# then publish it manually (uncheck the draft box on the release page).
run: >
gh release create ${{ github.ref_name }}
--draft
--prerelease=${{ env.VSCODE_LTEX_IS_PRERELEASE }}
--title='${{ env.VSCODE_LTEX_VERSION }}'
--notes-file release-notes.md
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-linux-x64.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-mac-x64.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-windows-x64.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-linux-aarch64.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-mac-aarch64.vsix'
'vscode-ltex-plus-${{ env.VSCODE_LTEX_VERSION }}-offline-windows-aarch64.vsix'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publishForVsCode:
name: "CI - Publish for VS Code Job"
if: "${{ github.event_name == 'release' }}"
runs-on: "ubuntu-latest"
permissions:
contents: read
steps:
- name: "Checkout Repository"
uses: "actions/checkout@v7"
with:
ref: "${{ github.event.release.tag_name }}"
- name: "Set up Node.js"
uses: "actions/setup-node@v7"
with:
node-version: 22
- name: "Install Node.js Dependencies"
run: "npm install -g @vscode/vsce ovsx"
- name: "Set up Python"
uses: "actions/setup-python@v7"
with:
python-version: "3.13"
- name: "Install Python Dependencies"
run: "python -u -m pip install --upgrade pip && pip install semver"
- name: "Set VSCODE_LTEX_VERSION"
run: "echo \"VSCODE_LTEX_VERSION=$(python -u -c \"import json; print(json.load(open('package.json', 'r'))['version'], end='')\")\" >> $GITHUB_ENV"
- name: "Check VSCODE_LTEX_VERSION"
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_VERSION set to '$VSCODE_LTEX_VERSION'\""
- name: "Set VSCODE_LTEX_IS_PRERELEASE"
run: "if [[ -z \"$VSCODE_LTEX_VERSION\" ]]; then echo 'Error: VSCODE_LTEX_VERSION not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE=$(python -u -c \"import semver; print('true' if semver.VersionInfo.parse('$VSCODE_LTEX_VERSION').prerelease is not None else 'false', end='')\")\" >> $GITHUB_ENV"
- name: "Check VSCODE_LTEX_IS_PRERELEASE"
run: "if [[ -z \"$VSCODE_LTEX_IS_PRERELEASE\" ]]; then echo 'Error: VSCODE_LTEX_IS_PRERELEASE not set!'; (exit 1); fi; echo \"VSCODE_LTEX_IS_PRERELEASE set to '$VSCODE_LTEX_IS_PRERELEASE'\""
- name: "Download the Reviewed VSIX from the Release"
if: "${{ env.VSCODE_LTEX_IS_PRERELEASE == 'false' }}"
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: "gh release download \"${{ github.event.release.tag_name }}\" --repo \"${{ github.repository }}\" --pattern \"vscode-ltex-plus-$VSCODE_LTEX_VERSION.vsix\""
- name: "Publish Package on VS Marketplace"
if: "${{ env.VSCODE_LTEX_IS_PRERELEASE == 'false' }}"
env:
VSCODE_LTEX_VSCE_TOKEN: "${{ secrets.VSCODE_LTEX_VSCE_TOKEN }}"
run: "vsce publish -p \"$VSCODE_LTEX_VSCE_TOKEN\" --packagePath \"vscode-ltex-plus-$VSCODE_LTEX_VERSION.vsix\""
- name: "Publish Package on Open VSX"
if: "${{ env.VSCODE_LTEX_IS_PRERELEASE == 'false' }}"
env:
VSCODE_LTEX_OVSX_TOKEN: "${{ secrets.VSCODE_LTEX_OVSX_TOKEN }}"
run: "ovsx publish \"vscode-ltex-plus-$VSCODE_LTEX_VERSION.vsix\" -p \"$VSCODE_LTEX_OVSX_TOKEN\""