From 2f91913272d81b3ce91e2e04d903d9adfe074e05 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Sat, 21 May 2022 17:25:04 -0300 Subject: [PATCH 01/14] feat(sharedmemory): Added file waitAsync function --- src/lib/es2022.sharedmemory.d.ts | 86 ++++++++++++++++++++++++++++++++ src/lib/libs.json | 1 + 2 files changed, 87 insertions(+) create mode 100644 src/lib/es2022.sharedmemory.d.ts diff --git a/src/lib/es2022.sharedmemory.d.ts b/src/lib/es2022.sharedmemory.d.ts new file mode 100644 index 0000000000000..92b4e536d05d1 --- /dev/null +++ b/src/lib/es2022.sharedmemory.d.ts @@ -0,0 +1,86 @@ +interface Atomics { + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + + /** + * A non-blocking, asynchronous version of wait and usable on the main thread. + * Waits asynchronously on a shared memory location and returns a Promise + * @see wait + */ + waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise }; + + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; + + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; +} diff --git a/src/lib/libs.json b/src/lib/libs.json index ad01b1dff2c9b..c9cc8062ab071 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -60,6 +60,7 @@ "es2022.intl", "es2022.object", "es2022.string", + "es2022.sharedmemory", "esnext.intl", // Default libraries "es5.full", From cfc496c3ab34e648e8191b7c26431f5b07d86302 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Sat, 21 May 2022 17:35:31 -0300 Subject: [PATCH 02/14] fix: Adjusted promise return type --- src/lib/es2022.sharedmemory.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/es2022.sharedmemory.d.ts b/src/lib/es2022.sharedmemory.d.ts index 92b4e536d05d1..f4f105dce4fd9 100644 --- a/src/lib/es2022.sharedmemory.d.ts +++ b/src/lib/es2022.sharedmemory.d.ts @@ -66,7 +66,7 @@ interface Atomics { * Waits asynchronously on a shared memory location and returns a Promise * @see wait */ - waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise }; + waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; /** * Wakes up sleeping agents that are waiting on the given index of the array, returning the From ed95373ad927fe09cb97acdfb4e5b0f899bc852a Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Tue, 31 May 2022 21:33:34 -0300 Subject: [PATCH 03/14] Fix(sharedmemory): Addressed PR comments --- src/lib/es2022.d.ts | 1 + src/lib/es2022.sharedmemory.d.ts | 80 +------------------------------- 2 files changed, 2 insertions(+), 79 deletions(-) diff --git a/src/lib/es2022.d.ts b/src/lib/es2022.d.ts index 7069e4ecdf1e9..28b66165e22c9 100644 --- a/src/lib/es2022.d.ts +++ b/src/lib/es2022.d.ts @@ -3,4 +3,5 @@ /// /// /// +/// /// diff --git a/src/lib/es2022.sharedmemory.d.ts b/src/lib/es2022.sharedmemory.d.ts index f4f105dce4fd9..b2d64f50878df 100644 --- a/src/lib/es2022.sharedmemory.d.ts +++ b/src/lib/es2022.sharedmemory.d.ts @@ -1,86 +1,8 @@ interface Atomics { - /** - * Adds a value to the value at the given position in the array, returning the original value. - * Until this atomic operation completes, any other read or write operation against the array - * will block. - */ - add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Stores the bitwise AND of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or - * write operation against the array will block. - */ - and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Replaces the value at the given position in the array if the original value equals the given - * expected value, returning the original value. Until this atomic operation completes, any - * other read or write operation against the array will block. - */ - compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; - - /** - * Replaces the value at the given position in the array, returning the original value. Until - * this atomic operation completes, any other read or write operation against the array will - * block. - */ - exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Returns the value at the given position in the array. Until this atomic operation completes, - * any other read or write operation against the array will block. - */ - load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; - - /** - * Stores the bitwise OR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Stores a value at the given position in the array, returning the new value. Until this - * atomic operation completes, any other read or write operation against the array will block. - */ - store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * Subtracts a value from the value at the given position in the array, returning the original - * value. Until this atomic operation completes, any other read or write operation against the - * array will block. - */ - sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; - - /** - * If the value at the given position in the array is equal to the provided value, the current - * agent is put to sleep causing execution to suspend until the timeout expires (returning - * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns - * `"not-equal"`. - */ - wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; - /** * A non-blocking, asynchronous version of wait and usable on the main thread. * Waits asynchronously on a shared memory location and returns a Promise * @see wait */ - waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; - - /** - * Wakes up sleeping agents that are waiting on the given index of the array, returning the - * number of agents that were awoken. - * @param typedArray A shared BigInt64Array. - * @param index The position in the typedArray to wake up on. - * @param count The number of sleeping agents to notify. Defaults to +Infinity. - */ - notify(typedArray: BigInt64Array, index: number, count?: number): number; - - /** - * Stores the bitwise XOR of a value with the value at the given position in the array, - * returning the original value. Until this atomic operation completes, any other read or write - * operation against the array will block. - */ - xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; } From 9609e3260849b5d910c31e0b7d735bf3fafe8118 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Wed, 1 Jun 2022 21:32:49 -0300 Subject: [PATCH 04/14] Fix: Removed unused @see at sharedmemory --- src/lib/es2022.sharedmemory.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/lib/es2022.sharedmemory.d.ts b/src/lib/es2022.sharedmemory.d.ts index b2d64f50878df..b432dcbdbbcdb 100644 --- a/src/lib/es2022.sharedmemory.d.ts +++ b/src/lib/es2022.sharedmemory.d.ts @@ -2,7 +2,6 @@ interface Atomics { /** * A non-blocking, asynchronous version of wait and usable on the main thread. * Waits asynchronously on a shared memory location and returns a Promise - * @see wait */ waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; } From fd407dcb3d1c5bb47c6d11ffad97fac44dab001d Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Wed, 1 Jun 2022 21:33:51 -0300 Subject: [PATCH 05/14] Feat: Added tests to shared memory --- tests/cases/conformance/es2022/es2022SharedMemory.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 tests/cases/conformance/es2022/es2022SharedMemory.ts diff --git a/tests/cases/conformance/es2022/es2022SharedMemory.ts b/tests/cases/conformance/es2022/es2022SharedMemory.ts new file mode 100644 index 0000000000000..5aaf67a465e3d --- /dev/null +++ b/tests/cases/conformance/es2022/es2022SharedMemory.ts @@ -0,0 +1,9 @@ +// @target: esnext +// @lib: es2022.sharedmemory +// @noemit: true +// @strict: true + +const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); +const int32 = new Int32Array(sab); +Atomics.wait(int32, 0, 0); +await Atomics.waitAsync(int32, 0, 0); From d93edccb076d854365a72d91042e410239dfcfcd Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Thu, 2 Jun 2022 15:59:52 -0300 Subject: [PATCH 06/14] Fix: fixed ordering in libs.json --- src/lib/libs.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/libs.json b/src/lib/libs.json index c9cc8062ab071..305c6e3030a90 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -59,8 +59,8 @@ "es2022.error", "es2022.intl", "es2022.object", - "es2022.string", "es2022.sharedmemory", + "es2022.string", "esnext.intl", // Default libraries "es5.full", From ce88291d2db8d1f6bb9bd95c6c6968ea02d01354 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Thu, 2 Jun 2022 16:00:10 -0300 Subject: [PATCH 07/14] Feat: Added shared memory to line parser --- src/compiler/commandLineParser.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index ba368e3c56695..41d81534dcbf8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -83,6 +83,7 @@ namespace ts { ["es2022.error", "lib.es2022.error.d.ts"], ["es2022.intl", "lib.es2022.intl.d.ts"], ["es2022.object", "lib.es2022.object.d.ts"], + ["es2022.sharedmemory", "lib.es2022.sharedmemory.d.ts"], ["es2022.string", "lib.es2022.string.d.ts"], ["esnext.array", "lib.es2022.array.d.ts"], ["esnext.symbol", "lib.es2019.symbol.d.ts"], From 46c08a8d5040df2ae0d3bd6bb5ff25d4449d40d2 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Thu, 2 Jun 2022 16:28:49 -0300 Subject: [PATCH 08/14] Update tests es2022SharedMemory.ts as sugested Co-authored-by: Eyal Halpern Shalev --- tests/cases/conformance/es2022/es2022SharedMemory.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cases/conformance/es2022/es2022SharedMemory.ts b/tests/cases/conformance/es2022/es2022SharedMemory.ts index 5aaf67a465e3d..c0297697e2fa5 100644 --- a/tests/cases/conformance/es2022/es2022SharedMemory.ts +++ b/tests/cases/conformance/es2022/es2022SharedMemory.ts @@ -6,4 +6,5 @@ const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); const int32 = new Int32Array(sab); Atomics.wait(int32, 0, 0); -await Atomics.waitAsync(int32, 0, 0); +const {async, value} = Atomics.waitAsync(int32, 0, 0); +await value; From 2fcd39d2772338e2274963e52e198bd0d288d078 Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Fri, 3 Jun 2022 12:19:33 -0300 Subject: [PATCH 09/14] Update es2022SharedMemory.ts --- .../cases/conformance/es2022/es2022SharedMemory.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/cases/conformance/es2022/es2022SharedMemory.ts b/tests/cases/conformance/es2022/es2022SharedMemory.ts index c0297697e2fa5..c28d50bbefd7a 100644 --- a/tests/cases/conformance/es2022/es2022SharedMemory.ts +++ b/tests/cases/conformance/es2022/es2022SharedMemory.ts @@ -1,10 +1,16 @@ // @target: esnext -// @lib: es2022.sharedmemory +// @lib: es2022 // @noemit: true // @strict: true const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); const int32 = new Int32Array(sab); -Atomics.wait(int32, 0, 0); -const {async, value} = Atomics.waitAsync(int32, 0, 0); -await value; +const waitValue = Atomics.wait(int32, 0, 0); +const { async, value } = Atomics.waitAsync(int32, 0, BigInt(0)); + +const main = async () => { + if (async) { + await value; + } +} +main(); \ No newline at end of file From e93cbe247ce4fa450c7d6cea5f14be4b7de632ea Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Fri, 3 Jun 2022 12:19:54 -0300 Subject: [PATCH 10/14] feat: Accepted baselines --- .../reference/es2022SharedMemory.symbols | 42 ++++++++++++++ .../reference/es2022SharedMemory.types | 56 +++++++++++++++++++ ...eactJsxReactResolvedNodeNextEsm.trace.json | 2 + ...does-not-add-color-when-NO_COLOR-is-set.js | 2 +- ...-when-host-can't-provide-terminal-width.js | 2 +- ...tatus.DiagnosticsPresent_OutputsSkipped.js | 2 +- 6 files changed, 103 insertions(+), 3 deletions(-) create mode 100644 tests/baselines/reference/es2022SharedMemory.symbols create mode 100644 tests/baselines/reference/es2022SharedMemory.types diff --git a/tests/baselines/reference/es2022SharedMemory.symbols b/tests/baselines/reference/es2022SharedMemory.symbols new file mode 100644 index 0000000000000..8eedea4a5bed0 --- /dev/null +++ b/tests/baselines/reference/es2022SharedMemory.symbols @@ -0,0 +1,42 @@ +=== tests/cases/conformance/es2022/es2022SharedMemory.ts === +const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); +>sab : Symbol(sab, Decl(es2022SharedMemory.ts, 0, 5)) +>SharedArrayBuffer : Symbol(SharedArrayBuffer, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2017.sharedmemory.d.ts, --, --)) +>Int32Array.BYTES_PER_ELEMENT : Symbol(Int32ArrayConstructor.BYTES_PER_ELEMENT, Decl(lib.es5.d.ts, --, --)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>BYTES_PER_ELEMENT : Symbol(Int32ArrayConstructor.BYTES_PER_ELEMENT, Decl(lib.es5.d.ts, --, --)) + +const int32 = new Int32Array(sab); +>int32 : Symbol(int32, Decl(es2022SharedMemory.ts, 1, 5)) +>Int32Array : Symbol(Int32Array, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2016.array.include.d.ts, --, --) ... and 1 more) +>sab : Symbol(sab, Decl(es2022SharedMemory.ts, 0, 5)) + +const waitValue = Atomics.wait(int32, 0, 0); +>waitValue : Symbol(waitValue, Decl(es2022SharedMemory.ts, 2, 5)) +>Atomics.wait : Symbol(Atomics.wait, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2020.sharedmemory.d.ts, --, --)) +>Atomics : Symbol(Atomics, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2020.sharedmemory.d.ts, --, --), Decl(lib.es2022.sharedmemory.d.ts, --, --)) +>wait : Symbol(Atomics.wait, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2020.sharedmemory.d.ts, --, --)) +>int32 : Symbol(int32, Decl(es2022SharedMemory.ts, 1, 5)) + +const { async, value } = Atomics.waitAsync(int32, 0, BigInt(0)); +>async : Symbol(async, Decl(es2022SharedMemory.ts, 3, 7)) +>value : Symbol(value, Decl(es2022SharedMemory.ts, 3, 14)) +>Atomics.waitAsync : Symbol(Atomics.waitAsync, Decl(lib.es2022.sharedmemory.d.ts, --, --)) +>Atomics : Symbol(Atomics, Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2017.sharedmemory.d.ts, --, --), Decl(lib.es2020.sharedmemory.d.ts, --, --), Decl(lib.es2022.sharedmemory.d.ts, --, --)) +>waitAsync : Symbol(Atomics.waitAsync, Decl(lib.es2022.sharedmemory.d.ts, --, --)) +>int32 : Symbol(int32, Decl(es2022SharedMemory.ts, 1, 5)) +>BigInt : Symbol(BigInt, Decl(lib.es2020.bigint.d.ts, --, --), Decl(lib.es2020.bigint.d.ts, --, --)) + +const main = async () => { +>main : Symbol(main, Decl(es2022SharedMemory.ts, 5, 5)) + + if (async) { +>async : Symbol(async, Decl(es2022SharedMemory.ts, 3, 7)) + + await value; +>value : Symbol(value, Decl(es2022SharedMemory.ts, 3, 14)) + } +} +main(); +>main : Symbol(main, Decl(es2022SharedMemory.ts, 5, 5)) + diff --git a/tests/baselines/reference/es2022SharedMemory.types b/tests/baselines/reference/es2022SharedMemory.types new file mode 100644 index 0000000000000..d3bf7f66c016a --- /dev/null +++ b/tests/baselines/reference/es2022SharedMemory.types @@ -0,0 +1,56 @@ +=== tests/cases/conformance/es2022/es2022SharedMemory.ts === +const sab = new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024); +>sab : SharedArrayBuffer +>new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT * 1024) : SharedArrayBuffer +>SharedArrayBuffer : SharedArrayBufferConstructor +>Int32Array.BYTES_PER_ELEMENT * 1024 : number +>Int32Array.BYTES_PER_ELEMENT : number +>Int32Array : Int32ArrayConstructor +>BYTES_PER_ELEMENT : number +>1024 : 1024 + +const int32 = new Int32Array(sab); +>int32 : Int32Array +>new Int32Array(sab) : Int32Array +>Int32Array : Int32ArrayConstructor +>sab : SharedArrayBuffer + +const waitValue = Atomics.wait(int32, 0, 0); +>waitValue : "ok" | "not-equal" | "timed-out" +>Atomics.wait(int32, 0, 0) : "ok" | "not-equal" | "timed-out" +>Atomics.wait : { (typedArray: Int32Array, index: number, value: number, timeout?: number | undefined): "ok" | "not-equal" | "timed-out"; (typedArray: BigInt64Array, index: number, value: bigint, timeout?: number | undefined): "ok" | "not-equal" | "timed-out"; } +>Atomics : Atomics +>wait : { (typedArray: Int32Array, index: number, value: number, timeout?: number | undefined): "ok" | "not-equal" | "timed-out"; (typedArray: BigInt64Array, index: number, value: bigint, timeout?: number | undefined): "ok" | "not-equal" | "timed-out"; } +>int32 : Int32Array +>0 : 0 +>0 : 0 + +const { async, value } = Atomics.waitAsync(int32, 0, BigInt(0)); +>async : boolean +>value : "ok" | "not-equal" | "timed-out" | Promise<"ok" | "not-equal" | "timed-out"> +>Atomics.waitAsync(int32, 0, BigInt(0)) : { async: false; value: "ok" | "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "not-equal" | "timed-out">; } +>Atomics.waitAsync : (typedArray: Int32Array | BigInt64Array, index: number, value: bigint, timeout?: number | undefined) => { async: false; value: "ok" | "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "not-equal" | "timed-out">; } +>Atomics : Atomics +>waitAsync : (typedArray: Int32Array | BigInt64Array, index: number, value: bigint, timeout?: number | undefined) => { async: false; value: "ok" | "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "not-equal" | "timed-out">; } +>int32 : Int32Array +>0 : 0 +>BigInt(0) : bigint +>BigInt : BigIntConstructor +>0 : 0 + +const main = async () => { +>main : () => Promise +>async () => { if (async) { await value; }} : () => Promise + + if (async) { +>async : boolean + + await value; +>await value : "ok" | "not-equal" | "timed-out" +>value : Promise<"ok" | "not-equal" | "timed-out"> + } +} +main(); +>main() : Promise +>main : () => Promise + diff --git a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json index 0e83601b1655e..ec1743f45c7a2 100644 --- a/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json +++ b/tests/baselines/reference/reactJsxReactResolvedNodeNextEsm.trace.json @@ -141,5 +141,7 @@ "File 'package.json' does not exist according to earlier cached lookups.", "File '/package.json' does not exist according to earlier cached lookups.", "File 'package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "File 'package.json' does not exist according to earlier cached lookups.", "File '/package.json' does not exist according to earlier cached lookups." ] \ No newline at end of file diff --git a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js index e440d0f280127..257ae2c95017d 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/does-not-add-color-when-NO_COLOR-is-set.js @@ -90,7 +90,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.string/esnext.string, esnext.intl +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, esnext.intl default: undefined --allowJs diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js index a7886b4d5b5e6..345d7b9679be2 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped-when-host-can't-provide-terminal-width.js @@ -90,7 +90,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.string/esnext.string, esnext.intl +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, esnext.intl default: undefined --allowJs diff --git a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js index a7886b4d5b5e6..345d7b9679be2 100644 --- a/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js +++ b/tests/baselines/reference/tsc/runWithoutArgs/show-help-with-ExitStatus.DiagnosticsPresent_OutputsSkipped.js @@ -90,7 +90,7 @@ default: undefined --lib Specify a set of bundled library declaration files that describe the target runtime environment. -one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.string/esnext.string, esnext.intl +one or more: es5, es6/es2015, es7/es2016, es2017, es2018, es2019, es2020, es2021, es2022, esnext, dom, dom.iterable, webworker, webworker.importscripts, webworker.iterable, scripthost, es2015.core, es2015.collection, es2015.generator, es2015.iterable, es2015.promise, es2015.proxy, es2015.reflect, es2015.symbol, es2015.symbol.wellknown, es2016.array.include, es2017.object, es2017.sharedmemory, es2017.string, es2017.intl, es2017.typedarrays, es2018.asyncgenerator, es2018.asynciterable/esnext.asynciterable, es2018.intl, es2018.promise, es2018.regexp, es2019.array, es2019.object, es2019.string, es2019.symbol/esnext.symbol, es2020.bigint/esnext.bigint, es2020.date, es2020.promise, es2020.sharedmemory, es2020.string, es2020.symbol.wellknown, es2020.intl, es2020.number, es2021.promise/esnext.promise, es2021.string, es2021.weakref/esnext.weakref, es2021.intl, es2022.array/esnext.array, es2022.error, es2022.intl, es2022.object, es2022.sharedmemory, es2022.string/esnext.string, esnext.intl default: undefined --allowJs From d6f31f78ad419f5e5d493c4608b0dafbfcf51f0d Mon Sep 17 00:00:00 2001 From: Gabriel Grubba <70247653+Grubba27@users.noreply.github.com> Date: Mon, 6 Jun 2022 14:17:02 -0300 Subject: [PATCH 11/14] fix: Adjusted grammar changes in jsdoc --- src/lib/es2022.sharedmemory.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/es2022.sharedmemory.d.ts b/src/lib/es2022.sharedmemory.d.ts index b432dcbdbbcdb..ea56abe980bfe 100644 --- a/src/lib/es2022.sharedmemory.d.ts +++ b/src/lib/es2022.sharedmemory.d.ts @@ -1,6 +1,6 @@ interface Atomics { /** - * A non-blocking, asynchronous version of wait and usable on the main thread. + * A non-blocking, asynchronous version of wait which is usable on the main thread. * Waits asynchronously on a shared memory location and returns a Promise */ waitAsync(typedArray: BigInt64Array | Int32Array, index: number, value: bigint, timeout?: number): { async: false, value: "ok" | "not-equal" | "timed-out" } | { async: true, value: Promise<"ok" | "not-equal" | "timed-out"> }; From 2f13eba42c76d02f2e5c79060d6018ee8c7fecc9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 6 Jun 2022 20:49:55 +0300 Subject: [PATCH 12/14] fix(47821): skip nodes with export modifiers (#47829) --- src/services/refactors/convertExport.ts | 18 ++++++++++--- ...ort_namedToDefaultInModuleAugmentation1.ts | 26 +++++++++++++++++++ ...ort_namedToDefaultInModuleAugmentation2.ts | 18 +++++++++++++ 3 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation1.ts create mode 100644 tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation2.ts diff --git a/src/services/refactors/convertExport.ts b/src/services/refactors/convertExport.ts index 738731a5c8aca..0a40cf9542078 100644 --- a/src/services/refactors/convertExport.ts +++ b/src/services/refactors/convertExport.ts @@ -65,8 +65,8 @@ namespace ts.refactor { return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_export_statement) }; } - const exportingModuleSymbol = isSourceFile(exportNode.parent) ? exportNode.parent.symbol : exportNode.parent.parent.symbol; - + const checker = program.getTypeChecker(); + const exportingModuleSymbol = getExportingModuleSymbol(exportNode, checker); const flags = getSyntacticModifierFlags(exportNode) || ((isExportAssignment(exportNode) && !exportNode.isExportEquals) ? ModifierFlags.ExportDefault : ModifierFlags.None); const wasDefault = !!(flags & ModifierFlags.Default); @@ -75,7 +75,6 @@ namespace ts.refactor { return { error: getLocaleSpecificMessage(Diagnostics.This_file_already_has_a_default_export) }; } - const checker = program.getTypeChecker(); const noSymbolError = (id: Node) => (isIdentifier(id) && checker.getSymbolAtLocation(id)) ? undefined : { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_named_export) }; @@ -165,6 +164,7 @@ namespace ts.refactor { const checker = program.getTypeChecker(); const exportSymbol = Debug.checkDefined(checker.getSymbolAtLocation(exportName), "Export name should resolve to a symbol"); FindAllReferences.Core.eachExportReference(program.getSourceFiles(), checker, cancellationToken, exportSymbol, exportingModuleSymbol, exportName.text, wasDefault, ref => { + if (exportName === ref) return; const importingSourceFile = ref.getSourceFile(); if (wasDefault) { changeDefaultToNamedImport(importingSourceFile, ref, changes, exportName.text); @@ -262,4 +262,16 @@ namespace ts.refactor { function makeExportSpecifier(propertyName: string, name: string): ExportSpecifier { return factory.createExportSpecifier(/*isTypeOnly*/ false, propertyName === name ? undefined : factory.createIdentifier(propertyName), factory.createIdentifier(name)); } + + function getExportingModuleSymbol(node: Node, checker: TypeChecker) { + const parent = node.parent; + if (isSourceFile(parent)) { + return parent.symbol; + } + const symbol = parent.parent.symbol; + if (symbol.valueDeclaration && isExternalModuleAugmentation(symbol.valueDeclaration)) { + return checker.getMergedSymbol(symbol); + } + return symbol; + } } diff --git a/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation1.ts b/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation1.ts new file mode 100644 index 0000000000000..d1fc03349715e --- /dev/null +++ b/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation1.ts @@ -0,0 +1,26 @@ +/// + +// @Filename: /node_modules/@types/foo/index.d.ts +////export {}; +////declare module "foo" { +//// /*a*/export function foo(): void;/*b*/ +////} + +// @Filename: /b.ts +////import { foo } from "foo"; + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Convert export", + actionName: "Convert named export to default export", + actionDescription: "Convert named export to default export", + newContent: { + "/node_modules/@types/foo/index.d.ts": +`export {}; +declare module "foo" { + export default function foo(): void; +}`, + "/b.ts": +`import foo from "foo";` + } +}); diff --git a/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation2.ts b/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation2.ts new file mode 100644 index 0000000000000..e278769f568df --- /dev/null +++ b/tests/cases/fourslash/refactorConvertExport_namedToDefaultInModuleAugmentation2.ts @@ -0,0 +1,18 @@ +/// + +////export {}; +////declare module "foo" { +//// /*a*/export function func(): void;/*b*/ +////} + +goTo.select("a", "b"); +edit.applyRefactor({ + refactorName: "Convert export", + actionName: "Convert named export to default export", + actionDescription: "Convert named export to default export", + newContent: +`export {}; +declare module "foo" { + export default function func(): void; +}` +}); From 0d7fbbb415f90f70edc95c033f5d51f75fac4c08 Mon Sep 17 00:00:00 2001 From: Jack Bates Date: Mon, 6 Jun 2022 13:51:04 -0700 Subject: [PATCH 13/14] Use symbolic GitHub Actions Node.js versions (#49403) --- .github/workflows/accept-baselines-fix-lints.yaml | 6 +----- .github/workflows/ci.yml | 8 ++++++-- .github/workflows/new-release-branch.yaml | 5 +---- .github/workflows/nightly.yaml | 10 ++-------- .github/workflows/release-branch-artifact.yaml | 11 ++--------- .github/workflows/rich-navigation.yml | 2 -- .github/workflows/set-version.yaml | 5 +---- .github/workflows/sync-branch.yaml | 5 +---- .github/workflows/twoslash-repros.yaml | 11 ++++------- .github/workflows/update-lkg.yml | 6 +----- .github/workflows/update-package-lock.yaml | 3 --- 11 files changed, 19 insertions(+), 53 deletions(-) diff --git a/.github/workflows/accept-baselines-fix-lints.yaml b/.github/workflows/accept-baselines-fix-lints.yaml index 2662646cc05fe..d0196d1e29206 100644 --- a/.github/workflows/accept-baselines-fix-lints.yaml +++ b/.github/workflows/accept-baselines-fix-lints.yaml @@ -9,11 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use node version 14 - uses: actions/setup-node@v3 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ + - uses: actions/setup-node@v3 - name: Configure Git, Run Tests, Update Baselines, Apply Fixes run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b95b0481ed251..3ea0ee5a4eb82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,11 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + # Test the latest version of Node.js plus the last two LTS versions. + node-version: + - "*" + - lts/* + - lts/-1 steps: - uses: actions/checkout@v3 @@ -26,6 +30,7 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} + check-latest: true - name: Remove existing TypeScript run: | npm uninstall typescript --no-save @@ -47,4 +52,3 @@ jobs: - name: Validate the browser can import TypeScript run: gulp test-browser-integration - diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 90b8bbdf5efdb..fa1d0a070750d 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -9,10 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Use node version 14.x - uses: actions/setup-node@v3 - with: - node-version: 14.x + - uses: actions/setup-node@v3 - uses: actions/checkout@v2 with: fetch-depth: 5 diff --git a/.github/workflows/nightly.yaml b/.github/workflows/nightly.yaml index d255a324f7947..6333c75b4b052 100644 --- a/.github/workflows/nightly.yaml +++ b/.github/workflows/nightly.yaml @@ -15,11 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use node version 14 - uses: actions/setup-node@v3 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ + - uses: actions/setup-node@v3 - name: Setup and publish nightly run: | npm whoami @@ -30,6 +26,4 @@ jobs: gulp clean npm publish --tag next env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - CI: true - + NPM_TOKEN: ${{secrets.npm_token}} diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index 17bb3be4680d6..4e1578ecd460f 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -11,10 +11,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use node version 14 - uses: actions/setup-node@v3 - with: - node-version: 14 + - uses: actions/setup-node@v3 - name: Remove existing TypeScript run: | npm uninstall typescript --no-save @@ -23,10 +20,8 @@ jobs: run: | npm ci npm test - env: - CI: true - name: Adding playwright - run: npm install --no-save --no-package-lock playwright + run: npm install --no-save --no-package-lock playwright - name: Validate the browser can import TypeScript run: gulp test-browser-integration - name: LKG, clean, and pack @@ -35,8 +30,6 @@ jobs: gulp clean npm pack ./ mv typescript-*.tgz typescript.tgz - env: - CI: true - name: Upload built tarfile uses: actions/upload-artifact@v1 with: diff --git a/.github/workflows/rich-navigation.yml b/.github/workflows/rich-navigation.yml index 82ba9bf54f1df..1c955f5973461 100644 --- a/.github/workflows/rich-navigation.yml +++ b/.github/workflows/rich-navigation.yml @@ -20,8 +20,6 @@ jobs: fetch-depth: 5 - uses: actions/setup-node@v3 - with: - node-version: 14 - name: Install dependencies run: npm ci diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index 5b1338daff2aa..567fba84e030e 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -9,10 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Use node version 14.x - uses: actions/setup-node@v3 - with: - node-version: 14.x + - uses: actions/setup-node@v3 - uses: actions/checkout@v2 with: ref: ${{ github.event.client_payload.branch_name }} diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index fae67017c617b..2928d072348e3 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -14,10 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - name: Use node version 14.x - uses: actions/setup-node@v3 - with: - node-version: 14.x + - uses: actions/setup-node@v3 - uses: actions/checkout@v2 with: ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }} diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml index 36a97b49ac5ce..3ff59cf2e56e2 100644 --- a/.github/workflows/twoslash-repros.yaml +++ b/.github/workflows/twoslash-repros.yaml @@ -23,12 +23,11 @@ jobs: if: ${{ github.repository == 'microsoft/TypeScript' && !github.event.label && !github.event.inputs.bisect_issue }} runs-on: ubuntu-latest steps: - - name: Use node - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 - uses: microsoft/TypeScript-Twoslash-Repro-Action@master - with: + with: github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} - + bisect: if: ${{ github.event.label.name == 'Bisect Repro' || github.event.inputs.bisect_issue }} runs-on: ubuntu-latest @@ -37,9 +36,7 @@ jobs: with: fetch-depth: 0 - uses: actions/setup-node@v3 - with: - node-version: 16 - uses: microsoft/TypeScript-Twoslash-Repro-Action@master - with: + with: github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} bisect: ${{ github.event.issue.number || github.event.inputs.bisect_issue }} diff --git a/.github/workflows/update-lkg.yml b/.github/workflows/update-lkg.yml index cac9c6c4c0665..53e3aaa750aa8 100644 --- a/.github/workflows/update-lkg.yml +++ b/.github/workflows/update-lkg.yml @@ -9,11 +9,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Use node version 14 - uses: actions/setup-node@v3 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ + - uses: actions/setup-node@v3 - name: Configure Git and Update LKG run: | diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml index 1c54603f9ba1c..da64c80daccc8 100644 --- a/.github/workflows/update-package-lock.yaml +++ b/.github/workflows/update-package-lock.yaml @@ -15,9 +15,6 @@ jobs: steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 - with: - node-version: 14 - registry-url: https://registry.npmjs.org/ - name: Configure git and update package-lock.json run: | From 6330c1519da71da506c61786dd134d582f2d5cb8 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Mon, 6 Jun 2022 15:36:24 -0700 Subject: [PATCH 14/14] update baselines --- .../reference/reactJsxReactResolvedNodeNext.trace.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json b/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json index 7857b59fd0f8b..ac5303a7910d3 100644 --- a/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json +++ b/tests/baselines/reference/reactJsxReactResolvedNodeNext.trace.json @@ -147,5 +147,7 @@ "File 'package.json' does not exist according to earlier cached lookups.", "File '/package.json' does not exist according to earlier cached lookups.", "File 'package.json' does not exist according to earlier cached lookups.", + "File '/package.json' does not exist according to earlier cached lookups.", + "File 'package.json' does not exist according to earlier cached lookups.", "File '/package.json' does not exist according to earlier cached lookups." ] \ No newline at end of file