mirror of
https://gitea.com/actions/setup-java.git
synced 2026-07-10 19:31:55 +08:00
Migrate to ESM and upgrade dependencies (#1078)
* Migrate to ESM and upgrade dependencies * fix: update import statement for JSON module in kona-installer test --------- Co-authored-by: George Adams <georgeadams1995@gmail.com>
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import fs from 'fs';
|
||||
import * as core from '@actions/core';
|
||||
import * as auth from './auth';
|
||||
import * as auth from './auth.js';
|
||||
import {
|
||||
getBooleanInput,
|
||||
isCacheFeatureAvailable,
|
||||
getVersionFromFileContent
|
||||
} from './util';
|
||||
import * as toolchains from './toolchains';
|
||||
import * as constants from './constants';
|
||||
import {restore} from './cache';
|
||||
} from './util.js';
|
||||
import * as toolchains from './toolchains.js';
|
||||
import * as constants from './constants.js';
|
||||
import {restore} from './cache.js';
|
||||
import * as path from 'path';
|
||||
import {getJavaDistribution} from './distributions/distribution-factory';
|
||||
import {JavaInstallerOptions} from './distributions/base-models';
|
||||
import {configureMavenArgs} from './maven-args';
|
||||
import {fileURLToPath} from 'url';
|
||||
import {getJavaDistribution} from './distributions/distribution-factory.js';
|
||||
import {JavaInstallerOptions} from './distributions/base-models.js';
|
||||
import {configureMavenArgs} from './maven-args.js';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
@@ -113,7 +114,12 @@ async function run() {
|
||||
}
|
||||
}
|
||||
core.endGroup();
|
||||
const matchersPath = path.join(__dirname, '..', '..', '.github');
|
||||
const matchersPath = path.join(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
'..',
|
||||
'..',
|
||||
'.github'
|
||||
);
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'java.json')}`);
|
||||
|
||||
await auth.configureAuthentication();
|
||||
|
||||
Reference in New Issue
Block a user