putout 35.35.4 → 35.35.6

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/ChangeLog CHANGED
@@ -1,3 +1,23 @@
1
+ 2024.06.22, v35.35.6
2
+
3
+ fix:
4
+ - 4956733ec putout: cli: pass processorRunners
5
+ - 01e1ac3f5 @putout/engine-processor: picomatch works differently on win/unix (#208)
6
+
7
+ feature:
8
+ - 8cb43358c @putout/engine-loader: createAsyncLoader: get rid of nanomemoize
9
+
10
+ 2024.06.21, v35.35.5
11
+
12
+ fix:
13
+ - f2a4d92a0 putout: syntax error: startLine
14
+ - da1baf23e putout: --no-worker: silently fail when no formatter found -> log error (#208)
15
+ - 814d32209 @putout/plugin-minify: mangle-names: get back references
16
+
17
+ feature:
18
+ - dbf4d047d @putout/operate: get-literal-raw: quotes
19
+ - 2f415bd20 @putout/plugin-minify: mangle-names: speed up: 1403 -> 1058
20
+
1
21
  2024.06.19, v35.35.4
2
22
 
3
23
  feature:
package/bin/putout.mjs CHANGED
@@ -9,7 +9,9 @@ import {createWrite} from './write.mjs';
9
9
  import {createCommunication} from './communication.mjs';
10
10
  import cli from '../lib/cli/index.js';
11
11
  import {parseArgs} from '../lib/cli/parse-args.js';
12
+ import {createExit} from '../lib/cli/exit.mjs';
12
13
 
14
+ const halt = process.exit;
13
15
  const logError = console.error;
14
16
  const {log} = console;
15
17
 
@@ -23,22 +25,26 @@ const trace = createTrace(parentPort);
23
25
  const isStop = createIsStop(parentPort);
24
26
  const write = createWrite(parentPort);
25
27
 
26
- const {
27
- exit,
28
- cwd,
29
- stdout,
30
- } = process;
28
+ const {cwd, stdout} = process;
31
29
 
32
30
  const args = parseArgs(workerData.slice(2));
31
+ const {raw} = args;
33
32
 
34
- if (worker)
35
- subscribe({
33
+ if (worker) {
34
+ const exit = createExit({
35
+ raw,
36
+ halt,
37
+ logError,
38
+ });
39
+
40
+ await subscribe({
36
41
  args,
37
42
  worker,
38
43
  exit,
39
44
  cwd,
40
45
  write: stdout.write.bind(stdout),
41
46
  });
47
+ }
42
48
 
43
49
  workerData.push(...[
44
50
  '-f',
@@ -47,7 +53,7 @@ workerData.push(...[
47
53
 
48
54
  await cli({
49
55
  write,
50
- halt: process.exit,
56
+ halt,
51
57
  argv: workerData.slice(2),
52
58
  log,
53
59
  logError,
package/bin/tracer.mjs CHANGED
@@ -25,7 +25,7 @@ const worker = new Worker(slave, {
25
25
  stdin: true,
26
26
  });
27
27
 
28
- subscribe({
28
+ await subscribe({
29
29
  args,
30
30
  worker,
31
31
  cwd,
package/lib/cli/index.js CHANGED
@@ -261,6 +261,7 @@ module.exports = async ({argv, halt, log, write, logError, readFile, writeFile,
261
261
  };
262
262
 
263
263
  const {places, exited} = await run({
264
+ processorRunners,
264
265
  trace,
265
266
  fix,
266
267
  exit,
@@ -36,6 +36,7 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async func
36
36
 
37
37
  const {lint} = await simpleImport('samadhi');
38
38
  const [code, places] = await lint(source, {
39
+ startLine,
39
40
  fix,
40
41
  isTS,
41
42
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "35.35.4",
3
+ "version": "35.35.6",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊 Pluggable and configurable code transformer with built-in ESLint, Babel and support of js, jsx, typescript, flow, markdown, yaml and json",
@@ -205,7 +205,7 @@
205
205
  "nano-memoize": "^3.0.11",
206
206
  "once": "^1.4.0",
207
207
  "picomatch": "^4.0.1",
208
- "samadhi": "^2.0.0",
208
+ "samadhi": "^2.10.0",
209
209
  "try-catch": "^3.0.0",
210
210
  "try-to-catch": "^3.0.0",
211
211
  "wraptile": "^3.0.0",