Skip to content

Commit

Permalink
Merge branch 'main' into upgrade-charts-41-breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
kibanamachine authored Jan 21, 2022
2 parents 81d7707 + 48693d1 commit 1418ec5
Show file tree
Hide file tree
Showing 565 changed files with 6,885 additions and 20,691 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ snapshots.js
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
/packages/kbn-ui-framework/dist
/packages/kbn-ui-shared-deps-src/src/flot_charts
/packages/kbn-flot-charts/lib
/packages/kbn-monaco/src/painless/antlr

# Bazel
Expand Down
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ const RESTRICTED_IMPORTS = [
name: 'react-use',
message: 'Please use react-use/lib/{method} instead.',
},
{
name: '@kbn/io-ts-utils',
message: `Import directly from @kbn/io-ts-utils/{method} submodules`,
},
];

module.exports = {
Expand Down Expand Up @@ -1569,7 +1565,7 @@ module.exports = {
},
},
{
files: ['packages/kbn-ui-shared-deps-src/src/flot_charts/**/*.js'],
files: ['packages/kbn-flot-charts/lib/**/*.js'],
env: {
jquery: true,
},
Expand Down
2 changes: 1 addition & 1 deletion .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"fieldFormats": "src/plugins/field_formats",
"flot": "packages/kbn-ui-shared-deps-src/src/flot_charts",
"flot": "packages/kbn-flot-charts/lib",
"home": "src/plugins/home",
"indexPatternEditor": "src/plugins/data_view_editor",
"indexPatternFieldEditor": "src/plugins/data_view_field_editor",
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
"@kbn/crypto": "link:bazel-bin/packages/kbn-crypto",
"@kbn/es-query": "link:bazel-bin/packages/kbn-es-query",
"@kbn/field-types": "link:bazel-bin/packages/kbn-field-types",
"@kbn/flot-charts": "link:bazel-bin/packages/kbn-flot-charts",
"@kbn/i18n": "link:bazel-bin/packages/kbn-i18n",
"@kbn/i18n-react": "link:bazel-bin/packages/kbn-i18n-react",
"@kbn/interpreter": "link:bazel-bin/packages/kbn-interpreter",
Expand Down Expand Up @@ -169,6 +170,7 @@
"@kbn/ui-framework": "link:bazel-bin/packages/kbn-ui-framework",
"@kbn/ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm",
"@kbn/ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src",
"@kbn/ui-theme": "link:bazel-bin/packages/kbn-ui-theme",
"@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types",
"@kbn/utils": "link:bazel-bin/packages/kbn-utils",
"@loaders.gl/core": "^2.3.1",
Expand Down Expand Up @@ -340,7 +342,7 @@
"react-moment-proptypes": "^1.7.0",
"react-monaco-editor": "^0.41.2",
"react-popper-tooltip": "^2.10.1",
"react-query": "^3.28.0",
"react-query": "^3.34.0",
"react-redux": "^7.2.0",
"react-resizable": "^1.7.5",
"react-resize-detector": "^4.2.0",
Expand Down Expand Up @@ -576,6 +578,7 @@
"@types/kbn__i18n": "link:bazel-bin/packages/kbn-i18n/npm_module_types",
"@types/kbn__i18n-react": "link:bazel-bin/packages/kbn-i18n-react/npm_module_types",
"@types/kbn__interpreter": "link:bazel-bin/packages/kbn-interpreter/npm_module_types",
"@types/kbn__io-ts-utils": "link:bazel-bin/packages/kbn-io-ts-utils/npm_module_types",
"@types/kbn__mapbox-gl": "link:bazel-bin/packages/kbn-mapbox-gl/npm_module_types",
"@types/kbn__monaco": "link:bazel-bin/packages/kbn-monaco/npm_module_types",
"@types/kbn__optimizer": "link:bazel-bin/packages/kbn-optimizer/npm_module_types",
Expand All @@ -602,6 +605,8 @@
"@types/kbn__std": "link:bazel-bin/packages/kbn-std/npm_module_types",
"@types/kbn__telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools/npm_module_types",
"@types/kbn__ui-shared-deps-npm": "link:bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module_types",
"@types/kbn__ui-shared-deps-src": "link:bazel-bin/packages/kbn-ui-shared-deps-src/npm_module_types",
"@types/kbn__ui-theme": "link:bazel-bin/packages/kbn-ui-theme/npm_module_types",
"@types/kbn__utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module_types",
"@types/kbn__utils": "link:bazel-bin/packages/kbn-utils/npm_module_types",
"@types/license-checker": "15.0.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ filegroup(
"//packages/kbn-eslint-plugin-eslint:build",
"//packages/kbn-expect:build",
"//packages/kbn-field-types:build",
"//packages/kbn-flot-charts:build",
"//packages/kbn-i18n:build",
"//packages/kbn-i18n-react:build",
"//packages/kbn-interpreter:build",
Expand Down Expand Up @@ -66,6 +67,7 @@ filegroup(
"//packages/kbn-ui-framework:build",
"//packages/kbn-ui-shared-deps-npm:build",
"//packages/kbn-ui-shared-deps-src:build",
"//packages/kbn-ui-theme:build",
"//packages/kbn-utility-types:build",
"//packages/kbn-utils:build",
],
Expand Down Expand Up @@ -95,6 +97,7 @@ filegroup(
"//packages/kbn-i18n:build_types",
"//packages/kbn-i18n-react:build_types",
"//packages/kbn-interpreter:build_types",
"//packages/kbn-io-ts-utils:build_types",
"//packages/kbn-mapbox-gl:build_types",
"//packages/kbn-monaco:build_types",
"//packages/kbn-optimizer:build_types",
Expand All @@ -121,6 +124,8 @@ filegroup(
"//packages/kbn-std:build_types",
"//packages/kbn-telemetry-tools:build_types",
"//packages/kbn-ui-shared-deps-npm:build_types",
"//packages/kbn-ui-shared-deps-src:build_types",
"//packages/kbn-ui-theme:build_types",
"//packages/kbn-utility-types:build_types",
"//packages/kbn-utils:build_types",
],
Expand Down
2 changes: 1 addition & 1 deletion packages/elastic-eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module.exports = {
].map(from => ({
from,
to: false,
disallowedMessage: `Use "@kbn/ui-shared-deps-src/theme" to access theme vars.`
disallowedMessage: `Use "@kbn/ui-theme" to access theme vars.`
})),
],
],
Expand Down
File renamed without changes.
51 changes: 51 additions & 0 deletions packages/kbn-flot-charts/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "pkg_npm")

