Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Updates babel dependencies for regenerator runtime, removes usage of …
Browse files Browse the repository at this point in the history
…defaultsTo (#74) (#75)
  • Loading branch information
dbbaughe authored Jan 31, 2020
1 parent 3f9327a commit bc3c153
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 21 deletions.
6 changes: 5 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
// Alternative to install them locally in node_modules
module.exports = {
presets: [require("@babel/preset-env"), require("@babel/preset-react"), require("@babel/preset-typescript")],
plugins: [require("@babel/plugin-proposal-class-properties"), require("@babel/plugin-proposal-object-rest-spread")],
plugins: [
[require("@babel/plugin-transform-runtime"), { regenerator: true }],
require("@babel/plugin-proposal-class-properties"),
require("@babel/plugin-proposal-object-rest-spread"),
],
};
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import { resolve } from "path";
import { existsSync } from "fs";
import "core-js/stable";
import "regenerator-runtime/runtime";

import { createISMCluster } from "./server/clusters";
import { PolicyService, ManagedIndexService, IndexService } from "./server/services";
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"eslint-utils": "^1.4.2"
},
"dependencies": {
"core-js": "^3.4.8",
"query-string": "^6.8.1",
"regenerator-runtime": "^0.13.3"
"@babel/runtime": "^7.8.4",
"query-string": "^6.8.1"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.7.4",
"@babel/plugin-proposal-object-rest-spread": "^7.7.4",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.7.6",
"@babel/preset-react": "^7.7.4",
"@babel/preset-typescript": "^7.3.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class ManagedIndices extends Component<ManagedIndicesProps, Manag
truncateText: false,
width: "150px",
// @ts-ignore
render: (state: string) => _.defaultTo(state, DEFAULT_EMPTY_DATA),
render: (state: string) => state || DEFAULT_EMPTY_DATA,
},
{
field: "managedIndexMetaData.action.name",
Expand All @@ -119,7 +119,7 @@ export default class ManagedIndices extends Component<ManagedIndicesProps, Manag
truncateText: false,
width: "150px",
// @ts-ignore
render: (action: string) => _.defaultTo(ACTIONS[action], DEFAULT_EMPTY_DATA),
render: (action: string) => ACTIONS[action] || DEFAULT_EMPTY_DATA,
},
{
field: "managedIndexMetaData.info",
Expand Down Expand Up @@ -309,13 +309,11 @@ export default class ManagedIndices extends Component<ManagedIndicesProps, Manag

const isRetryDisabled =
!selectedItems.length ||
selectedItems.some(
(item): boolean => {
if (!item.managedIndexMetaData) return true;
const { retryInfo, action } = item.managedIndexMetaData;
return !(retryInfo && retryInfo.failed) && !(action && action.failed);
}
);
selectedItems.some((item): boolean => {
if (!item.managedIndexMetaData) return true;
const { retryInfo, action } = item.managedIndexMetaData;
return !(retryInfo && retryInfo.failed) && !(action && action.failed);
});

const actions = [
{
Expand Down
52 changes: 46 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@
dependencies:
"@babel/types" "^7.7.4"

"@babel/helper-module-imports@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz#7fe39589b39c016331b6b8c3f441e8f0b1419498"
integrity sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==
dependencies:
"@babel/types" "^7.8.3"

"@babel/helper-module-transforms@^7.7.4", "@babel/helper-module-transforms@^7.7.5":
version "7.7.5"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.7.5.tgz#d044da7ffd91ec967db25cd6748f704b6b244835"
Expand Down Expand Up @@ -232,6 +239,11 @@
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250"
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==

"@babel/helper-plugin-utils@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz#9ea293be19babc0f52ff8ca88b34c3611b208670"
integrity sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==

"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
version "7.5.5"
resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.5.5.tgz#0aa6824f7100a2e0e89c1527c23936c152cab351"
Expand Down Expand Up @@ -679,6 +691,16 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-transform-runtime@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.8.3.tgz#c0153bc0a5375ebc1f1591cb7eea223adea9f169"
integrity sha512-/vqUt5Yh+cgPZXXjmaG9NT8aVfThKk7G4OqkVhrXqwsC5soMn/qTCxs36rZ2QFhpfTJcjw4SNDIZ4RUb8OL4jQ==
dependencies:
"@babel/helper-module-imports" "^7.8.3"
"@babel/helper-plugin-utils" "^7.8.3"
resolve "^1.8.1"
semver "^5.5.1"

"@babel/plugin-transform-shorthand-properties@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.7.4.tgz#74a0a9b2f6d67a684c6fbfd5f0458eb7ba99891e"
Expand Down Expand Up @@ -816,6 +838,13 @@
dependencies:
regenerator-runtime "^0.13.2"

"@babel/runtime@^7.8.4":
version "7.8.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.8.4.tgz#d79f5a2040f7caa24d53e563aad49cbc05581308"
integrity sha512-neAp3zt80trRVBI1x0azq6c57aNBqYZH8KhMm3TaB7wEI5Q4A2SHfBHE8w9gOhI/lrqxtEbXZgQIrHP+wvSGwQ==
dependencies:
regenerator-runtime "^0.13.2"

"@babel/template@^7.1.0":
version "7.4.4"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237"
Expand Down Expand Up @@ -882,6 +911,15 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@babel/types@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.8.3.tgz#5a383dffa5416db1b73dedffd311ffd0788fb31c"
integrity sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==
dependencies:
esutils "^2.0.2"
lodash "^4.17.13"
to-fast-properties "^2.0.0"

"@elastic/elasticsearch@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@elastic/elasticsearch/-/elasticsearch-7.2.0.tgz#c200090b3164733affc960c6e09a8c650dc7a45a"
Expand Down Expand Up @@ -2135,11 +2173,6 @@ core-js-compat@^3.4.7:
browserslist "^4.8.2"
semver "^6.3.0"

core-js@^3.4.8:
version "3.4.8"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.8.tgz#e0fc0c61f2ef90cbc10c531dbffaa46dfb7152dd"
integrity sha512-b+BBmCZmVgho8KnBUOXpvlqEMguko+0P+kXCwD4vIprsXC6ht1qgPxtb1OK6XgSlrySF71wkwBQ0Hv695bk9gQ==

[email protected], core-util-is@~1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
Expand Down Expand Up @@ -5517,7 +5550,7 @@ regenerate@^1.4.0:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11"
integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==

regenerator-runtime@^0.13.2, regenerator-runtime@^0.13.3:
regenerator-runtime@^0.13.2:
version "0.13.3"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.3.tgz#7cf6a77d8f5c6f60eb73c5fc1955b2ceb01e6bf5"
integrity sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw==
Expand Down Expand Up @@ -5682,6 +5715,13 @@ resolve@^1.3.2:
dependencies:
path-parse "^1.0.6"

resolve@^1.8.1:
version "1.15.0"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.0.tgz#1b7ca96073ebb52e741ffd799f6b39ea462c67f5"
integrity sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==
dependencies:
path-parse "^1.0.6"

restore-cursor@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
Expand Down

0 comments on commit bc3c153

Please sign in to comment.