mirror of
https://github.com/actions/setup-go.git
synced 2026-07-23 00:47:43 +08:00
Migrate to ESM and upgrade dependencies (#763)
* Migrate to ESM and upgrade dependencies * Remove unused tsconfig.eslint.json * bump version to 7.0.0 in package.json and package-lock.json * Add ESM migration note to README for V7 * Remove unnecessary devDependencies: ts-node, @types/jest * npm audit fix * Update README with ESM migration details Clarified migration details to ESM for action compatibility. * Downgrade @types/node to ^24, clean up tsconfig and README.
This commit is contained in:
15
src/main.ts
15
src/main.ts
@@ -1,14 +1,15 @@
|
||||
import * as core from '@actions/core';
|
||||
import * as io from '@actions/io';
|
||||
import * as installer from './installer';
|
||||
import * as installer from './installer.js';
|
||||
import * as semver from 'semver';
|
||||
import path from 'path';
|
||||
import {restoreCache} from './cache-restore';
|
||||
import {isCacheFeatureAvailable} from './cache-utils';
|
||||
import {fileURLToPath} from 'url';
|
||||
import {restoreCache} from './cache-restore.js';
|
||||
import {isCacheFeatureAvailable} from './cache-utils.js';
|
||||
import cp from 'child_process';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import {Architecture} from './types';
|
||||
import {Architecture} from './types.js';
|
||||
|
||||
export async function run() {
|
||||
try {
|
||||
@@ -91,7 +92,11 @@ export async function run() {
|
||||
}
|
||||
|
||||
// add problem matchers
|
||||
const matchersPath = path.join(__dirname, '../..', 'matchers.json');
|
||||
const matchersPath = path.join(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
'../..',
|
||||
'matchers.json'
|
||||
);
|
||||
core.info(`##[add-matcher]${matchersPath}`);
|
||||
|
||||
// output the version actually being used
|
||||
|
||||
Reference in New Issue
Block a user