From 850548dbdda3beffab67ffa40e3ee85382859d91 Mon Sep 17 00:00:00 2001 From: Aliaksandr Yankouski Date: Tue, 10 Jul 2018 13:01:08 +0300 Subject: [PATCH] remove intl polyfilling --- packages/kbn-i18n/package.json | 5 ++--- packages/kbn-i18n/src/core/i18n/browser.js | 21 ------------------ packages/kbn-i18n/src/core/i18n/index.js | 5 ++--- .../kbn-i18n/src/core/i18n/intl_polyfill.js | 22 ------------------- packages/kbn-i18n/src/core/i18n/package.json | 4 ---- packages/kbn-i18n/yarn.lock | 4 ---- 6 files changed, 4 insertions(+), 57 deletions(-) delete mode 100644 packages/kbn-i18n/src/core/i18n/browser.js delete mode 100644 packages/kbn-i18n/src/core/i18n/intl_polyfill.js delete mode 100644 packages/kbn-i18n/src/core/i18n/package.json diff --git a/packages/kbn-i18n/package.json b/packages/kbn-i18n/package.json index 196fdbbb341b1..3ccb8d0149777 100644 --- a/packages/kbn-i18n/package.json +++ b/packages/kbn-i18n/package.json @@ -8,8 +8,8 @@ "private": true, "scripts": { "build": "yarn build:web && yarn build:node", - "build:web": "cross-env BABEL_ENV=web babel src --out-dir target/web --copy-files", - "build:node": "cross-env BABEL_ENV=node babel src --out-dir target/node --copy-files", + "build:web": "cross-env BABEL_ENV=web babel src --out-dir target/web", + "build:node": "cross-env BABEL_ENV=node babel src --out-dir target/node", "kbn:bootstrap": "yarn build", "kbn:watch": "yarn build --watch" }, @@ -21,7 +21,6 @@ }, "dependencies": { "accept-language-parser": "^1.5.0", - "intl": "^1.2.5", "intl-format-cache": "^2.1.0", "intl-messageformat": "^2.2.0", "intl-relativeformat": "^2.1.0", diff --git a/packages/kbn-i18n/src/core/i18n/browser.js b/packages/kbn-i18n/src/core/i18n/browser.js deleted file mode 100644 index af7c854ad979d..0000000000000 --- a/packages/kbn-i18n/src/core/i18n/browser.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ - -export { formats } from './formats'; -export * from './i18n'; diff --git a/packages/kbn-i18n/src/core/i18n/index.js b/packages/kbn-i18n/src/core/i18n/index.js index 451b02b670572..af7c854ad979d 100644 --- a/packages/kbn-i18n/src/core/i18n/index.js +++ b/packages/kbn-i18n/src/core/i18n/index.js @@ -17,6 +17,5 @@ * under the License. */ -import './intl_polyfill'; - -export * from './browser'; +export { formats } from './formats'; +export * from './i18n'; diff --git a/packages/kbn-i18n/src/core/i18n/intl_polyfill.js b/packages/kbn-i18n/src/core/i18n/intl_polyfill.js deleted file mode 100644 index f2ebe9c4725bc..0000000000000 --- a/packages/kbn-i18n/src/core/i18n/intl_polyfill.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * 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. - */ - -import Intl from 'intl'; - -global.Intl = Intl; diff --git a/packages/kbn-i18n/src/core/i18n/package.json b/packages/kbn-i18n/src/core/i18n/package.json deleted file mode 100644 index 7eacc60d3880b..0000000000000 --- a/packages/kbn-i18n/src/core/i18n/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "browser": "./browser.js", - "main": "./index.js" -} diff --git a/packages/kbn-i18n/yarn.lock b/packages/kbn-i18n/yarn.lock index 4334bdb65678f..820b3d356fa3c 100644 --- a/packages/kbn-i18n/yarn.lock +++ b/packages/kbn-i18n/yarn.lock @@ -1053,10 +1053,6 @@ intl-relativeformat@^2.0.0, intl-relativeformat@^2.1.0: dependencies: intl-messageformat "^2.0.0" -intl@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde" - invariant@^2.1.1, invariant@^2.2.2: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"