Skip to content

Commit

Permalink
Bumped babel version. (#821)
Browse files Browse the repository at this point in the history
* Bumped babel version. Adjusted babel config. Refactored unit test that started failing after bump.

Signed-off-by: AWSHurneyt <[email protected]>

* Updated yarn file.

Signed-off-by: AWSHurneyt <[email protected]>

---------

Signed-off-by: AWSHurneyt <[email protected]>
(cherry picked from commit 598b086)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Nov 20, 2023
1 parent 2774ec2 commit aa28c09
Show file tree
Hide file tree
Showing 4 changed files with 565 additions and 193 deletions.
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ module.exports = {
require('@babel/preset-typescript'),
],
plugins: [
require('@babel/plugin-proposal-class-properties'),
require('@babel/plugin-proposal-object-rest-spread'),
require('@babel/plugin-transform-class-properties'),
require('@babel/plugin-transform-object-rest-spread'),
require('@babel/plugin-transform-modules-commonjs'),
],
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.16.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.9",
"@elastic/elastic-eslint-config-kibana": "link:../../packages/opensearch-eslint-config-opensearch-dashboards",
"@elastic/eslint-import-resolver-kibana": "link:../../packages/osd-eslint-import-resolver-opensearch-dashboards",
"cypress": "^6.0.0",
Expand Down
2 changes: 1 addition & 1 deletion public/utils/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const getDigitId = (length = 6) =>

// Assumes that values is an array of objects with "name" inside
export const getUniqueName = (values, prefix) => {
const lastValue = values.at(-1);
const lastValue = _.last(values);
const lastName = lastValue ? lastValue.name : '';
const lastDigit = Number.parseInt(lastName.match(/\d+$/)?.[0] || 0, 10);

Expand Down
Loading

0 comments on commit aa28c09

Please sign in to comment.