redput 4.9.0 → 4.9.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,8 @@
1
+ 2026.09.27, v4.9.1
2
+
3
+ fix:
4
+ - 1970bbf redput: write: rm useless catch
5
+
1
6
  2026.09.13, v4.9.0
2
7
 
3
8
  feature:
@@ -3,20 +3,19 @@ import {tryToCatch} from 'try-to-catch';
3
3
  import {isTSCode} from './is-ts/index.js';
4
4
  import {runRule} from '../run-rule/run-rule.js';
5
5
  import {writeReadme} from './nested/write-readme/write-readme.js';
6
- import {
7
- updateNestedIndex,
8
- updateOverallNestedFixtures,
9
- updateOverallNestedTest,
10
- writeNestedFixtures,
11
- writeNestedRule,
12
- writeNestedTests,
13
- } from './nested/nested.js';
6
+ import * as nested from './nested/nested.js';
14
7
  import {
15
8
  writeFixtures,
16
9
  writeRule,
17
10
  writeTests,
18
11
  } from './simple.js';
19
12
 
13
+ const {
14
+ updateNestedIndex,
15
+ updateOverallNestedFixtures,
16
+ updateOverallNestedTest,
17
+ } = nested;
18
+
20
19
  export const writePlugin = async (name, {rule, fixture, report, options, link}) => {
21
20
  const [isNested] = await tryToCatch(access, './package.json');
22
21
 
@@ -36,7 +35,21 @@ export const writePlugin = async (name, {rule, fixture, report, options, link})
36
35
  });
37
36
  };
38
37
 
39
- export const writeNested = async (name, {rule, fixture, report, options, link}) => {
38
+ export const writeNested = async (name, overrides) => {
39
+ const {
40
+ rule,
41
+ fixture,
42
+ report,
43
+ options,
44
+ link,
45
+ writeNestedRule,
46
+ writeNestedFixtures,
47
+ writeNestedTests,
48
+ } = {
49
+ ...nested,
50
+ ...overrides,
51
+ };
52
+
40
53
  const isTS = isTSCode(fixture);
41
54
  const ext = isTS ? 'ts' : 'js';
42
55
  const correct = runRule(rule, fixture);
@@ -45,7 +58,7 @@ export const writeNested = async (name, {rule, fixture, report, options, link})
45
58
  await writeNestedFixtures(name, fixture, ext, correct);
46
59
  await writeNestedTests(name, report);
47
60
 
48
- await tryToCatch(writeNestedOptional, name, {
61
+ await writeNestedOptional(name, {
49
62
  options,
50
63
  fixture,
51
64
  ext,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redput",
3
- "version": "4.9.0",
3
+ "version": "4.9.1",
4
4
  "description": "CLI tool to convert source from 🐊Putout Editor to files",
5
5
  "main": "lib/redput.js",
6
6
  "bin": {