@putout/test 15.3.3 → 15.5.0

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.
package/README.md CHANGED
@@ -21,6 +21,8 @@ Set environment variable `UPDATE=1` to update `transform` and `format` fixtures
21
21
  UPDATE=1 tape test/*.js
22
22
  ```
23
23
 
24
+ When you need to overide extension use `UPDATE_EXTENSION`, for example `UPDATE_EXTENSION=abc` will create files with extension 'abc'.
25
+
24
26
  ## Plugins API
25
27
 
26
28
  🐊**Putout** can be used in all IDE's supported by`ESLint` as [`eslint-plugin-putout`](https://github.com/coderaiser/putout/tree/packages/eslint-plugin-putout).
@@ -18,7 +18,7 @@ export const createError = (help, source, values) => {
18
18
 
19
19
  error.loc = {
20
20
  line: 1,
21
- column: 1,
21
+ column: 0,
22
22
  };
23
23
 
24
24
  throw Error(
package/lib/fixture.js CHANGED
@@ -28,13 +28,14 @@ export const readFixture = (name, extension) => {
28
28
  ];
29
29
 
30
30
  if (extension) {
31
+ const {UPDATE_EXTENSION} = process.env;
31
32
  const [e, data] = tryCatch(readFileSync, `${name}.${extension}`, 'utf8');
32
33
 
33
34
  if (!e)
34
35
  return [
35
36
  data,
36
37
  TS.DISABLED,
37
- extension,
38
+ UPDATE_EXTENSION || extension,
38
39
  ];
39
40
  }
40
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/test",
3
- "version": "15.3.3",
3
+ "version": "15.5.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Test runner for 🐊Putout plugins ",