5793b08cd9
* `@actions/artifact`: convert to an ESM module * Update the package-lock.json * Undo the GHES ignores * Fix the reference to `@actions/http-client` in the lock file * Bump `@actions/core` to `3.0.0` * Remove `jest.config.cjs` * Import `OctoKitOptions` from `@octokit/core/types` * Pull the package version from `package.json` * Workaround getting the package version for the user-agent * Fix the `archiver` import * Fix linting
8 lines
458 B
JavaScript
8 lines
458 B
JavaScript
// This file exists as a CommonJS module to read the version from package.json.
|
|
// In an ESM package, using `require()` directly in .ts files requires disabling
|
|
// ESLint rules and doesn't work reliably across all Node.js versions.
|
|
// By keeping this as a .cjs file, we can use require() naturally and export
|
|
// the version for the ESM modules to import.
|
|
const packageJson = require('../../../package.json')
|
|
module.exports = { version: packageJson.version }
|