@actions/artifact: convert to an ESM module

This commit is contained in:
Daniel Kennedy
2026-01-28 21:44:48 -05:00
parent ed3ea3b5ba
commit 99c24207f2
35 changed files with 468 additions and 515 deletions
@@ -1,9 +1,9 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
const packageJson = require('../../../package.json')
// Version is hardcoded to avoid issues with import.meta.url in Jest
const VERSION = '6.0.0'
/**
* Ensure that this User Agent String is used in all HTTP calls so that we can monitor telemetry between different versions of this package
*/
export function getUserAgentString(): string {
return `@actions/artifact-${packageJson.version}`
return `@actions/artifact-${VERSION}`
}