Skip to content

Commit

Permalink
refactor: remove promisifed-fs.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Apr 20, 2016
1 parent 9134f61 commit 9b043d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 14 deletions.
8 changes: 0 additions & 8 deletions src/promisifed-fs.ts

This file was deleted.

4 changes: 2 additions & 2 deletions src/repositoryInfo.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { fromUrl as parseRepositoryUrl, Info } from "hosted-git-info"
import { readText } from "./promisifed-fs"
import { readFile } from "fs-extra-p"
import { AppMetadata, Metadata } from "./metadata"
import * as path from "path"

Expand Down Expand Up @@ -30,7 +30,7 @@ export class InfoRetriever {
async function getGitUrlFromGitConfig(): Promise<string> {
let data: string = null
try {
data = await readText(path.join(".git", "config"))
data = await readFile(path.join(".git", "config"), "utf8")
}
catch (e) {
if (e.code === "ENOENT") {
Expand Down
5 changes: 2 additions & 3 deletions test/src/helpers/packTester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import * as path from "path"
import { parse as parsePlist } from "plist"
import { CSC_LINK, CSC_KEY_PASSWORD } from "./codeSignData"
import { expectedLinuxContents, expectedWinContents } from "./expectedContents"
import { readText } from "out/promisifed-fs"
import { Packager, PackagerOptions, Platform, getProductName, ArtifactCreated } from "out"
import { exec } from "out/util"
import pathSorter = require("path-sort")
Expand Down Expand Up @@ -169,7 +168,7 @@ function parseDebControl(info: string): any {
async function checkOsXResult(packager: Packager, artifacts: Array<ArtifactCreated>) {
const productName = getProductName(packager.metadata, packager.devMetadata)
const packedAppDir = path.join(path.dirname(artifacts[0].file), (productName || packager.metadata.name) + ".app")
const info = parsePlist(await readText(path.join(packedAppDir, "Contents", "Info.plist")))
const info = parsePlist(await readFile(path.join(packedAppDir, "Contents", "Info.plist"), "utf8"))
assertThat(info).has.properties({
CFBundleDisplayName: productName,
CFBundleIdentifier: "your.id",
Expand Down Expand Up @@ -210,7 +209,7 @@ async function checkWindowsResult(packager: Packager, packagerOptions: PackagerO

let i = filenames.indexOf("RELEASES-ia32")
if (i !== -1) {
assertThat((await readText(artifacts[i].file)).indexOf("ia32")).not.equal(-1)
assertThat((await readFile(artifacts[i].file, "utf8")).indexOf("ia32")).not.equal(-1)
}

if (archSuffix == "") {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"src/packager.ts",
"src/platformPackager.ts",
"src/promise.ts",
"src/promisifed-fs.ts",
"src/repositoryInfo.ts",
"src/util.ts",
"src/winPackager.ts"
Expand Down

0 comments on commit 9b043d6

Please sign in to comment.