PKG_BASE_NAME = "kbn-flot-charts"
PKG_REQUIRE_NAME = "@kbn/flot-charts"

SOURCE_FILES = glob([
"lib/**/*.js",
"index.js",
])

SRCS = SOURCE_FILES

filegroup(
name = "srcs",
srcs = SRCS,
)

NPM_MODULE_EXTRA_FILES = [
"package.json",
"API.md",
]

RUNTIME_DEPS = [
"//packages/kbn-i18n",
]

js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES + [
":srcs",
],
deps = RUNTIME_DEPS,
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)

pkg_npm(
name = "npm_module",
deps = [
":%s" % PKG_BASE_NAME,
]
)

filegroup(
name = "build",
srcs = [
":npm_module",
],
visibility = ["//visibility:public"],
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

/* @notice
*
* This product includes code that is based on flot-charts, which was available
Expand Down Expand Up @@ -26,15 +34,15 @@
* THE SOFTWARE.
*/

import './jquery_flot';
import './jquery_flot_canvas';
import './jquery_flot_time';
import './jquery_flot_symbol';
import './jquery_flot_crosshair';
import './jquery_flot_selection';
import './jquery_flot_pie';
import './jquery_flot_stack';
import './jquery_flot_threshold';
import './jquery_flot_fillbetween';
import './jquery_flot_log';
import './jquery_flot_axislabels';
import './lib/jquery_flot';
import './lib/jquery_flot_canvas';
import './lib/jquery_flot_time';
import './lib/jquery_flot_symbol';
import './lib/jquery_flot_crosshair';
import './lib/jquery_flot_selection';
import './lib/jquery_flot_pie';
import './lib/jquery_flot_stack';
import './lib/jquery_flot_threshold';
import './lib/jquery_flot_fillbetween';
import './lib/jquery_flot_log';
import './lib/jquery_flot_axislabels';
File renamed without changes.
7 changes: 7 additions & 0 deletions packages/kbn-flot-charts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@kbn/flot-charts",
"version": "1.0.0",
"private": true,
"main": "./index.js",
"license": "SSPL-1.0 OR Elastic License 2.0"
}
37 changes: 22 additions & 15 deletions packages/kbn-io-ts-utils/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
load("//src/dev/bazel:index.bzl", "jsts_transpiler")
load("@npm//@bazel/typescript:index.bzl", "ts_config")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//src/dev/bazel:index.bzl", "jsts_transpiler", "pkg_npm", "pkg_npm_types", "ts_project")

