Compare commits

..

50 Commits

Author SHA1 Message Date
dependabot[bot]
6d3beb123a Bump brace-expansion from 1.1.11 to 1.1.12
Bumps [brace-expansion](https://github.com/juliangruber/brace-expansion) from 1.1.11 to 1.1.12.
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12)

---
updated-dependencies:
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-04 12:03:29 +00:00
Salman Chishti
20fe497b3f Merge pull request #637 from actions/node24
Update Node.js version support to 24.x
2025-09-04 10:55:50 +01:00
Salman Muin Kayser Chishti
e7b7f222b1 update licenses 2025-08-08 12:15:47 +01:00
Salman Muin Kayser Chishti
2c81ba05f3 Update Node.js version support to 24.x
Bump Node.js version requirement from 20.x to 24.x in action configuration and package files. Update @types/node and undici-types dependencies to match Node 24 compatibility.
2025-07-29 14:08:35 +01:00
Ben De St Paer-Gotch
f28e40c7f3 Merge pull request #610 from actions/nebuk89-patch-1
Update README.md
2025-06-06 09:19:36 +01:00
Ben De St Paer-Gotch
1ae9958572 Update README.md 2025-06-02 10:34:00 +01:00
Josh Gross
5ee2b97722 Merge pull request #603 from actions/joshmgross/document-inputs
Clearly document passing inputs to the `script`
2025-05-14 10:27:18 -04:00
Josh Gross
3424b52d08 typo fixes 2025-05-13 11:04:53 -04:00
Josh Gross
f9d8109d52 Clearly document passing inputs to the script 2025-05-13 10:53:59 -04:00
Josh Gross
e7aeb8c663 Merge pull request #575 from actions/dependabot/github_actions/ruby/setup-ruby-1.229.0
Bump ruby/setup-ruby from 1.222.0 to 1.229.0
2025-04-02 10:56:06 -04:00
dependabot[bot]
5b5837ac81 Bump ruby/setup-ruby from 1.222.0 to 1.229.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.222.0 to 1.229.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](277ba2a127...354a1ad156)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-31 19:45:58 +00:00
Josh Gross
3908079ba1 Merge pull request #563 from actions/dependabot/github_actions/ruby/setup-ruby-1.222.0
Bump ruby/setup-ruby from 1.213.0 to 1.222.0
2025-03-10 15:14:55 -04:00
dependabot[bot]
14b73c4a7e Bump ruby/setup-ruby from 1.213.0 to 1.222.0
Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.213.0 to 1.222.0.
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](28c4deda89...277ba2a127)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-10 19:08:31 +00:00
Josh Gross
62c3794a3e Merge pull request #546 from neilime/patch-1
docs: add "exec" usage examples
2025-03-05 15:32:44 -05:00
Emilien Escalle
ea5430244c Merge branch 'actions:main' into patch-1 2025-03-04 07:29:17 +01:00
Josh Gross
d0bdabac5f Merge pull request #557 from actions/joshmgross/fix-readme-v7
Remove `octokit` README updates for v7
2025-02-26 14:46:35 -05:00
Josh Gross
851500a2ad Remove octokit README updates for v7
https://github.com/actions/github-script/issues/545
2025-02-26 14:38:00 -05:00
Emilien Escalle
86ac1371ea docs: add "exec" usage examples 2025-02-17 11:50:46 +01:00
Josh Gross
378a50fac5 Merge pull request #508 from iamstarkov/patch-2
make octokit instance available as octokit on top of github, to make it easier to seamlessly copy examples from GitHub rest api or octokit documentations
2025-02-04 14:47:03 -05:00
Vladimir Starkov
632050422e fix: adjust types 2025-01-31 11:55:53 +01:00
Vladimir Starkov
f23cd47e29 replace GitHub with octokit in the README, but keep a note of the GitHub still being available 2025-01-31 11:20:25 +01:00
Vladimir Starkov
4024541289 make octokit instance available as octokit on top of github, to make it easier to seamless to copy examples from GitHub api or octokit documentation 2025-01-31 11:20:25 +01:00
Josh Gross
91a83c0917 Merge pull request #473 from nschonni/upstream-setup-license
ci: Use github/setup-licensed
2025-01-29 11:34:59 -05:00
Josh Gross
586a6a1c85 Merge branch 'main' into upstream-setup-license 2025-01-29 11:31:44 -05:00
Josh Gross
8cf50d1501 Merge pull request #533 from nschonni/remove-vscode
chore: Remove .vscode settings
2025-01-29 11:30:27 -05:00
Josh Gross
511abaae1c Merge branch 'main' into remove-vscode 2025-01-29 11:22:32 -05:00
Josh Gross
eb88965f42 Merge pull request #532 from nschonni/sub-action-dependabot
chore: Add Dependabot for .github/actions/install-dependencies
2025-01-29 11:22:24 -05:00
Josh Gross
eef4fd9090 Merge branch 'main' into remove-vscode 2025-01-29 11:22:16 -05:00
Josh Gross
6efc7571cb Merge branch 'main' into sub-action-dependabot 2025-01-29 11:21:01 -05:00
Josh Gross
08caaddc54 Merge pull request #531 from actions/joshmgross/update-workflows
Define `permissions` in workflows and update actions
2025-01-29 11:20:46 -05:00
Nick Schonning
ac230a1936 chore: Remove .vscode settings 2025-01-28 17:18:57 -05:00
Nick Schonning
8e643f1530 chore: Add Dependabot for .github/actions/install-dependencies 2025-01-28 17:04:29 -05:00
Josh Gross
19e58d8525 Define permissions in workflows and update actions 2025-01-28 16:50:07 -05:00
Josh Gross
c94e1c45ff Merge pull request #472 from nschonni/setup-dependabot
chore: Add Dependabot for NPM and Actions
2025-01-28 16:36:48 -05:00
Josh Gross
3e8cf0fede Merge branch 'main' into setup-dependabot 2025-01-28 16:35:38 -05:00
Nick Schonning
fd2cfc12fa ci: pin ruby/setup-ruby 2025-01-25 16:18:58 -05:00
Nick Schonning
f2f7f58db4 ci: Use github/setup-licensed 2025-01-25 16:15:22 -05:00
Josh Gross
d70566966b Merge pull request #478 from timotk/patch-1
Specify that the used script is JavaScript
2025-01-17 15:31:49 -05:00
Josh Gross
ec12a47a4a Merge branch 'main' into patch-1 2025-01-17 15:14:36 -05:00
Josh Gross
ac452803c9 Merge pull request #515 from actions/joshmgross/npm-audit-fix
Update dependencies with `npm audit fix`
2025-01-17 15:06:43 -05:00
Josh Gross
1acfa1ca49 Merge branch 'main' into joshmgross/npm-audit-fix 2025-01-17 15:03:08 -05:00
Josh Gross
c6fc059534 Merge pull request #514 from actions/joshmgross/update-package-name
Clear up package name confusion
2025-01-17 15:00:06 -05:00
Josh Gross
766f5ddf0e Update licenses 2025-01-17 14:58:40 -05:00
Josh Gross
5e738b47b5 Update dependencies with npm audit fix 2025-01-17 14:56:43 -05:00
Josh Gross
2f5a0ceb1a Update integration test for expected package name 2025-01-17 14:44:04 -05:00
Josh Gross
7875aed44f Clear up package name confusion 2025-01-17 14:37:40 -05:00
Josh Gross
2bcb242a0a Merge pull request #512 from actions/joshmgross/upload-artifact-update
Update usage of `actions/upload-artifact`
2025-01-17 13:48:42 -05:00
Josh Gross
a32a57a185 Update usage of actions/upload-artifact 2025-01-16 15:53:49 -05:00
Timo
adfd270e4b Specify that the script is JavaScript 2024-07-10 10:44:37 +02:00
Nick Schonning
adc04e7dd8 chore: Add Dependabot for NPM and Actions 2024-06-03 18:13:31 -04:00
23 changed files with 1366 additions and 557 deletions

