From c04dd2071c50a76e3503d78d45bd1faa30cef0df Mon Sep 17 00:00:00 2001 From: develar Date: Wed, 14 Jun 2017 08:27:14 +0200 Subject: [PATCH] fix: do not copy electronDist using hard links Close #1670 --- .idea/electron-builder.iml | 1 + README.md | 4 +-- docs/api/electron-builder-util.md | 10 +++++-- package.json | 6 ++-- packages/electron-builder-util/src/fs.ts | 14 ++++++---- packages/electron-builder/src/asar.ts | 2 ++ packages/electron-builder/src/asarUtil.ts | 2 ++ .../src/cli/install-app-deps.ts | 4 +-- packages/electron-builder/src/fileMatcher.ts | 4 +++ .../electron-builder/src/fileTransformer.ts | 4 +++ packages/electron-builder/src/packager.ts | 8 ++++-- .../src/packager/dirPackager.ts | 4 +-- .../electron-builder/src/readInstalled.ts | 3 ++ .../electron-builder/src/targets/archive.ts | 2 ++ .../src/targets/dmgLicense.ts | 3 +- .../electron-builder/src/targets/license.ts | 6 ++++ packages/electron-builder/src/util/filter.ts | 2 ++ .../src/util/readPackageJson.ts | 5 ++++ packages/electron-builder/src/yarn.ts | 4 +++ packages/jsdoc2md.js | 14 ---------- typings/yargs.d.ts | 2 +- yarn.lock | 28 +++++++++---------- 22 files changed, 84 insertions(+), 48 deletions(-) diff --git a/.idea/electron-builder.iml b/.idea/electron-builder.iml index cdea3c1d2d5..81b7e41308e 100644 --- a/.idea/electron-builder.iml +++ b/.idea/electron-builder.iml @@ -26,6 +26,7 @@ + diff --git a/README.md b/README.md index 525b4f5d38a..9a3d01e0964 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A complete solution to package and build a ready for distribution Electron app f | Question | Answer | |--------|-------| | “I want to configure electron-builder” | [See options](https://github.com/electron-userland/electron-builder/wiki/Options) | -| “I have a question” | [Open an issue](https://github.com/electron-userland/electron-builder/issues) or [join the chat](http://electron-builder-slack.herokuapp.com) | +| “I have a question” | [Open an issue](https://github.com/electron-userland/electron-builder/issues) or [join the chat](https://slackin.electron.build) | | “I found a bug” | [Open an issue](https://github.com/electron-userland/electron-builder/issues/new) | | “I want to donate” | [Donate with Donorbox](https://donorbox.org/electron-builder) or [Paypal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6V79R2RGCCHL) | @@ -172,7 +172,7 @@ and other distributable formats. ## Community -[electron-builder](http://electron-builder-slack.herokuapp.com) on Slack (please use [threads](https://get.slack.help/hc/en-us/articles/115000769927-Message-threads)). +[electron-builder](https://slackin.electron.build) on Slack (please use [threads](https://get.slack.help/hc/en-us/articles/115000769927-Message-threads)). Public [archive](http://electron-builder.slackarchive.io) without registration. ## Further Reading diff --git a/docs/api/electron-builder-util.md b/docs/api/electron-builder-util.md index 85390f97d3f..a28c3a4c6e7 100644 --- a/docs/api/electron-builder-util.md +++ b/docs/api/electron-builder-util.md @@ -94,6 +94,12 @@ ### FileCopier **Kind**: class of [electron-builder-util/out/fs](#module_electron-builder-util/out/fs) +**Properties** + +| Name | Type | +| --- | --- | +| **isUseHardLink**| Boolean | + #### `fileCopier.copy(src, dest, stat)` ⇒ Promise<void> @@ -117,8 +123,8 @@ Hard links is used if supported and allowed. | --- | --- | | src | String | | destination | String | -| filter | module:electron-builder-util/out/fs.__type | -| transformer | module:electron-builder-util/out/fs.__type | +| filter | module:electron-builder-util/out/fs.__type \| null | +| transformer | module:electron-builder-util/out/fs.__type \| null | | isUseHardLink | callback | diff --git a/package.json b/package.json index 685d90674d8..b19165d137b 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "update-deps": "node ./packages/update-deps.js", "set-versions": "node test/out/helpers/setVersions.js", "npm-publish": "yarn set-versions && yarn compile && ./packages/npm-publish.sh && conventional-changelog -p angular -i CHANGELOG.md -s", - "schema": "typescript-json-schema packages/electron-builder/tsconfig.json Config --out packages/electron-builder/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --titles", + "schema": "typescript-json-schema packages/electron-builder/tsconfig.json Config --out packages/electron-builder/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --titles --required", "jsdoc": "ts2jsdoc packages/electron-builder-http packages/electron-updater packages/electron-builder-util packages/electron-builder packages/electron-builder-core packages/electron-publish", "jsdoc2md": "node packages/jsdoc2md.js", "api": "node ./test/vendor/yarn.js jsdoc && node ./test/vendor/yarn.js jsdoc2md" @@ -58,7 +58,7 @@ "sanitize-filename": "^1.6.1", "semver": "^5.3.0", "stat-mode": "^0.2.2", - "ts-jsdoc": "^2.0.0", + "ts-jsdoc": "^2.0.2", "tunnel-agent": "^0.6.0", "update-notifier": "^2.2.0", "uuid-1345": "^0.99.6", @@ -81,7 +81,7 @@ "convert-source-map": "^1.5.0", "decompress-zip": "^0.3.0", "depcheck": "^0.6.7", - "develar-typescript-json-schema": "0.11.0", + "develar-typescript-json-schema": "0.13.3", "env-paths": "^1.0.0", "globby": "^6.1.0", "jest-cli": "^20.0.4", diff --git a/packages/electron-builder-util/src/fs.ts b/packages/electron-builder-util/src/fs.ts index fb93f9d4c51..50a72960f00 100644 --- a/packages/electron-builder-util/src/fs.ts +++ b/packages/electron-builder-util/src/fs.ts @@ -159,9 +159,10 @@ export function copyOrLinkFile(src: string, dest: string, stats?: Stats | null, } export class FileCopier { - private isUseHardLink = _isUseHardLink + isUseHardLink: boolean - constructor(private readonly isUseHardLinkFunction?: (file: string) => boolean, private readonly transformer?: FileTransformer) { + constructor(private readonly isUseHardLinkFunction?: (file: string) => boolean, private readonly transformer?: FileTransformer | null) { + this.isUseHardLink = _isUseHardLink && isUseHardLinkFunction !== DO_NOT_USE_HARD_LINKS } async copy(src: string, dest: string, stat: Stats | undefined) { @@ -203,13 +204,14 @@ export class FileCopier { * Empty directories is never created. * Hard links is used if supported and allowed. */ -export function copyDir(src: string, destination: string, filter?: Filter, transformer?: FileTransformer, isUseHardLink?: (file: string) => boolean): Promise { +export function copyDir(src: string, destination: string, filter?: Filter | null, transformer?: FileTransformer | null, isUseHardLink?: (file: string) => boolean): Promise { + const fileCopier = new FileCopier(isUseHardLink, transformer) + if (debug.enabled) { - debug(`Copying ${src} to ${destination}${_isUseHardLink ? " using hard links" : ""}`) + debug(`Copying ${src} to ${destination}${fileCopier.isUseHardLink ? " using hard links" : ""}`) } const createdSourceDirs = new Set() - const fileCopier = new FileCopier(isUseHardLink, transformer) const links: Array = [] return walk(src, filter, async(file, stat, parent) => { if (!stat.isFile() && !stat.isSymbolicLink()) { @@ -232,6 +234,8 @@ export function copyDir(src: string, destination: string, filter?: Filter, trans .then(() => BluebirdPromise.map(links, it => symlink(it.link, it.file), CONCURRENCY)) } +export const DO_NOT_USE_HARD_LINKS = (file: string) => false + interface Link { readonly link: string, readonly file: string diff --git a/packages/electron-builder/src/asar.ts b/packages/electron-builder/src/asar.ts index 07023eb31bd..40e43a8cfa3 100644 --- a/packages/electron-builder/src/asar.ts +++ b/packages/electron-builder/src/asar.ts @@ -4,6 +4,7 @@ import * as path from "path" const UINT64 = require("cuint").UINT64 +/** @internal */ export class Node { // we don't use Map because later it will be stringified files?: { [key: string]: Node } @@ -18,6 +19,7 @@ export class Node { link?: string } +/** @internal */ export class AsarFilesystem { private offset = UINT64(0) diff --git a/packages/electron-builder/src/asarUtil.ts b/packages/electron-builder/src/asarUtil.ts index 3ad59e8b43c..612daff447b 100644 --- a/packages/electron-builder/src/asarUtil.ts +++ b/packages/electron-builder/src/asarUtil.ts @@ -43,6 +43,7 @@ function writeUnpackedFiles(filesToUnpack: Array, fileCopier: }) } +/** @internal */ export class AsarPackager { private readonly fs = new AsarFilesystem(this.src) private readonly outFile: string @@ -391,6 +392,7 @@ export class AsarPackager { } } +/** @internal */ export async function checkFileInArchive(asarFile: string, relativeFile: string, messagePrefix: string) { function error(text: string) { return new Error(`${messagePrefix} "${relativeFile}" in the "${asarFile}" ${text}`) diff --git a/packages/electron-builder/src/cli/install-app-deps.ts b/packages/electron-builder/src/cli/install-app-deps.ts index 1e20af8ada7..150b80f5fc7 100644 --- a/packages/electron-builder/src/cli/install-app-deps.ts +++ b/packages/electron-builder/src/cli/install-app-deps.ts @@ -10,10 +10,10 @@ import { installOrRebuild } from "../yarn" declare const PACKAGE_VERSION: string -// https://github.com/yargs/yargs/issues/760 -// demandOption is required to be set /** @internal */ export function configureInstallAppDepsCommand(yargs: yargs.Yargs): yargs.Yargs { + // https://github.com/yargs/yargs/issues/760 + // demandOption is required to be set return yargs .option("platform", { choices: ["linux", "darwin", "win32"], diff --git a/packages/electron-builder/src/fileMatcher.ts b/packages/electron-builder/src/fileMatcher.ts index e066851226d..389ef911e25 100644 --- a/packages/electron-builder/src/fileMatcher.ts +++ b/packages/electron-builder/src/fileMatcher.ts @@ -9,6 +9,7 @@ import { Config, FilePattern, PlatformSpecificBuildOptions } from "./metadata" import { BuildInfo } from "./packagerApi" import { createFilter, hasMagic } from "./util/filter" +/** @internal */ export class FileMatcher { readonly from: string readonly to: string @@ -85,6 +86,7 @@ export class FileMatcher { } } +/** @internal */ export function createFileMatcher(info: BuildInfo, appDir: string, resourcesPath: string, macroExpander: (pattern: string) => string, platformSpecificBuildOptions: PlatformSpecificBuildOptions, buildResourceDir: string) { const patterns = info.isPrepackedAppAsar ? null : getFileMatchers(info.config, "files", appDir, path.join(resourcesPath, "app"), false, macroExpander, platformSpecificBuildOptions) const matcher = patterns == null ? new FileMatcher(appDir, path.join(resourcesPath, "app"), macroExpander) : patterns[0] @@ -122,6 +124,7 @@ export function createFileMatcher(info: BuildInfo, appDir: string, resourcesPath return matcher } +/** @internal */ export function getFileMatchers(config: Config, name: "files" | "extraFiles" | "extraResources" | "asarUnpack", defaultSrc: string, defaultDest: string, allowAdvancedMatching: boolean, macroExpander: (pattern: string) => string, customBuildOptions: PlatformSpecificBuildOptions): Array | null { const globalPatterns: Array | string | n | FilePattern = (config)[name] const platformSpecificPatterns: Array | string | n = (customBuildOptions)[name] @@ -168,6 +171,7 @@ export function getFileMatchers(config: Config, name: "files" | "extraFiles" | " return fileMatchers.length === 0 ? null : fileMatchers } +/** @internal */ export function copyFiles(patterns: Array | null): Promise { if (patterns == null || patterns.length === 0) { return BluebirdPromise.resolve() diff --git a/packages/electron-builder/src/fileTransformer.ts b/packages/electron-builder/src/fileTransformer.ts index e179cb8227e..d6a1cd336c2 100644 --- a/packages/electron-builder/src/fileTransformer.ts +++ b/packages/electron-builder/src/fileTransformer.ts @@ -6,6 +6,7 @@ import { readJson } from "fs-extra-p" import * as path from "path" import { BuildInfo } from "./packagerApi" +/** @internal */ export function isElectronCompileUsed(info: BuildInfo): boolean { if (info.config.electronCompile != null) { return info.config.electronCompile @@ -16,6 +17,7 @@ export function isElectronCompileUsed(info: BuildInfo): boolean { return deps != null && "electron-compile" in deps } +/** @internal */ export async function createTransformer(srcDir: string, extraMetadata: any): Promise { const mainPackageJson = path.join(srcDir, "package.json") @@ -34,12 +36,14 @@ export async function createTransformer(srcDir: string, extraMetadata: any): Pro } } +/** @internal */ export interface CompilerHost { compile(file: string): any saveConfiguration(): Promise } +/** @internal */ export function createElectronCompilerHost(projectDir: string, cacheDir: string): Promise { const electronCompilePath = path.join(projectDir, "node_modules", "electron-compile", "lib") return require(path.join(electronCompilePath, "config-parser")).createCompilerHostFromProjectRoot(projectDir, cacheDir) diff --git a/packages/electron-builder/src/packager.ts b/packages/electron-builder/src/packager.ts index 2b4be393491..9634a0bd1a4 100644 --- a/packages/electron-builder/src/packager.ts +++ b/packages/electron-builder/src/packager.ts @@ -255,8 +255,12 @@ export class Packager implements BuildInfo { const targetList = createTargets(nameToTarget, targetNames.length === 0 ? packager.defaultTarget : targetNames, outDir, packager, cleanupTasks) const ourDirs = new Set() for (const target of targetList) { - const outDir = target.outDir - if (!createdOutDirs.has(outDir) && !(target instanceof NoOpTarget)) { + if (target instanceof NoOpTarget) { + continue + } + + const outDir = (target).outDir + if (createdOutDirs.has(outDir)) { ourDirs.add(outDir) } } diff --git a/packages/electron-builder/src/packager/dirPackager.ts b/packages/electron-builder/src/packager/dirPackager.ts index 7fb797b454c..f76a9bde598 100644 --- a/packages/electron-builder/src/packager/dirPackager.ts +++ b/packages/electron-builder/src/packager/dirPackager.ts @@ -1,7 +1,7 @@ import { path7za } from "7zip-bin" import BluebirdPromise from "bluebird-lst" import { debug7zArgs, spawn } from "electron-builder-util" -import { copyDir } from "electron-builder-util/out/fs" +import { copyDir, DO_NOT_USE_HARD_LINKS } from "electron-builder-util/out/fs" import { log, warn } from "electron-builder-util/out/log" import { chmod, emptyDir } from "fs-extra-p" import * as path from "path" @@ -61,7 +61,7 @@ async function unpack(packager: PlatformPackager, out: string, platform: st const destination = packager.getElectronDestDir(out) log(`Copying Electron from "${source}" to "${destination}"`) await emptyDir(out) - await copyDir(source, destination) + await copyDir(source, destination, null, null, DO_NOT_USE_HARD_LINKS) } if (platform === "linux") { diff --git a/packages/electron-builder/src/readInstalled.ts b/packages/electron-builder/src/readInstalled.ts index a5ba4c75b43..fd64dc389d1 100644 --- a/packages/electron-builder/src/readInstalled.ts +++ b/packages/electron-builder/src/readInstalled.ts @@ -2,6 +2,7 @@ import BluebirdPromise from "bluebird-lst" import { lstat, readdir, readJson, realpath } from "fs-extra-p" import * as path from "path" +/** @internal */ export interface Dependency { name: string path: string @@ -11,6 +12,7 @@ export interface Dependency { dependencies: { [name: string]: Dependency } } +/** @internal */ export async function readInstalled(folder: string): Promise> { const opts = { depth: Infinity, @@ -180,6 +182,7 @@ async function readScopedDir(dir: string) { return result } +/** @internal */ export async function dependencies(dir: string, result: Set): Promise { const pathToDep = await readInstalled(dir) for (const dep of pathToDep.values()) { diff --git a/packages/electron-builder/src/targets/archive.ts b/packages/electron-builder/src/targets/archive.ts index 1d4b8ad6f38..976c28cdd20 100644 --- a/packages/electron-builder/src/targets/archive.ts +++ b/packages/electron-builder/src/targets/archive.ts @@ -17,6 +17,7 @@ const extToCompressionDescriptor: { [key: string]: CompressionDescriptor; } = { "tar.bz2": new CompressionDescriptor("--bzip2", "BZIP2", "-1"), } +/** @internal */ export async function tar(compression: CompressionLevel | n, format: string, outFile: string, dirToArchive: string, isMacApp: boolean = false) { // we don't use 7z here - develar: I spent a lot of time making pipe working - but it works on MacOS and often hangs on Linux (even if use pipe-io lib) // and in any case it is better to use system tools (in the light of docker - it is not problem for user because we provide complete docker image). @@ -43,6 +44,7 @@ export async function tar(compression: CompressionLevel | n, format: string, out return outFile } +/** @internal */ export async function archive(compression: CompressionLevel | n, format: string, outFile: string, dirToArchive: string, withoutDir: boolean = false): Promise { let storeOnly = compression === "store" const args = debug7zArgs("a") diff --git a/packages/electron-builder/src/targets/dmgLicense.ts b/packages/electron-builder/src/targets/dmgLicense.ts index 2caa9d256be..b7122bd343b 100644 --- a/packages/electron-builder/src/targets/dmgLicense.ts +++ b/packages/electron-builder/src/targets/dmgLicense.ts @@ -4,8 +4,9 @@ import * as path from "path" import { PlatformPackager } from "../platformPackager" import { getLicenseFiles } from "./license" -// http://www.owsiak.org/?p=700 +/** @internal */ export async function addLicenseToDmg(packager: PlatformPackager, dmgPath: string) { + // http://www.owsiak.org/?p=700 const licenseFiles = await getLicenseFiles(packager) if (licenseFiles.length === 0) { return diff --git a/packages/electron-builder/src/targets/license.ts b/packages/electron-builder/src/targets/license.ts index a4e9f9acce1..bb033e7454e 100644 --- a/packages/electron-builder/src/targets/license.ts +++ b/packages/electron-builder/src/targets/license.ts @@ -1,12 +1,15 @@ import * as path from "path" import { PlatformPackager } from "../platformPackager" +/** @internal */ export const bundledLanguages = ["en_US", "de_DE", "fr_FR", "es_ES", "zh_CN", "zh_TW", "ja_JP", "it_IT", "nl_NL", "ru_RU", "pl_PL", "uk_UA", "cs_CZ", "sv_SE", "nb_NO", "da_DK", "pt_PT", "hu_HU", "ko_KR", "fi_FI", "sk_SK"] + const langToLangWithRegion = new Map() for (const id of bundledLanguages) { langToLangWithRegion.set(id.substring(0, id.indexOf("_")), id) } +/** @internal */ export function toLangWithRegion(lang: string): string { let langWithRegion = langToLangWithRegion.get(lang) if (langWithRegion == null) { @@ -15,6 +18,7 @@ export function toLangWithRegion(lang: string): string { return langWithRegion } +/** @internal */ export async function getLicenseFiles(packager: PlatformPackager): Promise> { const files = (await packager.resourceList) .filter(it => { @@ -41,6 +45,7 @@ export async function getLicenseFiles(packager: PlatformPackager): Promise< }) } +/** @internal */ export const lcid: any = { "af_ZA": 1078, "am_ET": 1118, @@ -245,6 +250,7 @@ export const lcid: any = { "zu_ZA": 1077 } +/** @internal */ export interface LicenseFile { file: string lang: string diff --git a/packages/electron-builder/src/util/filter.ts b/packages/electron-builder/src/util/filter.ts index c26ef001ebc..bab54cdbfde 100644 --- a/packages/electron-builder/src/util/filter.ts +++ b/packages/electron-builder/src/util/filter.ts @@ -3,6 +3,7 @@ import { Stats } from "fs-extra-p" import { Minimatch } from "minimatch" import * as path from "path" +/** @internal */ export function hasMagic(pattern: Minimatch) { const set = pattern.set if (set.length > 1) { @@ -18,6 +19,7 @@ export function hasMagic(pattern: Minimatch) { return false } +/** @internal */ export function createFilter(src: string, patterns: Array, ignoreFiles?: Set, rawFilter?: (file: string) => boolean, excludePatterns?: Array | null): Filter { return function (it, stat) { if (src === it) { diff --git a/packages/electron-builder/src/util/readPackageJson.ts b/packages/electron-builder/src/util/readPackageJson.ts index 91ef3ae4f89..f59bee9986b 100644 --- a/packages/electron-builder/src/util/readPackageJson.ts +++ b/packages/electron-builder/src/util/readPackageJson.ts @@ -15,6 +15,7 @@ import TypeParams = ajv.TypeParams const normalizeData = require("normalize-package-data") +/** @internal */ export async function readPackageJson(file: string): Promise { const data = await readJson(file) await authors(file, data) @@ -47,6 +48,7 @@ function getConfigFromPackageData(metadata: any) { return metadata.build } +/** @internal */ export async function doLoadConfig(configFile: string, projectDir: string) { const data = await readFile(configFile, "utf8") const result = configFile.endsWith(".json5") ? JSON5.parse(data) : safeLoad(data) @@ -55,6 +57,7 @@ export async function doLoadConfig(configFile: string, projectDir: string) { return result } +/** @internal */ export async function loadConfig(projectDir: string): Promise { for (const configFile of ["electron-builder.yml", "electron-builder.json", "electron-builder.json5"]) { try { @@ -91,6 +94,7 @@ export async function loadConfig(projectDir: string): Promise { } } +/** @internal */ export async function getElectronVersion(config: Config | null | undefined, projectDir: string, projectMetadata?: any | null): Promise { // build is required, but this check is performed later, so, we should check for null if (config != null && config.electronVersion != null) { @@ -160,6 +164,7 @@ async function createConfigValidator() { return ajv.compile(schema) } +/** @internal */ export async function validateConfig(config: Config) { if (validatorPromise == null) { validatorPromise = createConfigValidator() diff --git a/packages/electron-builder/src/yarn.ts b/packages/electron-builder/src/yarn.ts index 0f099a459b6..adb5b25673d 100644 --- a/packages/electron-builder/src/yarn.ts +++ b/packages/electron-builder/src/yarn.ts @@ -7,6 +7,7 @@ import * as path from "path" import { Config } from "./metadata" import { readInstalled } from "./readInstalled" +/** @internal */ export async function installOrRebuild(config: Config, appDir: string, frameworkInfo: DesktopFrameworkInfo, platform: string, arch: string, forceInstall: boolean = false) { const args = asArray(config.npmArgs) if (forceInstall || !(await exists(path.join(appDir, "node_modules")))) { @@ -17,6 +18,7 @@ export async function installOrRebuild(config: Config, appDir: string, framework } } +/** @internal */ export interface DesktopFrameworkInfo { version: string useCustomDist: boolean @@ -26,6 +28,7 @@ function getElectronGypCacheDir() { return path.join(homedir(), ".electron-gyp") } +/** @internal */ export function getGypEnv(frameworkInfo: DesktopFrameworkInfo, platform: string, arch: string, buildFromSource: boolean) { if (!frameworkInfo.useCustomDist) { return Object.assign({}, process.env, { @@ -90,6 +93,7 @@ function isYarnPath(execPath: string | null) { return process.env.FORCE_YARN === "true" || (execPath != null && path.basename(execPath).startsWith("yarn")) } +/** @internal */ export async function rebuild(appDir: string, frameworkInfo: DesktopFrameworkInfo, platform: string = process.platform, arch: string = process.arch, additionalArgs: Array, buildFromSource: boolean) { const pathToDep = await readInstalled(appDir) const nativeDeps = await BluebirdPromise.filter(pathToDep.values(), it => it.extraneous ? false : exists(path.join(it.path, "binding.gyp")), {concurrency: 8}) diff --git a/packages/jsdoc2md.js b/packages/jsdoc2md.js index 2d62dd9aa08..c3ad2e13363 100644 --- a/packages/jsdoc2md.js +++ b/packages/jsdoc2md.js @@ -49,22 +49,8 @@ async function main() { const developerFiles = (await globby([ "builder/**/*.js", - "!**/*-dirPackager.js", - "!***/*-asarUtil.js", - "!***/*-fileMatcher.js", - "!***/*-fileTransformer.js", "!***/*-asar.js", - "!***/*-archive.js", - "!***/*-readInstalled.js", - "!***/*-cliOptions.js", - "!***/*-license.js", - "!***/*-util-filter.js", - "!***/*-yarn.js", - "!***/*-dmgLicense.js", "!***/*-repositoryInfo.js", - "!***/*-readPackageJson.js", - "!***/*-create-self-signed-cert.js", - "!***/*-install-app-deps.js", ], {cwd: source})) .filter(it => !userFiles.includes(it)) diff --git a/typings/yargs.d.ts b/typings/yargs.d.ts index 543df9c10a9..63886831bc9 100644 --- a/typings/yargs.d.ts +++ b/typings/yargs.d.ts @@ -127,7 +127,7 @@ declare namespace yargs { completion(cmd: string, fn?: SyncCompletionFunction): Yargs; - completion(cmd: string, description?: string, fn?: AsyncCompletionFunction): Yargs; + completion(cmd: string | undefined, description?: string, fn?: AsyncCompletionFunction): Yargs; completion(cmd: string, description?: string, fn?: SyncCompletionFunction): Yargs; diff --git a/yarn.lock b/yarn.lock index a80310831bd..76c77b9381f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1013,14 +1013,14 @@ detect-newline@^1.0.3: get-stdin "^4.0.1" minimist "^1.1.0" -develar-typescript-json-schema@0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/develar-typescript-json-schema/-/develar-typescript-json-schema-0.11.0.tgz#d73580cae2fb0b8f9a7cee3d10aff6caae751cca" +develar-typescript-json-schema@0.13.3: + version "0.13.3" + resolved "https://registry.yarnpkg.com/develar-typescript-json-schema/-/develar-typescript-json-schema-0.13.3.tgz#c3accb60ebdcdf4ee711adbd6c194167debf5939" dependencies: - glob "~7.1.1" + glob "~7.1.2" json-stable-stringify "^1.0.1" - typescript "~2.1.5" - yargs "^7.0.2" + typescript "~2.3.0" + yargs "^8.0.1" diff@^3.2.0: version "3.2.0" @@ -1368,7 +1368,7 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@~7.1.1: +glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1, glob@~7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: @@ -3300,9 +3300,9 @@ ts-babel@^3.0.1: fs-extra-p "^4.3.0" source-map-support "^0.4.15" -ts-jsdoc@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ts-jsdoc/-/ts-jsdoc-2.0.0.tgz#ac73a8e32870fda258546a82ed1d74275bcc09c3" +ts-jsdoc@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ts-jsdoc/-/ts-jsdoc-2.0.2.tgz#9fdbd1f34490f33130a3241e34f8d32981e1ba0f" dependencies: bluebird-lst "^1.0.2" chalk "^1.1.3" @@ -3353,9 +3353,9 @@ typescript@next: version "2.5.0-dev.20170614" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.5.0-dev.20170614.tgz#eb77ed212a5e49ebc8392ba0a95713ef87d9f6f1" -typescript@~2.1.5: - version "2.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.1.6.tgz#40c7e6e9e5da7961b7718b55505f9cac9487a607" +typescript@~2.3.0: + version "2.3.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.3.4.tgz#3d38321828231e434f287514959c37a82b629f42" typical@^2.4.2, typical@^2.6.0, typical@^2.6.1: version "2.6.1" @@ -3715,7 +3715,7 @@ yargs@^7.0.2: y18n "^3.2.1" yargs-parser "^5.0.0" -yargs@^8.0.2: +yargs@^8.0.1, yargs@^8.0.2: version "8.0.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" dependencies: