mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 10:00:29 -05:00
Convert some any -> unknown in build scripts
This commit is contained in:
@@ -315,7 +315,7 @@ function getCertificatesFromPFX(pfx: string): string[] {
|
||||
class ESRPReleaseService {
|
||||
|
||||
static async create(
|
||||
log: (...args: any[]) => void,
|
||||
log: (...args: unknown[]) => void,
|
||||
tenantId: string,
|
||||
clientId: string,
|
||||
authCertificatePfx: string,
|
||||
@@ -350,7 +350,7 @@ class ESRPReleaseService {
|
||||
private static API_URL = 'https://api.esrp.microsoft.com/api/v3/releaseservices/clients/';
|
||||
|
||||
private constructor(
|
||||
private readonly log: (...args: any[]) => void,
|
||||
private readonly log: (...args: unknown[]) => void,
|
||||
private readonly clientId: string,
|
||||
private readonly accessToken: string,
|
||||
private readonly requestSigningCertificates: string[],
|
||||
@@ -848,7 +848,7 @@ async function processArtifact(
|
||||
artifact: Artifact,
|
||||
filePath: string
|
||||
) {
|
||||
const log = (...args: any[]) => console.log(`[${artifact.name}]`, ...args);
|
||||
const log = (...args: unknown[]) => console.log(`[${artifact.name}]`, ...args);
|
||||
const match = /^vscode_(?<product>[^_]+)_(?<os>[^_]+)(?:_legacy)?_(?<arch>[^_]+)_(?<unprocessedType>[^_]+)$/.exec(artifact.name);
|
||||
|
||||
if (!match) {
|
||||
|
||||
@@ -7,7 +7,7 @@ import fs from 'fs';
|
||||
import path from 'path';
|
||||
const { dirs } = require('../../npm/dirs') as { dirs: string[] };
|
||||
|
||||
function log(...args: any[]): void {
|
||||
function log(...args: unknown[]): void {
|
||||
console.log(`[${new Date().toLocaleTimeString('en', { hour12: false })}]`, '[distro]', ...args);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ interface Product {
|
||||
readonly webBuiltInExtensions?: IBuiltInExtension[];
|
||||
}
|
||||
|
||||
function log(...args: any[]): void {
|
||||
function log(...args: unknown[]): void {
|
||||
console.log(`[${new Date().toLocaleTimeString('en', { hour12: false })}]`, '[distro]', ...args);
|
||||
}
|
||||
|
||||
|
||||
@@ -134,7 +134,7 @@ function main(): Promise<void> {
|
||||
}
|
||||
}))
|
||||
.on('end', () => c())
|
||||
.on('error', (err: any) => e(err));
|
||||
.on('error', (err: unknown) => e(err));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import vfs from 'vinyl-fs';
|
||||
import * as util from '../lib/util';
|
||||
import { getProductionDependencies } from '../lib/dependencies';
|
||||
import { ClientAssertionCredential } from '@azure/identity';
|
||||
import Stream from 'stream';
|
||||
const azure = require('gulp-azure-storage');
|
||||
|
||||
const root = path.dirname(path.dirname(__dirname));
|
||||
@@ -28,7 +29,7 @@ function src(base: string, maps = `${base}/**/*.map`) {
|
||||
}
|
||||
|
||||
function main(): Promise<void> {
|
||||
const sources: any[] = [];
|
||||
const sources: Stream[] = [];
|
||||
|
||||
// vscode client maps (default)
|
||||
if (!base) {
|
||||
|
||||
@@ -249,7 +249,7 @@ class MonacoGenerator {
|
||||
return r;
|
||||
}
|
||||
|
||||
private _log(message: any, ...rest: any[]): void {
|
||||
private _log(message: any, ...rest: unknown[]): void {
|
||||
fancyLog(ansiColors.cyan('[monaco.d.ts]'), message, ...rest);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import { l10nJsonFormat, getL10nXlf, l10nJsonDetails, getL10nFilesFromXlf, getL1
|
||||
|
||||
const REPO_ROOT_PATH = path.join(__dirname, '../..');
|
||||
|
||||
function log(message: any, ...rest: any[]): void {
|
||||
function log(message: any, ...rest: unknown[]): void {
|
||||
fancyLog(ansiColors.green('[i18n]'), message, ...rest);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ interface LocalizeInfo {
|
||||
}
|
||||
|
||||
module LocalizeInfo {
|
||||
export function is(value: any): value is LocalizeInfo {
|
||||
export function is(value: unknown): value is LocalizeInfo {
|
||||
const candidate = value as LocalizeInfo;
|
||||
return candidate && typeof candidate.key === 'string' && (candidate.comment === undefined || (Array.isArray(candidate.comment) && candidate.comment.every(element => typeof element === 'string')));
|
||||
}
|
||||
@@ -744,7 +744,7 @@ export function prepareI18nPackFiles(resultingTranslationPaths: TranslationPath[
|
||||
const parsePromises: Promise<l10nJsonDetails[]>[] = [];
|
||||
const mainPack: I18nPack = { version: i18nPackVersion, contents: {} };
|
||||
const extensionsPacks: Record<string, I18nPack> = {};
|
||||
const errors: any[] = [];
|
||||
const errors: unknown[] = [];
|
||||
return through(function (this: ThroughStream, xlf: File) {
|
||||
let project = path.basename(path.dirname(path.dirname(xlf.relative)));
|
||||
// strip `-new` since vscode-extensions-loc uses the `-new` suffix to indicate that it's from the new loc pipeline
|
||||
|
||||
@@ -17,7 +17,7 @@ const SRC = path.join(__dirname, '../../src');
|
||||
export const RECIPE_PATH = path.join(__dirname, '../monaco/monaco.d.ts.recipe');
|
||||
const DECLARATION_PATH = path.join(__dirname, '../../src/vs/monaco.d.ts');
|
||||
|
||||
function logErr(message: any, ...rest: any[]): void {
|
||||
function logErr(message: any, ...rest: unknown[]): void {
|
||||
fancyLog(ansiColors.yellow(`[monaco.d.ts]`), message, ...rest);
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ export class TscTranspiler implements ITranspiler {
|
||||
|
||||
private _workerPool: TranspileWorker[] = [];
|
||||
private _queue: Vinyl[] = [];
|
||||
private _allJobs: Promise<any>[] = [];
|
||||
private _allJobs: Promise<unknown>[] = [];
|
||||
|
||||
constructor(
|
||||
logFn: (topic: string, message: string) => void,
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
export namespace strings {
|
||||
|
||||
export function format(value: string, ...rest: any[]): string {
|
||||
export function format(value: string, ...rest: unknown[]): string {
|
||||
return value.replace(/({\d+})/g, function (match) {
|
||||
const index = Number(match.substring(1, match.length - 1));
|
||||
return String(rest[index]) || match;
|
||||
|
||||
4
build/lib/typings/event-stream.d.ts
vendored
4
build/lib/typings/event-stream.d.ts
vendored
@@ -23,5 +23,5 @@ declare module "event-stream" {
|
||||
function mapSync<I, O>(cb: (data: I) => O): ThroughStream;
|
||||
function map<I, O>(cb: (data: I, cb: (err?: Error, data?: O) => void) => O): ThroughStream;
|
||||
|
||||
function readable(asyncFunction: (this: ThroughStream, ...args: any[]) => any): any;
|
||||
}
|
||||
function readable(asyncFunction: (this: ThroughStream, ...args: unknown[]) => any): any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user