From 7875aed44f9cccfe158aa67106e30d4bb0ccb4cc Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 17 Jan 2025 14:37:40 -0500 Subject: [PATCH 1/2] Clear up package name confusion --- README.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 51207de..0b77e19 100644 --- a/README.md +++ b/README.md @@ -429,15 +429,15 @@ 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; diff --git a/package-lock.json b/package-lock.json index abad4c2..9843fb3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index 4753a8b..288efac 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "github-script", + "name": "@actions/github-script", "description": "A GitHub action for executing a simple script", "version": "7.0.1", "author": "GitHub", From 2f5a0ceb1a92ec8d8f79440e30859164d6a148bb Mon Sep 17 00:00:00 2001 From: Josh Gross Date: Fri, 17 Jan 2025 14:44:04 -0500 Subject: [PATCH 2/2] Update integration test for expected package name --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 13494d9..720dca1 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -39,7 +39,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