Skip to content

Commit 346176b

Browse files
committed
build: add toSorted polyfill & update Code PushUp
1 parent 475e400 commit 346176b

File tree

7 files changed

+198
-35
lines changed

7 files changed

+198
-35
lines changed

dist/index.js

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

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@
8989
"yaml": "^2.7.0"
9090
},
9191
"devDependencies": {
92-
"@code-pushup/cli": "^0.59.0",
93-
"@code-pushup/coverage-plugin": "^0.59.0",
94-
"@code-pushup/eslint-plugin": "^0.59.0",
95-
"@code-pushup/js-packages-plugin": "^0.59.0",
92+
"@code-pushup/cli": "^0.60.1",
93+
"@code-pushup/coverage-plugin": "^0.60.1",
94+
"@code-pushup/eslint-plugin": "^0.60.1",
95+
"@code-pushup/js-packages-plugin": "^0.60.1",
9696
"@code-pushup/portal-client": "^0.10.0",
9797
"@types/jest": "^29.5.14",
9898
"@types/node": "^22.13.4",

src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
import { run } from './main'
22

3+
// FIXME: this is fix for GitHub action runner running node below 20 (node 18) even if using: 'node20' is specified
4+
// TODO: remove after updating to node 22 runner and making sure it runs correct environment
5+
if (!Array.prototype.toSorted) {
6+
Array.prototype.toSorted = function <T>(
7+
this: T[],
8+
compareFn?: (a: T, b: T) => number
9+
): T[] {
10+
return [...this].sort(compareFn)
11+
}
12+
}
13+
314
run()

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export async function run(
2626
const api = new GitHubApiClient(inputs.token, refs, artifact, getOctokit)
2727
const options = createOptions(inputs)
2828

29+
console.log('Running with NodeJS version', process.version)
30+
2931
const result = await runInCI(refs, api, options, git)
3032

3133
if (result.commentId != null) {

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"$schema": "https://json.schemastore.org/tsconfig",
33
"compilerOptions": {
44
"target": "ES2022",
5+
"lib": ["ES2023.Array", "ES2022"],
56
"module": "Preserve",
67
"rootDir": "./src",
78
"baseUrl": "./",

0 commit comments

Comments
 (0)