mirror of
https://github.com/actions/setup-node.git
synced 2026-07-16 19:54:15 +03:00
Migrate to ESM and upgrade dependencies (#1574)
* Migrate to ESM * updated package.json version * Update README for v6 and clean up dev dependencies * Remove unused ts-node * fix audit issue --------- Co-authored-by: gowridurgad <gowridurgad@gmail.com>
This commit is contained in:
+12
-7
@@ -2,14 +2,15 @@ import * as core from '@actions/core';
|
||||
|
||||
import os from 'os';
|
||||
import fs from 'fs';
|
||||
import {fileURLToPath} from 'url';
|
||||
|
||||
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 {
|
||||
@@ -87,7 +88,11 @@ export async function run() {
|
||||
}
|
||||
}
|
||||
|
||||
const matchersPath = path.join(__dirname, '../..', '.github');
|
||||
const matchersPath = path.join(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
'../..',
|
||||
'.github'
|
||||
);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'tsc.json')}`);
|
||||
core.info(
|
||||
`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`
|
||||
|
||||
Reference in New Issue
Block a user