From e0639f1329f5cdad34837f958e08f4dbb728d541 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Mon, 21 Jul 2025 20:08:58 -0400 Subject: [PATCH 01/14] Create test workflow --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..66a35f94 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test +on: + push: + pull_request: + schedule: [{ cron: "0 0 10 * *" }] # monthly https://crontab.guru/#0_0_10_*_* + workflow_dispatch: + +permissions: {} + +jobs: + test: + uses: nodenv/.github/.github/workflows/test.yml@v5 + permissions: + contents: read + packages: read + id-token: write + security-events: write + statuses: write + + checksums: + runs-on: ubuntu-latest + steps: + - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 + with: { egress-policy: audit } + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: { fetch-depth: 0 } + - run: npm ci + + # FIXME workaround https://github.com/actions/checkout/issues/910 + - if: github.event_name == 'pull_request' + run: npm run lint:checksums -- origin/${{github.base_ref}} + - run: npm run lint:checksums -- HEAD^ + if: github.event_name == 'push' From 4b56ecf0f86965dab4d9926fac3385abc8c8e1fd Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Mon, 21 Jul 2025 20:17:52 -0400 Subject: [PATCH 02/14] automated lockfile update --- package-lock.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package-lock.json b/package-lock.json index 568900e3..7c4fff57 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,6 +5,7 @@ "requires": true, "packages": { "": { + "name": "@nodenv/node-build-prerelease", "version": "1.1.0", "hasInstallScript": true, "license": "MIT", From 6f9a10f462ad1d331597f9f4f662f5e1da2620b5 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 10:42:46 -0400 Subject: [PATCH 03/14] Add prettier --- .github/workflows/test.yml | 3 +-- package-lock.json | 19 ++++++++++++++++++- package.json | 5 +++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 66a35f94..b608678f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,10 +6,9 @@ on: workflow_dispatch: permissions: {} - jobs: test: - uses: nodenv/.github/.github/workflows/test.yml@v5 + uses: nodenv/.github/.github/workflows/test.yml@v6 permissions: contents: read packages: read diff --git a/package-lock.json b/package-lock.json index 7c4fff57..51d3a735 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,8 @@ "devDependencies": { "@nodenv/node-build-update-defs": "^2.11.1", "bats": "^1.12.0", - "brew-publish": "^2.3.1" + "brew-publish": "^2.3.1", + "prettier": "^3.6.2" } }, "node_modules/@nodenv/node-build-update-defs": { @@ -47,6 +48,22 @@ "bin": { "brew-publish": "bin/brew-publish" } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } } } } diff --git a/package.json b/package.json index 5fffe901..0360c340 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Install NodeJS prerelease versions", "homepage": "https://github.com/nodenv/node-build-prerelease#readme", "license": "MIT", - "author": "Jason Karns (http://jason.karns.name)", + "author": "Jason Karns (http://jasonkarns.com)", "repository": { "type": "git", "url": "https://github.com/nodenv/node-build-prerelease.git" @@ -36,6 +36,7 @@ "devDependencies": { "@nodenv/node-build-update-defs": "^2.11.1", "bats": "^1.12.0", - "brew-publish": "^2.3.1" + "brew-publish": "^2.3.1", + "prettier": "^3.6.2" } } From b220a786a3bab76536408b18fb85fcaf6065a13b Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 10:43:14 -0400 Subject: [PATCH 04/14] Prettier format --- .github/workflows/sync-default-branch.yml | 3 +-- .github/workflows/test.yml | 20 ++++++++++---------- README.md | 16 +++++++--------- 3 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.github/workflows/sync-default-branch.yml b/.github/workflows/sync-default-branch.yml index 9d122c79..0d3b55e8 100644 --- a/.github/workflows/sync-default-branch.yml +++ b/.github/workflows/sync-default-branch.yml @@ -6,9 +6,8 @@ permissions: {} jobs: sync: - permissions: {contents: write} + permissions: { contents: write } uses: nodenv/.github/.github/workflows/sync-default-branch.yml@v5 - # One-time commands for users to switch-over: # # ```console diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b608678f..68498ab2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,14 +19,14 @@ jobs: checksums: runs-on: ubuntu-latest steps: - - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 - with: { egress-policy: audit } - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: { fetch-depth: 0 } - - run: npm ci + - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 + with: { egress-policy: audit } + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: { fetch-depth: 0 } + - run: npm ci - # FIXME workaround https://github.com/actions/checkout/issues/910 - - if: github.event_name == 'pull_request' - run: npm run lint:checksums -- origin/${{github.base_ref}} - - run: npm run lint:checksums -- HEAD^ - if: github.event_name == 'push' + # FIXME workaround https://github.com/actions/checkout/issues/910 + - if: github.event_name == 'pull_request' + run: npm run lint:checksums -- origin/${{github.base_ref}} + - run: npm run lint:checksums -- HEAD^ + if: github.event_name == 'push' diff --git a/README.md b/README.md index 24d05124..21ca0ce8 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ node-build-prerelease is an [nodenv][] plugin (or more precisely, a [node-build] - [Installation](#installation) - * [Installing with Homebrew (for OS X users)](#installing-with-homebrew-for-os-x-users) - * [Installing via git-clone](#installing-via-git-clone) - * [Installing via npm](#installing-via-npm) - * [Installing manually](#installing-manually) + - [Installing with Homebrew (for OS X users)](#installing-with-homebrew-for-os-x-users) + - [Installing via git-clone](#installing-via-git-clone) + - [Installing via npm](#installing-via-npm) + - [Installing manually](#installing-manually) - [Usage](#usage) - * [Setting NODE_BUILD_DEFINITIONS](#setting-node_build_definitions) - * [Passing build definition directly](#passing-build-definition-directly) + - [Setting NODE_BUILD_DEFINITIONS](#setting-node_build_definitions) + - [Passing build definition directly](#passing-build-definition-directly) @@ -24,7 +24,7 @@ node-build-prerelease is an [nodenv][] plugin (or more precisely, a [node-build] Mac OS X users can install node-build-prerelease with the [Homebrew][]. Installing via Homebrew will make node-build aware of nodejs prereleases automatically. -*This is the recommended method of installation if you installed nodenv or node-build with Homebrew.* +_This is the recommended method of installation if you installed nodenv or node-build with Homebrew._ brew install nodenv/nodenv/node-build-prerelease @@ -106,8 +106,6 @@ Or: node-build /path/to/node-build-prerelease/share/node-build/8.0.0-rc.2 /dest/path/8.0.0-rc.2 - - [homebrew]: http://brew.sh [nodenv]: https://github.com/nodenv/nodenv [node-build]: https://github.com/nodenv/node-build From 2a970bebe478e1b65cf8cfd75a631666e094fdf1 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 10:45:18 -0400 Subject: [PATCH 05/14] natural language lintfixes --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 21ca0ce8..af7b6589 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ [![Build Status](https://travis-ci.org/nodenv/node-build-prerelease.svg?branch=master)](https://travis-ci.org/nodenv/node-build-prerelease) -node-build-prerelease is an [nodenv][] plugin (or more precisely, a [node-build][] plugin) that provides build definitions for nodejs prereleases (primarily release candidates). +node-build-prerelease is an [nodenv][] plugin (or more precisely, a [node-build][] plugin) that provides build definitions for Node.js prereleases (primarily release candidates). - [Installation](#installation) - - [Installing with Homebrew (for OS X users)](#installing-with-homebrew-for-os-x-users) + - [Installing with Homebrew (for macOS users)](#installing-with-homebrew-for-macos-users) - [Installing via git-clone](#installing-via-git-clone) - [Installing via npm](#installing-via-npm) - [Installing manually](#installing-manually) @@ -19,17 +19,17 @@ node-build-prerelease is an [nodenv][] plugin (or more precisely, a [node-build] ## Installation -### Installing with Homebrew (for OS X users) +### Installing with Homebrew (for macOS users) -Mac OS X users can install node-build-prerelease with the [Homebrew][]. -Installing via Homebrew will make node-build aware of nodejs prereleases automatically. +MacOS users can install node-build-prerelease with the [Homebrew][]. +Installing via Homebrew will make node-build aware of Node.js prereleases automatically. _This is the recommended method of installation if you installed nodenv or node-build with Homebrew._ brew install nodenv/nodenv/node-build-prerelease -There is the added delay between when a new version of node-build-prerelease is released, and when the homebrew formula is updated to point to it. -Typically this additional delay is only a matter of days and is well worth the simplicity of using homebrew to manage nodenv plugins. +There is the added delay between when a new version of node-build-prerelease is released, and when the Homebrew formula is updated to point to it. +Typically this additional delay is only a matter of days and is well worth the simplicity of using Homebrew to manage nodenv plugins. (And if you _really_ want to be on the bleeding edge of node-build, you can skip waiting on node-build/node-build-prerelease to update and scrape new node releases yourself with [node-build-update-defs][].) From dc0bde3c86c1d14c23e5e2a57db116e598437c06 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 10:49:52 -0400 Subject: [PATCH 06/14] Update definition scripts --- .travis.yml | 10 ---------- package.json | 7 ++++--- 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e6da7aa..00000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: node -cache: npm - -jobs: - include: - - stage: test - - stage: verify definitions - if: type = pull_request - script: npm run verify-definitions -- $TRAVIS_COMMIT_RANGE diff --git a/package.json b/package.json index 0360c340..f9cd3b16 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,10 @@ "postinstall": "script/postinstall", "posttest": "npm run lint", "lint": "git ls-files bin script **/*.*sh | xargs shellcheck", - "scrape-definitions": "nodenv-update-version-defs --nodejs-pre --chakracore-pre --nodejs-nightly --chakracore-nightly -d $PWD/share/node-build/", - "submit-definitions": "node_modules/@nodenv/node-build-update-defs/script/submit-definitions", - "verify-definitions": "node_modules/@nodenv/node-build-update-defs/script/verify-definitions", + "lint:checksums": "npm explore @nodenv/node-build-update-defs -- npm run defs:verify --", + "scrape-definitions": "nodenv-update-version-defs --nodejs-pre --chakracore-pre --nodejs-nightly --chakracore-nightly -d share/node-build/", + "commit-definitions": "npm explore @nodenv/node-build-update-defs -- npm run defs:commit --", + "submit-definitions": "npm explore @nodenv/node-build-update-defs -- npm run defs:submit --", "preversion": "script/preversion", "postversion": "npm publish", "prepublishOnly": "npm run publish:github && npm run publish:brew", From 82642a4ad3c5859c293f210df9a3c6dc9da11d45 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 11:36:35 -0400 Subject: [PATCH 07/14] Add start and test scripts --- package.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index f9cd3b16..bc97ad2b 100644 --- a/package.json +++ b/package.json @@ -21,13 +21,15 @@ }, "scripts": { "clean": "git clean -f -- share", - "postinstall": "script/postinstall", - "posttest": "npm run lint", - "lint": "git ls-files bin script **/*.*sh | xargs shellcheck", - "lint:checksums": "npm explore @nodenv/node-build-update-defs -- npm run defs:verify --", + "start": "npm run scrape-definitions", "scrape-definitions": "nodenv-update-version-defs --nodejs-pre --chakracore-pre --nodejs-nightly --chakracore-nightly -d share/node-build/", "commit-definitions": "npm explore @nodenv/node-build-update-defs -- npm run defs:commit --", "submit-definitions": "npm explore @nodenv/node-build-update-defs -- npm run defs:submit --", + "test": "bats ${CI:+--tap} test", + "posttest": "npm run lint", + "lint": "git ls-files bin script **/*.*sh | xargs shellcheck", + "lint:checksums": "npm explore @nodenv/node-build-update-defs -- npm run defs:verify --", + "postinstall": "script/postinstall", "preversion": "script/preversion", "postversion": "npm publish", "prepublishOnly": "npm run publish:github && npm run publish:brew", From b8446f46ea6dc6c3202830482e9fc515e6c3467b Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 11:39:31 -0400 Subject: [PATCH 08/14] Use GHA for release flow --- .github/workflows/release.yml | 10 ++++++++++ package-lock.json | 10 ---------- package.json | 6 +----- script/publish/github | 24 ------------------------ 4 files changed, 11 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100755 script/publish/github diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..fa010a8b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,10 @@ +name: Release +on: + push: { tags: "v[0-9]+.[0-9]+.[0-9]+*" } + +permissions: {} +jobs: + release: + permissions: { contents: write, id-token: write } + uses: nodenv/.github/.github/workflows/release.yml@v6 + secrets: inherit diff --git a/package-lock.json b/package-lock.json index 51d3a735..a2a78ff9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "devDependencies": { "@nodenv/node-build-update-defs": "^2.11.1", "bats": "^1.12.0", - "brew-publish": "^2.3.1", "prettier": "^3.6.2" } }, @@ -40,15 +39,6 @@ "bats": "bin/bats" } }, - "node_modules/brew-publish": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/brew-publish/-/brew-publish-2.3.1.tgz", - "integrity": "sha512-JtitWM9jtnQk2gerUbvpiYJqUPYrvU43Wet1FDm9w81nJJO4BLAeVLUTFWQTQkV7QtE3AVO203R/67NeTMxzVw==", - "dev": true, - "bin": { - "brew-publish": "bin/brew-publish" - } - }, "node_modules/prettier": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", diff --git a/package.json b/package.json index bc97ad2b..79af58f5 100644 --- a/package.json +++ b/package.json @@ -31,15 +31,11 @@ "lint:checksums": "npm explore @nodenv/node-build-update-defs -- npm run defs:verify --", "postinstall": "script/postinstall", "preversion": "script/preversion", - "postversion": "npm publish", - "prepublishOnly": "npm run publish:github && npm run publish:brew", - "publish:brew": "brew-publish", - "publish:github": "script/publish/github" + "postversion": "git push --follow-tags" }, "devDependencies": { "@nodenv/node-build-update-defs": "^2.11.1", "bats": "^1.12.0", - "brew-publish": "^2.3.1", "prettier": "^3.6.2" } } diff --git a/script/publish/github b/script/publish/github deleted file mode 100755 index e28b0771..00000000 --- a/script/publish/github +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash -# Usage: script/publish/github -# -# - creates a Release on github - -set -euo pipefail - -new_version=${1:-$npm_package_version} - -previous_tag() { - git describe --tags --abbrev=0 HEAD^ -} - -release_message() { - echo "node-build-prerelease $new_version" - echo - git log --no-merges --format='%w(0,0,2)* %B' --reverse "$(previous_tag)..HEAD^" -- bin share -} - -git push --follow-tags - -release_message | hub release create --file=- "v$new_version" || true - -hub browse -- "releases/v$new_version" From 9f3c3e1ed14b37333f1d045d4f6ca214389b997f Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 11:55:05 -0400 Subject: [PATCH 09/14] shfmt format --- install.sh | 2 +- script/postinstall | 18 +++++++++--------- script/preversion | 12 ++++++------ 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 0b0bfa87..2f83f9ab 100755 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ set -e cd "$(dirname "$0")" if [ -z "${PREFIX}" ]; then - PREFIX="/usr/local" + PREFIX="/usr/local" fi SHARE_PATH="${PREFIX}/share/node-build" diff --git a/script/postinstall b/script/postinstall index 072fe199..25aec2b5 100755 --- a/script/postinstall +++ b/script/postinstall @@ -4,21 +4,21 @@ set -euo pipefail IFS=$'\n\t' installed_by_name() { - local pattern='"remain":\["'${npm_package_name-} + local pattern='"remain":\["'${npm_package_name-} - [[ ${npm_config_argv-} =~ $pattern ]] + [[ ${npm_config_argv-} =~ $pattern ]] } if [ -n "${npm_config_argv-}" ] && ! installed_by_name; then - exit + exit fi cat <<-MSG -==================== -${npm_package_name-} caveats: + ==================== + ${npm_package_name-} caveats: -For \`node-build\`/\`nodenv install\` to pick up definitions provided by this plugin, -ensure share/node-build directory exists in NODE_BUILD_DEFINITIONS: - export NODE_BUILD_DEFINITIONS="$PWD/share/node-build" -==================== + For \`node-build\`/\`nodenv install\` to pick up definitions provided by this plugin, + ensure share/node-build directory exists in NODE_BUILD_DEFINITIONS: + export NODE_BUILD_DEFINITIONS="$PWD/share/node-build" + ==================== MSG diff --git a/script/preversion b/script/preversion index 2ba2cfa4..98c03c05 100755 --- a/script/preversion +++ b/script/preversion @@ -12,18 +12,18 @@ git fetch --quiet --tags origin master existing="$(git tag --points-at HEAD)" if [ -n "$existing" ]; then - echo "Aborting: HEAD is already tagged as '${existing}'" >&2 - exit 1 + echo "Aborting: HEAD is already tagged as '${existing}'" >&2 + exit 1 fi current_branch="$(git symbolic-ref --short HEAD)" if [ "$current_branch" != master ]; then - echo "Aborting: Not currently on master branch" >&2 - exit 1 + echo "Aborting: Not currently on master branch" >&2 + exit 1 fi previous_tag="$(git describe --tags --abbrev=0)" if git diff --quiet "${previous_tag}..HEAD" -- bin share; then - echo "Aborting: No features to release since '${previous_tag}'" >&2 - exit 1 + echo "Aborting: No features to release since '${previous_tag}'" >&2 + exit 1 fi From 024aef72d889b4c61ef582385fbcf171f9156a83 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 11:59:24 -0400 Subject: [PATCH 10/14] Disable npm-test until tests exist --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68498ab2..3f8f489b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,7 @@ permissions: {} jobs: test: uses: nodenv/.github/.github/workflows/test.yml@v6 + with: { npm: false } permissions: contents: read packages: read From c2c7817bcf5fdde8f29250d9b82850e06a431c79 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 12:07:59 -0400 Subject: [PATCH 11/14] Definition scraping workflow --- .github/workflows/definitions.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/definitions.yml diff --git a/.github/workflows/definitions.yml b/.github/workflows/definitions.yml new file mode 100644 index 00000000..b9064f85 --- /dev/null +++ b/.github/workflows/definitions.yml @@ -0,0 +1,34 @@ +name: Definitions +on: + schedule: [{cron: '0 */6 * * *'}] # 6hrly https://crontab.guru/#0_*/6_*_*_* + workflow_dispatch: + +permissions: {} +jobs: + scrape: + runs-on: ubuntu-latest + permissions: { contents: read } + steps: + - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 + with: { egress-policy: audit } + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - run: npm ci + + - run: npm run scrape-definitions + - run: npm run commit-definitions + env: + GIT_AUTHOR_NAME: ${{ vars.NODENV_BOT_NAME }} + GIT_AUTHOR_EMAIL: ${{ vars.NODENV_BOT_EMAIL }} + GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }} + GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }} + + - id: log + run: | + msg=$(git log --format='- %s' --reverse ${{github.sha}}..) + echo "message=${msg//$'\n'/'%0A'}" >> $GITHUB_OUTPUT + - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 + with: + token: ${{ secrets.BOT_TOKEN }} + branch: latest-scraped-definitions + title: 'Scraped latest definitions' + body: ${{ steps.log.outputs.message }} From e64140c152c8f984ec53e1ded80af926e9959b44 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 12:33:27 -0400 Subject: [PATCH 12/14] Prettier yaml --- .github/workflows/definitions.yml | 44 +++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/definitions.yml b/.github/workflows/definitions.yml index b9064f85..d8d9491f 100644 --- a/.github/workflows/definitions.yml +++ b/.github/workflows/definitions.yml @@ -1,6 +1,6 @@ name: Definitions on: - schedule: [{cron: '0 */6 * * *'}] # 6hrly https://crontab.guru/#0_*/6_*_*_* + schedule: [{ cron: "0 */6 * * *" }] # 6hrly https://crontab.guru/#0_*/6_*_*_* workflow_dispatch: permissions: {} @@ -9,26 +9,26 @@ jobs: runs-on: ubuntu-latest permissions: { contents: read } steps: - - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 - with: { egress-policy: audit } - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - run: npm ci + - uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 + with: { egress-policy: audit } + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - run: npm ci - - run: npm run scrape-definitions - - run: npm run commit-definitions - env: - GIT_AUTHOR_NAME: ${{ vars.NODENV_BOT_NAME }} - GIT_AUTHOR_EMAIL: ${{ vars.NODENV_BOT_EMAIL }} - GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }} - GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }} + - run: npm run scrape-definitions + - run: npm run commit-definitions + env: + GIT_AUTHOR_NAME: ${{ vars.NODENV_BOT_NAME }} + GIT_AUTHOR_EMAIL: ${{ vars.NODENV_BOT_EMAIL }} + GIT_COMMITTER_NAME: ${{ vars.GHA_BOT_NAME }} + GIT_COMMITTER_EMAIL: ${{ vars.GHA_BOT_EMAIL }} - - id: log - run: | - msg=$(git log --format='- %s' --reverse ${{github.sha}}..) - echo "message=${msg//$'\n'/'%0A'}" >> $GITHUB_OUTPUT - - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 - with: - token: ${{ secrets.BOT_TOKEN }} - branch: latest-scraped-definitions - title: 'Scraped latest definitions' - body: ${{ steps.log.outputs.message }} + - id: log + run: | + msg=$(git log --format='- %s' --reverse ${{github.sha}}..) + echo "message=${msg//$'\n'/'%0A'}" >> $GITHUB_OUTPUT + - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 + with: + token: ${{ secrets.BOT_TOKEN }} + branch: latest-scraped-definitions + title: "Scraped latest definitions" + body: ${{ steps.log.outputs.message }} From c9115275250cc1a08ec601530a9653c42f802a31 Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 12:41:52 -0400 Subject: [PATCH 13/14] Ignore npm tarballs (and unpacked tarballs) --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 07e6e472..bc6ce3d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ /node_modules +/package*/ +/tmp + +/nodenv-node-build-prerelease-*.tgz From 7f7a3f1f3b45b422636787129b979190079ecf2a Mon Sep 17 00:00:00 2001 From: Jason Karns Date: Wed, 23 Jul 2025 12:40:00 -0400 Subject: [PATCH 14/14] lintfix --- .github/workflows/definitions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/definitions.yml b/.github/workflows/definitions.yml index d8d9491f..4036c69e 100644 --- a/.github/workflows/definitions.yml +++ b/.github/workflows/definitions.yml @@ -24,8 +24,9 @@ jobs: - id: log run: | + # TODO fix this whole PR body mess msg=$(git log --format='- %s' --reverse ${{github.sha}}..) - echo "message=${msg//$'\n'/'%0A'}" >> $GITHUB_OUTPUT + echo "message=${msg//$'\n'/'%0A'}" >> "$GITHUB_OUTPUT" - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 with: token: ${{ secrets.BOT_TOKEN }}