Skip to content

Commit d6cca13

Browse files
committed
feat: update all dependencies and modernize runtime environment
BREAKING CHANGES: - Update Node.js runtime from 12 to 20 (action.yml and Dockerfile) - Replace deprecated 'request' library with native fetch API - Update simple-git from 2.48.0 to 3.28.0 - Update nock from 13.5.6 to 14.0.10 (dev dependency) - Remove unused child_process dependency Changes: - Use async/await with native fetch for HTTP requests - Maintain backward compatibility with existing callback interface - All tests continue to pass with updated dependencies - Coverage remains stable at ~51%
1 parent e05bdf5 commit d6cca13

File tree

442 files changed

+44828
-465
lines changed

Some content is hidden

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

442 files changed

+44828
-465
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:12
1+
FROM node:20
22

33
WORKDIR /app
44

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ inputs:
4040

4141
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-javascript-actions
4242
runs:
43-
using: 'node12'
43+
using: 'node20'
4444
main: 'index.js'
4545

4646
branding:

index.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const bars = require('bars'),
22
fs = require('fs'),
3-
request = require('request'),
43
simpleGit = require('simple-git')
54

65
/**
@@ -143,10 +142,21 @@ const makeUpdateReadme = function (opts) {
143142
/**
144143
* Start the action if called directly
145144
*/
146-
function start() {
145+
async function start() {
147146
const opts = createOptions()
148147
const callback = makeCallback(opts)
149-
request(opts.codestats, callback)
148+
149+
try {
150+
const response = await fetch(opts.codestats.url)
151+
if (response.ok) {
152+
const body = await response.text()
153+
callback(null, { statusCode: response.status }, body)
154+
} else {
155+
callback(new Error(`HTTP ${response.status}: ${response.statusText}`), response, null)
156+
}
157+
} catch (error) {
158+
callback(error, null, null)
159+
}
150160
}
151161

152162
// Export functions for testing

node_modules/.modules.yaml

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

node_modules/.pnpm/@[email protected]/node_modules/@mswjs/interceptors/ClientRequest/package.json

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

node_modules/.pnpm/@[email protected]/node_modules/@mswjs/interceptors/LICENSE.md

Lines changed: 9 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)