Skip to content

Commit

Permalink
fix: use own copy of bluebird library (scoped)
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Oct 26, 2016
1 parent 99a5f0a commit 686dc6b
Show file tree
Hide file tree
Showing 47 changed files with 122 additions and 115 deletions.
4 changes: 2 additions & 2 deletions nsis-auto-updater/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"out"
],
"dependencies": {
"bluebird": "^3.4.6",
"fs-extra-p": "^1.2.0",
"bluebird-lst-c": "^1.0.2",
"fs-extra-p": "^2.0.3",
"ini": "^1.3.4",
"js-yaml": "^3.6.1",
"semver": "^5.3.0",
Expand Down
7 changes: 1 addition & 6 deletions nsis-auto-updater/src/NsisUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ import { gt as isVersionGreaterThan, valid as parseVersion } from "semver"
import { download } from "../../src/util/httpRequest"
import { Provider, UpdateCheckResult } from "./api"
import { BintrayProvider } from "./BintrayProvider"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { BintrayOptions, PublishConfiguration, GithubOptions } from "../../src/options/publishOptions"
import { readFile } from "fs-extra-p"
import { safeLoad } from "js-yaml"

BluebirdPromise.config({
longStackTraces: true,
cancellation: true
})

export class NsisUpdater extends EventEmitter {
private setupPath: string | null

Expand Down
2 changes: 1 addition & 1 deletion nsis-auto-updater/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"../typings/semver.d.ts",
"../node_modules/@types/node/index.d.ts",
"../node_modules/fs-extra-p/index.d.ts",
"../node_modules/@develar/types/bluebird.d.ts",
"../node_modules/bluebird-lst-c/index.d.ts",
"../src/util/httpRequest.ts",
"../src/publish/restApiRequest.ts",
"../src/publish/restApiRequest.ts",
Expand Down
30 changes: 19 additions & 11 deletions nsis-auto-updater/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"

bluebird-lst-c@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bluebird-lst-c/-/bluebird-lst-c-1.0.2.tgz#b9800c878d83bda4630f5ffbc0e39cc5f8a193e7"
dependencies:
bluebird "^3.4.6"

bluebird@^3.4.6:
version "3.4.6"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.4.6.tgz#01da8d821d87813d158967e743d5fe6c62cf8c0f"
Expand All @@ -29,20 +35,20 @@ esprima@^2.6.0:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"

fs-extra-p@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/fs-extra-p/-/fs-extra-p-1.2.0.tgz#16abed58ec63219cf9244a5a54ba200d4864b347"
fs-extra-p@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/fs-extra-p/-/fs-extra-p-2.0.3.tgz#570072384028c95193a158b4ff080be0200fd007"
dependencies:
bluebird "^3.4.6"
fs-extra-tf "^0.30.3"
fs-extra-tf "^0.30.4"

fs-extra-tf@^0.30.3:
version "0.30.3"
resolved "https://registry.yarnpkg.com/fs-extra-tf/-/fs-extra-tf-0.30.3.tgz#3099cc70fe571c695479bf12251c6fa2e21177ce"
fs-extra-tf@^0.30.4:
version "0.30.4"
resolved "https://registry.yarnpkg.com/fs-extra-tf/-/fs-extra-tf-0.30.4.tgz#c31e0c83a92201bd948e788563e1c02f35583e8f"
dependencies:
graceful-fs "^4.1.9"
jsonfile "^2.4.0"
klaw "^1.3.0"
klaw "^1.3.1"
path-is-absolute "^1.0.1"
rimraf "^2.5.4"

Expand Down Expand Up @@ -93,9 +99,11 @@ jsonfile@^2.4.0:
optionalDependencies:
graceful-fs "^4.1.6"

klaw@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.0.tgz#8857bfbc1d824badf13d3d0241d8bbe46fb12f73"
klaw@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
optionalDependencies:
graceful-fs "^4.1.9"

minimatch@^3.0.2:
version "3.0.3"
Expand Down
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@
"archiver": "^1.1.0",
"archiver-utils": "^1.3.0",
"asar-electron-builder": "^0.13.5",
"bluebird": "^3.4.6",
"bluebird-lst-c": "^1.0.2",
"chalk": "^1.1.3",
"chromium-pickle-js": "^0.2.0",
"cli-cursor": "^1.0.2",
"cuint": "^0.2.2",
"debug": "^2.2.0",
"electron-download": "2.1.2",
"electron-osx-sign-tf": "^1.0.1",
"fs-extra-p": "^1.2.0",
"fs-extra-p": "^2.0.3",
"hosted-git-info": "^2.1.5",
"ini": "^1.3.4",
"isbinaryfile": "^3.0.1",
Expand All @@ -94,16 +94,15 @@
"yargs": "^6.3.0"
},
"devDependencies": {
"@develar/semantic-release": "^6.3.10",
"@develar/types": "^1.0.1",
"@develar/semantic-release": "^6.3.11",
"@types/ini": "^1.3.29",
"@types/js-yaml": "^3.5.28",
"@types/source-map-support": "^0.2.28",
"ava-tf": "^0.16.4",
"babel-plugin-array-includes": "^2.0.3",
"babel-plugin-transform-async-to-module-method": "^6.16.0",
"babel-plugin-transform-es2015-destructuring": "^6.16.0",
"babel-plugin-transform-es2015-parameters": "^6.17.0",
"babel-plugin-transform-es2015-destructuring": "^6.18.0",
"babel-plugin-transform-es2015-parameters": "^6.18.0",
"babel-plugin-transform-es2015-spread": "^6.8.0",
"babel-plugin-transform-inline-imports-commonjs": "^1.2.0",
"decompress-zip": "^0.3.0",
Expand All @@ -112,7 +111,7 @@
"husky": "^0.11.9",
"json8": "^0.9.2",
"path-sort": "^0.1.0",
"ts-babel": "^1.1.2",
"ts-babel": "^1.1.3",
"tslint": "^4.0.0-dev.0",
"typescript": "^2.1.0-dev.20161025",
"validate-commit-msg": "^2.8.2",
Expand All @@ -123,7 +122,7 @@
[
"transform-async-to-module-method",
{
"module": "bluebird",
"module": "bluebird-lst-c",
"method": "coroutine"
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/asarUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
lstat, readdir, readFile, Stats, createWriteStream, ensureDir, createReadStream, readJson,
writeFile, realpath
} from "fs-extra-p"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { log } from "./util/log"
import { Minimatch } from "minimatch"
Expand Down
2 changes: 1 addition & 1 deletion src/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PackagerOptions, getPublishConfigs, getResolvedPublishConfig } from "./
import { PublishOptions, Publisher } from "./publish/publisher"
import { GitHubPublisher } from "./publish/gitHubPublisher"
import { executeFinally } from "./util/promise"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { isEmptyOrSpaces, isCi, debug } from "./util/util"
import { log } from "./util/log"
import { Platform, Arch, archFromString } from "./metadata"
Expand Down
2 changes: 1 addition & 1 deletion src/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { homedir } from "os"
import { readdir, lstat, Stats, remove, readFile } from "fs-extra-p"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"

async function main() {
Expand Down
2 changes: 1 addition & 1 deletion src/codeSign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { deleteFile, outputFile, copy, rename } from "fs-extra-p"
import { download } from "./util/httpRequest"
import * as path from "path"
import { executeFinally, all } from "./util/promise"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { randomBytes } from "crypto"
import { homedir } from "os"
import { TmpDir } from "./util/tmp"
Expand Down
2 changes: 1 addition & 1 deletion src/install-app-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { computeDefaultAppDirectory, installDependencies, getElectronVersion, use } from "./util/util"
import { printErrorAndExit } from "./util/promise"
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { DevMetadata } from "./metadata"
import yargs from "yargs"
import { readPackageJson } from "./util/readPackageJson"
Expand Down
2 changes: 1 addition & 1 deletion src/linuxPackager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { PlatformPackager, BuildInfo, Target, TargetEx } from "./platformPackager"
import { Platform, LinuxBuildOptions, Arch } from "./metadata"
import FpmTarget from "./targets/fpm"
Expand Down
2 changes: 1 addition & 1 deletion src/macPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PlatformPackager, BuildInfo, Target } from "./platformPackager"
import { Platform, Arch } from "./metadata"
import { MasBuildOptions, MacOptions } from "./options/macOptions"
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { log, warn, task } from "./util/log"
import { createKeychain, CodeSigningInfo, findIdentity } from "./codeSign"
import { deepAssign } from "./util/deepAssign"
Expand Down
2 changes: 1 addition & 1 deletion src/packager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "./util/util"
import { all, executeFinally } from "./util/promise"
import { EventEmitter } from "events"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { AppMetadata, DevMetadata, Platform, Arch } from "./metadata"
import { PlatformPackager, BuildInfo, ArtifactCreated, Target } from "./platformPackager"
import { WinPackager } from "./winPackager"
Expand Down
2 changes: 1 addition & 1 deletion src/packager/dirPackager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { emptyDir, copy, chmod } from "fs-extra-p"
import { warn } from "../util/log"
import { PlatformPackager } from "../platformPackager"
Expand Down
2 changes: 1 addition & 1 deletion src/packager/mac.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { rename, readFile, writeFile, copy, unlink } from "fs-extra-p"
import * as path from "path"
import { parse as parsePlist, build as buildPlist } from "plist"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { use, asArray } from "../util/util"
import { normalizeExt, PlatformPackager } from "../platformPackager"
import { warn } from "../util/log"
Expand Down
2 changes: 1 addition & 1 deletion src/platformPackager.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AppMetadata, DevMetadata, Platform, PlatformSpecificBuildOptions, Arch, FileAssociation } from "./metadata"
import EventEmitter = NodeJS.EventEmitter
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { readdir, remove } from "fs-extra-p"
import { statOrNull, use, unlinkIfExists, isEmptyOrSpaces, asArray } from "./util/util"
Expand Down
2 changes: 1 addition & 1 deletion src/publish/BintrayPublisher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Publisher, PublishOptions } from "./publisher"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { HttpError, doApiRequest } from "./restApiRequest"
import { uploadFile } from "./uploader"
import { log } from "../util/log"
Expand Down
2 changes: 1 addition & 1 deletion src/publish/gitHubPublisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { parse as parseUrl } from "url"
import mime from "mime"
import { stat } from "fs-extra-p"
import { githubRequest, HttpError, doApiRequest } from "./restApiRequest"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { PublishPolicy, PublishOptions, Publisher } from "./publisher"
import { uploadFile } from "./uploader"
import { GithubOptions } from "../options/publishOptions"
Expand Down
2 changes: 1 addition & 1 deletion src/publish/restApiRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as https from "https"
import { RequestOptions } from "https"
import { IncomingMessage, ClientRequest } from "http"
import { addTimeOutHandler } from "../util/httpRequest"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"

