putout 35.35.8 → 35.36.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.
- package/ChangeLog +13 -0
- package/README.md +16 -2
- package/bin/putout.mjs +1 -1
- package/lib/putout.js +5 -2
- package/lib/putout.mjs +1 -10
- package/package.json +2 -2
- /package/bin/{debuger-exit.mjs → debugger-exit.mjs} +0 -0
package/ChangeLog
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
2024.06.26, v35.36.1
|
|
2
|
+
|
|
3
|
+
feature:
|
|
4
|
+
- 7b4c9730b putout: @putout/plugin-remove-unused-expressions v9.0.0
|
|
5
|
+
- 269a89512 @putout/plugin-remove-unused-expressions: drop support of 🐊 < 35
|
|
6
|
+
- cb3b14671 @putout/plugin-remove-unused-expressions: use client: exclude (#211)
|
|
7
|
+
|
|
8
|
+
2024.06.25, v35.36.0
|
|
9
|
+
|
|
10
|
+
feature:
|
|
11
|
+
- 3d798f3f7 putout: add ability to import as specifier "putout"
|
|
12
|
+
- 7e813cb26 @putout/plugin-putout: check-replace-code: once: add
|
|
13
|
+
|
|
1
14
|
2024.06.25, v35.35.8
|
|
2
15
|
|
|
3
16
|
feature:
|
package/README.md
CHANGED
|
@@ -283,10 +283,24 @@ For example if you need to `remove-something` create 🐊[**Putout**](https://gi
|
|
|
283
283
|
|
|
284
284
|
## API
|
|
285
285
|
|
|
286
|
-
|
|
286
|
+
All examples works both in **ESM** and **CommonJS**.
|
|
287
|
+
|
|
288
|
+
**CommonJS**:
|
|
287
289
|
|
|
288
290
|
```js
|
|
289
291
|
const putout = require('putout');
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**ESM**:
|
|
295
|
+
|
|
296
|
+
```js
|
|
297
|
+
import {putout} from 'putout';
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### putout(source, options)
|
|
301
|
+
|
|
302
|
+
```js
|
|
303
|
+
import {putout} from 'putout';
|
|
290
304
|
|
|
291
305
|
const source = `
|
|
292
306
|
const t = 'hello';
|
|
@@ -308,7 +322,7 @@ console.log(t);
|
|
|
308
322
|
### putoutAsync(source, options)
|
|
309
323
|
|
|
310
324
|
```js
|
|
311
|
-
|
|
325
|
+
import {putoutAsync} from 'putout';
|
|
312
326
|
|
|
313
327
|
const source = `
|
|
314
328
|
const t = 'hello';
|
package/bin/putout.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import {createCommunication} from './communication.mjs';
|
|
|
11
11
|
import cli from '../lib/cli/index.js';
|
|
12
12
|
import {parseArgs} from '../lib/cli/parse-args.js';
|
|
13
13
|
import {createExit} from '../lib/cli/exit.mjs';
|
|
14
|
-
import {onDebuggerExit} from './
|
|
14
|
+
import {onDebuggerExit} from './debugger-exit.mjs';
|
|
15
15
|
|
|
16
16
|
const halt = process.exit;
|
|
17
17
|
const logError = console.error;
|
package/lib/putout.js
CHANGED
|
@@ -19,7 +19,10 @@ const {
|
|
|
19
19
|
|
|
20
20
|
const isString = (a) => typeof a === 'string';
|
|
21
21
|
|
|
22
|
-
module.exports =
|
|
22
|
+
module.exports = putout;
|
|
23
|
+
module.exports.putout = putout;
|
|
24
|
+
|
|
25
|
+
function putout(source, opts) {
|
|
23
26
|
check(source);
|
|
24
27
|
opts = defaultOptions(opts);
|
|
25
28
|
|
|
@@ -63,7 +66,7 @@ module.exports = (source, opts) => {
|
|
|
63
66
|
code,
|
|
64
67
|
places,
|
|
65
68
|
};
|
|
66
|
-
}
|
|
69
|
+
}
|
|
67
70
|
|
|
68
71
|
module.exports.putoutAsync = async (source, opts) => {
|
|
69
72
|
check(source);
|
package/lib/putout.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "putout",
|
|
3
|
-
"version": "35.
|
|
3
|
+
"version": "35.36.1",
|
|
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",
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
"@putout/plugin-remove-nested-blocks": "^6.0.0",
|
|
151
151
|
"@putout/plugin-remove-unreachable-code": "^1.0.0",
|
|
152
152
|
"@putout/plugin-remove-unreferenced-variables": "^4.0.0",
|
|
153
|
-
"@putout/plugin-remove-unused-expressions": "^
|
|
153
|
+
"@putout/plugin-remove-unused-expressions": "^9.0.0",
|
|
154
154
|
"@putout/plugin-remove-unused-for-of-variables": "^3.0.0",
|
|
155
155
|
"@putout/plugin-remove-unused-private-fields": "^2.0.0",
|
|
156
156
|
"@putout/plugin-remove-unused-variables": "^9.0.0",
|
|
File without changes
|