View File

@@ -3,9 +3,9 @@ description: 'Set up node and install dependencies'
runs:
using: 'composite'
steps:
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '24.x'
cache: npm
- run: npm ci

16
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
- package-ecosystem: 'github-actions'
directory: '/.github/actions/install-dependencies'
schedule:
interval: 'weekly'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'

View File

@@ -13,12 +13,15 @@ on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
check-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
@@ -35,7 +38,7 @@ jobs:
id: diff
# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist

View File

@@ -6,11 +6,14 @@ on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- run: npm run style:check
- run: npm test

View File

@@ -38,11 +38,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -56,7 +56,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -69,4 +69,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@@ -6,12 +6,15 @@ on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
test-return:
name: 'Integration test: return'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: output-set
uses: ./
with:
@@ -31,7 +34,7 @@ jobs:
name: 'Integration test: relative-path require'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: relative-require
uses: ./
with:
@@ -39,7 +42,7 @@ jobs:
result-encoding: string
- run: |
echo "- Validating relative require output"
if [[ "${{steps.relative-require.outputs.result}}" != "github-script" ]]; then
if [[ "${{steps.relative-require.outputs.result}}" != "@actions/github-script" ]]; then
echo $'::error::\u274C' "Expected '$expected', got ${{steps.relative-require.outputs.result}}"
exit 1
fi
@@ -49,7 +52,7 @@ jobs:
name: 'Integration test: npm package require'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- id: npm-require
uses: ./
@@ -69,7 +72,7 @@ jobs:
name: 'Integration test: GraphQL previews option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- id: previews-default
name: Default previews not set
@@ -122,7 +125,7 @@ jobs:
name: 'Integration test: user-agent option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- id: user-agent-default
name: Default user-agent not set
@@ -179,7 +182,7 @@ jobs:
name: "Integration test: debug option (runner.debug mode ${{ matrix.environment && 'enabled' || 'disabled' }})"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- id: debug-default
name: Default debug not set
@@ -253,7 +256,7 @@ jobs:
name: 'Integration test: base-url option'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/install-dependencies
- id: base-url-default

