Skip to content

Commit

Permalink
Support new proposals corejs3 polyfills (#99)
Browse files Browse the repository at this point in the history
* support new proposals

* update test fixtures

* address review comments

* Add common iterators to Iterator dependencies

* fix JSON stringify polyfill descriptors

* add CommonIterators to (Async)Iterator.from

* support es.string.substr and add es.regexp.exec to matchAll/replaceAll

* add es.regexp.test support

* chore: generate shippedProposals from corejs3 compat data

* support Reflect[@@toStringTag]

tc39/ecma262#2057

* fix typo

* update core-js-compat to 3.17.0

* add global Reflect dependencies

* ignore shipped proposals

* fix: use string version in test fixtures

* update to core-js-compat 3.17.1

* add annex b features

* remove type array instance methods

They are supported in constructor dependencies

* add iterator dependencies to iterator helpers

* fix object.at not polyfilled in pure mode

* esnext.array.unique-by depends on es.map

* chore: update core-js-compat to 3.18.0

* feat: support Array.fromAsync

* Update packages/babel-plugin-polyfill-corejs3/test/check-builtin-definitions.test.js
  • Loading branch information
JLHwung authored Oct 8, 2021
1 parent fa4f9f3 commit a537aa1
Show file tree
Hide file tree
Showing 38 changed files with 494 additions and 117 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ packages/*/test/fixtures/**/input.*
packages/*/test/fixtures/**/exec.*
packages/*/test/fixtures/**/output.*
packages/babel-plugin-polyfill-corejs2/data/*
packages/babel-plugin-polyfill-corejs3/src/shipped-proposals.js
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"private": true,
"license": "MIT",
"scripts": {
"build": "yarn build-es-shims-data && gulp build && gulp bundle",
"build": "yarn build-es-shims-data && yarn build-corejs3-shipped-proposals && gulp build && gulp bundle",
"build-corejs3-shipped-proposals": "node ./scripts/build-corejs3-shipped-proposals.mjs",
"build-es-shims-data": "./scripts/download-compat-table.sh && node ./scripts/build-es-shims-data",
"clean": "rimraf packages/*/lib packages/*/esm",
"clean-all": "yarn clean && rimraf packages/*/node_modules node_modules",
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-polyfill-corejs3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
"dependencies": {
"@babel/helper-define-polyfill-provider": "workspace:^0.2.2",
"core-js-compat": "^3.16.2"
"core-js-compat": "^3.18.0"
},
"devDependencies": {
"@babel/core": "^7.13.0",
Expand Down
Loading

0 comments on commit a537aa1

Please sign in to comment.