@putout/cli-process-file 5.1.1 → 6.0.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
@@ -14,7 +14,7 @@ npm i @putout/cli-process-file
14
14
  ## Example
15
15
 
16
16
  ```js
17
- import initProcessFile from '@putout/cli-process-file';
17
+ import {initProcessFile} from '@putout/cli-process-file';
18
18
 
19
19
  const processFile = initProcessFile({
20
20
  fix: true,
@@ -1,15 +1,12 @@
1
- 'use strict';
2
-
3
- const process = require('node:process');
4
- const tryToCatch = require('try-to-catch');
5
- const {eslint: _eslint} = require('@putout/eslint');
6
- const {parseMatch} = require('putout/parse-match');
7
- const {mergeOptions} = require('putout/merge-options');
8
- const {parseError} = require('putout/parse-error');
9
- const {putoutAsync: _putoutAsync} = require('putout');
10
- const once = require('once');
11
-
12
- const {simpleImport: _simpleImport} = require('./simple-import');
1
+ import process from 'node:process';
2
+ import {tryToCatch} from 'try-to-catch';
3
+ import {eslint as _eslint} from '@putout/eslint';
4
+ import {parseMatch} from 'putout/parse-match';
5
+ import {mergeOptions} from 'putout/merge-options';
6
+ import {parseError} from 'putout/parse-error';
7
+ import {putoutAsync as _putoutAsync} from 'putout';
8
+ import once from 'once';
9
+ import {simpleImport as _simpleImport} from './simple-import.js';
13
10
 
14
11
  const getMatchedOptions = (name, options) => {
15
12
  if (!name.includes('{'))
@@ -20,7 +17,7 @@ const getMatchedOptions = (name, options) => {
20
17
 
21
18
  const getEnv = once(() => process.env);
22
19
 
23
- module.exports = ({fix, fixCount, logError, raw}) => async function processFile(overrides) {
20
+ export const initProcessFile = ({fix, fixCount, logError, raw}) => async function processFile(overrides) {
24
21
  const {
25
22
  name = '<input>',
26
23
  source,
@@ -1,5 +1,3 @@
1
- 'use strict';
2
-
3
- module.exports.simpleImport = async (url) => {
1
+ export const simpleImport = async (url) => {
4
2
  return await import(url);
5
3
  };
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@putout/cli-process-file",
3
- "version": "5.1.1",
3
+ "version": "6.0.0",
4
4
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
5
  "description": "Run all 🐊Putout linters",
6
6
  "homepage": "https://github.com/coderaiser/putout/tree/master/packages/cli-process-file#readme",
7
7
  "main": "lib/process-file.js",
8
- "type": "commonjs",
8
+ "type": "module",
9
9
  "release": false,
10
10
  "tag": false,
11
11
  "changelog": false,
@@ -27,9 +27,9 @@
27
27
  "@putout/eslint": "^5.0.0",
28
28
  "deepmerge": "^4.3.1",
29
29
  "once": "^1.4.0",
30
- "samadhi": "^3.0.0",
30
+ "samadhi": "^3.0.6",
31
31
  "try-catch": "^4.0.0",
32
- "try-to-catch": "^3.0.0"
32
+ "try-to-catch": "^4.0.0"
33
33
  },
34
34
  "keywords": [
35
35
  "putout",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "license": "MIT",
54
54
  "engines": {
55
- "node": ">=20"
55
+ "node": ">=22"
56
56
  },
57
57
  "publishConfig": {
58
58
  "access": "public"