diff --git a/lib/constants.d.ts b/lib/constants.d.ts index 6db7bcf01..4329df5d2 100644 --- a/lib/constants.d.ts +++ b/lib/constants.d.ts @@ -16,6 +16,8 @@ export interface ActionInterface { cleanExclude?: string[]; /** If you need to customize the commit message for an integration you can do so. */ commitMessage?: string; + /** The hostname of which the GitHub Workflow is being run on, ie: github.com */ + hostname?: string; /** The git config email. */ email?: string; /** The folder to deploy. */ diff --git a/lib/constants.js b/lib/constants.js index 2956a2272..cbc6be731 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( 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); + if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; @@ -47,12 +47,17 @@ exports.action = { cleanExclude: (core_1.getInput('clean-exclude') || '') .split('\n') .filter(l => l !== ''), + hostname: process.env.GITHUB_SERVER_URL + ? util_1.stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) + : 'github.com', isTest: TestFlag.NONE, email: !util_1.isNullOrUndefined(core_1.getInput('git-config-email')) ? core_1.getInput('git-config-email') : pusher && pusher.email ? pusher.email - : `${process.env.GITHUB_ACTOR || 'github-pages-deploy-action'}@users.noreply.github.com`, + : `${process.env.GITHUB_ACTOR || 'github-pages-deploy-action'}@users.noreply.${process.env.GITHUB_SERVER_URL + ? util_1.stripProtocolFromUrl(process.env.GITHUB_SERVER_URL) + : 'github.com'}`, name: !util_1.isNullOrUndefined(core_1.getInput('git-config-name')) ? core_1.getInput('git-config-name') : pusher && pusher.name diff --git a/lib/git.js b/lib/git.js index 9bf295653..3d7edf6e7 100644 --- a/lib/git.js +++ b/lib/git.js @@ -33,7 +33,7 @@ function init(action) { /* Ensures that previously set Git configs do not interfere with the deployment. Only runs in the GitHub Actions CI environment if a user is not using an SSH key. */ - yield execute_1.execute(`git config --local --unset-all http.https://github.com/.extraheader`, action.workspace, action.silent); + yield execute_1.execute(`git config --local --unset-all http.https://${action.hostname}/.extraheader`, action.workspace, action.silent); } if (action.isTest === constants_1.TestFlag.UNABLE_TO_UNSET_GIT_CONFIG) { throw new Error(); diff --git a/lib/ssh.js b/lib/ssh.js index 34ce2e536..aa27ddadf 100644 --- a/lib/ssh.js +++ b/lib/ssh.js @@ -22,8 +22,8 @@ function configureSSH(action) { const sshDirectory = `${process.env['HOME']}/.ssh`; const sshKnownHostsDirectory = `${sshDirectory}/known_hosts`; // SSH fingerprints provided by GitHub: https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/githubs-ssh-key-fingerprints - const sshGitHubKnownHostRsa = '\ngithub.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n'; - const sshGitHubKnownHostDss = '\ngithub.com ssh-dss AAAAB3NzaC1kc3MAAACBANGFW2P9xlGU3zWrymJgI/lKo//ZW2WfVtmbsUZJ5uyKArtlQOT2+WRhcg4979aFxgKdcsqAYW3/LS1T2km3jYW/vr4Uzn+dXWODVk5VlUiZ1HFOHf6s6ITcZvjvdbp6ZbpM+DuJT7Bw+h5Fx8Qt8I16oCZYmAPJRtu46o9C2zk1AAAAFQC4gdFGcSbp5Gr0Wd5Ay/jtcldMewAAAIATTgn4sY4Nem/FQE+XJlyUQptPWMem5fwOcWtSXiTKaaN0lkk2p2snz+EJvAGXGq9dTSWHyLJSM2W6ZdQDqWJ1k+cL8CARAqL+UMwF84CR0m3hj+wtVGD/J4G5kW2DBAf4/bqzP4469lT+dF2FRQ2L9JKXrCWcnhMtJUvua8dvnwAAAIB6C4nQfAA7x8oLta6tT+oCk2WQcydNsyugE8vLrHlogoWEicla6cWPk7oXSspbzUcfkjN3Qa6e74PhRkc7JdSdAlFzU3m7LMkXo1MHgkqNX8glxWNVqBSc0YRdbFdTkL0C6gtpklilhvuHQCdbgB3LBAikcRkDp+FCVkUgPC/7Rw==\n'; + const sshGitHubKnownHostRsa = `\n${action.hostname} ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==\n`; + const sshGitHubKnownHostDss = `\n${action.hostname} ssh-dss AAAAB3NzaC1kc3MAAACBANGFW2P9xlGU3zWrymJgI/lKo//ZW2WfVtmbsUZJ5uyKArtlQOT2+WRhcg4979aFxgKdcsqAYW3/LS1T2km3jYW/vr4Uzn+dXWODVk5VlUiZ1HFOHf6s6ITcZvjvdbp6ZbpM+DuJT7Bw+h5Fx8Qt8I16oCZYmAPJRtu46o9C2zk1AAAAFQC4gdFGcSbp5Gr0Wd5Ay/jtcldMewAAAIATTgn4sY4Nem/FQE+XJlyUQptPWMem5fwOcWtSXiTKaaN0lkk2p2snz+EJvAGXGq9dTSWHyLJSM2W6ZdQDqWJ1k+cL8CARAqL+UMwF84CR0m3hj+wtVGD/J4G5kW2DBAf4/bqzP4469lT+dF2FRQ2L9JKXrCWcnhMtJUvua8dvnwAAAIB6C4nQfAA7x8oLta6tT+oCk2WQcydNsyugE8vLrHlogoWEicla6cWPk7oXSspbzUcfkjN3Qa6e74PhRkc7JdSdAlFzU3m7LMkXo1MHgkqNX8glxWNVqBSc0YRdbFdTkL0C6gtpklilhvuHQCdbgB3LBAikcRkDp+FCVkUgPC/7Rw==\n`; core_1.info(`Configuring SSH client… 🔑`); yield io_1.mkdirP(sshDirectory); fs_1.appendFileSync(sshKnownHostsDirectory, sshGitHubKnownHostRsa); diff --git a/lib/util.d.ts b/lib/util.d.ts index d110e8b50..0830270ad 100644 --- a/lib/util.d.ts +++ b/lib/util.d.ts @@ -5,3 +5,5 @@ export declare const generateRepositoryPath: (action: ActionInterface) => string export declare const generateFolderPath: (action: ActionInterface) => string; export declare const checkParameters: (action: ActionInterface) => void; export declare const suppressSensitiveInformation: (str: string, action: ActionInterface) => string; +/** Strips the protocol from a provided URL. */ +export declare const stripProtocolFromUrl: (url: string) => string; diff --git a/lib/util.js b/lib/util.js index d9c1ebfe2..bbe4d3b24 100644 --- a/lib/util.js +++ b/lib/util.js @@ -3,22 +3,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.suppressSensitiveInformation = exports.checkParameters = exports.generateFolderPath = exports.generateRepositoryPath = exports.generateTokenType = exports.isNullOrUndefined = void 0; +exports.stripProtocolFromUrl = exports.suppressSensitiveInformation = exports.checkParameters = exports.generateFolderPath = exports.generateRepositoryPath = exports.generateTokenType = exports.isNullOrUndefined = void 0; const core_1 = require("@actions/core"); const fs_1 = require("fs"); const path_1 = __importDefault(require("path")); /* Replaces all instances of a match in a string. */ const replaceAll = (input, find, replace) => input.split(find).join(replace); /* Utility function that checks to see if a value is undefined or not. */ -exports.isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === ''; +const isNullOrUndefined = (value) => typeof value === 'undefined' || value === null || value === ''; +exports.isNullOrUndefined = isNullOrUndefined; /* Generates a token type used for the action. */ -exports.generateTokenType = (action) => action.sshKey ? 'SSH Deploy Key' : action.token ? 'Deploy Token' : '…'; +const generateTokenType = (action) => action.sshKey ? 'SSH Deploy Key' : action.token ? 'Deploy Token' : '…'; +exports.generateTokenType = generateTokenType; /* Generates a the repository path used to make the commits. */ -exports.generateRepositoryPath = (action) => action.sshKey - ? `git@github.com:${action.repositoryName}` - : `https://${`x-access-token:${action.token}`}@github.com/${action.repositoryName}.git`; +const generateRepositoryPath = (action) => action.sshKey + ? `git@${action.hostname}:${action.repositoryName}` + : `https://${`x-access-token:${action.token}`}@${action.hostname}/${action.repositoryName}.git`; +exports.generateRepositoryPath = generateRepositoryPath; /* Genetate absolute folder path by the provided folder name */ -exports.generateFolderPath = (action) => { +const generateFolderPath = (action) => { const folderName = action['folder']; return path_1.default.isAbsolute(folderName) ? folderName @@ -26,13 +29,14 @@ exports.generateFolderPath = (action) => { ? folderName.replace('~', process.env.HOME) : path_1.default.join(action.workspace, folderName); }; +exports.generateFolderPath = generateFolderPath; /* Checks for the required tokens and formatting. Throws an error if any case is matched. */ const hasRequiredParameters = (action, params) => { const nonNullParams = params.filter(param => !exports.isNullOrUndefined(action[param])); return Boolean(nonNullParams.length); }; /* Verifies the action has the required parameters to run, otherwise throw an error. */ -exports.checkParameters = (action) => { +const checkParameters = (action) => { if (!hasRequiredParameters(action, ['token', 'sshKey'])) { throw new Error('No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.'); } @@ -46,8 +50,9 @@ exports.checkParameters = (action) => { throw new Error(`The directory you're trying to deploy named ${action.folderPath} doesn't exist. Please double check the path and any prerequisite build scripts and try again. ❗`); } }; +exports.checkParameters = checkParameters; /* Suppresses sensitive information from being exposed in error messages. */ -exports.suppressSensitiveInformation = (str, action) => { +const suppressSensitiveInformation = (str, action) => { let value = str; if (core_1.isDebug()) { // Data is unmasked in debug mode. @@ -59,3 +64,7 @@ exports.suppressSensitiveInformation = (str, action) => { } return value; }; +exports.suppressSensitiveInformation = suppressSensitiveInformation; +/** Strips the protocol from a provided URL. */ +const stripProtocolFromUrl = (url) => url.replace(/^(?:https?:\/\/)?(?:www\.)?/i, '').split('/')[0]; +exports.stripProtocolFromUrl = stripProtocolFromUrl; diff --git a/node_modules/.bin/which b/node_modules/.bin/which index f62471c85..287f09934 120000 --- a/node_modules/.bin/which +++ b/node_modules/.bin/which @@ -1 +1 @@ -../which/bin/which \ No newline at end of file +../execa/node_modules/which/bin/which \ No newline at end of file diff --git a/node_modules/@types/node/README.md b/node_modules/@types/node/README.md index 16eb9e782..7c9d386f9 100644 --- a/node_modules/@types/node/README.md +++ b/node_modules/@types/node/README.md @@ -8,9 +8,9 @@ This package contains type definitions for Node.js (http://nodejs.org/). Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node. ### Additional Details - * Last updated: Thu, 04 Feb 2021 08:30:17 GMT + * Last updated: Fri, 19 Feb 2021 17:58:40 GMT * Dependencies: none * Global values: `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout` # Credits -These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alexander T.](https://github.com/a-tarasyuk), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Flarna](https://github.com/Flarna), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Jordi Oliveras Rovira](https://github.com/j-oliveras), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys). +These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [DefinitelyTyped](https://github.com/DefinitelyTyped), [Alberto Schiabel](https://github.com/jkomyno), [Alvis HT Tang](https://github.com/alvis), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [Bruno Scheufler](https://github.com/brunoscheufler), [Chigozirim C.](https://github.com/smac89), [David Junger](https://github.com/touffy), [Deividas Bakanas](https://github.com/DeividasBakanas), [Eugene Y. Q. Shen](https://github.com/eyqs), [Hannes Magnusson](https://github.com/Hannes-Magnusson-CK), [Hoàng Văn Khải](https://github.com/KSXGitHub), [Huw](https://github.com/hoo29), [Kelvin Jin](https://github.com/kjin), [Klaus Meinhardt](https://github.com/ajafff), [Lishude](https://github.com/islishude), [Mariusz Wiktorczyk](https://github.com/mwiktorczyk), [Mohsen Azimi](https://github.com/mohsen1), [Nicolas Even](https://github.com/n-e), [Nikita Galkin](https://github.com/galkin), [Parambir Singh](https://github.com/parambirs), [Sebastian Silbermann](https://github.com/eps1lon), [Simon Schick](https://github.com/SimonSchick), [Thomas den Hollander](https://github.com/ThomasdenH), [Wilco Bakker](https://github.com/WilcoBakker), [wwwy3y3](https://github.com/wwwy3y3), [Samuel Ainsworth](https://github.com/samuela), [Kyle Uehlein](https://github.com/kuehlein), [Thanik Bhongbhibhat](https://github.com/bhongy), [Marcin Kopacz](https://github.com/chyzwar), [Trivikram Kamat](https://github.com/trivikr), [Minh Son Nguyen](https://github.com/nguymin4), [Junxiao Shi](https://github.com/yoursunny), [Ilia Baryshnikov](https://github.com/qwelias), [ExE Boss](https://github.com/ExE-Boss), [Surasak Chaisurin](https://github.com/Ryan-Willpower), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [Jason Kwok](https://github.com/JasonHK), [Victor Perin](https://github.com/victorperin), and [Yongsheng Zhang](https://github.com/ZYSzys). diff --git a/node_modules/@types/node/assert.d.ts b/node_modules/@types/node/assert.d.ts index e9e358523..720bbc633 100644 --- a/node_modules/@types/node/assert.d.ts +++ b/node_modules/@types/node/assert.d.ts @@ -1,3 +1,8 @@ +declare module 'node:assert' { + import assert = require('assert'); + export = assert; +} + declare module 'assert' { /** An alias of `assert.ok()`. */ function assert(value: any, message?: string | Error): asserts value; diff --git a/node_modules/@types/node/async_hooks.d.ts b/node_modules/@types/node/async_hooks.d.ts index ab35e5dbc..10dccc64f 100644 --- a/node_modules/@types/node/async_hooks.d.ts +++ b/node_modules/@types/node/async_hooks.d.ts @@ -1,7 +1,14 @@ /** * Async Hooks module: https://nodejs.org/api/async_hooks.html */ -declare module "async_hooks" { +declare module 'node:async_hooks' { + export * from 'async_hooks'; +} + +/** + * Async Hooks module: https://nodejs.org/api/async_hooks.html + */ +declare module 'async_hooks' { /** * Returns the asyncId of the current execution context. */ diff --git a/node_modules/@types/node/buffer.d.ts b/node_modules/@types/node/buffer.d.ts index 76c92cf8d..da17c75a4 100644 --- a/node_modules/@types/node/buffer.d.ts +++ b/node_modules/@types/node/buffer.d.ts @@ -1,4 +1,8 @@ -declare module "buffer" { +declare module 'node:buffer' { + export * from 'buffer'; +} + +declare module 'buffer' { export const INSPECT_MAX_BYTES: number; export const kMaxLength: number; export const kStringMaxLength: number; diff --git a/node_modules/@types/node/child_process.d.ts b/node_modules/@types/node/child_process.d.ts index 9b6e094ab..f9e34f177 100644 --- a/node_modules/@types/node/child_process.d.ts +++ b/node_modules/@types/node/child_process.d.ts @@ -1,8 +1,12 @@ -declare module "child_process" { - import { BaseEncodingOptions } from 'fs'; - import * as events from "events"; - import * as net from "net"; - import { Writable, Readable, Stream, Pipe } from "stream"; +declare module 'node:child_process' { + export * from 'child_process'; +} + +declare module 'child_process' { + import { BaseEncodingOptions } from 'node:fs'; + import * as events from 'node:events'; + import * as net from 'node:net'; + import { Writable, Readable, Stream, Pipe } from 'node:stream'; type Serializable = string | object | number | boolean; type SendHandle = net.Socket | net.Server; diff --git a/node_modules/@types/node/cluster.d.ts b/node_modules/@types/node/cluster.d.ts index 0ef6c2a05..c09ccd625 100644 --- a/node_modules/@types/node/cluster.d.ts +++ b/node_modules/@types/node/cluster.d.ts @@ -1,7 +1,11 @@ -declare module "cluster" { - import * as child from "child_process"; - import * as events from "events"; - import * as net from "net"; +declare module 'node:cluster' { + export * from 'cluster'; +} + +declare module 'cluster' { + import * as child from 'node:child_process'; + import EventEmitter = require('node:events'); + import * as net from 'node:net'; // interfaces interface ClusterSettings { @@ -21,7 +25,7 @@ declare module "cluster" { addressType: number | "udp4" | "udp6"; // 4, 6, -1, "udp4", "udp6" } - class Worker extends events.EventEmitter { + class Worker extends EventEmitter { id: number; process: child.ChildProcess; send(message: child.Serializable, sendHandle?: child.SendHandle, callback?: (error: Error | null) => void): boolean; @@ -90,7 +94,7 @@ declare module "cluster" { prependOnceListener(event: "online", listener: () => void): this; } - interface Cluster extends events.EventEmitter { + interface Cluster extends EventEmitter { Worker: Worker; disconnect(callback?: () => void): void; fork(env?: any): Worker; diff --git a/node_modules/@types/node/console.d.ts b/node_modules/@types/node/console.d.ts index 178beb45f..2851e9944 100644 --- a/node_modules/@types/node/console.d.ts +++ b/node_modules/@types/node/console.d.ts @@ -1,5 +1,9 @@ -declare module "console" { - import { InspectOptions } from 'util'; +declare module 'node:console' { + export = console; +} + +declare module 'console' { + import { InspectOptions } from 'node:util'; global { // This needs to be global to avoid TS2403 in case lib.dom.d.ts is present in the same build diff --git a/node_modules/@types/node/constants.d.ts b/node_modules/@types/node/constants.d.ts index d124ae66c..5d0b7a73a 100644 --- a/node_modules/@types/node/constants.d.ts +++ b/node_modules/@types/node/constants.d.ts @@ -1,8 +1,19 @@ /** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ -declare module "constants" { - import { constants as osConstants, SignalConstants } from 'os'; - import { constants as cryptoConstants } from 'crypto'; - import { constants as fsConstants } from 'fs'; - const exp: typeof osConstants.errno & typeof osConstants.priority & SignalConstants & typeof cryptoConstants & typeof fsConstants; +declare module 'node:constants' { + import exp = require('constants'); + export = exp; +} + +/** @deprecated since v6.3.0 - use constants property exposed by the relevant module instead. */ +declare module 'constants' { + import { constants as osConstants, SignalConstants } from 'node:os'; + import { constants as cryptoConstants } from 'node:crypto'; + import { constants as fsConstants } from 'node:fs'; + + const exp: typeof osConstants.errno & + typeof osConstants.priority & + SignalConstants & + typeof cryptoConstants & + typeof fsConstants; export = exp; } diff --git a/node_modules/@types/node/crypto.d.ts b/node_modules/@types/node/crypto.d.ts index bf3c237ce..46762ca6d 100644 --- a/node_modules/@types/node/crypto.d.ts +++ b/node_modules/@types/node/crypto.d.ts @@ -1,5 +1,9 @@ +declare module 'node:crypto' { + export * from 'crypto'; +} + declare module 'crypto' { - import * as stream from 'stream'; + import * as stream from 'node:stream'; interface Certificate { /** diff --git a/node_modules/@types/node/dgram.d.ts b/node_modules/@types/node/dgram.d.ts index 73f2aa719..d84a1ee8e 100644 --- a/node_modules/@types/node/dgram.d.ts +++ b/node_modules/@types/node/dgram.d.ts @@ -1,7 +1,11 @@ -declare module "dgram" { - import { AddressInfo } from "net"; - import * as dns from "dns"; - import * as events from "events"; +declare module 'node:dgram' { + export * from 'dgram'; +} + +declare module 'dgram' { + import { AddressInfo } from 'node:net'; + import * as dns from 'node:dns'; + import EventEmitter = require('node:events'); interface RemoteInfo { address: string; @@ -34,7 +38,7 @@ declare module "dgram" { function createSocket(type: SocketType, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; function createSocket(options: SocketOptions, callback?: (msg: Buffer, rinfo: RemoteInfo) => void): Socket; - class Socket extends events.EventEmitter { + class Socket extends EventEmitter { addMembership(multicastAddress: string, multicastInterface?: string): void; address(): AddressInfo; bind(port?: number, address?: string, callback?: () => void): void; diff --git a/node_modules/@types/node/dns.d.ts b/node_modules/@types/node/dns.d.ts index 494728d7d..4152a34d3 100644 --- a/node_modules/@types/node/dns.d.ts +++ b/node_modules/@types/node/dns.d.ts @@ -1,4 +1,8 @@ -declare module "dns" { +declare module 'node:dns' { + export * from 'dns'; +} + +declare module 'dns' { // Supported getaddrinfo flags. const ADDRCONFIG: number; const V4MAPPED: number; diff --git a/node_modules/@types/node/domain.d.ts b/node_modules/@types/node/domain.d.ts index 6423ebfce..4d5f15390 100644 --- a/node_modules/@types/node/domain.d.ts +++ b/node_modules/@types/node/domain.d.ts @@ -1,5 +1,9 @@ +declare module 'node:domain' { + export * from 'domain'; +} + declare module 'domain' { - import EventEmitter = require('events'); + import EventEmitter = require('node:events'); global { namespace NodeJS { diff --git a/node_modules/@types/node/events.d.ts b/node_modules/@types/node/events.d.ts index 04f9a2f9f..d12c1320c 100644 --- a/node_modules/@types/node/events.d.ts +++ b/node_modules/@types/node/events.d.ts @@ -1,3 +1,8 @@ +declare module 'node:events' { + import EventEmitter = require('events'); + export = EventEmitter; +} + declare module 'events' { interface EventEmitterOptions { /** diff --git a/node_modules/@types/node/fs.d.ts b/node_modules/@types/node/fs.d.ts index c0eeeb233..d7258fa15 100644 --- a/node_modules/@types/node/fs.d.ts +++ b/node_modules/@types/node/fs.d.ts @@ -1,8 +1,12 @@ -declare module "fs" { - import * as stream from "stream"; - import * as events from "events"; - import { URL } from "url"; - import * as promises from 'fs/promises'; +declare module 'node:fs' { + export * from 'fs'; +} + +declare module 'fs' { + import * as stream from 'node:stream'; + import EventEmitter = require('node:events'); + import { URL } from 'node:url'; + import * as promises from 'node:fs/promises'; export { promises }; /** @@ -108,7 +112,7 @@ declare module "fs" { readSync(): Dirent | null; } - export interface FSWatcher extends events.EventEmitter { + export interface FSWatcher extends EventEmitter { close(): void; /** @@ -536,9 +540,10 @@ declare module "fs" { * Asynchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function stat(path: PathLike, options: BigIntOptions, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; - export function stat(path: PathLike, options: StatOptions, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; export function stat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function stat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function stat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function stat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace stat { @@ -546,24 +551,27 @@ declare module "fs" { * Asynchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function __promisify__(path: PathLike, options: BigIntOptions): Promise; - function __promisify__(path: PathLike, options: StatOptions): Promise; - function __promisify__(path: PathLike): Promise; + function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise; + function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; } /** * Synchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function statSync(path: PathLike, options: BigIntOptions): BigIntStats; - export function statSync(path: PathLike, options: StatOptions): Stats | BigIntStats; - export function statSync(path: PathLike): Stats; + export function statSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats; + export function statSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats; + export function statSync(path: PathLike, options?: StatOptions): Stats | BigIntStats; /** * Asynchronous fstat(2) - Get file status. * @param fd A file descriptor. */ export function fstat(fd: number, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function fstat(fd: number, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function fstat(fd: number, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function fstat(fd: number, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace fstat { @@ -571,20 +579,27 @@ declare module "fs" { * Asynchronous fstat(2) - Get file status. * @param fd A file descriptor. */ - function __promisify__(fd: number): Promise; + function __promisify__(fd: number, options?: StatOptions & { bigint?: false }): Promise; + function __promisify__(fd: number, options: StatOptions & { bigint: true }): Promise; + function __promisify__(fd: number, options?: StatOptions): Promise; } /** * Synchronous fstat(2) - Get file status. * @param fd A file descriptor. */ - export function fstatSync(fd: number): Stats; + export function fstatSync(fd: number, options?: StatOptions & { bigint?: false }): Stats; + export function fstatSync(fd: number, options: StatOptions & { bigint: true }): BigIntStats; + export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats; /** * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ export function lstat(path: PathLike, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function lstat(path: PathLike, options: StatOptions & { bigint?: false } | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats) => void): void; + export function lstat(path: PathLike, options: StatOptions & { bigint: true }, callback: (err: NodeJS.ErrnoException | null, stats: BigIntStats) => void): void; + export function lstat(path: PathLike, options: StatOptions | undefined, callback: (err: NodeJS.ErrnoException | null, stats: Stats | BigIntStats) => void): void; // NOTE: This namespace provides design-time support for util.promisify. Exported members do not exist at runtime. export namespace lstat { @@ -592,14 +607,18 @@ declare module "fs" { * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function __promisify__(path: PathLike): Promise; + function __promisify__(path: PathLike, options?: StatOptions & { bigint?: false }): Promise; + function __promisify__(path: PathLike, options: StatOptions & { bigint: true }): Promise; + function __promisify__(path: PathLike, options?: StatOptions): Promise; } /** * Synchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - export function lstatSync(path: PathLike): Stats; + export function lstatSync(path: PathLike, options?: StatOptions & { bigint?: false }): Stats; + export function lstatSync(path: PathLike, options: StatOptions & { bigint: true }): BigIntStats; + export function lstatSync(path: PathLike, options?: StatOptions): Stats | BigIntStats; /** * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. @@ -1778,7 +1797,7 @@ declare module "fs" { export function watch( filename: PathLike, options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | BufferEncoding | undefined | null, - listener?: (event: string, filename: string) => void, + listener?: (event: "rename" | "change", filename: string) => void, ): FSWatcher; /** @@ -1790,7 +1809,11 @@ declare module "fs" { * If `persistent` is not supplied, the default of `true` is used. * If `recursive` is not supplied, the default of `false` is used. */ - export function watch(filename: PathLike, options: { encoding: "buffer", persistent?: boolean, recursive?: boolean } | "buffer", listener?: (event: string, filename: Buffer) => void): FSWatcher; + export function watch( + filename: PathLike, + options: { encoding: "buffer", persistent?: boolean, recursive?: boolean; } | "buffer", + listener?: (event: "rename" | "change", filename: Buffer) => void + ): FSWatcher; /** * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`. @@ -1804,7 +1827,7 @@ declare module "fs" { export function watch( filename: PathLike, options: { encoding?: BufferEncoding | null, persistent?: boolean, recursive?: boolean } | string | null, - listener?: (event: string, filename: string | Buffer) => void, + listener?: (event: "rename" | "change", filename: string | Buffer) => void, ): FSWatcher; /** @@ -1812,7 +1835,7 @@ declare module "fs" { * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol. * URL support is _experimental_. */ - export function watch(filename: PathLike, listener?: (event: string, filename: string) => any): FSWatcher; + export function watch(filename: PathLike, listener?: (event: "rename" | "change", filename: string) => any): FSWatcher; /** * Asynchronously tests whether or not the given path exists by checking with the file system. @@ -2234,6 +2257,6 @@ declare module "fs" { } export interface StatOptions { - bigint: boolean; + bigint?: boolean; } } diff --git a/node_modules/@types/node/fs/promises.d.ts b/node_modules/@types/node/fs/promises.d.ts index ce458cc53..8d12c89e7 100644 --- a/node_modules/@types/node/fs/promises.d.ts +++ b/node_modules/@types/node/fs/promises.d.ts @@ -1,6 +1,12 @@ declare module 'fs/promises' { + export * from 'node:fs/promises'; +} + +declare module 'node:fs/promises' { import { Stats, + BigIntStats, + StatOptions, WriteVResult, ReadVResult, PathLike, @@ -14,7 +20,7 @@ declare module 'fs/promises' { BufferEncodingOption, OpenMode, Mode, - } from 'fs'; + } from 'node:fs'; interface FileHandle { /** @@ -92,7 +98,9 @@ declare module 'fs/promises' { /** * Asynchronous fstat(2) - Get file status. */ - stat(): Promise; + stat(opts?: StatOptions & { bigint?: false }): Promise; + stat(opts: StatOptions & { bigint: true }): Promise; + stat(opts?: StatOptions): Promise; /** * Asynchronous ftruncate(2) - Truncate a file to a specified length. @@ -357,23 +365,21 @@ declare module 'fs/promises' { */ function symlink(target: PathLike, path: PathLike, type?: string | null): Promise; - /** - * Asynchronous fstat(2) - Get file status. - * @param handle A `FileHandle`. - */ - function fstat(handle: FileHandle): Promise; - /** * Asynchronous lstat(2) - Get file status. Does not dereference symbolic links. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function lstat(path: PathLike): Promise; + function lstat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise; + function lstat(path: PathLike, opts: StatOptions & { bigint: true }): Promise; + function lstat(path: PathLike, opts?: StatOptions): Promise; /** * Asynchronous stat(2) - Get file status. * @param path A path to a file. If a URL is provided, it must use the `file:` protocol. */ - function stat(path: PathLike): Promise; + function stat(path: PathLike, opts?: StatOptions & { bigint?: false }): Promise; + function stat(path: PathLike, opts: StatOptions & { bigint: true }): Promise; + function stat(path: PathLike, opts?: StatOptions): Promise; /** * Asynchronous link(2) - Create a new link (also known as a hard link) to an existing file. diff --git a/node_modules/@types/node/globals.d.ts b/node_modules/@types/node/globals.d.ts index 844f22e9e..25372b9d5 100644 --- a/node_modules/@types/node/globals.d.ts +++ b/node_modules/@types/node/globals.d.ts @@ -47,13 +47,13 @@ declare var console: Console; declare var __filename: string; declare var __dirname: string; -declare function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout; declare namespace setTimeout { function __promisify__(ms: number): Promise; function __promisify__(ms: number, value: T): Promise; } declare function clearTimeout(timeoutId: NodeJS.Timeout): void; -declare function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout; declare function clearInterval(intervalId: NodeJS.Timeout): void; declare function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; declare namespace setImmediate { @@ -519,8 +519,8 @@ declare namespace NodeJS { parseFloat: typeof parseFloat; parseInt: typeof parseInt; setImmediate: (callback: (...args: any[]) => void, ...args: any[]) => Immediate; - setInterval: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; - setTimeout: (callback: (...args: any[]) => void, ms: number, ...args: any[]) => Timeout; + setInterval: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout; + setTimeout: (callback: (...args: any[]) => void, ms?: number, ...args: any[]) => Timeout; queueMicrotask: typeof queueMicrotask; undefined: typeof undefined; unescape: (str: string) => string; diff --git a/node_modules/@types/node/http.d.ts b/node_modules/@types/node/http.d.ts index 4daa05520..7e2444944 100644 --- a/node_modules/@types/node/http.d.ts +++ b/node_modules/@types/node/http.d.ts @@ -1,7 +1,11 @@ -declare module "http" { - import * as stream from "stream"; - import { URL } from "url"; - import { Socket, Server as NetServer } from "net"; +declare module 'node:http' { + export * from 'http'; +} + +declare module 'http' { + import * as stream from 'node:stream'; + import { URL } from 'node:url'; + import { Socket, Server as NetServer } from 'node:net'; // incoming headers will never contain number interface IncomingHttpHeaders extends NodeJS.Dict { diff --git a/node_modules/@types/node/http2.d.ts b/node_modules/@types/node/http2.d.ts index c95c4f1d9..25b144f15 100644 --- a/node_modules/@types/node/http2.d.ts +++ b/node_modules/@types/node/http2.d.ts @@ -1,13 +1,22 @@ -declare module "http2" { - import * as events from "events"; - import * as fs from "fs"; - import * as net from "net"; - import * as stream from "stream"; - import * as tls from "tls"; - import * as url from "url"; +declare module 'node:http2' { + export * from 'http2'; +} - import { IncomingHttpHeaders as Http1IncomingHttpHeaders, OutgoingHttpHeaders, IncomingMessage, ServerResponse } from "http"; - export { OutgoingHttpHeaders } from "http"; +declare module 'http2' { + import EventEmitter = require('node:events'); + import * as fs from 'node:fs'; + import * as net from 'node:net'; + import * as stream from 'node:stream'; + import * as tls from 'node:tls'; + import * as url from 'node:url'; + + import { + IncomingHttpHeaders as Http1IncomingHttpHeaders, + OutgoingHttpHeaders, + IncomingMessage, + ServerResponse, + } from 'node:http'; + export { OutgoingHttpHeaders } from 'node:http'; export interface IncomingHttpStatusHeader { ":status"?: number; @@ -261,7 +270,7 @@ declare module "http2" { inflateDynamicTableSize?: number; } - export interface Http2Session extends events.EventEmitter { + export interface Http2Session extends EventEmitter { readonly alpnProtocol?: string; readonly closed: boolean; readonly connecting: boolean; diff --git a/node_modules/@types/node/https.d.ts b/node_modules/@types/node/https.d.ts index 24326c9d1..87f352d7a 100644 --- a/node_modules/@types/node/https.d.ts +++ b/node_modules/@types/node/https.d.ts @@ -1,8 +1,11 @@ -declare module "https" { - import * as tls from "tls"; - import * as events from "events"; - import * as http from "http"; - import { URL } from "url"; +declare module 'node:https' { + export * from 'https'; +} + +declare module 'https' { + import * as tls from 'node:tls'; + import * as http from 'node:http'; + import { URL } from 'node:url'; type ServerOptions = tls.SecureContextOptions & tls.TlsOptions & http.ServerOptions; diff --git a/node_modules/@types/node/index.d.ts b/node_modules/@types/node/index.d.ts index 0021e5860..1a1e3e704 100644 --- a/node_modules/@types/node/index.d.ts +++ b/node_modules/@types/node/index.d.ts @@ -3,7 +3,6 @@ // Definitions by: Microsoft TypeScript // DefinitelyTyped // Alberto Schiabel -// Alexander T. // Alvis HT Tang // Andrew Makarov // Benjamin Toueg @@ -12,7 +11,6 @@ // David Junger // Deividas Bakanas // Eugene Y. Q. Shen -// Flarna // Hannes Magnusson // Hoàng Văn Khải // Huw @@ -31,7 +29,6 @@ // wwwy3y3 // Samuel Ainsworth // Kyle Uehlein -// Jordi Oliveras Rovira // Thanik Bhongbhibhat // Marcin Kopacz // Trivikram Kamat diff --git a/node_modules/@types/node/inspector.d.ts b/node_modules/@types/node/inspector.d.ts index 1c577346e..ee0e2e722 100644 --- a/node_modules/@types/node/inspector.d.ts +++ b/node_modules/@types/node/inspector.d.ts @@ -10,8 +10,15 @@ /** * The inspector module provides an API for interacting with the V8 inspector. */ -declare module "inspector" { - import { EventEmitter } from 'events'; +declare module 'node:inspector' { + export * from 'inspector'; +} + +/** + * The inspector module provides an API for interacting with the V8 inspector. + */ +declare module 'inspector' { + import EventEmitter = require('node:events'); interface InspectorNotification { method: string; diff --git a/node_modules/@types/node/module.d.ts b/node_modules/@types/node/module.d.ts index ffb4a6eef..0778bcd97 100644 --- a/node_modules/@types/node/module.d.ts +++ b/node_modules/@types/node/module.d.ts @@ -1,5 +1,10 @@ -declare module "module" { - import { URL } from "url"; +declare module 'node:module' { + import Module = require('module'); + export = Module; +} + +declare module 'module' { + import { URL } from 'node:url'; namespace Module { /** * Updates all the live bindings for builtin ES Modules to match the properties of the CommonJS exports. diff --git a/node_modules/@types/node/net.d.ts b/node_modules/@types/node/net.d.ts index f2cb4b102..b764dd24b 100644 --- a/node_modules/@types/node/net.d.ts +++ b/node_modules/@types/node/net.d.ts @@ -1,9 +1,17 @@ -declare module "net" { - import * as stream from "stream"; - import * as events from "events"; - import * as dns from "dns"; +declare module 'node:net' { + export * from 'net'; +} + +declare module 'net' { + import * as stream from 'node:stream'; + import EventEmitter = require('node:events'); + import * as dns from 'node:dns'; - type LookupFunction = (hostname: string, options: dns.LookupOneOptions, callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void) => void; + type LookupFunction = ( + hostname: string, + options: dns.LookupOneOptions, + callback: (err: NodeJS.ErrnoException | null, address: string, family: number) => void, + ) => void; interface AddressInfo { address: string; @@ -191,7 +199,7 @@ declare module "net" { } // https://github.com/nodejs/node/blob/master/lib/net.js - class Server extends events.EventEmitter { + class Server extends EventEmitter { constructor(connectionListener?: (socket: Socket) => void); constructor(options?: ServerOpts, connectionListener?: (socket: Socket) => void); diff --git a/node_modules/@types/node/os.d.ts b/node_modules/@types/node/os.d.ts index 1aadc68e2..f152ade96 100644 --- a/node_modules/@types/node/os.d.ts +++ b/node_modules/@types/node/os.d.ts @@ -1,4 +1,8 @@ -declare module "os" { +declare module 'node:os' { + export * from 'os'; +} + +declare module 'os' { interface CpuInfo { model: string; speed: number; diff --git a/node_modules/@types/node/package.json b/node_modules/@types/node/package.json index 5d9ca15a0..1c592a678 100644 --- a/node_modules/@types/node/package.json +++ b/node_modules/@types/node/package.json @@ -1,6 +1,6 @@ { "name": "@types/node", - "version": "14.14.25", + "version": "14.14.31", "description": "TypeScript definitions for Node.js", "license": "MIT", "contributors": [ @@ -19,11 +19,6 @@ "url": "https://github.com/jkomyno", "githubUsername": "jkomyno" }, - { - "name": "Alexander T.", - "url": "https://github.com/a-tarasyuk", - "githubUsername": "a-tarasyuk" - }, { "name": "Alvis HT Tang", "url": "https://github.com/alvis", @@ -64,11 +59,6 @@ "url": "https://github.com/eyqs", "githubUsername": "eyqs" }, - { - "name": "Flarna", - "url": "https://github.com/Flarna", - "githubUsername": "Flarna" - }, { "name": "Hannes Magnusson", "url": "https://github.com/Hannes-Magnusson-CK", @@ -159,11 +149,6 @@ "url": "https://github.com/kuehlein", "githubUsername": "kuehlein" }, - { - "name": "Jordi Oliveras Rovira", - "url": "https://github.com/j-oliveras", - "githubUsername": "j-oliveras" - }, { "name": "Thanik Bhongbhibhat", "url": "https://github.com/bhongy", @@ -251,6 +236,6 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "03fe917af611a5f93079169600cfc62c6f9ba94e93ff60f8601364c2ff26ee32", + "typesPublisherContentHash": "e35e9f1e1be2150998638a2f9485b5e421a39bcfa3f02c37f4c39c69eeffef7b", "typeScriptVersion": "3.4" } \ No newline at end of file diff --git a/node_modules/@types/node/path.d.ts b/node_modules/@types/node/path.d.ts index 0273d58ea..39adcaf1f 100644 --- a/node_modules/@types/node/path.d.ts +++ b/node_modules/@types/node/path.d.ts @@ -1,4 +1,9 @@ -declare module "path" { +declare module 'node:path' { + import path = require('path'); + export = path; +} + +declare module 'path' { namespace path { /** * A parsed path object generated by path.parse() or consumed by path.format(). diff --git a/node_modules/@types/node/perf_hooks.d.ts b/node_modules/@types/node/perf_hooks.d.ts index bbea93874..6c858ef9f 100644 --- a/node_modules/@types/node/perf_hooks.d.ts +++ b/node_modules/@types/node/perf_hooks.d.ts @@ -1,5 +1,9 @@ +declare module 'node:perf_hooks' { + export * from 'perf_hooks'; +} + declare module 'perf_hooks' { - import { AsyncResource } from 'async_hooks'; + import { AsyncResource } from 'node:async_hooks'; type EntryType = 'node' | 'mark' | 'measure' | 'gc' | 'function' | 'http2' | 'http'; diff --git a/node_modules/@types/node/process.d.ts b/node_modules/@types/node/process.d.ts index 65fe5cacf..853813593 100644 --- a/node_modules/@types/node/process.d.ts +++ b/node_modules/@types/node/process.d.ts @@ -1,5 +1,9 @@ -declare module "process" { - import * as tty from "tty"; +declare module 'node:process' { + export = process; +} + +declare module 'process' { + import * as tty from 'node:tty'; global { var process: NodeJS.Process; diff --git a/node_modules/@types/node/punycode.d.ts b/node_modules/@types/node/punycode.d.ts index 2b771d456..593e9cb5b 100644 --- a/node_modules/@types/node/punycode.d.ts +++ b/node_modules/@types/node/punycode.d.ts @@ -1,4 +1,22 @@ -declare module "punycode" { +/** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ +declare module 'node:punycode' { + export * from 'punycode'; +} + +/** + * @deprecated since v7.0.0 + * The version of the punycode module bundled in Node.js is being deprecated. + * In a future major version of Node.js this module will be removed. + * Users currently depending on the punycode module should switch to using + * the userland-provided Punycode.js module instead. + */ +declare module 'punycode' { /** * @deprecated since v7.0.0 * The version of the punycode module bundled in Node.js is being deprecated. diff --git a/node_modules/@types/node/querystring.d.ts b/node_modules/@types/node/querystring.d.ts index 3e204e7f0..e37234cca 100644 --- a/node_modules/@types/node/querystring.d.ts +++ b/node_modules/@types/node/querystring.d.ts @@ -1,4 +1,8 @@ -declare module "querystring" { +declare module 'node:querystring' { + export * from 'querystring'; +} + +declare module 'querystring' { interface StringifyOptions { encodeURIComponent?: (str: string) => string; } diff --git a/node_modules/@types/node/readline.d.ts b/node_modules/@types/node/readline.d.ts index fbe4836f3..2449d89a7 100644 --- a/node_modules/@types/node/readline.d.ts +++ b/node_modules/@types/node/readline.d.ts @@ -1,6 +1,9 @@ -declare module "readline" { - import * as events from "events"; - import * as stream from "stream"; +declare module 'node:readline' { + export * from 'readline'; +} + +declare module 'readline' { + import EventEmitter = require('node:events'); interface Key { sequence?: string; @@ -10,7 +13,7 @@ declare module "readline" { shift?: boolean; } - class Interface extends events.EventEmitter { + class Interface extends EventEmitter { readonly terminal: boolean; // Need direct access to line/cursor data, for use in external processes @@ -121,7 +124,7 @@ declare module "readline" { [Symbol.asyncIterator](): AsyncIterableIterator; } - type ReadLine = Interface; // type forwarded for backwards compatiblity + type ReadLine = Interface; // type forwarded for backwards compatibility type Completer = (line: string) => CompleterResult; type AsyncCompleter = (line: string, callback: (err?: null | Error, result?: CompleterResult) => void) => any; diff --git a/node_modules/@types/node/repl.d.ts b/node_modules/@types/node/repl.d.ts index 4985b5261..8fae7f9ee 100644 --- a/node_modules/@types/node/repl.d.ts +++ b/node_modules/@types/node/repl.d.ts @@ -1,7 +1,11 @@ -declare module "repl" { - import { Interface, Completer, AsyncCompleter } from "readline"; - import { Context } from "vm"; - import { InspectOptions } from "util"; +declare module 'node:repl' { + export * from 'repl'; +} + +declare module 'repl' { + import { Interface, Completer, AsyncCompleter } from 'node:readline'; + import { Context } from 'node:vm'; + import { InspectOptions } from 'node:util'; interface ReplOptions { /** diff --git a/node_modules/@types/node/stream.d.ts b/node_modules/@types/node/stream.d.ts index 485d50320..a3bc9203b 100644 --- a/node_modules/@types/node/stream.d.ts +++ b/node_modules/@types/node/stream.d.ts @@ -1,5 +1,10 @@ +declare module 'node:stream' { + import Stream = require('stream'); + export = Stream; +} + declare module 'stream' { - import EventEmitter = require('events'); + import EventEmitter = require('node:events'); class internal extends EventEmitter { pipe(destination: T, options?: { end?: boolean; }): T; diff --git a/node_modules/@types/node/string_decoder.d.ts b/node_modules/@types/node/string_decoder.d.ts index a6a40601f..6b688d376 100644 --- a/node_modules/@types/node/string_decoder.d.ts +++ b/node_modules/@types/node/string_decoder.d.ts @@ -1,4 +1,8 @@ -declare module "string_decoder" { +declare module 'node:string_decoder' { + export * from 'string_decoder'; +} + +declare module 'string_decoder' { class StringDecoder { constructor(encoding?: BufferEncoding); write(buffer: Buffer): string; diff --git a/node_modules/@types/node/timers.d.ts b/node_modules/@types/node/timers.d.ts index e64a6735c..965f10938 100644 --- a/node_modules/@types/node/timers.d.ts +++ b/node_modules/@types/node/timers.d.ts @@ -1,11 +1,15 @@ -declare module "timers" { - function setTimeout(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; +declare module 'node:timers' { + export * from 'timers'; +} + +declare module 'timers' { + function setTimeout(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout; namespace setTimeout { function __promisify__(ms: number): Promise; function __promisify__(ms: number, value: T): Promise; } function clearTimeout(timeoutId: NodeJS.Timeout): void; - function setInterval(callback: (...args: any[]) => void, ms: number, ...args: any[]): NodeJS.Timeout; + function setInterval(callback: (...args: any[]) => void, ms?: number, ...args: any[]): NodeJS.Timeout; function clearInterval(intervalId: NodeJS.Timeout): void; function setImmediate(callback: (...args: any[]) => void, ...args: any[]): NodeJS.Immediate; namespace setImmediate { diff --git a/node_modules/@types/node/tls.d.ts b/node_modules/@types/node/tls.d.ts index 03e196333..e65a1960a 100644 --- a/node_modules/@types/node/tls.d.ts +++ b/node_modules/@types/node/tls.d.ts @@ -1,8 +1,9 @@ -declare module "tls" { - import * as crypto from "crypto"; - import * as dns from "dns"; - import * as net from "net"; - import * as stream from "stream"; +declare module 'node:tls' { + export * from 'tls'; +} + +declare module 'tls' { + import * as net from 'node:net'; const CLIENT_RENEG_LIMIT: number; const CLIENT_RENEG_WINDOW: number; diff --git a/node_modules/@types/node/trace_events.d.ts b/node_modules/@types/node/trace_events.d.ts index 1f3a89c48..812b2b55c 100644 --- a/node_modules/@types/node/trace_events.d.ts +++ b/node_modules/@types/node/trace_events.d.ts @@ -1,4 +1,8 @@ -declare module "trace_events" { +declare module 'node:trace_events' { + export * from 'trace_events'; +} + +declare module 'trace_events' { /** * The `Tracing` object is used to enable or disable tracing for sets of * categories. Instances are created using the diff --git a/node_modules/@types/node/ts3.4/assert.d.ts b/node_modules/@types/node/ts3.4/assert.d.ts index 37e24f5c1..6f3a33e3b 100644 --- a/node_modules/@types/node/ts3.4/assert.d.ts +++ b/node_modules/@types/node/ts3.4/assert.d.ts @@ -1,3 +1,8 @@ +declare module 'node:assert' { + import assert = require('assert'); + export = assert; +} + declare module 'assert' { /** An alias of `assert.ok()`. */ function assert(value: any, message?: string | Error): void; diff --git a/node_modules/@types/node/tty.d.ts b/node_modules/@types/node/tty.d.ts index 785436633..64b51b43b 100644 --- a/node_modules/@types/node/tty.d.ts +++ b/node_modules/@types/node/tty.d.ts @@ -1,5 +1,9 @@ -declare module "tty" { - import * as net from "net"; +declare module 'node:tty' { + export * from 'tty'; +} + +declare module 'tty' { + import * as net from 'node:net'; function isatty(fd: number): boolean; class ReadStream extends net.Socket { diff --git a/node_modules/@types/node/url.d.ts b/node_modules/@types/node/url.d.ts index 24c7afc46..7186b94e3 100644 --- a/node_modules/@types/node/url.d.ts +++ b/node_modules/@types/node/url.d.ts @@ -1,5 +1,9 @@ -declare module "url" { - import { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring'; +declare module 'node:url' { + export * from 'url'; +} + +declare module 'url' { + import { ParsedUrlQuery, ParsedUrlQueryInput } from 'node:querystring'; // Input to `url.format` interface UrlObject { diff --git a/node_modules/@types/node/util.d.ts b/node_modules/@types/node/util.d.ts index f83a85335..8605bf93a 100644 --- a/node_modules/@types/node/util.d.ts +++ b/node_modules/@types/node/util.d.ts @@ -1,4 +1,8 @@ -declare module "util" { +declare module 'node:util' { + export * from 'util'; +} + +declare module 'util' { interface InspectOptions extends NodeJS.InspectOptions { } type Style = 'special' | 'number' | 'bigint' | 'boolean' | 'undefined' | 'null' | 'string' | 'symbol' | 'date' | 'regexp' | 'module'; type CustomInspectFunction = (depth: number, options: InspectOptionsStylized) => string; diff --git a/node_modules/@types/node/v8.d.ts b/node_modules/@types/node/v8.d.ts index 7d950824f..c213196f4 100644 --- a/node_modules/@types/node/v8.d.ts +++ b/node_modules/@types/node/v8.d.ts @@ -1,5 +1,9 @@ -declare module "v8" { - import { Readable } from "stream"; +declare module 'node:v8' { + export * from 'v8'; +} + +declare module 'v8' { + import { Readable } from 'node:stream'; interface HeapSpaceInfo { space_name: string; diff --git a/node_modules/@types/node/vm.d.ts b/node_modules/@types/node/vm.d.ts index 399c2a6a1..419de4153 100644 --- a/node_modules/@types/node/vm.d.ts +++ b/node_modules/@types/node/vm.d.ts @@ -1,4 +1,8 @@ -declare module "vm" { +declare module 'node:vm' { + export * from 'vm'; +} + +declare module 'vm' { interface Context extends NodeJS.Dict { } interface BaseOptions { /** @@ -21,6 +25,7 @@ declare module "vm" { displayErrors?: boolean; timeout?: number; cachedData?: Buffer; + /** @deprecated in favor of `script.createCachedData()` */ produceCachedData?: boolean; } interface RunningScriptOptions extends BaseOptions { @@ -119,6 +124,7 @@ declare module "vm" { runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; runInThisContext(options?: RunningScriptOptions): any; createCachedData(): Buffer; + cachedDataRejected?: boolean; } function createContext(sandbox?: Context, options?: CreateContextOptions): Context; function isContext(sandbox: Context): boolean; diff --git a/node_modules/@types/node/wasi.d.ts b/node_modules/@types/node/wasi.d.ts index fe2b2aab8..43b38541d 100644 --- a/node_modules/@types/node/wasi.d.ts +++ b/node_modules/@types/node/wasi.d.ts @@ -1,3 +1,7 @@ +declare module 'node:wasi' { + export * from 'wasi'; +} + declare module 'wasi' { interface WASIOptions { /** diff --git a/node_modules/@types/node/worker_threads.d.ts b/node_modules/@types/node/worker_threads.d.ts index 3a8881e6a..101f6cc55 100644 --- a/node_modules/@types/node/worker_threads.d.ts +++ b/node_modules/@types/node/worker_threads.d.ts @@ -1,9 +1,13 @@ -declare module "worker_threads" { - import { Context } from "vm"; - import { EventEmitter } from "events"; - import { Readable, Writable } from "stream"; - import { URL } from "url"; - import { FileHandle } from "fs/promises"; +declare module 'node:worker_threads' { + export * from 'worker_threads'; +} + +declare module 'worker_threads' { + import { Context } from 'node:vm'; + import EventEmitter = require('node:events'); + import { Readable, Writable } from 'node:stream'; + import { URL } from 'node:url'; + import { FileHandle } from 'node:fs/promises'; const isMainThread: boolean; const parentPort: null | MessagePort; diff --git a/node_modules/@types/node/zlib.d.ts b/node_modules/@types/node/zlib.d.ts index 754f5ed18..f3fbc4476 100644 --- a/node_modules/@types/node/zlib.d.ts +++ b/node_modules/@types/node/zlib.d.ts @@ -1,5 +1,9 @@ -declare module "zlib" { - import * as stream from "stream"; +declare module 'node:zlib' { + export * from 'zlib'; +} + +declare module 'zlib' { + import * as stream from 'node:stream'; interface ZlibOptions { /** diff --git a/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which b/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which index 8bc48ab0f..091d52ad6 120000 --- a/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which +++ b/node_modules/execa/node_modules/cross-spawn/node_modules/.bin/which @@ -1 +1 @@ -../../../../../which/bin/which \ No newline at end of file +../../../which/bin/which \ No newline at end of file diff --git a/node_modules/which/CHANGELOG.md b/node_modules/execa/node_modules/which/CHANGELOG.md similarity index 100% rename from node_modules/which/CHANGELOG.md rename to node_modules/execa/node_modules/which/CHANGELOG.md diff --git a/node_modules/which/LICENSE b/node_modules/execa/node_modules/which/LICENSE similarity index 100% rename from node_modules/which/LICENSE rename to node_modules/execa/node_modules/which/LICENSE diff --git a/node_modules/which/README.md b/node_modules/execa/node_modules/which/README.md similarity index 100% rename from node_modules/which/README.md rename to node_modules/execa/node_modules/which/README.md diff --git a/node_modules/which/bin/which b/node_modules/execa/node_modules/which/bin/which similarity index 100% rename from node_modules/which/bin/which rename to node_modules/execa/node_modules/which/bin/which diff --git a/node_modules/which/package.json b/node_modules/execa/node_modules/which/package.json similarity index 100% rename from node_modules/which/package.json rename to node_modules/execa/node_modules/which/package.json diff --git a/node_modules/which/which.js b/node_modules/execa/node_modules/which/which.js similarity index 100% rename from node_modules/which/which.js rename to node_modules/execa/node_modules/which/which.js