Skip to content

Commit 63858ce

Browse files
committed
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.
1 parent 70dcb22 commit 63858ce

File tree

6 files changed

+88269
-111402
lines changed

6 files changed

+88269
-111402
lines changed

__tests__/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import path from 'path';
88
import {
99
validateVersion,
1010
validatePythonVersionFormatForPyPy,
11-
isCacheFeatureAvailable,
1211
getVersionInputFromFile,
1312
getVersionInputFromPlainFile,
1413
getVersionInputFromTomlFile,
1514
getNextPageUrl,
1615
IS_WINDOWS,
1716
getDownloadFileName
1817
} from '../src/utils';
18+
import {isCacheFeatureAvailable} from '../src/cache-dependencies';
1919

2020
jest.mock('@actions/cache');
2121
jest.mock('@actions/core');

0 commit comments

Comments
 (0)