@scalar/types 0.18.2 → 0.18.3

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,16 @@
1
1
  # @scalar/types
2
2
 
3
+ ## 0.18.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#9983](https://github.com/scalar/scalar/pull/9983): Bump the `zod` catalog to `^4.4.3` so the standalone bundle ships a single `zod` instead of two (`4.3.5` from `@scalar/types` plus `4.4.3` from the `ai` / `@ai-sdk` peer). This makes `standalone.js` ~68KB raw / ~18KB gzip smaller.
8
+ - [#9967](https://github.com/scalar/scalar/pull/9967): Add a new `@scalar/openapi-validator` package that validates OpenAPI documents on its own. `@scalar/openapi-parser` now uses it under the hood.
9
+
10
+ Two type-level changes in `@scalar/openapi-parser` are worth noting:
11
+ - `ErrorObject.path` is now `string | string[]` instead of `string[]`. Schema errors carry a JSON Pointer string, semantic errors carry path segments — both shapes were already produced at runtime, the type just says so now. Narrow with `Array.isArray` before treating it as a list.
12
+ - The unused `ValidationOutcome` type and the internal `OpenApiDocument` alias are no longer exported.
13
+
3
14
  ## 0.18.2
4
15
 
5
16
  ### Patch Changes
@@ -1,4 +1,4 @@
1
1
  export type { ENTITY_BRANDS } from './nanoid.js';
2
2
  export { nanoidSchema } from './nanoid.js';
3
- export type { UnknownObject } from './utility-types.js';
3
+ export type { AnyObject, UnknownObject } from './utility-types.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AACvC,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA"}
@@ -3,4 +3,10 @@
3
3
  * Useful for handling objects with dynamic or unknown value types.
4
4
  */
5
5
  export type UnknownObject = Record<string, unknown>;
6
+ /**
7
+ * Represents an object with string keys and values of any type.
8
+ * Prefer {@link UnknownObject} where possible; use this only when values are
9
+ * genuinely untyped and narrowing at every access site would be impractical.
10
+ */
11
+ export type AnyObject = Record<string, any>;
6
12
  //# sourceMappingURL=utility-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utility-types.d.ts","sourceRoot":"","sources":["../../src/utils/utility-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA"}
1
+ {"version":3,"file":"utility-types.d.ts","sourceRoot":"","sources":["../../src/utils/utility-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEnD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA"}
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "scalar",
17
17
  "references"
18
18
  ],
19
- "version": "0.18.2",
19
+ "version": "0.18.3",
20
20
  "engines": {
21
21
  "node": ">=22"
22
22
  },
@@ -126,8 +126,8 @@
126
126
  "dependencies": {
127
127
  "nanoid": "^5.1.6",
128
128
  "type-fest": "^5.8.0",
129
- "zod": "^4.3.5",
130
- "@scalar/helpers": "0.11.1"
129
+ "zod": "^4.4.3",
130
+ "@scalar/helpers": "0.11.2"
131
131
  },
132
132
  "devDependencies": {
133
133
  "@types/har-format": "^1.2.16",