-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Instead of using a bundled node_modules, * Run `npm install` before performing various tasks Change pr-checks to not be particularly picky about the generated content because it will differ between different versions as everything is bundled together.
- Loading branch information
Showing
32 changed files
with
3,153 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,19 +26,23 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
shell: bash | ||
run: npm install | ||
|
||
- name: Lint | ||
id: lint | ||
run: npm run-script lint-ci | ||
|
||
- name: Upload sarif | ||
uses: github/codeql-action/upload-sarif@v3 | ||
# Only upload SARIF for the latest version of Node.js | ||
if: "!cancelled() && matrix.node-types-version == 'current' && !startsWith(github.head_ref, 'dependabot/')" | ||
if: ${{ !cancelled() && matrix.node-types-version == 'current' && !startsWith(github.head_ref, 'dependabot/') }} | ||
with: | ||
sarif_file: eslint.sarif | ||
category: eslint | ||
|
||
- name: Update version of @types/node | ||
- name: Override version of @types/node | ||
if: matrix.node-types-version != 'current' | ||
env: | ||
NODE_TYPES_VERSION: ${{ matrix.node-types-version }} | ||
|
@@ -52,6 +56,25 @@ jobs: | |
# `npm install` on Linux. | ||
npm install | ||
# esbuild embeds package.json version details into these files. | ||
# Since the jq step has actively changed package.json, we know that if these files | ||
# are successfully rebuilt (without the changes below), they would be dirty. | ||
# | ||
# In order to allow check-js.sh to verify that it can build them at all, we ignore them, | ||
# delete them, and commit those changes. Thus, when it runs, it will be able to try to | ||
# build them, and as long at they build, it will be happy. If it can't build them, it can | ||
# complain, although that error won't make much sense, because you shouldn't update them | ||
# using the wrong node types version information. | ||
( | ||
echo '*/*-action.js'; | ||
echo '*/*-action-post.js' | ||
) >> .gitignore | ||
for action in $( | ||
find * -mindepth 1 -maxdepth 1 -type f -name action.yml | ||
); do | ||
git rm -f "$(dirname "$action")"/*-action*.js | ||
done | ||
if [ ! -z "$(git status --porcelain)" ]; then | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "github-actions[bot]" | ||
|
@@ -112,6 +135,9 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build | ||
run: | | ||
npm run build | ||
- name: npm test | ||
run: | | ||
# Run any commands referenced in package.json using Bash, otherwise | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
bundle_file() { | ||
module=$(dirname "$1") | ||
file=$(perl -ne 'next unless m<'"$2"': .(?:.*/|)(.*\.js)>;print $1' "$1") | ||
if [ -n "$file" ]; then | ||
if [ "$2" = main ]; then | ||
suffix='' | ||
else | ||
suffix="-$2" | ||
fi | ||
./node_modules/.bin/esbuild "lib/$module-action$suffix.js" --bundle --minify --platform=node --outfile="./$module/$file" | ||
perl -pi -e 's/scripts:\{.*?\}/scripts:{}/' "./$module/$file" | ||
fi | ||
}; | ||
for a in */action.yml; do | ||
bundle_file $a main; | ||
bundle_file $a post; | ||
done |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ inputs: | |
required: false | ||
runs: | ||
using: node20 | ||
main: '../lib/autobuild-action.js' | ||
main: 'autobuild-action.js' |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.