* chore(NA): chore(NA): moving @kbn/utils into bazel * chore(NA): run kbn-test integration test with preserve-symlinks Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
This commit is contained in:
parent
8f02dd0074
commit
673c0c647f
|
@ -68,4 +68,5 @@ yarn kbn watch-bazel
|
|||
- @kbn/std
|
||||
- @kbn/tinymath
|
||||
- @kbn/utility-types
|
||||
- @kbn/utils
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
"@kbn/ui-framework": "link:packages/kbn-ui-framework",
|
||||
"@kbn/ui-shared-deps": "link:packages/kbn-ui-shared-deps",
|
||||
"@kbn/utility-types": "link:bazel-bin/packages/kbn-utility-types/npm_module",
|
||||
"@kbn/utils": "link:packages/kbn-utils",
|
||||
"@kbn/utils": "link:bazel-bin/packages/kbn-utils/npm_module",
|
||||
"@loaders.gl/core": "^2.3.1",
|
||||
"@loaders.gl/json": "^2.3.1",
|
||||
"@mapbox/geojson-rewind": "^0.5.0",
|
||||
|
|
|
@ -10,5 +10,6 @@ filegroup(
|
|||
"//packages/kbn-std:build",
|
||||
"//packages/kbn-tinymath:build",
|
||||
"//packages/kbn-utility-types:build",
|
||||
"//packages/kbn-utils:build",
|
||||
],
|
||||
)
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
"kbn:watch": "yarn build --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@elastic/safer-lodash-set": "link:../elastic-safer-lodash-set",
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
"@elastic/safer-lodash-set": "link:../elastic-safer-lodash-set"
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@
|
|||
"@kbn/logging": "link:../kbn-logging",
|
||||
"@kbn/server-http-tools": "link:../kbn-server-http-tools",
|
||||
"@kbn/optimizer": "link:../kbn-optimizer",
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
}
|
|
@ -63,7 +63,7 @@ ts_project(
|
|||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = [],
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = [":tsc"] + DEPS,
|
||||
package_name = PKG_REQUIRE_NAME,
|
||||
visibility = ["//visibility:public"],
|
||||
|
@ -71,7 +71,6 @@ js_library(
|
|||
|
||||
pkg_npm(
|
||||
name = "npm_module",
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = [
|
||||
":%s" % PKG_BASE_NAME,
|
||||
]
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
"kibana": {
|
||||
"devOnly": true
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@kbn/expect": "link:../kbn-expect"
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
"kbn:watch": "../../node_modules/.bin/tsc --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/utils": "link:../kbn-utils",
|
||||
"@kbn/config": "link:../kbn-config",
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/test": "link:../kbn-test",
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
"@kbn/test": "link:../kbn-test"
|
||||
}
|
||||
}
|
|
@ -9,8 +9,5 @@
|
|||
"build": "tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,8 +14,5 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils"
|
||||
},
|
||||
"dependencies": {
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
}
|
||||
}
|
|
@ -20,7 +20,6 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@kbn/dev-utils": "link:../kbn-dev-utils",
|
||||
"@kbn/expect": "link:../kbn-expect",
|
||||
"@kbn/utils": "link:../kbn-utils"
|
||||
"@kbn/expect": "link:../kbn-expect"
|
||||
}
|
||||
}
|
|
@ -30,8 +30,13 @@ it(
|
|||
'produces a valid junit report for failures',
|
||||
async () => {
|
||||
const result = await execa(
|
||||
'./node_modules/.bin/jest',
|
||||
['--config', 'packages/kbn-test/src/jest/integration_tests/__fixtures__/jest.config.js'],
|
||||
'node',
|
||||
[
|
||||
'--preserve-symlinks',
|
||||
'./node_modules/.bin/jest',
|
||||
'--config',
|
||||
'packages/kbn-test/src/jest/integration_tests/__fixtures__/jest.config.js',
|
||||
],
|
||||
{
|
||||
cwd: REPO_ROOT,
|
||||
env: {
|
||||
|
|
82
packages/kbn-utils/BUILD.bazel
Normal file
82
packages/kbn-utils/BUILD.bazel
Normal file
|
@ -0,0 +1,82 @@
|
|||
load("@npm//@bazel/typescript:index.bzl", "ts_config", "ts_project")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library", "pkg_npm")
|
||||
|
||||
PKG_BASE_NAME = "kbn-utils"
|
||||
PKG_REQUIRE_NAME = "@kbn/utils"
|
||||
|
||||
SOURCE_FILES = glob(
|
||||
[
|
||||
"src/**/*.ts",
|
||||
],
|
||||
exclude = ["**/*.test.*"],
|
||||
)
|
||||
|
||||
SRCS = SOURCE_FILES
|
||||
|
||||
filegroup(
|
||||
name = "srcs",
|
||||
srcs = SRCS,
|
||||
)
|
||||
|
||||
NPM_MODULE_EXTRA_FILES = [
|
||||
"package.json",
|
||||
"README.md"
|
||||
]
|
||||
|
||||
SRC_DEPS = [
|
||||
"//packages/kbn-config-schema",
|
||||
"@npm//load-json-file",
|
||||
"@npm//tslib",
|
||||
]
|
||||
|
||||
TYPES_DEPS = [
|
||||
"@npm//@types/jest",
|
||||
"@npm//@types/node",
|
||||
]
|
||||
|
||||
DEPS = SRC_DEPS + TYPES_DEPS
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//:tsconfig.base.json",
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "tsc",
|
||||
args = ['--pretty'],
|
||||
srcs = SRCS,
|
||||
deps = DEPS,
|
||||
declaration = True,
|
||||
declaration_map = True,
|
||||
incremental = True,
|
||||
out_dir = "target",
|
||||
source_map = True,
|
||||
root_dir = "src",
|
||||
tsconfig = ":tsconfig",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = PKG_BASE_NAME,
|
||||
srcs = NPM_MODULE_EXTRA_FILES,
|
||||
deps = [":tsc"] + 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"],
|
||||
)
|
|
@ -4,10 +4,5 @@
|
|||
"types": "./target/index.d.ts",
|
||||
"version": "1.0.0",
|
||||
"license": "SSPL-1.0 OR Elastic License 2.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rm -rf target && ../../node_modules/.bin/tsc",
|
||||
"kbn:bootstrap": "yarn build",
|
||||
"kbn:watch": "yarn build --watch"
|
||||
}
|
||||
"private": true
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"incremental": false,
|
||||
"incremental": true,
|
||||
"outDir": "target",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
|
|
Loading…
Reference in a new issue