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

Merged
renovate-bot merged 1 commit from renovate/prettier-3.x into main 2023-08-03 10:00:48 +02:00
Collaborator

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
prettier (source) 3.0.0 -> 3.0.1 age adoption passing confidence

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 - At any time (no schedule defined), 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 | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | [`3.0.0` -> `3.0.1`](https://renovatebot.com/diffs/npm/prettier/3.0.0/3.0.1) | [![age](https://badges.renovateapi.com/packages/npm/prettier/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/prettier/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/prettier/3.0.1/compatibility-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/prettier/3.0.1/confidence-slim/3.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.0.1`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#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 - At any time (no schedule defined), 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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xNTkuNyIsInVwZGF0ZWRJblZlciI6IjM1LjE1OS43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovate-bot added 1 commit 2023-08-03 09:00:57 +02:00
chore(deps): update dependency prettier to v3.0.1
All checks were successful
ci/woodpecker/pr/checks Pipeline was successful
ci/woodpecker/push/checks Pipeline was successful
b3aefad5bb
renovate-bot merged commit b3aefad5bb into main 2023-08-03 10:00:48 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
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: dungeonslayers/ds4#163
No description provided.