Skip to content

Commit

Permalink
[plugins] use module ids to import across plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Apr 16, 2022
1 parent e47bf4b commit bd8171c
Show file tree
Hide file tree
Showing 120 changed files with 27,550 additions and 25,319 deletions.
16 changes: 1 addition & 15 deletions .buildkite/scripts/build_kibana_plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,4 @@
set -euo pipefail

echo "--- Build Platform Plugins"
node scripts/build_kibana_platform_plugins \
--scan-dir "$KIBANA_DIR/test/analytics/__fixtures__/plugins" \
--scan-dir "$KIBANA_DIR/test/plugin_functional/plugins" \
--scan-dir "$KIBANA_DIR/test/interpreter_functional/plugins" \
--scan-dir "$KIBANA_DIR/test/common/fixtures/plugins" \
--scan-dir "$KIBANA_DIR/examples" \
--scan-dir "$XPACK_DIR/test/plugin_functional/plugins" \
--scan-dir "$XPACK_DIR/test/functional_with_es_ssl/fixtures/plugins" \
--scan-dir "$XPACK_DIR/test/alerting_api_integration/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_api_integration/plugins" \
--scan-dir "$XPACK_DIR/test/plugin_api_perf/plugins" \
--scan-dir "$XPACK_DIR/test/licensing_plugin/plugins" \
--scan-dir "$XPACK_DIR/test/usage_collection/plugins" \
--scan-dir "$XPACK_DIR/test/security_functional/fixtures/common" \
--scan-dir "$XPACK_DIR/examples"
node scripts/build_kibana_platform_plugins --examples --test-plugins
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
node_modules
!/src/dev/npm/integration_tests/__fixtures__/fixture1/node_modules
!/src/dev/notice/__fixtures__/node_modules
!/packages/kbn-import-resolver/src/__fixtures__/node_modules
trash
/optimize
/built_assets
Expand Down Expand Up @@ -98,4 +99,5 @@ elastic-agent-*
fleet-server-*
elastic-agent.yml
fleet-server.yml
/packages/kbn-synthetic-package-map/synthetic-packages.json

