mirror of
https://github.com/actions/setup-node.git
synced 2025-10-21 10:19:27 +00:00
feat: migrate to ESM and update Jest configuration
- Added package.json in dist/setup to specify module type as ESM. - Updated jest.config.js to support ESM with ts-jest and added moduleNameMapper for .js extensions. - Created jest.setup.js to ensure Jest globals are available in ESM mode. - Modified test script in package.json to use node with experimental VM modules for Jest. - Updated imports in various distribution files to include .js extensions for ESM compatibility. - Adjusted tsconfig.json to exclude __tests__ directory and maintain ESM settings. - Updated package-lock.json to include new dependencies and their versions.
This commit is contained in:
parent
100690a6a6
commit
81b484e462
28 changed files with 3641 additions and 5337 deletions
|
@ -1,19 +1,23 @@
|
|||
import * as core from '@actions/core';
|
||||
import * as cache from '@actions/cache';
|
||||
import path from 'path';
|
||||
import * as utils from '../src/cache-utils';
|
||||
import * as utils from '../src/cache-utils.js';
|
||||
import {
|
||||
PackageManagerInfo,
|
||||
isCacheFeatureAvailable,
|
||||
supportedPackageManagers,
|
||||
isGhes,
|
||||
resetProjectDirectoriesMemoized
|
||||
} from '../src/cache-utils';
|
||||
} from '../src/cache-utils.js';
|
||||
import fs from 'fs';
|
||||
import * as cacheUtils from '../src/cache-utils';
|
||||
import * as cacheUtils from '../src/cache-utils.js';
|
||||
import * as glob from '@actions/glob';
|
||||
import {Globber} from '@actions/glob';
|
||||
import {MockGlobber} from './mock/glob-mock';
|
||||
import {MockGlobber} from './mock/glob-mock.js';
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
describe('cache-utils', () => {
|
||||
const versionYarn1 = '1.2.3';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue