Skip to content

Commit 4fe8ce0

Browse files
committed
Bundle action using esbuild
Remove node_modules from repository to reduce cost to download repository. Because node_modules is no longer included: * If `npm` isn't available (e.g. in a container), install it * Run `npm install` before performing various tasks
1 parent 6f2c5a6 commit 4fe8ce0

File tree

18,885 files changed

+3109
-4740764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

18,885 files changed

+3109
-4740764
lines changed

.github/actions/prepare-test/action.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ outputs:
1919
runs:
2020
using: composite
2121
steps:
22+
- name: Set up npm on Linux (because the container might not have it)
23+
if: ${{ runner.os == 'Linux' }}
24+
shell: bash
25+
run: |
26+
if ! command -v npm >/dev/null 2>/dev/null; then
27+
sudo apt-get update
28+
sudo apt-get install -y npm
29+
fi
30+
- name: npm install
31+
shell: bash
32+
run: npm install
2233
- name: Move codeql-action
2334
shell: bash
2435
run: |

.github/actions/update-bundle/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ runs:
88
shell: bash
99
run: npm install -g ts-node
1010

11+
- name: Install
12+
shell: bash
13+
run: npm install
14+
1115
- name: Run update script
1216
working-directory: ${{ github.action_path }}
1317
shell: bash

.github/workflows/pr-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v4
2828

29+
- name: Install
30+
run: npm install
31+
2932
- name: Lint
3033
id: lint
3134
run: npm run-script lint-ci

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Ignore for example failing-tests.json from AVA
2-
node_modules/.cache/
1+
# actions are bundled to make this repository lightweight for consumers
2+
node_modules/
3+
# lib is generated by tsc
4+
lib
35
# Java build files
46
.gradle/
57
*.class
@@ -8,4 +10,4 @@ node_modules/.cache/
810
# eslint sarif report
911
eslint.sarif
1012
# for local incremental compilation
11-
tsconfig.tsbuildinfo
13+
tsconfig.tsbuildinfo

analyze/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,5 @@ outputs:
9292
description: The ID of the uploaded SARIF file.
9393
runs:
9494
using: node20
95-
main: "../lib/analyze-action.js"
96-
post: "../lib/analyze-action-post.js"
95+
main: "analyze-action.js"
96+
post: "analyze-action-post.js"

analyze/analyze-action-post.js

Lines changed: 379 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

analyze/analyze-action.js

Lines changed: 230 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

autobuild/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ inputs:
1616
required: false
1717
runs:
1818
using: node20
19-
main: '../lib/autobuild-action.js'
19+
main: 'autobuild-action.js'

autobuild/autobuild-action.js

Lines changed: 180 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export default [
3131
"tests/**/*",
3232
"eslint.config.mjs",
3333
".github/**/*",
34+
"*/*-action.js",
35+
"*/*-action-post.js",
3436
],
3537
},
3638
...fixupConfigRules(

init/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ outputs:
147147
description: The version of the CodeQL binary used for analysis
148148
runs:
149149
using: node20
150-
main: '../lib/init-action.js'
151-
post: '../lib/init-action-post.js'
150+
main: 'init-action.js'
151+
post: 'init-action-post.js'

init/init-action-post.js

Lines changed: 379 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

init/init-action.js

Lines changed: 187 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)