Make WordPress Core

Changeset 51146


Ignore:
Timestamp:
06/14/2021 11:16:27 PM (3 years ago)
Author:
desrosj
Message:

Build/Test Tools: Replace the deprecated @babel/polyfill.

This replaces the dependency of the deprecated @babel/polyfill package with the core-js package through @wordpress/babel-preset-default.

Previously, the file consisted of a generalized group of polyfills, and not all of them were required. This change allows the contents of this file to be built according to the exact needs as dictated by the @wordpress/babel-preset-default package, which takes into account the current browser support.

Props gziolo, youknowriad.
Fixes #52941.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/package-lock.json

    r51113 r51146  
    10861086                "@babel/helper-create-regexp-features-plugin": "^7.12.13",
    10871087                "@babel/helper-plugin-utils": "^7.12.13"
    1088             }
    1089         },
    1090         "@babel/polyfill": {
    1091             "version": "7.10.1",
    1092             "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.10.1.tgz",
    1093             "integrity": "sha512-TviueJ4PBW5p48ra8IMtLXVkDucrlOZAIZ+EXqS3Ot4eukHbWiqcn7DcqpA1k5PcKtmJ4Xl9xwdv6yQvvcA+3g==",
    1094             "requires": {
    1095                 "core-js": "^2.6.5",
    1096                 "regenerator-runtime": "^0.13.4"
    10971088            }
    10981089        },
     
    81718162            "version": "2.6.12",
    81728163            "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
    8173             "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ=="
     8164            "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
     8165            "dev": true
    81748166        },
    81758167        "core-js-compat": {
  • trunk/package.json

    r51113 r51146  
    2525    ],
    2626    "devDependencies": {
     27        "@wordpress/babel-preset-default": "6.2.0",
    2728        "@wordpress/custom-templated-path-webpack-plugin": "2.0.5",
    2829        "@wordpress/dependency-extraction-webpack-plugin": "3.1.4",
     
    7778    },
    7879    "dependencies": {
    79         "@babel/polyfill": "7.10.1",
    8080        "@wordpress/a11y": "3.1.1",
    8181        "@wordpress/annotations": "2.1.1",
  • trunk/tools/webpack/packages.js

    r51105 r51146  
    7474    const vendors = {
    7575        'lodash.js': 'lodash/lodash.js',
    76         'wp-polyfill.js': '@babel/polyfill/dist/polyfill.js',
     76        'wp-polyfill.js': '@wordpress/babel-preset-default/build/polyfill.js',
    7777        'wp-polyfill-fetch.js': 'whatwg-fetch/dist/fetch.umd.js',
    7878        'wp-polyfill-element-closest.js': 'element-closest/element-closest.js',
     
    8989    const minifiedVendors = {
    9090        'lodash.min.js': 'lodash/lodash.min.js',
    91         'wp-polyfill.min.js': '@babel/polyfill/dist/polyfill.min.js',
     91        'wp-polyfill.min.js': '@wordpress/babel-preset-default/build/polyfill.min.js',
    9292        'wp-polyfill-formdata.min.js': 'formdata-polyfill/formdata.min.js',
    9393        'wp-polyfill-url.min.js': 'core-js-url-browser/url.min.js',
Note: See TracChangeset for help on using the changeset viewer.