Skip to content

Commit b1c50f2

Browse files
committed
fix(deps): fix potential TypeError enumerating supported languages (upd @types/prettier to v2.4.2)
1 parent d399ab7 commit b1c50f2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@types/find-up": "2.1.1",
5050
"@types/jest": "27.0.3",
5151
"@types/mkdirp": "1.0.1",
52-
"@types/prettier": "1.10.0",
52+
"@types/prettier": "2.4.2",
5353
"cz-conventional-changelog": "3.3.0",
5454
"husky": "7.0.4",
5555
"jest": "27.3.1",

src/precise-formatters/prettier.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let PRETTIER_SUPPORTED_FILE_EXTENSIONS: string[] = [];
1313
getSupportInfo().languages.forEach(language => {
1414
PRETTIER_SUPPORTED_FILE_EXTENSIONS = [
1515
...PRETTIER_SUPPORTED_FILE_EXTENSIONS,
16-
...language.extensions
16+
...(language.extensions ?? [])
1717
];
1818
});
1919

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,10 +1022,10 @@
10221022
resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
10231023
integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==
10241024

1025-
"@types/prettier@1.10.0":
1026-
version "1.10.0"
1027-
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-1.10.0.tgz#5abf1ec0a6e904fe2490cc2068f36a38e4a63c42"
1028-
integrity sha512-mjEM5uxPvMYg8LLcnmHzMy2G7HFRv7aQtcKslpmHg8SIIQutnLpLfps+1soV2YBlVBFrskR+F6I+nBI9NTh49w==
1025+
"@types/prettier@2.4.2":
1026+
version "2.4.2"
1027+
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.2.tgz#4c62fae93eb479660c3bd93f9d24d561597a8281"
1028+
integrity sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==
10291029

10301030
"@types/prettier@^2.1.5":
10311031
version "2.4.1"

0 commit comments

Comments
 (0)