PKG_BASE_NAME = "kbn-io-ts-utils"
PKG_REQUIRE_NAME = "@kbn/io-ts-utils"
TYPES_PKG_REQUIRE_NAME = "@types/kbn__io-ts-utils"

SOURCE_FILES = glob(
[
Expand All @@ -23,17 +24,6 @@ filegroup(

NPM_MODULE_EXTRA_FILES = [
"package.json",
"deep_exact_rt/package.json",
"iso_to_epoch_rt/package.json",
"json_rt/package.json",
"merge_rt/package.json",
"non_empty_string_rt/package.json",
"parseable_types/package.json",
"props_to_schema/package.json",
"strict_keys_rt/package.json",
"to_boolean_rt/package.json",
"to_json_schema/package.json",
"to_number_rt/package.json",
]

RUNTIME_DEPS = [
Expand Down Expand Up @@ -86,7 +76,7 @@ ts_project(
js_library(
name = PKG_BASE_NAME,
srcs = NPM_MODULE_EXTRA_FILES,
deps = RUNTIME_DEPS + [":target_node", ":tsc_types"],
deps = RUNTIME_DEPS + [":target_node"],
package_name = PKG_REQUIRE_NAME,
visibility = ["//visibility:public"],
)
Expand All @@ -105,3 +95,20 @@ filegroup(
],
visibility = ["//visibility:public"],
)

pkg_npm_types(
name = "npm_module_types",
srcs = SRCS,
deps = [":tsc_types"],
package_name = TYPES_PKG_REQUIRE_NAME,
tsconfig = ":tsconfig",
visibility = ["//visibility:public"],
)

filegroup(
name = "build_types",
srcs = [
":npm_module_types",
],
visibility = ["//visibility:public"],
)
4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/deep_exact_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/iso_to_epoch_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/json_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/merge_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/non_empty_string_rt/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/kbn-io-ts-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@kbn/io-ts-utils",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0",
"private": true
Expand Down
4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/parseable_types/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/props_to_schema/package.json

This file was deleted.

2 changes: 2 additions & 0 deletions packages/kbn-io-ts-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Side Public License, v 1.
*/

export type { NonEmptyStringBrand } from './non_empty_string_rt';

export { deepExactRt } from './deep_exact_rt';
export { jsonRt } from './json_rt';
export { mergeRt } from './merge_rt';
Expand Down
4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/strict_keys_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/to_boolean_rt/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/to_json_schema/package.json

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kbn-io-ts-utils/to_number_rt/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/kbn-optimizer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TYPES_DEPS = [
"//packages/kbn-dev-utils:npm_module_types",
"//packages/kbn-std:npm_module_types",
"//packages/kbn-ui-shared-deps-npm:npm_module_types",
"//packages/kbn-ui-shared-deps-src",
"//packages/kbn-ui-shared-deps-src:npm_module_types",
"//packages/kbn-utils:npm_module_types",
"@npm//chalk",
"@npm//clean-webpack-plugin",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/src/worker/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import webpackMerge from 'webpack-merge';
import { CleanWebpackPlugin } from 'clean-webpack-plugin';
import CompressionPlugin from 'compression-webpack-plugin';
import UiSharedDepsNpm from '@kbn/ui-shared-deps-npm';
import UiSharedDepsSrc from '@kbn/ui-shared-deps-src';
import * as UiSharedDepsSrc from '@kbn/ui-shared-deps-src';

import { Bundle, BundleRefs, WorkerConfig } from '../common';
import { BundleRefsPlugin } from './bundle_refs_plugin';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ it('builds a generated plugin into a viable archive', async () => {
}
);

expect(buildProc.all).toMatchInlineSnapshot(`
expect(
buildProc.all
?.split('\n')
.filter((l) => !l.includes('failed to reach ci-stats service'))
.join('\n')
).toMatchInlineSnapshot(`
" info deleting the build and target directories
info running @kbn/optimizer
│ info initialized, 0 bundles cached
Expand Down
Loading

0 comments on commit 1418ec5

Please sign in to comment.