mirror of
https://github.com/actions/checkout.git
synced 2026-06-19 18:37:52 +08:00
upgrade module to esm and update dependencies (#2463)
* upgrade module to esm so I can update dependencies * fix ci failures
This commit is contained in:
+9
-9
@@ -1,9 +1,11 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as coreCommand from '@actions/core/lib/command'
|
||||
import * as gitSourceProvider from './git-source-provider'
|
||||
import * as inputHelper from './input-helper'
|
||||
import * as gitSourceProvider from './git-source-provider.js'
|
||||
import * as inputHelper from './input-helper.js'
|
||||
import * as path from 'path'
|
||||
import * as stateHelper from './state-helper'
|
||||
import * as stateHelper from './state-helper.js'
|
||||
import {fileURLToPath} from 'url'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
async function run(): Promise<void> {
|
||||
try {
|
||||
@@ -11,10 +13,8 @@ async function run(): Promise<void> {
|
||||
|
||||
try {
|
||||
// Register problem matcher
|
||||
coreCommand.issueCommand(
|
||||
'add-matcher',
|
||||
{},
|
||||
path.join(__dirname, 'problem-matcher.json')
|
||||
core.info(
|
||||
`::add-matcher::${path.join(__dirname, 'problem-matcher.json')}`
|
||||
)
|
||||
|
||||
// Get sources
|
||||
@@ -22,7 +22,7 @@ async function run(): Promise<void> {
|
||||
core.setOutput('ref', sourceSettings.ref)
|
||||
} finally {
|
||||
// Unregister problem matcher
|
||||
coreCommand.issueCommand('remove-matcher', {owner: 'checkout-git'}, '')
|
||||
core.info('::remove-matcher owner=checkout-git::')
|
||||
}
|
||||
} catch (error) {
|
||||
core.setFailed(`${(error as any)?.message ?? error}`)
|
||||
|
||||
Reference in New Issue
Block a user