Skip to content

Commit 928ed14

Browse files
authored
Bump dependencies
Switch back to original write-file-atomic.
1 parent 98034fb commit 928ed14

File tree

4 files changed

+101
-64
lines changed

4 files changed

+101
-64
lines changed

lib/babel-pipeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22
const fs = require('fs');
33
const path = require('path');
4-
const writeFileAtomic = require('@ava/write-file-atomic');
54
const babel = require('@babel/core');
65
const concordance = require('concordance');
76
const convertSourceMap = require('convert-source-map');
@@ -11,6 +10,7 @@ const md5Hex = require('md5-hex');
1110
const packageHash = require('package-hash');
1211
const pkgConf = require('pkg-conf');
1312
const stripBomBuf = require('strip-bom-buf');
13+
const writeFileAtomic = require('write-file-atomic');
1414
const pkg = require('../package.json');
1515
const chalk = require('./chalk').get();
1616

lib/snapshot-manager.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ const fs = require('fs');
55
const path = require('path');
66
const zlib = require('zlib');
77

8-
const writeFileAtomic = require('@ava/write-file-atomic');
98
const concordance = require('concordance');
109
const indentString = require('indent-string');
1110
const makeDir = require('make-dir');
1211
const md5Hex = require('md5-hex');
1312
const convertSourceMap = require('convert-source-map');
1413
const slash = require('slash');
14+
const writeFileAtomic = require('write-file-atomic');
1515

1616
const concordanceOptions = require('./concordance-options').snapshotManager;
1717

@@ -361,10 +361,12 @@ class Manager {
361361
generateReport(this.relFile, this.snapFile, this.reportEntries);
362362

363363
makeDir.sync(this.dir);
364-
const tmpSnapPath = writeFileAtomic.sync(snapPath, buffer);
365-
const tmpReportPath = writeFileAtomic.sync(reportPath, reportBuffer);
366364

367-
return [tmpSnapPath, tmpReportPath, snapPath, reportPath];
365+
const paths = [snapPath, reportPath];
366+
const tmpfileCreated = tmpfile => paths.push(tmpfile);
367+
writeFileAtomic.sync(snapPath, buffer, {tmpfileCreated});
368+
writeFileAtomic.sync(reportPath, reportBuffer, {tmpfileCreated});
369+
return paths;
368370
}
369371
}
370372

package-lock.json

Lines changed: 89 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959
"dependencies": {
6060
"@ava/babel-preset-stage-4": "^3.0.0",
6161
"@ava/babel-preset-transform-test-files": "^5.0.0",
62-
"@ava/write-file-atomic": "^2.2.0",
63-
"@babel/core": "^7.4.4",
62+
"@babel/core": "^7.4.5",
6463
"@babel/generator": "^7.4.4",
6564
"@babel/plugin-syntax-async-generators": "^7.2.0",
6665
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
@@ -72,7 +71,7 @@
7271
"array-union": "^2.1.0",
7372
"array-uniq": "^2.1.0",
7473
"arrify": "^2.0.1",
75-
"bluebird": "^3.5.4",
74+
"bluebird": "^3.5.5",
7675
"chalk": "^2.4.2",
7776
"chokidar": "^3.0.0",
7877
"chunkd": "^1.0.0",
@@ -137,7 +136,8 @@
137136
"trim-off-newlines": "^1.0.1",
138137
"trim-right": "^1.0.1",
139138
"unique-temp-dir": "^1.0.0",
140-
"update-notifier": "^3.0.0"
139+
"update-notifier": "^3.0.0",
140+
"write-file-atomic": "^3.0.0"
141141
},
142142
"devDependencies": {
143143
"cli-table3": "^0.5.1",
@@ -159,7 +159,7 @@
159159
"tap": "^12.6.1",
160160
"temp-write": "^4.0.0",
161161
"touch": "^3.1.0",
162-
"ts-node": "^8.1.0",
162+
"ts-node": "^8.2.0",
163163
"typescript": "^3.4.5",
164164
"xo": "^0.24.0",
165165
"zen-observable": "^0.8.14"

0 commit comments

Comments
 (0)