putout 41.18.0 → 41.19.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/ChangeLog CHANGED
@@ -1,3 +1,24 @@
1
+ 2026.02.06, v41.19.0
2
+
3
+ feature:
4
+ - 9813f420a @putout/engine-runner: @putout/operator-filesystem v11.0.0
5
+ - 4dc4cff24 @putout/operator-find-file-up: @putout/operator-filesystem v11.0.0
6
+ - 556178a68 @putout/operator-match-files: @putout/operator-filesystem v11.0.0
7
+ - 19a47c2e7 @putout/operator-rename-files: @putout/operator-filesystem v11.0.0
8
+ - 58baf20f0 @putout/plugin-filesystem: @putout/operator-filesystem v11.0.0
9
+ - 16987e84b @putout/test: @putout/operator-filesystem v11.0.0
10
+ - b6b19b655 putout: @putout/operator-filesystem v11.0.0
11
+ - e92161c3e putout: @putout/processor-filesystem v8.0.0
12
+ - b3e1a0cdd @putout/processor-filesystem: @putout/operator-filesystem v11.0.0
13
+ - 79127f528 @putout/engine-runner: @putout/operator-filesystem v10.6.0
14
+ - 7dfc7d920 @putout/operator-filesystem: export: maybe
15
+ - 5f79a2227 @putout/processor-toml: oxfmt v0.28.0
16
+
17
+ 2026.02.05, v41.18.1
18
+
19
+ feature:
20
+ - d7b6677ac putout: remove loader: do not works as expected
21
+
1
22
  2026.02.05, v41.18.0
2
23
 
3
24
  feature:
@@ -15,15 +15,11 @@ export const createCommunication = () => {
15
15
  const newParentPort = new EventEmitter();
16
16
 
17
17
  assign(newWorker, {
18
- postMessage: (a) => {
19
- newParentPort.emit('message', a);
20
- },
18
+ postMessage: createPostMessage(newParentPort),
21
19
  });
22
20
 
23
21
  assign(newParentPort, {
24
- postMessage: (a) => {
25
- newWorker.emit('message', a);
26
- },
22
+ postMessage: createPostMessage(newWorker),
27
23
  });
28
24
 
29
25
  return {
@@ -32,3 +28,7 @@ export const createCommunication = () => {
32
28
  workerData: process.argv,
33
29
  };
34
30
  };
31
+
32
+ export const createPostMessage = (emitter) => (a) => {
33
+ emitter.emit('message', a);
34
+ };
package/bin/tracer.js CHANGED
@@ -14,11 +14,13 @@ import {dropInteractive} from './drop-interactive.js';
14
14
  const args = parseArgs(process.argv.slice(2));
15
15
  const write = stdout.write.bind(stdout);
16
16
 
17
+ /* c8 ignore start */
17
18
  if (!args.worker) {
18
19
  await import('./putout.js');
19
20
  halt();
20
21
  }
21
22
 
23
+ /* c8 ignore end */
22
24
  const slave = new URL('./putout.js', import.meta.url);
23
25
 
24
26
  const worker = new Worker(slave, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "41.18.0",
3
+ "version": "41.19.0",
4
4
  "type": "module",
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",
@@ -19,7 +19,6 @@
19
19
  "./lint/json": "./lib/lint/json.js",
20
20
  "./transform": "./lib/transform.js",
21
21
  "./find-places": "./lib/find-places.js",
22
- "./register": "./lib/loader/register.js",
23
22
  "./ignores": "./lib/ignores.js",
24
23
  "./simple-import": "./lib/cli/simple-import.js"
25
24
  },
@@ -77,7 +76,7 @@
77
76
  "@putout/operate": "^15.0.0",
78
77
  "@putout/operator-add-args": "^14.0.0",
79
78
  "@putout/operator-declare": "^16.0.0",
80
- "@putout/operator-filesystem": "^10.0.0",
79
+ "@putout/operator-filesystem": "^11.0.0",
81
80
  "@putout/operator-find-file-up": "^2.0.0",
82
81
  "@putout/operator-ignore": "^5.0.0",
83
82
  "@putout/operator-json": "^3.0.0",
@@ -172,7 +171,7 @@
172
171
  "@putout/plugin-variables": "^1.0.0",
173
172
  "@putout/plugin-webpack": "^4.0.0",
174
173
  "@putout/processor-css": "^12.0.0",
175
- "@putout/processor-filesystem": "^7.0.0",
174
+ "@putout/processor-filesystem": "^8.0.0",
176
175
  "@putout/processor-ignore": "^7.0.0",
177
176
  "@putout/processor-javascript": "^5.0.0",
178
177
  "@putout/processor-json": "^10.0.0",
@@ -1,48 +0,0 @@
1
- import process from 'node:process';
2
- import {Buffer} from 'node:buffer';
3
- import {parseOptions} from '#parse-options';
4
- import {putoutAsync} from '../putout.js';
5
- import {ignores} from '../ignores.js';
6
-
7
- const cwd = process.cwd();
8
-
9
- const toLoad = (transformSource) => async (url, context, nextLoad) => {
10
- const {format, source: rawSource} = await nextLoad(url, context);
11
-
12
- if (format !== 'module')
13
- return nextLoad(url);
14
-
15
- const {source} = await transformSource(rawSource, {
16
- url,
17
- });
18
-
19
- return {
20
- format: 'module',
21
- source,
22
- };
23
- };
24
-
25
- export const transformSource = async (source, context) => {
26
- const {url} = context;
27
- const name = url.replace('file://', '');
28
-
29
- const options = parseOptions({
30
- name,
31
- });
32
-
33
- if (ignores(cwd, name, options))
34
- return {
35
- source,
36
- };
37
-
38
- const {code} = await putoutAsync(String(source), {
39
- printer: 'putout',
40
- ...options,
41
- });
42
-
43
- return {
44
- source: Buffer.from(code),
45
- };
46
- };
47
-
48
- export const load = toLoad(transformSource);
@@ -1,3 +0,0 @@
1
- import {register} from 'node:module';
2
-
3
- register('./loader.mjs', new URL('./loader.mjs', import.meta.url));