Compare commits

..
Author SHA1 Message Date
Daniel Kennedy 946d27335b Add release notes 2026-01-28 13:27:02 -05:00
Daniel Kennedy 4a2af24706 @actions/io: convert to ESM module 2026-01-28 13:25:11 -05:00
19 changed files with 42 additions and 78 deletions
+3 -11
View File
@@ -5,13 +5,7 @@ module.exports = {
testEnvironment: 'node', testEnvironment: 'node',
testMatch: ['**/__tests__/*.test.ts'], testMatch: ['**/__tests__/*.test.ts'],
moduleNameMapper: { moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1', '^(\\.{1,2}/.*)\\.js$': '$1'
'^@actions/io$': '<rootDir>/packages/io/lib/io.js',
'^@actions/io/lib/io-util$': '<rootDir>/packages/io/lib/io-util.js',
'^@actions/http-client$': '<rootDir>/packages/http-client/lib/index.js',
'^@actions/http-client/lib/auth$': '<rootDir>/packages/http-client/lib/auth.js',
'^@actions/github$': '<rootDir>/packages/github/lib/github.js',
'^@actions/github/lib/utils$': '<rootDir>/packages/github/lib/utils.js'
}, },
transform: { transform: {
'^.+\\.(ts|js)$': ['ts-jest', { '^.+\\.(ts|js)$': ['ts-jest', {
@@ -19,14 +13,12 @@ module.exports = {
diagnostics: {warnOnly: true}, diagnostics: {warnOnly: true},
tsconfig: { tsconfig: {
allowJs: true, allowJs: true,
esModuleInterop: true, esModuleInterop: true
module: 'commonjs',
moduleResolution: 'node'
} }
}] }]
}, },
transformIgnorePatterns: [ transformIgnorePatterns: [
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|universal-user-agent|before-after-hook)/)' '/node_modules/(?!(@octokit|universal-user-agent|before-after-hook)/)'
], ],
verbose: true verbose: true
} }
+4 -11
View File
@@ -1,20 +1,13 @@
# @actions/exec Releases # @actions/exec Releases
## 3.0.0 ### 2.0.0
- **Breaking change**: Package is now ESM-only
- CommonJS consumers must use dynamic `import()` instead of `require()`
## 2.0.0
- Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110) - Add support for Node 24 [#2110](https://github.com/actions/toolkit/pull/2110)
- Bump @actions/io dependency from ^1.0.1 to ^2.0.0 - Bump @actions/io dependency from ^1.0.1 to ^2.0.0
## 1.1.1 ### 1.1.1
- Update `lockfileVersion` to `v2` in `package-lock.json [#1024](https://github.com/actions/toolkit/pull/1024)
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1024](https://github.com/actions/toolkit/pull/1024) ### 1.1.0
## 1.1.0
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773) - [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
- [Add getExecOutput function](https://github.com/actions/toolkit/pull/814) - [Add getExecOutput function](https://github.com/actions/toolkit/pull/814)
+16 -16
View File
@@ -1,5 +1,5 @@
import * as exec from '../src/exec.js' import * as exec from '../src/exec'
import * as im from '../src/interfaces.js' import * as im from '../src/interfaces'
import * as childProcess from 'child_process' import * as childProcess from 'child_process'
import * as fs from 'fs' import * as fs from 'fs'
@@ -14,7 +14,7 @@ const IS_WINDOWS = process.platform === 'win32'
const SPAWN_WAIT_SCRIPT = path.join( const SPAWN_WAIT_SCRIPT = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'spawn-wait-for-file.cjs' 'spawn-wait-for-file.js'
) )
let outstream: stream.Writable let outstream: stream.Writable
@@ -196,7 +196,7 @@ describe('@actions/exec', () => {
const scriptPath: string = path.join( const scriptPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -218,7 +218,7 @@ describe('@actions/exec', () => {
const scriptPath: string = path.join( const scriptPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -255,12 +255,12 @@ describe('@actions/exec', () => {
const stdErrPath: string = path.join( const stdErrPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const stdOutPath: string = path.join( const stdOutPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdoutoutput.cjs' 'stdoutoutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
let stdoutCalled = false let stdoutCalled = false
@@ -295,7 +295,7 @@ describe('@actions/exec', () => {
const stdlinePath: string = path.join( const stdlinePath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdlineoutput.cjs' 'stdlineoutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -344,7 +344,7 @@ describe('@actions/exec', () => {
const waitForInput: string = path.join( const waitForInput: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'wait-for-input.cjs' 'wait-for-input.js'
) )
const _testExecOptions = getExecOptions() const _testExecOptions = getExecOptions()
@@ -622,12 +622,12 @@ describe('@actions/exec', () => {
const stdErrPath: string = path.join( const stdErrPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const stdOutPath: string = path.join( const stdOutPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdoutoutput.cjs' 'stdoutoutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -653,12 +653,12 @@ describe('@actions/exec', () => {
const stdErrPath: string = path.join( const stdErrPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const stdOutPath: string = path.join( const stdOutPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdoutoutput.cjs' 'stdoutoutput.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -703,12 +703,12 @@ describe('@actions/exec', () => {
const stdErrPath: string = path.join( const stdErrPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stderroutput.cjs' 'stderroutput.js'
) )
const stdOutPath: string = path.join( const stdOutPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdoutoutputlarge.cjs' 'stdoutoutputlarge.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -753,7 +753,7 @@ describe('@actions/exec', () => {
const stdOutPath: string = path.join( const stdOutPath: string = path.join(
__dirname, __dirname,
'scripts', 'scripts',
'stdoutputspecial.cjs' 'stdoutputspecial.js'
) )
const nodePath: string = await io.which('node', true) const nodePath: string = await io.which('node', true)
@@ -15,10 +15,10 @@ if (!filePath) {
throw new Error('file is not specified') throw new Error('file is not specified')
} }
// Spawn wait-for-file.cjs with inherited stdio // Spawn wait-for-file.js with inherited stdio
// This creates a grandchild process that holds the stdio handles open // This creates a grandchild process that holds the stdio handles open
// after this process (the child) exits // after this process (the child) exits
const waitScript = path.join(__dirname, 'wait-for-file.cjs') const waitScript = path.join(__dirname, 'wait-for-file.js')
const isWindows = process.platform === 'win32' const isWindows = process.platform === 'win32'
// On Windows, use detached:true to properly keep streams open // On Windows, use detached:true to properly keep streams open
+6 -6
View File
@@ -1,21 +1,21 @@
{ {
"name": "@actions/exec", "name": "@actions/exec",
"version": "3.0.0", "version": "2.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@actions/exec", "name": "@actions/exec",
"version": "3.0.0", "version": "2.0.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/io": "^3.0.2" "@actions/io": "^2.0.0"
} }
}, },
"node_modules/@actions/io": { "node_modules/@actions/io": {
"version": "3.0.2", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", "resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", "integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
"license": "MIT" "license": "MIT"
} }
} }
+2 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "@actions/exec", "name": "@actions/exec",
"version": "3.0.0", "version": "2.0.0",
"description": "Actions exec lib", "description": "Actions exec lib",
"keywords": [ "keywords": [
"github", "github",
@@ -9,15 +9,8 @@
], ],
"homepage": "https://github.com/actions/toolkit/tree/main/packages/exec", "homepage": "https://github.com/actions/toolkit/tree/main/packages/exec",
"license": "MIT", "license": "MIT",
"type": "module",
"main": "lib/exec.js", "main": "lib/exec.js",
"types": "lib/exec.d.ts", "types": "lib/exec.d.ts",
"exports": {
".": {
"types": "./lib/exec.d.ts",
"import": "./lib/exec.js"
}
},
"directories": { "directories": {
"lib": "lib", "lib": "lib",
"test": "__tests__" "test": "__tests__"
@@ -43,6 +36,6 @@
"url": "https://github.com/actions/toolkit/issues" "url": "https://github.com/actions/toolkit/issues"
}, },
"dependencies": { "dependencies": {
"@actions/io": "^3.0.2" "@actions/io": "^2.0.0"
} }
} }
+2 -2
View File
@@ -1,6 +1,6 @@
import {StringDecoder} from 'string_decoder' import {StringDecoder} from 'string_decoder'
import {ExecOptions, ExecOutput, ExecListeners} from './interfaces.js' import {ExecOptions, ExecOutput, ExecListeners} from './interfaces'
import * as tr from './toolrunner.js' import * as tr from './toolrunner'
export {ExecOptions, ExecOutput, ExecListeners} export {ExecOptions, ExecOutput, ExecListeners}
+1 -1
View File
@@ -3,7 +3,7 @@ import * as events from 'events'
import * as child from 'child_process' import * as child from 'child_process'
import * as path from 'path' import * as path from 'path'
import * as stream from 'stream' import * as stream from 'stream'
import * as im from './interfaces.js' import * as im from './interfaces'
import * as io from '@actions/io' import * as io from '@actions/io'
import * as ioUtil from '@actions/io/lib/io-util' import * as ioUtil from '@actions/io/lib/io-util'
import {setTimeout} from 'timers' import {setTimeout} from 'timers'
+1 -3
View File
@@ -3,9 +3,7 @@
"compilerOptions": { "compilerOptions": {
"baseUrl": "./", "baseUrl": "./",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src"
"module": "node16",
"moduleResolution": "node16"
}, },
"include": [ "include": [
"./src" "./src"
-8
View File
@@ -1,13 +1,5 @@
# @actions/io Releases # @actions/io Releases
## 3.0.2
- Fix: update lock file version
## 3.0.1
- Fix: export `@actions/io/lib/io-util`
## 3.0.0 ## 3.0.0
- **Breaking change**: Package is now ESM-only - **Breaking change**: Package is now ESM-only
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "@actions/io", "name": "@actions/io",
"version": "3.0.2", "version": "3.0.0",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@actions/io", "name": "@actions/io",
"version": "3.0.2", "version": "3.0.0",
"license": "MIT" "license": "MIT"
} }
} }
+1 -5
View File
@@ -1,6 +1,6 @@
{ {
"name": "@actions/io", "name": "@actions/io",
"version": "3.0.2", "version": "3.0.0",
"description": "Actions io lib", "description": "Actions io lib",
"keywords": [ "keywords": [
"github", "github",
@@ -16,10 +16,6 @@
".": { ".": {
"types": "./lib/io.d.ts", "types": "./lib/io.d.ts",
"import": "./lib/io.js" "import": "./lib/io.js"
},
"./lib/io-util": {
"types": "./lib/io-util.d.ts",
"import": "./lib/io-util.js"
} }
}, },
"directories": { "directories": {