Skip to content

Commit

Permalink
Remove unstable AST testing (#10462)
Browse files Browse the repository at this point in the history
* Add unstable AST testing for json-stringify parser

* Deduplicate yarn.lock

* Ignore `tokens`

Co-authored-by: fisker Cheung <lionkay@gmail.com>
  • Loading branch information
sosukesuzuki and fisker committed Mar 5, 2021
1 parent eb5139b commit f1b5720
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"dependencies": {
"@angular/compiler": "11.2.3",
"@babel/code-frame": "7.12.13",
"@babel/parser": "7.13.4",
"@babel/parser": "7.13.9",
"@glimmer/syntax": "0.77.1",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "4.15.2",
Expand Down
1 change: 1 addition & 0 deletions src/language-js/printer-estree-json.js
Expand Up @@ -83,6 +83,7 @@ const ignoredProperties = new Set([
"innerComments",
"errors",
"range",
"tokens",
]);

function clean(node, newNode /*, parent*/) {
Expand Down
21 changes: 1 addition & 20 deletions tests_config/run_spec.js
Expand Up @@ -47,26 +47,7 @@ const unstableTests = new Map(
})
);

// This is temporary.
// This will be removed once https://github.com/babel/babel/issues/12915 is fixed
const unstableAstTests = new Map(
[
[
"flow/function-parentheses/single.js",
(options) =>
options.parser.startsWith("babel") && options.arrowParens !== "avoid",
],
[
"flow/function-parentheses/test.js",
(options) => options.parser.startsWith("babel"),
],
].map((fixture) => {
const [file, isUnstable = () => true] = Array.isArray(fixture)
? fixture
: [fixture];
return [path.join(__dirname, "../tests/", file), isUnstable];
})
);
const unstableAstTests = new Map();

const espreeDisabledTests = new Set(
[
Expand Down
9 changes: 5 additions & 4 deletions yarn.lock
Expand Up @@ -283,10 +283,10 @@
chalk "^2.0.0"
js-tokens "^4.0.0"

"@babel/parser@7.13.4", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4":
version "7.13.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.4.tgz#340211b0da94a351a6f10e63671fa727333d13ab"
integrity sha512-uvoOulWHhI+0+1f9L4BoozY7U5cIkZ9PgJqvb041d6vypgUmtVPG4vmGm4pSggjl8BELzvHyUeJSUyEMY6b+qA==
"@babel/parser@7.13.9", "@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.13.0", "@babel/parser@^7.13.4":
version "7.13.9"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.9.tgz#ca34cb95e1c2dd126863a84465ae8ef66114be99"
integrity sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw==

"@babel/plugin-proposal-async-generator-functions@^7.13.8":
version "7.13.8"
Expand Down Expand Up @@ -3039,6 +3039,7 @@ eslint-plugin-jest@24.1.5:

"eslint-plugin-prettier-internal-rules@link:scripts/tools/eslint-plugin-prettier-internal-rules":
version "0.0.0"
uid ""

eslint-plugin-react@7.22.0:
version "7.22.0"
Expand Down

0 comments on commit f1b5720

Please sign in to comment.