From 12648859835f68b273febdd9aab9972bbb624d8c Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Wed, 25 Jun 2025 10:10:44 +0530 Subject: [PATCH 01/19] Enhance cache-dependency-path handling to support files outside the workspace root (#1128) * ehnace cache dependency path handling * logic update * npm run format-check * update cacheDependencies tests to cover resolved paths and copy edge cases * check failure fix * depricate-windows-2019 * refactored the code * Check failure fix --- .github/workflows/test-pypy.yml | 1 - __tests__/setup-python.test.ts | 149 ++++++++++++++++++++++++++++++++ dist/setup/index.js | 43 ++++++++- docs/advanced-usage.md | 2 +- src/setup-python.ts | 53 +++++++++++- 5 files changed, 243 insertions(+), 5 deletions(-) create mode 100644 __tests__/setup-python.test.ts diff --git a/.github/workflows/test-pypy.yml b/.github/workflows/test-pypy.yml index 54466e52..6433b7c5 100644 --- a/.github/workflows/test-pypy.yml +++ b/.github/workflows/test-pypy.yml @@ -88,7 +88,6 @@ jobs: - macos-13 - macos-14 - macos-15 - - windows-2019 - windows-2022 - windows-2025 - ubuntu-22.04 diff --git a/__tests__/setup-python.test.ts b/__tests__/setup-python.test.ts new file mode 100644 index 00000000..bb27289d --- /dev/null +++ b/__tests__/setup-python.test.ts @@ -0,0 +1,149 @@ +import * as core from '@actions/core'; +import * as fs from 'fs'; +import * as path from 'path'; +import {cacheDependencies} from '../src/setup-python'; +import {getCacheDistributor} from '../src/cache-distributions/cache-factory'; + +jest.mock('fs', () => { + const actualFs = jest.requireActual('fs'); + return { + ...actualFs, + promises: { + access: jest.fn(), + mkdir: jest.fn(), + copyFile: jest.fn(), + writeFile: jest.fn(), + appendFile: jest.fn() + } + }; +}); +jest.mock('@actions/core'); +jest.mock('../src/cache-distributions/cache-factory'); + +const mockedFsPromises = fs.promises as jest.Mocked; +const mockedCore = core as jest.Mocked; +const mockedGetCacheDistributor = getCacheDistributor as jest.Mock; + +describe('cacheDependencies', () => { + const mockRestoreCache = jest.fn(); + + beforeEach(() => { + jest.clearAllMocks(); + process.env.GITHUB_ACTION_PATH = '/github/action'; + process.env.GITHUB_WORKSPACE = '/github/workspace'; + + mockedCore.getInput.mockReturnValue('nested/deps.lock'); + + // Simulate file exists by resolving access without error + mockedFsPromises.access.mockImplementation(async p => { + const pathStr = typeof p === 'string' ? p : p.toString(); + if (pathStr === '/github/action/nested/deps.lock') { + return Promise.resolve(); + } + // Simulate directory doesn't exist to test mkdir + if (pathStr === path.dirname('/github/workspace/nested/deps.lock')) { + return Promise.reject(new Error('no dir')); + } + return Promise.resolve(); + }); + + // Simulate mkdir success + mockedFsPromises.mkdir.mockResolvedValue(undefined); + + // Simulate copyFile success + mockedFsPromises.copyFile.mockResolvedValue(undefined); + + mockedGetCacheDistributor.mockReturnValue({restoreCache: mockRestoreCache}); + }); + + it('copies the dependency file and resolves the path with directory structure', async () => { + await cacheDependencies('pip', '3.12'); + + const sourcePath = path.resolve('/github/action', 'nested/deps.lock'); + const targetPath = path.resolve('/github/workspace', 'nested/deps.lock'); + + expect(mockedFsPromises.access).toHaveBeenCalledWith( + sourcePath, + fs.constants.F_OK + ); + expect(mockedFsPromises.mkdir).toHaveBeenCalledWith( + path.dirname(targetPath), + { + recursive: true + } + ); + expect(mockedFsPromises.copyFile).toHaveBeenCalledWith( + sourcePath, + targetPath + ); + expect(mockedCore.info).toHaveBeenCalledWith( + `Copied ${sourcePath} to ${targetPath}` + ); + expect(mockedCore.info).toHaveBeenCalledWith( + `Resolved cache-dependency-path: nested/deps.lock` + ); + expect(mockRestoreCache).toHaveBeenCalled(); + }); + + it('warns if the dependency file does not exist', async () => { + // Simulate file does not exist by rejecting access + mockedFsPromises.access.mockRejectedValue(new Error('file not found')); + + await cacheDependencies('pip', '3.12'); + + expect(mockedCore.warning).toHaveBeenCalledWith( + expect.stringContaining('does not exist') + ); + expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); + expect(mockRestoreCache).toHaveBeenCalled(); + }); + + it('warns if file copy fails', async () => { + // Simulate copyFile failure + mockedFsPromises.copyFile.mockRejectedValue(new Error('copy failed')); + + await cacheDependencies('pip', '3.12'); + + expect(mockedCore.warning).toHaveBeenCalledWith( + expect.stringContaining('Failed to copy file') + ); + expect(mockRestoreCache).toHaveBeenCalled(); + }); + + it('skips path logic if no input is provided', async () => { + mockedCore.getInput.mockReturnValue(''); + + await cacheDependencies('pip', '3.12'); + + expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); + expect(mockedCore.warning).not.toHaveBeenCalled(); + expect(mockRestoreCache).toHaveBeenCalled(); + }); + + it('does not copy if dependency file is already inside the workspace but still sets resolved path', async () => { + // Simulate cacheDependencyPath inside workspace + mockedCore.getInput.mockReturnValue('deps.lock'); + + // Override sourcePath and targetPath to be equal + const actionPath = '/github/workspace'; // same path for action and workspace + process.env.GITHUB_ACTION_PATH = actionPath; + process.env.GITHUB_WORKSPACE = actionPath; + + // access resolves to simulate file exists + mockedFsPromises.access.mockResolvedValue(); + + await cacheDependencies('pip', '3.12'); + + const sourcePath = path.resolve(actionPath, 'deps.lock'); + const targetPath = sourcePath; // same path + + expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); + expect(mockedCore.info).toHaveBeenCalledWith( + `Dependency file is already inside the workspace: ${sourcePath}` + ); + expect(mockedCore.info).toHaveBeenCalledWith( + `Resolved cache-dependency-path: deps.lock` + ); + expect(mockRestoreCache).toHaveBeenCalled(); + }); +}); diff --git a/dist/setup/index.js b/dist/setup/index.js index d8fae2a0..c2f220c0 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96844,6 +96844,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.cacheDependencies = void 0; const core = __importStar(__nccwpck_require__(7484)); const finder = __importStar(__nccwpck_require__(6843)); const finderPyPy = __importStar(__nccwpck_require__(2625)); @@ -96862,10 +96863,50 @@ function isGraalPyVersion(versionSpec) { function cacheDependencies(cache, pythonVersion) { return __awaiter(this, void 0, void 0, function* () { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; - const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath); + let resolvedDependencyPath = undefined; + if (cacheDependencyPath) { + const actionPath = process.env.GITHUB_ACTION_PATH || ''; + const workspace = process.env.GITHUB_WORKSPACE || process.cwd(); + const sourcePath = path.resolve(actionPath, cacheDependencyPath); + const relativePath = path.relative(actionPath, sourcePath); + const targetPath = path.resolve(workspace, relativePath); + try { + const sourceExists = yield fs_1.default.promises + .access(sourcePath, fs_1.default.constants.F_OK) + .then(() => true) + .catch(() => false); + if (!sourceExists) { + core.warning(`The resolved cache-dependency-path does not exist: ${sourcePath}`); + } + else { + if (sourcePath !== targetPath) { + const targetDir = path.dirname(targetPath); + // Create target directory if it doesn't exist + yield fs_1.default.promises.mkdir(targetDir, { recursive: true }); + // Copy file asynchronously + yield fs_1.default.promises.copyFile(sourcePath, targetPath); + core.info(`Copied ${sourcePath} to ${targetPath}`); + } + else { + core.info(`Dependency file is already inside the workspace: ${sourcePath}`); + } + resolvedDependencyPath = path + .relative(workspace, targetPath) + .replace(/\\/g, '/'); + core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`); + } + } + catch (error) { + core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`); + } + } + // Pass resolvedDependencyPath if available, else fallback to original input + const dependencyPathForCache = resolvedDependencyPath !== null && resolvedDependencyPath !== void 0 ? resolvedDependencyPath : cacheDependencyPath; + const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, dependencyPathForCache); yield cacheDistributor.restoreCache(); }); } +exports.cacheDependencies = cacheDependencies; function resolveVersionInputFromDefaultFile() { const couples = [ ['.python-version', utils_1.getVersionsInputFromPlainFile] diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 7a8f1187..96524823 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -412,7 +412,7 @@ steps: - run: pip install -e . # Or pip install -e '.[test]' to install test dependencies ``` - +Note: cache-dependency-path supports files located outside the workspace root by copying them into the workspace to enable proper caching. # Outputs and environment variables ## Outputs diff --git a/src/setup-python.ts b/src/setup-python.ts index 5d585d73..106b415a 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -22,13 +22,62 @@ function isGraalPyVersion(versionSpec: string) { return versionSpec.startsWith('graalpy'); } -async function cacheDependencies(cache: string, pythonVersion: string) { +export async function cacheDependencies(cache: string, pythonVersion: string) { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; + let resolvedDependencyPath: string | undefined = undefined; + + if (cacheDependencyPath) { + const actionPath = process.env.GITHUB_ACTION_PATH || ''; + const workspace = process.env.GITHUB_WORKSPACE || process.cwd(); + + const sourcePath = path.resolve(actionPath, cacheDependencyPath); + const relativePath = path.relative(actionPath, sourcePath); + const targetPath = path.resolve(workspace, relativePath); + + try { + const sourceExists = await fs.promises + .access(sourcePath, fs.constants.F_OK) + .then(() => true) + .catch(() => false); + + if (!sourceExists) { + core.warning( + `The resolved cache-dependency-path does not exist: ${sourcePath}` + ); + } else { + if (sourcePath !== targetPath) { + const targetDir = path.dirname(targetPath); + // Create target directory if it doesn't exist + await fs.promises.mkdir(targetDir, {recursive: true}); + // Copy file asynchronously + await fs.promises.copyFile(sourcePath, targetPath); + core.info(`Copied ${sourcePath} to ${targetPath}`); + } else { + core.info( + `Dependency file is already inside the workspace: ${sourcePath}` + ); + } + + resolvedDependencyPath = path + .relative(workspace, targetPath) + .replace(/\\/g, '/'); + core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`); + } + } catch (error) { + core.warning( + `Failed to copy file from ${sourcePath} to ${targetPath}: ${error}` + ); + } + } + + // Pass resolvedDependencyPath if available, else fallback to original input + const dependencyPathForCache = resolvedDependencyPath ?? cacheDependencyPath; + const cacheDistributor = getCacheDistributor( cache, pythonVersion, - cacheDependencyPath + dependencyPathForCache ); await cacheDistributor.restoreCache(); } From 532b046aaf352bab5717122cc0ea52b7f12266a3 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Thu, 3 Jul 2025 22:39:25 +0530 Subject: [PATCH 02/19] Add Architecture-Specific PATH Management for Python with --user Flag on Windows (#1122) * logic to update install oath with --user flg * format update * format update * update * test job to validate --user flag installtion * updated the script * updated the yaml * update the inputs * updated script * update the correct script file name * updated script and yaml * npm run format-check * fix-test failures * path update * check failure fix * updated test * update free threaded version * updated the comments --- .github/workflows/e2e-cache-freethreaded.yml | 4 +-- .github/workflows/e2e-tests.yml | 3 +- dist/setup/index.js | 25 +++++++++++++++-- src/find-python.ts | 29 +++++++++++++++++--- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-cache-freethreaded.yml b/.github/workflows/e2e-cache-freethreaded.yml index d3beb5ba..096892cb 100644 --- a/.github/workflows/e2e-cache-freethreaded.yml +++ b/.github/workflows/e2e-cache-freethreaded.yml @@ -58,7 +58,7 @@ jobs: macos-latest, macos-13 ] - python-version: [3.13.0t, 3.13.1t, 3.13.2t] + python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - uses: actions/checkout@v4 - name: Setup Python @@ -148,7 +148,7 @@ jobs: macos-latest, macos-13 ] - python-version: [3.13.0t, 3.13.1t, 3.13.2t] + python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - uses: actions/checkout@v4 - name: Setup Python diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index fa478ac6..57c7851e 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -38,7 +38,7 @@ jobs: - name: Verify 3.9.13 run: python __tests__/verify-python.py 3.9.13 - - name: Run with setup-python 3.9.13 + - name: Run with setup-python 3.10.11 uses: ./ with: python-version: 3.10.11 @@ -89,6 +89,7 @@ jobs: python-version: '<3.13' - name: Verify <3.13 run: python __tests__/verify-python.py 3.12 + - name: Test Raw Endpoint Access run: | curl -L https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json | jq empty diff --git a/dist/setup/index.js b/dist/setup/index.js index c2f220c0..f8c5d4e7 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96103,11 +96103,32 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest if (utils_1.IS_WINDOWS) { // Add --user directory // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ - // So if `findLocalTool` succeeded above, we must have a conformant `installDir` + // Extract version details const version = path.basename(path.dirname(installDir)); const major = semver.major(version); const minor = semver.minor(version); - const userScriptsDir = path.join(process.env['APPDATA'] || '', 'Python', `Python${major}${minor}`, 'Scripts'); + const basePath = process.env['APPDATA'] || ''; + let versionSuffix = `${major}${minor}`; + // Append '-32' for x86 architecture if Python version is >= 3.10 + if (architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10))) { + versionSuffix += '-32'; + } + else if (architecture === 'arm64') { + versionSuffix += '-arm64'; + } + // Append 't' for freethreaded builds + if (freethreaded) { + versionSuffix += 't'; + if (architecture === 'x86-freethreaded') { + versionSuffix += '-32'; + } + else if (architecture === 'arm64-freethreaded') { + versionSuffix += '-arm64'; + } + } + // Add user Scripts path + const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts'); core.addPath(userScriptsDir); } // On Linux and macOS, pip will create the --user directory and add it to PATH as needed. diff --git a/src/find-python.ts b/src/find-python.ts index 88e530f4..99c6a7f2 100644 --- a/src/find-python.ts +++ b/src/find-python.ts @@ -71,8 +71,8 @@ export async function useCpythonVersion( // Use the freethreaded version if it was specified in the input, e.g., 3.13t freethreaded = true; } - core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); + core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); if (freethreaded) { // Free threaded versions use an architecture suffix like `x64-freethreaded` core.debug(`Using freethreaded version of ${semanticVersionSpec}`); @@ -176,15 +176,36 @@ export async function useCpythonVersion( if (IS_WINDOWS) { // Add --user directory // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ - // So if `findLocalTool` succeeded above, we must have a conformant `installDir` + // Extract version details const version = path.basename(path.dirname(installDir)); const major = semver.major(version); const minor = semver.minor(version); + const basePath = process.env['APPDATA'] || ''; + let versionSuffix = `${major}${minor}`; + // Append '-32' for x86 architecture if Python version is >= 3.10 + if ( + architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10)) + ) { + versionSuffix += '-32'; + } else if (architecture === 'arm64') { + versionSuffix += '-arm64'; + } + // Append 't' for freethreaded builds + if (freethreaded) { + versionSuffix += 't'; + if (architecture === 'x86-freethreaded') { + versionSuffix += '-32'; + } else if (architecture === 'arm64-freethreaded') { + versionSuffix += '-arm64'; + } + } + // Add user Scripts path const userScriptsDir = path.join( - process.env['APPDATA'] || '', + basePath, 'Python', - `Python${major}${minor}`, + `Python${versionSuffix}`, 'Scripts' ); core.addPath(userScriptsDir); From 88ffd4d597d830d67a7369dd33dcb72c0958a807 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Mon, 21 Jul 2025 21:01:05 +0200 Subject: [PATCH 03/19] Include python version in PyPy python-version output (#1110) --- dist/setup/index.js | 2 +- src/find-pypy.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index f8c5d4e7..a6cebf56 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -95875,7 +95875,7 @@ function findPyPyVersion(versionSpec, architecture, updateEnvironment, checkLate core.addPath(pythonLocation); core.addPath(_binDir); } - core.setOutput('python-version', 'pypy' + resolvedPyPyVersion); + core.setOutput('python-version', `pypy${resolvedPythonVersion}-${resolvedPyPyVersion}`); core.setOutput('python-path', pythonPath); return { resolvedPyPyVersion, resolvedPythonVersion }; }); diff --git a/src/find-pypy.ts b/src/find-pypy.ts index 9807878a..d15ebf60 100644 --- a/src/find-pypy.ts +++ b/src/find-pypy.ts @@ -96,7 +96,10 @@ export async function findPyPyVersion( core.addPath(pythonLocation); core.addPath(_binDir); } - core.setOutput('python-version', 'pypy' + resolvedPyPyVersion); + core.setOutput( + 'python-version', + `pypy${resolvedPythonVersion}-${resolvedPyPyVersion}` + ); core.setOutput('python-path', pythonPath); return {resolvedPyPyVersion, resolvedPythonVersion}; From 3c6f142cc0036d53007e92fa1e327564a4cfb7aa Mon Sep 17 00:00:00 2001 From: priya-kinthali <147703874+priya-kinthali@users.noreply.github.com> Date: Thu, 24 Jul 2025 00:02:04 +0530 Subject: [PATCH 04/19] update documentation (#1156) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8dc6d08f..c3f16cf6 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,8 @@ steps: >The requirements file format allows for specifying dependency versions using logical operators (for example chardet>=3.0.4) or specifying dependencies without any versions. In this case the pip install -r requirements.txt command will always try to install the latest available package version. To be sure that the cache will be used, please stick to a specific dependency version and update it manually if necessary. +>The `setup-python` action does not handle authentication for pip when installing packages from private repositories. For help, refer [pip’s VCS support documentation](https://pip.pypa.io/en/stable/topics/vcs-support/) or visit the [pip repository](https://github.com/pypa/pip). + See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poetry` in the section: [Caching packages](docs/advanced-usage.md#caching-packages) of the [Advanced usage](docs/advanced-usage.md) guide. ## Advanced usage From 36da51d563b70a972897150555bb025096d65565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aram=C3=ADs=20Segovia?= Date: Thu, 24 Jul 2025 18:40:39 -0400 Subject: [PATCH 05/19] Add version parsing from Pipfile (#1067) * feature: add version parsing from Pipfile * Update utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: update dist/setup/index.js --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../workflows/test-python-freethreaded.yml | 80 ++++++++++++++ .github/workflows/test-python.yml | 100 ++++++++++++++++++ __tests__/utils.test.ts | 39 +++++++ dist/setup/index.js | 41 ++++++- docs/advanced-usage.md | 9 ++ src/utils.ts | 42 +++++++- 6 files changed, 308 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-python-freethreaded.yml b/.github/workflows/test-python-freethreaded.yml index 39e69a47..94f783e2 100644 --- a/.github/workflows/test-python-freethreaded.yml +++ b/.github/workflows/test-python-freethreaded.yml @@ -242,6 +242,86 @@ jobs: with: python-version-file: .tool-versions + setup-versions-from-pipfile-with-python_version: + name: Setup ${{ matrix.python }} ${{ matrix.os }} Pipfile + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + macos-latest, + windows-latest, + ubuntu-22.04, + ubuntu-22.04-arm, + macos-13, + ubuntu-latest, + ubuntu-24.04-arm + ] + python: [3.13t, 3.14t-dev] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: build-version-file ${{ matrix.python }} + run: | + echo '[requires] + python_version = "${{ matrix.python }}" + ' > Pipfile + + - name: setup-python ${{ matrix.python }} + id: setup-python + uses: ./ + with: + python-version-file: Pipfile + + - name: Check python-path + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' + shell: bash + + - name: Run simple code + run: python -c 'import math; print(math.factorial(5))' + + setup-versions-from-pipfile-with-python_full_version: + name: Setup ${{ matrix.python }} ${{ matrix.os }} .tool-versions file + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + macos-latest, + windows-latest, + ubuntu-22.04, + ubuntu-22.04-arm, + macos-13, + ubuntu-latest, + ubuntu-24.04-arm + ] + python: [3.13.0t, 3.13.1t, 3.13.2t, 3.14t-dev] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: build-version-file ${{ matrix.python }} + run: | + echo '[requires] + python_full_version = "${{ matrix.python }}" + ' > Pipfile + + - name: setup-python ${{ matrix.python }} + id: setup-python + uses: ./ + with: + python-version-file: Pipfile + + - name: Check python-path + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' + shell: bash + + - name: Run simple code + run: python -c 'import math; print(math.factorial(5))' + setup-pre-release-version-from-manifest: name: Setup 3.14.0-alpha.6 ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index d89646f3..02a9a99f 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -284,6 +284,106 @@ jobs: with: python-version-file: .tool-versions + setup-versions-from-pipfile-with-python_version: + name: Setup ${{ matrix.python }} ${{ matrix.os }} Pipfile with python_version + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + macos-latest, + windows-latest, + ubuntu-22.04, + ubuntu-22.04-arm, + macos-13, + ubuntu-latest, + ubuntu-24.04-arm + ] + python: [3.9.13, 3.10.11, 3.11.9, 3.13.2] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: build-version-file ${{ matrix.python }} + run: | + echo '[requires] + python_version = "${{ matrix.python }}" + ' > Pipfile + + - name: setup-python ${{ matrix.python }} + id: setup-python + uses: ./ + with: + python-version-file: Pipfile + + - name: Check python-path + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' + shell: bash + + - name: Validate version + run: | + $pythonVersion = (python --version) + if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){ + Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}" + exit 1 + } + $pythonVersion + shell: pwsh + + - name: Run simple code + run: python -c 'import math; print(math.factorial(5))' + + setup-versions-from-pipfile-with-python_full_version: + name: Setup ${{ matrix.python }} ${{ matrix.os }} Pipfile with python_full_version + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + macos-latest, + windows-latest, + ubuntu-22.04, + ubuntu-22.04-arm, + macos-13, + ubuntu-latest, + ubuntu-24.04-arm + ] + python: [3.9.13, 3.10.11, 3.11.9, 3.13.2] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: build-version-file ${{ matrix.python }} + run: | + echo '[requires] + python_full_version = "${{ matrix.python }}" + ' > Pipfile + + - name: setup-python ${{ matrix.python }} + id: setup-python + uses: ./ + with: + python-version-file: Pipfile + + - name: Check python-path + run: ./__tests__/check-python-path.sh '${{ steps.setup-python.outputs.python-path }}' + shell: bash + + - name: Validate version + run: | + $pythonVersion = (python --version) + if ("Python ${{ matrix.python }}".replace("==", "") -ne "$pythonVersion"){ + Write-Host "The current version is $pythonVersion; expected version is ${{ matrix.python }}" + exit 1 + } + $pythonVersion + shell: pwsh + + - name: Run simple code + run: python -c 'import math; print(math.factorial(5))' + setup-pre-release-version-from-manifest: name: Setup 3.14.0-alpha.6 ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/__tests__/utils.test.ts b/__tests__/utils.test.ts index 009749c6..2cbfa813 100644 --- a/__tests__/utils.test.ts +++ b/__tests__/utils.test.ts @@ -12,6 +12,7 @@ import { getVersionInputFromFile, getVersionsInputFromPlainFile, getVersionInputFromTomlFile, + getVersionInputFromPipfileFile, getNextPageUrl, isGhes, IS_WINDOWS, @@ -244,6 +245,44 @@ describe('Version from file test', () => { expect(_fn(toolVersionFilePath)).toEqual(['3.14t-dev']); } ); + + it.each([getVersionInputFromPipfileFile, getVersionInputFromFile])( + 'Version from python_version in Pipfile', + async _fn => { + await io.mkdirP(tempDir); + const pythonVersionFileName = 'Pipfile'; + const pythonVersionFilePath = path.join(tempDir, pythonVersionFileName); + const pythonVersion = '3.13'; + const pythonVersionFileContent = `[requires]\npython_version = "${pythonVersion}"`; + fs.writeFileSync(pythonVersionFilePath, pythonVersionFileContent); + expect(_fn(pythonVersionFilePath)).toEqual([pythonVersion]); + } + ); + + it.each([getVersionInputFromPipfileFile, getVersionInputFromFile])( + 'Version from python_full_version in Pipfile', + async _fn => { + await io.mkdirP(tempDir); + const pythonVersionFileName = 'Pipfile'; + const pythonVersionFilePath = path.join(tempDir, pythonVersionFileName); + const pythonVersion = '3.13.0'; + const pythonVersionFileContent = `[requires]\npython_full_version = "${pythonVersion}"`; + fs.writeFileSync(pythonVersionFilePath, pythonVersionFileContent); + expect(_fn(pythonVersionFilePath)).toEqual([pythonVersion]); + } + ); + + it.each([getVersionInputFromPipfileFile, getVersionInputFromFile])( + 'Pipfile undefined version', + async _fn => { + await io.mkdirP(tempDir); + const pythonVersionFileName = 'Pipfile'; + const pythonVersionFilePath = path.join(tempDir, pythonVersionFileName); + const pythonVersionFileContent = ``; + fs.writeFileSync(pythonVersionFilePath, pythonVersionFileContent); + expect(_fn(pythonVersionFilePath)).toEqual([]); + } + ); }); describe('getNextPageUrl', () => { diff --git a/dist/setup/index.js b/dist/setup/index.js index a6cebf56..70aac473 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -97067,7 +97067,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDownloadFileName = exports.getNextPageUrl = exports.getBinaryDirectory = exports.getVersionInputFromFile = exports.getVersionInputFromToolVersions = exports.getVersionsInputFromPlainFile = exports.getVersionInputFromTomlFile = exports.getOSInfo = exports.getLinuxInfo = exports.logWarning = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_MAC = exports.IS_LINUX = exports.IS_WINDOWS = void 0; +exports.getDownloadFileName = exports.getNextPageUrl = exports.getBinaryDirectory = exports.getVersionInputFromFile = exports.getVersionInputFromPipfileFile = exports.getVersionInputFromToolVersions = exports.getVersionsInputFromPlainFile = exports.getVersionInputFromTomlFile = exports.getOSInfo = exports.getLinuxInfo = exports.logWarning = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_MAC = exports.IS_LINUX = exports.IS_WINDOWS = void 0; /* eslint no-unsafe-finally: "off" */ const cache = __importStar(__nccwpck_require__(5116)); const core = __importStar(__nccwpck_require__(7484)); @@ -97337,7 +97337,41 @@ function getVersionInputFromToolVersions(versionFile) { } exports.getVersionInputFromToolVersions = getVersionInputFromToolVersions; /** - * Python version extracted from a plain, .tool-versions or TOML file. + * Python version extracted from the Pipfile file. + */ +function getVersionInputFromPipfileFile(versionFile) { + core.debug(`Trying to resolve version from ${versionFile}`); + if (!fs_1.default.existsSync(versionFile)) { + core.warning(`File ${versionFile} does not exist.`); + return []; + } + let pipfileFile = fs_1.default.readFileSync(versionFile, 'utf8'); + // Normalize the line endings in the pipfileFile + pipfileFile = pipfileFile.replace(/\r\n/g, '\n'); + const pipfileConfig = toml.parse(pipfileFile); + const keys = ['requires']; + if (!('requires' in pipfileConfig)) { + core.warning(`No Python version found in ${versionFile}`); + return []; + } + if ('python_full_version' in pipfileConfig['requires']) { + // specifies a full python version + keys.push('python_full_version'); + } + else { + keys.push('python_version'); + } + const versions = []; + const version = extractValue(pipfileConfig, keys); + if (version !== undefined) { + versions.push(version); + } + core.info(`Extracted ${versions} from ${versionFile}`); + return versions; +} +exports.getVersionInputFromPipfileFile = getVersionInputFromPipfileFile; +/** + * Python version extracted from a plain, .tool-versions, Pipfile or TOML file. */ function getVersionInputFromFile(versionFile) { if (versionFile.endsWith('.toml')) { @@ -97346,6 +97380,9 @@ function getVersionInputFromFile(versionFile) { else if (versionFile.match('.tool-versions')) { return getVersionInputFromToolVersions(versionFile); } + else if (versionFile.match('Pipfile')) { + return getVersionInputFromPipfileFile(versionFile); + } else { return getVersionsInputFromPlainFile(versionFile); } diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 96524823..188fa9d6 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -310,6 +310,15 @@ steps: - run: python my_script.py ``` +```yaml +steps: +- uses: actions/checkout@v4 +- uses: actions/setup-python@v5 + with: + python-version-file: 'Pipfile' # Read python version from a file Pipfile +- run: python my_script.py +``` + ## Check latest version The `check-latest` flag defaults to `false`. Use the default or set `check-latest` to `false` if you prefer stability and if you want to ensure a specific `Python or PyPy` version is always used. diff --git a/src/utils.ts b/src/utils.ts index f39006d9..d7be4746 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -325,14 +325,54 @@ export function getVersionInputFromToolVersions(versionFile: string): string[] { return []; } } + /** - * Python version extracted from a plain, .tool-versions or TOML file. + * Python version extracted from the Pipfile file. + */ +export function getVersionInputFromPipfileFile(versionFile: string): string[] { + core.debug(`Trying to resolve version from ${versionFile}`); + + if (!fs.existsSync(versionFile)) { + core.warning(`File ${versionFile} does not exist.`); + return []; + } + let pipfileFile = fs.readFileSync(versionFile, 'utf8'); + // Normalize the line endings in the pipfileFile + pipfileFile = pipfileFile.replace(/\r\n/g, '\n'); + + const pipfileConfig = toml.parse(pipfileFile); + const keys = ['requires']; + + if (!('requires' in pipfileConfig)) { + core.warning(`No Python version found in ${versionFile}`); + return []; + } + if ('python_full_version' in (pipfileConfig['requires'] as toml.JsonMap)) { + // specifies a full python version + keys.push('python_full_version'); + } else { + keys.push('python_version'); + } + const versions = []; + const version = extractValue(pipfileConfig, keys); + if (version !== undefined) { + versions.push(version); + } + + core.info(`Extracted ${versions} from ${versionFile}`); + return versions; +} + +/** + * Python version extracted from a plain, .tool-versions, Pipfile or TOML file. */ export function getVersionInputFromFile(versionFile: string): string[] { if (versionFile.endsWith('.toml')) { return getVersionInputFromTomlFile(versionFile); } else if (versionFile.match('.tool-versions')) { return getVersionInputFromToolVersions(versionFile); + } else if (versionFile.match('Pipfile')) { + return getVersionInputFromPipfileFile(versionFile); } else { return getVersionsInputFromPlainFile(versionFile); } From 03bb6152f4f691b9d64579a1bd791904a083c452 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 12:04:01 -0500 Subject: [PATCH 06/19] Bump idna from 2.9 to 3.7 in /__tests__/data (#843) Bumps [idna](https://github.com/kjd/idna) from 2.9 to 3.7. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v2.9...v3.7) --- updated-dependencies: - dependency-name: idna dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- __tests__/data/requirements-linux.txt | 2 +- __tests__/data/requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/data/requirements-linux.txt b/__tests__/data/requirements-linux.txt index be795f5b..0e93594b 100644 --- a/__tests__/data/requirements-linux.txt +++ b/__tests__/data/requirements-linux.txt @@ -1,7 +1,7 @@ certifi==2020.6.20 chardet==3.0.4 docutils==0.16 -idna==2.10 +idna==3.7 Kivy==2.0.0rc3 Kivy-Garden==0.1.4 packaging==20.7 diff --git a/__tests__/data/requirements.txt b/__tests__/data/requirements.txt index 5cd1f19c..cfe5ff8c 100644 --- a/__tests__/data/requirements.txt +++ b/__tests__/data/requirements.txt @@ -8,7 +8,7 @@ docutils==0.16 future==0.18.2; python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2' -idna==2.9 +idna==3.7 itsdangerous==1.1.0 From fbeb884f69f0ac1c0257302f62aa524c2824b649 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Thu, 31 Jul 2025 01:49:20 +0530 Subject: [PATCH 07/19] Bump form-data to fix critical vulnerabilities #182 & #183 (#1163) * fix dependabot alert#183 * command updates --- .licenses/npm/brace-expansion.dep.yml | 2 +- .licenses/npm/call-bind-apply-helpers.dep.yml | 32 + .licenses/npm/dunder-proto.dep.yml | 32 + .licenses/npm/es-define-property.dep.yml | 32 + .licenses/npm/es-errors.dep.yml | 32 + .licenses/npm/es-object-atoms.dep.yml | 32 + .licenses/npm/es-set-tostringtag.dep.yml | 32 + ...-2.5.1.dep.yml => form-data-2.5.5.dep.yml} | 4 +- ...-4.0.0.dep.yml => form-data-4.0.4.dep.yml} | 6 +- .licenses/npm/function-bind.dep.yml | 32 + .licenses/npm/get-intrinsic.dep.yml | 33 + .licenses/npm/get-proto.dep.yml | 32 + .licenses/npm/gopd.dep.yml | 32 + .licenses/npm/has-symbols.dep.yml | 32 + .licenses/npm/has-tostringtag.dep.yml | 33 + .licenses/npm/hasown.dep.yml | 32 + .licenses/npm/math-intrinsics.dep.yml | 32 + .licenses/npm/safe-buffer.dep.yml | 34 + .licenses/npm/undici.dep.yml | 2 +- dist/cache-save/index.js | 1444 ++++++++++++++--- dist/setup/index.js | 1444 ++++++++++++++--- package-lock.json | 237 ++- 22 files changed, 3217 insertions(+), 406 deletions(-) create mode 100644 .licenses/npm/call-bind-apply-helpers.dep.yml create mode 100644 .licenses/npm/dunder-proto.dep.yml create mode 100644 .licenses/npm/es-define-property.dep.yml create mode 100644 .licenses/npm/es-errors.dep.yml create mode 100644 .licenses/npm/es-object-atoms.dep.yml create mode 100644 .licenses/npm/es-set-tostringtag.dep.yml rename .licenses/npm/{form-data-2.5.1.dep.yml => form-data-2.5.5.dep.yml} (95%) rename .licenses/npm/{form-data-4.0.0.dep.yml => form-data-4.0.4.dep.yml} (94%) create mode 100644 .licenses/npm/function-bind.dep.yml create mode 100644 .licenses/npm/get-intrinsic.dep.yml create mode 100644 .licenses/npm/get-proto.dep.yml create mode 100644 .licenses/npm/gopd.dep.yml create mode 100644 .licenses/npm/has-symbols.dep.yml create mode 100644 .licenses/npm/has-tostringtag.dep.yml create mode 100644 .licenses/npm/hasown.dep.yml create mode 100644 .licenses/npm/math-intrinsics.dep.yml create mode 100644 .licenses/npm/safe-buffer.dep.yml diff --git a/.licenses/npm/brace-expansion.dep.yml b/.licenses/npm/brace-expansion.dep.yml index 8fa6cfb3..95ca8eb1 100644 --- a/.licenses/npm/brace-expansion.dep.yml +++ b/.licenses/npm/brace-expansion.dep.yml @@ -1,6 +1,6 @@ --- name: brace-expansion -version: 1.1.11 +version: 1.1.12 type: npm summary: Brace expansion as known from sh/bash homepage: https://github.com/juliangruber/brace-expansion diff --git a/.licenses/npm/call-bind-apply-helpers.dep.yml b/.licenses/npm/call-bind-apply-helpers.dep.yml new file mode 100644 index 00000000..bfd264f3 --- /dev/null +++ b/.licenses/npm/call-bind-apply-helpers.dep.yml @@ -0,0 +1,32 @@ +--- +name: call-bind-apply-helpers +version: 1.0.2 +type: npm +summary: Helper functions around Function call/apply/bind, for use in `call-bind` +homepage: https://github.com/ljharb/call-bind-apply-helpers#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/dunder-proto.dep.yml b/.licenses/npm/dunder-proto.dep.yml new file mode 100644 index 00000000..39542bfd --- /dev/null +++ b/.licenses/npm/dunder-proto.dep.yml @@ -0,0 +1,32 @@ +--- +name: dunder-proto +version: 1.0.1 +type: npm +summary: If available, the `Object.prototype.__proto__` accessor and mutator, call-bound +homepage: https://github.com/es-shims/dunder-proto#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 ECMAScript Shims + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/es-define-property.dep.yml b/.licenses/npm/es-define-property.dep.yml new file mode 100644 index 00000000..7f190372 --- /dev/null +++ b/.licenses/npm/es-define-property.dep.yml @@ -0,0 +1,32 @@ +--- +name: es-define-property +version: 1.0.1 +type: npm +summary: "`Object.defineProperty`, but not IE 8's broken one." +homepage: https://github.com/ljharb/es-define-property#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/es-errors.dep.yml b/.licenses/npm/es-errors.dep.yml new file mode 100644 index 00000000..a5827aac --- /dev/null +++ b/.licenses/npm/es-errors.dep.yml @@ -0,0 +1,32 @@ +--- +name: es-errors +version: 1.3.0 +type: npm +summary: A simple cache for a few of the JS Error constructors. +homepage: https://github.com/ljharb/es-errors#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/es-object-atoms.dep.yml b/.licenses/npm/es-object-atoms.dep.yml new file mode 100644 index 00000000..dc42eaae --- /dev/null +++ b/.licenses/npm/es-object-atoms.dep.yml @@ -0,0 +1,32 @@ +--- +name: es-object-atoms +version: 1.1.1 +type: npm +summary: 'ES Object-related atoms: Object, ToObject, RequireObjectCoercible' +homepage: https://github.com/ljharb/es-object-atoms#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/es-set-tostringtag.dep.yml b/.licenses/npm/es-set-tostringtag.dep.yml new file mode 100644 index 00000000..f4b673e2 --- /dev/null +++ b/.licenses/npm/es-set-tostringtag.dep.yml @@ -0,0 +1,32 @@ +--- +name: es-set-tostringtag +version: 2.1.0 +type: npm +summary: A helper to optimistically set Symbol.toStringTag, when possible. +homepage: https://github.com/es-shims/es-set-tostringtag#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2022 ECMAScript Shims + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/form-data-2.5.1.dep.yml b/.licenses/npm/form-data-2.5.5.dep.yml similarity index 95% rename from .licenses/npm/form-data-2.5.1.dep.yml rename to .licenses/npm/form-data-2.5.5.dep.yml index 000f2223..a60d6b96 100644 --- a/.licenses/npm/form-data-2.5.1.dep.yml +++ b/.licenses/npm/form-data-2.5.5.dep.yml @@ -1,10 +1,10 @@ --- name: form-data -version: 2.5.1 +version: 2.5.5 type: npm summary: A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications. -homepage: https://github.com/form-data/form-data#readme +homepage: license: mit licenses: - sources: License diff --git a/.licenses/npm/form-data-4.0.0.dep.yml b/.licenses/npm/form-data-4.0.4.dep.yml similarity index 94% rename from .licenses/npm/form-data-4.0.0.dep.yml rename to .licenses/npm/form-data-4.0.4.dep.yml index ced7212c..5b3b5c1f 100644 --- a/.licenses/npm/form-data-4.0.0.dep.yml +++ b/.licenses/npm/form-data-4.0.4.dep.yml @@ -1,10 +1,10 @@ --- name: form-data -version: 4.0.0 +version: 4.0.4 type: npm summary: A library to create readable "multipart/form-data" streams. Can be used to submit forms and file uploads to other web applications. -homepage: https://github.com/form-data/form-data#readme +homepage: license: mit licenses: - sources: License @@ -28,6 +28,6 @@ licenses: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- sources: Readme.md +- sources: README.md text: Form-Data is released under the [MIT](License) license. notices: [] diff --git a/.licenses/npm/function-bind.dep.yml b/.licenses/npm/function-bind.dep.yml new file mode 100644 index 00000000..3ae18f3e --- /dev/null +++ b/.licenses/npm/function-bind.dep.yml @@ -0,0 +1,32 @@ +--- +name: function-bind +version: 1.1.2 +type: npm +summary: Implementation of Function.prototype.bind +homepage: https://github.com/Raynos/function-bind +license: mit +licenses: +- sources: LICENSE + text: |+ + Copyright (c) 2013 Raynos. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +notices: [] +... diff --git a/.licenses/npm/get-intrinsic.dep.yml b/.licenses/npm/get-intrinsic.dep.yml new file mode 100644 index 00000000..c94509f4 --- /dev/null +++ b/.licenses/npm/get-intrinsic.dep.yml @@ -0,0 +1,33 @@ +--- +name: get-intrinsic +version: 1.3.0 +type: npm +summary: Get and robustly cache all JS language-level intrinsics at first require + time +homepage: https://github.com/ljharb/get-intrinsic#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2020 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/get-proto.dep.yml b/.licenses/npm/get-proto.dep.yml new file mode 100644 index 00000000..1176a953 --- /dev/null +++ b/.licenses/npm/get-proto.dep.yml @@ -0,0 +1,32 @@ +--- +name: get-proto +version: 1.0.1 +type: npm +summary: Robustly get the [[Prototype]] of an object +homepage: https://github.com/ljharb/get-proto#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2025 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/gopd.dep.yml b/.licenses/npm/gopd.dep.yml new file mode 100644 index 00000000..d3d28af9 --- /dev/null +++ b/.licenses/npm/gopd.dep.yml @@ -0,0 +1,32 @@ +--- +name: gopd +version: 1.2.0 +type: npm +summary: "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation." +homepage: https://github.com/ljharb/gopd#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2022 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/has-symbols.dep.yml b/.licenses/npm/has-symbols.dep.yml new file mode 100644 index 00000000..38b50f04 --- /dev/null +++ b/.licenses/npm/has-symbols.dep.yml @@ -0,0 +1,32 @@ +--- +name: has-symbols +version: 1.1.0 +type: npm +summary: Determine if the JS environment has Symbol support. Supports spec, or shams. +homepage: https://github.com/ljharb/has-symbols#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2016 Jordan Harband + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/has-tostringtag.dep.yml b/.licenses/npm/has-tostringtag.dep.yml new file mode 100644 index 00000000..efa5c5c1 --- /dev/null +++ b/.licenses/npm/has-tostringtag.dep.yml @@ -0,0 +1,33 @@ +--- +name: has-tostringtag +version: 1.0.2 +type: npm +summary: Determine if the JS environment has `Symbol.toStringTag` support. Supports + spec, or shams. +homepage: https://github.com/inspect-js/has-tostringtag#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2021 Inspect JS + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/hasown.dep.yml b/.licenses/npm/hasown.dep.yml new file mode 100644 index 00000000..99263919 --- /dev/null +++ b/.licenses/npm/hasown.dep.yml @@ -0,0 +1,32 @@ +--- +name: hasown +version: 2.0.2 +type: npm +summary: A robust, ES3 compatible, "has own property" predicate. +homepage: https://github.com/inspect-js/hasOwn#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) Jordan Harband and contributors + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/math-intrinsics.dep.yml b/.licenses/npm/math-intrinsics.dep.yml new file mode 100644 index 00000000..2f29af6f --- /dev/null +++ b/.licenses/npm/math-intrinsics.dep.yml @@ -0,0 +1,32 @@ +--- +name: math-intrinsics +version: 1.1.0 +type: npm +summary: ES Math-related intrinsics and helpers, robustly cached. +homepage: https://github.com/es-shims/math-intrinsics#readme +license: mit +licenses: +- sources: LICENSE + text: | + MIT License + + Copyright (c) 2024 ECMAScript Shims + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. +notices: [] diff --git a/.licenses/npm/safe-buffer.dep.yml b/.licenses/npm/safe-buffer.dep.yml new file mode 100644 index 00000000..a6499e34 --- /dev/null +++ b/.licenses/npm/safe-buffer.dep.yml @@ -0,0 +1,34 @@ +--- +name: safe-buffer +version: 5.2.1 +type: npm +summary: Safer Node.js Buffer API +homepage: https://github.com/feross/safe-buffer +license: mit +licenses: +- sources: LICENSE + text: | + The MIT License (MIT) + + Copyright (c) Feross Aboukhadijeh + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +- sources: README.md + text: MIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org) +notices: [] diff --git a/.licenses/npm/undici.dep.yml b/.licenses/npm/undici.dep.yml index 961089c6..fadecf4a 100644 --- a/.licenses/npm/undici.dep.yml +++ b/.licenses/npm/undici.dep.yml @@ -1,6 +1,6 @@ --- name: undici -version: 5.28.5 +version: 5.29.0 type: npm summary: An HTTP/1.1 client, written from scratch for Node.js homepage: https://undici.nodejs.org diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 883d1686..9300df32 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -2204,7 +2204,7 @@ const cacheUtils_1 = __nccwpck_require__(680); const auth_1 = __nccwpck_require__(4552); const http_client_1 = __nccwpck_require__(4844); const cache_twirp_client_1 = __nccwpck_require__(1486); -const util_1 = __nccwpck_require__(7564); +const util_1 = __nccwpck_require__(5183); /** * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. * @@ -2446,7 +2446,7 @@ exports.getUserAgentString = getUserAgentString; /***/ }), -/***/ 7564: +/***/ 5183: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -14920,6 +14920,9 @@ exports.userAgentPolicy = userAgentPolicy; /***/ 7791: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +"use strict"; + + var CombinedStream = __nccwpck_require__(5630); var util = __nccwpck_require__(9023); var path = __nccwpck_require__(6928); @@ -14928,23 +14931,20 @@ var https = __nccwpck_require__(5692); var parseUrl = (__nccwpck_require__(7016).parse); var fs = __nccwpck_require__(9896); var Stream = (__nccwpck_require__(2203).Stream); +var crypto = __nccwpck_require__(6982); var mime = __nccwpck_require__(4096); var asynckit = __nccwpck_require__(1324); +var setToStringTag = __nccwpck_require__(8700); +var hasOwn = __nccwpck_require__(4076); var populate = __nccwpck_require__(2209); -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - /** * Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + * @param {object} options - Properties to be added/overriden for FormData and CombinedStream */ function FormData(options) { if (!(this instanceof FormData)) { @@ -14957,35 +14957,39 @@ function FormData(options) { CombinedStream.call(this); - options = options || {}; - for (var option in options) { + options = options || {}; // eslint-disable-line no-param-reassign + for (var option in options) { // eslint-disable-line no-restricted-syntax this[option] = options[option]; } } +// make it a Stream +util.inherits(FormData, CombinedStream); + FormData.LINE_BREAK = '\r\n'; FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; -FormData.prototype.append = function(field, value, options) { - - options = options || {}; +FormData.prototype.append = function (field, value, options) { + options = options || {}; // eslint-disable-line no-param-reassign // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; + if (typeof options === 'string') { + options = { filename: options }; // eslint-disable-line no-param-reassign } var append = CombinedStream.prototype.append.bind(this); // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; + if (typeof value === 'number' || value == null) { + value = String(value); // eslint-disable-line no-param-reassign } // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it + if (Array.isArray(value)) { + /* + * Please convert your array into string + * the way web server expects it + */ this._error(new Error('Arrays are not supported.')); return; } @@ -15001,15 +15005,17 @@ FormData.prototype.append = function(field, value, options) { this._trackLength(header, value, options); }; -FormData.prototype._trackLength = function(header, value, options) { +FormData.prototype._trackLength = function (header, value, options) { var valueLength = 0; - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. + /* + * used w/ getLengthSync(), when length is known. + * e.g. for streaming directly from a remote server, + * w/ a known file a size, and not wanting to wait for + * incoming file to finish to get its size. + */ if (options.knownLength != null) { - valueLength += +options.knownLength; + valueLength += Number(options.knownLength); } else if (Buffer.isBuffer(value)) { valueLength = value.length; } else if (typeof value === 'string') { @@ -15019,12 +15025,10 @@ FormData.prototype._trackLength = function(header, value, options) { this._valueLength += valueLength; // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { + if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { return; } @@ -15034,10 +15038,8 @@ FormData.prototype._trackLength = function(header, value, options) { } }; -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - +FormData.prototype._lengthRetriever = function (value, callback) { + if (hasOwn(value, 'fd')) { // take read range into a account // `end` = Infinity –> read file till the end // @@ -15046,54 +15048,52 @@ FormData.prototype._lengthRetriever = function(value, callback) { // Fix it when node fixes it. // https://github.com/joyent/node/issues/7819 if (value.end != undefined && value.end != Infinity && value.start != undefined) { - // when end specified // no need to calculate range // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); + callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return - // not that fast snoopy + // not that fast snoopy } else { // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - + fs.stat(value.path, function (err, stat) { if (err) { callback(err); return; } // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); + var fileSize = stat.size - (value.start ? value.start : 0); callback(null, fileSize); }); } - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); + // or http response + } else if (hasOwn(value, 'httpVersion')) { + callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { + // or request stream http://github.com/mikeal/request + } else if (hasOwn(value, 'httpModule')) { // wait till response come back - value.on('response', function(response) { + value.on('response', function (response) { value.pause(); - callback(null, +response.headers['content-length']); + callback(null, Number(response.headers['content-length'])); }); value.resume(); - // something else + // something else } else { - callback('Unknown stream'); + callback('Unknown stream'); // eslint-disable-line callback-return } }; -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { +FormData.prototype._multiPartHeader = function (field, value, options) { + /* + * custom header specified (as string)? + * it becomes responsible for boundary + * (e.g. to handle extra CRLFs on .NET servers) + */ + if (typeof options.header === 'string') { return options.header; } @@ -15101,7 +15101,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) { var contentType = this._getContentType(value, options); var contents = ''; - var headers = { + var headers = { // add custom disposition as third element or keep it two elements if not 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), // if no content type. allow it to be empty array @@ -15109,77 +15109,74 @@ FormData.prototype._multiPartHeader = function(field, value, options) { }; // allow custom headers. - if (typeof options.header == 'object') { + if (typeof options.header === 'object') { populate(headers, options.header); } var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; + for (var prop in headers) { // eslint-disable-line no-restricted-syntax + if (hasOwn(headers, prop)) { + header = headers[prop]; - // skip nullish headers. - if (header == null) { - continue; - } + // skip nullish headers. + if (header == null) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } } } return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; }; -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; +FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return + var filename; if (typeof options.filepath === 'string') { // custom filepath for relative paths filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { + } else if (options.filename || (value && (value.name || value.path))) { + /* + * custom filename take precedence + * formidable and the browser add a name property + * fs- and request- streams have path property + */ + filename = path.basename(options.filename || (value && (value.name || value.path))); + } else if (value && value.readable && hasOwn(value, 'httpVersion')) { // or try http response filename = path.basename(value.client._httpMessage.path || ''); } if (filename) { - contentDisposition = 'filename="' + filename + '"'; + return 'filename="' + filename + '"'; } - - return contentDisposition; }; -FormData.prototype._getContentType = function(value, options) { - +FormData.prototype._getContentType = function (value, options) { // use custom content-type above all var contentType = options.contentType; // or try `name` from formidable, browser - if (!contentType && value.name) { + if (!contentType && value && value.name) { contentType = mime.lookup(value.name); } // or try `path` from fs-, request- streams - if (!contentType && value.path) { + if (!contentType && value && value.path) { contentType = mime.lookup(value.path); } // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { contentType = value.headers['content-type']; } @@ -15189,18 +15186,18 @@ FormData.prototype._getContentType = function(value, options) { } // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { + if (!contentType && value && typeof value === 'object') { contentType = FormData.DEFAULT_CONTENT_TYPE; } return contentType; }; -FormData.prototype._multiPartFooter = function() { - return function(next) { +FormData.prototype._multiPartFooter = function () { + return function (next) { var footer = FormData.LINE_BREAK; - var lastPart = (this._streams.length === 0); + var lastPart = this._streams.length === 0; if (lastPart) { footer += this._lastBoundary(); } @@ -15209,18 +15206,18 @@ FormData.prototype._multiPartFooter = function() { }.bind(this); }; -FormData.prototype._lastBoundary = function() { +FormData.prototype._lastBoundary = function () { return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; -FormData.prototype.getHeaders = function(userHeaders) { +FormData.prototype.getHeaders = function (userHeaders) { var header; var formHeaders = { 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() }; - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { + for (header in userHeaders) { // eslint-disable-line no-restricted-syntax + if (hasOwn(userHeaders, header)) { formHeaders[header.toLowerCase()] = userHeaders[header]; } } @@ -15228,11 +15225,14 @@ FormData.prototype.getHeaders = function(userHeaders) { return formHeaders; }; -FormData.prototype.setBoundary = function(boundary) { +FormData.prototype.setBoundary = function (boundary) { + if (typeof boundary !== 'string') { + throw new TypeError('FormData boundary must be a string'); + } this._boundary = boundary; }; -FormData.prototype.getBoundary = function() { +FormData.prototype.getBoundary = function () { if (!this._boundary) { this._generateBoundary(); } @@ -15240,60 +15240,55 @@ FormData.prototype.getBoundary = function() { return this._boundary; }; -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); +FormData.prototype.getBuffer = function () { + var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap var boundary = this.getBoundary(); // Create the form content. Add Line breaks to the end of data. for (var i = 0, len = this._streams.length; i < len; i++) { if (typeof this._streams[i] !== 'function') { - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); } // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); } } } // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); }; -FormData.prototype._generateBoundary = function() { +FormData.prototype._generateBoundary = function () { // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - this._boundary = boundary; + // They are optimized for boyer-moore parsing. + this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); }; // Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { +// As workaround one can calculate file size manually and add it as knownLength option +FormData.prototype.getLengthSync = function () { var knownLength = this._overheadLength + this._valueLength; - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form + // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form if (this._streams.length) { knownLength += this._lastBoundary().length; } // https://github.com/form-data/form-data/issues/40 if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length + /* + * Some async length retrievers are present + * therefore synchronous length calculation is false. + * Please use getLength(callback) to get proper length + */ this._error(new Error('Cannot calculate proper length in synchronous way.')); } @@ -15303,7 +15298,7 @@ FormData.prototype.getLengthSync = function() { // Public API to check if length of added values is known // https://github.com/form-data/form-data/issues/196 // https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { +FormData.prototype.hasKnownLength = function () { var hasKnownLength = true; if (this._valuesToMeasure.length) { @@ -15313,7 +15308,7 @@ FormData.prototype.hasKnownLength = function() { return hasKnownLength; }; -FormData.prototype.getLength = function(cb) { +FormData.prototype.getLength = function (cb) { var knownLength = this._overheadLength + this._valueLength; if (this._streams.length) { @@ -15325,13 +15320,13 @@ FormData.prototype.getLength = function(cb) { return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { if (err) { cb(err); return; } - values.forEach(function(length) { + values.forEach(function (length) { knownLength += length; }); @@ -15339,31 +15334,26 @@ FormData.prototype.getLength = function(cb) { }); }; -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; +FormData.prototype.submit = function (params, cb) { + var request; + var options; + var defaults = { method: 'post' }; - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); + // parse provided url if it's string or treat it as options object + if (typeof params === 'string') { + params = parseUrl(params); // eslint-disable-line no-param-reassign + /* eslint sort-keys: 0 */ options = populate({ port: params.port, path: params.pathname, host: params.hostname, protocol: params.protocol }, defaults); - - // use custom params - } else { - + } else { // use custom params options = populate(params, defaults); // if no port provided use default one if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; + options.port = options.protocol === 'https:' ? 443 : 80; } } @@ -15371,14 +15361,14 @@ FormData.prototype.submit = function(params, cb) { options.headers = this.getHeaders(params.headers); // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { + if (options.protocol === 'https:') { request = https.request(options); } else { request = http.request(options); } // get content length and fire away - this.getLength(function(err, length) { + this.getLength(function (err, length) { if (err && err !== 'Unknown stream') { this._error(err); return; @@ -15397,7 +15387,7 @@ FormData.prototype.submit = function(params, cb) { request.removeListener('error', callback); request.removeListener('response', onResponse); - return cb.call(this, error, responce); + return cb.call(this, error, responce); // eslint-disable-line no-invalid-this }; onResponse = callback.bind(this, null); @@ -15410,7 +15400,7 @@ FormData.prototype.submit = function(params, cb) { return request; }; -FormData.prototype._error = function(err) { +FormData.prototype._error = function (err) { if (!this.error) { this.error = err; this.pause(); @@ -15421,6 +15411,10 @@ FormData.prototype._error = function(err) { FormData.prototype.toString = function () { return '[object FormData]'; }; +setToStringTag(FormData, 'FormData'); + +// Public API +module.exports = FormData; /***/ }), @@ -15428,12 +15422,13 @@ FormData.prototype.toString = function () { /***/ 2209: /***/ ((module) => { -// populates missing values -module.exports = function(dst, src) { +"use strict"; - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; + +// populates missing values +module.exports = function (dst, src) { + Object.keys(src).forEach(function (prop) { + dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign }); return dst; @@ -51590,7 +51585,7 @@ function expand(str, isTop) { var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } @@ -51682,6 +51677,83 @@ function expand(str, isTop) { +/***/ }), + +/***/ 2639: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(7564); + +var $apply = __nccwpck_require__(3945); +var $call = __nccwpck_require__(8093); +var $reflectApply = __nccwpck_require__(1330); + +/** @type {import('./actualApply')} */ +module.exports = $reflectApply || bind.call($call, $apply); + + +/***/ }), + +/***/ 3945: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./functionApply')} */ +module.exports = Function.prototype.apply; + + +/***/ }), + +/***/ 8093: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./functionCall')} */ +module.exports = Function.prototype.call; + + +/***/ }), + +/***/ 8705: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(7564); +var $TypeError = __nccwpck_require__(3314); + +var $call = __nccwpck_require__(8093); +var $actualApply = __nccwpck_require__(2639); + +/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ +module.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== 'function') { + throw new $TypeError('a function is required'); + } + return $actualApply(bind, $call, args); +}; + + +/***/ }), + +/***/ 1330: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./reflectApply')} */ +module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; + + /***/ }), /***/ 5630: @@ -52031,6 +52103,1004 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; +/***/ }), + +/***/ 6669: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var callBind = __nccwpck_require__(8705); +var gOPD = __nccwpck_require__(3170); + +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; + +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; + + +/***/ }), + +/***/ 9094: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 3056: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 1620: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 4585: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 6905: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 105: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 3314: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 2578: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 5399: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Object; + + +/***/ }), + +/***/ 8700: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(470); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = __nccwpck_require__(5479)(); +var hasOwn = __nccwpck_require__(4076); +var $TypeError = __nccwpck_require__(3314); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +/** @type {import('.')} */ +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if ( + (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') + || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') + ) { + throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); + } + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: !nonConfigurable, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; + + +/***/ }), + +/***/ 9808: +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(9808); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 470: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var undefined; + +var $Object = __nccwpck_require__(5399); + +var $Error = __nccwpck_require__(1620); +var $EvalError = __nccwpck_require__(3056); +var $RangeError = __nccwpck_require__(4585); +var $ReferenceError = __nccwpck_require__(6905); +var $SyntaxError = __nccwpck_require__(105); +var $TypeError = __nccwpck_require__(3314); +var $URIError = __nccwpck_require__(2578); + +var abs = __nccwpck_require__(5641); +var floor = __nccwpck_require__(6171); +var max = __nccwpck_require__(7147); +var min = __nccwpck_require__(1017); +var pow = __nccwpck_require__(6947); +var round = __nccwpck_require__(2621); +var sign = __nccwpck_require__(156); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = __nccwpck_require__(3170); +var $defineProperty = __nccwpck_require__(9094); + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __nccwpck_require__(3336)(); + +var getProto = __nccwpck_require__(1967); +var $ObjectGPO = __nccwpck_require__(1311); +var $ReflectGPO = __nccwpck_require__(8681); + +var $apply = __nccwpck_require__(3945); +var $call = __nccwpck_require__(8093); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __nccwpck_require__(7564); +var hasOwn = __nccwpck_require__(4076); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 1311: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var $Object = __nccwpck_require__(5399); + +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; + + +/***/ }), + +/***/ 8681: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; + + +/***/ }), + +/***/ 1967: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var reflectGetProto = __nccwpck_require__(8681); +var originalGetProto = __nccwpck_require__(1311); + +var getDunderProto = __nccwpck_require__(6669); + +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); + } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; + + +/***/ }), + +/***/ 1174: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; + + +/***/ }), + +/***/ 3170: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** @type {import('.')} */ +var $gOPD = __nccwpck_require__(1174); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 3336: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(1114); + +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1114: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5479: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var hasSymbols = __nccwpck_require__(1114); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 4076: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __nccwpck_require__(7564); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 5641: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./abs')} */ +module.exports = Math.abs; + + +/***/ }), + +/***/ 6171: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./floor')} */ +module.exports = Math.floor; + + +/***/ }), + +/***/ 7044: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./max')} */ +module.exports = Math.max; + + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./min')} */ +module.exports = Math.min; + + +/***/ }), + +/***/ 6947: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./pow')} */ +module.exports = Math.pow; + + +/***/ }), + +/***/ 2621: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./round')} */ +module.exports = Math.round; + + +/***/ }), + +/***/ 156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var $isNaN = __nccwpck_require__(7044); + +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; + + /***/ }), /***/ 9829: @@ -62815,7 +63885,7 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(8915) -const { stringify, getHeadersList } = __nccwpck_require__(3834) +const { stringify } = __nccwpck_require__(3834) const { webidl } = __nccwpck_require__(4222) const { Headers } = __nccwpck_require__(6349) @@ -62891,14 +63961,13 @@ function getSetCookies (headers) { webidl.brandCheck(headers, Headers, { strict: false }) - const cookies = getHeadersList(headers).cookies + const cookies = headers.getSetCookie() if (!cookies) { return [] } - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) + return cookies.map((pair) => parseSetCookie(pair)) } /** @@ -63326,14 +64395,15 @@ module.exports = { /***/ }), /***/ 3834: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((module) => { "use strict"; -const assert = __nccwpck_require__(2613) -const { kHeadersList } = __nccwpck_require__(6443) - +/** + * @param {string} value + * @returns {boolean} + */ function isCTLExcludingHtab (value) { if (value.length === 0) { return false @@ -63594,31 +64664,13 @@ function stringify (cookie) { return out.join('; ') } -let kHeadersListNode - -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] - } - - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) - - assert(kHeadersListNode, 'Headers cannot be parsed') - } - - const headersList = headers[kHeadersListNode] - assert(headersList) - - return headersList -} - module.exports = { isCTLExcludingHtab, - stringify, - getHeadersList + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify } @@ -67622,6 +68674,7 @@ const { isValidHeaderName, isValidHeaderValue } = __nccwpck_require__(5523) +const util = __nccwpck_require__(9023) const { webidl } = __nccwpck_require__(4222) const assert = __nccwpck_require__(2613) @@ -68175,6 +69228,9 @@ Object.defineProperties(Headers.prototype, { [Symbol.toStringTag]: { value: 'Headers', configurable: true + }, + [util.inspect.custom]: { + enumerable: false } }) @@ -77351,6 +78407,20 @@ class Pool extends PoolBase { ? { ...options.interceptors } : undefined this[kFactory] = factory + + this.on('connectionError', (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } + } + }) } [kGetDispatcher] () { diff --git a/dist/setup/index.js b/dist/setup/index.js index 70aac473..2f06fb35 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -2204,7 +2204,7 @@ const cacheUtils_1 = __nccwpck_require__(680); const auth_1 = __nccwpck_require__(4552); const http_client_1 = __nccwpck_require__(4844); const cache_twirp_client_1 = __nccwpck_require__(1486); -const util_1 = __nccwpck_require__(7564); +const util_1 = __nccwpck_require__(5183); /** * This class is a wrapper around the CacheServiceClientJSON class generated by Twirp. * @@ -2446,7 +2446,7 @@ exports.getUserAgentString = getUserAgentString; /***/ }), -/***/ 7564: +/***/ 5183: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; @@ -18706,6 +18706,9 @@ exports.userAgentPolicy = userAgentPolicy; /***/ 7791: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +"use strict"; + + var CombinedStream = __nccwpck_require__(5630); var util = __nccwpck_require__(9023); var path = __nccwpck_require__(6928); @@ -18714,23 +18717,20 @@ var https = __nccwpck_require__(5692); var parseUrl = (__nccwpck_require__(7016).parse); var fs = __nccwpck_require__(9896); var Stream = (__nccwpck_require__(2203).Stream); +var crypto = __nccwpck_require__(6982); var mime = __nccwpck_require__(4096); var asynckit = __nccwpck_require__(1324); +var setToStringTag = __nccwpck_require__(8700); +var hasOwn = __nccwpck_require__(4076); var populate = __nccwpck_require__(2209); -// Public API -module.exports = FormData; - -// make it a Stream -util.inherits(FormData, CombinedStream); - /** * Create readable "multipart/form-data" streams. * Can be used to submit forms * and file uploads to other web applications. * * @constructor - * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream + * @param {object} options - Properties to be added/overriden for FormData and CombinedStream */ function FormData(options) { if (!(this instanceof FormData)) { @@ -18743,35 +18743,39 @@ function FormData(options) { CombinedStream.call(this); - options = options || {}; - for (var option in options) { + options = options || {}; // eslint-disable-line no-param-reassign + for (var option in options) { // eslint-disable-line no-restricted-syntax this[option] = options[option]; } } +// make it a Stream +util.inherits(FormData, CombinedStream); + FormData.LINE_BREAK = '\r\n'; FormData.DEFAULT_CONTENT_TYPE = 'application/octet-stream'; -FormData.prototype.append = function(field, value, options) { - - options = options || {}; +FormData.prototype.append = function (field, value, options) { + options = options || {}; // eslint-disable-line no-param-reassign // allow filename as single option - if (typeof options == 'string') { - options = {filename: options}; + if (typeof options === 'string') { + options = { filename: options }; // eslint-disable-line no-param-reassign } var append = CombinedStream.prototype.append.bind(this); // all that streamy business can't handle numbers - if (typeof value == 'number') { - value = '' + value; + if (typeof value === 'number' || value == null) { + value = String(value); // eslint-disable-line no-param-reassign } // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { - // Please convert your array into string - // the way web server expects it + if (Array.isArray(value)) { + /* + * Please convert your array into string + * the way web server expects it + */ this._error(new Error('Arrays are not supported.')); return; } @@ -18787,15 +18791,17 @@ FormData.prototype.append = function(field, value, options) { this._trackLength(header, value, options); }; -FormData.prototype._trackLength = function(header, value, options) { +FormData.prototype._trackLength = function (header, value, options) { var valueLength = 0; - // used w/ getLengthSync(), when length is known. - // e.g. for streaming directly from a remote server, - // w/ a known file a size, and not wanting to wait for - // incoming file to finish to get its size. + /* + * used w/ getLengthSync(), when length is known. + * e.g. for streaming directly from a remote server, + * w/ a known file a size, and not wanting to wait for + * incoming file to finish to get its size. + */ if (options.knownLength != null) { - valueLength += +options.knownLength; + valueLength += Number(options.knownLength); } else if (Buffer.isBuffer(value)) { valueLength = value.length; } else if (typeof value === 'string') { @@ -18805,12 +18811,10 @@ FormData.prototype._trackLength = function(header, value, options) { this._valueLength += valueLength; // @check why add CRLF? does this account for custom/multiple CRLFs? - this._overheadLength += - Buffer.byteLength(header) + - FormData.LINE_BREAK.length; + this._overheadLength += Buffer.byteLength(header) + FormData.LINE_BREAK.length; // empty or either doesn't have path or not an http response or not a stream - if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) { + if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) { return; } @@ -18820,10 +18824,8 @@ FormData.prototype._trackLength = function(header, value, options) { } }; -FormData.prototype._lengthRetriever = function(value, callback) { - - if (value.hasOwnProperty('fd')) { - +FormData.prototype._lengthRetriever = function (value, callback) { + if (hasOwn(value, 'fd')) { // take read range into a account // `end` = Infinity –> read file till the end // @@ -18832,54 +18834,52 @@ FormData.prototype._lengthRetriever = function(value, callback) { // Fix it when node fixes it. // https://github.com/joyent/node/issues/7819 if (value.end != undefined && value.end != Infinity && value.start != undefined) { - // when end specified // no need to calculate range // inclusive, starts with 0 - callback(null, value.end + 1 - (value.start ? value.start : 0)); + callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return - // not that fast snoopy + // not that fast snoopy } else { // still need to fetch file size from fs - fs.stat(value.path, function(err, stat) { - - var fileSize; - + fs.stat(value.path, function (err, stat) { if (err) { callback(err); return; } // update final size based on the range options - fileSize = stat.size - (value.start ? value.start : 0); + var fileSize = stat.size - (value.start ? value.start : 0); callback(null, fileSize); }); } - // or http response - } else if (value.hasOwnProperty('httpVersion')) { - callback(null, +value.headers['content-length']); + // or http response + } else if (hasOwn(value, 'httpVersion')) { + callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return - // or request stream http://github.com/mikeal/request - } else if (value.hasOwnProperty('httpModule')) { + // or request stream http://github.com/mikeal/request + } else if (hasOwn(value, 'httpModule')) { // wait till response come back - value.on('response', function(response) { + value.on('response', function (response) { value.pause(); - callback(null, +response.headers['content-length']); + callback(null, Number(response.headers['content-length'])); }); value.resume(); - // something else + // something else } else { - callback('Unknown stream'); + callback('Unknown stream'); // eslint-disable-line callback-return } }; -FormData.prototype._multiPartHeader = function(field, value, options) { - // custom header specified (as string)? - // it becomes responsible for boundary - // (e.g. to handle extra CRLFs on .NET servers) - if (typeof options.header == 'string') { +FormData.prototype._multiPartHeader = function (field, value, options) { + /* + * custom header specified (as string)? + * it becomes responsible for boundary + * (e.g. to handle extra CRLFs on .NET servers) + */ + if (typeof options.header === 'string') { return options.header; } @@ -18887,7 +18887,7 @@ FormData.prototype._multiPartHeader = function(field, value, options) { var contentType = this._getContentType(value, options); var contents = ''; - var headers = { + var headers = { // add custom disposition as third element or keep it two elements if not 'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []), // if no content type. allow it to be empty array @@ -18895,77 +18895,74 @@ FormData.prototype._multiPartHeader = function(field, value, options) { }; // allow custom headers. - if (typeof options.header == 'object') { + if (typeof options.header === 'object') { populate(headers, options.header); } var header; - for (var prop in headers) { - if (!headers.hasOwnProperty(prop)) continue; - header = headers[prop]; + for (var prop in headers) { // eslint-disable-line no-restricted-syntax + if (hasOwn(headers, prop)) { + header = headers[prop]; - // skip nullish headers. - if (header == null) { - continue; - } + // skip nullish headers. + if (header == null) { + continue; // eslint-disable-line no-restricted-syntax, no-continue + } - // convert all headers to arrays. - if (!Array.isArray(header)) { - header = [header]; - } + // convert all headers to arrays. + if (!Array.isArray(header)) { + header = [header]; + } - // add non-empty headers. - if (header.length) { - contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + // add non-empty headers. + if (header.length) { + contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK; + } } } return '--' + this.getBoundary() + FormData.LINE_BREAK + contents + FormData.LINE_BREAK; }; -FormData.prototype._getContentDisposition = function(value, options) { - - var filename - , contentDisposition - ; +FormData.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return + var filename; if (typeof options.filepath === 'string') { // custom filepath for relative paths filename = path.normalize(options.filepath).replace(/\\/g, '/'); - } else if (options.filename || value.name || value.path) { - // custom filename take precedence - // formidable and the browser add a name property - // fs- and request- streams have path property - filename = path.basename(options.filename || value.name || value.path); - } else if (value.readable && value.hasOwnProperty('httpVersion')) { + } else if (options.filename || (value && (value.name || value.path))) { + /* + * custom filename take precedence + * formidable and the browser add a name property + * fs- and request- streams have path property + */ + filename = path.basename(options.filename || (value && (value.name || value.path))); + } else if (value && value.readable && hasOwn(value, 'httpVersion')) { // or try http response filename = path.basename(value.client._httpMessage.path || ''); } if (filename) { - contentDisposition = 'filename="' + filename + '"'; + return 'filename="' + filename + '"'; } - - return contentDisposition; }; -FormData.prototype._getContentType = function(value, options) { - +FormData.prototype._getContentType = function (value, options) { // use custom content-type above all var contentType = options.contentType; // or try `name` from formidable, browser - if (!contentType && value.name) { + if (!contentType && value && value.name) { contentType = mime.lookup(value.name); } // or try `path` from fs-, request- streams - if (!contentType && value.path) { + if (!contentType && value && value.path) { contentType = mime.lookup(value.path); } // or if it's http-reponse - if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) { + if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) { contentType = value.headers['content-type']; } @@ -18975,18 +18972,18 @@ FormData.prototype._getContentType = function(value, options) { } // fallback to the default content type if `value` is not simple value - if (!contentType && typeof value == 'object') { + if (!contentType && value && typeof value === 'object') { contentType = FormData.DEFAULT_CONTENT_TYPE; } return contentType; }; -FormData.prototype._multiPartFooter = function() { - return function(next) { +FormData.prototype._multiPartFooter = function () { + return function (next) { var footer = FormData.LINE_BREAK; - var lastPart = (this._streams.length === 0); + var lastPart = this._streams.length === 0; if (lastPart) { footer += this._lastBoundary(); } @@ -18995,18 +18992,18 @@ FormData.prototype._multiPartFooter = function() { }.bind(this); }; -FormData.prototype._lastBoundary = function() { +FormData.prototype._lastBoundary = function () { return '--' + this.getBoundary() + '--' + FormData.LINE_BREAK; }; -FormData.prototype.getHeaders = function(userHeaders) { +FormData.prototype.getHeaders = function (userHeaders) { var header; var formHeaders = { 'content-type': 'multipart/form-data; boundary=' + this.getBoundary() }; - for (header in userHeaders) { - if (userHeaders.hasOwnProperty(header)) { + for (header in userHeaders) { // eslint-disable-line no-restricted-syntax + if (hasOwn(userHeaders, header)) { formHeaders[header.toLowerCase()] = userHeaders[header]; } } @@ -19014,11 +19011,14 @@ FormData.prototype.getHeaders = function(userHeaders) { return formHeaders; }; -FormData.prototype.setBoundary = function(boundary) { +FormData.prototype.setBoundary = function (boundary) { + if (typeof boundary !== 'string') { + throw new TypeError('FormData boundary must be a string'); + } this._boundary = boundary; }; -FormData.prototype.getBoundary = function() { +FormData.prototype.getBoundary = function () { if (!this._boundary) { this._generateBoundary(); } @@ -19026,60 +19026,55 @@ FormData.prototype.getBoundary = function() { return this._boundary; }; -FormData.prototype.getBuffer = function() { - var dataBuffer = new Buffer.alloc( 0 ); +FormData.prototype.getBuffer = function () { + var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap var boundary = this.getBoundary(); // Create the form content. Add Line breaks to the end of data. for (var i = 0, len = this._streams.length; i < len; i++) { if (typeof this._streams[i] !== 'function') { - // Add content to the buffer. - if(Buffer.isBuffer(this._streams[i])) { - dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]); - }else { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]); + if (Buffer.isBuffer(this._streams[i])) { + dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]); + } else { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]); } // Add break after content. - if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) { - dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData.LINE_BREAK)] ); + if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) { + dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData.LINE_BREAK)]); } } } // Add the footer and return the Buffer object. - return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] ); + return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]); }; -FormData.prototype._generateBoundary = function() { +FormData.prototype._generateBoundary = function () { // This generates a 50 character boundary similar to those used by Firefox. - // They are optimized for boyer-moore parsing. - var boundary = '--------------------------'; - for (var i = 0; i < 24; i++) { - boundary += Math.floor(Math.random() * 10).toString(16); - } - this._boundary = boundary; + // They are optimized for boyer-moore parsing. + this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex'); }; // Note: getLengthSync DOESN'T calculate streams length -// As workaround one can calculate file size manually -// and add it as knownLength option -FormData.prototype.getLengthSync = function() { +// As workaround one can calculate file size manually and add it as knownLength option +FormData.prototype.getLengthSync = function () { var knownLength = this._overheadLength + this._valueLength; - // Don't get confused, there are 3 "internal" streams for each keyval pair - // so it basically checks if there is any value added to the form + // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form if (this._streams.length) { knownLength += this._lastBoundary().length; } // https://github.com/form-data/form-data/issues/40 if (!this.hasKnownLength()) { - // Some async length retrievers are present - // therefore synchronous length calculation is false. - // Please use getLength(callback) to get proper length + /* + * Some async length retrievers are present + * therefore synchronous length calculation is false. + * Please use getLength(callback) to get proper length + */ this._error(new Error('Cannot calculate proper length in synchronous way.')); } @@ -19089,7 +19084,7 @@ FormData.prototype.getLengthSync = function() { // Public API to check if length of added values is known // https://github.com/form-data/form-data/issues/196 // https://github.com/form-data/form-data/issues/262 -FormData.prototype.hasKnownLength = function() { +FormData.prototype.hasKnownLength = function () { var hasKnownLength = true; if (this._valuesToMeasure.length) { @@ -19099,7 +19094,7 @@ FormData.prototype.hasKnownLength = function() { return hasKnownLength; }; -FormData.prototype.getLength = function(cb) { +FormData.prototype.getLength = function (cb) { var knownLength = this._overheadLength + this._valueLength; if (this._streams.length) { @@ -19111,13 +19106,13 @@ FormData.prototype.getLength = function(cb) { return; } - asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) { + asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) { if (err) { cb(err); return; } - values.forEach(function(length) { + values.forEach(function (length) { knownLength += length; }); @@ -19125,31 +19120,26 @@ FormData.prototype.getLength = function(cb) { }); }; -FormData.prototype.submit = function(params, cb) { - var request - , options - , defaults = {method: 'post'} - ; +FormData.prototype.submit = function (params, cb) { + var request; + var options; + var defaults = { method: 'post' }; - // parse provided url if it's string - // or treat it as options object - if (typeof params == 'string') { - - params = parseUrl(params); + // parse provided url if it's string or treat it as options object + if (typeof params === 'string') { + params = parseUrl(params); // eslint-disable-line no-param-reassign + /* eslint sort-keys: 0 */ options = populate({ port: params.port, path: params.pathname, host: params.hostname, protocol: params.protocol }, defaults); - - // use custom params - } else { - + } else { // use custom params options = populate(params, defaults); // if no port provided use default one if (!options.port) { - options.port = options.protocol == 'https:' ? 443 : 80; + options.port = options.protocol === 'https:' ? 443 : 80; } } @@ -19157,14 +19147,14 @@ FormData.prototype.submit = function(params, cb) { options.headers = this.getHeaders(params.headers); // https if specified, fallback to http in any other case - if (options.protocol == 'https:') { + if (options.protocol === 'https:') { request = https.request(options); } else { request = http.request(options); } // get content length and fire away - this.getLength(function(err, length) { + this.getLength(function (err, length) { if (err && err !== 'Unknown stream') { this._error(err); return; @@ -19183,7 +19173,7 @@ FormData.prototype.submit = function(params, cb) { request.removeListener('error', callback); request.removeListener('response', onResponse); - return cb.call(this, error, responce); + return cb.call(this, error, responce); // eslint-disable-line no-invalid-this }; onResponse = callback.bind(this, null); @@ -19196,7 +19186,7 @@ FormData.prototype.submit = function(params, cb) { return request; }; -FormData.prototype._error = function(err) { +FormData.prototype._error = function (err) { if (!this.error) { this.error = err; this.pause(); @@ -19207,6 +19197,10 @@ FormData.prototype._error = function(err) { FormData.prototype.toString = function () { return '[object FormData]'; }; +setToStringTag(FormData, 'FormData'); + +// Public API +module.exports = FormData; /***/ }), @@ -19214,12 +19208,13 @@ FormData.prototype.toString = function () { /***/ 2209: /***/ ((module) => { -// populates missing values -module.exports = function(dst, src) { +"use strict"; - Object.keys(src).forEach(function(prop) - { - dst[prop] = dst[prop] || src[prop]; + +// populates missing values +module.exports = function (dst, src) { + Object.keys(src).forEach(function (prop) { + dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign }); return dst; @@ -57560,7 +57555,7 @@ function expand(str, isTop) { var isOptions = m.body.indexOf(',') >= 0; if (!isSequence && !isOptions) { // {a},b} - if (m.post.match(/,.*\}/)) { + if (m.post.match(/,(?!,).*\}/)) { str = m.pre + '{' + m.body + escClose + m.post; return expand(str); } @@ -57652,6 +57647,83 @@ function expand(str, isTop) { +/***/ }), + +/***/ 2639: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(7564); + +var $apply = __nccwpck_require__(3945); +var $call = __nccwpck_require__(8093); +var $reflectApply = __nccwpck_require__(1330); + +/** @type {import('./actualApply')} */ +module.exports = $reflectApply || bind.call($call, $apply); + + +/***/ }), + +/***/ 3945: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./functionApply')} */ +module.exports = Function.prototype.apply; + + +/***/ }), + +/***/ 8093: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./functionCall')} */ +module.exports = Function.prototype.call; + + +/***/ }), + +/***/ 8705: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var bind = __nccwpck_require__(7564); +var $TypeError = __nccwpck_require__(3314); + +var $call = __nccwpck_require__(8093); +var $actualApply = __nccwpck_require__(2639); + +/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */ +module.exports = function callBindBasic(args) { + if (args.length < 1 || typeof args[0] !== 'function') { + throw new $TypeError('a function is required'); + } + return $actualApply(bind, $call, args); +}; + + +/***/ }), + +/***/ 1330: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./reflectApply')} */ +module.exports = typeof Reflect !== 'undefined' && Reflect && Reflect.apply; + + /***/ }), /***/ 5630: @@ -58001,6 +58073,1004 @@ DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() { }; +/***/ }), + +/***/ 6669: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var callBind = __nccwpck_require__(8705); +var gOPD = __nccwpck_require__(3170); + +var hasProtoAccessor; +try { + // eslint-disable-next-line no-extra-parens, no-proto + hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype; +} catch (e) { + if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') { + throw e; + } +} + +// eslint-disable-next-line no-extra-parens +var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__')); + +var $Object = Object; +var $getPrototypeOf = $Object.getPrototypeOf; + +/** @type {import('./get')} */ +module.exports = desc && typeof desc.get === 'function' + ? callBind([desc.get]) + : typeof $getPrototypeOf === 'function' + ? /** @type {import('./get')} */ function getDunder(value) { + // eslint-disable-next-line eqeqeq + return $getPrototypeOf(value == null ? value : $Object(value)); + } + : false; + + +/***/ }), + +/***/ 9094: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +var $defineProperty = Object.defineProperty || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + + +/***/ }), + +/***/ 3056: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./eval')} */ +module.exports = EvalError; + + +/***/ }), + +/***/ 1620: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Error; + + +/***/ }), + +/***/ 4585: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./range')} */ +module.exports = RangeError; + + +/***/ }), + +/***/ 6905: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + + +/***/ }), + +/***/ 105: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + + +/***/ }), + +/***/ 3314: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./type')} */ +module.exports = TypeError; + + +/***/ }), + +/***/ 2578: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./uri')} */ +module.exports = URIError; + + +/***/ }), + +/***/ 5399: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('.')} */ +module.exports = Object; + + +/***/ }), + +/***/ 8700: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var GetIntrinsic = __nccwpck_require__(470); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasToStringTag = __nccwpck_require__(5479)(); +var hasOwn = __nccwpck_require__(4076); +var $TypeError = __nccwpck_require__(3314); + +var toStringTag = hasToStringTag ? Symbol.toStringTag : null; + +/** @type {import('.')} */ +module.exports = function setToStringTag(object, value) { + var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force; + var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable; + if ( + (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean') + || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean') + ) { + throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans'); + } + if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) { + if ($defineProperty) { + $defineProperty(object, toStringTag, { + configurable: !nonConfigurable, + enumerable: false, + value: value, + writable: false + }); + } else { + object[toStringTag] = value; // eslint-disable-line no-param-reassign + } + } +}; + + +/***/ }), + +/***/ 9808: +/***/ ((module) => { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 7564: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var implementation = __nccwpck_require__(9808); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 470: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var undefined; + +var $Object = __nccwpck_require__(5399); + +var $Error = __nccwpck_require__(1620); +var $EvalError = __nccwpck_require__(3056); +var $RangeError = __nccwpck_require__(4585); +var $ReferenceError = __nccwpck_require__(6905); +var $SyntaxError = __nccwpck_require__(105); +var $TypeError = __nccwpck_require__(3314); +var $URIError = __nccwpck_require__(2578); + +var abs = __nccwpck_require__(5641); +var floor = __nccwpck_require__(6171); +var max = __nccwpck_require__(7147); +var min = __nccwpck_require__(1017); +var pow = __nccwpck_require__(6947); +var round = __nccwpck_require__(2621); +var sign = __nccwpck_require__(156); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = __nccwpck_require__(3170); +var $defineProperty = __nccwpck_require__(9094); + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __nccwpck_require__(3336)(); + +var getProto = __nccwpck_require__(1967); +var $ObjectGPO = __nccwpck_require__(1311); +var $ReflectGPO = __nccwpck_require__(8681); + +var $apply = __nccwpck_require__(3945); +var $call = __nccwpck_require__(8093); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float16Array%': typeof Float16Array === 'undefined' ? undefined : Float16Array, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': $Object, + '%Object.getOwnPropertyDescriptor%': $gOPD, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, + + '%Function.prototype.call%': $call, + '%Function.prototype.apply%': $apply, + '%Object.defineProperty%': $defineProperty, + '%Object.getPrototypeOf%': $ObjectGPO, + '%Math.abs%': abs, + '%Math.floor%': floor, + '%Math.max%': max, + '%Math.min%': min, + '%Math.pow%': pow, + '%Math.round%': round, + '%Math.sign%': sign, + '%Reflect.getPrototypeOf%': $ReflectGPO +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __nccwpck_require__(7564); +var hasOwn = __nccwpck_require__(4076); +var $concat = bind.call($call, Array.prototype.concat); +var $spliceApply = bind.call($apply, Array.prototype.splice); +var $replace = bind.call($call, String.prototype.replace); +var $strSlice = bind.call($call, String.prototype.slice); +var $exec = bind.call($call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 1311: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var $Object = __nccwpck_require__(5399); + +/** @type {import('./Object.getPrototypeOf')} */ +module.exports = $Object.getPrototypeOf || null; + + +/***/ }), + +/***/ 8681: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./Reflect.getPrototypeOf')} */ +module.exports = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null; + + +/***/ }), + +/***/ 1967: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var reflectGetProto = __nccwpck_require__(8681); +var originalGetProto = __nccwpck_require__(1311); + +var getDunderProto = __nccwpck_require__(6669); + +/** @type {import('.')} */ +module.exports = reflectGetProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return reflectGetProto(O); + } + : originalGetProto + ? function getProto(O) { + if (!O || (typeof O !== 'object' && typeof O !== 'function')) { + throw new TypeError('getProto: not an object'); + } + // @ts-expect-error TS can't narrow inside a closure, for some reason + return originalGetProto(O); + } + : getDunderProto + ? function getProto(O) { + // @ts-expect-error TS can't narrow inside a closure, for some reason + return getDunderProto(O); + } + : null; + + +/***/ }), + +/***/ 1174: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./gOPD')} */ +module.exports = Object.getOwnPropertyDescriptor; + + +/***/ }), + +/***/ 3170: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +/** @type {import('.')} */ +var $gOPD = __nccwpck_require__(1174); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 3336: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __nccwpck_require__(1114); + +/** @type {import('.')} */ +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 1114: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./shams')} */ +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + /** @type {{ [k in symbol]?: unknown }} */ + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + // eslint-disable-next-line no-extra-parens + var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym)); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 5479: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var hasSymbols = __nccwpck_require__(1114); + +/** @type {import('.')} */ +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 4076: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = __nccwpck_require__(7564); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + + +/***/ }), + +/***/ 5641: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./abs')} */ +module.exports = Math.abs; + + +/***/ }), + +/***/ 6171: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./floor')} */ +module.exports = Math.floor; + + +/***/ }), + +/***/ 7044: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./isNaN')} */ +module.exports = Number.isNaN || function isNaN(a) { + return a !== a; +}; + + +/***/ }), + +/***/ 7147: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./max')} */ +module.exports = Math.max; + + +/***/ }), + +/***/ 1017: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./min')} */ +module.exports = Math.min; + + +/***/ }), + +/***/ 6947: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./pow')} */ +module.exports = Math.pow; + + +/***/ }), + +/***/ 2621: +/***/ ((module) => { + +"use strict"; + + +/** @type {import('./round')} */ +module.exports = Math.round; + + +/***/ }), + +/***/ 156: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + + +var $isNaN = __nccwpck_require__(7044); + +/** @type {import('./sign')} */ +module.exports = function sign(number) { + if ($isNaN(number) || number === 0) { + return number; + } + return number < 0 ? -1 : +1; +}; + + /***/ }), /***/ 9829: @@ -71345,7 +72415,7 @@ module.exports = { const { parseSetCookie } = __nccwpck_require__(8915) -const { stringify, getHeadersList } = __nccwpck_require__(3834) +const { stringify } = __nccwpck_require__(3834) const { webidl } = __nccwpck_require__(4222) const { Headers } = __nccwpck_require__(6349) @@ -71421,14 +72491,13 @@ function getSetCookies (headers) { webidl.brandCheck(headers, Headers, { strict: false }) - const cookies = getHeadersList(headers).cookies + const cookies = headers.getSetCookie() if (!cookies) { return [] } - // In older versions of undici, cookies is a list of name:value. - return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair)) + return cookies.map((pair) => parseSetCookie(pair)) } /** @@ -71856,14 +72925,15 @@ module.exports = { /***/ }), /***/ 3834: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { +/***/ ((module) => { "use strict"; -const assert = __nccwpck_require__(2613) -const { kHeadersList } = __nccwpck_require__(6443) - +/** + * @param {string} value + * @returns {boolean} + */ function isCTLExcludingHtab (value) { if (value.length === 0) { return false @@ -72124,31 +73194,13 @@ function stringify (cookie) { return out.join('; ') } -let kHeadersListNode - -function getHeadersList (headers) { - if (headers[kHeadersList]) { - return headers[kHeadersList] - } - - if (!kHeadersListNode) { - kHeadersListNode = Object.getOwnPropertySymbols(headers).find( - (symbol) => symbol.description === 'headers list' - ) - - assert(kHeadersListNode, 'Headers cannot be parsed') - } - - const headersList = headers[kHeadersListNode] - assert(headersList) - - return headersList -} - module.exports = { isCTLExcludingHtab, - stringify, - getHeadersList + validateCookieName, + validateCookiePath, + validateCookieValue, + toIMFDate, + stringify } @@ -76152,6 +77204,7 @@ const { isValidHeaderName, isValidHeaderValue } = __nccwpck_require__(5523) +const util = __nccwpck_require__(9023) const { webidl } = __nccwpck_require__(4222) const assert = __nccwpck_require__(2613) @@ -76705,6 +77758,9 @@ Object.defineProperties(Headers.prototype, { [Symbol.toStringTag]: { value: 'Headers', configurable: true + }, + [util.inspect.custom]: { + enumerable: false } }) @@ -85881,6 +86937,20 @@ class Pool extends PoolBase { ? { ...options.interceptors } : undefined this[kFactory] = factory + + this.on('connectionError', (origin, targets, error) => { + // If a connection error occurs, we remove the client from the pool, + // and emit a connectionError event. They will not be re-used. + // Fixes https://github.com/nodejs/undici/issues/3895 + for (const target of targets) { + // Do not use kRemoveClient here, as it will close the client, + // but the client cannot be closed in this state. + const idx = this[kClients].indexOf(target) + if (idx !== -1) { + this[kClients].splice(idx, 1) + } + } + }) } [kGetDispatcher] () { diff --git a/package-lock.json b/package-lock.json index bfbb0d3c..6152ec78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -205,12 +205,15 @@ } }, "node_modules/@azure/core-http/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -1607,12 +1610,15 @@ } }, "node_modules/@types/node-fetch/node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz", + "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", "mime-types": "^2.1.12" }, "engines": { @@ -2120,9 +2126,10 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2199,6 +2206,19 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2484,6 +2504,20 @@ "node": ">=6.0.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ejs": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", @@ -2533,6 +2567,51 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -3009,9 +3088,9 @@ } }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3080,13 +3159,17 @@ "dev": true }, "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.5.tgz", + "integrity": "sha512-jqdObeR2rxZZbPSGL+3VckHMYtu+f9//KXBsVny6JSX/pa38Fy+bGjuG8eW/H6USNQWhLi8Num++cU2yOCNz4A==", + "license": "MIT", "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.35", + "safe-buffer": "^5.2.1" }, "engines": { "node": ">= 0.12" @@ -3116,7 +3199,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3139,6 +3221,30 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -3148,6 +3254,19 @@ "node": ">=8.0.0" } }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/get-stream": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", @@ -3227,6 +3346,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", @@ -3248,11 +3379,38 @@ "node": ">=8" } }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", - "dev": true, + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", "dependencies": { "function-bind": "^1.1.2" }, @@ -4255,6 +4413,15 @@ "tmpl": "1.0.5" } }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -4883,6 +5050,26 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/sax": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", @@ -5268,9 +5455,9 @@ } }, "node_modules/undici": { - "version": "5.28.5", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz", - "integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==", + "version": "5.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.29.0.tgz", + "integrity": "sha512-raqeBD6NQK4SkWhQzeYKd1KmIG6dllBOTt55Rmkt4HtI9mwdWtJljnrXjAFUBLTSN67HWrOIZ3EPF4kjUw80Bg==", "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" From 9322b3ca74000aeb2c01eb777b646334015ddd72 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 5 Aug 2025 00:55:53 +0530 Subject: [PATCH 08/19] Upgrade setuptools to 78.1.1 to fix path traversal vulnerability in PackageIndex.download (#1165) * fix #174 * npm audit fix --- __tests__/data/poetry.lock | 51 ++++++++++++++++++++++++----------- __tests__/data/pyproject.toml | 6 ++--- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/__tests__/data/poetry.lock b/__tests__/data/poetry.lock index ec02e361..68bb889d 100644 --- a/__tests__/data/poetry.lock +++ b/__tests__/data/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.5 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.3 and should not be changed by hand. [[package]] name = "altgraph" @@ -6,6 +6,7 @@ version = "0.17.4" description = "Python graph (network) package" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "altgraph-0.17.4-py2.py3-none-any.whl", hash = "sha256:642743b4750de17e655e6711601b077bc6598dbfa3ba5fa2b2a35ce12b508dff"}, {file = "altgraph-0.17.4.tar.gz", hash = "sha256:1b5afbb98f6c4dcadb2e2ae6ab9fa994bbb8c1d75f4fa96d340f9437ae454406"}, @@ -17,6 +18,7 @@ version = "4.0.1" description = "the modular source code checker: pep8 pyflakes and co" optional = false python-versions = ">=3.6" +groups = ["main"] files = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, @@ -33,6 +35,8 @@ version = "8.5.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version == \"3.9\"" files = [ {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, @@ -42,12 +46,12 @@ files = [ zipp = ">=3.20" [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -56,6 +60,8 @@ version = "1.16.3" description = "Mach-O header analysis and editing" optional = false python-versions = "*" +groups = ["main"] +markers = "sys_platform == \"darwin\"" files = [ {file = "macholib-1.16.3-py2.py3-none-any.whl", hash = "sha256:0e315d7583d38b8c77e815b1ecbdbf504a8258d8b3e17b61165c6feb60d18f2c"}, {file = "macholib-1.16.3.tar.gz", hash = "sha256:07ae9e15e8e4cd9a788013d81f5908b3609aa76f9b1421bae9c4d7606ec86a30"}, @@ -70,6 +76,7 @@ version = "0.6.1" description = "McCabe checker, plugin for flake8" optional = false python-versions = "*" +groups = ["main"] files = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, @@ -81,6 +88,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -92,6 +100,8 @@ version = "2024.8.26" description = "Python PE parsing module" optional = false python-versions = ">=3.6.0" +groups = ["main"] +markers = "sys_platform == \"win32\"" files = [ {file = "pefile-2024.8.26-py3-none-any.whl", hash = "sha256:76f8b485dcd3b1bb8166f1128d395fa3d87af26360c2358fb75b80019b957c6f"}, {file = "pefile-2024.8.26.tar.gz", hash = "sha256:3ff6c5d8b43e8c37bb6e6dd5085658d658a7a0bdcd20b6a07b1fcfc1c4e9d632"}, @@ -103,6 +113,7 @@ version = "2.8.0" description = "Python style guide checker" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["main"] files = [ {file = "pycodestyle-2.8.0-py2.py3-none-any.whl", hash = "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20"}, {file = "pycodestyle-2.8.0.tar.gz", hash = "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f"}, @@ -114,6 +125,7 @@ version = "2.4.0" description = "passive checker of Python programs" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["main"] files = [ {file = "pyflakes-2.4.0-py2.py3-none-any.whl", hash = "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e"}, {file = "pyflakes-2.4.0.tar.gz", hash = "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c"}, @@ -125,6 +137,7 @@ version = "6.10.0" description = "PyInstaller bundles a Python application and all its dependencies into a single package." optional = false python-versions = "<3.14,>=3.8" +groups = ["main"] files = [ {file = "pyinstaller-6.10.0-py3-none-macosx_10_13_universal2.whl", hash = "sha256:d60fb22859e11483af735aec115fdde09467cdbb29edd9844839f2c920b748c0"}, {file = "pyinstaller-6.10.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:46d75359668993ddd98630a3669dc5249f3c446e35239b43bc7f4155bc574748"}, @@ -160,6 +173,7 @@ version = "2025.1" description = "Community maintained hooks for PyInstaller" optional = false python-versions = ">=3.8" +groups = ["main"] files = [ {file = "pyinstaller_hooks_contrib-2025.1-py3-none-any.whl", hash = "sha256:d3c799470cbc0bda60dcc8e6b4ab976777532b77621337f2037f558905e3a8e9"}, {file = "pyinstaller_hooks_contrib-2025.1.tar.gz", hash = "sha256:130818f9e9a0a7f2261f1fd66054966a3a50c99d000981c5d1db11d3ad0c6ab2"}, @@ -176,6 +190,8 @@ version = "0.2.3" description = "A (partial) reimplementation of pywin32 using ctypes/cffi" optional = false python-versions = ">=3.6" +groups = ["main"] +markers = "sys_platform == \"win32\"" files = [ {file = "pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755"}, {file = "pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8"}, @@ -183,23 +199,24 @@ files = [ [[package]] name = "setuptools" -version = "75.3.2" +version = "80.9.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" +groups = ["main"] files = [ - {file = "setuptools-75.3.2-py3-none-any.whl", hash = "sha256:90ab613b6583fc02d5369cbca13ea26ea0e182d1df2d943ee9cbe81d4c61add9"}, - {file = "setuptools-75.3.2.tar.gz", hash = "sha256:3c1383e1038b68556a382c1e8ded8887cd20141b0eb5708a6c8d277de49364f5"}, + {file = "setuptools-80.9.0-py3-none-any.whl", hash = "sha256:062d34222ad13e0cc312a4c02d73f059e86a4acbfbdea8f8f76b28c99f306922"}, + {file = "setuptools-80.9.0.tar.gz", hash = "sha256:f36b47402ecde768dbfafc46e8e4207b4360c654f1f3bb84475f0a28628fb19c"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.5.2)"] -core = ["importlib-metadata (>=6)", "importlib-resources (>=5.10.2)", "jaraco.collections", "jaraco.functools", "jaraco.text (>=3.7)", "more-itertools", "more-itertools (>=8.8)", "packaging", "packaging (>=24)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] +core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "jaraco.test (>=5.5)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "ruff (<=0.7.1)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib-metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.12.*)", "pytest-mypy"] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"] [[package]] name = "zipp" @@ -207,20 +224,22 @@ version = "3.20.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" +groups = ["main"] +markers = "python_version == \"3.9\"" files = [ {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [metadata] -lock-version = "2.0" -python-versions = ">=3.8,<3.14" -content-hash = "6db8fff0987f3dadb02cbf0e510a2d04b01ab2dc6d7b0fb32a0e33a8d30b3a58" +lock-version = "2.1" +python-versions = ">=3.9,<3.14" +content-hash = "9a14798bf374c540031f893ff18f9b187bd984391e9da99d13c0e6710b7de09e" diff --git a/__tests__/data/pyproject.toml b/__tests__/data/pyproject.toml index 1494329f..a06d24f7 100644 --- a/__tests__/data/pyproject.toml +++ b/__tests__/data/pyproject.toml @@ -5,13 +5,13 @@ description = "" authors = ["Your Name "] [tool.poetry.dependencies] -python = ">=3.8,<3.14" +python = ">=3.9,<3.14" flake8 = "^4.0.1" pyinstaller = "6.10.0" - +setuptools = ">=78.1.1" [tool.poetry.dev-dependencies] [build-system] requires = ["poetry-core>=1.0.0"] -build-backend = "poetry.core.masonry.api" \ No newline at end of file +build-backend = "poetry.core.masonry.api" From f62a0e252fe7114e86949abfa6e1e89f85bb38c2 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 26 Aug 2025 08:15:55 +0530 Subject: [PATCH 09/19] Change missing cache directory error to warning (#1182) * update error to warning when no dependency to cache * updated the return --- dist/cache-save/index.js | 3 ++- src/cache-save.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 9300df32..0506d476 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -87883,7 +87883,8 @@ function saveCache(packageManager) { const cachePaths = JSON.parse(cachePathState); core.debug(`paths for caching are ${cachePaths.join(', ')}`); if (!isCacheDirectoryExists(cachePaths)) { - throw new Error(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); + core.warning(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); + return; } const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY); const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); diff --git a/src/cache-save.ts b/src/cache-save.ts index 4aec04e4..abeef2f3 100644 --- a/src/cache-save.ts +++ b/src/cache-save.ts @@ -38,11 +38,12 @@ async function saveCache(packageManager: string) { core.debug(`paths for caching are ${cachePaths.join(', ')}`); if (!isCacheDirectoryExists(cachePaths)) { - throw new Error( + core.warning( `Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join( ', ' )}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.` ); + return; } const primaryKey = core.getState(State.STATE_CACHE_PRIMARY_KEY); From 5b668cf7652160527499ee14ceaff4be9306cb88 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 21:49:07 -0500 Subject: [PATCH 10/19] Bump actions/checkout from 4 to 5 (#1181) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/e2e-cache-freethreaded.yml | 14 ++++----- .github/workflows/e2e-cache.yml | 14 ++++----- .github/workflows/e2e-tests.yml | 2 +- .../workflows/publish-immutable-actions.yml | 2 +- .github/workflows/test-graalpy.yml | 6 ++-- .github/workflows/test-pypy.yml | 10 +++---- .../workflows/test-python-freethreaded.yml | 30 +++++++++---------- .github/workflows/test-python.yml | 28 ++++++++--------- 8 files changed, 53 insertions(+), 53 deletions(-) diff --git a/.github/workflows/e2e-cache-freethreaded.yml b/.github/workflows/e2e-cache-freethreaded.yml index 096892cb..97cc44bc 100644 --- a/.github/workflows/e2e-cache-freethreaded.yml +++ b/.github/workflows/e2e-cache-freethreaded.yml @@ -33,7 +33,7 @@ jobs: ] python-version: [3.13.0t, 3.13.1t, 3.13.2t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -60,7 +60,7 @@ jobs: ] python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python id: cache-pipenv uses: ./ @@ -90,7 +90,7 @@ jobs: ] python-version: [3.13.0, 3.13.1, 3.13.2] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install poetry run: pipx install poetry - name: Init pyproject.toml @@ -122,7 +122,7 @@ jobs: ] python-version: [3.13.0t, 3.13.1t, 3.13.2t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -150,7 +150,7 @@ jobs: ] python-version: [3.13.1t, 3.13.2t, 3.13.5t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python id: cache-pipenv uses: ./ @@ -181,7 +181,7 @@ jobs: ] python-version: [3.13.0t, 3.13.1t, 3.13.2t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -209,7 +209,7 @@ jobs: ] python-version: [3.13.0t, 3.13.1t, 3.13.2t] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index 76a8f8c5..1e5dec8c 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -46,7 +46,7 @@ jobs: - os: windows-latest python-version: pypy-3.11-v7.x steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -85,7 +85,7 @@ jobs: - os: ubuntu-22.04-arm python-version: pypy-3.10-v7.x steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python id: cache-pipenv uses: ./ @@ -140,7 +140,7 @@ jobs: '3.13' ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install poetry run: pipx install poetry - name: Init pyproject.toml @@ -184,7 +184,7 @@ jobs: - os: windows-latest python-version: pypy-3.11-v7.x steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -222,7 +222,7 @@ jobs: - os: ubuntu-22.04-arm python-version: pypy-3.11-v7.x steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python id: cache-pipenv uses: ./ @@ -268,7 +268,7 @@ jobs: ] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: @@ -296,7 +296,7 @@ jobs: ] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python uses: ./ with: diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 57c7851e..84586171 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -29,7 +29,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Run with setup-python 3.9.13 uses: ./ diff --git a/.github/workflows/publish-immutable-actions.yml b/.github/workflows/publish-immutable-actions.yml index 7c258347..52c7bc00 100644 --- a/.github/workflows/publish-immutable-actions.yml +++ b/.github/workflows/publish-immutable-actions.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checking out - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Publish id: publish uses: actions/publish-immutable-action@v0.0.4 diff --git a/.github/workflows/test-graalpy.yml b/.github/workflows/test-graalpy.yml index 90841c3b..eabe0b38 100644 --- a/.github/workflows/test-graalpy.yml +++ b/.github/workflows/test-graalpy.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.graalpy }} id: setup-python @@ -86,7 +86,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.graalpy }} id: setup-python @@ -108,7 +108,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, macos-13] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup GraalPy and check latest uses: ./ id: graalpy diff --git a/.github/workflows/test-pypy.yml b/.github/workflows/test-pypy.yml index 6433b7c5..e11ef272 100644 --- a/.github/workflows/test-pypy.yml +++ b/.github/workflows/test-pypy.yml @@ -46,7 +46,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.pypy }} id: setup-python @@ -98,7 +98,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.pypy }} id: setup-python @@ -150,7 +150,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.pypy }} id: setup-python @@ -181,7 +181,7 @@ jobs: macos-13 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup PyPy and check latest uses: ./ with: @@ -223,7 +223,7 @@ jobs: macos-13 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup PyPy and check latest uses: ./ with: diff --git a/.github/workflows/test-python-freethreaded.yml b/.github/workflows/test-python-freethreaded.yml index 94f783e2..d7496dad 100644 --- a/.github/workflows/test-python-freethreaded.yml +++ b/.github/workflows/test-python-freethreaded.yml @@ -33,7 +33,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.python }} id: setup-python @@ -70,7 +70,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: echo ${{ matrix.python }} > .python-version @@ -110,7 +110,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: echo ${{ matrix.python }} > .python-version @@ -148,7 +148,7 @@ jobs: python: [3.13.0, 3.13.1, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -189,7 +189,7 @@ jobs: python: [3.13.0, 3.13.1, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -230,7 +230,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t, 3.14t-dev] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-tool-versions-file ${{ matrix.python }} run: | @@ -261,7 +261,7 @@ jobs: python: [3.13t, 3.14t-dev] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -301,7 +301,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t, 3.14t-dev] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -340,7 +340,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14.0-alpha.6 id: setup-python @@ -377,7 +377,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14t-dev id: setup-python @@ -414,7 +414,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14t id: setup-python @@ -453,7 +453,7 @@ jobs: python: [3.13.0t, 3.13.1t, 3.13.2t] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.python }} id: setup-python @@ -485,7 +485,7 @@ jobs: ] python-version: [3.13t, 3.14t-dev] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python and check latest id: setup-python uses: ./ @@ -511,7 +511,7 @@ jobs: macos-13 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python and check latest id: setup-python uses: ./ @@ -542,7 +542,7 @@ jobs: python: [3.13.1, 3.13.2, 3.14-dev, 3.14.0-alpha.6] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.python }} id: setup-python uses: ./ diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 02a9a99f..602114ed 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -33,7 +33,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.python }} id: setup-python @@ -77,7 +77,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: echo ${{ matrix.python }} > .python-version @@ -124,7 +124,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: echo ${{ matrix.python }} > .python-version @@ -169,7 +169,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, '==3.12.3', 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -219,7 +219,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.12.3, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -272,7 +272,7 @@ jobs: python: graalpy-24.1.2 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-tool-versions-file ${{ matrix.python }} run: | @@ -303,7 +303,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -353,7 +353,7 @@ jobs: python: [3.9.13, 3.10.11, 3.11.9, 3.13.2] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: build-version-file ${{ matrix.python }} run: | @@ -402,7 +402,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14.0-alpha.6 id: setup-python @@ -445,7 +445,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14-dev id: setup-python @@ -482,7 +482,7 @@ jobs: ] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python 3.14 id: setup-python @@ -521,7 +521,7 @@ jobs: python: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: setup-python ${{ matrix.python }} id: setup-python @@ -553,7 +553,7 @@ jobs: ] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python and check latest uses: ./ with: @@ -585,7 +585,7 @@ jobs: macos-13 ] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Setup Python and check latest uses: ./ with: From 65b071217a8539818fdb8b54561bcbae40380a54 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Tue, 26 Aug 2025 08:21:55 +0530 Subject: [PATCH 11/19] Clarify pythonLocation behavior for PyPy and GraalPy in environment variables (#1183) * documentation update * spaces update --- docs/advanced-usage.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 188fa9d6..9642392e 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -477,16 +477,16 @@ jobs: - run: echo '${{ steps.cp313.outputs.cache-hit }}' # true if cache-hit occurred on the primary key ``` -## Environment variables +### Environment variables These environment variables become available after setup-python action execution: -| **Env.variable** | **Description** | -| ----------- | ----------- | -| pythonLocation |Contains the absolute path to the folder where the requested version of Python or PyPy is installed| -| Python_ROOT_DIR | https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython | -| Python2_ROOT_DIR |https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2| -| Python3_ROOT_DIR |https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3| +| **Env.variable** | **Description**| +|----------------------|-------------| +| `pythonLocation` | Contains the absolute path to the folder where the requested version of Python, PyPy, or GraalPy is installed.

**Executable location by implementation:**
• **CPython** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows)
• **PyPy** – `$pythonLocation/bin/python` (Linux/macOS), `$pythonLocation/python.exe` (Windows)
• **GraalPy** – `$pythonLocation/bin/python` (Linux/macOS)

