@putout/printer 7.1.0 → 7.1.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
+ 2023.12.12, v7.1.1
2
+
3
+ feature:
4
+ - feefbe7 @putout/printer: rm useless comment deduplicate
5
+
1
6
  2023.12.11, v7.1.0
2
7
 
3
8
  fix:
@@ -10,8 +10,6 @@ const {
10
10
  const {markBefore} = require('../mark');
11
11
  const {maybeInsideFn} = require('./maybe-inside-fn');
12
12
 
13
- const deduplicate = (a) => Array.from(new Set(a));
14
-
15
13
  const {
16
14
  isObjectProperty,
17
15
  isVariableDeclarator,
@@ -74,7 +72,7 @@ module.exports.parseLeadingComments = (path, {print, maybe, indent}, semantics)
74
72
  const propIs = isProperty(path);
75
73
  const isIndent = isFirst(path) || !looksLikeSwitchCase && !path.isClassMethod() && !insideFn && !propIs;
76
74
 
77
- for (const {type, value} of deduplicate(leadingComments)) {
75
+ for (const {type, value} of leadingComments) {
78
76
  maybe.indent(isIndent);
79
77
 
80
78
  if (type === 'CommentLine') {
@@ -233,7 +233,6 @@ module.exports.tokenize = (ast, overrides) => {
233
233
 
234
234
  const currentIndent = i;
235
235
  parseLeadingComments(path, printer, semantics);
236
-
237
236
  // this is main thing
238
237
  maybePlugin(currentTraverse, path, printer, semantics);
239
238
  parseTrailingComments(path, printer, semantics);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/printer",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "type": "commonjs",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Simplest possible opinionated Babel AST printer for 🐊Putout",