Run npm ci --ignore-scripts to update dependencies (#254)

* Initial plan

* Run npm ci --ignore-scripts to update dependencies

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>

* Convert CommonJS to ESM (#255)

* Initial plan

* Convert CommonJS imports to ESM

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>

* Use node: protocol prefix for built-in modules

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-30 13:31:20 +01:00
committed by GitHub
parent 85c1af852f
commit afe9786629
330 changed files with 13024 additions and 14665 deletions

View File

@@ -1,23 +1,3 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
@@ -27,21 +7,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.argStringToArray = exports.ToolRunner = void 0;
const os = __importStar(require("os"));
const events = __importStar(require("events"));
const child = __importStar(require("child_process"));
const path = __importStar(require("path"));
const io = __importStar(require("@actions/io"));
const ioUtil = __importStar(require("@actions/io/lib/io-util"));
const timers_1 = require("timers");
import * as os from 'os';
import * as events from 'events';
import * as child from 'child_process';
import * as path from 'path';
import * as io from '@actions/io';
import * as ioUtil from '@actions/io/lib/io-util';
import { setTimeout } from 'timers';
/* eslint-disable @typescript-eslint/unbound-method */
const IS_WINDOWS = process.platform === 'win32';
/*
* Class for running command line tools. Handles quoting and arg parsing in a platform agnostic way.
*/
class ToolRunner extends events.EventEmitter {
export class ToolRunner extends events.EventEmitter {
constructor(toolPath, args, options) {
super();
if (!toolPath) {
@@ -260,10 +238,7 @@ class ToolRunner extends events.EventEmitter {
}
}
reverse += '"';
return reverse
.split('')
.reverse()
.join('');
return reverse.split('').reverse().join('');
}
_uvQuoteCmdArg(arg) {
// Tool runner wraps child_process.spawn() and needs to apply the same quoting as
@@ -339,10 +314,7 @@ class ToolRunner extends events.EventEmitter {
}
}
reverse += '"';
return reverse
.split('')
.reverse()
.join('');
return reverse.split('').reverse().join('');
}
_cloneExecOptions(options) {
options = options || {};
@@ -493,14 +465,13 @@ class ToolRunner extends events.EventEmitter {
});
}
}
exports.ToolRunner = ToolRunner;
/**
* Convert an arg string to an array of args. Handles escaping
*
* @param argString string of arguments
* @returns string[] array of arguments
*/
function argStringToArray(argString) {
export function argStringToArray(argString) {
const args = [];
let inQuotes = false;
let escaped = false;
@@ -546,7 +517,6 @@ function argStringToArray(argString) {
}
return args;
}
exports.argStringToArray = argStringToArray;
class ExecState extends events.EventEmitter {
constructor(options, toolPath) {
super();
@@ -575,7 +545,7 @@ class ExecState extends events.EventEmitter {
this._setResult();
}
else if (this.processExited) {
this.timeout = timers_1.setTimeout(ExecState.HandleTimeout, this.delay, this);
this.timeout = setTimeout(ExecState.HandleTimeout, this.delay, this);
}
}
_debug(message) {
@@ -608,8 +578,7 @@ class ExecState extends events.EventEmitter {
return;
}
if (!state.processClosed && state.processExited) {
const message = `The STDIO streams did not close within ${state.delay /
1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
const message = `The STDIO streams did not close within ${state.delay / 1000} seconds of the exit event from process '${state.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`;
state._debug(message);
}
state._setResult();