Skip to content

Commit

Permalink
Merge branch 'master' into bazel/timelion-grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine committed Sep 13, 2021
2 parents 0e622b5 + f9f9070 commit ea45aee
Show file tree
Hide file tree
Showing 40 changed files with 1,295 additions and 630 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"**/pdfkit/crypto-js": "4.0.0",
"**/react-syntax-highlighter": "^15.3.1",
"**/react-syntax-highlighter/**/highlight.js": "^10.4.1",
"**/request": "^2.88.2",
"**/trim": "1.0.1",
"**/typescript": "4.1.3",
"**/underscore": "^1.13.1"
Expand Down Expand Up @@ -369,7 +368,6 @@
"regenerator-runtime": "^0.13.3",
"remark-parse": "^8.0.3",
"remark-stringify": "^9.0.0",
"request": "^2.88.0",
"require-in-the-middle": "^5.0.2",
"reselect": "^4.0.0",
"resize-observer-polyfill": "^1.5.0",
Expand Down Expand Up @@ -607,7 +605,6 @@
"@types/recompose": "^0.30.6",
"@types/reduce-reducers": "^1.0.0",
"@types/redux-actions": "^2.6.1",
"@types/request": "^2.48.2",
"@types/seedrandom": ">=2.0.0 <4.0.0",
"@types/selenium-webdriver": "^4.0.9",
"@types/semver": "^7",
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/src/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ export const KbnStd = require('@kbn/std');
export const SaferLodashSet = require('@elastic/safer-lodash-set');
export const RisonNode = require('rison-node');
export const History = require('history');
export const Classnames = require('classnames');
1 change: 1 addition & 0 deletions packages/kbn-ui-shared-deps/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ exports.externals = {
'@elastic/safer-lodash-set': '__kbnSharedDeps__.SaferLodashSet',
'rison-node': '__kbnSharedDeps__.RisonNode',
history: '__kbnSharedDeps__.History',
classnames: '__kbnSharedDeps__.Classnames',
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,23 @@ describe('migration v2', () => {
.getTypeRegistry()
.getAllTypes()
.reduce((versionMap, type) => {
if (type.migrations) {
const migrationsMap =
typeof type.migrations === 'function' ? type.migrations() : type.migrations;
const highestVersion = Object.keys(migrationsMap).sort(Semver.compare).reverse()[0];
const { name, migrations, convertToMultiNamespaceTypeVersion } = type;
if (migrations || convertToMultiNamespaceTypeVersion) {
const migrationsMap = typeof migrations === 'function' ? migrations() : migrations;
const migrationsKeys = migrationsMap ? Object.keys(migrationsMap) : [];
if (convertToMultiNamespaceTypeVersion) {
// Setting this option registers a conversion migration that is reflected in the object's `migrationVersions` field
migrationsKeys.push(convertToMultiNamespaceTypeVersion);
}
const highestVersion = migrationsKeys.sort(Semver.compare).reverse()[0];
return {
...versionMap,
[type.name]: highestVersion,
[name]: highestVersion,
};
} else {
return {
...versionMap,
[type.name]: undefined,
[name]: undefined,
};
}
}, {} as Record<string, string | undefined>);
Expand Down
Loading

0 comments on commit ea45aee

Please sign in to comment.