redput 2.4.1 → 2.5.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 CHANGED
@@ -1,3 +1,14 @@
1
+ 2024.07.19, v2.5.1
2
+
3
+ feature:
4
+ - 5903bd0 redput: putout v36.0.2
5
+ - 980e894 redput: @putout/test v11.0.0
6
+
7
+ 2024.07.14, v2.5.0
8
+
9
+ feature:
10
+ - 33feb59 redput: parseComment: ^[a-z-]$: avoid any parsing use as is
11
+
1
12
  2024.06.17, v2.4.1
2
13
 
3
14
  feature:
@@ -22,6 +22,9 @@ function parseComment(comment) {
22
22
  .replace('//', '')
23
23
  .trimStart();
24
24
 
25
+ if (/^[a-z-]+$/.test(raw))
26
+ return ['', raw];
27
+
25
28
  const [error, data] = tryCatch(JSON.parse, raw);
26
29
 
27
30
  if (!error)
@@ -1,8 +1,8 @@
1
1
  import putout from 'putout';
2
- import * as insertGetRulePlugin from './plugin-insert-get-rule/index.js';
3
2
  import pluginPutout from '@putout/plugin-putout';
4
3
  import nodejs from '@putout/plugin-nodejs';
5
4
  import removeUnusedVariables from '@putout/plugin-remove-unused-variables';
5
+ import * as insertGetRulePlugin from './plugin-insert-get-rule/index.js';
6
6
 
7
7
  export const addRule = (name, source, ruleOptions) => {
8
8
  const {code} = putout(source, {
@@ -8,8 +8,8 @@ import {
8
8
  dirname,
9
9
  join,
10
10
  } from 'node:path';
11
- import rendy from 'rendy';
12
11
  import process from 'node:process';
12
+ import rendy from 'rendy';
13
13
  import {addRule} from './add-rule/add-rule.js';
14
14
  import {insertTest} from './insert-test/insert-test.js';
15
15
  import {prepareRule} from './prepare-rule/prepare-rule.js';
@@ -8,8 +8,8 @@ import {
8
8
  dirname,
9
9
  join,
10
10
  } from 'node:path';
11
- import rendy from 'rendy';
12
11
  import process from 'node:process';
12
+ import rendy from 'rendy';
13
13
 
14
14
  export const writeRule = async (name, data) => {
15
15
  await mkdir(`./lib`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "2.4.1",
3
+ "version": "2.5.1",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -65,13 +65,13 @@
65
65
  "@putout/plugin-remove-unused-variables": "^9.0.0",
66
66
  "node-fetch": "^3.3.2",
67
67
  "octokit": "^4.0.2",
68
- "putout": "^35.0.0",
68
+ "putout": "^36.0.2",
69
69
  "rendy": "^4.1.3",
70
70
  "try-catch": "^3.0.1",
71
71
  "try-to-catch": "^3.0.1"
72
72
  },
73
73
  "devDependencies": {
74
- "@putout/test": "^10.0.0",
74
+ "@putout/test": "^11.0.0",
75
75
  "c8": "^10.1.2",
76
76
  "escover": "^4.0.1",
77
77
  "eslint": "^9.0.0",