Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: fix vulnerabilities #715

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"mem": "8.1.1",
"meriyah": "4.1.5",
"minimatch": "3.0.4",
"minimist": "1.2.5",
"minimist": "^1.2.5",
"n-readlines": "1.0.1",
"outdent": "0.8.0",
"parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
Expand Down Expand Up @@ -146,7 +146,7 @@
"rollup": "2.53.1",
"rollup-plugin-polyfill-node": "0.6.2",
"rollup-plugin-terser": "7.0.2",
"shelljs": "0.8.4",
"shelljs": "^0.8.4",
"snapshot-diff": "0.9.0",
"tempy": "1.0.1",
"terser-webpack-plugin": "5.1.4",
Expand Down
2 changes: 1 addition & 1 deletion src/language-css/parser-postcss.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ function parseNestedCSS(node, options) {
node.value.startsWith("{")
) {
let rules;
if (node.value.endsWith("}")) {
if (node.value.trim().endsWith("}")) {
const textBefore = options.originalText.slice(
0,
node.source.start.offset
Expand Down
30 changes: 0 additions & 30 deletions tests/format/js/babel-plugins/__snapshots__/jsfmt.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -386,17 +386,6 @@ console.log(Bork.staticFunction()); // > "babelIsCool"
================================================================================
`;

exports[`class-static-block.js [espree] format 1`] = `
"Unexpected token { (4:10)
2 | static #x = 42;
3 | static y;
> 4 | static {
| ^
5 | try {
6 | this.y = doSomethingWith(this.#x);
7 | } catch {"
`;

exports[`class-static-block.js [meriyah] format 1`] = `
"[4:10]: Unexpected token: '{' (4:10)
2 | static #x = 42;
Expand Down Expand Up @@ -1098,14 +1087,6 @@ let m = module {
================================================================================
`;

exports[`module-string-names.js [espree] format 1`] = `
"Unexpected token \\"😄\\" (1:10)
> 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\";
| ^
2 | export { smile as \\"😄\\" } from \\"./emojis.js\\";
3 |"
`;

exports[`module-string-names.js [meriyah] format 1`] = `
"[1:13]: Expected '}' (1:13)
> 1 | import { \\"😄\\" as smile } from \\"./emojis.js\\";
Expand Down Expand Up @@ -1727,17 +1708,6 @@ value
================================================================================
`;

exports[`private-fields-in-in.js [espree] format 1`] = `
"Unexpected token #brand (44:12)
42 |
43 | static isC(obj) {
> 44 | return #brand in obj && #method in obj && #getter in obj;
| ^
45 | }
46 | }
47 |"
`;

exports[`private-fields-in-in.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-ts", "babel-flow"]
Expand Down
3 changes: 0 additions & 3 deletions tests/format/js/babel-plugins/jsfmt.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ run_spec(__dirname, ["babel", "babel-ts", "babel-flow"], {
"pipeline-operator-fsharp.js",
"pipeline-operator-minimal.js",
"pipeline-operator-smart.js",
"private-fields-in-in.js",
"record-tuple-record.js",
"record-tuple-tuple.js",
"throw-expressions.js",
"typescript.js",
"v8intrinsic.js",
"module-string-names.js",
"class-static-block.js",
"module-blocks.js",
"async-do-expressions.js",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -740,13 +740,6 @@ printWidth: 80
================================================================================
`;

exports[`like-regexp.js [espree] format 1`] = `
"Unterminated regular expression (1:19)
> 1 | 0 ? a : { b : 1 }/2;
| ^
2 |"
`;

exports[`like-regexp.js format 1`] = `
====================================options=====================================
parsers: ["babel", "babel-flow", "flow", "typescript"]
Expand Down
2 changes: 1 addition & 1 deletion tests/format/js/binary-expressions/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// [prettierx] test with all Babel parsers
// (babel-ts is normally included with typescript by default)
run_spec(__dirname, ["babel", "babel-flow", "flow", "typescript"], {
errors: { espree: ["like-regexp.js"] },
errors: { espree: [] },
});
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`class-static-block.js [espree] format 1`] = `
"Unexpected token { (4:10)
2 | static #x = 42;
3 | static y;
> 4 | static {
| ^
5 | try {
6 | this.y = doSomethingWith(this.#x);
7 | } catch {"
`;

exports[`class-static-block.js [meriyah] format 1`] = `
"[4:10]: Unexpected token: '{' (4:10)
2 | static #x = 42;
Expand Down
2 changes: 1 addition & 1 deletion tests/format/js/class-static-block/jsfmt.spec.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
run_spec(__dirname, ["babel"], { errors: { espree: true, meriyah: true } });
run_spec(__dirname, ["babel"], { errors: { espree: false, meriyah: true } });
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`module-string-names-export.js [espree] format 1`] = `
"Unexpected token \\"smile\\" (1:19)
> 1 | export { smile as \\"smile\\" } from \\"./emojis.js\\";
| ^
2 | export { \\"smile\\" as smile } from \\"./emojis.js\\";
"Duplicate export 'smile' (2:21)
1 | export { smile as \\"smile\\" } from \\"./emojis.js\\";
> 2 | export { \\"smile\\" as smile } from \\"./emojis.js\\";
| ^
3 | export { \\"smile\\" as \\"smile\\" } from \\"./emojis.js\\";
4 | export { foo, bar as \\"foo\\" } from \\"./emojis.js\\";"
4 | export { foo, bar as \\"foo\\" } from \\"./emojis.js\\";
5 | export { foo, bar as \\"foo\\" };"
`;

exports[`module-string-names-export.js [meriyah] format 1`] = `
Expand Down Expand Up @@ -50,11 +51,11 @@ export { "smile" } from "./emojis.js";
`;

exports[`module-string-names-import.js [espree] format 1`] = `
"Unexpected token \\"default\\" (1:10)
> 1 | import { \\"default\\" as quotation } from \\"Confucius\\";
| ^
"Identifier 'quotation' has already been declared (3:27)
1 | import { \\"default\\" as quotation } from \\"Confucius\\";
2 | import { \\"foo\\" as bar, \\"default\\" as qux } from \\"module-a\\";
3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\";
> 3 | import { \\"學而時習之,不亦說乎?\\" as quotation } from \\"Confucius\\";
| ^
4 |"
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ https://github.com/postcss/postcss/releases/tag/8.0.0
*/

:root {
--empty: ;
--empty:;
--JSON: [1, "2", {"three": {"a": 1}}, [4]];
--javascript: function(rule) {console.log(rule)};
}
Expand Down
Loading