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

monorepo: ci, lint, package.json overhaul #3058

Merged
merged 5 commits into from
Nov 12, 2020
Merged

Conversation

joshgummersall
Copy link
Contributor

@joshgummersall joshgummersall commented Nov 11, 2020

Fixes a variety of open issues and some other tooling/monorepo clean up tasks.

Fixes #2415
Fixes #2416
Fixes #2417
Fixes #2418
Fixes #2419
Fixes #2420
Fixes #2421
Fixes #2422
Fixes #2423
Fixes #2424
Fixes #2425
Fixes #2426
Fixes #2428

Josh Gummersall and others added 3 commits November 12, 2020 09:04
- restructure eslint configuration for better isolation
- hoist many package.json script deps to root package.json
- fix all `clean` scripts
Fixes #2415
Fixes #2416
Fixes #2417
Fixes #2418
Fixes #2419
Fixes #2420
Fixes #2421
Fixes #2422
Fixes #2423
Fixes #2424
Fixes #2425
Fixes #2426
Fixes #2428
Cleans up workflows and runs on Windows as well
@joshgummersall joshgummersall force-pushed the jpg/gh-ci-lint-overhaul branch 4 times, most recently from eb37284 to 51a3fe0 Compare November 12, 2020 17:24
Use spawn isntead of exec to get around buffering issues and make code
less branchy.

Add --scriptArgs flag to pass extra flags directly to an npm script. An
unfortunately hacky way to support passing `--quiet` to eslint for CI.
@joshgummersall joshgummersall force-pushed the jpg/gh-ci-lint-overhaul branch 7 times, most recently from a91905e to cd88525 Compare November 12, 2020 19:14
};
}, {});

return new Promise((resolve, reject) => async.auto(tasks, concurrency, (err) => (err ? reject(err) : resolve())));
Copy link
Contributor Author

@joshgummersall joshgummersall Nov 12, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async.auto is designed for exactly this problem.

The main reason I removed my old implementation is that it suffered from "head-of-line blocking". In particular, tasks were executed concurrently in groups. As a consequence, the slowest task in a group determines how long it takes to execute the group of tasks.

async.auto ensures that, if possible, N tasks are always being executed, where N = concurrency. The slight downside is that the async library generally does not play well with Promises or async/await.

Also uses async.auto rather than custom dependency resolution code
@joshgummersall joshgummersall force-pushed the jpg/gh-ci-lint-overhaul branch from cd88525 to c173859 Compare November 12, 2020 19:22
@stevengum stevengum merged commit 1873a0f into main Nov 12, 2020
@stevengum stevengum deleted the jpg/gh-ci-lint-overhaul branch November 12, 2020 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants