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

chore: expand prettier-e2e test and update typings/deps #14779

Merged
merged 4 commits into from Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gulpfile.mjs
Expand Up @@ -495,7 +495,7 @@ const libBundles = [
}));

const cjsBundles = [
// This is used by Prettier, @babel/register and @babel/eslint-parser
// This is used by @babel/register and @babel/eslint-parser
{ src: "packages/babel-parser" },
];

Expand Down
7 changes: 0 additions & 7 deletions lib/fs-readdir-recursive.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/babel-cli/package.json
Expand Up @@ -42,6 +42,7 @@
"devDependencies": {
"@babel/core": "workspace:^",
"@babel/helper-fixtures": "workspace:^",
"@types/fs-readdir-recursive": "^1.1.0",
"rimraf": "^3.0.0"
},
"bin": {
Expand Down
1 change: 0 additions & 1 deletion scripts/generators/tsconfig.js
Expand Up @@ -130,7 +130,6 @@ fs.writeFileSync(
["./node_modules/to-fast-properties-BABEL_8_BREAKING-true"],
],
["slash", ["./node_modules/slash-BABEL_8_BREAKING-true"]],
["fs-readdir-recursive", ["./lib/fs-readdir-recursive.d.ts"]],
["kexec", ["./lib/kexec.d.ts"]],
]),
},
Expand Down
11 changes: 4 additions & 7 deletions scripts/integration-tests/e2e-prettier.sh
Expand Up @@ -15,7 +15,7 @@ source utils/cleanup.sh
set -x

# Clone prettier
git clone --depth=1 https://github.com/prettier/prettier tmp/prettier
git clone --depth=1 --single-branch --branch next https://github.com/prettier/prettier tmp/prettier
cd tmp/prettier || exit

# Update @babel/* dependencies
Expand All @@ -32,14 +32,11 @@ yarn --version
# TEST #
#==============================================================================#

# Don't use Yarn 2
export YARN_IGNORE_PATH=1

startLocalRegistry "$root"/verdaccio-config.yml
yarn install
yarn install --no-immutable
yarn info

# Only run js,jsx,misc format tests
# Without --runInBand CircleCI hangs.
yarn test "tests/format/(jsx?|misc)/" --update-snapshot --runInBand
yarn test "tests/format/(jsx?|misc|typescript|flow|flow-repo)/" --update-snapshot --runInBand

cleanup
10 changes: 6 additions & 4 deletions scripts/integration-tests/utils/bump-babel-dependencies.js
Expand Up @@ -6,23 +6,25 @@ const packageJSONPath = path.resolve(cwd, "./package.json");
const content = JSON.parse(fs.readFileSync(packageJSONPath));

let bumped = false;
function bumpBabelDependency(dependencies, version) {
function bumpBabelDependency(type, version) {
const dependencies = content[type];
for (const dep of Object.keys(dependencies)) {
if (dep.startsWith("@babel/") && !dependencies[dep].includes(":")) {
dependencies[dep] = version;
console.log(`Bumped ${type}:${dep} to ${version}`);
bumped = true;
}
}
}

if ("peerDependencies" in content) {
bumpBabelDependency(content.peerDependencies, "*");
bumpBabelDependency("peerDependencies", "*");
}
if ("devDependencies" in content) {
bumpBabelDependency(content.devDependencies, "latest");
bumpBabelDependency("devDependencies", "latest");
}
if ("dependencies" in content) {
bumpBabelDependency(content.dependencies, "latest");
bumpBabelDependency("dependencies", "latest");
}

if (bumped) {
Expand Down
3 changes: 0 additions & 3 deletions tsconfig.json
Expand Up @@ -730,9 +730,6 @@
"slash": [
"./node_modules/slash-BABEL_8_BREAKING-true"
],
"fs-readdir-recursive": [
"./lib/fs-readdir-recursive.d.ts"
],
"kexec": [
"./lib/kexec.d.ts"
]
Expand Down