Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
fix type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-smart committed Oct 5, 2023
1 parent c2bcc96 commit e131cde
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 62 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm run tc
- run: pnpm run build
- run: pnpm run circular
- run: pnpm run test
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PR Flow
on:
pull_request:
branches:
- 'main'
- "main"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -49,6 +49,7 @@ jobs:
restore-keys: |
${{ runner.os }}-pnpm-store-
- run: pnpm install
- run: pnpm run tc
- run: pnpm run build
- run: pnpm run circular
- run: pnpm run test --coverage
Expand Down
7 changes: 7 additions & 0 deletions .madgerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"detectiveOptions": {
"ts": {
"skipTypeImports": true
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@
"clean": "node scripts/clean.mjs && rimraf tsconfig.tsbuildinfo",
"build": "pnpm gen && preconstruct fix && preconstruct build && pnpm gen",
"gen": "build-utils prepare-v1",
"circular": "madge --ts-config ./tsconfig.json --circular --no-color --no-spinner packages/*",
"circular": "madge --extensions ts --circular --no-color --no-spinner packages/*/src",
"test": "vitest",
"autofix": "ultra -r autofix",
"docs": "ultra -r docgen && pnpm docs-cp",
"docs-cp": "node scripts/docs-cp.js",
"lint": "ultra -r lint",
"tc": "ultra -r tsc -b",
"version": "changeset version && pnpm install --no-frozen-lockfile"
},
"packageManager": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"effect": {
"generateIndex": false
"generateIndex": true
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-bun/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"effect": {
"generateIndex": false
"generateIndex": true
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"effect": {
"generateIndex": false
"generateIndex": true
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"effect": {
"generateIndex": false
"generateIndex": true
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/internal/http/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const schemaParams = <I extends Readonly<Record<string, string>>, A>(sche
)
}

class RouterImpl<R, E> extends Effectable.Effectable<
class RouterImpl<R, E> extends Effectable.StructuralClass<
Exclude<R, Router.RouteContext>,
E | Error.RouteNotFound,
ServerResponse.ServerResponse
Expand Down
2 changes: 1 addition & 1 deletion packages/platform/src/internal/http/serverResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import * as internalBody from "./body"
/** @internal */
export const TypeId: ServerResponse.TypeId = Symbol.for("@effect/platform/Http/ServerResponse") as ServerResponse.TypeId

class ServerResponseImpl extends Effectable.Effectable<never, never, ServerResponse.ServerResponse>
class ServerResponseImpl extends Effectable.StructuralClass<never, never, ServerResponse.ServerResponse>
implements ServerResponse.ServerResponse
{
readonly [TypeId]: ServerResponse.TypeId
Expand Down
4 changes: 3 additions & 1 deletion packages/platform/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {},
"compilerOptions": {
"outDir": "build"
},
"include": ["./src/**/*", "test/**/*", "examples/**/*"]
}
3 changes: 2 additions & 1 deletion scripts/clean.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import * as Glob from "glob";
[
".ultra.cache.json",
"build",
"tsconfig.tsbuildinfo",
"coverage",
...(pkg === "." ? [] : ["docs"]),
...files,
]
.filter((_) => _ !== "src")
.forEach((file) => {
Fs.rmSync(`${pkg}/${file}`, { recursive: true, force: true });
Fs.rm(`${pkg}/${file}`, { recursive: true, force: true }, () => {});
});
});
4 changes: 1 addition & 3 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,5 @@
},
"types": ["vitest/globals", "node"],
"plugins": [{ "name": "@effect/language-service" }]
},
"include": [],
"exclude": ["node_modules", "build", "lib"]
}
}
49 changes: 0 additions & 49 deletions tsconfig.madge.json

This file was deleted.

0 comments on commit e131cde

Please sign in to comment.