Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2d38e51528 | |||
| 123c3678fa |
+11
-3
@@ -5,7 +5,13 @@ module.exports = {
|
||||
testEnvironment: 'node',
|
||||
testMatch: ['**/__tests__/*.test.ts'],
|
||||
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: {
|
||||
'^.+\\.(ts|js)$': ['ts-jest', {
|
||||
@@ -13,12 +19,14 @@ module.exports = {
|
||||
diagnostics: {warnOnly: true},
|
||||
tsconfig: {
|
||||
allowJs: true,
|
||||
esModuleInterop: true
|
||||
esModuleInterop: true,
|
||||
module: 'commonjs',
|
||||
moduleResolution: 'node'
|
||||
}
|
||||
}]
|
||||
},
|
||||
transformIgnorePatterns: [
|
||||
'/node_modules/(?!(@octokit|universal-user-agent|before-after-hook)/)'
|
||||
'/node_modules/(?!(@octokit|@actions/github|@actions/http-client|@actions/io|universal-user-agent|before-after-hook)/)'
|
||||
],
|
||||
verbose: true
|
||||
}
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
# @actions/exec Releases
|
||||
|
||||
### 2.0.0
|
||||
## 3.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)
|
||||
- Bump @actions/io dependency from ^1.0.1 to ^2.0.0
|
||||
|
||||
### 1.1.1
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json [#1024](https://github.com/actions/toolkit/pull/1024)
|
||||
## 1.1.1
|
||||
|
||||
### 1.1.0
|
||||
- Update `lockfileVersion` to `v2` in `package-lock.json` [#1024](https://github.com/actions/toolkit/pull/1024)
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- [Fix stdline dropping large output](https://github.com/actions/toolkit/pull/773)
|
||||
- [Add getExecOutput function](https://github.com/actions/toolkit/pull/814)
|
||||
@@ -23,4 +30,4 @@
|
||||
|
||||
### 1.0.0
|
||||
|
||||
- Initial release
|
||||
- Initial release
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as exec from '../src/exec'
|
||||
import * as im from '../src/interfaces'
|
||||
import * as exec from '../src/exec.js'
|
||||
import * as im from '../src/interfaces.js'
|
||||
|
||||
import * as childProcess from 'child_process'
|
||||
import * as fs from 'fs'
|
||||
@@ -14,7 +14,7 @@ const IS_WINDOWS = process.platform === 'win32'
|
||||
const SPAWN_WAIT_SCRIPT = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'spawn-wait-for-file.js'
|
||||
'spawn-wait-for-file.cjs'
|
||||
)
|
||||
|
||||
let outstream: stream.Writable
|
||||
@@ -196,7 +196,7 @@ describe('@actions/exec', () => {
|
||||
const scriptPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const nodePath: string = await io.which('node', true)
|
||||
|
||||
@@ -218,7 +218,7 @@ describe('@actions/exec', () => {
|
||||
const scriptPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const nodePath: string = await io.which('node', true)
|
||||
|
||||
@@ -255,12 +255,12 @@ describe('@actions/exec', () => {
|
||||
const stdErrPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const stdOutPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdoutoutput.js'
|
||||
'stdoutoutput.cjs'
|
||||
)
|
||||
const nodePath: string = await io.which('node', true)
|
||||
let stdoutCalled = false
|
||||
@@ -295,7 +295,7 @@ describe('@actions/exec', () => {
|
||||
const stdlinePath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdlineoutput.js'
|
||||
'stdlineoutput.cjs'
|
||||
)
|
||||
const nodePath: string = await io.which('node', true)
|
||||
|
||||
@@ -344,7 +344,7 @@ describe('@actions/exec', () => {
|
||||
const waitForInput: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'wait-for-input.js'
|
||||
'wait-for-input.cjs'
|
||||
)
|
||||
|
||||
const _testExecOptions = getExecOptions()
|
||||
@@ -622,12 +622,12 @@ describe('@actions/exec', () => {
|
||||
const stdErrPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const stdOutPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdoutoutput.js'
|
||||
'stdoutoutput.cjs'
|
||||
)
|
||||
const nodePath: string = await io.which('node', true)
|
||||
|
||||
@@ -653,12 +653,12 @@ describe('@actions/exec', () => {
|
||||
const stdErrPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const stdOutPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdoutoutput.js'
|
||||
'stdoutoutput.cjs'
|
||||
)
|
||||
|
||||
const nodePath: string = await io.which('node', true)
|
||||
@@ -703,12 +703,12 @@ describe('@actions/exec', () => {
|
||||
const stdErrPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stderroutput.js'
|
||||
'stderroutput.cjs'
|
||||
)
|
||||
const stdOutPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdoutoutputlarge.js'
|
||||
'stdoutoutputlarge.cjs'
|
||||
)
|
||||
|
||||
const nodePath: string = await io.which('node', true)
|
||||
@@ -753,7 +753,7 @@ describe('@actions/exec', () => {
|
||||
const stdOutPath: string = path.join(
|
||||
__dirname,
|
||||
'scripts',
|
||||
'stdoutputspecial.js'
|
||||
'stdoutputspecial.cjs'
|
||||
)
|
||||
|
||||
const nodePath: string = await io.which('node', true)
|
||||
|
||||
+2
-2
@@ -15,10 +15,10 @@ if (!filePath) {
|
||||
throw new Error('file is not specified')
|
||||
}
|
||||
|
||||
// Spawn wait-for-file.js with inherited stdio
|
||||
// Spawn wait-for-file.cjs with inherited stdio
|
||||
// This creates a grandchild process that holds the stdio handles open
|
||||
// after this process (the child) exits
|
||||
const waitScript = path.join(__dirname, 'wait-for-file.js')
|
||||
const waitScript = path.join(__dirname, 'wait-for-file.cjs')
|
||||
const isWindows = process.platform === 'win32'
|
||||
|
||||
// On Windows, use detached:true to properly keep streams open
|
||||
Generated
+6
-6
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "@actions/exec",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@actions/exec",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^2.0.0"
|
||||
"@actions/io": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz",
|
||||
"integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@actions/exec",
|
||||
"version": "2.0.0",
|
||||
"version": "3.0.0",
|
||||
"description": "Actions exec lib",
|
||||
"keywords": [
|
||||
"github",
|
||||
@@ -9,8 +9,15 @@
|
||||
],
|
||||
"homepage": "https://github.com/actions/toolkit/tree/main/packages/exec",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"main": "lib/exec.js",
|
||||
"types": "lib/exec.d.ts",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./lib/exec.d.ts",
|
||||
"import": "./lib/exec.js"
|
||||
}
|
||||
},
|
||||
"directories": {
|
||||
"lib": "lib",
|
||||
"test": "__tests__"
|
||||
@@ -36,6 +43,6 @@
|
||||
"url": "https://github.com/actions/toolkit/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/io": "^2.0.0"
|
||||
"@actions/io": "^3.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {StringDecoder} from 'string_decoder'
|
||||
import {ExecOptions, ExecOutput, ExecListeners} from './interfaces'
|
||||
import * as tr from './toolrunner'
|
||||
import {ExecOptions, ExecOutput, ExecListeners} from './interfaces.js'
|
||||
import * as tr from './toolrunner.js'
|
||||
|
||||
export {ExecOptions, ExecOutput, ExecListeners}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as events from 'events'
|
||||
import * as child from 'child_process'
|
||||
import * as path from 'path'
|
||||
import * as stream from 'stream'
|
||||
import * as im from './interfaces'
|
||||
import * as im from './interfaces.js'
|
||||
import * as io from '@actions/io'
|
||||
import * as ioUtil from '@actions/io/lib/io-util'
|
||||
import {setTimeout} from 'timers'
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./lib",
|
||||
"rootDir": "./src"
|
||||
"rootDir": "./src",
|
||||
"module": "node16",
|
||||
"moduleResolution": "node16"
|
||||
},
|
||||
"include": [
|
||||
"./src"
|
||||
|
||||
Reference in New Issue
Block a user