Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Revert "[kbn/ui-shared-deps] include polyfills, required by some deps (
Browse files Browse the repository at this point in the history
…elastic#54667)"

This reverts commit 4456d4d.
  • Loading branch information
spalger committed Apr 7, 2020
1 parent dadd76b commit 616779c
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 42 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
"compare-versions": "3.5.1",
"core-js": "^3.6.4",
"css-loader": "^3.4.2",
"custom-event-polyfill": "^0.3.0",
"d3": "3.5.17",
"d3-cloud": "1.2.5",
"deep-freeze-strict": "^1.1.1",
Expand Down
3 changes: 0 additions & 3 deletions packages/kbn-ui-shared-deps/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
* under the License.
*/

// import global polyfills before everything else
require('./polyfills');

// must load before angular
export const Jquery = require('jquery');
window.$ = window.jQuery = Jquery;
Expand Down
8 changes: 1 addition & 7 deletions packages/kbn-ui-shared-deps/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@
"@kbn/dev-utils": "1.0.0",
"@kbn/i18n": "1.0.0",
"@yarnpkg/lockfile": "^1.1.0",
"abortcontroller-polyfill": "^1.3.0",
"angular": "^1.7.9",
"core-js": "^3.2.1",
"css-loader": "^2.1.1",
"custom-event-polyfill": "^0.3.0",
"del": "^5.1.0",
"jquery": "^3.4.1",
"mini-css-extract-plugin": "0.8.0",
Expand All @@ -30,9 +27,6 @@
"react-intl": "^2.8.0",
"react": "^16.12.0",
"read-pkg": "^5.2.0",
"regenerator-runtime": "^0.13.3",
"symbol-observable": "^1.2.0",
"webpack": "4.41.0",
"whatwg-fetch": "^3.0.0"
"webpack": "4.41.0"
}
}
26 changes: 0 additions & 26 deletions packages/kbn-ui-shared-deps/polyfills.js

This file was deleted.

9 changes: 9 additions & 0 deletions src/legacy/core_plugins/tests_bundle/tests_entry_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ export const createTestEntryTemplate = defaultUiSettings => bundle => `
*
*/
// import global polyfills before everything else
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'custom-event-polyfill';
import 'whatwg-fetch';
import 'abortcontroller-polyfill';
import 'childnode-remove-polyfill';
import fetchMock from 'fetch-mock/es5/client';
import Symbol_observable from 'symbol-observable';
import { CoreSystem } from '__kibanaCore__';
// Fake uiCapabilities returned to Core in browser tests
Expand Down
8 changes: 8 additions & 0 deletions src/legacy/ui/ui_bundles/app_entry_template.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ export const appEntryTemplate = bundle => `
* context: ${bundle.getContext()}
*/
// import global polyfills
import Symbol_observable from 'symbol-observable';
import 'core-js/stable';
import 'regenerator-runtime/runtime';
import 'custom-event-polyfill';
import 'whatwg-fetch';
import 'abortcontroller-polyfill';
import 'childnode-remove-polyfill';
${apmImport()}
import { i18n } from '@kbn/i18n';
import { CoreSystem } from '__kibanaCore__'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
/* eslint-disable @kbn/eslint/require-license-header */
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/* @notice
* This product bundles childnode-remove which is available under a
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6520,11 +6520,6 @@ abort-controller@^2.0.3:
dependencies:
event-target-shim "^5.0.0"

abortcontroller-polyfill@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.3.0.tgz#de69af32ae926c210b7efbcc29bf644ee4838b00"
integrity sha512-lbWQgf+eRvku3va8poBlDBO12FigTQr9Zb7NIjXrePrhxWVKdCP2wbDl1tLDaYa18PWTom3UEWwdH13S46I+yA==

abortcontroller-polyfill@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.4.0.tgz#0d5eb58e522a461774af8086414f68e1dda7a6c4"
Expand Down

0 comments on commit 616779c

Please sign in to comment.