Skip to content

Commit

Permalink
Separate sqlx build target into sqlx and format (#1499)
Browse files Browse the repository at this point in the history
* Separate sqlx build target into sqlx and format

* Fix build dependencies that used //sqlx
  • Loading branch information
pokutuna authored Jun 6, 2023
1 parent 69cad94 commit f27fb73
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cli/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ts_library(
"//api",
"//core",
"//protos:ts",
"//sqlx",
"//sqlx:format",
"@npm//@types/analytics-node",
"@npm//@types/glob",
"@npm//@types/long",
Expand Down
3 changes: 2 additions & 1 deletion core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ts_library(
"//common/protos",
"//common/strings",
"//protos:ts",
"//sqlx",
"//sqlx:sqlx",
"@npm//@types/node",
"@npm//@types/semver",
"@npm//protobufjs",
"@npm//semver",
Expand Down
25 changes: 20 additions & 5 deletions sqlx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,32 @@ load("//tools:ts_library.bzl", "ts_library")

ts_library(
name = "sqlx",
srcs = glob(["**/*.ts"]),
srcs = glob(
["**/*.ts"],
exclude = ["format.ts"],
),
deps = [
"//:modules-fix",
"//common/errors",
"@npm//@types/moo",
"@npm//@types/node",
"@npm//moo",
],
)

ts_library(
name = "format",
srcs = glob(
["format.ts"],
),
deps = [
"//:modules-fix",
"//core",
"//common/errors",
"//sqlx:sqlx",
"@npm//@types/js-beautify",
"@npm//@types/node",
"@npm//@types/uuid",
"@npm//js-beautify",
"@npm//uuid",
"@npm//sql-formatter",
"@npm//moo",
"@npm//uuid",
],
)
3 changes: 2 additions & 1 deletion tests/sqlx/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ts_test_suite(
"//examples/formatter:node_modules",
],
deps = [
"//sqlx",
"//sqlx:sqlx",
"//sqlx:format",
"//testing",
"@npm//@types/chai",
"@npm//@types/node",
Expand Down

0 comments on commit f27fb73

Please sign in to comment.