putout 35.27.0 → 35.29.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,19 @@
1
+ 2024.05.25, v35.29.0
2
+
3
+ feature:
4
+ - 10f1f8d39 package: @putout/plugin-declare-before-reference v4.0.0
5
+ - a29e8de29 @putout/plugin-declare-before-reference: use getPathAfterRequires
6
+ - c9bfe433b @putout/plugin-declare-before-reference: drop support of 🐊 < 35
7
+ - ac311c393 @putout/plugin-putout: convert-get-rule-to-require: use getPathAfterRequires
8
+ - 8dc811a53 @putout/plugin-putout: declare: operator: getPathAfterRequires
9
+ - 19f7b5351 @putout/operate: getPathAfterRequires: add
10
+ - 8ecff1259 @putout/plugin-for-of: add-missing-declaration: add
11
+
12
+ 2024.05.23, v35.28.0
13
+
14
+ feature:
15
+ - f5c9caf71 putout: add samadhi
16
+
1
17
  2024.05.22, v35.27.0
2
18
 
3
19
  fix:
package/README.md CHANGED
@@ -14,7 +14,9 @@
14
14
 
15
15
  ![putout](https://github.com/coderaiser/putout/blob/master/images/putout-logo.svg)
16
16
 
17
- 🐊**Putout** is a JavaScript Linter, pluggable and configurable code transformer, drop-in **ESLint** replacement with built-in [code printer](https://github.com/putoutjs/printer). It has a lot of transformations that keeps your codebase in a clean state, removing any code smell and making code readable according to best practices. The main target is JavaScript, but:
17
+ 🐊**Putout** is a JavaScript Linter, pluggable and configurable code transformer, drop-in **ESLint** replacement with built-in [code printer](https://github.com/putoutjs/printer#readme) and ability to [fix syntax errors](https://github.com/coderaiser/putout/blob/master/docs/syntax-errors#%EF%B8%8F-syntax-errors). It has [a lot of transformations](https://github.com/coderaiser/putout#-built-in-transformations) that keeps your codebase in a clean state, removing any code smell and making code readable according to best practices.
18
+
19
+ The main target is **JavaScript**, but:
18
20
 
19
21
  - ✅ JSX;
20
22
  - ✅ TypeScript;
@@ -34,8 +34,9 @@ module.exports = ({fix, fixCount, isFlow, logError, raw, printer}) => async func
34
34
  if (!again && e) {
35
35
  raw && logError(e);
36
36
 
37
- const {lintSyntax} = await simpleImport('./syntax/syntax.mjs');
38
- const {places, code} = await lintSyntax(source, {
37
+ const {lint} = await simpleImport('samadhi');
38
+
39
+ const {places, code} = await lint(source, {
39
40
  fix,
40
41
  isTS,
41
42
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "putout",
3
- "version": "35.27.0",
3
+ "version": "35.29.0",
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",
@@ -112,7 +112,7 @@
112
112
  "@putout/plugin-convert-to-arrow-function": "^4.0.0",
113
113
  "@putout/plugin-coverage": "^1.0.0",
114
114
  "@putout/plugin-declare": "^4.0.0",
115
- "@putout/plugin-declare-before-reference": "^3.0.0",
115
+ "@putout/plugin-declare-before-reference": "^4.0.0",
116
116
  "@putout/plugin-declare-imports-first": "^2.0.0",
117
117
  "@putout/plugin-eslint": "^8.0.0",
118
118
  "@putout/plugin-extract-object-properties": "^9.0.0",
@@ -187,7 +187,6 @@
187
187
  "@putout/processor-json": "^9.0.0",
188
188
  "@putout/processor-markdown": "^12.0.0",
189
189
  "@putout/processor-yaml": "^8.0.0",
190
- "@putout/quick-lint": "^1.0.0",
191
190
  "@putout/traverse": "^10.0.0",
192
191
  "ajv": "^8.8.2",
193
192
  "chalk": "^5.3.0",
@@ -198,12 +197,12 @@
198
197
  "fast-glob": "^3.2.2",
199
198
  "find-up": "^7.0.0",
200
199
  "fullstore": "^3.0.0",
201
- "goldstein": "^5.3.0",
202
200
  "ignore": "^5.0.4",
203
201
  "is-relative": "^1.0.0",
204
202
  "nano-memoize": "^3.0.11",
205
203
  "once": "^1.4.0",
206
204
  "picomatch": "^4.0.1",
205
+ "samadhi": "^1.0.0",
207
206
  "try-catch": "^3.0.0",
208
207
  "try-to-catch": "^3.0.0",
209
208
  "wraptile": "^3.0.0",
@@ -1,52 +0,0 @@
1
- import tryCatch from 'try-catch';
2
- import parseError from '../parse-error.js';
3
-
4
- export const lintSyntax = async (source, {fix, isTS}) => {
5
- if (fix)
6
- return await syntaxFix(source);
7
-
8
- return await syntaxLint(source, {
9
- isTS,
10
- });
11
- };
12
-
13
- async function syntaxFix(source) {
14
- const {compile, keywords} = await import('goldstein');
15
- const {
16
- keywordArrow,
17
- keywordIf,
18
- keywordBrokenString,
19
- } = keywords;
20
- const [error, code] = tryCatch(compile, source, {
21
- keywords: {
22
- keywordArrow,
23
- keywordIf,
24
- keywordBrokenString,
25
- },
26
- });
27
-
28
- if (error)
29
- return {
30
- code: source,
31
- places: parseError(error),
32
- };
33
-
34
- return {
35
- code,
36
- places: [],
37
- };
38
- }
39
-
40
- async function syntaxLint(source, {isTS}) {
41
- const {default: quickLint} = await import('@putout/quick-lint');
42
-
43
- const quickLintPlaces = await quickLint(source, {
44
- isTS,
45
- isJSX: true,
46
- });
47
-
48
- return {
49
- places: quickLintPlaces,
50
- code: source,
51
- };
52
- }