Skip to content

Commit

Permalink
Update dependency jest-docblock to v28.1.1 (#13054)
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Jul 11, 2022
1 parent ae3dd17 commit 811b591
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 2 deletions.
28 changes: 28 additions & 0 deletions changelog_unreleased/javascript/13054.md
@@ -0,0 +1,28 @@
#### Fix docblock parsing (#13054 by @fisker)

<!-- prettier-ignore -->
```jsx
// With `--insert-pragma` flag

// Input
/* comment */
foo()

// Prettier stable
/**
* /* comment
*
* @format
*/

foo();

// Prettier main
/**
* comment
*
* @format
*/

foo();
```
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -58,7 +58,7 @@
"html-tag-names": "2.0.1",
"html-void-elements": "2.0.1",
"ignore": "5.2.0",
"jest-docblock": "27.5.1",
"jest-docblock": "28.1.1",
"json5": "2.2.1",
"leven": "4.0.0",
"lines-and-columns": "2.0.3",
Expand Down
Expand Up @@ -262,3 +262,25 @@ printWidth: 80
================================================================================
`;

exports[`with-comment.js - {"insertPragma":true} format 1`] = `
====================================options=====================================
insertPragma: true
parsers: ["flow", "babel", "typescript"]
printWidth: 80
| printWidth
=====================================input======================================
/* comment */
foo()
=====================================output=====================================
/**
* comment
*
* @format
*/
foo();
================================================================================
`;
2 changes: 2 additions & 0 deletions tests/format/misc/insert-pragma/js/with-comment.js
@@ -0,0 +1,2 @@
/* comment */
foo()
9 changes: 8 additions & 1 deletion yarn.lock
Expand Up @@ -4175,7 +4175,14 @@ jest-diff@^27.5.1:
jest-get-type "^27.5.1"
pretty-format "^27.5.1"

jest-docblock@27.5.1, jest-docblock@^27.5.1:
jest-docblock@28.1.1:
version "28.1.1"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-28.1.1.tgz#6f515c3bf841516d82ecd57a62eed9204c2f42a8"
integrity sha512-3wayBVNiOYx0cwAbl9rwm5kKFP8yHH3d/fkEaL02NPTkDojPtheGB7HZSFY4wzX+DxyrvhXz0KSCVksmCknCuA==
dependencies:
detect-newline "^3.0.0"

jest-docblock@^27.5.1:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.5.1.tgz#14092f364a42c6108d42c33c8cf30e058e25f6c0"
integrity sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==
Expand Down

0 comments on commit 811b591

Please sign in to comment.