We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5908b9 commit e4b6e7fCopy full SHA for e4b6e7f
1 file changed
lib/stub-generator.js
@@ -79,20 +79,16 @@ StubGenerator.prototype.build = function() {
79
var needsImportsReWritten = false;
80
81
Object.keys(imports).forEach(function(name) {
82
- needsImportsReWritten = true;
83
imports[name].version = versionForModuleName(name, this.basedir);
84
}, this);
85
86
- if (needsImportsReWritten) {
87
- fs.writeFileSync(fullOutputPath, rewriteImports(content, imports));
88
- } else {
89
- fs.writeFileSync(fullOutputPath, content);
90
- }
+ fs.writeFileSync(fullOutputPath, rewriteImports(content, imports));
+ }
91
92
- this.stubs.set(fullInputPath, imports);
+ this.stubs.set(fullInputPath, imports);
93
94
- break;
95
+ break;
96
97
98
debug('patched applied in: %dms', Date.now() - applyPatch);
0 commit comments