Note: CPython versions include a symlink or copy of the Python executable at the root, while PyPy and GraalPy retain upstream directory layouts. | +| `Python_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython | +| `Python2_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 | +| `Python3_ROOT_DIR` | https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 | ## Using `update-environment` flag From 3d1e2d2ca0a067f27da6fec484fce7f5256def85 Mon Sep 17 00:00:00 2001 From: aparnajyothi-y <147696841+aparnajyothi-y@users.noreply.github.com> Date: Fri, 29 Aug 2025 00:00:09 +0530 Subject: [PATCH 12/19] Revert "Enhance cache-dependency-path handling to support files outside the workspace root" (#1186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Revert "Enhance cache-dependency-path handling to support files outside the w…" This reverts commit 12648859835f68b273febdd9aab9972bbb624d8c. * pckage.json version update --------- Co-authored-by: Haritha <73516759+HarithaVattikuti@users.noreply.github.com> --- __tests__/setup-python.test.ts | 149 --------------------------------- dist/setup/index.js | 43 +--------- docs/advanced-usage.md | 2 +- src/setup-python.ts | 53 +----------- 4 files changed, 4 insertions(+), 243 deletions(-) delete mode 100644 __tests__/setup-python.test.ts diff --git a/__tests__/setup-python.test.ts b/__tests__/setup-python.test.ts deleted file mode 100644 index bb27289d..00000000 --- a/__tests__/setup-python.test.ts +++ /dev/null @@ -1,149 +0,0 @@ -import * as core from '@actions/core'; -import * as fs from 'fs'; -import * as path from 'path'; -import {cacheDependencies} from '../src/setup-python'; -import {getCacheDistributor} from '../src/cache-distributions/cache-factory'; - -jest.mock('fs', () => { - const actualFs = jest.requireActual('fs'); - return { - ...actualFs, - promises: { - access: jest.fn(), - mkdir: jest.fn(), - copyFile: jest.fn(), - writeFile: jest.fn(), - appendFile: jest.fn() - } - }; -}); -jest.mock('@actions/core'); -jest.mock('../src/cache-distributions/cache-factory'); - -const mockedFsPromises = fs.promises as jest.Mocked; -const mockedCore = core as jest.Mocked; -const mockedGetCacheDistributor = getCacheDistributor as jest.Mock; - -describe('cacheDependencies', () => { - const mockRestoreCache = jest.fn(); - - beforeEach(() => { - jest.clearAllMocks(); - process.env.GITHUB_ACTION_PATH = '/github/action'; - process.env.GITHUB_WORKSPACE = '/github/workspace'; - - mockedCore.getInput.mockReturnValue('nested/deps.lock'); - - // Simulate file exists by resolving access without error - mockedFsPromises.access.mockImplementation(async p => { - const pathStr = typeof p === 'string' ? p : p.toString(); - if (pathStr === '/github/action/nested/deps.lock') { - return Promise.resolve(); - } - // Simulate directory doesn't exist to test mkdir - if (pathStr === path.dirname('/github/workspace/nested/deps.lock')) { - return Promise.reject(new Error('no dir')); - } - return Promise.resolve(); - }); - - // Simulate mkdir success - mockedFsPromises.mkdir.mockResolvedValue(undefined); - - // Simulate copyFile success - mockedFsPromises.copyFile.mockResolvedValue(undefined); - - mockedGetCacheDistributor.mockReturnValue({restoreCache: mockRestoreCache}); - }); - - it('copies the dependency file and resolves the path with directory structure', async () => { - await cacheDependencies('pip', '3.12'); - - const sourcePath = path.resolve('/github/action', 'nested/deps.lock'); - const targetPath = path.resolve('/github/workspace', 'nested/deps.lock'); - - expect(mockedFsPromises.access).toHaveBeenCalledWith( - sourcePath, - fs.constants.F_OK - ); - expect(mockedFsPromises.mkdir).toHaveBeenCalledWith( - path.dirname(targetPath), - { - recursive: true - } - ); - expect(mockedFsPromises.copyFile).toHaveBeenCalledWith( - sourcePath, - targetPath - ); - expect(mockedCore.info).toHaveBeenCalledWith( - `Copied ${sourcePath} to ${targetPath}` - ); - expect(mockedCore.info).toHaveBeenCalledWith( - `Resolved cache-dependency-path: nested/deps.lock` - ); - expect(mockRestoreCache).toHaveBeenCalled(); - }); - - it('warns if the dependency file does not exist', async () => { - // Simulate file does not exist by rejecting access - mockedFsPromises.access.mockRejectedValue(new Error('file not found')); - - await cacheDependencies('pip', '3.12'); - - expect(mockedCore.warning).toHaveBeenCalledWith( - expect.stringContaining('does not exist') - ); - expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); - expect(mockRestoreCache).toHaveBeenCalled(); - }); - - it('warns if file copy fails', async () => { - // Simulate copyFile failure - mockedFsPromises.copyFile.mockRejectedValue(new Error('copy failed')); - - await cacheDependencies('pip', '3.12'); - - expect(mockedCore.warning).toHaveBeenCalledWith( - expect.stringContaining('Failed to copy file') - ); - expect(mockRestoreCache).toHaveBeenCalled(); - }); - - it('skips path logic if no input is provided', async () => { - mockedCore.getInput.mockReturnValue(''); - - await cacheDependencies('pip', '3.12'); - - expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); - expect(mockedCore.warning).not.toHaveBeenCalled(); - expect(mockRestoreCache).toHaveBeenCalled(); - }); - - it('does not copy if dependency file is already inside the workspace but still sets resolved path', async () => { - // Simulate cacheDependencyPath inside workspace - mockedCore.getInput.mockReturnValue('deps.lock'); - - // Override sourcePath and targetPath to be equal - const actionPath = '/github/workspace'; // same path for action and workspace - process.env.GITHUB_ACTION_PATH = actionPath; - process.env.GITHUB_WORKSPACE = actionPath; - - // access resolves to simulate file exists - mockedFsPromises.access.mockResolvedValue(); - - await cacheDependencies('pip', '3.12'); - - const sourcePath = path.resolve(actionPath, 'deps.lock'); - const targetPath = sourcePath; // same path - - expect(mockedFsPromises.copyFile).not.toHaveBeenCalled(); - expect(mockedCore.info).toHaveBeenCalledWith( - `Dependency file is already inside the workspace: ${sourcePath}` - ); - expect(mockedCore.info).toHaveBeenCalledWith( - `Resolved cache-dependency-path: deps.lock` - ); - expect(mockRestoreCache).toHaveBeenCalled(); - }); -}); diff --git a/dist/setup/index.js b/dist/setup/index.js index 2f06fb35..ba888f22 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -97935,7 +97935,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.cacheDependencies = void 0; const core = __importStar(__nccwpck_require__(7484)); const finder = __importStar(__nccwpck_require__(6843)); const finderPyPy = __importStar(__nccwpck_require__(2625)); @@ -97954,50 +97953,10 @@ function isGraalPyVersion(versionSpec) { function cacheDependencies(cache, pythonVersion) { return __awaiter(this, void 0, void 0, function* () { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; - let resolvedDependencyPath = undefined; - if (cacheDependencyPath) { - const actionPath = process.env.GITHUB_ACTION_PATH || ''; - const workspace = process.env.GITHUB_WORKSPACE || process.cwd(); - const sourcePath = path.resolve(actionPath, cacheDependencyPath); - const relativePath = path.relative(actionPath, sourcePath); - const targetPath = path.resolve(workspace, relativePath); - try { - const sourceExists = yield fs_1.default.promises - .access(sourcePath, fs_1.default.constants.F_OK) - .then(() => true) - .catch(() => false); - if (!sourceExists) { - core.warning(`The resolved cache-dependency-path does not exist: ${sourcePath}`); - } - else { - if (sourcePath !== targetPath) { - const targetDir = path.dirname(targetPath); - // Create target directory if it doesn't exist - yield fs_1.default.promises.mkdir(targetDir, { recursive: true }); - // Copy file asynchronously - yield fs_1.default.promises.copyFile(sourcePath, targetPath); - core.info(`Copied ${sourcePath} to ${targetPath}`); - } - else { - core.info(`Dependency file is already inside the workspace: ${sourcePath}`); - } - resolvedDependencyPath = path - .relative(workspace, targetPath) - .replace(/\\/g, '/'); - core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`); - } - } - catch (error) { - core.warning(`Failed to copy file from ${sourcePath} to ${targetPath}: ${error}`); - } - } - // Pass resolvedDependencyPath if available, else fallback to original input - const dependencyPathForCache = resolvedDependencyPath !== null && resolvedDependencyPath !== void 0 ? resolvedDependencyPath : cacheDependencyPath; - const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, dependencyPathForCache); + const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath); yield cacheDistributor.restoreCache(); }); } -exports.cacheDependencies = cacheDependencies; function resolveVersionInputFromDefaultFile() { const couples = [ ['.python-version', utils_1.getVersionsInputFromPlainFile] diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 9642392e..09c5f5ed 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -421,7 +421,7 @@ steps: - run: pip install -e . # Or pip install -e '.[test]' to install test dependencies ``` -Note: cache-dependency-path supports files located outside the workspace root by copying them into the workspace to enable proper caching. + # Outputs and environment variables ## Outputs diff --git a/src/setup-python.ts b/src/setup-python.ts index 106b415a..5d585d73 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -22,62 +22,13 @@ function isGraalPyVersion(versionSpec: string) { return versionSpec.startsWith('graalpy'); } -export async function cacheDependencies(cache: string, pythonVersion: string) { +async function cacheDependencies(cache: string, pythonVersion: string) { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; - let resolvedDependencyPath: string | undefined = undefined; - - if (cacheDependencyPath) { - const actionPath = process.env.GITHUB_ACTION_PATH || ''; - const workspace = process.env.GITHUB_WORKSPACE || process.cwd(); - - const sourcePath = path.resolve(actionPath, cacheDependencyPath); - const relativePath = path.relative(actionPath, sourcePath); - const targetPath = path.resolve(workspace, relativePath); - - try { - const sourceExists = await fs.promises - .access(sourcePath, fs.constants.F_OK) - .then(() => true) - .catch(() => false); - - if (!sourceExists) { - core.warning( - `The resolved cache-dependency-path does not exist: ${sourcePath}` - ); - } else { - if (sourcePath !== targetPath) { - const targetDir = path.dirname(targetPath); - // Create target directory if it doesn't exist - await fs.promises.mkdir(targetDir, {recursive: true}); - // Copy file asynchronously - await fs.promises.copyFile(sourcePath, targetPath); - core.info(`Copied ${sourcePath} to ${targetPath}`); - } else { - core.info( - `Dependency file is already inside the workspace: ${sourcePath}` - ); - } - - resolvedDependencyPath = path - .relative(workspace, targetPath) - .replace(/\\/g, '/'); - core.info(`Resolved cache-dependency-path: ${resolvedDependencyPath}`); - } - } catch (error) { - core.warning( - `Failed to copy file from ${sourcePath} to ${targetPath}: ${error}` - ); - } - } - - // Pass resolvedDependencyPath if available, else fallback to original input - const dependencyPathForCache = resolvedDependencyPath ?? cacheDependencyPath; - const cacheDistributor = getCacheDistributor( cache, pythonVersion, - dependencyPathForCache + cacheDependencyPath ); await cacheDistributor.restoreCache(); } From e797f83bcb11b83ae66e0230d6156d7c80228e7c Mon Sep 17 00:00:00 2001 From: Salman Chishti Date: Thu, 4 Sep 2025 03:57:37 +0100 Subject: [PATCH 13/19] 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", From 4267e283df95c05d9f16ece6624106f44613b489 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:06:08 -0500 Subject: [PATCH 14/19] Bump urllib3 from 1.26.19 to 2.5.0 in /__tests__/data and document breaking changes in v6 (#1139) * Bump urllib3 from 1.26.19 to 2.5.0 in /__tests__/data Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.19 to 2.5.0. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/1.26.19...2.5.0) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.5.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] * documentation update * doc update * doc update * doc format update * doc update * doc update * doc update * fix check failures --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Aparna Jyothi --- .github/workflows/e2e-cache.yml | 5 +++++ README.md | 7 +++++++ __tests__/data/requirements-linux.txt | 2 +- __tests__/data/requirements.txt | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index 1e5dec8c..c073e253 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -45,6 +45,9 @@ jobs: exclude: - os: windows-latest python-version: pypy-3.11-v7.x + - os: macos-latest + python-version: pypy-3.9-v7.x + steps: - uses: actions/checkout@v5 - name: Setup Python @@ -183,6 +186,8 @@ jobs: exclude: - os: windows-latest python-version: pypy-3.11-v7.x + - os: macos-latest + python-version: pypy-3.9-v7.x steps: - uses: actions/checkout@v5 - name: Setup Python diff --git a/README.md b/README.md index 173c0976..cb53f256 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,13 @@ This action provides the following functionality for GitHub Actions users: - Optionally caching dependencies for pip, pipenv and poetry - Registering problem matchers for error output +## Breaking changes in V6 + +- Upgraded action from node20 to node24 + > Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release. See [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1) + +For more details, see the full release notes on the [releases page](https://github.com/actions/setup-python/releases/tag/v6.0.0) + ## Basic usage See [action.yml](action.yml) diff --git a/__tests__/data/requirements-linux.txt b/__tests__/data/requirements-linux.txt index 0e93594b..3d64b582 100644 --- a/__tests__/data/requirements-linux.txt +++ b/__tests__/data/requirements-linux.txt @@ -8,5 +8,5 @@ packaging==20.7 pdf2image==1.12.1 Pygments==2.6.1 requests==2.32.2 -urllib3==1.26.19 +urllib3==2.5.0 xlrd==1.2.0 \ No newline at end of file diff --git a/__tests__/data/requirements.txt b/__tests__/data/requirements.txt index cfe5ff8c..4c3f0ba8 100644 --- a/__tests__/data/requirements.txt +++ b/__tests__/data/requirements.txt @@ -42,6 +42,6 @@ pywin32-ctypes==0.2.0 requests==2.32.2 -urllib3==1.26.19 +urllib3==2.5.0 xlrd==1.2.0 \ No newline at end of file From 2e3e4b15a884dc73a63f962bff250a855150a234 Mon Sep 17 00:00:00 2001 From: gowridurgad <159780674+gowridurgad@users.noreply.github.com> Date: Fri, 26 Sep 2025 08:31:19 +0530 Subject: [PATCH 15/19] Add support for pip-install input (#1201) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add pip-install input * Improve error message * Logic update --------- Co-authored-by: “gowridurgad” <“hgowridurgad@github.com> --- .github/workflows/e2e-cache-freethreaded.yml | 53 ++++++++++++++++++++ .github/workflows/e2e-cache.yml | 53 ++++++++++++++++++++ README.md | 1 + action.yml | 2 + dist/setup/index.js | 18 +++++++ docs/advanced-usage.md | 18 +++++++ src/setup-python.ts | 18 +++++++ 7 files changed, 163 insertions(+) diff --git a/.github/workflows/e2e-cache-freethreaded.yml b/.github/workflows/e2e-cache-freethreaded.yml index 97cc44bc..2c28be52 100644 --- a/.github/workflows/e2e-cache-freethreaded.yml +++ b/.github/workflows/e2e-cache-freethreaded.yml @@ -219,3 +219,56 @@ jobs: pip-version: '25.0.1' - name: Install dependencies run: pip install numpy pandas requests + + python-pip-dependencies-caching-with-pip-install: + name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + ubuntu-latest, + ubuntu-22.04, + ubuntu-24.04-arm, + ubuntu-22.04-arm, + windows-latest, + macos-latest, + macos-13 + ] + python-version: [3.13.0t, 3.13.1t, 3.13.2t] + steps: + - uses: actions/checkout@v5 + - name: Setup Python + uses: ./ + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + pip-install: numpy pandas requests + + python-pip-dependencies-caching-path-with-pip-install: + name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + ubuntu-latest, + ubuntu-22.04, + ubuntu-24.04-arm, + ubuntu-22.04-arm, + windows-latest, + macos-latest, + macos-13 + ] + python-version: [3.13.0t, 3.13.1t, 3.13.2t] + steps: + - uses: actions/checkout@v5 + - name: Setup Python + uses: ./ + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: __tests__/data/requirements.txt + pip-install: numpy pandas requests diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index c073e253..363139a0 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -311,3 +311,56 @@ jobs: pip-version: '25.0.1' - name: Install dependencies run: pip install numpy pandas requests + + python-pip-dependencies-caching-with-pip-install: + name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + ubuntu-latest, + ubuntu-24.04-arm, + ubuntu-22.04, + ubuntu-22.04-arm, + windows-latest, + macos-latest, + macos-13 + ] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + steps: + - uses: actions/checkout@v5 + - name: Setup Python + uses: ./ + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + pip-install: numpy pandas requests + + python-pip-dependencies-caching-path-with-pip-install: + name: Test pip (Python ${{ matrix.python-version}}, ${{ matrix.os }}, caching path) + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + [ + ubuntu-latest, + ubuntu-24.04-arm, + ubuntu-22.04, + ubuntu-22.04-arm, + windows-latest, + macos-latest, + macos-13 + ] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] + steps: + - uses: actions/checkout@v5 + - name: Setup Python + uses: ./ + with: + python-version: ${{ matrix.python-version }} + cache: 'pip' + cache-dependency-path: __tests__/data/requirements.txt + pip-install: numpy pandas requests diff --git a/README.md b/README.md index cb53f256..a6fb5bc5 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ See examples of using `cache` and `cache-dependency-path` for `pipenv` and `poet - [Using `setup-python` on GHES](docs/advanced-usage.md#using-setup-python-on-ghes) - [Allow pre-releases](docs/advanced-usage.md#allow-pre-releases) - [Using the pip-version input](docs/advanced-usage.md#using-the-pip-version-input) +- [Using the pip-install input](docs/advanced-usage.md#using-the-pip-install-input) ## Recommended permissions diff --git a/action.yml b/action.yml index df6c8235..7a9a7b63 100644 --- a/action.yml +++ b/action.yml @@ -31,6 +31,8 @@ inputs: default: false pip-version: description: "Used to specify the version of pip to install with the Python. Supported format: major[.minor][.patch]." + pip-install: + description: "Used to specify the packages to install with pip after setting up Python. Can be a requirements file or package names." outputs: python-version: description: "The installed Python or PyPy version. Useful when given a version range as input." diff --git a/dist/setup/index.js b/dist/setup/index.js index ba888f22..6cd80141 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -97944,12 +97944,26 @@ const os = __importStar(__nccwpck_require__(857)); const fs_1 = __importDefault(__nccwpck_require__(9896)); const cache_factory_1 = __nccwpck_require__(665); const utils_1 = __nccwpck_require__(1798); +const exec_1 = __nccwpck_require__(5236); function isPyPyVersion(versionSpec) { return versionSpec.startsWith('pypy'); } function isGraalPyVersion(versionSpec) { return versionSpec.startsWith('graalpy'); } +function installPipPackages(pipInstall) { + return __awaiter(this, void 0, void 0, function* () { + core.info(`Installing pip packages: ${pipInstall}`); + try { + const installArgs = pipInstall.trim().split(/\s+/); + yield (0, exec_1.exec)('python', ['-m', 'pip', 'install', ...installArgs]); + core.info('Successfully installed pip packages'); + } + catch (error) { + core.setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`); + } + }); +} function cacheDependencies(cache, pythonVersion) { return __awaiter(this, void 0, void 0, function* () { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; @@ -98038,6 +98052,10 @@ function run() { if (cache && (0, utils_1.isCacheFeatureAvailable)()) { yield cacheDependencies(cache, pythonVersion); } + const pipInstall = core.getInput('pip-install'); + if (pipInstall) { + yield installPipPackages(pipInstall); + } } else { core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 55b41d54..e20eb058 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -23,6 +23,7 @@ - [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes) - [Allow pre-releases](advanced-usage.md#allow-pre-releases) - [Using the pip-version input](advanced-usage.md#using-the-pip-version-input) +- [Using the pip-install input](advanced-usage.md#using-the-pip-install-input) ## Using the `python-version` input @@ -672,3 +673,20 @@ 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/). + +## Using the pip-install input + +The `pip-install` input allows you to install dependencies as part of the Python setup step. + + +```yaml + steps: + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: '3.13' + pip-install: -r requirements.txt +``` +> Note: This feature is intended for standard pip-based dependency installations. +For complex workflows, or alternative package managers (e.g., poetry, pipenv), we recommend using separate steps to maintain clarity and flexibility. diff --git a/src/setup-python.ts b/src/setup-python.ts index 5d585d73..91a0c176 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -13,6 +13,7 @@ import { getVersionInputFromFile, getVersionsInputFromPlainFile } from './utils'; +import {exec} from '@actions/exec'; function isPyPyVersion(versionSpec: string) { return versionSpec.startsWith('pypy'); @@ -22,6 +23,19 @@ function isGraalPyVersion(versionSpec: string) { return versionSpec.startsWith('graalpy'); } +async function installPipPackages(pipInstall: string) { + core.info(`Installing pip packages: ${pipInstall}`); + try { + const installArgs = pipInstall.trim().split(/\s+/); + await exec('python', ['-m', 'pip', 'install', ...installArgs]); + core.info('Successfully installed pip packages'); + } catch (error) { + core.setFailed( + `Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.` + ); + } +} + async function cacheDependencies(cache: string, pythonVersion: string) { const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; @@ -145,6 +159,10 @@ async function run() { if (cache && isCacheFeatureAvailable()) { await cacheDependencies(cache, pythonVersion); } + const pipInstall = core.getInput('pip-install'); + if (pipInstall) { + await installPipPackages(pipInstall); + } } else { core.warning( 'The `python-version` input is not set. The version of Python currently in `PATH` will be used.' From 18566f86b301499665bd3eb1a2247e0849c64fa5 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 14 Oct 2025 12:42:06 -0400 Subject: [PATCH 16/19] Improve wording and "fix example" (remove 3.13) on testing against pre-release (#979) * Improve wording and "fix example" (remove 3.13) on testing against pre-releases 3.13 was added in a mass tune up in 0b93645e9fea7318ecaed2b359559ac225c90a2b , without adjusting the wording. With 3.13 listed there too, example does not really make much sense. So I decided to make it explicit in wording and remove 3.13, so whenever next refactoring to add 3.14 to be added to every line where 3.13 is -- this would not even come to attention * Update to use 3.14 not 3.12 as an example for pre-release --- docs/advanced-usage.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index e20eb058..5cd86e61 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -632,8 +632,8 @@ If the runner is not able to access github.com, any Python versions requested du The `allow-prereleases` flag defaults to `false`. If `allow-prereleases` is set to `true`, the action will allow falling back to pre-release versions of Python when a matching GA version of Python is not available. This allows for example to simplify reuse of `python-version` as an input of nox for pre-releases of Python by not requiring manipulation of the `3.y-dev` specifier. -For CPython, `allow-prereleases` will only have effect for `x.y` version range (e.g. `3.12`). -Let's say that python 3.12 is not generally available, the following workflow will fallback to the most recent pre-release of python 3.12: +For CPython, `allow-prereleases` will only have effect for `x.y` version range (e.g. `3.14`). +Let's say that in the past, when python 3.14 was not yet generally available, the following workflow would have fallback to the most recent pre-release of python 3.14: ```yaml jobs: test: @@ -643,7 +643,7 @@ jobs: fail-fast: false matrix: os: [Ubuntu, Windows, macOS] - python_version: ["3.11", "3.12", "3.13"] + python_version: ["3.14"] steps: - uses: actions/checkout@v5 From bba65e51ff35d50c6dbaaacd8a4681db13aa7cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Oct 2025 11:11:26 -0500 Subject: [PATCH 17/19] Bump typescript from 5.4.2 to 5.9.3 and update docs/advanced-usage.md (#1094) * Bump typescript from 5.4.2 to 5.8.3 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.4.2 to 5.8.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release-publish.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.4.2...v5.8.3) --- updated-dependencies: - dependency-name: typescript dependency-version: 5.8.3 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Update header text from 'Linux' to 'Ubuntu' * update target to ES2022 --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: priya-kinthali --- dist/cache-save/index.js | 229 +++-- dist/setup/index.js | 1992 ++++++++++++++++++-------------------- docs/advanced-usage.md | 6 +- package-lock.json | 9 +- package.json | 2 +- tsconfig.json | 2 +- 6 files changed, 1080 insertions(+), 1160 deletions(-) diff --git a/dist/cache-save/index.js b/dist/cache-save/index.js index 0506d476..36c6311a 100644 --- a/dist/cache-save/index.js +++ b/dist/cache-save/index.js @@ -87714,22 +87714,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.State = void 0; const cache = __importStar(__nccwpck_require__(5116)); @@ -87742,41 +87743,39 @@ var State; State["CACHE_PATHS"] = "cache-paths"; })(State || (exports.State = State = {})); class CacheDistributor { + packageManager; + cacheDependencyPath; + CACHE_KEY_PREFIX = 'setup-python'; constructor(packageManager, cacheDependencyPath) { this.packageManager = packageManager; this.cacheDependencyPath = cacheDependencyPath; - this.CACHE_KEY_PREFIX = 'setup-python'; } - handleLoadedCache() { - return __awaiter(this, void 0, void 0, function* () { }); - } - restoreCache() { - return __awaiter(this, void 0, void 0, function* () { - const { primaryKey, restoreKey } = yield this.computeKeys(); - if (primaryKey.endsWith('-')) { - const file = this.packageManager === 'pip' - ? `${this.cacheDependencyPath - .split('\n') - .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` - : this.cacheDependencyPath.split('\n').join(','); - throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`); - } - const cachePath = yield this.getCacheGlobalDirectories(); - core.saveState(State.CACHE_PATHS, cachePath); - let matchedKey; - try { - matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey); - } - catch (err) { - const message = err.message; - core.info(`[warning]${message}`); - core.setOutput('cache-hit', false); - return; - } - core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); - yield this.handleLoadedCache(); - this.handleMatchResult(matchedKey, primaryKey); - }); + async handleLoadedCache() { } + async restoreCache() { + const { primaryKey, restoreKey } = await this.computeKeys(); + if (primaryKey.endsWith('-')) { + const file = this.packageManager === 'pip' + ? `${this.cacheDependencyPath + .split('\n') + .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` + : this.cacheDependencyPath.split('\n').join(','); + throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`); + } + const cachePath = await this.getCacheGlobalDirectories(); + core.saveState(State.CACHE_PATHS, cachePath); + let matchedKey; + try { + matchedKey = await cache.restoreCache(cachePath, primaryKey, restoreKey); + } + catch (err) { + const message = err.message; + core.info(`[warning]${message}`); + core.setOutput('cache-hit', false); + return; + } + core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); + await this.handleLoadedCache(); + this.handleMatchResult(matchedKey, primaryKey); } handleMatchResult(matchedKey, primaryKey) { if (matchedKey) { @@ -87827,27 +87826,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.run = void 0; +exports.run = run; const core = __importStar(__nccwpck_require__(7484)); const cache = __importStar(__nccwpck_require__(5116)); const fs_1 = __importDefault(__nccwpck_require__(9896)); @@ -87855,62 +87855,57 @@ const cache_distributor_1 = __nccwpck_require__(2326); // Added early exit to resolve issue with slow post action step: // - https://github.com/actions/setup-node/issues/878 // https://github.com/actions/cache/pull/1217 -function run(earlyExit) { - return __awaiter(this, void 0, void 0, function* () { - try { - const cache = core.getInput('cache'); - if (cache) { - yield saveCache(cache); - if (earlyExit) { - process.exit(0); - } +async function run(earlyExit) { + try { + const cache = core.getInput('cache'); + if (cache) { + await saveCache(cache); + if (earlyExit) { + process.exit(0); } } - catch (error) { - const err = error; - core.setFailed(err.message); - } - }); + } + catch (error) { + const err = error; + core.setFailed(err.message); + } } -exports.run = run; -function saveCache(packageManager) { - return __awaiter(this, void 0, void 0, function* () { - const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS); - if (!cachePathState) { - core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified'); - return; - } - const cachePaths = JSON.parse(cachePathState); - core.debug(`paths for caching are ${cachePaths.join(', ')}`); - if (!isCacheDirectoryExists(cachePaths)) { - core.warning(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); - return; - } - const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY); - const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); - if (!primaryKey) { - core.warning('Error retrieving key from state.'); - return; - } - else if (matchedKey === primaryKey) { - // no change in target directories - core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); - return; - } - let cacheId = 0; - try { - cacheId = yield cache.saveCache(cachePaths, primaryKey); - } - catch (err) { - const message = err.message; - core.info(`[warning]${message}`); - return; - } - if (cacheId == -1) { - return; - } - core.info(`Cache saved with the key: ${primaryKey}`); - }); +async function saveCache(packageManager) { + const cachePathState = core.getState(cache_distributor_1.State.CACHE_PATHS); + if (!cachePathState) { + core.warning('Cache paths are empty. Please check the previous logs and make sure that the python version is specified'); + return; + } + const cachePaths = JSON.parse(cachePathState); + core.debug(`paths for caching are ${cachePaths.join(', ')}`); + if (!isCacheDirectoryExists(cachePaths)) { + core.warning(`Cache folder path is retrieved for ${packageManager} but doesn't exist on disk: ${cachePaths.join(', ')}. This likely indicates that there are no dependencies to cache. Consider removing the cache step if it is not needed.`); + return; + } + const primaryKey = core.getState(cache_distributor_1.State.STATE_CACHE_PRIMARY_KEY); + const matchedKey = core.getState(cache_distributor_1.State.CACHE_MATCHED_KEY); + if (!primaryKey) { + core.warning('Error retrieving key from state.'); + return; + } + else if (matchedKey === primaryKey) { + // no change in target directories + core.info(`Cache hit occurred on the primary key ${primaryKey}, not saving cache.`); + return; + } + let cacheId = 0; + try { + cacheId = await cache.saveCache(cachePaths, primaryKey); + } + catch (err) { + const message = err.message; + core.info(`[warning]${message}`); + return; + } + if (cacheId == -1) { + return; + } + core.info(`Cache saved with the key: ${primaryKey}`); } function isCacheDirectoryExists(cacheDirectory) { const result = cacheDirectory.reduce((previousValue, currentValue) => { diff --git a/dist/setup/index.js b/dist/setup/index.js index 6cd80141..76f13b8a 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96244,22 +96244,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); exports.State = void 0; const cache = __importStar(__nccwpck_require__(5116)); @@ -96272,41 +96273,39 @@ var State; State["CACHE_PATHS"] = "cache-paths"; })(State || (exports.State = State = {})); class CacheDistributor { + packageManager; + cacheDependencyPath; + CACHE_KEY_PREFIX = 'setup-python'; constructor(packageManager, cacheDependencyPath) { this.packageManager = packageManager; this.cacheDependencyPath = cacheDependencyPath; - this.CACHE_KEY_PREFIX = 'setup-python'; } - handleLoadedCache() { - return __awaiter(this, void 0, void 0, function* () { }); - } - restoreCache() { - return __awaiter(this, void 0, void 0, function* () { - const { primaryKey, restoreKey } = yield this.computeKeys(); - if (primaryKey.endsWith('-')) { - const file = this.packageManager === 'pip' - ? `${this.cacheDependencyPath - .split('\n') - .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` - : this.cacheDependencyPath.split('\n').join(','); - throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`); - } - const cachePath = yield this.getCacheGlobalDirectories(); - core.saveState(State.CACHE_PATHS, cachePath); - let matchedKey; - try { - matchedKey = yield cache.restoreCache(cachePath, primaryKey, restoreKey); - } - catch (err) { - const message = err.message; - core.info(`[warning]${message}`); - core.setOutput('cache-hit', false); - return; - } - core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); - yield this.handleLoadedCache(); - this.handleMatchResult(matchedKey, primaryKey); - }); + async handleLoadedCache() { } + async restoreCache() { + const { primaryKey, restoreKey } = await this.computeKeys(); + if (primaryKey.endsWith('-')) { + const file = this.packageManager === 'pip' + ? `${this.cacheDependencyPath + .split('\n') + .join(',')} or ${constants_1.CACHE_DEPENDENCY_BACKUP_PATH}` + : this.cacheDependencyPath.split('\n').join(','); + throw new Error(`No file in ${process.cwd()} matched to [${file}], make sure you have checked out the target repository`); + } + const cachePath = await this.getCacheGlobalDirectories(); + core.saveState(State.CACHE_PATHS, cachePath); + let matchedKey; + try { + matchedKey = await cache.restoreCache(cachePath, primaryKey, restoreKey); + } + catch (err) { + const message = err.message; + core.info(`[warning]${message}`); + core.setOutput('cache-hit', false); + return; + } + core.saveState(State.STATE_CACHE_PRIMARY_KEY, primaryKey); + await this.handleLoadedCache(); + this.handleMatchResult(matchedKey, primaryKey); } handleMatchResult(matchedKey, primaryKey) { if (matchedKey) { @@ -96333,7 +96332,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCacheDistributor = exports.PackageManagers = void 0; +exports.PackageManagers = void 0; +exports.getCacheDistributor = getCacheDistributor; const pip_cache_1 = __importDefault(__nccwpck_require__(154)); const pipenv_cache_1 = __importDefault(__nccwpck_require__(3821)); const poetry_cache_1 = __importDefault(__nccwpck_require__(8296)); @@ -96355,7 +96355,6 @@ function getCacheDistributor(packageManager, pythonVersion, cacheDependencyPath) throw new Error(`Caching for '${packageManager}' is not supported`); } } -exports.getCacheDistributor = getCacheDistributor; /***/ }), @@ -96393,22 +96392,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -96424,63 +96424,60 @@ const cache_distributor_1 = __importDefault(__nccwpck_require__(2326)); const utils_1 = __nccwpck_require__(1798); const constants_1 = __nccwpck_require__(565); class PipCache extends cache_distributor_1.default { + pythonVersion; + cacheDependencyBackupPath = constants_1.CACHE_DEPENDENCY_BACKUP_PATH; constructor(pythonVersion, cacheDependencyPath = '**/requirements.txt') { super('pip', cacheDependencyPath); this.pythonVersion = pythonVersion; - this.cacheDependencyBackupPath = constants_1.CACHE_DEPENDENCY_BACKUP_PATH; } - getCacheGlobalDirectories() { - return __awaiter(this, void 0, void 0, function* () { - let exitCode = 1; - let stdout = ''; - let stderr = ''; - // Add temporary fix for Windows - // On windows it is necessary to execute through an exec - // because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2, - // or spawn must be started with the shell option enabled for getExecOutput - // Related issue: https://github.com/actions/setup-python/issues/328 - if (utils_1.IS_WINDOWS) { - const execPromisify = util_1.default.promisify(child_process.exec); - ({ stdout: stdout, stderr: stderr } = yield execPromisify('pip cache dir')); - } - else { - ({ - stdout: stdout, - stderr: stderr, - exitCode: exitCode - } = yield exec.getExecOutput('pip cache dir')); - } - if (exitCode && stderr) { - throw new Error(`Could not get cache folder path for pip package manager`); - } - let resolvedPath = stdout.trim(); - if (resolvedPath.includes('~')) { - resolvedPath = path.join(os_1.default.homedir(), resolvedPath.slice(1)); - } - core.debug(`global cache directory path is ${resolvedPath}`); - return [resolvedPath]; - }); + async getCacheGlobalDirectories() { + let exitCode = 1; + let stdout = ''; + let stderr = ''; + // Add temporary fix for Windows + // On windows it is necessary to execute through an exec + // because the getExecOutput gives a non zero code or writes to stderr for pip 22.0.2, + // or spawn must be started with the shell option enabled for getExecOutput + // Related issue: https://github.com/actions/setup-python/issues/328 + if (utils_1.IS_WINDOWS) { + const execPromisify = util_1.default.promisify(child_process.exec); + ({ stdout: stdout, stderr: stderr } = await execPromisify('pip cache dir')); + } + else { + ({ + stdout: stdout, + stderr: stderr, + exitCode: exitCode + } = await exec.getExecOutput('pip cache dir')); + } + if (exitCode && stderr) { + throw new Error(`Could not get cache folder path for pip package manager`); + } + let resolvedPath = stdout.trim(); + if (resolvedPath.includes('~')) { + resolvedPath = path.join(os_1.default.homedir(), resolvedPath.slice(1)); + } + core.debug(`global cache directory path is ${resolvedPath}`); + return [resolvedPath]; } - computeKeys() { - return __awaiter(this, void 0, void 0, function* () { - const hash = (yield glob.hashFiles(this.cacheDependencyPath)) || - (yield glob.hashFiles(this.cacheDependencyBackupPath)); - let primaryKey = ''; - let restoreKey = ''; - if (utils_1.IS_LINUX) { - const osInfo = yield (0, utils_1.getLinuxInfo)(); - primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${osInfo.osVersion}-${osInfo.osName}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; - restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${osInfo.osVersion}-${osInfo.osName}-python-${this.pythonVersion}-${this.packageManager}`; - } - else { - primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; - restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}`; - } - return { - primaryKey, - restoreKey: [restoreKey] - }; - }); + async computeKeys() { + const hash = (await glob.hashFiles(this.cacheDependencyPath)) || + (await glob.hashFiles(this.cacheDependencyBackupPath)); + let primaryKey = ''; + let restoreKey = ''; + if (utils_1.IS_LINUX) { + const osInfo = await (0, utils_1.getLinuxInfo)(); + primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${osInfo.osVersion}-${osInfo.osName}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; + restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-${osInfo.osVersion}-${osInfo.osName}-python-${this.pythonVersion}-${this.packageManager}`; + } + else { + primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; + restoreKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}`; + } + return { + primaryKey, + restoreKey: [restoreKey] + }; } } exports["default"] = PipCache; @@ -96509,22 +96506,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -96535,38 +96533,36 @@ const path = __importStar(__nccwpck_require__(6928)); const core = __importStar(__nccwpck_require__(7484)); const cache_distributor_1 = __importDefault(__nccwpck_require__(2326)); class PipenvCache extends cache_distributor_1.default { + pythonVersion; + patterns; constructor(pythonVersion, patterns = '**/Pipfile.lock') { super('pipenv', patterns); this.pythonVersion = pythonVersion; this.patterns = patterns; } - getCacheGlobalDirectories() { - return __awaiter(this, void 0, void 0, function* () { - let virtualEnvRelativePath; - // Default virtualenv directories are hardcoded, - // because pipenv is not preinstalled on hosted images and virtualenv is not created: - // https://github.com/pypa/pipenv/blob/1daaa0de9a0b00d386c6baeb809d8d4ee6795cfd/pipenv/utils.py#L1990-L2002 - if (process.platform === 'win32') { - virtualEnvRelativePath = '.virtualenvs'; - } - else { - virtualEnvRelativePath = '.local/share/virtualenvs'; - } - const resolvedPath = path.join(os.homedir(), virtualEnvRelativePath); - core.debug(`global cache directory path is ${resolvedPath}`); - return [resolvedPath]; - }); + async getCacheGlobalDirectories() { + let virtualEnvRelativePath; + // Default virtualenv directories are hardcoded, + // because pipenv is not preinstalled on hosted images and virtualenv is not created: + // https://github.com/pypa/pipenv/blob/1daaa0de9a0b00d386c6baeb809d8d4ee6795cfd/pipenv/utils.py#L1990-L2002 + if (process.platform === 'win32') { + virtualEnvRelativePath = '.virtualenvs'; + } + else { + virtualEnvRelativePath = '.local/share/virtualenvs'; + } + const resolvedPath = path.join(os.homedir(), virtualEnvRelativePath); + core.debug(`global cache directory path is ${resolvedPath}`); + return [resolvedPath]; } - computeKeys() { - return __awaiter(this, void 0, void 0, function* () { - const hash = yield glob.hashFiles(this.patterns); - const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; - const restoreKey = undefined; - return { - primaryKey, - restoreKey - }; - }); + async computeKeys() { + const hash = await glob.hashFiles(this.patterns); + const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-${hash}`; + const restoreKey = undefined; + return { + primaryKey, + restoreKey + }; } } exports["default"] = PipenvCache; @@ -96595,29 +96591,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; -var __asyncValues = (this && this.__asyncValues) || function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], i; - return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); - function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } - function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -96630,96 +96620,75 @@ const core = __importStar(__nccwpck_require__(7484)); const cache_distributor_1 = __importDefault(__nccwpck_require__(2326)); const utils_1 = __nccwpck_require__(1798); class PoetryCache extends cache_distributor_1.default { + pythonVersion; + patterns; + poetryProjects; constructor(pythonVersion, patterns = '**/poetry.lock', poetryProjects = new Set()) { super('poetry', patterns); this.pythonVersion = pythonVersion; this.patterns = patterns; this.poetryProjects = poetryProjects; } - getCacheGlobalDirectories() { - return __awaiter(this, void 0, void 0, function* () { - var _a, e_1, _b, _c; - // Same virtualenvs path may appear for different projects, hence we use a Set - const paths = new Set(); - const globber = yield glob.create(this.patterns); - try { - for (var _d = true, _e = __asyncValues(globber.globGenerator()), _f; _f = yield _e.next(), _a = _f.done, !_a; _d = true) { - _c = _f.value; - _d = false; - const file = _c; - const basedir = path.dirname(file); - core.debug(`Processing Poetry project at ${basedir}`); - this.poetryProjects.add(basedir); - const poetryConfig = yield this.getPoetryConfiguration(basedir); - const cacheDir = poetryConfig['cache-dir']; - const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir); - paths.add(virtualenvsPath); - if (poetryConfig['virtualenvs.in-project']) { - paths.add(path.join(basedir, '.venv')); - } - } + async getCacheGlobalDirectories() { + // Same virtualenvs path may appear for different projects, hence we use a Set + const paths = new Set(); + const globber = await glob.create(this.patterns); + for await (const file of globber.globGenerator()) { + const basedir = path.dirname(file); + core.debug(`Processing Poetry project at ${basedir}`); + this.poetryProjects.add(basedir); + const poetryConfig = await this.getPoetryConfiguration(basedir); + const cacheDir = poetryConfig['cache-dir']; + const virtualenvsPath = poetryConfig['virtualenvs.path'].replace('{cache-dir}', cacheDir); + paths.add(virtualenvsPath); + if (poetryConfig['virtualenvs.in-project']) { + paths.add(path.join(basedir, '.venv')); } - catch (e_1_1) { e_1 = { error: e_1_1 }; } - finally { - try { - if (!_d && !_a && (_b = _e.return)) yield _b.call(_e); - } - finally { if (e_1) throw e_1.error; } - } - return [...paths]; - }); + } + return [...paths]; } - computeKeys() { - return __awaiter(this, void 0, void 0, function* () { - const hash = yield glob.hashFiles(this.patterns); - // "v2" is here to invalidate old caches of this cache distributor, which were created broken: - const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`; - const restoreKey = undefined; - return { - primaryKey, - restoreKey - }; - }); + async computeKeys() { + const hash = await glob.hashFiles(this.patterns); + // "v2" is here to invalidate old caches of this cache distributor, which were created broken: + const primaryKey = `${this.CACHE_KEY_PREFIX}-${process.env['RUNNER_OS']}-${process.arch}-python-${this.pythonVersion}-${this.packageManager}-v2-${hash}`; + const restoreKey = undefined; + return { + primaryKey, + restoreKey + }; } - handleLoadedCache() { - const _super = Object.create(null, { - handleLoadedCache: { get: () => super.handleLoadedCache } - }); - return __awaiter(this, void 0, void 0, function* () { - yield _super.handleLoadedCache.call(this); - // After the cache is loaded -- make sure virtualenvs use the correct Python version (the one that we have just installed). - // This will handle invalid caches, recreating virtualenvs if necessary. - const pythonLocation = yield io.which('python'); - if (pythonLocation) { - core.debug(`pythonLocation is ${pythonLocation}`); + async handleLoadedCache() { + await super.handleLoadedCache(); + // After the cache is loaded -- make sure virtualenvs use the correct Python version (the one that we have just installed). + // This will handle invalid caches, recreating virtualenvs if necessary. + const pythonLocation = await io.which('python'); + if (pythonLocation) { + core.debug(`pythonLocation is ${pythonLocation}`); + } + else { + (0, utils_1.logWarning)('python binaries were not found in PATH'); + return; + } + for (const poetryProject of this.poetryProjects) { + const { exitCode, stderr } = await exec.getExecOutput('poetry', ['env', 'use', pythonLocation], { ignoreReturnCode: true, cwd: poetryProject }); + if (exitCode) { + (0, utils_1.logWarning)(stderr); } - else { - (0, utils_1.logWarning)('python binaries were not found in PATH'); - return; - } - for (const poetryProject of this.poetryProjects) { - const { exitCode, stderr } = yield exec.getExecOutput('poetry', ['env', 'use', pythonLocation], { ignoreReturnCode: true, cwd: poetryProject }); - if (exitCode) { - (0, utils_1.logWarning)(stderr); - } - } - }); + } } - getPoetryConfiguration(basedir) { - return __awaiter(this, void 0, void 0, function* () { - const { stdout, stderr, exitCode } = yield exec.getExecOutput('poetry', ['config', '--list'], { cwd: basedir }); - if (exitCode && stderr) { - throw new Error('Could not get cache folder path for poetry package manager'); - } - const lines = stdout.trim().split('\n'); - const config = {}; - for (let line of lines) { - line = line.replace(/#.*$/gm, ''); - const [key, value] = line.split('=').map(part => part.trim()); - config[key] = JSON.parse(value); - } - return config; - }); + async getPoetryConfiguration(basedir) { + const { stdout, stderr, exitCode } = await exec.getExecOutput('poetry', ['config', '--list'], { cwd: basedir }); + if (exitCode && stderr) { + throw new Error('Could not get cache folder path for poetry package manager'); + } + const lines = stdout.trim().split('\n'); + const config = {}; + for (let line of lines) { + line = line.replace(/#.*$/gm, ''); + const [key, value] = line.split('=').map(part => part.trim()); + config[key] = JSON.parse(value); + } + return config; } } exports["default"] = PoetryCache; @@ -96748,76 +96717,76 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.parseGraalPyVersion = exports.findGraalPyToolCache = exports.findGraalPyVersion = void 0; +exports.findGraalPyVersion = findGraalPyVersion; +exports.findGraalPyToolCache = findGraalPyToolCache; +exports.parseGraalPyVersion = parseGraalPyVersion; const path = __importStar(__nccwpck_require__(6928)); const graalpyInstall = __importStar(__nccwpck_require__(3027)); const utils_1 = __nccwpck_require__(1798); const semver = __importStar(__nccwpck_require__(2088)); const core = __importStar(__nccwpck_require__(7484)); const tc = __importStar(__nccwpck_require__(3472)); -function findGraalPyVersion(versionSpec, architecture, updateEnvironment, checkLatest, allowPreReleases) { - return __awaiter(this, void 0, void 0, function* () { - let resolvedGraalPyVersion = ''; - let installDir; - let releases; - let graalpyVersionSpec = parseGraalPyVersion(versionSpec); - if (checkLatest) { - releases = yield graalpyInstall.getAvailableGraalPyVersions(); - if (releases && releases.length > 0) { - const releaseData = graalpyInstall.findRelease(releases, graalpyVersionSpec, architecture, false); - if (releaseData) { - core.info(`Resolved as GraalPy ${releaseData.resolvedGraalPyVersion}`); - graalpyVersionSpec = releaseData.resolvedGraalPyVersion; - } - else { - core.info(`Failed to resolve GraalPy ${graalpyVersionSpec} from manifest`); - } +async function findGraalPyVersion(versionSpec, architecture, updateEnvironment, checkLatest, allowPreReleases) { + let resolvedGraalPyVersion = ''; + let installDir; + let releases; + let graalpyVersionSpec = parseGraalPyVersion(versionSpec); + if (checkLatest) { + releases = await graalpyInstall.getAvailableGraalPyVersions(); + if (releases && releases.length > 0) { + const releaseData = graalpyInstall.findRelease(releases, graalpyVersionSpec, architecture, false); + if (releaseData) { + core.info(`Resolved as GraalPy ${releaseData.resolvedGraalPyVersion}`); + graalpyVersionSpec = releaseData.resolvedGraalPyVersion; + } + else { + core.info(`Failed to resolve GraalPy ${graalpyVersionSpec} from manifest`); } } - ({ installDir, resolvedGraalPyVersion } = findGraalPyToolCache(graalpyVersionSpec, architecture)); - if (!installDir) { - ({ installDir, resolvedGraalPyVersion } = yield graalpyInstall.installGraalPy(graalpyVersionSpec, architecture, allowPreReleases, releases)); - } - const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin'; - const _binDir = path.join(installDir, pipDir); - const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); - const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir); - if (updateEnvironment) { - core.exportVariable('pythonLocation', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython - core.exportVariable('Python_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 - core.exportVariable('Python2_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 - core.exportVariable('Python3_ROOT_DIR', installDir); - core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); - core.addPath(pythonLocation); - core.addPath(_binDir); - } - core.setOutput('python-version', 'graalpy' + resolvedGraalPyVersion); - core.setOutput('python-path', pythonPath); - return resolvedGraalPyVersion; - }); + } + ({ installDir, resolvedGraalPyVersion } = findGraalPyToolCache(graalpyVersionSpec, architecture)); + if (!installDir) { + ({ installDir, resolvedGraalPyVersion } = await graalpyInstall.installGraalPy(graalpyVersionSpec, architecture, allowPreReleases, releases)); + } + const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin'; + const _binDir = path.join(installDir, pipDir); + const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; + const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); + const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir); + if (updateEnvironment) { + core.exportVariable('pythonLocation', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython + core.exportVariable('Python_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 + core.exportVariable('Python2_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 + core.exportVariable('Python3_ROOT_DIR', installDir); + core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); + core.addPath(pythonLocation); + core.addPath(_binDir); + } + core.setOutput('python-version', 'graalpy' + resolvedGraalPyVersion); + core.setOutput('python-path', pythonPath); + return resolvedGraalPyVersion; } -exports.findGraalPyVersion = findGraalPyVersion; function findGraalPyToolCache(graalpyVersion, architecture) { let resolvedGraalPyVersion = ''; let installDir = tc.find('GraalPy', graalpyVersion, architecture); @@ -96836,7 +96805,6 @@ function findGraalPyToolCache(graalpyVersion, architecture) { } return { installDir, resolvedGraalPyVersion }; } -exports.findGraalPyToolCache = findGraalPyToolCache; function parseGraalPyVersion(versionSpec) { const versions = versionSpec.split('-').filter(item => !!item); if (/^(graalpy)(.+)/.test(versions[0])) { @@ -96852,7 +96820,6 @@ function parseGraalPyVersion(versionSpec) { } return pythonVersion; } -exports.parseGraalPyVersion = parseGraalPyVersion; /***/ }), @@ -96878,79 +96845,80 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findPyPyInstallDirForWindows = exports.parsePyPyVersion = exports.findPyPyToolCache = exports.findPyPyVersion = void 0; +exports.findPyPyVersion = findPyPyVersion; +exports.findPyPyToolCache = findPyPyToolCache; +exports.parsePyPyVersion = parsePyPyVersion; +exports.findPyPyInstallDirForWindows = findPyPyInstallDirForWindows; const path = __importStar(__nccwpck_require__(6928)); const pypyInstall = __importStar(__nccwpck_require__(7149)); const utils_1 = __nccwpck_require__(1798); const semver = __importStar(__nccwpck_require__(2088)); const core = __importStar(__nccwpck_require__(7484)); const tc = __importStar(__nccwpck_require__(3472)); -function findPyPyVersion(versionSpec, architecture, updateEnvironment, checkLatest, allowPreReleases) { - return __awaiter(this, void 0, void 0, function* () { - let resolvedPyPyVersion = ''; - let resolvedPythonVersion = ''; - let installDir; - let releases; - const pypyVersionSpec = parsePyPyVersion(versionSpec); - if (checkLatest) { - releases = yield pypyInstall.getAvailablePyPyVersions(); - if (releases && releases.length > 0) { - const releaseData = pypyInstall.findRelease(releases, pypyVersionSpec.pythonVersion, pypyVersionSpec.pypyVersion, architecture, false); - if (releaseData) { - core.info(`Resolved as PyPy ${releaseData.resolvedPyPyVersion} with Python (${releaseData.resolvedPythonVersion})`); - pypyVersionSpec.pythonVersion = releaseData.resolvedPythonVersion; - pypyVersionSpec.pypyVersion = releaseData.resolvedPyPyVersion; - } - else { - core.info(`Failed to resolve PyPy ${pypyVersionSpec.pypyVersion} with Python (${pypyVersionSpec.pythonVersion}) from manifest`); - } +async function findPyPyVersion(versionSpec, architecture, updateEnvironment, checkLatest, allowPreReleases) { + let resolvedPyPyVersion = ''; + let resolvedPythonVersion = ''; + let installDir; + let releases; + const pypyVersionSpec = parsePyPyVersion(versionSpec); + if (checkLatest) { + releases = await pypyInstall.getAvailablePyPyVersions(); + if (releases && releases.length > 0) { + const releaseData = pypyInstall.findRelease(releases, pypyVersionSpec.pythonVersion, pypyVersionSpec.pypyVersion, architecture, false); + if (releaseData) { + core.info(`Resolved as PyPy ${releaseData.resolvedPyPyVersion} with Python (${releaseData.resolvedPythonVersion})`); + pypyVersionSpec.pythonVersion = releaseData.resolvedPythonVersion; + pypyVersionSpec.pypyVersion = releaseData.resolvedPyPyVersion; + } + else { + core.info(`Failed to resolve PyPy ${pypyVersionSpec.pypyVersion} with Python (${pypyVersionSpec.pythonVersion}) from manifest`); } } - ({ installDir, resolvedPythonVersion, resolvedPyPyVersion } = findPyPyToolCache(pypyVersionSpec.pythonVersion, pypyVersionSpec.pypyVersion, architecture)); - if (!installDir) { - ({ installDir, resolvedPythonVersion, resolvedPyPyVersion } = - yield pypyInstall.installPyPy(pypyVersionSpec.pypyVersion, pypyVersionSpec.pythonVersion, architecture, allowPreReleases, releases)); - } - const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin'; - const _binDir = path.join(installDir, pipDir); - const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); - const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir); - if (updateEnvironment) { - core.exportVariable('pythonLocation', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython - core.exportVariable('Python_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 - core.exportVariable('Python2_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 - core.exportVariable('Python3_ROOT_DIR', installDir); - core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); - core.addPath(pythonLocation); - core.addPath(_binDir); - } - core.setOutput('python-version', `pypy${resolvedPythonVersion}-${resolvedPyPyVersion}`); - core.setOutput('python-path', pythonPath); - return { resolvedPyPyVersion, resolvedPythonVersion }; - }); + } + ({ installDir, resolvedPythonVersion, resolvedPyPyVersion } = findPyPyToolCache(pypyVersionSpec.pythonVersion, pypyVersionSpec.pypyVersion, architecture)); + if (!installDir) { + ({ installDir, resolvedPythonVersion, resolvedPyPyVersion } = + await pypyInstall.installPyPy(pypyVersionSpec.pypyVersion, pypyVersionSpec.pythonVersion, architecture, allowPreReleases, releases)); + } + const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin'; + const _binDir = path.join(installDir, pipDir); + const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; + const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); + const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir); + if (updateEnvironment) { + core.exportVariable('pythonLocation', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython + core.exportVariable('Python_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 + core.exportVariable('Python2_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 + core.exportVariable('Python3_ROOT_DIR', installDir); + core.exportVariable('PKG_CONFIG_PATH', pythonLocation + '/lib/pkgconfig'); + core.addPath(pythonLocation); + core.addPath(_binDir); + } + core.setOutput('python-version', `pypy${resolvedPythonVersion}-${resolvedPyPyVersion}`); + core.setOutput('python-path', pythonPath); + return { resolvedPyPyVersion, resolvedPythonVersion }; } -exports.findPyPyVersion = findPyPyVersion; function findPyPyToolCache(pythonVersion, pypyVersion, architecture) { let resolvedPyPyVersion = ''; let resolvedPythonVersion = ''; @@ -96974,7 +96942,6 @@ function findPyPyToolCache(pythonVersion, pypyVersion, architecture) { } return { installDir, resolvedPythonVersion, resolvedPyPyVersion }; } -exports.findPyPyToolCache = findPyPyToolCache; function parsePyPyVersion(versionSpec) { const versions = versionSpec.split('-').filter(item => !!item); if (/^(pypy)(.+)/.test(versions[0])) { @@ -97003,13 +96970,11 @@ function parsePyPyVersion(versionSpec) { pythonVersion: pythonVersion }; } -exports.parsePyPyVersion = parsePyPyVersion; function findPyPyInstallDirForWindows(pythonVersion) { let installDir = ''; utils_1.WINDOWS_ARCHS.forEach(architecture => (installDir = installDir || tc.find('PyPy', pythonVersion, architecture))); return installDir; } -exports.findPyPyInstallDirForWindows = findPyPyInstallDirForWindows; /***/ }), @@ -97035,24 +97000,27 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.pythonVersionToSemantic = exports.desugarVersion = exports.useCpythonVersion = void 0; +exports.useCpythonVersion = useCpythonVersion; +exports.desugarVersion = desugarVersion; +exports.pythonVersionToSemantic = pythonVersionToSemantic; const os = __importStar(__nccwpck_require__(857)); const path = __importStar(__nccwpck_require__(6928)); const utils_1 = __nccwpck_require__(1798); @@ -97081,148 +97049,141 @@ function binDir(installDir) { return path.join(installDir, 'bin'); } } -function installPip(pythonLocation) { - return __awaiter(this, void 0, void 0, function* () { - const pipVersion = core.getInput('pip-version'); - // Validate pip-version format: major[.minor][.patch] - const versionRegex = /^\d+(\.\d+)?(\.\d+)?$/; - if (pipVersion && !versionRegex.test(pipVersion)) { - throw new Error(`Invalid pip-version "${pipVersion}". Please specify a version in the format major[.minor][.patch].`); - } - if (pipVersion) { - core.info(`pip-version input is specified. Installing pip version ${pipVersion}`); - yield exec.exec(`${pythonLocation}/python -m pip install --upgrade pip==${pipVersion} --disable-pip-version-check --no-warn-script-location`); - } - }); +async function installPip(pythonLocation) { + const pipVersion = core.getInput('pip-version'); + // Validate pip-version format: major[.minor][.patch] + const versionRegex = /^\d+(\.\d+)?(\.\d+)?$/; + if (pipVersion && !versionRegex.test(pipVersion)) { + throw new Error(`Invalid pip-version "${pipVersion}". Please specify a version in the format major[.minor][.patch].`); + } + if (pipVersion) { + core.info(`pip-version input is specified. Installing pip version ${pipVersion}`); + await exec.exec(`${pythonLocation}/python -m pip install --upgrade pip==${pipVersion} --disable-pip-version-check --no-warn-script-location`); + } } -function useCpythonVersion(version, architecture, updateEnvironment, checkLatest, allowPreReleases, freethreaded) { - return __awaiter(this, void 0, void 0, function* () { - var _a; - let manifest = null; - const { version: desugaredVersionSpec, freethreaded: versionFreethreaded } = desugarVersion(version); - let semanticVersionSpec = pythonVersionToSemantic(desugaredVersionSpec, allowPreReleases); - if (versionFreethreaded) { - // Use the freethreaded version if it was specified in the input, e.g., 3.13t - freethreaded = true; +async function useCpythonVersion(version, architecture, updateEnvironment, checkLatest, allowPreReleases, freethreaded) { + let manifest = null; + const { version: desugaredVersionSpec, freethreaded: versionFreethreaded } = desugarVersion(version); + let semanticVersionSpec = pythonVersionToSemantic(desugaredVersionSpec, allowPreReleases); + if (versionFreethreaded) { + // Use the freethreaded version if it was specified in the input, e.g., 3.13t + freethreaded = true; + } + core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); + if (freethreaded) { + // Free threaded versions use an architecture suffix like `x64-freethreaded` + core.debug(`Using freethreaded version of ${semanticVersionSpec}`); + architecture += '-freethreaded'; + } + if (checkLatest) { + manifest = await installer.getManifest(); + const resolvedVersion = (await installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest))?.version; + if (resolvedVersion) { + semanticVersionSpec = resolvedVersion; + core.info(`Resolved as '${semanticVersionSpec}'`); } - core.debug(`Semantic version spec of ${version} is ${semanticVersionSpec}`); + else { + core.info(`Failed to resolve version ${semanticVersionSpec} from manifest`); + } + } + let installDir = tc.find('Python', semanticVersionSpec, architecture); + if (!installDir) { + core.info(`Version ${semanticVersionSpec} was not found in the local cache`); + const foundRelease = await installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest); + if (foundRelease && foundRelease.files && foundRelease.files.length > 0) { + core.info(`Version ${semanticVersionSpec} is available for downloading`); + await installer.installCpythonFromRelease(foundRelease); + installDir = tc.find('Python', semanticVersionSpec, architecture); + } + } + if (!installDir) { + const osInfo = await (0, utils_1.getOSInfo)(); + const msg = [ + `The version '${version}' with architecture '${architecture}' was not found for ${osInfo + ? `${osInfo.osName} ${osInfo.osVersion}` + : 'this operating system'}.` + ]; if (freethreaded) { - // Free threaded versions use an architecture suffix like `x64-freethreaded` - core.debug(`Using freethreaded version of ${semanticVersionSpec}`); - architecture += '-freethreaded'; + msg.push(`Free threaded versions are only available for Python 3.13.0 and later.`); } - if (checkLatest) { - manifest = yield installer.getManifest(); - const resolvedVersion = (_a = (yield installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest))) === null || _a === void 0 ? void 0 : _a.version; - if (resolvedVersion) { - semanticVersionSpec = resolvedVersion; - core.info(`Resolved as '${semanticVersionSpec}'`); - } - else { - core.info(`Failed to resolve version ${semanticVersionSpec} from manifest`); + msg.push(`The list of all available versions can be found here: ${installer.MANIFEST_URL}`); + throw new Error(msg.join(os.EOL)); + } + const _binDir = binDir(installDir); + const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; + const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); + if (updateEnvironment) { + core.exportVariable('pythonLocation', installDir); + core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig'); + core.exportVariable('pythonLocation', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython + core.exportVariable('Python_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 + core.exportVariable('Python2_ROOT_DIR', installDir); + // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 + core.exportVariable('Python3_ROOT_DIR', installDir); + core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig'); + if (utils_1.IS_LINUX) { + const libPath = process.env.LD_LIBRARY_PATH + ? `:${process.env.LD_LIBRARY_PATH}` + : ''; + const pyLibPath = path.join(installDir, 'lib'); + if (!libPath.split(':').includes(pyLibPath)) { + core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); } } - let installDir = tc.find('Python', semanticVersionSpec, architecture); - if (!installDir) { - core.info(`Version ${semanticVersionSpec} was not found in the local cache`); - const foundRelease = yield installer.findReleaseFromManifest(semanticVersionSpec, architecture, manifest); - if (foundRelease && foundRelease.files && foundRelease.files.length > 0) { - core.info(`Version ${semanticVersionSpec} is available for downloading`); - yield installer.installCpythonFromRelease(foundRelease); - installDir = tc.find('Python', semanticVersionSpec, architecture); + core.addPath(installDir); + core.addPath(_binDir); + if (utils_1.IS_WINDOWS) { + // Add --user directory + // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ + // Extract version details + const version = path.basename(path.dirname(installDir)); + const major = semver.major(version); + const minor = semver.minor(version); + const basePath = process.env['APPDATA'] || ''; + let versionSuffix = `${major}${minor}`; + // Append '-32' for x86 architecture if Python version is >= 3.10 + if (architecture === 'x86' && + (major > 3 || (major === 3 && minor >= 10))) { + versionSuffix += '-32'; } - } - if (!installDir) { - const osInfo = yield (0, utils_1.getOSInfo)(); - const msg = [ - `The version '${version}' with architecture '${architecture}' was not found for ${osInfo - ? `${osInfo.osName} ${osInfo.osVersion}` - : 'this operating system'}.` - ]; + else if (architecture === 'arm64') { + versionSuffix += '-arm64'; + } + // Append 't' for freethreaded builds if (freethreaded) { - msg.push(`Free threaded versions are only available for Python 3.13.0 and later.`); - } - msg.push(`The list of all available versions can be found here: ${installer.MANIFEST_URL}`); - throw new Error(msg.join(os.EOL)); - } - const _binDir = binDir(installDir); - const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); - if (updateEnvironment) { - core.exportVariable('pythonLocation', installDir); - core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig'); - core.exportVariable('pythonLocation', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython - core.exportVariable('Python_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython2.html#module:FindPython2 - core.exportVariable('Python2_ROOT_DIR', installDir); - // https://cmake.org/cmake/help/latest/module/FindPython3.html#module:FindPython3 - core.exportVariable('Python3_ROOT_DIR', installDir); - core.exportVariable('PKG_CONFIG_PATH', installDir + '/lib/pkgconfig'); - if (utils_1.IS_LINUX) { - const libPath = process.env.LD_LIBRARY_PATH - ? `:${process.env.LD_LIBRARY_PATH}` - : ''; - const pyLibPath = path.join(installDir, 'lib'); - if (!libPath.split(':').includes(pyLibPath)) { - core.exportVariable('LD_LIBRARY_PATH', pyLibPath + libPath); - } - } - core.addPath(installDir); - core.addPath(_binDir); - if (utils_1.IS_WINDOWS) { - // Add --user directory - // `installDir` from tool cache should look like $RUNNER_TOOL_CACHE/Python//x64/ - // Extract version details - const version = path.basename(path.dirname(installDir)); - const major = semver.major(version); - const minor = semver.minor(version); - const basePath = process.env['APPDATA'] || ''; - let versionSuffix = `${major}${minor}`; - // Append '-32' for x86 architecture if Python version is >= 3.10 - if (architecture === 'x86' && - (major > 3 || (major === 3 && minor >= 10))) { + versionSuffix += 't'; + if (architecture === 'x86-freethreaded') { versionSuffix += '-32'; } - else if (architecture === 'arm64') { + else if (architecture === 'arm64-freethreaded') { versionSuffix += '-arm64'; } - // Append 't' for freethreaded builds - if (freethreaded) { - versionSuffix += 't'; - if (architecture === 'x86-freethreaded') { - versionSuffix += '-32'; - } - else if (architecture === 'arm64-freethreaded') { - versionSuffix += '-arm64'; - } - } - // Add user Scripts path - const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts'); - core.addPath(userScriptsDir); } - // On Linux and macOS, pip will create the --user directory and add it to PATH as needed. + // Add user Scripts path + const userScriptsDir = path.join(basePath, 'Python', `Python${versionSuffix}`, 'Scripts'); + core.addPath(userScriptsDir); } - const installed = versionFromPath(installDir); - let pythonVersion = installed; - if (freethreaded) { - // Add the freethreaded suffix to the version (e.g., 3.13.1t) - pythonVersion += 't'; - } - core.setOutput('python-version', pythonVersion); - core.setOutput('python-path', pythonPath); - const binaryPath = utils_1.IS_WINDOWS ? installDir : _binDir; - yield installPip(binaryPath); - return { impl: 'CPython', version: pythonVersion }; - }); + // On Linux and macOS, pip will create the --user directory and add it to PATH as needed. + } + const installed = versionFromPath(installDir); + let pythonVersion = installed; + if (freethreaded) { + // Add the freethreaded suffix to the version (e.g., 3.13.1t) + pythonVersion += 't'; + } + core.setOutput('python-version', pythonVersion); + core.setOutput('python-path', pythonPath); + const binaryPath = utils_1.IS_WINDOWS ? installDir : _binDir; + await installPip(binaryPath); + return { impl: 'CPython', version: pythonVersion }; } -exports.useCpythonVersion = useCpythonVersion; /* Desugar free threaded and dev versions */ function desugarVersion(versionSpec) { const { version, freethreaded } = desugarFreeThreadedVersion(versionSpec); return { version: desugarDevVersion(version), freethreaded }; } -exports.desugarVersion = desugarVersion; /* Identify freethreaded versions like, 3.13t, 3.13.1t, 3.13t-dev. * Returns the version without the `t` and the architectures suffix, if freethreaded */ function desugarFreeThreadedVersion(versionSpec) { @@ -97266,7 +97227,6 @@ function pythonVersionToSemantic(versionSpec, allowPreReleases) { } return result; } -exports.pythonVersionToSemantic = pythonVersionToSemantic; /***/ }), @@ -97292,27 +97252,34 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findAsset = exports.toGraalPyArchitecture = exports.toGraalPyPlatform = exports.findRelease = exports.graalPyTagToVersion = exports.getAvailableGraalPyVersions = exports.installGraalPy = void 0; +exports.installGraalPy = installGraalPy; +exports.getAvailableGraalPyVersions = getAvailableGraalPyVersions; +exports.graalPyTagToVersion = graalPyTagToVersion; +exports.findRelease = findRelease; +exports.toGraalPyPlatform = toGraalPyPlatform; +exports.toGraalPyArchitecture = toGraalPyArchitecture; +exports.findAsset = findAsset; const os = __importStar(__nccwpck_require__(857)); const path = __importStar(__nccwpck_require__(6928)); const core = __importStar(__nccwpck_require__(7484)); @@ -97324,104 +97291,94 @@ const fs_1 = __importDefault(__nccwpck_require__(9896)); const utils_1 = __nccwpck_require__(1798); const TOKEN = core.getInput('token'); const AUTH = !TOKEN ? undefined : `token ${TOKEN}`; -function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) { - return __awaiter(this, void 0, void 0, function* () { - let downloadDir; - releases = releases !== null && releases !== void 0 ? releases : (yield getAvailableGraalPyVersions()); - if (!releases || !releases.length) { - throw new Error('No release was found in GraalPy version.json'); +async function installGraalPy(graalpyVersion, architecture, allowPreReleases, releases) { + let downloadDir; + releases = releases ?? (await getAvailableGraalPyVersions()); + if (!releases || !releases.length) { + throw new Error('No release was found in GraalPy version.json'); + } + let releaseData = findRelease(releases, graalpyVersion, architecture, false); + if (allowPreReleases && (!releaseData || !releaseData.foundAsset)) { + // check for pre-release + core.info([ + `Stable GraalPy version ${graalpyVersion} with arch ${architecture} not found`, + `Trying pre-release versions` + ].join(os.EOL)); + releaseData = findRelease(releases, graalpyVersion, architecture, true); + } + if (!releaseData || !releaseData.foundAsset) { + throw new Error(`GraalPy version ${graalpyVersion} with arch ${architecture} not found`); + } + const { foundAsset, resolvedGraalPyVersion } = releaseData; + const downloadUrl = `${foundAsset.browser_download_url}`; + core.info(`Downloading GraalPy from "${downloadUrl}" ...`); + try { + const graalpyPath = await tc.downloadTool(downloadUrl, undefined, AUTH); + core.info('Extracting downloaded archive...'); + downloadDir = await tc.extractTar(graalpyPath); + // root folder in archive can have unpredictable name so just take the first folder + // downloadDir is unique folder under TEMP and can't contain any other folders + const archiveName = fs_1.default.readdirSync(downloadDir)[0]; + const toolDir = path.join(downloadDir, archiveName); + let installDir = toolDir; + if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) { + installDir = await tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture); } - let releaseData = findRelease(releases, graalpyVersion, architecture, false); - if (allowPreReleases && (!releaseData || !releaseData.foundAsset)) { - // check for pre-release - core.info([ - `Stable GraalPy version ${graalpyVersion} with arch ${architecture} not found`, - `Trying pre-release versions` - ].join(os.EOL)); - releaseData = findRelease(releases, graalpyVersion, architecture, true); - } - if (!releaseData || !releaseData.foundAsset) { - throw new Error(`GraalPy version ${graalpyVersion} with arch ${architecture} not found`); - } - const { foundAsset, resolvedGraalPyVersion } = releaseData; - const downloadUrl = `${foundAsset.browser_download_url}`; - core.info(`Downloading GraalPy from "${downloadUrl}" ...`); - try { - const graalpyPath = yield tc.downloadTool(downloadUrl, undefined, AUTH); - core.info('Extracting downloaded archive...'); - downloadDir = yield tc.extractTar(graalpyPath); - // root folder in archive can have unpredictable name so just take the first folder - // downloadDir is unique folder under TEMP and can't contain any other folders - const archiveName = fs_1.default.readdirSync(downloadDir)[0]; - const toolDir = path.join(downloadDir, archiveName); - let installDir = toolDir; - if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) { - installDir = yield tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture); + const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); + await createGraalPySymlink(binaryPath, resolvedGraalPyVersion); + await installPip(binaryPath); + return { installDir, resolvedGraalPyVersion }; + } + catch (err) { + if (err instanceof Error) { + // Rate limit? + if (err instanceof tc.HTTPError && + (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { + core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); } - const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); - yield createGraalPySymlink(binaryPath, resolvedGraalPyVersion); - yield installPip(binaryPath); - return { installDir, resolvedGraalPyVersion }; - } - catch (err) { - if (err instanceof Error) { - // Rate limit? - if (err instanceof tc.HTTPError && - (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { - core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); - } - else { - core.info(err.message); - } - if (err.stack !== undefined) { - core.debug(err.stack); - } + else { + core.info(err.message); } - throw err; - } - }); -} -exports.installGraalPy = installGraalPy; -function getAvailableGraalPyVersions() { - return __awaiter(this, void 0, void 0, function* () { - const http = new httpm.HttpClient('tool-cache'); - const headers = {}; - if (AUTH) { - headers.authorization = AUTH; - } - let url = 'https://api.github.com/repos/oracle/graalpython/releases'; - const result = []; - do { - const response = yield http.getJson(url, headers); - if (!response.result) { - throw new Error(`Unable to retrieve the list of available GraalPy versions from '${url}'`); + if (err.stack !== undefined) { + core.debug(err.stack); } - result.push(...response.result); - url = (0, utils_1.getNextPageUrl)(response); - } while (url); - return result; - }); + } + throw err; + } } -exports.getAvailableGraalPyVersions = getAvailableGraalPyVersions; -function createGraalPySymlink(graalpyBinaryPath, graalpyVersion) { - return __awaiter(this, void 0, void 0, function* () { - const version = semver.coerce(graalpyVersion); - const pythonBinaryPostfix = semver.major(version); - const pythonMinor = semver.minor(version); - const graalpyMajorMinorBinaryPostfix = `${pythonBinaryPostfix}.${pythonMinor}`; - const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - core.info('Creating symlinks...'); - (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `python${pythonBinaryPostfix}${binaryExtension}`, true); - (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `python${binaryExtension}`, true); - (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `graalpy${graalpyMajorMinorBinaryPostfix}${binaryExtension}`, true); - }); +async function getAvailableGraalPyVersions() { + const http = new httpm.HttpClient('tool-cache'); + const headers = {}; + if (AUTH) { + headers.authorization = AUTH; + } + let url = 'https://api.github.com/repos/oracle/graalpython/releases'; + const result = []; + do { + const response = await http.getJson(url, headers); + if (!response.result) { + throw new Error(`Unable to retrieve the list of available GraalPy versions from '${url}'`); + } + result.push(...response.result); + url = (0, utils_1.getNextPageUrl)(response); + } while (url); + return result; } -function installPip(pythonLocation) { - return __awaiter(this, void 0, void 0, function* () { - core.info("Installing pip (GraalPy doesn't update pip because it uses a patched version of pip)"); - const pythonBinary = path.join(pythonLocation, 'python'); - yield exec.exec(`${pythonBinary} -m ensurepip --default-pip`); - }); +async function createGraalPySymlink(graalpyBinaryPath, graalpyVersion) { + const version = semver.coerce(graalpyVersion); + const pythonBinaryPostfix = semver.major(version); + const pythonMinor = semver.minor(version); + const graalpyMajorMinorBinaryPostfix = `${pythonBinaryPostfix}.${pythonMinor}`; + const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; + core.info('Creating symlinks...'); + (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `python${pythonBinaryPostfix}${binaryExtension}`, true); + (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `python${binaryExtension}`, true); + (0, utils_1.createSymlinkInFolder)(graalpyBinaryPath, `graalpy${binaryExtension}`, `graalpy${graalpyMajorMinorBinaryPostfix}${binaryExtension}`, true); +} +async function installPip(pythonLocation) { + core.info("Installing pip (GraalPy doesn't update pip because it uses a patched version of pip)"); + const pythonBinary = path.join(pythonLocation, 'python'); + await exec.exec(`${pythonBinary} -m ensurepip --default-pip`); } function graalPyTagToVersion(tag) { const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)((?:a|b|rc))?(\d*)?/; @@ -97436,7 +97393,6 @@ function graalPyTagToVersion(tag) { return tag.replace(/.*-/, ''); } } -exports.graalPyTagToVersion = graalPyTagToVersion; function findRelease(releases, graalpyVersion, architecture, includePrerelease) { const options = { includePrerelease: includePrerelease }; const filterReleases = releases.filter(item => { @@ -97454,7 +97410,6 @@ function findRelease(releases, graalpyVersion, architecture, includePrerelease) resolvedGraalPyVersion: graalPyTagToVersion(foundRelease.tag_name) }; } -exports.findRelease = findRelease; function toGraalPyPlatform(platform) { switch (platform) { case 'win32': @@ -97464,7 +97419,6 @@ function toGraalPyPlatform(platform) { } return platform; } -exports.toGraalPyPlatform = toGraalPyPlatform; function toGraalPyArchitecture(architecture) { switch (architecture) { case 'x64': @@ -97474,7 +97428,6 @@ function toGraalPyArchitecture(architecture) { } return architecture; } -exports.toGraalPyArchitecture = toGraalPyArchitecture; function findAsset(item, architecture, platform) { const graalpyArch = toGraalPyArchitecture(architecture); const graalpyPlatform = toGraalPyPlatform(platform); @@ -97486,7 +97439,6 @@ function findAsset(item, architecture, platform) { found.sort((f1, f2) => f1.name.length - f2.name.length); return found[0]; } -exports.findAsset = findAsset; /***/ }), @@ -97512,27 +97464,35 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.findAssetForMacOrLinux = exports.findAssetForWindows = exports.isArchPresentForMacOrLinux = exports.isArchPresentForWindows = exports.pypyVersionToSemantic = exports.findRelease = exports.getAvailablePyPyVersions = exports.installPyPy = void 0; +exports.installPyPy = installPyPy; +exports.getAvailablePyPyVersions = getAvailablePyPyVersions; +exports.findRelease = findRelease; +exports.pypyVersionToSemantic = pypyVersionToSemantic; +exports.isArchPresentForWindows = isArchPresentForWindows; +exports.isArchPresentForMacOrLinux = isArchPresentForMacOrLinux; +exports.findAssetForWindows = findAssetForWindows; +exports.findAssetForMacOrLinux = findAssetForMacOrLinux; const os = __importStar(__nccwpck_require__(857)); const path = __importStar(__nccwpck_require__(6928)); const core = __importStar(__nccwpck_require__(7484)); @@ -97542,104 +97502,94 @@ const httpm = __importStar(__nccwpck_require__(4844)); const exec = __importStar(__nccwpck_require__(5236)); const fs_1 = __importDefault(__nccwpck_require__(9896)); const utils_1 = __nccwpck_require__(1798); -function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) { - return __awaiter(this, void 0, void 0, function* () { - let downloadDir; - releases = releases !== null && releases !== void 0 ? releases : (yield getAvailablePyPyVersions()); - if (!releases || releases.length === 0) { - throw new Error('No release was found in PyPy version.json'); +async function installPyPy(pypyVersion, pythonVersion, architecture, allowPreReleases, releases) { + let downloadDir; + releases = releases ?? (await getAvailablePyPyVersions()); + if (!releases || releases.length === 0) { + throw new Error('No release was found in PyPy version.json'); + } + let releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture, false); + if (allowPreReleases && (!releaseData || !releaseData.foundAsset)) { + // check for pre-release + core.info([ + `Stable PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found`, + `Trying pre-release versions` + ].join(os.EOL)); + releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture, true); + } + if (!releaseData || !releaseData.foundAsset) { + throw new Error(`PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found`); + } + const { foundAsset, resolvedPythonVersion, resolvedPyPyVersion } = releaseData; + const downloadUrl = `${foundAsset.download_url}`; + core.info(`Downloading PyPy from "${downloadUrl}" ...`); + try { + const fileName = (0, utils_1.getDownloadFileName)(downloadUrl); + const pypyPath = await tc.downloadTool(downloadUrl, fileName); + core.info('Extracting downloaded archive...'); + if (utils_1.IS_WINDOWS) { + downloadDir = await tc.extractZip(pypyPath); } - let releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture, false); - if (allowPreReleases && (!releaseData || !releaseData.foundAsset)) { - // check for pre-release - core.info([ - `Stable PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found`, - `Trying pre-release versions` - ].join(os.EOL)); - releaseData = findRelease(releases, pythonVersion, pypyVersion, architecture, true); + else { + downloadDir = await tc.extractTar(pypyPath, undefined, 'x'); } - if (!releaseData || !releaseData.foundAsset) { - throw new Error(`PyPy version ${pythonVersion} (${pypyVersion}) with arch ${architecture} not found`); + // root folder in archive can have unpredictable name so just take the first folder + // downloadDir is unique folder under TEMP and can't contain any other folders + const archiveName = fs_1.default.readdirSync(downloadDir)[0]; + const toolDir = path.join(downloadDir, archiveName); + let installDir = toolDir; + if (!(0, utils_1.isNightlyKeyword)(resolvedPyPyVersion)) { + installDir = await tc.cacheDir(toolDir, 'PyPy', resolvedPythonVersion, architecture); } - const { foundAsset, resolvedPythonVersion, resolvedPyPyVersion } = releaseData; - const downloadUrl = `${foundAsset.download_url}`; - core.info(`Downloading PyPy from "${downloadUrl}" ...`); - try { - const fileName = (0, utils_1.getDownloadFileName)(downloadUrl); - const pypyPath = yield tc.downloadTool(downloadUrl, fileName); - core.info('Extracting downloaded archive...'); - if (utils_1.IS_WINDOWS) { - downloadDir = yield tc.extractZip(pypyPath); + (0, utils_1.writeExactPyPyVersionFile)(installDir, resolvedPyPyVersion); + const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); + await createPyPySymlink(binaryPath, resolvedPythonVersion); + await installPip(binaryPath); + return { installDir, resolvedPythonVersion, resolvedPyPyVersion }; + } + catch (err) { + if (err instanceof Error) { + // Rate limit? + if (err instanceof tc.HTTPError && + (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { + core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); } else { - downloadDir = yield tc.extractTar(pypyPath, undefined, 'x'); + core.info(err.message); } - // root folder in archive can have unpredictable name so just take the first folder - // downloadDir is unique folder under TEMP and can't contain any other folders - const archiveName = fs_1.default.readdirSync(downloadDir)[0]; - const toolDir = path.join(downloadDir, archiveName); - let installDir = toolDir; - if (!(0, utils_1.isNightlyKeyword)(resolvedPyPyVersion)) { - installDir = yield tc.cacheDir(toolDir, 'PyPy', resolvedPythonVersion, architecture); + if (err.stack !== undefined) { + core.debug(err.stack); } - (0, utils_1.writeExactPyPyVersionFile)(installDir, resolvedPyPyVersion); - const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); - yield createPyPySymlink(binaryPath, resolvedPythonVersion); - yield installPip(binaryPath); - return { installDir, resolvedPythonVersion, resolvedPyPyVersion }; } - catch (err) { - if (err instanceof Error) { - // Rate limit? - if (err instanceof tc.HTTPError && - (err.httpStatusCode === 403 || err.httpStatusCode === 429)) { - core.info(`Received HTTP status code ${err.httpStatusCode}. This usually indicates the rate limit has been exceeded`); - } - else { - core.info(err.message); - } - if (err.stack !== undefined) { - core.debug(err.stack); - } - } - throw err; - } - }); + throw err; + } } -exports.installPyPy = installPyPy; -function getAvailablePyPyVersions() { - return __awaiter(this, void 0, void 0, function* () { - const url = 'https://downloads.python.org/pypy/versions.json'; - const http = new httpm.HttpClient('tool-cache'); - const response = yield http.getJson(url); - if (!response.result) { - throw new Error(`Unable to retrieve the list of available PyPy versions from '${url}'`); - } - return response.result; - }); +async function getAvailablePyPyVersions() { + const url = 'https://downloads.python.org/pypy/versions.json'; + const http = new httpm.HttpClient('tool-cache'); + const response = await http.getJson(url); + if (!response.result) { + throw new Error(`Unable to retrieve the list of available PyPy versions from '${url}'`); + } + return response.result; } -exports.getAvailablePyPyVersions = getAvailablePyPyVersions; -function createPyPySymlink(pypyBinaryPath, pythonVersion) { - return __awaiter(this, void 0, void 0, function* () { - const version = semver.coerce(pythonVersion); - const pythonBinaryPostfix = semver.major(version); - const pythonMinor = semver.minor(version); - const pypyBinaryPostfix = pythonBinaryPostfix === 2 ? '' : '3'; - const pypyMajorMinorBinaryPostfix = `${pythonBinaryPostfix}.${pythonMinor}`; - const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - core.info('Creating symlinks...'); - (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `python${pythonBinaryPostfix}${binaryExtension}`, true); - (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `python${binaryExtension}`, true); - (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `pypy${pypyMajorMinorBinaryPostfix}${binaryExtension}`, true); - }); +async function createPyPySymlink(pypyBinaryPath, pythonVersion) { + const version = semver.coerce(pythonVersion); + const pythonBinaryPostfix = semver.major(version); + const pythonMinor = semver.minor(version); + const pypyBinaryPostfix = pythonBinaryPostfix === 2 ? '' : '3'; + const pypyMajorMinorBinaryPostfix = `${pythonBinaryPostfix}.${pythonMinor}`; + const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; + core.info('Creating symlinks...'); + (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `python${pythonBinaryPostfix}${binaryExtension}`, true); + (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `python${binaryExtension}`, true); + (0, utils_1.createSymlinkInFolder)(pypyBinaryPath, `pypy${pypyBinaryPostfix}${binaryExtension}`, `pypy${pypyMajorMinorBinaryPostfix}${binaryExtension}`, true); } -function installPip(pythonLocation) { - return __awaiter(this, void 0, void 0, function* () { - core.info('Installing and updating pip'); - const pythonBinary = path.join(pythonLocation, 'python'); - yield exec.exec(`${pythonBinary} -m ensurepip`); - yield exec.exec(`${pythonLocation}/python -m pip install --ignore-installed pip`); - }); +async function installPip(pythonLocation) { + core.info('Installing and updating pip'); + const pythonBinary = path.join(pythonLocation, 'python'); + await exec.exec(`${pythonBinary} -m ensurepip`); + await exec.exec(`${pythonLocation}/python -m pip install --ignore-installed pip`); } function findRelease(releases, pythonVersion, pypyVersion, architecture, includePrerelease) { const options = { includePrerelease: includePrerelease }; @@ -97671,32 +97621,26 @@ function findRelease(releases, pythonVersion, pypyVersion, architecture, include resolvedPyPyVersion: foundRelease.pypy_version.trim() }; } -exports.findRelease = findRelease; function pypyVersionToSemantic(versionSpec) { const prereleaseVersion = /(\d+\.\d+\.\d+)((?:a|b|rc))(\d*)/g; return versionSpec.replace(prereleaseVersion, '$1-$2.$3'); } -exports.pypyVersionToSemantic = pypyVersionToSemantic; function isArchPresentForWindows(item, architecture) { architecture = pypyArchitecture(architecture); return item.files.some((file) => utils_1.WINDOWS_PLATFORMS.includes(file.platform) && file.arch === architecture); } -exports.isArchPresentForWindows = isArchPresentForWindows; function isArchPresentForMacOrLinux(item, architecture, platform) { architecture = pypyArchitecture(architecture); return item.files.some((file) => file.arch === architecture && file.platform === platform); } -exports.isArchPresentForMacOrLinux = isArchPresentForMacOrLinux; function findAssetForWindows(releases, architecture) { architecture = pypyArchitecture(architecture); return releases.files.find((item) => utils_1.WINDOWS_PLATFORMS.includes(item.platform) && item.arch === architecture); } -exports.findAssetForWindows = findAssetForWindows; function findAssetForMacOrLinux(releases, architecture, platform) { architecture = pypyArchitecture(architecture); return releases.files.find((item) => item.arch === architecture && item.platform === platform); } -exports.findAssetForMacOrLinux = findAssetForMacOrLinux; function pypyArchitecture(architecture) { if (utils_1.IS_WINDOWS && architecture === 'x32') { // convert x32 to x86 because os.arch() returns x32 for 32-bit systems but PyPy releases json has x86 arch value. @@ -97732,24 +97676,30 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.installCpythonFromRelease = exports.getManifestFromURL = exports.getManifestFromRepo = exports.getManifest = exports.findReleaseFromManifest = exports.MANIFEST_URL = void 0; +exports.MANIFEST_URL = void 0; +exports.findReleaseFromManifest = findReleaseFromManifest; +exports.getManifest = getManifest; +exports.getManifestFromRepo = getManifestFromRepo; +exports.getManifestFromURL = getManifestFromURL; +exports.installCpythonFromRelease = installCpythonFromRelease; const path = __importStar(__nccwpck_require__(6928)); const core = __importStar(__nccwpck_require__(7484)); const tc = __importStar(__nccwpck_require__(3472)); @@ -97762,16 +97712,13 @@ const MANIFEST_REPO_OWNER = 'actions'; const MANIFEST_REPO_NAME = 'python-versions'; const MANIFEST_REPO_BRANCH = 'main'; exports.MANIFEST_URL = `https://raw.githubusercontent.com/${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}/${MANIFEST_REPO_BRANCH}/versions-manifest.json`; -function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) { - return __awaiter(this, void 0, void 0, function* () { - if (!manifest) { - manifest = yield getManifest(); - } - const foundRelease = yield tc.findFromManifest(semanticVersionSpec, false, manifest, architecture); - return foundRelease; - }); +async function findReleaseFromManifest(semanticVersionSpec, architecture, manifest) { + if (!manifest) { + manifest = await getManifest(); + } + const foundRelease = await tc.findFromManifest(semanticVersionSpec, false, manifest, architecture); + return foundRelease; } -exports.findReleaseFromManifest = findReleaseFromManifest; function isIToolRelease(obj) { return (typeof obj === 'object' && obj !== null && @@ -97783,113 +97730,104 @@ function isIToolRelease(obj) { typeof file.arch === 'string' && typeof file.download_url === 'string')); } -function getManifest() { - return __awaiter(this, void 0, void 0, function* () { - try { - const repoManifest = yield getManifestFromRepo(); - if (Array.isArray(repoManifest) && - repoManifest.length && - repoManifest.every(isIToolRelease)) { - return repoManifest; - } - throw new Error('The repository manifest is invalid or does not include any valid tool release (IToolRelease) entries.'); +async function getManifest() { + try { + const repoManifest = await getManifestFromRepo(); + if (Array.isArray(repoManifest) && + repoManifest.length && + repoManifest.every(isIToolRelease)) { + return repoManifest; } - catch (err) { - core.debug('Fetching the manifest via the API failed.'); - if (err instanceof Error) { - core.debug(err.message); - } - else { - core.error('An unexpected error occurred while fetching the manifest.'); - } + throw new Error('The repository manifest is invalid or does not include any valid tool release (IToolRelease) entries.'); + } + catch (err) { + core.debug('Fetching the manifest via the API failed.'); + if (err instanceof Error) { + core.debug(err.message); } - return yield getManifestFromURL(); - }); + else { + core.error('An unexpected error occurred while fetching the manifest.'); + } + } + return await getManifestFromURL(); } -exports.getManifest = getManifest; function getManifestFromRepo() { core.debug(`Getting manifest from ${MANIFEST_REPO_OWNER}/${MANIFEST_REPO_NAME}@${MANIFEST_REPO_BRANCH}`); return tc.getManifestFromRepo(MANIFEST_REPO_OWNER, MANIFEST_REPO_NAME, AUTH, MANIFEST_REPO_BRANCH); } -exports.getManifestFromRepo = getManifestFromRepo; -function getManifestFromURL() { - return __awaiter(this, void 0, void 0, function* () { - core.debug('Falling back to fetching the manifest using raw URL.'); - const http = new httpm.HttpClient('tool-cache'); - const response = yield http.getJson(exports.MANIFEST_URL); - if (!response.result) { - throw new Error(`Unable to get manifest from ${exports.MANIFEST_URL}`); - } - return response.result; - }); +async function getManifestFromURL() { + core.debug('Falling back to fetching the manifest using raw URL.'); + const http = new httpm.HttpClient('tool-cache'); + const response = await http.getJson(exports.MANIFEST_URL); + if (!response.result) { + throw new Error(`Unable to get manifest from ${exports.MANIFEST_URL}`); + } + return response.result; } -exports.getManifestFromURL = getManifestFromURL; -function installPython(workingDirectory) { - return __awaiter(this, void 0, void 0, function* () { - const options = { - cwd: workingDirectory, - env: Object.assign(Object.assign({}, process.env), (utils_1.IS_LINUX && { LD_LIBRARY_PATH: path.join(workingDirectory, 'lib') })), - silent: true, - listeners: { - stdout: (data) => { - core.info(data.toString().trim()); - }, - stderr: (data) => { - core.error(data.toString().trim()); - } +async function installPython(workingDirectory) { + const options = { + cwd: workingDirectory, + env: { + ...process.env, + ...(utils_1.IS_LINUX && { LD_LIBRARY_PATH: path.join(workingDirectory, 'lib') }) + }, + silent: true, + listeners: { + stdout: (data) => { + core.info(data.toString().trim()); + }, + stderr: (data) => { + core.error(data.toString().trim()); } - }; + } + }; + if (utils_1.IS_WINDOWS) { + await exec.exec('powershell', ['./setup.ps1'], options); + } + else { + await exec.exec('bash', ['./setup.sh'], options); + } +} +async function installCpythonFromRelease(release) { + if (!release.files || release.files.length === 0) { + throw new Error('No files found in the release to download.'); + } + const downloadUrl = release.files[0].download_url; + core.info(`Download from "${downloadUrl}"`); + let pythonPath = ''; + try { + const fileName = (0, utils_1.getDownloadFileName)(downloadUrl); + pythonPath = await tc.downloadTool(downloadUrl, fileName, AUTH); + core.info('Extract downloaded archive'); + let pythonExtractedFolder; if (utils_1.IS_WINDOWS) { - yield exec.exec('powershell', ['./setup.ps1'], options); + pythonExtractedFolder = await tc.extractZip(pythonPath); } else { - yield exec.exec('bash', ['./setup.sh'], options); + pythonExtractedFolder = await tc.extractTar(pythonPath); } - }); -} -function installCpythonFromRelease(release) { - return __awaiter(this, void 0, void 0, function* () { - if (!release.files || release.files.length === 0) { - throw new Error('No files found in the release to download.'); - } - const downloadUrl = release.files[0].download_url; - core.info(`Download from "${downloadUrl}"`); - let pythonPath = ''; - try { - const fileName = (0, utils_1.getDownloadFileName)(downloadUrl); - pythonPath = yield tc.downloadTool(downloadUrl, fileName, AUTH); - core.info('Extract downloaded archive'); - let pythonExtractedFolder; - if (utils_1.IS_WINDOWS) { - pythonExtractedFolder = yield tc.extractZip(pythonPath); + core.info('Execute installation script'); + await installPython(pythonExtractedFolder); + } + catch (err) { + if (err instanceof tc.HTTPError) { + // Rate limit? + if (err.httpStatusCode === 403) { + core.error(`Received HTTP status code 403. This indicates a permission issue or restricted access.`); + } + else if (err.httpStatusCode === 429) { + core.info(`Received HTTP status code 429. This usually indicates the rate limit has been exceeded`); } else { - pythonExtractedFolder = yield tc.extractTar(pythonPath); + core.info(err.message); } - core.info('Execute installation script'); - yield installPython(pythonExtractedFolder); - } - catch (err) { - if (err instanceof tc.HTTPError) { - // Rate limit? - if (err.httpStatusCode === 403) { - core.error(`Received HTTP status code 403. This indicates a permission issue or restricted access.`); - } - else if (err.httpStatusCode === 429) { - core.info(`Received HTTP status code 429. This usually indicates the rate limit has been exceeded`); - } - else { - core.info(err.message); - } - if (err.stack) { - core.debug(err.stack); - } + if (err.stack) { + core.debug(err.stack); } - throw err; } - }); + throw err; + } } -exports.installCpythonFromRelease = installCpythonFromRelease; /***/ }), @@ -97915,22 +97853,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; @@ -97951,25 +97890,21 @@ function isPyPyVersion(versionSpec) { function isGraalPyVersion(versionSpec) { return versionSpec.startsWith('graalpy'); } -function installPipPackages(pipInstall) { - return __awaiter(this, void 0, void 0, function* () { - core.info(`Installing pip packages: ${pipInstall}`); - try { - const installArgs = pipInstall.trim().split(/\s+/); - yield (0, exec_1.exec)('python', ['-m', 'pip', 'install', ...installArgs]); - core.info('Successfully installed pip packages'); - } - catch (error) { - core.setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`); - } - }); +async function installPipPackages(pipInstall) { + core.info(`Installing pip packages: ${pipInstall}`); + try { + const installArgs = pipInstall.trim().split(/\s+/); + await (0, exec_1.exec)('python', ['-m', 'pip', 'install', ...installArgs]); + core.info('Successfully installed pip packages'); + } + catch (error) { + core.setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`); + } } -function cacheDependencies(cache, pythonVersion) { - return __awaiter(this, void 0, void 0, function* () { - const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; - const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath); - yield cacheDistributor.restoreCache(); - }); +async function cacheDependencies(cache, pythonVersion) { + const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined; + const cacheDistributor = (0, cache_factory_1.getCacheDistributor)(cache, pythonVersion, cacheDependencyPath); + await cacheDistributor.restoreCache(); } function resolveVersionInputFromDefaultFile() { const couples = [ @@ -98007,66 +97942,63 @@ function resolveVersionInput() { } return versions; } -function run() { - return __awaiter(this, void 0, void 0, function* () { - var _a; - if (utils_1.IS_MAC) { - process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; - } - if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) { - process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']; - } - core.debug(`Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`); - try { - const versions = resolveVersionInput(); - const checkLatest = core.getBooleanInput('check-latest'); - const allowPreReleases = core.getBooleanInput('allow-prereleases'); - const freethreaded = core.getBooleanInput('freethreaded'); - if (versions.length) { - let pythonVersion = ''; - const arch = core.getInput('architecture') || os.arch(); - const updateEnvironment = core.getBooleanInput('update-environment'); - core.startGroup('Installed versions'); - for (const version of versions) { - if (isPyPyVersion(version)) { - const installed = yield finderPyPy.findPyPyVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases); - pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`; - core.info(`Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`); - } - else if (isGraalPyVersion(version)) { - const installed = yield finderGraalPy.findGraalPyVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases); - pythonVersion = `${installed}`; - core.info(`Successfully set up GraalPy ${installed}`); - } - else { - if (version.startsWith('2')) { - core.warning('The support for python 2.7 was removed on June 19, 2023. Related issue: https://github.com/actions/setup-python/issues/672'); - } - const installed = yield finder.useCpythonVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases, freethreaded); - pythonVersion = installed.version; - core.info(`Successfully set up ${installed.impl} (${pythonVersion})`); - } +async function run() { + if (utils_1.IS_MAC) { + process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache'; + } + if (process.env.AGENT_TOOLSDIRECTORY?.trim()) { + process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY']; + } + core.debug(`Python is expected to be installed into ${process.env['RUNNER_TOOL_CACHE']}`); + try { + const versions = resolveVersionInput(); + const checkLatest = core.getBooleanInput('check-latest'); + const allowPreReleases = core.getBooleanInput('allow-prereleases'); + const freethreaded = core.getBooleanInput('freethreaded'); + if (versions.length) { + let pythonVersion = ''; + const arch = core.getInput('architecture') || os.arch(); + const updateEnvironment = core.getBooleanInput('update-environment'); + core.startGroup('Installed versions'); + for (const version of versions) { + if (isPyPyVersion(version)) { + const installed = await finderPyPy.findPyPyVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases); + pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`; + core.info(`Successfully set up PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`); } - core.endGroup(); - const cache = core.getInput('cache'); - if (cache && (0, utils_1.isCacheFeatureAvailable)()) { - yield cacheDependencies(cache, pythonVersion); + else if (isGraalPyVersion(version)) { + const installed = await finderGraalPy.findGraalPyVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases); + pythonVersion = `${installed}`; + core.info(`Successfully set up GraalPy ${installed}`); } - const pipInstall = core.getInput('pip-install'); - if (pipInstall) { - yield installPipPackages(pipInstall); + else { + if (version.startsWith('2')) { + core.warning('The support for python 2.7 was removed on June 19, 2023. Related issue: https://github.com/actions/setup-python/issues/672'); + } + const installed = await finder.useCpythonVersion(version, arch, updateEnvironment, checkLatest, allowPreReleases, freethreaded); + pythonVersion = installed.version; + core.info(`Successfully set up ${installed.impl} (${pythonVersion})`); } } - else { - core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); + core.endGroup(); + const cache = core.getInput('cache'); + if (cache && (0, utils_1.isCacheFeatureAvailable)()) { + await cacheDependencies(cache, pythonVersion); + } + const pipInstall = core.getInput('pip-install'); + if (pipInstall) { + await installPipPackages(pipInstall); } - const matchersPath = path.join(__dirname, '../..', '.github'); - core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); } - catch (err) { - core.setFailed(err.message); + else { + core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); } - }); + const matchersPath = path.join(__dirname, '../..', '.github'); + core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); + } + catch (err) { + core.setFailed(err.message); + } } run(); @@ -98094,27 +98026,48 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; -var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { - function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } - function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } - function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getDownloadFileName = exports.getNextPageUrl = exports.getBinaryDirectory = exports.getVersionInputFromFile = exports.getVersionInputFromPipfileFile = exports.getVersionInputFromToolVersions = exports.getVersionsInputFromPlainFile = exports.getVersionInputFromTomlFile = exports.getOSInfo = exports.getLinuxInfo = exports.logWarning = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_MAC = exports.IS_LINUX = exports.IS_WINDOWS = void 0; +exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_MAC = exports.IS_LINUX = exports.IS_WINDOWS = void 0; +exports.createSymlinkInFolder = createSymlinkInFolder; +exports.validateVersion = validateVersion; +exports.isNightlyKeyword = isNightlyKeyword; +exports.getPyPyVersionFromPath = getPyPyVersionFromPath; +exports.readExactPyPyVersionFile = readExactPyPyVersionFile; +exports.writeExactPyPyVersionFile = writeExactPyPyVersionFile; +exports.validatePythonVersionFormatForPyPy = validatePythonVersionFormatForPyPy; +exports.isGhes = isGhes; +exports.isCacheFeatureAvailable = isCacheFeatureAvailable; +exports.logWarning = logWarning; +exports.getLinuxInfo = getLinuxInfo; +exports.getOSInfo = getOSInfo; +exports.getVersionInputFromTomlFile = getVersionInputFromTomlFile; +exports.getVersionsInputFromPlainFile = getVersionsInputFromPlainFile; +exports.getVersionInputFromToolVersions = getVersionInputFromToolVersions; +exports.getVersionInputFromPipfileFile = getVersionInputFromPipfileFile; +exports.getVersionInputFromFile = getVersionInputFromFile; +exports.getBinaryDirectory = getBinaryDirectory; +exports.getNextPageUrl = getNextPageUrl; +exports.getDownloadFileName = getDownloadFileName; /* eslint no-unsafe-finally: "off" */ const cache = __importStar(__nccwpck_require__(5116)); const core = __importStar(__nccwpck_require__(7484)); @@ -98144,19 +98097,15 @@ function createSymlinkInFolder(folderPath, sourceName, targetName, setExecutable fs_1.default.chmodSync(targetPath, '755'); } } -exports.createSymlinkInFolder = createSymlinkInFolder; function validateVersion(version) { return isNightlyKeyword(version) || Boolean(semver.validRange(version)); } -exports.validateVersion = validateVersion; function isNightlyKeyword(pypyVersion) { return pypyVersion === 'nightly'; } -exports.isNightlyKeyword = isNightlyKeyword; function getPyPyVersionFromPath(installDir) { return path.basename(path.dirname(installDir)); } -exports.getPyPyVersionFromPath = getPyPyVersionFromPath; /** * In tool-cache, we put PyPy to '/PyPy//x64' * There is no easy way to determine what PyPy version is located in specific folder @@ -98173,12 +98122,10 @@ function readExactPyPyVersionFile(installDir) { } return pypyVersion; } -exports.readExactPyPyVersionFile = readExactPyPyVersionFile; function writeExactPyPyVersionFile(installDir, resolvedPyPyVersion) { const pypyFilePath = path.join(installDir, PYPY_VERSION_FILE); fs_1.default.writeFileSync(pypyFilePath, resolvedPyPyVersion); } -exports.writeExactPyPyVersionFile = writeExactPyPyVersionFile; /** * Python version should be specified explicitly like "x.y" (3.10, 3.11, etc) * "3.x" or "3" are not supported @@ -98188,7 +98135,6 @@ function validatePythonVersionFormatForPyPy(version) { const re = /^\d+\.\d+$/; return re.test(version); } -exports.validatePythonVersionFormatForPyPy = validatePythonVersionFormatForPyPy; function isGhes() { const ghUrl = new URL(process.env['GITHUB_SERVER_URL'] || 'https://github.com'); const hostname = ghUrl.hostname.trimEnd().toUpperCase(); @@ -98197,7 +98143,6 @@ function isGhes() { const isLocalHost = hostname.endsWith('.LOCALHOST'); return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost; } -exports.isGhes = isGhes; function isCacheFeatureAvailable() { if (cache.isFeatureAvailable()) { return true; @@ -98209,65 +98154,53 @@ function isCacheFeatureAvailable() { core.warning('The runner was not able to contact the cache service. Caching will be skipped'); return false; } -exports.isCacheFeatureAvailable = isCacheFeatureAvailable; function logWarning(message) { const warningPrefix = '[warning]'; core.info(`${warningPrefix}${message}`); } -exports.logWarning = logWarning; -function getWindowsInfo() { - return __awaiter(this, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { - silent: true - }); - const windowsVersion = stdout.trim().split(' ')[3]; - return { osName: 'Windows', osVersion: windowsVersion }; +async function getWindowsInfo() { + const { stdout } = await exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', undefined, { + silent: true }); + const windowsVersion = stdout.trim().split(' ')[3]; + return { osName: 'Windows', osVersion: windowsVersion }; } -function getMacOSInfo() { - return __awaiter(this, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('sw_vers', ['-productVersion'], { - silent: true - }); - const macOSVersion = stdout.trim(); - return { osName: 'macOS', osVersion: macOSVersion }; +async function getMacOSInfo() { + const { stdout } = await exec.getExecOutput('sw_vers', ['-productVersion'], { + silent: true }); + const macOSVersion = stdout.trim(); + return { osName: 'macOS', osVersion: macOSVersion }; } -function getLinuxInfo() { - return __awaiter(this, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { - silent: true - }); - const [osName, osVersion] = stdout.trim().split('\n'); - core.debug(`OS Name: ${osName}, Version: ${osVersion}`); - return { osName: osName, osVersion: osVersion }; +async function getLinuxInfo() { + const { stdout } = await exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], { + silent: true }); + const [osName, osVersion] = stdout.trim().split('\n'); + core.debug(`OS Name: ${osName}, Version: ${osVersion}`); + return { osName: osName, osVersion: osVersion }; } -exports.getLinuxInfo = getLinuxInfo; -function getOSInfo() { - return __awaiter(this, void 0, void 0, function* () { - let osInfo; - try { - if (exports.IS_WINDOWS) { - osInfo = yield getWindowsInfo(); - } - else if (exports.IS_LINUX) { - osInfo = yield getLinuxInfo(); - } - else if (exports.IS_MAC) { - osInfo = yield getMacOSInfo(); - } +async function getOSInfo() { + let osInfo; + try { + if (exports.IS_WINDOWS) { + osInfo = await getWindowsInfo(); } - catch (err) { - const error = err; - core.debug(error.message); + else if (exports.IS_LINUX) { + osInfo = await getLinuxInfo(); } - finally { - return osInfo; + else if (exports.IS_MAC) { + osInfo = await getMacOSInfo(); } - }); + } + catch (err) { + const error = err; + core.debug(error.message); + } + finally { + return osInfo; + } } -exports.getOSInfo = getOSInfo; /** * Extract a value from an object by following the keys path provided. * If the value is present, it is returned. Otherwise undefined is returned. @@ -98326,7 +98259,6 @@ function getVersionInputFromTomlFile(versionFile) { }); return validatedVersions; } -exports.getVersionInputFromTomlFile = getVersionInputFromTomlFile; /** * Python versions extracted from a plain text file. * - Resolves multiple versions from multiple lines. @@ -98351,12 +98283,10 @@ function getVersionsInputFromPlainFile(versionFile) { core.info(`Resolved ${versionFile} as ${versions.join(', ')}`); return versions; } -exports.getVersionsInputFromPlainFile = getVersionsInputFromPlainFile; /** * Python version extracted from a .tool-versions file. */ function getVersionInputFromToolVersions(versionFile) { - var _a; if (!fs_1.default.existsSync(versionFile)) { core.warning(`File ${versionFile} does not exist.`); return []; @@ -98371,7 +98301,7 @@ function getVersionInputFromToolVersions(versionFile) { } const match = line.match(/^\s*python\s*v?\s*(?[^\s]+)\s*$/); if (match) { - return [((_a = match.groups) === null || _a === void 0 ? void 0 : _a.version.trim()) || '']; + return [match.groups?.version.trim() || '']; } } core.warning(`No Python version found in ${versionFile}`); @@ -98382,7 +98312,6 @@ function getVersionInputFromToolVersions(versionFile) { return []; } } -exports.getVersionInputFromToolVersions = getVersionInputFromToolVersions; /** * Python version extracted from the Pipfile file. */ @@ -98416,7 +98345,6 @@ function getVersionInputFromPipfileFile(versionFile) { core.info(`Extracted ${versions} from ${versionFile}`); return versions; } -exports.getVersionInputFromPipfileFile = getVersionInputFromPipfileFile; /** * Python version extracted from a plain, .tool-versions, Pipfile or TOML file. */ @@ -98434,7 +98362,6 @@ function getVersionInputFromFile(versionFile) { return getVersionsInputFromPlainFile(versionFile); } } -exports.getVersionInputFromFile = getVersionInputFromFile; /** * Get the directory containing interpreter binary from installation directory of PyPy or GraalPy * - On Linux and macOS, the Python interpreter is in 'bin'. @@ -98443,7 +98370,6 @@ exports.getVersionInputFromFile = getVersionInputFromFile; function getBinaryDirectory(installDir) { return exports.IS_WINDOWS ? installDir : path.join(installDir, 'bin'); } -exports.getBinaryDirectory = getBinaryDirectory; /** * Extract next page URL from a HTTP response "link" header. Such headers are used in GitHub APIs. */ @@ -98465,7 +98391,6 @@ function getNextPageUrl(response) { } return null; } -exports.getNextPageUrl = getNextPageUrl; /** * Add temporary fix for Windows * On Windows, it is necessary to retain the .zip extension for proper extraction. @@ -98479,7 +98404,6 @@ function getDownloadFileName(downloadUrl) { ? path.join(tempDir, path.basename(downloadUrl)) : undefined; } -exports.getDownloadFileName = getDownloadFileName; /***/ }), diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index 5cd86e61..11bc6147 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -18,7 +18,7 @@ - [Hosted tool cache](advanced-usage.md#hosted-tool-cache) - [Using `setup-python` with a self-hosted runner](advanced-usage.md#using-setup-python-with-a-self-hosted-runner) - [Windows](advanced-usage.md#windows) - - [Linux](advanced-usage.md#linux) + - [Ubuntu](advanced-usage.md#Ubuntu) - [macOS](advanced-usage.md#macos) - [Using `setup-python` on GHES](advanced-usage.md#using-setup-python-on-ghes) - [Allow pre-releases](advanced-usage.md#allow-pre-releases) @@ -578,9 +578,9 @@ If you have a supported self-hosted runner and you would like to use `setup-pyth >If you are experiencing problems while configuring Python on your self-hosted runner, turn on [step debugging](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) to see additional logs. -### Linux +### Ubuntu -By default, the runner downloads and installs tools into the folder set up by `RUNNER_TOOL_CACHE` environment variable. The environment variable called `AGENT_TOOLSDIRECTORY` can be set to change this location for Linux self-hosted runners: +By default, the runner downloads and installs tools into the folder set up by `RUNNER_TOOL_CACHE` environment variable. The environment variable called `AGENT_TOOLSDIRECTORY` can be set to change this location for Ubuntu self-hosted runners: - In the same shell that your runner is using, type `export AGENT_TOOLSDIRECTORY=/path/to/folder`. - More permanent way of setting the environment variable is to create an `.env` file in the same directory as your runner and to add `AGENT_TOOLSDIRECTORY=/path/to/folder`. This ensures the variable is always set if your runner is configured as a service. diff --git a/package-lock.json b/package-lock.json index f44ab616..20362f58 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,7 +34,7 @@ "jest-circus": "^29.7.0", "prettier": "^3.5.3", "ts-jest": "^29.3.2", - "typescript": "^5.4.2" + "typescript": "^5.9.3" }, "engines": { "node": ">=24.0.0" @@ -5446,10 +5446,11 @@ } }, "node_modules/typescript": { - "version": "5.4.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", - "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index f97190da..3383f219 100644 --- a/package.json +++ b/package.json @@ -53,6 +53,6 @@ "jest-circus": "^29.7.0", "prettier": "^3.5.3", "ts-jest": "^29.3.2", - "typescript": "^5.4.2" + "typescript": "^5.9.3" } } diff --git a/tsconfig.json b/tsconfig.json index d780193f..44478618 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ + "target": "ES2022", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ From cfd55ca82492758d853442341ad4d8010466803a Mon Sep 17 00:00:00 2001 From: Tim Felgentreff Date: Wed, 22 Oct 2025 18:16:57 +0200 Subject: [PATCH 18/19] graalpy: add graalpy early-access and windows builds (#880) --- .github/workflows/test-graalpy.yml | 2 +- __tests__/data/graalpy.json | 1656 +++++++++++++--------------- __tests__/find-graalpy.test.ts | 15 +- __tests__/install-graalpy.test.ts | 43 +- dist/setup/index.js | 36 +- src/find-graalpy.ts | 14 +- src/install-graalpy.ts | 35 +- src/utils.ts | 2 +- 8 files changed, 878 insertions(+), 925 deletions(-) diff --git a/.github/workflows/test-graalpy.yml b/.github/workflows/test-graalpy.yml index eabe0b38..f76d3001 100644 --- a/.github/workflows/test-graalpy.yml +++ b/.github/workflows/test-graalpy.yml @@ -106,7 +106,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, macos-13] + os: [ubuntu-latest, windows-latest, macos-latest, macos-13] steps: - uses: actions/checkout@v5 - name: Setup GraalPy and check latest diff --git a/__tests__/data/graalpy.json b/__tests__/data/graalpy.json index b753d713..f6e28997 100644 --- a/__tests__/data/graalpy.json +++ b/__tests__/data/graalpy.json @@ -1,872 +1,4 @@ [ - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/108323629", - "assets_url": "https://api.github.com/repos/oracle/graalpython/releases/108323629/assets", - "upload_url": "https://uploads.github.com/repos/oracle/graalpython/releases/108323629/assets{?name,label}", - "html_url": "https://github.com/oracle/graalpython/releases/tag/graal-23.1.0a1", - "id": 108323629, - "author": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "node_id": "RE_kwDOB73d0M4GdOMt", - "tag_name": "graal-23.1.0a1", - "target_commitish": "master", - "name": "GraalPy - GraalVm Community 23.1.0a1", - "draft": false, - "prerelease": false, - "created_at": "2023-06-06T22:30:49Z", - "published_at": "2023-06-13T15:04:15Z", - "assets": [ - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510243", - "id": 112510243, - "node_id": "RA_kwDOB73d0M4GtMUj", - "name": "graalpython-23.1.0a1-linux-aarch64.tar.gz", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 208285038, - "download_count": 3, - "created_at": "2023-06-13T07:29:25Z", - "updated_at": "2023-06-13T07:29:38Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-linux-aarch64.tar.gz" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510610", - "id": 112510610, - "node_id": "RA_kwDOB73d0M4GtMaS", - "name": "graalpython-23.1.0a1-linux-aarch64.tar.gz.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 3, - "created_at": "2023-06-13T07:32:07Z", - "updated_at": "2023-06-13T07:32:07Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-linux-aarch64.tar.gz.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510269", - "id": 112510269, - "node_id": "RA_kwDOB73d0M4GtMU9", - "name": "graalpython-23.1.0a1-linux-amd64.tar.gz", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 213747624, - "download_count": 86, - "created_at": "2023-06-13T07:29:38Z", - "updated_at": "2023-06-13T07:29:53Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-linux-amd64.tar.gz" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510612", - "id": 112510612, - "node_id": "RA_kwDOB73d0M4GtMaU", - "name": "graalpython-23.1.0a1-linux-amd64.tar.gz.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 5, - "created_at": "2023-06-13T07:32:08Z", - "updated_at": "2023-06-13T07:32:08Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-linux-amd64.tar.gz.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510291", - "id": 112510291, - "node_id": "RA_kwDOB73d0M4GtMVT", - "name": "graalpython-23.1.0a1-macos-aarch64.tar.gz", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 217696547, - "download_count": 13, - "created_at": "2023-06-13T07:29:54Z", - "updated_at": "2023-06-13T07:30:17Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-macos-aarch64.tar.gz" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510615", - "id": 112510615, - "node_id": "RA_kwDOB73d0M4GtMaX", - "name": "graalpython-23.1.0a1-macos-aarch64.tar.gz.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 3, - "created_at": "2023-06-13T07:32:09Z", - "updated_at": "2023-06-13T07:32:09Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-macos-aarch64.tar.gz.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510352", - "id": 112510352, - "node_id": "RA_kwDOB73d0M4GtMWQ", - "name": "graalpython-23.1.0a1-macos-amd64.tar.gz", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 227762432, - "download_count": 11, - "created_at": "2023-06-13T07:30:17Z", - "updated_at": "2023-06-13T07:30:31Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-macos-amd64.tar.gz" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510616", - "id": 112510616, - "node_id": "RA_kwDOB73d0M4GtMaY", - "name": "graalpython-23.1.0a1-macos-amd64.tar.gz.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 3, - "created_at": "2023-06-13T07:32:09Z", - "updated_at": "2023-06-13T07:32:10Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-macos-amd64.tar.gz.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510387", - "id": 112510387, - "node_id": "RA_kwDOB73d0M4GtMWz", - "name": "python-installable-svm-java17-darwin-aarch64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 151774852, - "download_count": 8, - "created_at": "2023-06-13T07:30:31Z", - "updated_at": "2023-06-13T07:30:46Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-darwin-aarch64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510618", - "id": 112510618, - "node_id": "RA_kwDOB73d0M4GtMaa", - "name": "python-installable-svm-java17-darwin-aarch64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:10Z", - "updated_at": "2023-06-13T07:32:10Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-darwin-aarch64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510423", - "id": 112510423, - "node_id": "RA_kwDOB73d0M4GtMXX", - "name": "python-installable-svm-java17-darwin-amd64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 155958615, - "download_count": 9, - "created_at": "2023-06-13T07:30:46Z", - "updated_at": "2023-06-13T07:30:56Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-darwin-amd64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510621", - "id": 112510621, - "node_id": "RA_kwDOB73d0M4GtMad", - "name": "python-installable-svm-java17-darwin-amd64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:11Z", - "updated_at": "2023-06-13T07:32:11Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-darwin-amd64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510439", - "id": 112510439, - "node_id": "RA_kwDOB73d0M4GtMXn", - "name": "python-installable-svm-java17-linux-aarch64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 149559953, - "download_count": 7, - "created_at": "2023-06-13T07:30:57Z", - "updated_at": "2023-06-13T07:31:09Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-linux-aarch64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510623", - "id": 112510623, - "node_id": "RA_kwDOB73d0M4GtMaf", - "name": "python-installable-svm-java17-linux-aarch64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:12Z", - "updated_at": "2023-06-13T07:32:12Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-linux-aarch64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510482", - "id": 112510482, - "node_id": "RA_kwDOB73d0M4GtMYS", - "name": "python-installable-svm-java17-linux-amd64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 153700590, - "download_count": 50, - "created_at": "2023-06-13T07:31:10Z", - "updated_at": "2023-06-13T07:31:20Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-linux-amd64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510639", - "id": 112510639, - "node_id": "RA_kwDOB73d0M4GtMav", - "name": "python-installable-svm-java17-linux-amd64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:12Z", - "updated_at": "2023-06-13T07:32:13Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java17-linux-amd64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510502", - "id": 112510502, - "node_id": "RA_kwDOB73d0M4GtMYm", - "name": "python-installable-svm-java20-darwin-aarch64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 152397687, - "download_count": 12, - "created_at": "2023-06-13T07:31:21Z", - "updated_at": "2023-06-13T07:31:33Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-darwin-aarch64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510644", - "id": 112510644, - "node_id": "RA_kwDOB73d0M4GtMa0", - "name": "python-installable-svm-java20-darwin-aarch64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:13Z", - "updated_at": "2023-06-13T07:32:13Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-darwin-aarch64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510532", - "id": 112510532, - "node_id": "RA_kwDOB73d0M4GtMZE", - "name": "python-installable-svm-java20-darwin-amd64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 156585204, - "download_count": 12, - "created_at": "2023-06-13T07:31:34Z", - "updated_at": "2023-06-13T07:31:44Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-darwin-amd64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510646", - "id": 112510646, - "node_id": "RA_kwDOB73d0M4GtMa2", - "name": "python-installable-svm-java20-darwin-amd64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:14Z", - "updated_at": "2023-06-13T07:32:14Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-darwin-amd64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510561", - "id": 112510561, - "node_id": "RA_kwDOB73d0M4GtMZh", - "name": "python-installable-svm-java20-linux-aarch64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 150007420, - "download_count": 7, - "created_at": "2023-06-13T07:31:45Z", - "updated_at": "2023-06-13T07:31:56Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-linux-aarch64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510651", - "id": 112510651, - "node_id": "RA_kwDOB73d0M4GtMa7", - "name": "python-installable-svm-java20-linux-aarch64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:14Z", - "updated_at": "2023-06-13T07:32:14Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-linux-aarch64-23.1.0a1.jar.sha256" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510584", - "id": 112510584, - "node_id": "RA_kwDOB73d0M4GtMZ4", - "name": "python-installable-svm-java20-linux-amd64-23.1.0a1.jar", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 154254267, - "download_count": 29, - "created_at": "2023-06-13T07:31:56Z", - "updated_at": "2023-06-13T07:32:07Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-linux-amd64-23.1.0a1.jar" - }, - { - "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510654", - "id": 112510654, - "node_id": "RA_kwDOB73d0M4GtMa-", - "name": "python-installable-svm-java20-linux-amd64-23.1.0a1.jar.sha256", - "label": "", - "uploader": { - "login": "ezzarghili", - "id": 8616968, - "node_id": "MDQ6VXNlcjg2MTY5Njg=", - "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/ezzarghili", - "html_url": "https://github.com/ezzarghili", - "followers_url": "https://api.github.com/users/ezzarghili/followers", - "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", - "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", - "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", - "organizations_url": "https://api.github.com/users/ezzarghili/orgs", - "repos_url": "https://api.github.com/users/ezzarghili/repos", - "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", - "received_events_url": "https://api.github.com/users/ezzarghili/received_events", - "type": "User", - "site_admin": false - }, - "content_type": "application/binary", - "state": "uploaded", - "size": 64, - "download_count": 2, - "created_at": "2023-06-13T07:32:15Z", - "updated_at": "2023-06-13T07:32:15Z", - "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/python-installable-svm-java20-linux-amd64-23.1.0a1.jar.sha256" - } - ], - "tarball_url": "https://api.github.com/repos/oracle/graalpython/tarball/graal-23.1.0a1", - "zipball_url": "https://api.github.com/repos/oracle/graalpython/zipball/graal-23.1.0a1", - "body": "This is a Python 3.10 implementation on top of GraalVM. Currently, it is under development and as such, it is not ready for any production use beyond simple usecases and scripting. The main focus of development right now is to get NumPy, SciPy and related libraries working.\r\n\r\nThe Python language component can be added to GraalVM using the `gu` utility.\r\n\r\nMore information is available on the GraalVM website: http://www.graalvm.org/reference-manual/python/\r\n", - "reactions": { - "url": "https://api.github.com/repos/oracle/graalpython/releases/108323629/reactions", - "total_count": 2, - "+1": 0, - "-1": 0, - "laugh": 0, - "hooray": 0, - "confused": 0, - "heart": 0, - "rocket": 2, - "eyes": 0 - } - }, { "url": "https://api.github.com/repos/oracle/graalpython/releases/108323629", "assets_url": "https://api.github.com/repos/oracle/graalpython/releases/108323629/assets", @@ -936,6 +68,40 @@ "updated_at": "2023-06-13T07:29:38Z", "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.0.0/graalpython-23.0.0-linux-aarch64.tar.gz" }, + { + "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510243", + "id": 112510243, + "node_id": "RA_kwDOB73d0M4GtMUj", + "name": "graalpython-23.0.0-windows-amd64.zip", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 208285038, + "download_count": 3, + "created_at": "2023-06-13T07:29:25Z", + "updated_at": "2023-06-13T07:29:38Z", + "browser_download_url": "https://github.com/oracle/graalpython/releases/download/graal-23.0.0/graalpython-23.0.0-windows-amd64.zip" + }, { "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/112510610", "id": 112510610, @@ -5382,6 +4548,40 @@ "created_at": "2021-10-16T22:00:22Z", "published_at": "2021-10-19T14:21:48Z", "assets": [ + { + "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/47332770", + "id": 47332770, + "node_id": "RA_kwDOB73d0M4C0j2i", + "name": "graalpython-21.3.0-windows-amd64.zip", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 164083526, + "download_count": 74, + "created_at": "2021-10-19T08:37:05Z", + "updated_at": "2021-10-19T08:37:36Z", + "browser_download_url": "https://github.com/oracle/graalpython/releases/download/vm-21.3.0/graalpython-21.3.0-windows-amd64.zip" + }, { "url": "https://api.github.com/repos/oracle/graalpython/releases/assets/47332770", "id": 47332770, @@ -5794,5 +4994,725 @@ "tarball_url": "https://api.github.com/repos/oracle/graalpython/tarball/vm-21.3.0", "zipball_url": "https://api.github.com/repos/oracle/graalpython/zipball/vm-21.3.0", "body": "This is a Python 3.8.5 implementation on top of GraalVM. Currently, it is under development and as such, it is not ready for any production use beyond simple usecases and scripting. The main focus of development right now is to get NumPy, SciPy and related libraries working.\r\n\r\nThe Python language component can be added to GraalVM using the `gu` utility.\r\n\r\nMore information is available on the GraalVM website: http://www.graalvm.org/reference-manual/python/\r\n" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/155409803", + "assets_url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/155409803/assets", + "upload_url": "https://uploads.github.com/repos/graalvm/graal-languages-ea-builds/releases/155409803/assets{?name,label}", + "html_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/tag/graalpy-24.1.0-ea.09", + "id": 155409803, + "author": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "node_id": "RE_kwDOLY7PkM4JQ12L", + "tag_name": "graalpy-24.1.0-ea.09", + "target_commitish": "main", + "name": "GraalPy - early access build - 24.1.0-ea.09", + "draft": false, + "prerelease": true, + "created_at": "2024-04-25T07:44:54Z", + "published_at": "2024-05-12T20:16:41Z", + "assets": [ + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503202", + "id": 167503202, + "node_id": "RA_kwDOLY7PkM4J--Vi", + "name": "graalpy-24.1.0-ea.09-linux-aarch64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 356399017, + "download_count": 9, + "created_at": "2024-05-12T20:05:31Z", + "updated_at": "2024-05-12T20:05:57Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-aarch64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503836", + "id": 167503836, + "node_id": "RA_kwDOLY7PkM4J--fc", + "name": "graalpy-24.1.0-ea.09-linux-aarch64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:15Z", + "updated_at": "2024-05-12T20:10:15Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-aarch64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503279", + "id": 167503279, + "node_id": "RA_kwDOLY7PkM4J--Wv", + "name": "graalpy-24.1.0-ea.09-linux-amd64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 359705071, + "download_count": 9, + "created_at": "2024-05-12T20:05:57Z", + "updated_at": "2024-05-12T20:06:18Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-amd64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503840", + "id": 167503840, + "node_id": "RA_kwDOLY7PkM4J--fg", + "name": "graalpy-24.1.0-ea.09-linux-amd64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:16Z", + "updated_at": "2024-05-12T20:10:16Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-amd64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503330", + "id": 167503330, + "node_id": "RA_kwDOLY7PkM4J--Xi", + "name": "graalpy-24.1.0-ea.09-macos-aarch64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 341242552, + "download_count": 9, + "created_at": "2024-05-12T20:06:19Z", + "updated_at": "2024-05-12T20:07:00Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-aarch64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503842", + "id": 167503842, + "node_id": "RA_kwDOLY7PkM4J--fi", + "name": "graalpy-24.1.0-ea.09-macos-aarch64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:16Z", + "updated_at": "2024-05-12T20:10:17Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-aarch64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503434", + "id": 167503434, + "node_id": "RA_kwDOLY7PkM4J--ZK", + "name": "graalpy-24.1.0-ea.09-macos-amd64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 342281282, + "download_count": 9, + "created_at": "2024-05-12T20:07:00Z", + "updated_at": "2024-05-12T20:07:20Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-amd64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503844", + "id": 167503844, + "node_id": "RA_kwDOLY7PkM4J--fk", + "name": "graalpy-24.1.0-ea.09-macos-amd64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:17Z", + "updated_at": "2024-05-12T20:10:17Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-amd64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503451", + "id": 167503451, + "node_id": "RA_kwDOLY7PkM4J--Zb", + "name": "graalpy-24.1.0-ea.09-windows-amd64.zip", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/zip", + "state": "uploaded", + "size": 606942068, + "download_count": 9, + "created_at": "2024-05-12T20:07:20Z", + "updated_at": "2024-05-12T20:07:57Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-windows-amd64.zip" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503847", + "id": 167503847, + "node_id": "RA_kwDOLY7PkM4J--fn", + "name": "graalpy-24.1.0-ea.09-windows-amd64.zip.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:18Z", + "updated_at": "2024-05-12T20:10:18Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-windows-amd64.zip.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503494", + "id": 167503494, + "node_id": "RA_kwDOLY7PkM4J--aG", + "name": "graalpy-jvm-24.1.0-ea.09-linux-aarch64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 404689619, + "download_count": 9, + "created_at": "2024-05-12T20:07:57Z", + "updated_at": "2024-05-12T20:08:23Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-aarch64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503849", + "id": 167503849, + "node_id": "RA_kwDOLY7PkM4J--fp", + "name": "graalpy-jvm-24.1.0-ea.09-linux-aarch64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:18Z", + "updated_at": "2024-05-12T20:10:19Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-aarch64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503631", + "id": 167503631, + "node_id": "RA_kwDOLY7PkM4J--cP", + "name": "graalpy-jvm-24.1.0-ea.09-linux-amd64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 407319499, + "download_count": 9, + "created_at": "2024-05-12T20:08:24Z", + "updated_at": "2024-05-12T20:08:49Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-amd64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503850", + "id": 167503850, + "node_id": "RA_kwDOLY7PkM4J--fq", + "name": "graalpy-jvm-24.1.0-ea.09-linux-amd64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:19Z", + "updated_at": "2024-05-12T20:10:19Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-amd64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503685", + "id": 167503685, + "node_id": "RA_kwDOLY7PkM4J--dF", + "name": "graalpy-jvm-24.1.0-ea.09-macos-aarch64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 391600854, + "download_count": 9, + "created_at": "2024-05-12T20:08:49Z", + "updated_at": "2024-05-12T20:09:13Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-aarch64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503852", + "id": 167503852, + "node_id": "RA_kwDOLY7PkM4J--fs", + "name": "graalpy-jvm-24.1.0-ea.09-macos-aarch64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:19Z", + "updated_at": "2024-05-12T20:10:20Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-aarch64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503723", + "id": 167503723, + "node_id": "RA_kwDOLY7PkM4J--dr", + "name": "graalpy-jvm-24.1.0-ea.09-macos-amd64.tar.gz", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 392140765, + "download_count": 9, + "created_at": "2024-05-12T20:09:14Z", + "updated_at": "2024-05-12T20:09:37Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-amd64.tar.gz" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503854", + "id": 167503854, + "node_id": "RA_kwDOLY7PkM4J--fu", + "name": "graalpy-jvm-24.1.0-ea.09-macos-amd64.tar.gz.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:20Z", + "updated_at": "2024-05-12T20:10:20Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-amd64.tar.gz.sha256" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503758", + "id": 167503758, + "node_id": "RA_kwDOLY7PkM4J--eO", + "name": "graalpy-jvm-24.1.0-ea.09-windows-amd64.zip", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/zip", + "state": "uploaded", + "size": 656623535, + "download_count": 9, + "created_at": "2024-05-12T20:09:38Z", + "updated_at": "2024-05-12T20:10:15Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-windows-amd64.zip" + }, + { + "url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases/assets/167503856", + "id": 167503856, + "node_id": "RA_kwDOLY7PkM4J--fw", + "name": "graalpy-jvm-24.1.0-ea.09-windows-amd64.zip.sha256", + "label": "", + "uploader": { + "login": "ezzarghili", + "id": 8616968, + "node_id": "MDQ6VXNlcjg2MTY5Njg=", + "avatar_url": "https://avatars.githubusercontent.com/u/8616968?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/ezzarghili", + "html_url": "https://github.com/ezzarghili", + "followers_url": "https://api.github.com/users/ezzarghili/followers", + "following_url": "https://api.github.com/users/ezzarghili/following{/other_user}", + "gists_url": "https://api.github.com/users/ezzarghili/gists{/gist_id}", + "starred_url": "https://api.github.com/users/ezzarghili/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/ezzarghili/subscriptions", + "organizations_url": "https://api.github.com/users/ezzarghili/orgs", + "repos_url": "https://api.github.com/users/ezzarghili/repos", + "events_url": "https://api.github.com/users/ezzarghili/events{/privacy}", + "received_events_url": "https://api.github.com/users/ezzarghili/received_events", + "type": "User", + "site_admin": false + }, + "content_type": "application/binary", + "state": "uploaded", + "size": 64, + "download_count": 8, + "created_at": "2024-05-12T20:10:21Z", + "updated_at": "2024-05-12T20:10:21Z", + "browser_download_url": "https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-windows-amd64.zip.sha256" + } + ], + "tarball_url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/tarball/graalpy-24.1.0-ea.09", + "zipball_url": "https://api.github.com/repos/graalvm/graal-languages-ea-builds/zipball/graalpy-24.1.0-ea.09", + "body": "GraalPy is a high-performance implementation of the python programming language.\r\nMore information is available on the website: http://www.graalvm.org/python/\r\nGraalPy comes in two standalone modes, `native` and `jvm` for Oracle GraalVM.\r\nSee [the documentation](https://github.com/oracle/graalpy/blob/master/doc/user/installing-graalpy.md) for which asset corresponds to what.\r\n\r\n**Disclaimer**:\r\n\r\n> This is a daily development build of the Oracle product and is offered to you as part of the development and testing process. Oracle does not recommend bundling this build with your products or otherwise using for any production purpose. This build is offered to and received by you solely under the GraalVM Free Terms and Conditions (GFTC), and is not governed by any other license between you and Oracle, including without limitation the Oracle Master Agreement. The features and functionality of the product are subject to change at any time and the existence of any features or functionality in this build should not be relied upon in making purchasing decisions. The existence of particular features or functionality in this build is not a commitment to deliver any hardware, software or other material, or code, or functionality, and you should not rely on the future availability of any feature or functionality in the product. The development, release, and timing of any features or functionality for this product remain at the sole discretion of Oracle. In the event you decide to provide any input to Oracle regarding the product, you acknowledge that Oracle may use that input for any purpose, including but not limited to incorporation or implementation of the input in any Oracle product or service, and the display, marketing, sublicensing and distribution of the input as incorporated or embedded in any product or service distributed or offered by Oracle.\r\n\r\n\r\nHere are the convenience links GraalPy standalones:\r\n\r\n| Platform | Native | JVM |\r\n|----------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------|\r\n| Linux (amd64) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-amd64.tar.gz) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-amd64.tar.gz) |\r\n| Linux (aarch64) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-linux-aarch64.tar.gz) |[:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-linux-aarch64.tar.gz) |\r\n| macOS (amd64) * | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-amd64.tar.gz) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-amd64.tar.gz) |\r\n| macOS (aarch64) * | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-macos-aarch64.tar.gz) |[:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-macos-aarch64.tar.gz) |\r\n| Windows (amd64) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-windows-amd64.tar.gz) | [:arrow_down: download](https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-jvm-24.1.0-ea.09-windows-amd64.tar.gz) |\r\n\r\nBased on GraalVM commit: oracle/graal@d719a133492c71209ded8121341ffdabdc2b8b66\r\nUsing GraalPy: oracle/graalpython@7ff89fe0f0b3833d869da4f3cce199705adc2571\r\n\r\n\\* If you are using **macOS Catalina** and **later** you may need to remove the quarantine attribute from the bits before you can use them. To do this, run the following:\r\n```\r\n$ sudo xattr -r -d com.apple.quarantine path/to/graalpy\r\n```\r\n" } ] diff --git a/__tests__/find-graalpy.test.ts b/__tests__/find-graalpy.test.ts index 8eaf3b4f..0d287bef 100644 --- a/__tests__/find-graalpy.test.ts +++ b/__tests__/find-graalpy.test.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as semver from 'semver'; import * as finder from '../src/find-graalpy'; -import {IGraalPyManifestRelease, IS_WINDOWS} from '../src/utils'; +import {IGraalPyManifestRelease} from '../src/utils'; import manifestData from './data/graalpy.json'; @@ -19,9 +19,6 @@ const architecture = 'x64'; const toolDir = path.join(__dirname, 'runner', 'tools'); const tempDir = path.join(__dirname, 'runner', 'temp'); -/* GraalPy doesn't have a windows release yet */ -const describeSkipOnWindows = IS_WINDOWS ? describe.skip : describe; - describe('parseGraalPyVersion', () => { it.each([ ['graalpy-23', '23'], @@ -108,7 +105,7 @@ describe('findGraalPyToolCache', () => { }); }); -describeSkipOnWindows('findGraalPyVersion', () => { +describe('findGraalPyVersion', () => { let getBooleanInputSpy: jest.SpyInstance; let warningSpy: jest.SpyInstance; let debugSpy: jest.SpyInstance; @@ -358,13 +355,13 @@ describeSkipOnWindows('findGraalPyVersion', () => { it('found and install successfully, pre-release fallback', async () => { spyCacheDir = jest.spyOn(tc, 'cacheDir'); spyCacheDir.mockImplementation(() => - path.join(toolDir, 'GraalPy', '23.1', architecture) + path.join(toolDir, 'GraalPy', '24.1', architecture) ); spyChmodSync = jest.spyOn(fs, 'chmodSync'); spyChmodSync.mockImplementation(() => undefined); await expect( finder.findGraalPyVersion( - 'graalpy23.1', + 'graalpy24.1', architecture, false, false, @@ -372,7 +369,7 @@ describeSkipOnWindows('findGraalPyVersion', () => { ) ).rejects.toThrow(); await expect( - finder.findGraalPyVersion('graalpy23.1', architecture, false, false, true) - ).resolves.toEqual('23.1.0-a.1'); + finder.findGraalPyVersion('graalpy24.1', architecture, false, false, true) + ).resolves.toEqual('24.1.0-ea.9'); }); }); diff --git a/__tests__/install-graalpy.test.ts b/__tests__/install-graalpy.test.ts index 45769f64..fda3348f 100644 --- a/__tests__/install-graalpy.test.ts +++ b/__tests__/install-graalpy.test.ts @@ -21,24 +21,21 @@ const architecture = 'x64'; const toolDir = path.join(__dirname, 'runner', 'tools'); const tempDir = path.join(__dirname, 'runner', 'temp'); -/* GraalPy doesn't have a windows release yet */ -const describeSkipOnWindows = IS_WINDOWS ? describe.skip : describe; - describe('graalpyVersionToSemantic', () => { it.each([ - ['23.0.0a1', '23.0.0a1'], - ['23.0.0', '23.0.0'], - ['23.0.x', '23.0.x'], - ['23.x', '23.x'] + ['graalpy-24.1.0-ea.09', '24.1.0-ea.9'], + ['graal-23.0.0', '23.0.0'], + ['vm-23.0.x', '23.0.x'], + ['graal-23.x', '23.x'] ])('%s -> %s', (input, expected) => { expect(installer.graalPyTagToVersion(input)).toEqual(expected); }); }); -describeSkipOnWindows('findRelease', () => { +describe('findRelease', () => { const result = JSON.stringify(manifestData); const releases = JSON.parse(result) as IGraalPyManifestRelease[]; - const extension = 'tar.gz'; + const extension = IS_WINDOWS ? 'zip' : 'tar.gz'; const arch = installer.toGraalPyArchitecture(architecture); const platform = installer.toGraalPyPlatform(process.platform); const extensionName = `${platform}-${arch}.${extension}`; @@ -47,8 +44,8 @@ describeSkipOnWindows('findRelease', () => { browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.0.0/graalpython-23.0.0-${extensionName}` }; const filesRC1: IGraalPyManifestAsset = { - name: `graalpython-23.1.0a1-${extensionName}`, - browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-${extensionName}` + name: `graalpy-24.1.0-ea.09-${extensionName}`, + browser_download_url: `https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-${extensionName}` }; let warningSpy: jest.SpyInstance; @@ -84,15 +81,15 @@ describeSkipOnWindows('findRelease', () => { }); it('Preview version of GraalPy is found', () => { - const graalpyVersion = installer.graalPyTagToVersion('vm-23.1.0a1'); + const graalpyVersion = installer.graalPyTagToVersion('vm-24.1.0-ea.09'); expect( installer.findRelease(releases, graalpyVersion, architecture, false) ).toMatchObject({ foundAsset: { - name: `graalpython-23.1.0a1-${extensionName}`, - browser_download_url: `https://github.com/oracle/graalpython/releases/download/graal-23.1.0a1/graalpython-23.1.0a1-${extensionName}` + name: `graalpy-24.1.0-ea.09-${extensionName}`, + browser_download_url: `https://github.com/graalvm/graal-languages-ea-builds/releases/download/graalpy-24.1.0-ea.09/graalpy-24.1.0-ea.09-${extensionName}` }, - resolvedGraalPyVersion: '23.1.0-a.1' + resolvedGraalPyVersion: '24.1.0-ea.9' }); }); @@ -107,7 +104,7 @@ describeSkipOnWindows('findRelease', () => { }); it('GraalPy version matches semver (pre-release)', () => { - const graalpyVersion = '23.1.x'; + const graalpyVersion = '24.1.x'; expect( installer.findRelease(releases, graalpyVersion, architecture, false) ).toBeNull(); @@ -115,12 +112,12 @@ describeSkipOnWindows('findRelease', () => { installer.findRelease(releases, graalpyVersion, architecture, true) ).toMatchObject({ foundAsset: filesRC1, - resolvedGraalPyVersion: '23.1.0-a.1' + resolvedGraalPyVersion: '24.1.0-ea.9' }); }); }); -describeSkipOnWindows('installGraalPy', () => { +describe('installGraalPy', () => { let tcFind: jest.SpyInstance; let warningSpy: jest.SpyInstance; let debugSpy: jest.SpyInstance; @@ -232,20 +229,20 @@ describeSkipOnWindows('installGraalPy', () => { it('found and install GraalPy, pre-release fallback', async () => { spyCacheDir = jest.spyOn(tc, 'cacheDir'); spyCacheDir.mockImplementation(() => - path.join(toolDir, 'GraalPy', '23.1.0', architecture) + path.join(toolDir, 'GraalPy', '24.1.0', architecture) ); spyChmodSync = jest.spyOn(fs, 'chmodSync'); spyChmodSync.mockImplementation(() => undefined); await expect( - installer.installGraalPy('23.1.x', architecture, false, undefined) + installer.installGraalPy('24.1.x', architecture, false, undefined) ).rejects.toThrow(); await expect( - installer.installGraalPy('23.1.x', architecture, true, undefined) + installer.installGraalPy('24.1.x', architecture, true, undefined) ).resolves.toEqual({ - installDir: path.join(toolDir, 'GraalPy', '23.1.0', architecture), - resolvedGraalPyVersion: '23.1.0-a.1' + installDir: path.join(toolDir, 'GraalPy', '24.1.0', architecture), + resolvedGraalPyVersion: '24.1.0-ea.9' }); expect(spyHttpClient).toHaveBeenCalled(); diff --git a/dist/setup/index.js b/dist/setup/index.js index 76f13b8a..f8f14af5 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -96769,8 +96769,8 @@ async function findGraalPyVersion(versionSpec, architecture, updateEnvironment, const pipDir = utils_1.IS_WINDOWS ? 'Scripts' : 'bin'; const _binDir = path.join(installDir, pipDir); const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : ''; - const pythonPath = path.join(utils_1.IS_WINDOWS ? installDir : _binDir, `python${binaryExtension}`); - const pythonLocation = (0, utils_1.getBinaryDirectory)(installDir); + const pythonPath = path.join(_binDir, `python${binaryExtension}`); + const pythonLocation = path.join(installDir, 'bin'); if (updateEnvironment) { core.exportVariable('pythonLocation', installDir); // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython @@ -97315,7 +97315,12 @@ async function installGraalPy(graalpyVersion, architecture, allowPreReleases, re try { const graalpyPath = await tc.downloadTool(downloadUrl, undefined, AUTH); core.info('Extracting downloaded archive...'); - downloadDir = await tc.extractTar(graalpyPath); + if (utils_1.IS_WINDOWS) { + downloadDir = await tc.extractZip(graalpyPath); + } + else { + downloadDir = await tc.extractTar(graalpyPath); + } // root folder in archive can have unpredictable name so just take the first folder // downloadDir is unique folder under TEMP and can't contain any other folders const archiveName = fs_1.default.readdirSync(downloadDir)[0]; @@ -97324,7 +97329,7 @@ async function installGraalPy(graalpyVersion, architecture, allowPreReleases, re if (!(0, utils_1.isNightlyKeyword)(resolvedGraalPyVersion)) { installDir = await tc.cacheDir(toolDir, 'GraalPy', resolvedGraalPyVersion, architecture); } - const binaryPath = (0, utils_1.getBinaryDirectory)(installDir); + const binaryPath = path.join(installDir, 'bin'); await createGraalPySymlink(binaryPath, resolvedGraalPyVersion); await installPip(binaryPath); return { installDir, resolvedGraalPyVersion }; @@ -97352,6 +97357,9 @@ async function getAvailableGraalPyVersions() { if (AUTH) { headers.authorization = AUTH; } + /* + Get releases first. + */ let url = 'https://api.github.com/repos/oracle/graalpython/releases'; const result = []; do { @@ -97362,6 +97370,19 @@ async function getAvailableGraalPyVersions() { result.push(...response.result); url = (0, utils_1.getNextPageUrl)(response); } while (url); + /* + Add pre-release builds. + */ + url = + 'https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases'; + do { + const response = await http.getJson(url, headers); + if (!response.result) { + throw new Error(`Unable to retrieve the list of available GraalPy versions from '${url}'`); + } + result.push(...response.result); + url = (0, utils_1.getNextPageUrl)(response); + } while (url); return result; } async function createGraalPySymlink(graalpyBinaryPath, graalpyVersion) { @@ -97381,7 +97402,7 @@ async function installPip(pythonLocation) { await exec.exec(`${pythonBinary} -m ensurepip --default-pip`); } function graalPyTagToVersion(tag) { - const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)((?:a|b|rc))?(\d*)?/; + const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)(?:-((?:ea|a|b|rc))\.0*(\d+))?/; const match = tag.match(versionPattern); if (match && match[2]) { return `${match[1]}-${match[2]}.${match[3]}`; @@ -97431,8 +97452,9 @@ function toGraalPyArchitecture(architecture) { function findAsset(item, architecture, platform) { const graalpyArch = toGraalPyArchitecture(architecture); const graalpyPlatform = toGraalPyPlatform(platform); + const graalpyExt = platform == 'win32' ? 'zip' : 'tar.gz'; const found = item.assets.filter(file => file.name.startsWith('graalpy') && - file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.tar.gz`)); + file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.${graalpyExt}`)); /* In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant. */ @@ -98363,7 +98385,7 @@ function getVersionInputFromFile(versionFile) { } } /** - * Get the directory containing interpreter binary from installation directory of PyPy or GraalPy + * Get the directory containing interpreter binary from installation directory of PyPy * - On Linux and macOS, the Python interpreter is in 'bin'. * - On Windows, it is in the installation root. */ diff --git a/src/find-graalpy.ts b/src/find-graalpy.ts index 1f86dbd9..12c41fb5 100644 --- a/src/find-graalpy.ts +++ b/src/find-graalpy.ts @@ -1,11 +1,6 @@ import * as path from 'path'; import * as graalpyInstall from './install-graalpy'; -import { - IS_WINDOWS, - validateVersion, - IGraalPyManifestRelease, - getBinaryDirectory -} from './utils'; +import {IS_WINDOWS, validateVersion, IGraalPyManifestRelease} from './utils'; import * as semver from 'semver'; import * as core from '@actions/core'; @@ -62,11 +57,8 @@ export async function findGraalPyVersion( const pipDir = IS_WINDOWS ? 'Scripts' : 'bin'; const _binDir = path.join(installDir, pipDir); const binaryExtension = IS_WINDOWS ? '.exe' : ''; - const pythonPath = path.join( - IS_WINDOWS ? installDir : _binDir, - `python${binaryExtension}` - ); - const pythonLocation = getBinaryDirectory(installDir); + const pythonPath = path.join(_binDir, `python${binaryExtension}`); + const pythonLocation = path.join(installDir, 'bin'); if (updateEnvironment) { core.exportVariable('pythonLocation', installDir); // https://cmake.org/cmake/help/latest/module/FindPython.html#module:FindPython diff --git a/src/install-graalpy.ts b/src/install-graalpy.ts index ad3288a3..b1029539 100644 --- a/src/install-graalpy.ts +++ b/src/install-graalpy.ts @@ -15,7 +15,6 @@ import { IGraalPyManifestRelease, createSymlinkInFolder, isNightlyKeyword, - getBinaryDirectory, getNextPageUrl } from './utils'; @@ -64,7 +63,11 @@ export async function installGraalPy( const graalpyPath = await tc.downloadTool(downloadUrl, undefined, AUTH); core.info('Extracting downloaded archive...'); - downloadDir = await tc.extractTar(graalpyPath); + if (IS_WINDOWS) { + downloadDir = await tc.extractZip(graalpyPath); + } else { + downloadDir = await tc.extractTar(graalpyPath); + } // root folder in archive can have unpredictable name so just take the first folder // downloadDir is unique folder under TEMP and can't contain any other folders @@ -81,7 +84,7 @@ export async function installGraalPy( ); } - const binaryPath = getBinaryDirectory(installDir); + const binaryPath = path.join(installDir, 'bin'); await createGraalPySymlink(binaryPath, resolvedGraalPyVersion); await installPip(binaryPath); @@ -115,6 +118,9 @@ export async function getAvailableGraalPyVersions() { headers.authorization = AUTH; } + /* + Get releases first. + */ let url: string | null = 'https://api.github.com/repos/oracle/graalpython/releases'; const result: IGraalPyManifestRelease[] = []; @@ -130,6 +136,23 @@ export async function getAvailableGraalPyVersions() { url = getNextPageUrl(response); } while (url); + /* + Add pre-release builds. + */ + url = + 'https://api.github.com/repos/graalvm/graal-languages-ea-builds/releases'; + do { + const response: ifm.TypedResponse = + await http.getJson(url, headers); + if (!response.result) { + throw new Error( + `Unable to retrieve the list of available GraalPy versions from '${url}'` + ); + } + result.push(...response.result); + url = getNextPageUrl(response); + } while (url); + return result; } @@ -175,7 +198,8 @@ async function installPip(pythonLocation: string) { } export function graalPyTagToVersion(tag: string) { - const versionPattern = /.*-(\d+\.\d+\.\d+(?:\.\d+)?)((?:a|b|rc))?(\d*)?/; + const versionPattern = + /.*-(\d+\.\d+\.\d+(?:\.\d+)?)(?:-((?:ea|a|b|rc))\.0*(\d+))?/; const match = tag.match(versionPattern); if (match && match[2]) { return `${match[1]}-${match[2]}.${match[3]}`; @@ -251,10 +275,11 @@ export function findAsset( ) { const graalpyArch = toGraalPyArchitecture(architecture); const graalpyPlatform = toGraalPyPlatform(platform); + const graalpyExt = platform == 'win32' ? 'zip' : 'tar.gz'; const found = item.assets.filter( file => file.name.startsWith('graalpy') && - file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.tar.gz`) + file.name.endsWith(`-${graalpyPlatform}-${graalpyArch}.${graalpyExt}`) ); /* In the future there could be more variants of GraalPy for a single release. Pick the shortest name, that one is the most likely to be the primary variant. diff --git a/src/utils.ts b/src/utils.ts index d7be4746..2ee9666f 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -379,7 +379,7 @@ export function getVersionInputFromFile(versionFile: string): string[] { } /** - * Get the directory containing interpreter binary from installation directory of PyPy or GraalPy + * Get the directory containing interpreter binary from installation directory of PyPy * - On Linux and macOS, the Python interpreter is in 'bin'. * - On Windows, it is in the installation root. */ From 6a1cc45d4dca5793a798049307c5785cceb0b68e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 11:44:39 +0000 Subject: [PATCH 19/19] Bump eslint-plugin-jest from 27.9.0 to 29.0.1 Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 27.9.0 to 29.0.1. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v27.9.0...v29.0.1) --- updated-dependencies: - dependency-name: eslint-plugin-jest dependency-version: 29.0.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 237 +++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 +- 2 files changed, 226 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20362f58..c412f09c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@vercel/ncc": "^0.38.3", "eslint": "^8.57.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-jest": "^29.1.0", "eslint-plugin-node": "^11.1.0", "jest": "^29.7.0", "jest-circus": "^29.7.0", @@ -833,16 +833,20 @@ "dev": true }, "node_modules/@eslint-community/eslint-utils": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", - "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.0.tgz", + "integrity": "sha512-ayVFHdtZ+hsq1t2Dy24wCmGXGe4q9Gu3smhLYALJrr473ZH27MsnSL+LKUlimp4BWJqMDMLmPpx/Q9R3OAlL4g==", "dev": true, + "license": "MIT", "dependencies": { - "eslint-visitor-keys": "^3.3.0" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, + "funding": { + "url": "https://opencollective.com/eslint" + }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } @@ -1726,6 +1730,42 @@ } } }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.4.tgz", + "integrity": "sha512-nPiRSKuvtTN+no/2N1kt2tUh/HoFzeEgOm9fQ6XQk4/ApGqjx0zFIIaLJ6wooR1HIoozvj2j6vTi/1fgAz7UYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.4", + "@typescript-eslint/types": "^8.46.4", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service/node_modules/@typescript-eslint/types": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", + "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", @@ -1743,6 +1783,23 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.4.tgz", + "integrity": "sha512-+/XqaZPIAk6Cjg7NWgSGe27X4zMGqrFqZ8atJsX3CWxH/jACqWnrWI68h7nHQld0y+k9eTTjb9r+KU4twLoo9A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/@typescript-eslint/type-utils": { "version": "5.62.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", @@ -2724,19 +2781,20 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "27.9.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.9.0.tgz", - "integrity": "sha512-QIT7FH7fNmd9n4se7FFKHbsLKGQiw885Ds6Y/sxKgCZ6natwCsXdgPOADnYVxN2QrRweF0FZWbJ6S7Rsn7llug==", + "version": "29.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.1.0.tgz", + "integrity": "sha512-LabxXbASXVjguqL+kBHTPMf3gUeSqwH4fsrEyHTY/MCs42I/p9+ctg09SJpYiD8eGaIsP6GwYr5xW6xWS9XgZg==", "dev": true, + "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "^5.10.0" + "@typescript-eslint/utils": "^8.0.0" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^20.12.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0", - "eslint": "^7.0.0 || ^8.0.0", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", "jest": "*" }, "peerDependenciesMeta": { @@ -2748,6 +2806,148 @@ } } }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.4.tgz", + "integrity": "sha512-tMDbLGXb1wC+McN1M6QeDx7P7c0UWO5z9CXqp7J8E+xGcJuUuevWKxuG8j41FoweS3+L41SkyKKkia16jpX7CA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/types": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.4.tgz", + "integrity": "sha512-USjyxm3gQEePdUwJBFjjGNG18xY9A2grDVGuk7/9AkjIF1L+ZrVnwR5VAU5JXtUnBL/Nwt3H31KlRDaksnM7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.4.tgz", + "integrity": "sha512-7oV2qEOr1d4NWNmpXLR35LvCfOkTNymY9oyW+lUHkmCno7aOmIf/hMaydnJBUTBMRCOGZh8YjkFOc8dadEoNGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.4", + "@typescript-eslint/tsconfig-utils": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/visitor-keys": "8.46.4", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/utils": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.4.tgz", + "integrity": "sha512-AbSv11fklGXV6T28dp2Me04Uw90R2iJ30g2bgLz529Koehrmkbs1r7paFqr1vPCZi7hHwYxYtxfyQMRC8QaVSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.4", + "@typescript-eslint/types": "8.46.4", + "@typescript-eslint/typescript-estree": "8.46.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/eslint-plugin-jest/node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.4", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.4.tgz", + "integrity": "sha512-/++5CYLQqsO9HFGLI7APrxBJYo+5OCMpViuhV8q5/Qa3o5mMrF//eQHks+PXcsAVaLdn817fMuS7zqoXNNZGaw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.4", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-jest/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-plugin-jest/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/eslint-plugin-node": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz", @@ -5315,6 +5515,19 @@ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/ts-jest": { "version": "29.3.2", "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.3.2.tgz", diff --git a/package.json b/package.json index 3383f219..7723dd63 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "@vercel/ncc": "^0.38.3", "eslint": "^8.57.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-jest": "^27.9.0", + "eslint-plugin-jest": "^29.1.0", "eslint-plugin-node": "^11.1.0", "jest": "^29.7.0", "jest-circus": "^29.7.0",