@pikku/openapi-parser 0.12.18 → 0.12.20

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/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @pikku/openapi-parser
2
2
 
3
+ ## 0.12.20
4
+
5
+ ### Patch Changes
6
+
7
+ - 6eef0a0: Bump every dependency to its latest compatible minor/patch across the monorepo.
8
+ - 266e3bc: `#pikku` is a namespace, not a module: one subpath per wiring
9
+
10
+ The bare `#pikku` specifier resolved to `.pikku/pikku-types.gen.ts`, a hub that
11
+ re-exported all twelve wiring leaves with `export *` — undoing the split the
12
+ leaves exist for, each of which still says so in its own generated header
13
+ ("HTTP-specific type definitions for tree-shaking optimization"). Reaching that
14
+ hub put 33 distinct `@pikku/core` subpaths into the module graph, and neither
15
+ consumer could drop them again: bundlers keep `export *` chains because the app
16
+ declares no `sideEffects`, and Node and tsx do not tree-shake at all, so an app
17
+ with no queues still executed `@pikku/core/queue` at boot.
18
+
19
+ The hub is gone. An app now imports the leaf the name belongs to —
20
+ `#pikku/function`, `#pikku/http`, `#pikku/workflow` — and a project's `imports`
21
+ map declares two patterns, because both resolvers pick the more specific one:
22
+
23
+ ```json
24
+ "#pikku/*.js": "./.pikku/*.ts",
25
+ "#pikku/*": "./.pikku/*/index.ts"
26
+ ```
27
+
28
+ A source tree names the `.ts` on both. Webpack, esbuild and Bun all rewrite a
29
+ `.js` specifier to the `.ts` beside it for a relative import but not for an
30
+ imports-map target, so a `.js` target there resolves to a file that does not
31
+ exist. The two places that keep `.js` are the ones where it is the real file: a
32
+ published addon, whose map points into `dist`, and a project that imports a
33
+ declaration-only generated file such as `pikku-rpc-wirings-map.gen.d.ts`, where
34
+ naming the `.js` lets the type resolver's own mapping reach the `.d.ts`.
35
+
36
+ `pikku` generates the leaf indexes and removes the hub, and `pikku validate`
37
+ reports a barrel import as an error. The split also turns the addon boundary
38
+ from advice into a rule: an addon never generates the wiring leaves, so
39
+ `#pikku/http` fails at the specifier rather than yielding "no exported member"
40
+ from a hub that quietly dropped the re-export.
41
+
42
+ ## 0.12.19
43
+
44
+ ### Patch Changes
45
+
46
+ - a7fcd2e: Declare dependencies that were imported but missing from `package.json`
47
+
48
+ `@pikku/openapi-parser` and `@pikku/better-auth` imported `zod`, `@pikku/next`
49
+ imported `path-to-regexp`, `@pikku/cli` imported `kysely`, and
50
+ `@pikku/assistant-ui` imported `rxjs`, none of which were declared. Each
51
+ resolved through Yarn hoisting inside the monorepo and would fail for anyone
52
+ installing the package on its own.
53
+
54
+ `rxjs`, `kysely` and `path-to-regexp` reach consumers through public
55
+ signatures — `Observable<BaseEvent>` is the return type of a published method,
56
+ and `createCoercionPlugin` returns a `KyselyPlugin` — so they are runtime
57
+ dependencies rather than build-only ones.
58
+
59
+ `@pikku/assistant-ui` pins `rxjs` to the exact `7.8.1` that `@ag-ui/client`
60
+ pins, rather than a caret range. The two packages exchange `Observable`s, so a
61
+ range that floats to a second copy gives them two incompatible `Observable`
62
+ types.
63
+
64
+ `@pikku/kysely` also drops `SqliteSerializePlugin`, an alias of
65
+ `SerializePlugin` that has been marked `@deprecated` in favour of it. Use
66
+ `SerializePlugin`.
67
+
3
68
  ## 0.12.18
4
69
 
5
70
  ### Patch Changes
package/dist/codegen.js CHANGED
@@ -520,7 +520,7 @@ function generateFunctionFile(named, parsed, vars, ctx, spec, flags, inlineSchem
520
520
  if (needsZod) {
521
521
  lines.push("import { z } from 'zod'");
522
522
  }
523
- lines.push("import { pikkuSessionlessFunc } from '#pikku'");
523
+ lines.push("import { pikkuSessionlessFunc } from '#pikku/function'");
524
524
  if (errorClasses.length > 0) {
525
525
  lines.push(`import { ${errorClasses.join(', ')} } from '@pikku/core/errors'`);
526
526
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { parseOpenAPISpec, computeContractHash, type ParsedSpec, } from './parse-openapi.js';
2
2
  export { generateAddonFromOpenAPI } from './codegen.js';
3
3
  export { loadAuthConfig, type AuthConfig, type DelegatedLoginConfig, } from './auth-config.js';
4
- export { type NamedOperation, } from './naming.js';
4
+ export { type NamedOperation } from './naming.js';
5
5
  export { type OpenAPISchema, type ZodCodegenContext, createContext, schemaToZod, schemaVarName, sanitizeTypeName, } from './openapi-to-zod-schema.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/openapi-parser",
3
- "version": "0.12.18",
3
+ "version": "0.12.20",
4
4
  "description": "OpenAPI spec parser and code generator for Pikku",
5
5
  "author": "yasser.fadl@gmail.com",
6
6
  "license": "MIT",
@@ -18,9 +18,10 @@
18
18
  ".": "./dist/index.js"
19
19
  },
20
20
  "dependencies": {
21
- "yaml": "^2.7.1"
21
+ "yaml": "^2.9.0",
22
+ "zod": "^4"
22
23
  },
23
24
  "devDependencies": {
24
25
  "typescript": "^6.0.3"
25
26
  }
26
- }
27
+ }
package/src/codegen.ts CHANGED
@@ -716,7 +716,7 @@ function generateFunctionFile(
716
716
  if (needsZod) {
717
717
  lines.push("import { z } from 'zod'")
718
718
  }
719
- lines.push("import { pikkuSessionlessFunc } from '#pikku'")
719
+ lines.push("import { pikkuSessionlessFunc } from '#pikku/function'")
720
720
 
721
721
  if (errorClasses.length > 0) {
722
722
  lines.push(
package/src/index.ts CHANGED
@@ -12,9 +12,7 @@ export {
12
12
  type DelegatedLoginConfig,
13
13
  } from './auth-config.js'
14
14
 
15
- export {
16
- type NamedOperation,
17
- } from './naming.js'
15
+ export { type NamedOperation } from './naming.js'
18
16
 
19
17
  export {
20
18
  type OpenAPISchema,