Skip to content

Commit d04ee6c

Browse files
authored
Merge branch 'main' into joyce/group_issues
2 parents b403a46 + 07ecc29 commit d04ee6c

26 files changed

+553
-425
lines changed

.github/actions/auth/bootstrap.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33

44
import fs from 'node:fs'
55
import * as url from 'node:url'
6-
import { spawn } from 'node:child_process'
6+
import {spawn} from 'node:child_process'
77

8-
function spawnPromisified(command, args, { quiet = false, ...options } = {}) {
8+
function spawnPromisified(command, args, {quiet = false, ...options} = {}) {
99
return new Promise((resolve, reject) => {
1010
const proc = spawn(command, args, options)
1111
proc.stdout.setEncoding('utf8')
12-
proc.stdout.on('data', (data) => {
12+
proc.stdout.on('data', data => {
1313
if (!quiet) {
1414
console.log(data)
1515
}
1616
})
1717
proc.stderr.setEncoding('utf8')
18-
proc.stderr.on('data', (data) => {
18+
proc.stderr.on('data', data => {
1919
console.error(data)
2020
})
21-
proc.on('close', (code) => {
21+
proc.on('close', code => {
2222
if (code !== 0) {
2323
reject(code)
2424
} else {
@@ -31,31 +31,32 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) {
3131
await (async () => {
3232
// If dependencies are not vendored-in, install them at runtime.
3333
try {
34-
await fs.accessSync(
35-
url.fileURLToPath(new URL('./node_modules', import.meta.url)),
36-
fs.constants.R_OK
37-
)
34+
await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK)
3835
} catch {
3936
try {
4037
await spawnPromisified('npm', ['ci'], {
4138
cwd: url.fileURLToPath(new URL('.', import.meta.url)),
42-
quiet: true
39+
quiet: true,
4340
})
44-
} catch {
41+
} catch (error) {
42+
console.error(`npm ci failed: ${error}`)
4543
process.exit(1)
4644
}
4745
} finally {
46+
const core = await import('@actions/core')
4847
// Compile TypeScript.
4948
try {
5049
await spawnPromisified('npm', ['run', 'build'], {
5150
cwd: url.fileURLToPath(new URL('.', import.meta.url)),
52-
quiet: true
51+
quiet: true,
5352
})
54-
} catch {
53+
} catch (error) {
54+
core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`)
5555
process.exit(1)
5656
}
5757
// Run the main script.
58+
core.info('Running auth Action index.js...')
5859
const action = await import('./dist/index.js')
5960
await action.default()
6061
}
61-
})()
62+
})()

.github/actions/auth/package-lock.json

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

.github/actions/auth/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"license": "MIT",
1414
"type": "module",
1515
"dependencies": {
16-
"@actions/core": "^2.0.1",
17-
"playwright": "^1.58.1"
16+
"@actions/core": "^3.0.0",
17+
"playwright": "^1.58.2"
1818
},
1919
"devDependencies": {
20-
"@types/node": "^25.2.0",
20+
"@types/node": "^25.3.3",
2121
"typescript": "^5.9.3"
2222
}
2323
}

.github/actions/auth/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type {AuthContextOutput} from './types.d.js'
22
import process from 'node:process'
3-
import core from '@actions/core'
3+
import * as core from '@actions/core'
44
import playwright from 'playwright'
55

66
export default async function () {

.github/actions/file/bootstrap.js

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33

44
import fs from 'node:fs'
55
import * as url from 'node:url'
6-
import { spawn } from 'node:child_process'
6+
import {spawn} from 'node:child_process'
77

8-
function spawnPromisified(command, args, { quiet = false, ...options } = {}) {
8+
function spawnPromisified(command, args, {quiet = false, ...options} = {}) {
99
return new Promise((resolve, reject) => {
1010
const proc = spawn(command, args, options)
1111
proc.stdout.setEncoding('utf8')
12-
proc.stdout.on('data', (data) => {
12+
proc.stdout.on('data', data => {
1313
if (!quiet) {
1414
console.log(data)
1515
}
1616
})
1717
proc.stderr.setEncoding('utf8')
18-
proc.stderr.on('data', (data) => {
18+
proc.stderr.on('data', data => {
1919
console.error(data)
2020
})
21-
proc.on('close', (code) => {
21+
proc.on('close', code => {
2222
if (code !== 0) {
2323
reject(code)
2424
} else {
@@ -31,31 +31,32 @@ function spawnPromisified(command, args, { quiet = false, ...options } = {}) {
3131
await (async () => {
3232
// If dependencies are not vendored-in, install them at runtime.
3333
try {
34-
await fs.accessSync(
35-
url.fileURLToPath(new URL('./node_modules', import.meta.url)),
36-
fs.constants.R_OK
37-
)
34+
await fs.accessSync(url.fileURLToPath(new URL('./node_modules', import.meta.url)), fs.constants.R_OK)
3835
} catch {
3936
try {
4037
await spawnPromisified('npm', ['ci'], {
4138
cwd: url.fileURLToPath(new URL('.', import.meta.url)),
42-
quiet: true
39+
quiet: true,
4340
})
44-
} catch {
41+
} catch (error) {
42+
console.error(`npm ci failed: ${error}`)
4543
process.exit(1)
4644
}
4745
} finally {
46+
const core = await import('@actions/core')
4847
// Compile TypeScript.
4948
try {
5049
await spawnPromisified('npm', ['run', 'build'], {
5150
cwd: url.fileURLToPath(new URL('.', import.meta.url)),
52-
quiet: true
51+
quiet: true,
5352
})
54-
} catch {
53+
} catch (error) {
54+
core.setFailed(`npm run build (TypeScript compilation) failed: ${error}`)
5555
process.exit(1)
5656
}
5757
// Run the main script.
58+
core.info('Running file Action index.js...')
5859
const action = await import('./dist/index.js')
5960
await action.default()
6061
}
61-
})()
62+
})()

0 commit comments

Comments
 (0)