Skip to content

Commit 5fdb8fd

Browse files
feat: Add definitions for Node.js, ESLint, and Trivy tools with runtime configurations
1 parent 8911380 commit 5fdb8fd

File tree

3 files changed

+66
-0
lines changed

3 files changed

+66
-0
lines changed

definitions/runtimes/plugin.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
version: 0.1
2+
downloads:
3+
- name: node
4+
downloads:
5+
# macos arm64 was introduced after this version.
6+
- os: macos
7+
url: https://nodejs.org/dist/v${version}/node-v${version}-darwin-x64.tar.gz
8+
version: <16.0.0
9+
strip_components: 1
10+
- os:
11+
linux: linux
12+
macos: darwin
13+
cpu:
14+
x86_64: x64
15+
arm_64: arm64
16+
url: https://nodejs.org/dist/v${version}/node-v${version}-${os}-${cpu}.tar.gz
17+
strip_components: 1
18+
- os: windows
19+
cpu: x86_64
20+
url: https://nodejs.org/dist/v${version}/node-v${version}-win-x64.zip
21+
strip_components: 1
22+
23+
runtimes:
24+
definitions:
25+
- type: node
26+
download: node
27+
runtime_environment:
28+
- name: HOME
29+
value: ${env.HOME:-}
30+
- name: PATH
31+
list:
32+
- "${runtime}/bin"
33+
- "${runtime}" # Windows places binaries here instead of bin/
34+
- "${env.PATH}"
35+
- name: http_proxy
36+
value: ${env.http_proxy}
37+
optional: true
38+
- name: https_proxy
39+
value: ${env.https_proxy}
40+
optional: true
41+
- name: NODE_EXTRA_CA_CERTS
42+
value: ${env.NODE_EXTRA_CA_CERTS}
43+
optional: true
44+
- name: NODE_OPTIONS
45+
value: ${env.NODE_OPTIONS}
46+
optional: true
47+
- name: NPM_CONFIG_USERCONFIG
48+
value: ${env.NPM_CONFIG_USERCONFIG}
49+
optional: true
50+
# Necessary for some Windows install scripts
51+
- name: COMSPEC
52+
value: ${env.COMSPEC}
53+
optional: true
54+
linter_environment:
55+
- name: PATH
56+
list: ["${linter}/node_modules/.bin"]
57+
- name: NODE_PATH
58+
value: ${linter}/node_modules
59+
- name: NODE_OPTIONS
60+
value: ${env.NODE_OPTIONS}
61+
optional: true
62+
known_good_version: 18.20.5
63+
version_commands:
64+
- run: node --version
65+
parse_regex: ${semver}
66+
shims: [node, npm, npx, corepack]

0 commit comments

Comments
 (0)