Skip to content

Commit 335ab5f

Browse files
clydinhansl
authored andcommitted
refactor: remove use of dual temp packages (#4281)
1 parent 645c870 commit 335ab5f

File tree

4 files changed

+3
-17
lines changed

4 files changed

+3
-17
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"portfinder": "1.0.9",
8484
"postcss-discard-comments": "^2.0.4",
8585
"postcss-loader": "^0.9.1",
86-
"quick-temp": "0.1.5",
8786
"raw-loader": "^0.5.1",
8887
"reflect-metadata": "^0.1.8",
8988
"remap-istanbul": "^0.6.4",

packages/angular-cli/ember-cli/lib/commands/test.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,22 +31,12 @@ module.exports = Command.extend({
3131

3232
init: function() {
3333
this.assign = require('lodash/assign');
34-
this.quickTemp = require('quick-temp');
3534

3635
if (!this.testing) {
3736
process.env.EMBER_CLI_TEST_COMMAND = true;
3837
}
3938
},
4039

41-
tmp: function() {
42-
return this.quickTemp.makeOrRemake(this, '-testsDist');
43-
},
44-
45-
rmTmp: function() {
46-
this.quickTemp.remove(this, '-testsDist');
47-
this.quickTemp.remove(this, '-customConfigFile');
48-
},
49-
5040
_generateCustomConfigs: function(options) {
5141
var config = {};
5242
if (!options.filter && !options.module && !options.launch && !options.query && !options['test-page']) { return config; }

packages/angular-cli/ember-cli/lib/models/edit-file-diff.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ var Promise = require('../ext/promise');
55
var readFile = Promise.denodeify(fs.readFile);
66
var writeFile = Promise.denodeify(fs.writeFile);
77
var jsdiff = require('diff');
8-
var quickTemp = require('quick-temp');
8+
var temp = require('temp').track();
99
var path = require('path');
1010
var SilentError = require('silent-error');
1111
var openEditor = require('../utilities/open-editor');
1212

1313
function EditFileDiff(options) {
1414
this.info = options.info;
15-
16-
quickTemp.makeOrRemake(this, 'tmpDifferenceDir');
1715
}
1816

1917
EditFileDiff.prototype.edit = function() {
@@ -27,7 +25,7 @@ EditFileDiff.prototype.edit = function() {
2725
};
2826

2927
function cleanUp() {
30-
quickTemp.remove(this, 'tmpDifferenceDir'); // jshint ignore:line
28+
temp.cleanupSync();
3129
}
3230

3331
function applyPatch(resultHash) {
@@ -51,7 +49,7 @@ function applyPatch(resultHash) {
5149
function invokeEditor(result) {
5250
var info = this.info; // jshint ignore:line
5351
var diff = jsdiff.createPatch(info.outputPath, result.output.toString(), result.input);
54-
var diffPath = path.join(this.tmpDifferenceDir, 'currentDiff.diff'); // jshint ignore:line
52+
var diffPath = path.join(temp.mkdirSync(), 'currentDiff.diff');
5553

5654
return writeFile(diffPath, diff).then(function() {
5755
return openEditor(diffPath);

packages/angular-cli/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"portfinder": "1.0.9",
7171
"postcss-discard-comments": "^2.0.4",
7272
"postcss-loader": "^0.9.1",
73-
"quick-temp": "0.1.5",
7473
"raw-loader": "^0.5.1",
7574
"remap-istanbul": "^0.6.4",
7675
"resolve": "^1.1.7",

0 commit comments

Comments
 (0)