beachball
Advanced tools
Comparing version 1.13.2 to 1.13.3
@@ -5,3 +5,17 @@ { | ||
{ | ||
"date": "Mon, 16 Sep 2019 22:57:34 GMT", | ||
"date": "Wed, 25 Sep 2019 20:49:40 GMT", | ||
"tag": "beachball_v1.13.3", | ||
"version": "1.13.3", | ||
"comments": { | ||
"patch": [ | ||
{ | ||
"comment": "make tests work on windows", | ||
"author": "kchau@microsoft.com", | ||
"commit": "45b5ed66ec87d05678f62dbd383ff7425015c3d4" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Mon, 16 Sep 2019 22:57:40 GMT", | ||
"tag": "beachball_v1.13.2", | ||
@@ -8,0 +22,0 @@ "version": "1.13.2", |
# Change Log - beachball | ||
This log was last generated on Mon, 16 Sep 2019 22:57:34 GMT and should not be manually modified. | ||
This log was last generated on Wed, 25 Sep 2019 20:49:40 GMT and should not be manually modified. | ||
## 1.13.3 | ||
Wed, 25 Sep 2019 20:49:40 GMT | ||
### Patches | ||
- make tests work on windows (kchau@microsoft.com) | ||
## 1.13.2 | ||
Mon, 16 Sep 2019 22:57:34 GMT | ||
Mon, 16 Sep 2019 22:57:40 GMT | ||
@@ -8,0 +14,0 @@ ### Patches |
@@ -25,6 +25,6 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const fs_extra_1 = require("fs-extra"); | ||
const fs = __importStar(require("fs-extra")); | ||
const util_1 = require("util"); | ||
const writeFileAsync = util_1.promisify(fs_extra_1.writeFile); | ||
const removeAsync = util_1.promisify(fs_extra_1.remove); | ||
const writeFileAsync = util_1.promisify(fs.writeFile); | ||
const removeAsync = util_1.promisify(fs.remove); | ||
const packageJson = JSON.stringify({ | ||
@@ -90,2 +90,13 @@ name: 'foo', | ||
} | ||
function touchAsync(filename) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const time = new Date(); | ||
try { | ||
yield fs.utimes(filename, time, time); | ||
} | ||
catch (err) { | ||
yield fs.close(yield fs.open(filename, 'w')); | ||
} | ||
}); | ||
} | ||
class RepositoryFactory { | ||
@@ -150,4 +161,4 @@ create() { | ||
} | ||
yield touchAsync(path_1.default.join(this.root.name, newFilename)); | ||
yield runInDirectory(this.root.name, [ | ||
`touch ${newFilename}`, | ||
`git add ${newFilename}`, | ||
@@ -179,3 +190,3 @@ `git commit -m '${newFilename}'`, | ||
} | ||
yield removeAsync(this.root.name); | ||
//await removeAsync(this.root.name); | ||
}); | ||
@@ -182,0 +193,0 @@ } |
{ | ||
"name": "beachball", | ||
"version": "1.13.2", | ||
"version": "1.13.3", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -5,7 +5,7 @@ import { exec as nativeExec } from 'child_process'; | ||
import path from 'path'; | ||
import { writeFile, remove } from 'fs-extra'; | ||
import * as fs from 'fs-extra'; | ||
import { promisify } from 'util'; | ||
const writeFileAsync = promisify(writeFile); | ||
const removeAsync = promisify(remove); | ||
const writeFileAsync = promisify(fs.writeFile); | ||
const removeAsync = promisify(fs.remove); | ||
@@ -74,2 +74,12 @@ const packageJson = JSON.stringify({ | ||
async function touchAsync(filename:string) { | ||
const time = new Date(); | ||
try { | ||
await fs.utimes(filename, time, time); | ||
} catch (err) { | ||
await fs.close(await fs.open(filename, 'w')); | ||
} | ||
} | ||
export class RepositoryFactory { | ||
@@ -138,4 +148,6 @@ root?: tmp.DirResult; | ||
} | ||
await touchAsync(path.join(this.root.name, newFilename)); | ||
await runInDirectory(this.root.name, [ | ||
`touch ${newFilename}`, | ||
`git add ${newFilename}`, | ||
@@ -166,4 +178,4 @@ `git commit -m '${newFilename}'`, | ||
await removeAsync(this.root.name); | ||
//await removeAsync(this.root.name); | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
165174
4033