@putout/test 5.5.0 → 5.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,10 @@ const {runProcessors} = require('@putout/engine-processor');
16
16
 
17
17
  const isStr = (a) => typeof a === 'string';
18
18
  const isUpdate = () => global.process.env.UPDATE;
19
+ const update = async (a, b) => {
20
+ const write = global.writeFile || writeFile;
21
+ await write(a, b);
22
+ };
19
23
 
20
24
  const buildOptions = ({options, plugins, processors}) => ({
21
25
  ...options,
@@ -116,7 +120,7 @@ async function process(filename, dir, {processors, plugins, extension, fix = tru
116
120
  });
117
121
 
118
122
  if (isUpdate() && !noChange)
119
- await writeFile(outputName, processedSource);
123
+ await update(outputName, processedSource);
120
124
 
121
125
  return {
122
126
  processedSource,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "5.5.0",
3
+ "version": "5.5.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "test runner for putout plugins ",