-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Move deprecations getters test helpers to package #137793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TinaHeiligers
merged 6 commits into
elastic:main
from
TinaHeiligers:move-depcrecation-test-helpers
Aug 3, 2022
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
63284e5
Create package core-test-helpers-deprecations-getters and moves depre…
TinaHeiligers 0c0b643
Updates exports path in code
TinaHeiligers 1966be3
Fix tsconfig, update README
TinaHeiligers bbdd150
formating
TinaHeiligers a932c26
Remove edit
TinaHeiligers 5cb265e
Update packages/core/test-helpers/core-test-helpers-deprecations-gett…
afharo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
packages/core/test-helpers/core-test-helpers-deprecations-getters/BUILD.bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,103 @@ | ||
| 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_DIRNAME = "core-test-helpers-deprecations-getters" | ||
| PKG_REQUIRE_NAME = "@kbn/core-test-helpers-deprecations-getters" | ||
|
|
||
| SOURCE_FILES = glob( | ||
| [ | ||
| "src/**/*.ts", | ||
| ], | ||
| exclude = [ | ||
| "**/*.test.*", | ||
| "**/*.stories.*", | ||
| ], | ||
| ) | ||
|
|
||
| SRCS = SOURCE_FILES | ||
|
|
||
| filegroup( | ||
| name = "srcs", | ||
| srcs = SRCS, | ||
| ) | ||
|
|
||
| NPM_MODULE_EXTRA_FILES = [ | ||
| "package.json", | ||
| ] | ||
|
|
||
| RUNTIME_DEPS = [ | ||
| "//packages/elastic-safer-lodash-set", | ||
| "//packages/kbn-config", | ||
| "//packages/kbn-config-mocks", | ||
| ] | ||
|
|
||
| TYPES_DEPS = [ | ||
| "@npm//@types/node", | ||
| "@npm//@types/jest", | ||
| "//packages/elastic-safer-lodash-set:npm_module_types", | ||
| "//packages/kbn-config:npm_module_types", | ||
| "//packages/kbn-config-mocks:npm_module_types", | ||
| ] | ||
|
|
||
| jsts_transpiler( | ||
| name = "target_node", | ||
| srcs = SRCS, | ||
| build_pkg_name = package_name(), | ||
| ) | ||
|
|
||
| ts_config( | ||
| name = "tsconfig", | ||
| src = "tsconfig.json", | ||
| deps = [ | ||
| "//:tsconfig.base.json", | ||
| "//:tsconfig.bazel.json", | ||
| ], | ||
| ) | ||
|
|
||
| ts_project( | ||
| name = "tsc_types", | ||
| args = ['--pretty'], | ||
| srcs = SRCS, | ||
| deps = TYPES_DEPS, | ||
| declaration = True, | ||
| declaration_map = True, | ||
| emit_declaration_only = True, | ||
| out_dir = "target_types", | ||
| root_dir = "src", | ||
| tsconfig = ":tsconfig", | ||
| ) | ||
|
|
||
| js_library( | ||
| name = PKG_DIRNAME, | ||
| srcs = NPM_MODULE_EXTRA_FILES, | ||
| deps = RUNTIME_DEPS + [":target_node"], | ||
| package_name = PKG_REQUIRE_NAME, | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| pkg_npm( | ||
| name = "npm_module", | ||
| deps = [":" + PKG_DIRNAME], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "build", | ||
| srcs = [":npm_module"], | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| pkg_npm_types( | ||
| name = "npm_module_types", | ||
| srcs = SRCS, | ||
| deps = [":tsc_types"], | ||
| package_name = PKG_REQUIRE_NAME, | ||
| tsconfig = ":tsconfig", | ||
| visibility = ["//visibility:public"], | ||
| ) | ||
|
|
||
| filegroup( | ||
| name = "build_types", | ||
| srcs = [":npm_module_types"], | ||
| visibility = ["//visibility:public"], | ||
| ) |
3 changes: 3 additions & 0 deletions
3
packages/core/test-helpers/core-test-helpers-deprecations-getters/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # @kbn/core-test-helpers-deprecations-getters | ||
|
|
||
| This package contains test helpers for Core's deprecations service. |
13 changes: 13 additions & 0 deletions
13
packages/core/test-helpers/core-test-helpers-deprecations-getters/jest.config.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| module.exports = { | ||
| preset: '@kbn/test/jest_node', | ||
| rootDir: '../../../..', | ||
| roots: ['<rootDir>/packages/core/test-helpers/core-test-helpers-deprecations-getters'], | ||
| }; |
8 changes: 8 additions & 0 deletions
8
packages/core/test-helpers/core-test-helpers-deprecations-getters/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "name": "@kbn/core-test-helpers-deprecations-getters", | ||
| "private": true, | ||
| "version": "1.0.0", | ||
| "main": "./target_node/index.js", | ||
| "author": "Kibana Core", | ||
| "license": "SSPL-1.0 OR Elastic License 2.0" | ||
| } | ||
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
packages/core/test-helpers/core-test-helpers-deprecations-getters/src/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /* | ||
| * 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. | ||
| */ | ||
|
|
||
| export { getDeprecationsFor, getDeprecationsForGlobalSettings } from './deprecations_getters'; |
18 changes: 18 additions & 0 deletions
18
packages/core/test-helpers/core-test-helpers-deprecations-getters/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "extends": "../../../../tsconfig.bazel.json", | ||
| "compilerOptions": { | ||
| "declaration": true, | ||
| "declarationMap": true, | ||
| "emitDeclarationOnly": true, | ||
| "outDir": "target_types", | ||
| "rootDir": "src", | ||
| "stripInternal": false, | ||
| "types": [ | ||
| "jest", | ||
| "node" | ||
| ] | ||
| }, | ||
| "include": [ | ||
| "src/**/*" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.