View File

@@ -8,17 +8,23 @@ on:
branches:
- main
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
name: Check licenses
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # prefer to use a full fetch for licensed workflows
# https://github.com/jonabc/setup-licensed/releases/tag/v1.1.1
- uses: jonabc/setup-licensed@82c5f4d19e8968efa74a25b132922382c2671fe2
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1.229.0
with:
version: '3.x'
ruby-version: ruby
- uses: github/setup-licensed@v1
with:
version: '4.x'
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: ./.github/actions/install-dependencies
- run: licensed status

View File

@@ -17,4 +17,4 @@ jobs:
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@0.0.3
uses: actions/publish-immutable-action@0.0.4

View File

@@ -5,11 +5,15 @@ on:
branches: [main]
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
pull-request-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./
with:
script: |
@@ -20,9 +24,9 @@ jobs:
issue_number: context.payload.number,
})
// Find any comment already made by the bot.
const botComment = comments.find(comment => comment.user.id === 41898282)
const commentBody = "Hello from actions/github-script! (${{ github.sha }})"
// Find any comment already made by the bot.
const botComment = comments.find(comment => comment.user.id === 41898282)
const commentBody = "Hello from actions/github-script! (${{ github.sha }})"
if (context.payload.pull_request.head.repo.full_name !== 'actions/github-script') {
console.log('Not attempting to write comment on PR from fork');

View File

@@ -1,31 +0,0 @@
name: Stale Issues & PRs
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
mark_stale:
name: Mark issues and PRs as stale
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-labels: Not Stale
exempt-pr-labels: Not Stale
stale-issue-message: >
This issue is stale because it has been open for 60 days with no
activity. Remove the "Stale" label or comment on the issue, or it
will be closed in 7 days.
stale-pr-message: >
This pull request is stale because it has been open for 60 days
with no activity. Remove the "Stale" label or comment on the pull
request, or it will be closed in 7 days.
close-issue-message: >
This issue has been marked as stale and closed due to no activity
on it.
close-pr-message: >
This pull request has been marked as stale and closed due to no
activity on it.

3
.gitignore vendored
View File

@@ -1,2 +1 @@
/node_modules/
!/.vscode/
/node_modules/

View File

@@ -1,6 +1,6 @@
---
name: "@types/node"
version: 20.9.0
version: 24.1.0
type: npm
summary: TypeScript definitions for node
homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node

View File

@@ -1,15 +1,17 @@
---
name: undici-types
version: 5.26.5
version: 7.8.0
type: npm
summary: A stand-alone types package for Undici
homepage: https://undici.nodejs.org
license: mit
licenses:
- sources: Auto-generated MIT license text
- sources: LICENSE
text: |
MIT License
Copyright (c) Matteo Collina and Undici contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights

View File

@@ -1,6 +1,6 @@
---
name: undici
version: 5.26.3
version: 5.28.5
type: npm
summary: An HTTP/1.1 client, written from scratch for Node.js
homepage: https://undici.nodejs.org

10
.vscode/settings.json vendored
View File

@@ -1,10 +0,0 @@
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"files.exclude": {
"**/dist": true,
"**/node_modules": true
}
}

