chore(deps): update dependency prettier to v3.0.1 #242

Merged
renovator merged 1 commits from renovate/devdeps-non-major into main 2023-08-07 02:37:52 +02:00
Collaborator

This PR contains the following updates:

Package Type Update Change
prettier (source) devDependencies patch 3.0.0 -> 3.0.1

Release Notes

prettier/prettier (prettier)

v3.0.1

Compare Source

diff

Fix cursor positioning for a special case (#​14812 by @​fisker)
// <|> is the cursor position

/* Input */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>  } from "fs"

/* Prettier 3.0.0 */
// All messages are represented in JSON.
// So, the prettier.py <|>controls a subprocess which spawns "node {this_file}".
import {} from "fs"

/* Prettier 3.0.1 */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>} from "fs"
Fix plugins/estree.d.ts to make it a module (#​15018 by @​kingyue737)

Add export {} in plugins/estree.d.ts to fix the "File is not a module" error

Add parenthesis around leading multiline comment in return statement (#​15037 by @​auvred)
// Input
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expresssion
  )
}

// Prettier 3.0.0
function fn() {
  return /**
   * @&#8203;type {...}
   */ expresssion;
}

// Prettier 3.0.1
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expresssion
  );
}
Add support for Vue "Generic Components" (#​15066 by @​auvred)

https://blog.vuejs.org/posts/vue-3-3#generic-components

<!-- Input -->
<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script>

<!-- Prettier 3.0.0 -->
<script
  setup
  lang="ts"
  generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"
></script>

<!-- Prettier 3.0.1 -->
<script
  setup
  lang="ts"
  generic="
    T extends Type1 & Type2 & (Type3 | Type4),
    U extends string | number | boolean
  "
></script>
Fix comments print in IfStatement (#​15076 by @​fisker)
function a(b) {
  if (b) return 1; // comment
  else return 2;
}

/* Prettier 3.0.0 */
Error: Comment "comment" was not printed. Please report this error!

/* Prettier 3.0.1 */
function a(b) {
  if (b) return 1; // comment
  else return 2;
}
Add missing type definition for printer.preprocess (#​15123 by @​so1ve)
export interface Printer<T = any> {
  // ...
+ preprocess?:
+   | ((ast: T, options: ParserOptions<T>) => T | Promise<T>)
+   | undefined;
}
Add missing getVisitorKeys method type definition for Printer (#​15125 by @​auvred)
const printer: Printer = {
  print: () => [],
  getVisitorKeys(node, nonTraversableKeys) {
    return ["body"];
  },
};
Add typing to support readonly array properties of AST Node (#​15127 by @​auvred)
// Input
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");

// Prettier 3.0.0
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
//                  ^ Argument of type '"readonlyArray"' is not assignable to parameter of type '"regularArray"'. ts(2345)

// Prettier 3.0.1
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
Add space before unary minus followed by a function call (#​15129 by @​pamelalozano)
// Input
div {
  margin: - func();
}

// Prettier 3.0.0
div {
  margin: -func();
}

// Prettier 3.0.1
div {
  margin: - func();
}

Configuration

📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | patch | [`3.0.0` -> `3.0.1`](https://renovatebot.com/diffs/npm/prettier/3.0.0/3.0.1) | --- ### Release Notes <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.0.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#&#8203;301) [Compare Source](https://github.com/prettier/prettier/compare/3.0.0...3.0.1) [diff](https://github.com/prettier/prettier/compare/3.0.0...3.0.1) ##### Fix cursor positioning for a special case ([#&#8203;14812](https://github.com/prettier/prettier/pull/14812) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```js // <|> is the cursor position /* Input */ // All messages are represented in JSON. // So, the prettier.py controls a subprocess which spawns "node {this_file}". import {<|> } from "fs" /* Prettier 3.0.0 */ // All messages are represented in JSON. // So, the prettier.py <|>controls a subprocess which spawns "node {this_file}". import {} from "fs" /* Prettier 3.0.1 */ // All messages are represented in JSON. // So, the prettier.py controls a subprocess which spawns "node {this_file}". import {<|>} from "fs" ``` ##### Fix plugins/estree.d.ts to make it a module ([#&#8203;15018](https://github.com/prettier/prettier/pull/15018) by [@&#8203;kingyue737](https://github.com/kingyue737)) Add `export {}` in `plugins/estree.d.ts` to fix the "File is not a module" error ##### Add parenthesis around leading multiline comment in return statement ([#&#8203;15037](https://github.com/prettier/prettier/pull/15037) by [@&#8203;auvred](https://github.com/auvred)) <!-- prettier-ignore --> ```jsx // Input function fn() { return ( /** * @&#8203;type {...} */ expresssion ) } // Prettier 3.0.0 function fn() { return /** * @&#8203;type {...} */ expresssion; } // Prettier 3.0.1 function fn() { return ( /** * @&#8203;type {...} */ expresssion ); } ``` ##### Add support for Vue "Generic Components" ([#&#8203;15066](https://github.com/prettier/prettier/pull/15066) by [@&#8203;auvred](https://github.com/auvred)) https://blog.vuejs.org/posts/vue-3-3#generic-components <!-- prettier-ignore --> ```vue <!-- Input --> <script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script> <!-- Prettier 3.0.0 --> <script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean" ></script> <!-- Prettier 3.0.1 --> <script setup lang="ts" generic=" T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean " ></script> ``` ##### Fix comments print in `IfStatement` ([#&#8203;15076](https://github.com/prettier/prettier/pull/15076) by [@&#8203;fisker](https://github.com/fisker)) <!-- prettier-ignore --> ```js function a(b) { if (b) return 1; // comment else return 2; } /* Prettier 3.0.0 */ Error: Comment "comment" was not printed. Please report this error! /* Prettier 3.0.1 */ function a(b) { if (b) return 1; // comment else return 2; } ``` ##### Add missing type definition for `printer.preprocess` ([#&#8203;15123](https://github.com/prettier/prettier/pull/15123) by [@&#8203;so1ve](https://github.com/so1ve)) ```diff export interface Printer<T = any> { // ... + preprocess?: + | ((ast: T, options: ParserOptions<T>) => T | Promise<T>) + | undefined; } ``` ##### Add missing `getVisitorKeys` method type definition for `Printer` ([#&#8203;15125](https://github.com/prettier/prettier/pull/15125) by [@&#8203;auvred](https://github.com/auvred)) ```tsx const printer: Printer = { print: () => [], getVisitorKeys(node, nonTraversableKeys) { return ["body"]; }, }; ``` ##### Add typing to support `readonly` array properties of AST Node ([#&#8203;15127](https://github.com/prettier/prettier/pull/15127) by [@&#8203;auvred](https://github.com/auvred)) <!-- prettier-ignore --> ```tsx // Input interface TestNode { readonlyArray: readonly string[]; } declare const path: AstPath<TestNode>; path.map(() => "", "readonlyArray"); // Prettier 3.0.0 interface TestNode { readonlyArray: readonly string[]; } declare const path: AstPath<TestNode>; path.map(() => "", "readonlyArray"); // ^ Argument of type '"readonlyArray"' is not assignable to parameter of type '"regularArray"'. ts(2345) // Prettier 3.0.1 interface TestNode { readonlyArray: readonly string[]; } declare const path: AstPath<TestNode>; path.map(() => "", "readonlyArray"); ``` ##### Add space before unary minus followed by a function call ([#&#8203;15129](https://github.com/prettier/prettier/pull/15129) by [@&#8203;pamelalozano](https://github.com/pamelalozano)) <!-- prettier-ignore --> ```less // Input div { margin: - func(); } // Prettier 3.0.0 div { margin: -func(); } // Prettier 3.0.1 div { margin: - func(); } ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNDEuMyIsInVwZGF0ZWRJblZlciI6IjM1LjE0MS4zIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovator added 1 commit 2023-08-07 02:08:11 +02:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
d6832c478c
chore(deps): update dependency prettier to v3.0.1
renovator merged commit d6832c478c into main 2023-08-07 02:37:52 +02:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xoxys/thegeeklab#242
No description provided.