redput 1.10.1 → 1.12.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,16 @@
1
+ 2023.11.02, v1.12.0
2
+
3
+ feature:
4
+ - 99450ff redput: eslint-plugin-putout v21.0.1
5
+ - 5dac2ac redput: trim name
6
+
7
+ 2023.10.12, v1.11.0
8
+
9
+ feature:
10
+ - 830b916 package: eslint-plugin-putout v20.0.0
11
+ - af20440 package: @putout/plugin-putout v15.1.0
12
+ - 6a6ea8b package: rendy v4.1.3
13
+
1
14
  2023.09.14, v1.10.1
2
15
 
3
16
  feature:
@@ -0,0 +1,11 @@
1
+ export const parsePlugin = (raw) => {
2
+ const [comment, ...lines] = raw.split('\n');
3
+ const name = comment
4
+ .replace('//', '')
5
+ .trimStart();
6
+
7
+ return {
8
+ name,
9
+ lines,
10
+ };
11
+ };
package/lib/redput.js CHANGED
@@ -3,6 +3,7 @@ import {getReport} from './get-report/get-report.js';
3
3
  import {readGist} from './read-gist/read-gist.js';
4
4
  import {writePlugin} from './write/index.js';
5
5
  import {parseLink} from './parse-link.js';
6
+ import {parsePlugin} from './parse-plugin.js';
6
7
 
7
8
  const SUCCESS = [null, 'Done'];
8
9
 
@@ -20,8 +21,7 @@ export const redput = async (link, {token}) => {
20
21
  const raw = result.data.files['transform.js'].content;
21
22
  const fixture = result.data.files['source.js'].content;
22
23
 
23
- const [comment, ...lines] = raw.split('\n');
24
- const name = comment.replace(/\/\/\s+?/, '');
24
+ const {name, lines} = parsePlugin(raw);
25
25
 
26
26
  if (name.includes(':') || name.includes('{'))
27
27
  return [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "1.10.1",
3
+ "version": "1.12.0",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {
@@ -59,12 +59,12 @@
59
59
  "dependencies": {
60
60
  "@putout/plugin-convert-esm-to-commonjs": "^6.0.0",
61
61
  "@putout/plugin-declare": "^2.0.1",
62
- "@putout/plugin-putout": "^14.8.0",
62
+ "@putout/plugin-putout": "^15.1.0",
63
63
  "@putout/plugin-remove-unused-variables": "^7.0.0",
64
64
  "node-fetch": "^3.3.2",
65
65
  "octokit": "^3.1.0",
66
66
  "putout": "^32.0.1",
67
- "rendy": "^3.1.1",
67
+ "rendy": "^4.1.3",
68
68
  "try-to-catch": "^3.0.1"
69
69
  },
70
70
  "devDependencies": {
@@ -73,7 +73,7 @@
73
73
  "escover": "^3.4.0",
74
74
  "eslint": "^8.0.0",
75
75
  "eslint-plugin-n": "^16.0.1",
76
- "eslint-plugin-putout": "^19.0.4",
76
+ "eslint-plugin-putout": "^21.0.1",
77
77
  "madrun": "^9.3.0",
78
78
  "montag": "^1.2.1",
79
79
  "nodemon": "^3.0.1",