Skip to content

Commit

Permalink
Use tsconfig.build.json between packages (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
fubhy committed Apr 18, 2024
1 parent 570e8d8 commit 76277cb
Show file tree
Hide file tree
Showing 24 changed files with 77 additions and 61 deletions.
12 changes: 6 additions & 6 deletions packages/cli/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../schema" },
{ "path": "../printer" },
{ "path": "../printer-ansi" },
{ "path": "../platform" },
{ "path": "../platform-node" },
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" },
{ "path": "../printer/tsconfig.build.json" },
{ "path": "../printer-ansi/tsconfig.build.json" },
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../platform-node/tsconfig.build.json" },
],
"compilerOptions": {
"types": ["node"],
Expand Down
8 changes: 4 additions & 4 deletions packages/experimental/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../schema" },
{ "path": "../platform" },
{ "path": "../platform-node" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" },
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../platform-node/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
2 changes: 1 addition & 1 deletion packages/opentelemetry/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" }
{ "path": "../effect/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
6 changes: 3 additions & 3 deletions packages/platform-browser/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../platform" },
{ "path": "../effect" },
{ "path": "../schema" }
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
4 changes: 2 additions & 2 deletions packages/platform-bun/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../platform" },
{ "path": "../platform-node" }
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../platform-node/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
12 changes: 3 additions & 9 deletions packages/platform-node-shared/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [
{
"path": "../platform"
},
{
"path": "../effect"
},
{
"path": "../schema"
}
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
8 changes: 4 additions & 4 deletions packages/platform-node/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../platform" },
{ "path": "../platform-node-shared" },
{ "path": "../effect" },
{ "path": "../schema" }
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../platform-node-shared/tsconfig.build.json" },
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
9 changes: 4 additions & 5 deletions packages/platform/src/Template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
* @since 1.0.0
*/
import * as Effect from "effect/Effect"
import type * as core from "effect/internal/core"
import * as Option from "effect/Option"
import * as Predicate from "effect/Predicate"
import * as Stream from "effect/Stream"
Expand Down Expand Up @@ -82,7 +81,7 @@ export function make<A extends ReadonlyArray<Interpolated>>(
if (Option.isOption(arg)) {
values[i] = arg._tag === "Some" ? primitiveToString(arg.value) : ""
} else if (isSuccess(arg)) {
values[i] = primitiveToString(arg.effect_instruction_i0 as Primitive)
values[i] = primitiveToString((arg as any).effect_instruction_i0)
} else if (Effect.isEffect(arg)) {
effects.push([i, arg])
} else {
Expand Down Expand Up @@ -131,7 +130,7 @@ export function stream<A extends ReadonlyArray<InterpolatedWithStream>>(
if (Option.isOption(arg)) {
buffer += arg._tag === "Some" ? primitiveToString(arg.value) : ""
} else if (isSuccess(arg)) {
buffer += primitiveToString(arg.effect_instruction_i0 as Primitive)
buffer += primitiveToString((arg as any).effect_instruction_i0)
} else if (Predicate.hasProperty(arg, Stream.StreamTypeId)) {
if (buffer.length > 0) {
chunks.push(buffer)
Expand Down Expand Up @@ -194,6 +193,6 @@ function consolidate(
return out + strings[strings.length - 1]
}

function isSuccess(u: unknown): u is core.Success {
return Effect.isEffect(u) && (u as core.Primitive)._op === "Success"
function isSuccess(u: unknown) {
return Effect.isEffect(u) && (u as any)._op === "Success"
}
4 changes: 2 additions & 2 deletions packages/platform/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../schema" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
6 changes: 3 additions & 3 deletions packages/printer-ansi/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../printer" },
{ "path": "../effect" },
{ "path": "../typeclass" }
{ "path": "../printer/tsconfig.build.json" },
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../typeclass/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
4 changes: 2 additions & 2 deletions packages/printer/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../typeclass" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../typeclass/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
8 changes: 4 additions & 4 deletions packages/rpc-http/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../schema" },
{ "path": "../rpc" },
{ "path": "../platform" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" },
{ "path": "../rpc/tsconfig.build.json" },
{ "path": "../platform/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
6 changes: 3 additions & 3 deletions packages/rpc/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../platform" },
{ "path": "../schema" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" }
{ "path": "../effect/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-mssql/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-mysql2/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-pg/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-sqlite-bun/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-sqlite-node/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-sqlite-react-native/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
5 changes: 4 additions & 1 deletion packages/sql-sqlite-wasm/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }, { "path": "../sql" }],
"references": [
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../sql/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down
6 changes: 3 additions & 3 deletions packages/sql/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" },
{ "path": "../platform" },
{ "path": "../schema" }
{ "path": "../effect/tsconfig.build.json" },
{ "path": "../platform/tsconfig.build.json" },
{ "path": "../schema/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
2 changes: 1 addition & 1 deletion packages/typeclass/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "./tsconfig.src.json",
"references": [
{ "path": "../effect" }
{ "path": "../effect/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
Expand Down
4 changes: 3 additions & 1 deletion packages/vitest/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "./tsconfig.src.json",
"references": [{ "path": "../effect" }],
"references": [
{ "path": "../effect/tsconfig.build.json" }
],
"compilerOptions": {
"tsBuildInfoFile": ".tsbuildinfo/build.tsbuildinfo",
"outDir": "build/esm",
Expand Down

0 comments on commit 76277cb

Please sign in to comment.