1 change: 0 additions & 1 deletion docs/developer/getting-started/monorepo-packages.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ yarn kbn watch
- @kbn/analytics
- @kbn/apm-config-loader
- @kbn/apm-utils
- @kbn/babel-code-parser
- @kbn/babel-preset
- @kbn/cli-dev-mode
- @kbn/config
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@
"@babel/eslint-parser": "^7.17.0",
"@babel/eslint-plugin": "^7.17.7",
"@babel/generator": "^7.17.7",
"@babel/helper-plugin-utils": "^7.16.7",
"@babel/parser": "^7.17.8",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-export-namespace-from": "^7.16.7",
Expand Down Expand Up @@ -476,7 +477,7 @@
"@jest/console": "^26.6.2",
"@jest/reporters": "^26.6.2",
"@kbn/axe-config": "link:bazel-bin/packages/kbn-axe-config",
"@kbn/babel-code-parser": "link:bazel-bin/packages/kbn-babel-code-parser",
"@kbn/babel-plugin-synthetic-packages": "link:bazel-bin/packages/kbn-babel-plugin-synthetic-packages",
"@kbn/babel-preset": "link:bazel-bin/packages/kbn-babel-preset",
"@kbn/bazel-packages": "link:bazel-bin/packages/kbn-bazel-packages",
"@kbn/cli-dev-mode": "link:bazel-bin/packages/kbn-cli-dev-mode",
Expand All @@ -486,13 +487,16 @@
"@kbn/es-archiver": "link:bazel-bin/packages/kbn-es-archiver",
"@kbn/eslint-plugin-eslint": "link:bazel-bin/packages/kbn-eslint-plugin-eslint",
"@kbn/expect": "link:bazel-bin/packages/kbn-expect",
"@kbn/find-used-node-modules": "link:bazel-bin/packages/kbn-find-used-node-modules",
"@kbn/generate": "link:bazel-bin/packages/kbn-generate",
"@kbn/import-resolver": "link:bazel-bin/packages/kbn-import-resolver",
"@kbn/optimizer": "link:bazel-bin/packages/kbn-optimizer",
"@kbn/plugin-generator": "link:bazel-bin/packages/kbn-plugin-generator",
"@kbn/plugin-helpers": "link:bazel-bin/packages/kbn-plugin-helpers",
"@kbn/pm": "link:packages/kbn-pm",
"@kbn/spec-to-console": "link:bazel-bin/packages/kbn-spec-to-console",
"@kbn/storybook": "link:bazel-bin/packages/kbn-storybook",
"@kbn/synthetic-package-map": "link:bazel-bin/packages/kbn-synthetic-package-map",
"@kbn/telemetry-tools": "link:bazel-bin/packages/kbn-telemetry-tools",
"@kbn/test": "link:bazel-bin/packages/kbn-test",
"@kbn/test-jest-helpers": "link:bazel-bin/packages/kbn-test-jest-helpers",
Expand Down Expand Up @@ -528,6 +532,7 @@
"@types/apidoc": "^0.22.3",
"@types/archiver": "^5.1.0",
"@types/babel__core": "^7.1.19",
"@types/babel__helper-plugin-utils": "^7.10.0",
"@types/base64-js": "^1.2.5",
"@types/chance": "^1.0.0",
"@types/chroma-js": "^1.4.2",
Expand Down Expand Up @@ -607,9 +612,11 @@
"@types/kbn__es-query": "link:bazel-bin/packages/kbn-es-query/npm_module_types",
"@types/kbn__eslint-plugin-imports": "link:bazel-bin/packages/kbn-eslint-plugin-imports/npm_module_types",
"@types/kbn__field-types": "link:bazel-bin/packages/kbn-field-types/npm_module_types",
"@types/kbn__find-used-node-modules": "link:bazel-bin/packages/kbn-find-used-node-modules/npm_module_types",
"@types/kbn__generate": "link:bazel-bin/packages/kbn-generate/npm_module_types",
"@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__import-resolver": "link:bazel-bin/packages/kbn-import-resolver/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__logging": "link:bazel-bin/packages/kbn-logging/npm_module_types",
Expand Down
7 changes: 6 additions & 1 deletion packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ filegroup(
"//packages/kbn-apm-config-loader:build",
"//packages/kbn-apm-utils:build",
"//packages/kbn-axe-config:build",
"//packages/kbn-babel-code-parser:build",
"//packages/kbn-babel-plugin-synthetic-packages:build",
"//packages/kbn-babel-preset:build",
"//packages/kbn-bazel-packages:build",
"//packages/kbn-cli-dev-mode:build",
Expand All @@ -40,10 +40,12 @@ filegroup(
"//packages/kbn-eslint-plugin-imports:build",
"//packages/kbn-expect:build",
"//packages/kbn-field-types:build",
"//packages/kbn-find-used-node-modules:build",
"//packages/kbn-flot-charts:build",
"//packages/kbn-generate:build",
"//packages/kbn-i18n-react:build",
"//packages/kbn-i18n:build",
"//packages/kbn-import-resolver:build",
"//packages/kbn-interpreter:build",
"//packages/kbn-io-ts-utils:build",
"//packages/kbn-logging-mocks:build",
Expand Down Expand Up @@ -79,6 +81,7 @@ filegroup(
"//packages/kbn-spec-to-console:build",
"//packages/kbn-std:build",
"//packages/kbn-storybook:build",
"//packages/kbn-synthetic-package-map:build",
"//packages/kbn-telemetry-tools:build",
"//packages/kbn-test-jest-helpers:build",
"//packages/kbn-test-subj-selector:build",
Expand Down Expand Up @@ -124,9 +127,11 @@ filegroup(
"//packages/kbn-es-query:build_types",
"//packages/kbn-eslint-plugin-imports:build_types",
"//packages/kbn-field-types:build_types",
"//packages/kbn-find-used-node-modules:build_types",
"//packages/kbn-generate:build_types",
"//packages/kbn-i18n-react:build_types",
"//packages/kbn-i18n:build_types",
"//packages/kbn-import-resolver:build_types",
"//packages/kbn-interpreter:build_types",
"//packages/kbn-io-ts-utils:build_types",
"//packages/kbn-logging-mocks:build_types",
Expand Down
3 changes: 2 additions & 1 deletion packages/elastic-eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module.exports = {
'@kbn/eslint/no_trailing_import_slash': 'error',
'@kbn/eslint/no_constructor_args_in_property_initializers': 'error',
'@kbn/eslint/no_this_in_property_initializers': 'error',
'@kbn/imports/no_unresolved_imports': 'error',
'@kbn/imports/no_unresolvable_imports': 'error',
'@kbn/imports/uniform_imports': 'error',
},
};
61 changes: 0 additions & 61 deletions packages/kbn-babel-code-parser/BUILD.bazel

This file was deleted.

19 changes: 0 additions & 19 deletions packages/kbn-babel-code-parser/README.md

This file was deleted.

15 changes: 0 additions & 15 deletions packages/kbn-babel-code-parser/package.json

This file was deleted.

23 changes: 0 additions & 23 deletions packages/kbn-babel-code-parser/src/can_require.js

This file was deleted.

94 changes: 0 additions & 94 deletions packages/kbn-babel-code-parser/src/code_parser.js

This file was deleted.

Loading

0 comments on commit bd8171c

Please sign in to comment.