Upgrade to ESM and upgrade node fetch

This commit is contained in:
Salman Muin Kayser Chishti 2025-10-14 14:07:58 +01:00
parent 2028fbc5c2
commit 100690a6a6
20 changed files with 16193 additions and 7907 deletions

View file

@ -5,13 +5,13 @@ import path from 'path';
import fs from 'fs';
import os from 'os';
import {State} from './constants';
import {State} from './constants.js';
import {
getCacheDirectories,
getPackageManagerInfo,
repoHasYarnBerryManagedDependencies,
PackageManagerInfo
} from './cache-utils';
} from './cache-utils.js';
export const restoreCache = async (
packageManager: string,

View file

@ -1,8 +1,8 @@
import * as core from '@actions/core';
import * as cache from '@actions/cache';
import {State} from './constants';
import {getPackageManagerInfo} from './cache-utils';
import {State} from './constants.js';
import {getPackageManagerInfo} from './cache-utils.js';
// Catch and log any unhandled exceptions. These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to

View file

@ -4,7 +4,7 @@ import * as cache from '@actions/cache';
import * as glob from '@actions/glob';
import path from 'path';
import fs from 'fs';
import {unique} from './util';
import {unique} from './util.js';
export interface PackageManagerInfo {
name: string;

View file

@ -3,13 +3,13 @@ import * as core from '@actions/core';
import os from 'os';
import fs from 'fs';
import * as auth from './authutil';
import * as auth from './authutil.js';
import * as path from 'path';
import {restoreCache} from './cache-restore';
import {isCacheFeatureAvailable} from './cache-utils';
import {getNodejsDistribution} from './distributions/installer-factory';
import {getNodeVersionFromFile, printEnvDetailsAndSetOutput} from './util';
import {State} from './constants';
import {restoreCache} from './cache-restore.js';
import {isCacheFeatureAvailable} from './cache-utils.js';
import {getNodejsDistribution} from './distributions/installer-factory.js';
import {getNodeVersionFromFile, printEnvDetailsAndSetOutput} from './util.js';
import {State} from './constants.js';
export async function run() {
try {

View file

@ -1,3 +1,3 @@
import {run} from './main';
import {run} from './main.js';
run();