export function githubRequest<T>(path: string, token: string | null, data: { [name: string]: any; } | null = null, method: string = "GET"): Promise<T> {
return request<T>("api.github.com", path, token, data, method)
Expand Down
2 changes: 1 addition & 1 deletion src/targets/LinuxTargetHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { readdir, outputFile, ensureDir } from "fs-extra-p"
import * as path from "path"
import { exec, debug, isEmptyOrSpaces } from "../util/util"
import { PlatformPackager } from "../platformPackager"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { LinuxBuildOptions } from "../metadata"

export const installPrefix = "/opt"
Expand Down
2 changes: 1 addition & 1 deletion src/targets/appImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { exec, unlinkIfExists } from "../util/util"
import { open, write, createReadStream, createWriteStream, close, chmod } from "fs-extra-p"
import { LinuxTargetHelper } from "./LinuxTargetHelper"
import { getBin } from "../util/binDownload"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { v1 as uuid1 } from "uuid-1345"

const appImageVersion = process.platform === "darwin" ? "AppImage-09-07-16-mac" : "AppImage-09-07-16-linux"
Expand Down
2 changes: 1 addition & 1 deletion src/targets/dmg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path"
import { log, warn } from "../util/log"
import { Target, PlatformPackager } from "../platformPackager"
import { MacOptions, DmgOptions, DmgContent } from "../options/macOptions"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { debug, use, exec, statOrNull, isEmptyOrSpaces } from "../util/util"
import { copy, unlink, outputFile, remove } from "fs-extra-p"
import { executeFinally } from "../util/promise"
Expand Down
2 changes: 1 addition & 1 deletion src/targets/fpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { use, exec } from "../util/util"
import * as path from "path"
import { getBin } from "../util/binDownload"
import { readFile, outputFile } from "fs-extra-p"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { LinuxTargetHelper, installPrefix } from "./LinuxTargetHelper"
import * as errorMessages from "../errorMessages"
import { TmpDir } from "../util/tmp"
Expand Down
2 changes: 1 addition & 1 deletion src/targets/nsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { WinPackager } from "../winPackager"
import { Arch } from "../metadata"
import { exec, debug, doSpawn, handleProcess, use, asArray } from "../util/util"
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { getBinFromBintray } from "../util/binDownload"
import { v5 as uuid5 } from "uuid-1345"
import { normalizeExt, TargetEx, getPublishConfigs, getResolvedPublishConfig } from "../platformPackager"
Expand Down
2 changes: 1 addition & 1 deletion src/targets/squirrelPack.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { remove, copy, createWriteStream, unlink, ensureDir } from "fs-extra-p"
import { spawn, exec } from "../util/util"
import { debug } from "../util/util"
Expand Down
2 changes: 1 addition & 1 deletion src/util/binDownload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { download } from "./httpRequest"
import { path7za } from "7zip-bin"
import * as path from "path"
import { homedir } from "os"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"

const versionToPromise = new Map<string, BluebirdPromise<string>>()

Expand Down
2 changes: 1 addition & 1 deletion src/util/filter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { copy, Stats } from "fs-extra-p"
import { Minimatch } from "minimatch"
import * as path from "path"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
const readInstalled = require("read-installed")

// we use relative path to avoid canonical path issue - e.g. /tmp vs /private/tmp
Expand Down
2 changes: 1 addition & 1 deletion src/util/httpRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IncomingMessage, ClientRequest, Agent } from "http"
import * as https from "https"
import { createWriteStream, ensureDir, readFile } from "fs-extra-p"
import { parse as parseUrl } from "url"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import * as path from "path"
import { createHash } from "crypto"
import { Transform } from "stream"
Expand Down
2 changes: 1 addition & 1 deletion src/util/log.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { yellow, green, blue } from "chalk"
import WritableStream = NodeJS.WritableStream
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { eraseLines } from "ansi-escapes"
import * as cursor from "cli-cursor"
import prettyMs from "pretty-ms"
Expand Down
2 changes: 1 addition & 1 deletion src/util/promise.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { red } from "chalk"

export function printErrorAndExit(error: Error) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/tmp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { tmpdir } from "os"
import { remove, mkdirs, removeSync } from "fs-extra-p"
import * as path from "path"
import { getTempName } from "./util"
import BluebirdPromise from "bluebird"
import BluebirdPromise from "bluebird-lst-c"
import { warn } from "./log"

const mkdtemp: any | null = require("fs-extra-p").mkdtemp
Expand Down
Loading

0 comments on commit 686dc6b

Please sign in to comment.