@party-stack/build-config 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -39,3 +39,47 @@ in the workspace root.
39
39
  The package builds during installation. After editing it, run
40
40
  `vp run @party-stack/build-config#build`. If its `lib` output is missing, bootstrap
41
41
  with `pnpm exec vp -C packages/build-config pack`.
42
+
43
+ ## Effect libraries
44
+
45
+ Effect packages opt in to separate presets; the ordinary library preset is unchanged:
46
+
47
+ ```ts
48
+ import { defineEffectLibraryConfig } from "@party-stack/build-config/effect";
49
+
50
+ export default defineEffectLibraryConfig();
51
+ ```
52
+
53
+ ```json
54
+ {
55
+ "extends": "@party-stack/build-config/effect/tsconfig.json"
56
+ }
57
+ ```
58
+
59
+ This adds Effect's recommended type-aware lint rules and language-service plugin.
60
+ The root prepare hook patches workspace TypeScript 7 and Vite+'s bundled Oxlint via
61
+ `effect-tsgo patch --oxlint`. The lockfile pins the integration version. Ordinary
62
+ libraries do not opt in to the Effect rules or TypeScript plugin.
63
+
64
+ VS Code uses the workspace TypeScript SDK, and the recommended Effect extension
65
+ provides debugger utilities. Its extension does not itself install the language
66
+ service; that comes from the repository's `@effect/tsgo` dependency and patch step.
67
+ Diagnostics are disabled in the editor plugin to avoid duplicate reports from
68
+ Vite+/Oxc; editor hovers/refactors remain available. Reload the editor's TypeScript
69
+ server after the first installation. See [Effect's development guide](https://effect.website/docs/v4/getting-started/devtools).
70
+
71
+ ### Effect tests and repository guidance
72
+
73
+ Official skills are installed under `.agents/skills`. Read the installed root
74
+ `node_modules/effect/AGENTS.md` completely before writing Effect code, following
75
+ its version-matched links for errors, services, schemas, resources, and tests.
76
+ Reusable Effect functions use `Effect.fnUntraced` unless a named tracing boundary
77
+ is useful. Infrastructure errors use `Schema.TaggedError`; application records
78
+ are not required to use Schema.
79
+
80
+ The Effect preset maps `vitest` to `vite-plus/test` and inlines `@effect/vitest`,
81
+ so Effect's test helpers use Vite+'s runner instead of registering with a second
82
+ Vitest instance. Install `@effect/vitest` in packages that use it. `it.effect`
83
+ provides Effect test services; use `it.live` for integration tests that need real
84
+ time or native I/O. The ordinary library preset does not add these defaults.
85
+ Caller test aliases and inlined dependencies are merged with the Effect defaults.
@@ -0,0 +1,7 @@
1
+ import { LibraryConfig } from "./index.js";
2
+ import { ViteUserConfig } from "vite-plus";
3
+ //#region src/effect.d.ts
4
+ /** Opt in to Effect's type-aware diagnostics without changing ordinary libraries. */
5
+ export declare function defineEffectLibraryConfig(config?: LibraryConfig): ViteUserConfig;
6
+ //#endregion
7
+ //# sourceMappingURL=effect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect.d.ts","names":[],"sources":["../src/effect.ts"],"mappings":";;;;wBAKgB,0BAA0B,SAAQ,gBAAqB"}
package/lib/effect.js ADDED
@@ -0,0 +1,34 @@
1
+ import { defineLibraryConfig } from "./index.js";
2
+ import { recommended } from "@effect/tsgo/oxlint-presets";
3
+ import { mergeConfig } from "vite-plus";
4
+ //#region src/effect.ts
5
+ /** Opt in to Effect's type-aware diagnostics without changing ordinary libraries. */
6
+ function defineEffectLibraryConfig(config = {}) {
7
+ return defineLibraryConfig({
8
+ ...config,
9
+ test: mergeConfig({
10
+ alias: [{
11
+ find: /^vitest$/,
12
+ replacement: "vite-plus/test"
13
+ }],
14
+ server: { deps: { inline: ["@effect/vitest"] } }
15
+ }, config.test ?? {}),
16
+ lint: {
17
+ ...config.lint,
18
+ extends: [recommended, ...config.lint?.extends ?? []],
19
+ rules: {
20
+ "vitest/no-standalone-expect": ["warn", { additionalTestBlockFunctions: [
21
+ "it.effect",
22
+ "it.effect.prop",
23
+ "it.live",
24
+ "it.live.prop"
25
+ ] }],
26
+ ...config.lint?.rules
27
+ }
28
+ }
29
+ });
30
+ }
31
+ //#endregion
32
+ export { defineEffectLibraryConfig };
33
+
34
+ //# sourceMappingURL=effect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect.js","names":[],"sources":["../src/effect.ts"],"sourcesContent":["import { recommended } from \"@effect/tsgo/oxlint-presets\";\nimport { mergeConfig, type ViteUserConfig } from \"vite-plus\";\nimport { defineLibraryConfig, type LibraryConfig } from \"./index.js\";\n\n/** Opt in to Effect's type-aware diagnostics without changing ordinary libraries. */\nexport function defineEffectLibraryConfig(config: LibraryConfig = {}): ViteUserConfig {\n return defineLibraryConfig({\n ...config,\n test: mergeConfig(\n {\n alias: [{ find: /^vitest$/, replacement: \"vite-plus/test\" }],\n server: { deps: { inline: [\"@effect/vitest\"] } },\n },\n config.test ?? {}\n ),\n lint: {\n ...config.lint,\n extends: [recommended, ...(config.lint?.extends ?? [])],\n rules: {\n \"vitest/no-standalone-expect\": [\n \"warn\",\n {\n additionalTestBlockFunctions: [\n \"it.effect\",\n \"it.effect.prop\",\n \"it.live\",\n \"it.live.prop\",\n ],\n },\n ],\n ...config.lint?.rules,\n },\n },\n });\n}\n"],"mappings":";;;;;AAKA,SAAgB,0BAA0B,SAAwB,CAAC,GAAmB;CAClF,OAAO,oBAAoB;EACvB,GAAG;EACH,MAAM,YACF;GACI,OAAO,CAAC;IAAE,MAAM;IAAY,aAAa;GAAiB,CAAC;GAC3D,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,gBAAgB,EAAE,EAAE;EACnD,GACA,OAAO,QAAQ,CAAC,CACpB;EACA,MAAM;GACF,GAAG,OAAO;GACV,SAAS,CAAC,aAAa,GAAI,OAAO,MAAM,WAAW,CAAC,CAAE;GACtD,OAAO;IACH,+BAA+B,CAC3B,QACA,EACI,8BAA8B;KAC1B;KACA;KACA;KACA;IACJ,EACJ,CACJ;IACA,GAAG,OAAO,MAAM;GACpB;EACJ;CACJ,CAAC;AACL"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@party-stack/build-config",
3
- "version": "0.1.3",
3
+ "version": "0.2.0",
4
4
  "files": [
5
5
  "lib",
6
6
  "tsconfig"
@@ -13,11 +13,20 @@
13
13
  },
14
14
  "./tsconfig.json": "./tsconfig/library.json",
15
15
  "./react/tsconfig.json": "./tsconfig/react.json",
16
- "./app/tsconfig.json": "./tsconfig/app.json"
16
+ "./app/tsconfig.json": "./tsconfig/app.json",
17
+ "./effect": {
18
+ "types": "./lib/effect.d.ts",
19
+ "default": "./lib/effect.js"
20
+ },
21
+ "./effect/tsconfig.json": "./tsconfig/effect-library.json"
22
+ },
23
+ "dependencies": {
24
+ "@effect/tsgo": "^0.53.4"
17
25
  },
18
26
  "devDependencies": {
19
27
  "@types/node": "^24.10.1",
20
28
  "typescript": "~7.0.2",
29
+ "vite": "npm:@voidzero-dev/vite-plus-core@1.2.0",
21
30
  "vite-plus": "1.2.0"
22
31
  },
23
32
  "peerDependencies": {
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./library.json",
3
+ "compilerOptions": {
4
+ "plugins": [
5
+ {
6
+ "name": "@effect/language-service",
7
+ "diagnostics": false
8
+ }
9
+ ]
10
+ }
11
+ }