146
README.md
View File

@@ -7,7 +7,27 @@
This action makes it easy to quickly write a script in your workflow that
uses the GitHub API and the workflow run context.
To use this action, provide an input named `script` that contains the body of an asynchronous function call.
### Note
Thank you for your interest in this GitHub action, however, right now we are not taking contributions.
We continue to focus our resources on strategic areas that help our customers be successful while making developers' lives easier. While GitHub Actions remains a key part of this vision, we are allocating resources towards other areas of Actions and are not taking contributions to this repository at this time. The GitHub public roadmap is the best place to follow along for any updates on features were working on and what stage theyre in.
We are taking the following steps to better direct requests related to GitHub Actions, including:
1. We will be directing questions and support requests to our [Community Discussions area](https://github.com/orgs/community/discussions/categories/actions)
2. High Priority bugs can be reported through Community Discussions or you can report these to our support team https://support.github.com/contact/bug-report.
3. Security Issues should be handled as per our [security.md](security.md)
We will still provide security updates for this project and fix major breaking changes during this time.
You are welcome to still raise bugs in this repo.
### This action
To use this action, provide an input named `script` that contains the body of an asynchronous JavaScript function call.
The following arguments will be provided:
- `github` A pre-authenticated
@@ -59,6 +79,31 @@ For example, `github.issues.createComment` in V4 becomes `github.rest.issues.cre
See [development.md](/docs/development.md).
## Passing inputs to the script
Actions expressions are evaluated before the `script` is passed to the action, so the result of any expressions
*will be evaluated as JavaScript code*.
It's highly recommended to *not* evaluate expressions directly in the `script` to avoid
[script injections](https://docs.github.com/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#understanding-the-risk-of-script-injections)
and potential `SyntaxError`s when the expression is not valid JavaScript code (particularly when it comes to improperly escaped strings).
To pass inputs, set `env` vars on the action step and reference them in your script with `process.env`:
```yaml
- uses: actions/github-script@v7
env:
TITLE: ${{ github.event.pull_request.title }}
with:
script: |
const title = process.env.TITLE;
if (title.startsWith('octocat')) {
console.log("PR title starts with 'octocat'");
} else {
console.error("PR title did not start with 'octocat'");
}
```
## Reading step results
The return value of the script will be in the step's outputs under the
@@ -132,26 +177,6 @@ By default, the following status codes will not be retried: `400, 401, 403, 404,
These retries are implemented using the [octokit/plugin-retry.js](https://github.com/octokit/plugin-retry.js) plugin. The retries use [exponential backoff](https://en.wikipedia.org/wiki/Exponential_backoff) to space out retries. ([source](https://github.com/octokit/plugin-retry.js/blob/9a2443746c350b3beedec35cf26e197ea318a261/src/error-request.ts#L13))
## Recommended Permissions
The permissions required for the `GITHUB_TOKEN` in your workflow vary depending on how you use `github-script`. To ensure secure and efficient use of this action, we recommend reviewing and setting the least privileges necessary for your use case.
### Determine the Required Permissions
1. **`GITHUB_TOKEN` Authentication**
GitHub automatically provides a `GITHUB_TOKEN` for workflows. You can customize the permissions granted to this token. Refer to the documentation for details:
[Permissions for the `GITHUB_TOKEN`](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
2. **API Calls with Installation Access Tokens**
If you're using `github-script` to make API calls requiring installation access tokens, ensure the permissions are configured appropriately for those endpoints. Learn more here:
[Permissions for installation access tokens](https://docs.github.com/en/rest/authentication/endpoints-available-for-github-app-installation-access-tokens)
### General Best Practices
- Use the principle of least privilege: Only grant the specific permissions needed for your workflow.
- Regularly audit and review your workflows to ensure permissions remain appropriate for your use cases.
- Test your workflows with the intended permissions to verify they work as expected without over-permissioning.
## Examples
Note that `github-token` is optional in this action, and the input is there
@@ -325,7 +350,7 @@ jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
@@ -363,7 +388,7 @@ jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/github-script@v7
env:
SHA: '${{env.parentSHA}}'
@@ -401,8 +426,8 @@ jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
- run: npm ci
@@ -437,7 +462,7 @@ jobs:
print-stuff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
@@ -449,42 +474,21 @@ jobs:
### Use scripts with jsDoc support
If you want type support for your scripts, you could use the command below to install the
`github-script` type declaration.
`@actions/github-script` type declaration.
```sh
$ npm i -D @types/github-script@github:actions/github-script
$ npm i -D @actions/github-script@github:actions/github-script
```
And then add the `jsDoc` declaration to your script like this:
```js
// @ts-check
/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
/** @param {import('@actions/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
export default async ({ core, context }) => {
core.debug("Running something at the moment");
return context.actor;
};
```
### Use env as input
You can set env vars to use them in your script:
```yaml
on: push
jobs:
echo-input:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
env:
FIRST_NAME: Mona
LAST_NAME: Octocat
with:
script: |
const { FIRST_NAME, LAST_NAME } = process.env
console.log(`Hello ${FIRST_NAME} ${LAST_NAME}`)
```
### Using a separate GitHub token
@@ -514,3 +518,45 @@ jobs:
labels: ['Triage']
})
```
### Using exec package
The provided [@actions/exec](https://github.com/actions/toolkit/tree/main/packages/exec) package allows to execute command or tools in a cross platform way:
```yaml
on: push
jobs:
use-exec:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
const exitCode = await exec.exec('echo', ['hello'])
console.log(exitCode)
```
`exec` packages provides `getExecOutput` function to retrieve stdout and stderr from executed command:
```yaml
on: push
jobs:
use-get-exec-output:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/github-script@v7
with:
script: |
const {
exitCode,
stdout,
stderr
} = await exec.getExecOutput('echo', ['hello']);
console.log(exitCode, stdout, stderr)
```

View File

@@ -36,5 +36,5 @@ outputs:
result:
description: The return value of the script, stringified with `JSON.stringify`
runs:
using: node20
using: node24
main: dist/index.js

1454
dist/index.js vendored

File diff suppressed because it is too large Load Diff

166
package-lock.json generated
View File

@@ -1,11 +1,11 @@
{
"name": "github-script",
"name": "@actions/github-script",
"version": "7.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "github-script",
"name": "@actions/github-script",
"version": "7.0.1",
"license": "MIT",
"dependencies": {
@@ -17,7 +17,7 @@
"@octokit/core": "^5.0.1",
"@octokit/plugin-request-log": "^4.0.0",
"@octokit/plugin-retry": "^6.0.1",
"@types/node": "^20.9.0"
"@types/node": "^24.1.0"
},
"devDependencies": {
"@types/jest": "^29.5.5",
@@ -35,7 +35,7 @@
"typescript": "^5.2.2"
},
"engines": {
"node": ">=20.0.0 <21.0.0"
"node": ">=24"
}
},
"node_modules/@aashutoshrathi/word-wrap": {
@@ -1487,9 +1487,9 @@
}
},
"node_modules/@pkgr/utils/node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
@@ -1672,11 +1672,12 @@
"dev": true
},
"node_modules/@types/node": {
"version": "20.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",
"version": "24.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
"integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
"license": "MIT",
"dependencies": {
"undici-types": "~5.26.4"
"undici-types": "~7.8.0"
}
},
"node_modules/@types/semver": {
@@ -2272,21 +2273,21 @@
}
},
"node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"dependencies": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
},
"engines": {
"node": ">=8"
@@ -2606,9 +2607,9 @@
}
},
"node_modules/cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
"dev": true,
"dependencies": {
"nice-try": "^1.0.4",
@@ -2702,9 +2703,9 @@
}
},
"node_modules/default-browser/node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
@@ -3216,9 +3217,9 @@
}
},
"node_modules/eslint/node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
@@ -3474,9 +3475,9 @@
}
},
"node_modules/execa/node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"dependencies": {
"path-key": "^3.1.0",
@@ -3649,9 +3650,9 @@
}
},
"node_modules/fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"dependencies": {
"to-regex-range": "^5.0.1"
@@ -5749,12 +5750,12 @@
}
},
"node_modules/micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"dependencies": {
"braces": "^3.0.2",
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
@@ -7102,9 +7103,9 @@
}
},
"node_modules/undici": {
"version": "5.26.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz",
"integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==",
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
@@ -7113,9 +7114,10 @@
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==",
"license": "MIT"
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
@@ -8483,9 +8485,9 @@
},
"dependencies": {
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -8652,11 +8654,11 @@
"dev": true
},
"@types/node": {
"version": "20.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",
"integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",
"version": "24.1.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.1.0.tgz",
"integrity": "sha512-ut5FthK5moxFKH2T1CUOC6ctR67rQRvvHdFLCD2Ql6KXmMuCrjsSsRI9UsLCm9M18BMwClv4pn327UvB7eeO1w==",
"requires": {
"undici-types": "~5.26.4"
"undici-types": "~7.8.0"
}
},
"@types/semver": {
@@ -9065,21 +9067,21 @@
}
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
"braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"requires": {
"fill-range": "^7.0.1"
"fill-range": "^7.1.1"
}
},
"browserslist": {
@@ -9302,9 +9304,9 @@
}
},
"cross-spawn": {
"version": "6.0.5",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
"version": "6.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.6.tgz",
"integrity": "sha512-VqCUuhcd1iB+dsv8gxPttb5iZh/D0iubSP21g36KXdEuf6I5JiioesUVjpCdHV9MZRUfVFlvwtIUyPfxo5trtw==",
"dev": true,
"requires": {
"nice-try": "^1.0.4",
@@ -9355,9 +9357,9 @@
},
"dependencies": {
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -9701,9 +9703,9 @@
}
},
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -9900,9 +9902,9 @@
},
"dependencies": {
"cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"dev": true,
"requires": {
"path-key": "^3.1.0",
@@ -10045,9 +10047,9 @@
}
},
"fill-range": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"requires": {
"to-regex-range": "^5.0.1"
@@ -11576,12 +11578,12 @@
"dev": true
},
"micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"requires": {
"braces": "^3.0.2",
"braces": "^3.0.3",
"picomatch": "^2.3.1"
}
},
@@ -12534,17 +12536,17 @@
}
},
"undici": {
"version": "5.26.3",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.3.tgz",
"integrity": "sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==",
"version": "5.28.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.28.5.tgz",
"integrity": "sha512-zICwjrDrcrUE0pyyJc1I2QzBkLM8FINsgOrt6WjA+BgajVq9Nxu2PbFFXUrAggLfDXlZGZBVZYw7WNV5KiBiBA==",
"requires": {
"@fastify/busboy": "^2.0.0"
}
},
"undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
"version": "7.8.0",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.8.0.tgz",
"integrity": "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="
},
"universal-user-agent": {
"version": "6.0.0",

View File

@@ -1,15 +1,14 @@
{
"name": "github-script",
"name": "@actions/github-script",
"description": "A GitHub action for executing a simple script",
"engines": {
"node": ">=24"
},
"version": "7.0.1",
"author": "GitHub",
"license": "MIT",
"main": "dist/index.js",
"types": "types/async-function.d.ts",
"private": true,
"engines": {
"node": ">=20.0.0 <21.0.0"
},
"scripts": {
"build": "npm run build:types && ncc build src/main.ts",
"build:types": "tsc src/async-function.ts -t es5 --declaration --allowJs --emitDeclarationOnly --outDir types",
@@ -47,7 +46,7 @@
"@octokit/core": "^5.0.1",
"@octokit/plugin-request-log": "^4.0.0",
"@octokit/plugin-retry": "^6.0.1",
"@types/node": "^20.9.0"
"@types/node": "^24.1.0"
},
"devDependencies": {
"@types/jest": "^29.5.5",

View File

@@ -11,6 +11,7 @@ export declare type AsyncFunctionArguments = {
context: Context
core: typeof core
github: InstanceType<typeof GitHub>
octokit: InstanceType<typeof GitHub>
exec: typeof exec
glob: typeof glob
io: typeof io

View File

@@ -62,6 +62,7 @@ async function main(): Promise<void> {
require: wrapRequire,
__original_require__: __non_webpack_require__,
github,
octokit: github,
context,
core,
exec,

View File

@@ -9,6 +9,7 @@ export declare type AsyncFunctionArguments = {
context: Context;
core: typeof core;
github: InstanceType<typeof GitHub>;
octokit: InstanceType<typeof GitHub>;
exec: typeof exec;
glob: typeof glob;
io: typeof io;