diff --git a/.github/workflows/push-workflow.yaml b/.github/workflows/push-workflow.yaml index e85de8f..25ade04 100644 --- a/.github/workflows/push-workflow.yaml +++ b/.github/workflows/push-workflow.yaml @@ -9,18 +9,17 @@ jobs: strategy: matrix: os: - - ubuntu-18.04 - ubuntu-20.04 + - ubuntu-22.04 - ubuntu-latest - macos-latest - windows-2019 - windows-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: - # Use the minimum supported mabl-cli Node.js LTS version here - node-version: '14.x' + node-version-file: '.nvmrc' - name: Install dependencies run: npm ci diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..209e3ef --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20 diff --git a/README.md b/README.md index eb3fcbe..b5a0626 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ GitHub action to configure the installs and configures the CLI with a mabl API key, if one is provided. Note that API keys should be stored as [GitHub secrets](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization). -This action requires Node.js 12+ be installed as part of your workflow. +This action requires Node.js 18+ be installed as part of your workflow. The [mabl-cli](https://www.npmjs.com/package/@mablhq/mabl-cli) will be installed into that Node.js runtime. See below for an example of how to install Node.js. @@ -27,8 +27,8 @@ See below for an example of how to install Node.js. ## Requirements -- Requires Node.js 12+ be installed as a prior step. This is most easily done with - the `actions/setup-node@v2` action. +- Requires Node.js 18+ be installed as a prior step. This is most easily done with + the `actions/setup-node@v4` action. ## Examples @@ -46,9 +46,9 @@ jobs: name: Mabl Tests runs-on: ubuntu-latest steps: - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' - uses: mablhq/setup-mabl-cli@v1 with: @@ -60,7 +60,7 @@ jobs: run: mabl test-runs export ar5vXBJ-rpan1nSs445s3A-jr -f screenshots.zip - name: Upload screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: screenshots path: screenshots.zip @@ -83,9 +83,9 @@ jobs: matrix: os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: - node-version: '16.x' + node-version: '18.x' - uses: mablhq/setup-mabl-cli@v1 with: diff --git a/action.yml b/action.yml index 2a78c85..ae813c2 100644 --- a/action.yml +++ b/action.yml @@ -14,5 +14,5 @@ inputs: description: (optional) The id of the workspace to configure as default for the CLI required: false runs: - using: "node16" + using: "node20" main: "lib/index.js" diff --git a/package-lock.json b/package-lock.json index 4cae5c8..ff2f0a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,112 +1,156 @@ { "name": "setup-mabl-cli", - "version": "1.4.0", - "lockfileVersion": 1, + "version": "1.4.1", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@actions/core": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz", - "integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==", - "requires": { + "packages": { + "": { + "name": "setup-mabl-cli", + "version": "1.4.1", + "dependencies": { + "@actions/core": "1.10.1", + "@actions/exec": "1.1.1", + "@actions/tool-cache": "2.0.1" + }, + "devDependencies": { + "@types/es6-promise": "3.3.0", + "@types/mocha": "10.0.0", + "@types/node": "20.12.12", + "@types/q": "1.5.5", + "typescript": "4.8.4" + } + }, + "node_modules/@actions/core": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.1.tgz", + "integrity": "sha512-3lBR9EDAY+iYIpTnTIXmWcNbX3T2kCkAEQGIQx4NVQ0575nk2k3GRZDTPQG+vVtS2izSLmINlxXf0uLtnrTP+g==", + "dependencies": { "@actions/http-client": "^2.0.1", "uuid": "^8.3.2" } }, - "@actions/exec": { + "node_modules/@actions/exec": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", "integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==", - "requires": { + "dependencies": { "@actions/io": "^1.0.1" } }, - "@actions/http-client": { + "node_modules/@actions/http-client": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", - "requires": { + "dependencies": { "tunnel": "^0.0.6" } }, - "@actions/io": { + "node_modules/@actions/io": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.2.tgz", "integrity": "sha512-d+RwPlMp+2qmBfeLYPLXuSRykDIFEwdTA0MMxzS9kh4kvP1ftrc/9fzy6pX6qAjthdXruHQ6/6kjT/DNo5ALuw==" }, - "@actions/tool-cache": { + "node_modules/@actions/tool-cache": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.1.tgz", "integrity": "sha512-iPU+mNwrbA8jodY8eyo/0S/QqCKDajiR8OxWTnSk/SnYg0sj8Hp4QcUEVC1YFpHWXtrfbQrE13Jz4k4HXJQKcA==", - "requires": { + "dependencies": { "@actions/core": "^1.2.6", "@actions/exec": "^1.0.0", "@actions/http-client": "^2.0.1", "@actions/io": "^1.1.1", "semver": "^6.1.0", "uuid": "^3.3.2" - }, - "dependencies": { - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - } } }, - "@types/es6-promise": { + "node_modules/@actions/tool-cache/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/@types/es6-promise": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/@types/es6-promise/-/es6-promise-3.3.0.tgz", "integrity": "sha512-ixCIAEkLUKv9movnHKCzx2rzAJgEnSALDXPrOSSwOjWwXFs0ssSZKan+O2e3FExPPCbX+DfA9NcKsbvLuyUlNA==", + "deprecated": "This is a stub types definition for es6-promise (https://github.com/jakearchibald/ES6-Promise). es6-promise provides its own type definitions, so you don't need @types/es6-promise installed!", "dev": true, - "requires": { + "dependencies": { "es6-promise": "*" } }, - "@types/mocha": { + "node_modules/@types/mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.0.tgz", "integrity": "sha512-rADY+HtTOA52l9VZWtgQfn4p+UDVM2eDVkMZT1I6syp0YKxW2F9v+0pbRZLsvskhQv/vMb6ZfCay81GHbz5SHg==", "dev": true }, - "@types/node": { - "version": "16.11.68", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.68.tgz", - "integrity": "sha512-JkRpuVz3xCNCWaeQ5EHLR/6woMbHZz/jZ7Kmc63AkU+1HxnoUugzSWMck7dsR4DvNYX8jp9wTi9K7WvnxOIQZQ==", - "dev": true + "node_modules/@types/node": { + "version": "20.12.12", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", + "integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } }, - "@types/q": { + "node_modules/@types/q": { "version": "1.5.5", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz", "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ==", "dev": true }, - "es6-promise": { + "node_modules/es6-promise": { "version": "4.2.8", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", "dev": true }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } }, - "tunnel": { + "node_modules/tunnel": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } }, - "typescript": { + "node_modules/typescript": { "version": "4.8.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "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==", "dev": true }, - "uuid": { + "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "bin": { + "uuid": "dist/bin/uuid" + } } } } diff --git a/package.json b/package.json index c80cc0c..55aff43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-mabl-cli", - "version": "1.4.0", + "version": "1.4.1", "description": "mabl GitHub action to setup mabl CLI", "main": "lib/index.js", "scripts": { @@ -10,14 +10,14 @@ }, "author": "mablhq", "dependencies": { - "@actions/core": "1.10.0", + "@actions/core": "1.10.1", "@actions/exec": "1.1.1", "@actions/tool-cache": "2.0.1" }, "devDependencies": { "@types/es6-promise": "3.3.0", "@types/mocha": "10.0.0", - "@types/node": "16.11.68", + "@types/node": "20.12.12", "@types/q": "1.5.5", "typescript": "4.8.4" } diff --git a/src/index.ts b/src/index.ts index 386bfb2..89e97ed 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,7 @@ import * as toolCache from '@actions/tool-cache'; type Option = T | undefined; -const REQUIRED_NODEJS_MAJOR_VERSION = 14; +const REQUIRED_NODEJS_MAJOR_VERSION = 18; async function run(): Promise { const version: Option = core.getInput('version', {required: false});