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

Support using and await using declarations #54505

Merged
merged 33 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0cb73b3
Add support for 'using' and 'await using' declarations
rbuckton May 24, 2023
0647856
Move NamedEvaluation to its own file
rbuckton May 26, 2023
8f082fc
Remove unnecessary copyStandardPrologue call
rbuckton May 26, 2023
688771f
Reorder transforms
rbuckton May 30, 2023
80d0a84
Merge branch 'main' into using-declaration
rbuckton Jun 1, 2023
a17aead
Used named evaluation transform in class fields, emit cleanup
rbuckton Jun 1, 2023
25a2fd3
Add --coverage for tests, remove unused NamedEvaluation code
rbuckton Jun 2, 2023
40f546b
Remove temporary debug/diagnostic code
rbuckton Jun 2, 2023
e0b9c73
Revert '--coverage' in favor of #54499
rbuckton Jun 2, 2023
08f41bd
Remove unused sameMapDefined function from core
rbuckton Jun 2, 2023
7360338
Revert inconsequential change in import list in debug.ts
rbuckton Jun 2, 2023
587a1a4
Revert changes to track factory source in favor of #51307
rbuckton Jun 2, 2023
3be9cf0
Clean up function names in transformers/module/module.ts
rbuckton Jun 2, 2023
0b77050
Minor jsdoc comment cleanup
rbuckton Jun 2, 2023
bba71b1
Add additional documentation comments to the 'esnext' transform
rbuckton Jun 2, 2023
2d4e506
Further cleanup of NamedEvaluation
rbuckton Jun 5, 2023
ae6cbaf
PR Feedback
rbuckton Jun 6, 2023
afa64ca
Add test verifying we now check excess decls in a for-in/of
rbuckton Jun 6, 2023
5b6adea
Add declaration emit tests
rbuckton Jun 8, 2023
7964b5f
Merge branch 'main' into using-declaration
rbuckton Jun 8, 2023
0435db0
Reduce calls to getCombinedNodeFlags
rbuckton Jun 8, 2023
246a9a3
Only cache the last combined node flags
rbuckton Jun 9, 2023
21b3e03
Cache getCombinedNodeFlags result in checker
rbuckton Jun 9, 2023
4a5ca67
Cache getCombinedModifierFlags result in checker
rbuckton Jun 9, 2023
b763f82
Add local, caching version of isVarConst to checker
rbuckton Jun 9, 2023
08a1434
Merge branch 'main' into using-declaration
rbuckton Jun 9, 2023
2fc9bcf
Merge branch 'main' into using-declaration
rbuckton Jun 12, 2023
1e8f045
Merge branch 'main' into using-declaration
rbuckton Jun 13, 2023
3dc4011
Add tests and report better errors for 'await using'
rbuckton Jun 15, 2023
8ad153a
PR feedback
rbuckton Jun 21, 2023
51870e1
Add fallback in helpers when SuppressedError does not exist
rbuckton Jun 21, 2023
df5e591
Use more iterations in evaluation tests
rbuckton Jun 21, 2023
558a502
Treat underscore-prefixed identifiers as used locals for 'using'/'awa…
rbuckton Jun 21, 2023
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
Prev Previous commit
Next Next commit
Revert '--coverage' in favor of #54499
  • Loading branch information
rbuckton committed Jun 2, 2023
commit e0b9c737ce281c6b0f10f38953ced73648ee95c8
6 changes: 0 additions & 6 deletions .c8rc.json

This file was deleted.

1 change: 0 additions & 1 deletion Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ export const runTests = task({
// task("runtests").flags = {
// "-t --tests=<regex>": "Pattern for tests to run.",
// " --failed": "Runs tests listed in '.failed-tests'.",
// " --coverage": "Generate test coverage using c8",
// "-r --reporter=<reporter>": "The mocha reporter to use.",
// "-i --break": "Runs tests in inspector mode (NodeJS 8 and later)",
// " --keepFailed": "Keep tests in .failed-tests even if they pass",
Expand Down
4 changes: 1 addition & 3 deletions scripts/build/options.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import os from "os";
const ci = ["1", "true"].includes(process.env.CI ?? "");

const parsed = minimist(process.argv.slice(2), {
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck", "lint", "coverage"],
boolean: ["dirty", "light", "colors", "lkg", "soft", "fix", "failed", "keepFailed", "force", "built", "ci", "bundle", "typecheck", "lint"],
string: ["browser", "tests", "break", "host", "reporter", "stackTraceLimit", "timeout", "shards", "shardId"],
alias: {
/* eslint-disable quote-props */
Expand Down Expand Up @@ -42,7 +42,6 @@ const parsed = minimist(process.argv.slice(2), {
bundle: true,
typecheck: true,
lint: true,
coverage: false,
}
});

Expand Down Expand Up @@ -89,6 +88,5 @@ export default options;
* @property {boolean} bundle
* @property {boolean} typecheck
* @property {boolean} lint
* @property {boolean} coverage
*/
void 0;
10 changes: 1 addition & 9 deletions scripts/build/tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
const keepFailed = cmdLineOptions.keepFailed;
const shards = +cmdLineOptions.shards || undefined;
const shardId = +cmdLineOptions.shardId || undefined;
const coverage = cmdLineOptions.coverage;
if (!cmdLineOptions.dirty) {
if (options.watching) {
console.log(chalk.yellowBright(`[watch] cleaning test directories...`));
Expand Down Expand Up @@ -83,13 +82,6 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
/** @type {string[]} */
const args = [];

let execPath = process.execPath;
if (coverage) {
args.push("exec", "c8");
args.push(execPath);
execPath = "npm";
}

// timeout normally isn't necessary but Travis-CI has been timing out on compiler baselines occasionally
// default timeout is 2sec which really should be enough, but maybe we just need a small amount longer
if (!runInParallel) {
Expand Down Expand Up @@ -139,7 +131,7 @@ export async function runConsoleTests(runJs, defaultReporter, runInParallel, opt
try {
setNodeEnvToDevelopment();

const { exitCode } = await exec(execPath, args, { token: options.token });
const { exitCode } = await exec(process.execPath, args, { token: options.token });
if (exitCode !== 0) {
errorStatus = exitCode;
error = new Error(`Process exited with status code ${errorStatus}.`);
Expand Down