Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update action to run on node20 #551

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set Node.js 16.x
uses: actions/setup-node@v3.8.1
- name: Set Node.js
uses: actions/setup-node@v4.0.2
with:
node-version: 16.x
node-version-file: '.nvmrc'

- name: Install dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.11.1
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ inputs:
required: false

runs:
using: 'node16'
using: 'node20'
main: 'dist/index.js'
39 changes: 30 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.0.0",
"private": true,
"description": "GitHub action to compare the size of two webpack bundles from their stats.json output files",
"engines": {
"node": ">=20.11.1"
},
"main": "lib/src/main.js",
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -30,7 +33,7 @@
"@discoveryjs/json-ext": "^0.5.7"
},
"devDependencies": {
"@types/node": "16.18.79",
"@types/node": "20.11.25",
"@typescript-eslint/parser": "^5.62.0",
"@vercel/ncc": "^0.38.0",
"eslint": "^8.57.0",
Expand Down
12 changes: 6 additions & 6 deletions src/print-markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ const getDiffEmoji = (diff: AssetDiff): string =>
diff.diffPercentage === Infinity
? '🆕'
: diff.diffPercentage <= -100
? '🔥'
: diff.diffPercentage > 0
? '📈'
: diff.diffPercentage < 0
? '📉'
: ' '
? '🔥'
: diff.diffPercentage > 0
? '📈'
: diff.diffPercentage < 0
? '📉'
: ' '

const getTrimmedChunkName = (chunkModule: AssetDiff): string => {
let chunkName = chunkModule.name
Expand Down
Loading