From e797f83bcb11b83ae66e0230d6156d7c80228e7c Mon Sep 17 00:00:00 2001 From: Salman Chishti Date: Thu, 4 Sep 2025 03:57:37 +0100 Subject: [PATCH] Upgrade to node 24 (#1164) * Upgrade to node 24 Upgrade ot node * licence manual updates * pckage.json version update * version update * update package-lock.json * upgrade `actions/checkout` to v5 and `actions/setup-python` to v6 in README.md * upgrade `actions/checkout` to v5 and `actions/setup-python` to v6 in advanced-usage.md Updated GitHub Actions to use newer versions of checkout and setup-python actions. * node-version update in the workflows --------- Co-authored-by: Aparna Jyothi Co-authored-by: priya-kinthali <147703874+priya-kinthali@users.noreply.github.com> --- .github/workflows/basic-validation.yml | 2 +- .github/workflows/check-dist.yml | 2 +- .licenses/npm/@types/node.dep.yml | 2 +- .licenses/npm/undici-types.dep.yml | 2 +- README.md | 20 ++-- action.yml | 2 +- docs/advanced-usage.md | 130 ++++++++++++------------- package-lock.json | 25 +++-- package.json | 7 +- 9 files changed, 100 insertions(+), 92 deletions(-) diff --git a/.github/workflows/basic-validation.yml b/.github/workflows/basic-validation.yml index 5f62ec31..cc83c365 100644 --- a/.github/workflows/basic-validation.yml +++ b/.github/workflows/basic-validation.yml @@ -14,4 +14,4 @@ jobs: name: Basic validation uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main with: - node-version: '20.x' + node-version: '24.x' diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 509ea6cc..90ef986a 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -16,4 +16,4 @@ jobs: name: Check dist/ uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main with: - node-version: '20.x' + node-version: '24.x' diff --git a/.licenses/npm/@types/node.dep.yml b/.licenses/npm/@types/node.dep.yml index 4773dad7..86544f48 100644 --- a/.licenses/npm/@types/node.dep.yml +++ b/.licenses/npm/@types/node.dep.yml @@ -1,6 +1,6 @@ --- name: "@types/node" -version: 20.11.25 +version: 24.1.0 type: npm summary: TypeScript definitions for node homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node diff --git a/.licenses/npm/undici-types.dep.yml b/.licenses/npm/undici-types.dep.yml index a65b8aff..b6cb69f7 100644 --- a/.licenses/npm/undici-types.dep.yml +++ b/.licenses/npm/undici-types.dep.yml @@ -1,6 +1,6 @@ --- name: undici-types -version: 5.26.5 +version: 7.8.0 type: npm summary: A stand-alone types package for Undici homepage: https://undici.nodejs.org diff --git a/README.md b/README.md index c3f16cf6..173c0976 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ See [action.yml](action.yml) **Python** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' - run: python my_script.py @@ -28,8 +28,8 @@ steps: **PyPy** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: 'pypy3.10' - run: python my_script.py @@ -38,8 +38,8 @@ steps: **GraalPy** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: 'graalpy-24.0' - run: python my_script.py @@ -48,8 +48,8 @@ steps: **Free threaded Python** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13t' - run: python my_script.py @@ -83,8 +83,8 @@ The action defaults to searching for a dependency file (`requirements.txt` or `p ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pip' # caching pip dependencies diff --git a/action.yml b/action.yml index e469b7b2..df6c8235 100644 --- a/action.yml +++ b/action.yml @@ -39,7 +39,7 @@ outputs: python-path: description: "The absolute path to the Python or PyPy executable." runs: - using: 'node20' + using: 'node24' main: 'dist/setup/index.js' post: 'dist/cache-save/index.js' post-if: success() diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 09c5f5ed..55b41d54 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -32,8 +32,8 @@ If there is a specific version of Python that you need and you don't want to wor ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.12.6' - run: python my_script.py @@ -46,8 +46,8 @@ You can specify **only a major and minor version** if you are okay with the most ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' - run: python my_script.py @@ -60,8 +60,8 @@ You can specify the version with **prerelease tag** to download and set up an ac ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.14.0-alpha.1' - run: python my_script.py @@ -71,8 +71,8 @@ It's also possible to use **x.y-dev syntax** to download and set up the latest p ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.14-dev' - run: python my_script.py @@ -84,8 +84,8 @@ Free threaded Python is only available starting with the 3.13 release. ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13t' - run: python my_script.py @@ -95,8 +95,8 @@ Note that the **t** suffix is not `semver` syntax. If you wish to specify a rang ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '>=3.13' freethreaded: true @@ -109,8 +109,8 @@ You can also use several types of ranges that are specified in [semver](https:// ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '>=3.9 <3.14' - run: python my_script.py @@ -120,8 +120,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13.0-alpha - 3.13.0' - run: python my_script.py @@ -131,8 +131,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.x' - run: python my_script.py @@ -164,8 +164,8 @@ jobs: - 'pypy3.10' # the latest available version of PyPy that supports Python 3.10 - 'pypy3.10-v7.3.17' # Python 3.10 and PyPy 7.3.17 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - run: python my_script.py @@ -182,8 +182,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: | 3.11 @@ -199,8 +199,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: | pypy-3.10-v7.3.x @@ -216,8 +216,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: | 3.11 @@ -241,9 +241,9 @@ jobs: python-version: ['3.x', 'pypy3.8', 'pypy3.9' ] name: Python ${{ matrix.python-version }} sample steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} architecture: x64 @@ -267,9 +267,9 @@ jobs: - os: windows-latest python-version: '3.9' steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Display Python version @@ -285,8 +285,8 @@ jobs: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version-file: '.python-version' # Read python version from a file .python-version - run: python my_script.py @@ -294,8 +294,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version-file: 'pyproject.toml' # Read python version from a file pyproject.toml - run: python my_script.py @@ -303,8 +303,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version-file: '.tool-versions' # Read python version from a file .tool-versions - run: python my_script.py @@ -312,8 +312,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version-file: 'Pipfile' # Read python version from a file Pipfile - run: python my_script.py @@ -327,8 +327,8 @@ If `check-latest` is set to `true`, the action first checks if the cached versio ```yaml steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: '3.13' check-latest: true @@ -342,8 +342,8 @@ steps: **Caching pipenv dependencies:** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pipenv' @@ -355,10 +355,10 @@ steps: **Caching poetry dependencies:** ```yaml steps: -- uses: actions/checkout@v4 +- uses: actions/checkout@v5 - name: Install poetry run: pipx install poetry -- uses: actions/setup-python@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'poetry' @@ -370,8 +370,8 @@ steps: **Using a list of file paths to cache dependencies** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pipenv' @@ -385,8 +385,8 @@ steps: **Using wildcard patterns to cache dependencies** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pip' @@ -397,8 +397,8 @@ steps: **Using a list of wildcard patterns to cache dependencies** ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pip' @@ -412,8 +412,8 @@ steps: ```yaml steps: -- uses: actions/checkout@v4 -- uses: actions/setup-python@v5 +- uses: actions/checkout@v5 +- uses: actions/setup-python@v6 with: python-version: '3.13' cache: 'pip' @@ -435,8 +435,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 id: cp312 with: python-version: "3.9.0 - 3.12.0" @@ -452,8 +452,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 id: cp313 with: python-version: "3.13" @@ -468,8 +468,8 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 id: cp313 with: python-version: "3.13.0" @@ -499,8 +499,8 @@ Such a requirement on side-effect could be because you don't want your composite ```yaml steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 id: cp313 with: python-version: '3.13' @@ -645,8 +645,8 @@ jobs: python_version: ["3.11", "3.12", "3.13"] steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: python-version: "${{ matrix.python_version }}" allow-prereleases: true @@ -660,9 +660,9 @@ The version of Pip should be specified in the format `major`, `major.minor`, or ```yaml steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: '3.13' pip-version: '25.0.1' @@ -671,4 +671,4 @@ The version of Pip should be specified in the format `major`, `major.minor`, or ``` > The `pip-version` input is supported only with standard Python versions. It is not available when using PyPy or GraalPy. -> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/). \ No newline at end of file +> Using a specific or outdated version of pip may result in compatibility or security issues and can cause job failures. For best practices and guidance, refer to the official [pip documentation](https://pip.pypa.io/en/stable/). diff --git a/package-lock.json b/package-lock.json index 6152ec78..f44ab616 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "setup-python", - "version": "5.0.0", + "version": "6.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "setup-python", - "version": "5.0.0", + "version": "6.0.0", "license": "MIT", "dependencies": { "@actions/cache": "^4.0.3", @@ -21,7 +21,7 @@ }, "devDependencies": { "@types/jest": "^29.5.12", - "@types/node": "^20.11.25", + "@types/node": "^24.1.0", "@types/semver": "^7.7.0", "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0", @@ -35,6 +35,9 @@ "prettier": "^3.5.3", "ts-jest": "^29.3.2", "typescript": "^5.4.2" + }, + "engines": { + "node": ">=24.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -1593,11 +1596,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz", + "integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==", + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~7.8.0" } }, "node_modules/@types/node-fetch": { @@ -5467,9 +5471,10 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz", + "integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==", + "license": "MIT" }, "node_modules/update-browserslist-db": { "version": "1.0.13", diff --git a/package.json b/package.json index 1017bddd..f97190da 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,12 @@ { "name": "setup-python", - "version": "5.0.0", + "version": "6.0.0", "private": true, "description": "Setup python action", "main": "dist/index.js", + "engines": { + "node": ">=24.0.0" + }, "scripts": { "build": "ncc build -o dist/setup src/setup-python.ts && ncc build -o dist/cache-save src/cache-save.ts", "format": "prettier --no-error-on-unmatched-pattern --config ./.prettierrc.js --write \"**/*.{ts,yml,yaml}\"", @@ -37,7 +40,7 @@ }, "devDependencies": { "@types/jest": "^29.5.12", - "@types/node": "^20.11.25", + "@types/node": "^24.1.0", "@types/semver": "^7.7.0", "@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/parser": "^5.54.0",