chore(deps): update dependency prettier to v3.0.2 #17

Merged
renovate-bot merged 1 commits from renovate/prettier-3.x-lockfile into master 2023-08-23 09:36:33 +00:00
Collaborator

This PR contains the following updates:

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

Release Notes

prettier/prettier (prettier)

v3.0.2

Compare Source

diff

Break after = of assignment if RHS is poorly breakable AwaitExpression or YieldExpression (#​15204 by @​seiyab)
// Input
const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData);

// Prettier 3.0.1
const { section, rubric, authors, tags } = await utils.upsertCommonData(
  mainData,
);

// Prettier 3.0.2
const { section, rubric, authors, tags } =
  await utils.upsertCommonData(mainData);
Do not add trailing comma for grouped scss comments (#​15217 by @​auvred)
/* Input */
$foo: (
	'property': (),
	// comment 1
	// comment 2
)

/* Prettier 3.0.1 */
$foo: (
  "property": (),
  // comment 1
  // comment 2,
);

/* Prettier 3.0.2 */
$foo: (
  "property": (),
  // comment 1
  // comment 2
);
Print declare and export keywords for nested namespace (#​15249 by @​sosukesuzuki)
// Input
declare namespace abc1.def {}
export namespace abc2.def {}

// Prettier 3.0.1
namespace abc1.def {}
namespace abc2.def {}

// Prettier 3.0.2
declare namespace abc1.def {}
export namespace abc2.def {}

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.2`](https://renovatebot.com/diffs/npm/prettier/3.0.0/3.0.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/3.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/3.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/3.0.0/3.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/3.0.0/3.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>prettier/prettier (prettier)</summary> ### [`v3.0.2`](https://github.com/prettier/prettier/blob/HEAD/CHANGELOG.md#302) [Compare Source](https://github.com/prettier/prettier/compare/3.0.1...3.0.2) [diff](https://github.com/prettier/prettier/compare/3.0.1...3.0.2) ##### Break after `=` of assignment if RHS is poorly breakable AwaitExpression or YieldExpression ([#&#8203;15204](https://github.com/prettier/prettier/pull/15204) by [@&#8203;seiyab](https://github.com/seiyab)) <!-- prettier-ignore --> ```js // Input const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData); // Prettier 3.0.1 const { section, rubric, authors, tags } = await utils.upsertCommonData( mainData, ); // Prettier 3.0.2 const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData); ``` ##### Do not add trailing comma for grouped scss comments ([#&#8203;15217](https://github.com/prettier/prettier/pull/15217) by [@&#8203;auvred](https://github.com/auvred)) <!-- prettier-ignore --> ```scss /* Input */ $foo: ( 'property': (), // comment 1 // comment 2 ) /* Prettier 3.0.1 */ $foo: ( "property": (), // comment 1 // comment 2, ); /* Prettier 3.0.2 */ $foo: ( "property": (), // comment 1 // comment 2 ); ``` ##### Print `declare` and `export` keywords for nested namespace ([#&#8203;15249](https://github.com/prettier/prettier/pull/15249) by [@&#8203;sosukesuzuki](https://github.com/sosukesuzuki)) <!-- prettier-ignore --> ```tsx // Input declare namespace abc1.def {} export namespace abc2.def {} // Prettier 3.0.1 namespace abc1.def {} namespace abc2.def {} // Prettier 3.0.2 declare namespace abc1.def {} export namespace abc2.def {} ``` ### [`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:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNS41IiwidXBkYXRlZEluVmVyIjoiMzYuNTIuMiIsInRhcmdldEJyYW5jaCI6Im1hc3RlciJ9-->
renovate-bot scheduled this pull request to auto merge when all checks succeed 2023-08-03 08:31:06 +00:00
Author
Collaborator

Branch automerge failure

This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead.


  • Branch has one or more failed status checks
### Branch automerge failure This PR was configured for branch automerge. However, this is not possible, so it has been raised as a PR instead. ___ * Branch has one or more failed status checks
renovate-bot changed title from chore(deps): update dependency prettier to v3.0.1 to chore(deps): update dependency prettier to v3.0.2 2023-08-15 16:28:20 +00:00
renovate-bot force-pushed renovate/prettier-3.x-lockfile from f4ed60f6e2 to 5e2c48da38 2023-08-15 16:28:20 +00:00 Compare
renovate-bot force-pushed renovate/prettier-3.x-lockfile from 5e2c48da38 to b3438b7ea2 2023-08-23 09:24:09 +00:00 Compare
renovate-bot merged commit c49dcc83c1 into master 2023-08-23 09:36:33 +00: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: nemunaire/reveil#17
No description provided.