From c334d26359666e64356747d5691c4daa913ebabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Thu, 25 Jun 2020 10:14:31 -0400 Subject: [PATCH 1/2] add builtins assumptions --- docs/caveats.md | 12 ++++++++---- website/versioned_docs/version-6.26.3/caveats.md | 12 ++++++++---- website/versioned_docs/version-7.0.0/caveats.md | 12 ++++++++---- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/caveats.md b/docs/caveats.md index c7d9e17e7d..1bc2514ad2 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -10,14 +10,18 @@ Babel feature requirements by using [@babel/polyfill](polyfill.md). You may alternatively/selectively include what you need: -| Feature | Requirements | -| --------------------------- | ------------------------------------------------------------------------------------- | +| Feature | Requirements | +| --------------------------- | ------------------------------------------------------------------------------------------------------- | | Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) | -| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | -| Spread | `Array.from` | +| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | +| Spread | `Array.from` | There is also the `loose` option for some of these plugins. +## Built-ins + +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. + ## Classes Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed diff --git a/website/versioned_docs/version-6.26.3/caveats.md b/website/versioned_docs/version-6.26.3/caveats.md index 80ce8ad811..d8eea3b14a 100644 --- a/website/versioned_docs/version-6.26.3/caveats.md +++ b/website/versioned_docs/version-6.26.3/caveats.md @@ -11,14 +11,18 @@ Babel feature requirements by using [babel-polyfill](polyfill.md). You may alternatively/selectively include what you need: -| Feature | Requirements | -| --------------------------- | ------------------------------------------------------------------------------------- | +| Feature | Requirements | +| --------------------------- | ------------------------------------------------------------------------------------------------------- | | Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) | -| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | -| Spread | `Array.from` | +| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | +| Spread | `Array.from` | There is also the `loose` option for some of these plugins. +## Built-ins + +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. + ## Classes Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed diff --git a/website/versioned_docs/version-7.0.0/caveats.md b/website/versioned_docs/version-7.0.0/caveats.md index 901180062b..8b7702c635 100644 --- a/website/versioned_docs/version-7.0.0/caveats.md +++ b/website/versioned_docs/version-7.0.0/caveats.md @@ -11,14 +11,18 @@ Babel feature requirements by using [@babel/polyfill](polyfill.md). You may alternatively/selectively include what you need: -| Feature | Requirements | -| --------------------------- | ------------------------------------------------------------------------------------- | +| Feature | Requirements | +| --------------------------- | ------------------------------------------------------------------------------------------------------- | | Async functions, Generators | [regenerator runtime](https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime) | -| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | -| Spread | `Array.from` | +| Array destructuring, For Of | `Symbol`, `prototype[Symbol.iterator]` | +| Spread | `Array.from` | There is also the `loose` option for some of these plugins. +## Built-ins + +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. + ## Classes Built-in classes such as `Date`, `Array`, `DOM` etc cannot be properly subclassed From be90656f2dc2dae5b368a27a30b26ceee48fc6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hu=C3=A1ng=20J=C3=B9nli=C3=A0ng?= Date: Tue, 4 Aug 2020 16:57:24 -0400 Subject: [PATCH 2/2] Update docs/caveats.md Co-authored-by: Brian Ng --- docs/caveats.md | 2 +- website/versioned_docs/version-6.26.3/caveats.md | 2 +- website/versioned_docs/version-7.0.0/caveats.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/caveats.md b/docs/caveats.md index 1bc2514ad2..ebcd403a65 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -20,7 +20,7 @@ There is also the `loose` option for some of these plugins. ## Built-ins -Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant. ## Classes diff --git a/website/versioned_docs/version-6.26.3/caveats.md b/website/versioned_docs/version-6.26.3/caveats.md index d8eea3b14a..91b5c7c136 100644 --- a/website/versioned_docs/version-6.26.3/caveats.md +++ b/website/versioned_docs/version-6.26.3/caveats.md @@ -21,7 +21,7 @@ There is also the `loose` option for some of these plugins. ## Built-ins -Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant. ## Classes diff --git a/website/versioned_docs/version-7.0.0/caveats.md b/website/versioned_docs/version-7.0.0/caveats.md index 8b7702c635..88e0558923 100644 --- a/website/versioned_docs/version-7.0.0/caveats.md +++ b/website/versioned_docs/version-7.0.0/caveats.md @@ -21,7 +21,7 @@ There is also the `loose` option for some of these plugins. ## Built-ins -Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others) are not modified in a spec-incompliant way. That said, Babel still accepts proper polyfills of built-ins. +Babel assumes that built-ins (e.g. `Array`, `WeakMap` and others), if polyfilled, are modified in a manner that is spec-compliant. ## Classes