From d7a8dd486e7060a6a4146c2ecf91bfb54dceb814 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 13 Mar 2024 08:22:06 -0500
Subject: [PATCH] Update polyfills (main) (#178576)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [core-js](https://togithub.com/zloirock/core-js)
([source](https://togithub.com/zloirock/core-js/tree/HEAD/packages/core-js))
| [`^3.34.0` ->
`^3.36.0`](https://renovatebot.com/diffs/npm/core-js/3.35.0/3.36.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/core-js/3.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/core-js/3.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/core-js/3.35.0/3.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/core-js/3.35.0/3.36.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[web-streams-polyfill](https://togithub.com/MattiasBuelens/web-streams-polyfill)
| [`^3.2.1` ->
`^4.0.0`](https://renovatebot.com/diffs/npm/web-streams-polyfill/3.2.1/4.0.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/web-streams-polyfill/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/web-streams-polyfill/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/web-streams-polyfill/3.2.1/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/web-streams-polyfill/3.2.1/4.0.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
---
### Release Notes
zloirock/core-js (core-js)
###
[`v3.36.0`](https://togithub.com/zloirock/core-js/blob/HEAD/CHANGELOG.md#3360---20240214)
[Compare
Source](https://togithub.com/zloirock/core-js/compare/v3.35.1...v3.36.0)
- [`ArrayBuffer.prototype.transfer` and friends
proposal](https://togithub.com/tc39/proposal-arraybuffer-transfer):
- Built-ins:
- `ArrayBuffer.prototype.detached`
- `ArrayBuffer.prototype.transfer`
- `ArrayBuffer.prototype.transferToFixedLength`
- Moved to stable ES, [Febrary 2024 TC39
meeting](https://togithub.com/tc39/proposals/commit/c84d3dde9a7d8ee4410ffa28624fc4c39247faca)
- Added `es.` namespace modules, `/es/` and `/stable/` namespaces
entries
- [`Uint8Array` to / from base64 and hex
proposal](https://togithub.com/tc39/proposal-arraybuffer-base64):
- Methods:
- `Uint8Array.fromBase64`
- `Uint8Array.fromHex`
- `Uint8Array.prototype.toBase64`
- `Uint8Array.prototype.toHex`
- Moved to stage 3, [Febrary 2024 TC39
meeting](https://togithub.com/tc39/proposals/commit/278ab28b8f849f2110d770e7b034b7ef59f14daf)
- Added `/actual/` namespace entries
- Skipped adding new methods of writing to existing arrays to
clarification some moments
- [`Promise.try`
proposal](https://togithub.com/tc39/proposal-promise-try) has been
resurrected and moved to stage 2, [Febrary 2024 TC39
meeting](https://togithub.com/tc39/proposal-promise-try/issues/15)
- Added an entry point for [the new TC39 proposals
stage](https://tc39.es/process-document/) - `core-js/stage/2.7` - still
empty
- Fixed regression in `Set.prototype.intersection` feature detection
- Fixed a missed check in `Array.prototype.{ indexOf, lastIndexOf,
includes }`,
[#1325](https://togithub.com/zloirock/core-js/issues/1325),
thanks [**@minseok-choe**](https://togithub.com/minseok-choe)
- Fixed a missed check in `Array.prototype.{ reduce, reduceRight }`,
[#1327](https://togithub.com/zloirock/core-js/issues/1327),
thanks [**@minseok-choe**](https://togithub.com/minseok-choe)
- Fixed `Array.from` and some other methods with proxy targets,
[#1322](https://togithub.com/zloirock/core-js/issues/1322),
thanks [**@minseok-choe**](https://togithub.com/minseok-choe)
- Fixed dependencies loading for modules from
`ArrayBuffer.prototype.transfer` and friends proposal in some specific
cases in IE10-
- Dropped context workaround from collection static methods entries
since with current methods semantic it's no longer required
- Added instance methods polyfills to entries of collections static
methods that produce collection instances
- Added missed `Date.prototype.toJSON` to `JSON.stringify` entries
dependencies
- Added debugging info in some missed cases
- Compat data improvements:
- [`{ Map, Object
}.groupBy`](https://togithub.com/tc39/proposal-array-grouping),
[`Promise.withResolvers`](https://togithub.com/tc39/proposal-promise-with-resolvers),
[`ArrayBuffer.prototype.transfer` and
friends](https://togithub.com/tc39/proposal-arraybuffer-transfer) marked
as supported from [Safari
17.4](https://developer.apple.com/documentation/safari-release-notes/safari-17\_4-release-notes#JavaScript)
- [New `Set` methods](https://togithub.com/tc39/proposal-set-methods)
[fixed](https://bugs.chromium.org/p/v8/issues/detail?id=14559#c4) and
marked as supported from V8 ~ Chrome 123
- Added [Deno 1.40](https://deno.com/blog/v1.40) compat data mapping
- `Symbol.metadata` marked as supported from [Deno
1.40.4](https://togithub.com/denoland/deno/releases/tag/v1.40.4)
- Updated Electron 30 compat data mapping
###
[`v3.35.1`](https://togithub.com/zloirock/core-js/blob/HEAD/CHANGELOG.md#3351---20240121)
[Compare
Source](https://togithub.com/zloirock/core-js/compare/v3.35.0...v3.35.1)
- Fixed internal `ToLength` operation with bigints,
[#1318](https://togithub.com/zloirock/core-js/issues/1318)
- Removed significant redundant code from `String#split` polyfill
- Fixed setting names of methods with symbol keys in some old engines
- Minor fix of prototype methods export logic in the pure version
- Compat data improvements:
- [`Iterator` helpers
proposal](https://togithub.com/tc39/proposal-iterator-helpers) methods
marked as supported from V8 ~ Chrome 122
- Note that V8 ~ Chrome 122 add [`Set`
methods](https://togithub.com/tc39/proposal-set-methods), but they have
[a bug](https://bugs.chromium.org/p/v8/issues/detail?id=14559) [similar
to Safari](https://bugs.webkit.org/show_bug.cgi?id=267494)
- `self` marked as fixed from Bun 1.0.22
- [`SuppressedError` and `Symbol.{ dispose , asyncDispose
}`](https://togithub.com/tc39/proposal-explicit-resource-management)
marked as [supported from Bun
1.0.23](https://bun.sh/blog/bun-v1.0.23#resource-management-is-now-supported)
- Added Oculus Quest Browser 31 compat data mapping
- Updated Electron 29 and added Electron 30 compat data mapping
MattiasBuelens/web-streams-polyfill
(web-streams-polyfill)
###
[`v4.0.0`](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/HEAD/CHANGELOG.md#400-2024-02-28)
[Compare
Source](https://togithub.com/MattiasBuelens/web-streams-polyfill/compare/v3.3.3...v4.0.0)
- 💥 Rework the list of variants to have more modern defaults.
The table below shows how to upgrade your v3 import to their equivalent
v4 import.
See the [migration
guide](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/master/MIGRATING.md)
for more information.
([#82](https://togithub.com/MattiasBuelens/web-streams-polyfill/issues/82),
[#139](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/139))
- 💥 Remove the ES2018 variant, in favor of the ES2015 variant.
- 💥 Switch to [subpath
exports](https://nodejs.org/api/packages.html#subpath-exports) for
variants.
- Node 12 or higher is required to `import` or `require()` a variant.
- When using TypeScript, version 4.7 or higher is now required.
Additionally,
[`moduleResolution`](https://www.typescriptlang.org/tsconfig#moduleResolution)
must be set to `"node16"`, `"nodenext"` or `"bundler"`.
- 🚀 Support [importing as ESM in Node](https://nodejs.org/api/esm.html).
- 💅 Minify all code in the published package, to reduce the download
size.
- 💅 Rework `ReadableStream.from()` implementation to avoid depending on
`async function*` down-leveling for ES5.
([#144](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/144))
| v3 import | v4 import | description |
| --- | --- | --- |
| `web-streams-polyfill` | `web-streams-polyfill/polyfill/es5` | ES5+
polyfill |
| `web-streams-polyfill/es6` | `web-streams-polyfill/polyfill` | ES2015+
polyfill |
| `web-streams-polyfill/es2018` | `web-streams-polyfill/polyfill` |
ES2015+ polyfill |
| `web-streams-polyfill/ponyfill` | `web-streams-polyfill/es5` | ES5+
ponyfill |
| `web-streams-polyfill/ponyfill/es6` | `web-streams-polyfill` | ES2015+
ponyfill |
| `web-streams-polyfill/ponyfill/es2018` | `web-streams-polyfill` |
ES2015+ ponyfill |
###
[`v3.3.3`](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/HEAD/CHANGELOG.md#333-2024-02-16)
[Compare
Source](https://togithub.com/MattiasBuelens/web-streams-polyfill/compare/v3.3.2...v3.3.3)
- 🐛 Fix `ReadableStream` to match TypeScript's `AsyncIterable` type.
([#141](https://togithub.com/MattiasBuelens/web-streams-polyfill/issues/141),
[#142](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/142))
###
[`v3.3.2`](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/HEAD/CHANGELOG.md#332-2024-01-04)
[Compare
Source](https://togithub.com/MattiasBuelens/web-streams-polyfill/compare/v3.3.1...v3.3.2)
- 🐛 Fix bad publish to npm.
###
[`v3.3.1`](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/HEAD/CHANGELOG.md#331-2024-01-04)
[Compare
Source](https://togithub.com/MattiasBuelens/web-streams-polyfill/compare/v3.3.0...v3.3.1)
- 🐛 Revert `engines` bump in `package.json`.
([#137](https://togithub.com/MattiasBuelens/web-streams-polyfill/issues/137),
[#138](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/138))
- 🐛 Re-introduce support for TypeScript 3.5 and below.
([#137](https://togithub.com/MattiasBuelens/web-streams-polyfill/issues/137),
[#138](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/138))
###
[`v3.3.0`](https://togithub.com/MattiasBuelens/web-streams-polyfill/blob/HEAD/CHANGELOG.md#330-2024-01-04)
[Compare
Source](https://togithub.com/MattiasBuelens/web-streams-polyfill/compare/v3.2.1...v3.3.0)
- 🚀 Added global augmentations for `ReadableStream` to the polyfill's
type definitions.
([#130](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/130))
- This allows TypeScript users to use new methods such as
`ReadableStream.prototype[Symbol.asyncIterator]()`,
even when TypeScript doesn't yet have a built-in type definition for
them.
- \~~💥 The type definitions now require TypeScript 3.6 or higher.
([#130](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/130))~~
(Reverted in version 3.3.1)
- 👓 Align with [spec version
`4dc123a`](https://togithub.com/whatwg/streams/tree/4dc123a6e7f7ba89a8c6a7975b021156f39cab52/)
([#115](https://togithub.com/MattiasBuelens/web-streams-polyfill/issues/115),
[#134](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/134))
- Added `ReadableStream.from(asyncIterable)`, which creates a
`ReadableStream` wrapping the given iterable or async iterable.
This can also be used to wrap a native `ReadableStream` (e.g. a
`Response.body` from `fetch()`),
even if the native `ReadableStream` doesn't yet support async iteration.
([#135](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/135))
- Added `Transformer.cancel` method, which is called when the readable
side of a `TransformStream` is cancelled or when its writable side is
aborted.
- Added `min` option to `ReadableStreamBYOBReader.read(view, options)`.
- Added support for `AbortSignal.reason` when aborting a pipe.
- 🚀 Buffers passed to `ReadableStreamBYOBReader.read(view)` will now be
correctly
[transferred](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer#transferring_arraybuffers)
if either `ArrayBuffer.prototype.transfer()` or `structuredClone()` is
available.
([#136](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/136))
- 🐛 Prevent [warnings from
Bluebird](http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it)
about a promise being created within a handler but not being returned
from a handler.
([#131](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/131))
- 🏠 Improve internal `DOMException` polyfill.
([#133](https://togithub.com/MattiasBuelens/web-streams-polyfill/pull/133))
---
### Configuration
📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).
🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.
♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.
👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.
---
- [ ] If you want to rebase/retry this PR, check
this box
---
This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski
---
package.json | 4 ++--
packages/kbn-test/src/jest/setup/setup_test.js | 5 ++++-
yarn.lock | 13 +++++++++----
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/package.json b/package.json
index fb9f0e9cd7706..75674030faed9 100644
--- a/package.json
+++ b/package.json
@@ -930,7 +930,7 @@
"compare-versions": "3.5.1",
"constate": "^3.3.2",
"copy-to-clipboard": "^3.0.8",
- "core-js": "^3.34.0",
+ "core-js": "^3.36.0",
"cronstrue": "^1.51.0",
"css-box-model": "^1.2.1",
"css.escape": "^1.5.1",
@@ -1684,7 +1684,7 @@
"val-loader": "^1.1.1",
"vinyl-fs": "^4.0.0",
"watchpack": "^1.6.0",
- "web-streams-polyfill": "^3.2.1",
+ "web-streams-polyfill": "^4.0.0",
"webpack": "^4.41.5",
"webpack-bundle-analyzer": "^4.5.0",
"webpack-cli": "^4.10.0",
diff --git a/packages/kbn-test/src/jest/setup/setup_test.js b/packages/kbn-test/src/jest/setup/setup_test.js
index ee386f894a71e..5179c350b2f8e 100644
--- a/packages/kbn-test/src/jest/setup/setup_test.js
+++ b/packages/kbn-test/src/jest/setup/setup_test.js
@@ -13,7 +13,10 @@
import 'jest-styled-components';
import '@testing-library/jest-dom';
-import 'web-streams-polyfill/es6'; // ReadableStream polyfill
+
+// uses subpath exports
+// eslint-disable-next-line @kbn/imports/no_unresolvable_imports
+import 'web-streams-polyfill/polyfill'; // ReadableStream polyfill
/**
* Removed in Jest 27/jsdom, used in some transitive dependencies
diff --git a/yarn.lock b/yarn.lock
index 86a6ff8155a0e..1104ad74b7308 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -13975,10 +13975,10 @@ core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.9:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==
-core-js@^3.0.4, core-js@^3.32.1, core-js@^3.34.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3:
- version "3.35.0"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.35.0.tgz#58e651688484f83c34196ca13f099574ee53d6b4"
- integrity sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg==
+core-js@^3.0.4, core-js@^3.32.1, core-js@^3.36.0, core-js@^3.6.5, core-js@^3.8.2, core-js@^3.8.3:
+ version "3.36.0"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.36.0.tgz#e752fa0b0b462a0787d56e9d73f80b0f7c0dde68"
+ integrity sha512-mt7+TUBbTFg5+GngsAxeKBTl5/VS0guFeJacYge9OmHb+m058UwwIm41SE9T4Den7ClatV57B6TYTuJ0CX1MAw==
core-util-is@1.0.2, core-util-is@^1.0.2, core-util-is@~1.0.0:
version "1.0.2"
@@ -31350,6 +31350,11 @@ web-streams-polyfill@^3.0.3, web-streams-polyfill@^3.2.0, web-streams-polyfill@^
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz#71c2718c52b45fd49dbeee88634b3a60ceab42a6"
integrity sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==
+web-streams-polyfill@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-4.0.0.tgz#74cedf168339ee6e709532f76c49313a8c7acdac"
+ integrity sha512-0zJXHRAYEjM2tUfZ2DiSOHAa2aw1tisnnhU3ufD57R8iefL+DcdJyRBRyJpG+NUimDgbTI/lH+gAE1PAvV3Cgw==
+
web-streams-polyfill@~3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/web-streams-polyfill/-/web-streams-polyfill-3.0.3.tgz#f49e487eedeca47a207c1aee41ee5578f884b42f"