mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-10 05:12:19 +02:00
perf: add dynamically loaded cache-dependencies module
This reduces the main bundle size by ⚠️ 1.1 MB minified! This bundle is loaded only when caching is enabled.
The reason for this huge reduction is that caching dependencies uses the `@actions/cache` package, which is an extremely large package with big dependencies.
`setup-python` is used in `setup-cpp` as a library. This optimization reduces the bundle size for that package as well.
This commit is contained in:
parent
70dcb22d26
commit
9700887518
6 changed files with 76155 additions and 99283 deletions
|
@ -8,7 +8,6 @@ import path from 'path';
|
|||
import {
|
||||
validateVersion,
|
||||
validatePythonVersionFormatForPyPy,
|
||||
isCacheFeatureAvailable,
|
||||
getVersionInputFromFile,
|
||||
getVersionInputFromPlainFile,
|
||||
getVersionInputFromTomlFile,
|
||||
|
@ -16,6 +15,7 @@ import {
|
|||
IS_WINDOWS,
|
||||
getDownloadFileName
|
||||
} from '../src/utils';
|
||||
import {isCacheFeatureAvailable} from '../src/cache-dependencies';
|
||||
|
||||
jest.mock('@actions/cache');
|
||||
jest.mock('@actions/core');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue