Skip to content
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

chore(NA): splits types from code on @elastic/apm-synthtrace #118786

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
82961a1
chore(NA): auto creation of the package.json for the new types pkg rule
mistic Sep 30, 2021
2edbb63
chore(NA): first alpha api extractor working version
mistic Sep 30, 2021
4516010
chore(NA): support kbn-analytics
mistic Oct 1, 2021
28fa3d9
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 5, 2021
2822a60
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 5, 2021
d510f31
chore(NA): correctly read tsconfig files and deps from ts_config rule
mistic Oct 5, 2021
99c677c
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 6, 2021
afee280
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 6, 2021
78e9719
chore(NA): layed out pkg_npm_types tree artifact custom rule
mistic Oct 6, 2021
b1d9b7f
chore(NA): missing todos
mistic Oct 6, 2021
bdead3e
chore(NA): node modules link mapping
mistic Oct 6, 2021
ae054bb
chore(NA): fully working pkg_npm_types rule
mistic Oct 7, 2021
13f7801
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 7, 2021
385454a
chore(NA): merge and solve conflicts with master
mistic Oct 7, 2021
1286d9b
chore(NA): merge and solve conflicts with master
mistic Oct 25, 2021
199300a
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 26, 2021
5f5ed46
chore(NA): fix changes on new packages using elastic datemath pkgs
mistic Oct 26, 2021
e1b2ec0
docs(NA): remove todo
mistic Oct 26, 2021
2fa62c7
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 26, 2021
ac72784
docs(NA): last todo text correction
mistic Oct 27, 2021
2df52f5
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 27, 2021
89888b4
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 27, 2021
15cc77a
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 27, 2021
488407b
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 28, 2021
8aa3705
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 28, 2021
a036832
chore(NA): removed commented lines
mistic Oct 28, 2021
0a437b6
Merge remote-tracking branch 'upstream/master' into create-types-pkg-…
mistic Oct 28, 2021
c3d6e43
fix(NA): include missing package version
mistic Oct 28, 2021
8872d5a
Merge branch 'master' into create-types-pkg-bazel-rule
kibanamachine Oct 28, 2021
c9de76f
chore(NA): include license keys
mistic Oct 28, 2021
bdc396b
Merge branch 'create-types-pkg-bazel-rule' of github.com:mistic/kiban…
mistic Oct 28, 2021
051d25f
chore(NA): change mock types package into private
mistic Oct 29, 2021
b0ef9d1
Merge branch 'main' into create-types-pkg-bazel-rule
kibanamachine Oct 29, 2021
ffae6f4
Merge branch 'main' into create-types-pkg-bazel-rule
kibanamachine Oct 29, 2021
f94089c
Merge branch 'main' into create-types-pkg-bazel-rule
kibanamachine Nov 2, 2021
5bbdd13
Merge remote-tracking branch 'upstream/main' into create-types-pkg-ba…
mistic Nov 3, 2021
3fb47d4
chore(NA): split types_pkg from code_pkg on @elastic/apm-synthtrace
mistic Nov 3, 2021
2f57587
chore(NA): disable validator on ts_project rule
mistic Nov 3, 2021
4b2282c
chore(NA): merge and solve conflicts with main
mistic Nov 5, 2021
1492f53
chore(NA): move into ts_project wrapper
mistic Nov 5, 2021
c59ab20
chore(NA): merge and solve conflicts with main
mistic Nov 5, 2021
156d095
chore(NA): merge and solve conflicts with main
mistic Nov 16, 2021
a90f9ca
Merge branch 'main' into split-code-from-types-on-elastic-apm-synthtrace
kibanamachine Nov 16, 2021
5d0953c
chore(NA): complete types exports
mistic Nov 17, 2021
00b8c3d
Merge branch 'split-code-from-types-on-elastic-apm-synthtrace' of git…
mistic Nov 17, 2021
f65f568
chore(NA): merge and solve conflicts with main
mistic Nov 17, 2021
f4c6287
chore(NA): export types as type only
mistic Nov 17, 2021
a485ad0
Merge branch 'main' into split-code-from-types-on-elastic-apm-synthtrace
kibanamachine Nov 17, 2021
bb923aa
chore(NA): fix type exports
mistic Nov 17, 2021
3de36fe
chore(NA): only include exception type
mistic Nov 17, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,7 @@
"@types/deep-freeze-strict": "^1.1.0",
"@types/delete-empty": "^2.0.0",
"@types/ejs": "^3.0.6",
"@types/elastic__apm-synthtrace": "link:bazel-bin/packages/elastic-apm-synthtrace/npm_module_types",
"@types/elastic__datemath": "link:bazel-bin/packages/elastic-datemath/npm_module_types",
"@types/elasticsearch": "^5.0.33",
"@types/enzyme": "^3.10.8",
Expand Down
1 change: 1 addition & 0 deletions packages/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ filegroup(
filegroup(
name = "build_pkg_types",
srcs = [
"//packages/elastic-apm-synthtrace:build_types",
"//packages/elastic-datemath:build_types",
],
)
Expand Down
34 changes: 25 additions & 9 deletions packages/elastic-apm-synthtrace/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 = "elastic-apm-synthtrace"
PKG_REQUIRE_NAME = "@elastic/apm-synthtrace"
TYPES_PKG_REQUIRE_NAME = "@types/elastic__apm-synthtrace"

SOURCE_FILES = glob(
[
Expand Down Expand Up @@ -31,21 +32,18 @@ RUNTIME_DEPS = [
"@npm//moment",
"@npm//object-hash",
"@npm//p-limit",
"@npm//utility-types",
"@npm//uuid",
"@npm//yargs",
]

TYPES_DEPS = [
"//packages/elastic-datemath:npm_module_types",
"@npm//@elastic/elasticsearch",
"@npm//moment",
"@npm//p-limit",
"@npm//@types/jest",
"@npm//@types/lodash",
"@npm//@types/node",
"@npm//@types/uuid",
"@npm//@types/object-hash",
"@npm//moment",
"@npm//p-limit",
]

jsts_transpiler(
Expand Down Expand Up @@ -75,12 +73,13 @@ ts_project(
root_dir = "src",
source_map = True,
tsconfig = ":tsconfig",
validate = False,
)

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 @@ -99,3 +98,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"],
)
1 change: 0 additions & 1 deletion packages/elastic-apm-synthtrace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"description": "Elastic APM trace data generator",
"license": "SSPL-1.0 OR Elastic License 2.0",
"main": "./target_node/index.js",
"types": "./target_types/index.d.ts",
"private": true
}
1 change: 1 addition & 0 deletions packages/elastic-apm-synthtrace/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Side Public License, v 1.
*/

export type { Exception } from './lib/entity';
export { service } from './lib/service';
export { browser } from './lib/browser';
export { timerange } from './lib/timerange';
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5265,6 +5265,10 @@
resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.0.6.tgz#aca442289df623bfa8e47c23961f0357847b83fe"
integrity sha512-fj1hi+ZSW0xPLrJJD+YNwIh9GZbyaIepG26E/gXvp8nCa2pYokxUYO1sK9qjGxp2g8ryZYuon7wmjpwE2cyASQ==

"@types/elastic__apm-synthtrace@link:bazel-bin/packages/elastic-apm-synthtrace/npm_module_types":
version "0.0.0"
uid ""

"@types/elastic__datemath@link:bazel-bin/packages/elastic-datemath/npm_module_types":
version "0.0.0"
uid ""
Expand Down