Skip to content

Commit

Permalink
Bump dependencies
Browse files Browse the repository at this point in the history
Switch back to original write-file-atomic.
  • Loading branch information
novemberborn authored May 28, 2019
1 parent 98034fb commit 928ed14
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 64 deletions.
2 changes: 1 addition & 1 deletion lib/babel-pipeline.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
const fs = require('fs');
const path = require('path');
const writeFileAtomic = require('@ava/write-file-atomic');
const babel = require('@babel/core');
const concordance = require('concordance');
const convertSourceMap = require('convert-source-map');
Expand All @@ -11,6 +10,7 @@ const md5Hex = require('md5-hex');
const packageHash = require('package-hash');
const pkgConf = require('pkg-conf');
const stripBomBuf = require('strip-bom-buf');
const writeFileAtomic = require('write-file-atomic');
const pkg = require('../package.json');
const chalk = require('./chalk').get();

Expand Down
10 changes: 6 additions & 4 deletions lib/snapshot-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const fs = require('fs');
const path = require('path');
const zlib = require('zlib');

const writeFileAtomic = require('@ava/write-file-atomic');
const concordance = require('concordance');
const indentString = require('indent-string');
const makeDir = require('make-dir');
const md5Hex = require('md5-hex');
const convertSourceMap = require('convert-source-map');
const slash = require('slash');
const writeFileAtomic = require('write-file-atomic');

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

Expand Down Expand Up @@ -361,10 +361,12 @@ class Manager {
generateReport(this.relFile, this.snapFile, this.reportEntries);

makeDir.sync(this.dir);
const tmpSnapPath = writeFileAtomic.sync(snapPath, buffer);
const tmpReportPath = writeFileAtomic.sync(reportPath, reportBuffer);

return [tmpSnapPath, tmpReportPath, snapPath, reportPath];
const paths = [snapPath, reportPath];
const tmpfileCreated = tmpfile => paths.push(tmpfile);
writeFileAtomic.sync(snapPath, buffer, {tmpfileCreated});
writeFileAtomic.sync(reportPath, reportBuffer, {tmpfileCreated});
return paths;
}
}

Expand Down
143 changes: 89 additions & 54 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"dependencies": {
"@ava/babel-preset-stage-4": "^3.0.0",
"@ava/babel-preset-transform-test-files": "^5.0.0",
"@ava/write-file-atomic": "^2.2.0",
"@babel/core": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/generator": "^7.4.4",
"@babel/plugin-syntax-async-generators": "^7.2.0",
"@babel/plugin-syntax-object-rest-spread": "^7.2.0",
Expand All @@ -72,7 +71,7 @@
"array-union": "^2.1.0",
"array-uniq": "^2.1.0",
"arrify": "^2.0.1",
"bluebird": "^3.5.4",
"bluebird": "^3.5.5",
"chalk": "^2.4.2",
"chokidar": "^3.0.0",
"chunkd": "^1.0.0",
Expand Down Expand Up @@ -137,7 +136,8 @@
"trim-off-newlines": "^1.0.1",
"trim-right": "^1.0.1",
"unique-temp-dir": "^1.0.0",
"update-notifier": "^3.0.0"
"update-notifier": "^3.0.0",
"write-file-atomic": "^3.0.0"
},
"devDependencies": {
"cli-table3": "^0.5.1",
Expand All @@ -159,7 +159,7 @@
"tap": "^12.6.1",
"temp-write": "^4.0.0",
"touch": "^3.1.0",
"ts-node": "^8.1.0",
"ts-node": "^8.2.0",
"typescript": "^3.4.5",
"xo": "^0.24.0",
"zen-observable": "^0.8.14"
Expand Down

0 comments on commit 928ed14

Please sign in to comment.