Skip to content

Commit 217ef30

Browse files
authored
chore: update dependencies (#697)
* chore: update dependencies * chore: align setup with effect monorepo
1 parent 09d6b37 commit 217ef30

28 files changed

+1408
-1614
lines changed

.eslintrc.cjs

Lines changed: 0 additions & 91 deletions
This file was deleted.

.github/workflows/check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
uses: ./.github/actions/setup
2323
- run: pnpm check
2424
- run: pnpm lint
25+
- run: pnpm test-types

eslint.config.mjs

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
import { fixupPluginRules } from "@eslint/compat"
2+
import { FlatCompat } from "@eslint/eslintrc"
3+
import js from "@eslint/js"
4+
import tsParser from "@typescript-eslint/parser"
5+
import codegen from "eslint-plugin-codegen"
6+
import _import from "eslint-plugin-import"
7+
import simpleImportSort from "eslint-plugin-simple-import-sort"
8+
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
9+
import path from "node:path"
10+
import { fileURLToPath } from "node:url"
11+
12+
const __filename = fileURLToPath(import.meta.url)
13+
const __dirname = path.dirname(__filename)
14+
const compat = new FlatCompat({
15+
baseDirectory: __dirname,
16+
recommendedConfig: js.configs.recommended,
17+
allConfig: js.configs.all
18+
})
19+
20+
export default [
21+
{
22+
ignores: ["**/dist", "**/build", "**/docs", "**/*.md"]
23+
},
24+
...compat.extends(
25+
"eslint:recommended",
26+
"plugin:@typescript-eslint/eslint-recommended",
27+
"plugin:@typescript-eslint/recommended",
28+
"plugin:@effect/recommended"
29+
),
30+
{
31+
plugins: {
32+
import: fixupPluginRules(_import),
33+
"sort-destructure-keys": sortDestructureKeys,
34+
"simple-import-sort": simpleImportSort,
35+
codegen
36+
},
37+
38+
languageOptions: {
39+
parser: tsParser,
40+
ecmaVersion: 2018,
41+
sourceType: "module"
42+
},
43+
44+
settings: {
45+
"import/parsers": {
46+
"@typescript-eslint/parser": [".ts", ".tsx"]
47+
},
48+
49+
"import/resolver": {
50+
typescript: {
51+
alwaysTryTypes: true
52+
}
53+
}
54+
},
55+
56+
rules: {
57+
"codegen/codegen": "error",
58+
"no-fallthrough": "off",
59+
"no-irregular-whitespace": "off",
60+
"object-shorthand": "error",
61+
"prefer-destructuring": "off",
62+
"sort-imports": "off",
63+
64+
"no-restricted-syntax": [
65+
"error",
66+
{
67+
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
68+
message: "Do not use spread arguments in Array.push"
69+
}
70+
],
71+
72+
"no-unused-vars": "off",
73+
"require-yield": "off",
74+
"prefer-rest-params": "off",
75+
"prefer-spread": "off",
76+
"import/first": "error",
77+
"import/newline-after-import": "error",
78+
"import/no-duplicates": "error",
79+
"import/no-unresolved": "off",
80+
"import/order": "off",
81+
"simple-import-sort/imports": "off",
82+
"sort-destructure-keys/sort-destructure-keys": "error",
83+
"deprecation/deprecation": "off",
84+
85+
"@typescript-eslint/array-type": [
86+
"warn",
87+
{
88+
default: "generic",
89+
readonly: "generic"
90+
}
91+
],
92+
93+
"@typescript-eslint/member-delimiter-style": 0,
94+
"@typescript-eslint/no-non-null-assertion": "off",
95+
"@typescript-eslint/ban-types": "off",
96+
"@typescript-eslint/no-explicit-any": "off",
97+
"@typescript-eslint/no-empty-interface": "off",
98+
"@typescript-eslint/consistent-type-imports": "warn",
99+
100+
"@typescript-eslint/no-unused-vars": [
101+
"error",
102+
{
103+
argsIgnorePattern: "^_",
104+
varsIgnorePattern: "^_"
105+
}
106+
],
107+
108+
"@typescript-eslint/ban-ts-comment": "off",
109+
"@typescript-eslint/camelcase": "off",
110+
"@typescript-eslint/explicit-function-return-type": "off",
111+
"@typescript-eslint/explicit-module-boundary-types": "off",
112+
"@typescript-eslint/interface-name-prefix": "off",
113+
"@typescript-eslint/no-array-constructor": "off",
114+
"@typescript-eslint/no-use-before-define": "off",
115+
"@typescript-eslint/no-namespace": "off",
116+
117+
"@effect/dprint": [
118+
"error",
119+
{
120+
config: {
121+
indentWidth: 2,
122+
lineWidth: 120,
123+
semiColons: "asi",
124+
quoteStyle: "alwaysDouble",
125+
trailingCommas: "never",
126+
operatorPosition: "maintain",
127+
"arrowFunction.useParentheses": "force"
128+
}
129+
}
130+
]
131+
}
132+
},
133+
{
134+
files: ["packages/*/src/**/*", "packages/*/test/**/*"],
135+
rules: {
136+
"no-console": "error"
137+
}
138+
}
139+
]
140+

package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,44 @@
1515
"lint": "eslint \"**/{src,test,examples,scripts,dtslint}/**/*.{ts,mjs}\"",
1616
"lint-fix": "pnpm lint --fix",
1717
"docgen": "pnpm --recursive --parallel exec docgen && node scripts/docs.mjs",
18-
"dtslint": "pnpm --recursive --parallel run dtslint",
19-
"dtslint-clean": "dtslint --installAll",
18+
"test-types": "tstyche",
2019
"changeset-publish": "pnpm build && changeset publish"
2120
},
2221
"devDependencies": {
23-
"@babel/cli": "^7.25.9",
24-
"@babel/core": "^7.26.0",
22+
"@babel/cli": "^7.26.4",
23+
"@babel/core": "^7.26.9",
2524
"@babel/plugin-transform-export-namespace-from": "^7.25.9",
26-
"@babel/plugin-transform-modules-commonjs": "^7.25.9",
25+
"@babel/plugin-transform-modules-commonjs": "^7.26.3",
2726
"@changesets/changelog-github": "^0.5.0",
2827
"@changesets/cli": "^2.27.9",
29-
"@effect/build-utils": "^0.7.8",
28+
"@effect/build-utils": "^0.7.9",
3029
"@effect/docgen": "^0.5.2",
31-
"@effect/dtslint": "^0.1.2",
3230
"@effect/eslint-plugin": "^0.2.0",
3331
"@effect/language-service": "^0.2.0",
34-
"@effect/vitest": "^0.18.0",
35-
"@types/node": "^22.9.0",
32+
"@effect/vitest": "^0.19.2",
33+
"@eslint/compat": "^1.1.1",
34+
"@eslint/eslintrc": "^3.1.0",
35+
"@eslint/js": "^9.9.1",
36+
"@types/node": "^22.13.8",
3637
"@types/swagger-ui-dist": "^3.30.5",
37-
"@typescript-eslint/eslint-plugin": "^8.13.0",
38-
"@typescript-eslint/parser": "^8.13.0",
39-
"@vitest/coverage-v8": "^2.1.4",
40-
"babel-plugin-annotate-pure-calls": "^0.4.0",
41-
"eslint": "^8.57.0",
38+
"@typescript-eslint/eslint-plugin": "^8.25.0",
39+
"@typescript-eslint/parser": "^8.25.0",
40+
"@vitest/coverage-v8": "^3.0.7",
41+
"babel-plugin-annotate-pure-calls": "^0.5.0",
42+
"eslint": "^9.9.1",
4243
"eslint-import-resolver-typescript": "^3.6.3",
43-
"eslint-plugin-codegen": "0.29.0",
44-
"eslint-plugin-deprecation": "^3.0.0",
45-
"eslint-plugin-import": "^2.31.0",
44+
"eslint-plugin-codegen": "^0.28.0",
45+
"eslint-plugin-import": "^2.30.0",
4646
"eslint-plugin-simple-import-sort": "^12.1.1",
4747
"eslint-plugin-sort-destructure-keys": "^2.0.0",
48-
"glob": "^11.0.0",
48+
"glob": "^11.0.1",
4949
"madge": "^8.0.0",
50-
"prettier": "^3.3.3",
50+
"prettier": "^3.5.2",
5151
"rimraf": "^6.0.1",
52-
"tsx": "^4.19.2",
53-
"typescript": "^5.6.3",
54-
"vitest": "^2.1.4"
52+
"tstyche": "^3.5.0",
53+
"tsx": "^4.19.3",
54+
"typescript": "^5.8.2",
55+
"vitest": "^3.0.7"
5556
},
5657
"pnpm": {
5758
"updateConfig": {

packages/effect-http-node/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"coverage": "vitest --coverage"
3030
},
3131
"dependencies": {
32-
"swagger-ui-dist": "^5.18.3"
32+
"swagger-ui-dist": "^5.20.0"
3333
},
3434
"peerDependencies": {
3535
"@effect/platform": "^0.77.0",
@@ -38,11 +38,11 @@
3838
"effect-http": "workspace:^"
3939
},
4040
"devDependencies": {
41-
"@effect/platform": "^0.77.1",
42-
"@effect/platform-bun": "^0.57.1",
43-
"@effect/platform-node": "^0.73.1",
44-
"@types/node": "^22.9.0",
45-
"effect": "^3.13.1",
41+
"@effect/platform": "^0.77.4",
42+
"@effect/platform-bun": "^0.57.4",
43+
"@effect/platform-node": "^0.73.4",
44+
"@types/node": "^22.13.8",
45+
"effect": "^3.13.4",
4646
"effect-http": "workspace:^"
4747
}
4848
}

packages/effect-http/dtslint/Api.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import type { ApiEndpoint } from "effect-http"
2+
import { Api } from "effect-http"
3+
import { describe, expect, it } from "tstyche"
4+
5+
describe("Api", () => {
6+
it("make", () => {
7+
expect(Api.make().pipe(Api.setOptions({ title: "My API" }))).type.toBe<Api.Api<never>>()
8+
})
9+
10+
it("make with addEndpoint", () => {
11+
expect(
12+
Api.make().pipe(
13+
Api.addEndpoint(Api.get("hello", "/hello")),
14+
Api.setOptions({ title: "My API" })
15+
)
16+
).type.toBe<Api.Api<ApiEndpoint.ApiEndpoint.Default<"hello">>>()
17+
18+
expect(
19+
Api.make().pipe(
20+
Api.addEndpoint(
21+
Api.get("hello", "/hello").pipe(
22+
Api.setEndpointOptions({ description: "My endpoint" })
23+
)
24+
),
25+
Api.setOptions({ title: "My API" })
26+
)
27+
).type.toBe<Api.Api<ApiEndpoint.ApiEndpoint.Default<"hello">>>()
28+
})
29+
})

0 commit comments

Comments
 (0)