Comparing version 1.4.0 to 1.4.1
export { } | ||
export { } |
@@ -1,3 +0,3 @@ | ||
import { I as InputObject, S as Schema, a as SchemaDefinition } from './types-a304c6a0.js'; | ||
export { F as FunctionArg, c as InputValue, b as JSType, J as JSValue, R as ResolveFn, T as TypeDescriptor } from './types-a304c6a0.js'; | ||
import { I as InputObject, S as Schema, a as SchemaDefinition } from './shared/untyped.a47b2336.js'; | ||
export { F as FunctionArg, c as InputValue, b as JSType, J as JSValue, R as ResolveFn, T as TypeDescriptor } from './shared/untyped.a47b2336.js'; | ||
@@ -4,0 +4,0 @@ interface NormalizeSchemaOptions { |
@@ -1,1 +0,1 @@ | ||
export * from "./dist/loader"; | ||
export * from "./dist/loader/loader"; |
{ | ||
"name": "untyped", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "", | ||
@@ -10,20 +10,40 @@ "repository": "unjs/untyped", | ||
".": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
"import": { | ||
"types": "./dist/index.d.mts", | ||
"default": "./dist/index.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.d.cts" | ||
} | ||
}, | ||
"./babel-plugin": { | ||
"import": "./dist/babel.mjs", | ||
"require": "./dist/babel.cjs", | ||
"types": "./dist/babel.d.ts" | ||
"import": { | ||
"types": "./dist/loader/babel.d.mts", | ||
"default": "./dist/loader/babel.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/loader/babel.d.cts", | ||
"default": "./dist/loader/babel.cjs" | ||
} | ||
}, | ||
"./transform": { | ||
"import": "./dist/transform.mjs", | ||
"require": "./dist/transform.cjs", | ||
"types": "./dist/transform.d.ts" | ||
"import": { | ||
"types": "./dist/loader/transform.d.mts", | ||
"default": "./dist/loader/transform.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/loader/transform.d.cts", | ||
"default": "./dist/loader/transform.cjs" | ||
} | ||
}, | ||
"./loader": { | ||
"types": "./dist/loader.d.ts", | ||
"import": "./dist/loader.mjs", | ||
"require": "./dist/loader.cjs" | ||
"import": { | ||
"types": "./dist/loader/loader.d.mts", | ||
"default": "./dist/loader/loader.mjs" | ||
}, | ||
"require": { | ||
"types": "./dist/loader/loader.d.cts", | ||
"default": "./dist/loader/loader.cjs" | ||
} | ||
} | ||
@@ -53,33 +73,33 @@ }, | ||
"dependencies": { | ||
"@babel/core": "^7.22.9", | ||
"@babel/standalone": "^7.22.9", | ||
"@babel/types": "^7.22.5", | ||
"defu": "^6.1.2", | ||
"jiti": "^1.19.1", | ||
"@babel/core": "^7.23.7", | ||
"@babel/standalone": "^7.23.8", | ||
"@babel/types": "^7.23.6", | ||
"defu": "^6.1.4", | ||
"jiti": "^1.21.0", | ||
"mri": "^1.2.0", | ||
"scule": "^1.0.0" | ||
"scule": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/template": "^7.22.5", | ||
"@babel/template": "^7.22.15", | ||
"@types/babel__standalone": "latest", | ||
"@types/babel__traverse": "latest", | ||
"@types/node": "^20.4.5", | ||
"@vitest/coverage-v8": "^0.33.0", | ||
"@vue/compiler-sfc": "^3.3.4", | ||
"changelogen": "^0.5.4", | ||
"eslint": "^8.45.0", | ||
"@types/node": "^20.11.5", | ||
"@vitest/coverage-v8": "^1.2.1", | ||
"@vue/compiler-sfc": "^3.4.15", | ||
"changelogen": "^0.5.5", | ||
"eslint": "^8.56.0", | ||
"eslint-config-unjs": "^0.2.1", | ||
"hljs": "^6.2.3", | ||
"json-schema": "^0.4.0", | ||
"marked": "^5.1.2", | ||
"monaco-editor": "^0.40.0", | ||
"nuxt": "^3.6.5", | ||
"marked": "^11.1.1", | ||
"monaco-editor": "^0.45.0", | ||
"nuxt": "^3.9.3", | ||
"nuxt-windicss": "^2.6.1", | ||
"prettier": "^3.0.0", | ||
"prettier": "^3.2.4", | ||
"prismjs": "^1.29.0", | ||
"typescript": "^5.1.6", | ||
"unbuild": "^1.2.1", | ||
"vitest": "^0.33.0" | ||
"typescript": "^5.3.3", | ||
"unbuild": "^2.0.0", | ||
"vitest": "^1.2.1" | ||
}, | ||
"packageManager": "pnpm@8.6.10" | ||
"packageManager": "pnpm@8.14.1" | ||
} |
@@ -30,16 +30,16 @@ # untyped | ||
const defaultPlanet = { | ||
name: 'earth', | ||
name: "earth", | ||
specs: { | ||
gravity: { | ||
$resolve: val => parseFloat(val), | ||
$default: '9.8' | ||
$resolve: (val) => parseFloat(val), | ||
$default: "9.8", | ||
}, | ||
moons: { | ||
$resolve: (val = ['moon']) => [].concat(val), | ||
$resolve: (val = ["moon"]) => [].concat(val), | ||
$schema: { | ||
title: 'planet moons' | ||
} | ||
} | ||
} | ||
} | ||
title: "planet moons", | ||
}, | ||
}, | ||
}, | ||
}; | ||
``` | ||
@@ -52,5 +52,5 @@ | ||
```js | ||
import { resolveSchema } from 'untyped' | ||
import { resolveSchema } from "untyped"; | ||
const schema = await resolveSchema(defaultPlanet) | ||
const schema = await resolveSchema(defaultPlanet); | ||
``` | ||
@@ -75,5 +75,3 @@ | ||
"title": "planet moons", | ||
"default": [ | ||
"moon" | ||
], | ||
"default": ["moon"], | ||
"type": "array", | ||
@@ -93,8 +91,9 @@ "items": [ | ||
``` | ||
### `generateTypes` | ||
```js | ||
import { resolveSchema, generateTypes } from 'untyped' | ||
import { resolveSchema, generateTypes } from "untyped"; | ||
const types = generateTypes(await resolveSchema(defaultPlanet)) | ||
const types = generateTypes(await resolveSchema(defaultPlanet)); | ||
``` | ||
@@ -106,8 +105,8 @@ | ||
interface Untyped { | ||
/** @default "earth" */ | ||
name: string, | ||
/** @default "earth" */ | ||
name: string; | ||
specs: { | ||
/** @default 9.8 */ | ||
gravity: number, | ||
gravity: number; | ||
@@ -117,5 +116,5 @@ /** | ||
* @default ["moon"] | ||
*/ | ||
moons: string[], | ||
}, | ||
*/ | ||
moons: string[]; | ||
}; | ||
} | ||
@@ -127,5 +126,5 @@ ``` | ||
```js | ||
import { resolveSchema, generateMarkdown } from 'untyped' | ||
import { resolveSchema, generateMarkdown } from "untyped"; | ||
const markdown = generateMarkdown(await resolveSchema(defaultPlanet)) | ||
const markdown = generateMarkdown(await resolveSchema(defaultPlanet)); | ||
``` | ||
@@ -137,14 +136,15 @@ | ||
# `name` | ||
- **Type**: `string` | ||
- **Default**: `"earth"` | ||
# `specs` | ||
## `gravity` | ||
- **Type**: `number` | ||
- **Default**: `9.8` | ||
## `moons` | ||
## `moons` | ||
- **Type**: `array` | ||
@@ -170,15 +170,12 @@ - **Default**: `["moon"]` | ||
<!-- Badges --> | ||
[npm-version-src]: https://img.shields.io/npm/v/untyped?style=flat-square | ||
[npm-version-href]: https://npmjs.com/package/untyped | ||
[npm-downloads-src]: https://img.shields.io/npm/dm/untyped?style=flat-square | ||
[npm-downloads-href]: https://npmjs.com/package/untyped | ||
[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/untyped/ci/main?style=flat-square | ||
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/unjs/untyped/ci.yml?branch-main&style=flat-square | ||
[github-actions-href]: https://github.com/unjs/untyped/actions?query=workflow%3Aci | ||
[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/untyped/main?style=flat-square | ||
[codecov-href]: https://codecov.io/gh/unjs/untyped | ||
[bundle-src]: https://img.shields.io/bundlephobia/minzip/untyped?style=flat-square | ||
[bundle-href]: https://bundlephobia.com/result?p=untyped |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71160
38
1826
173
Updated@babel/core@^7.23.7
Updated@babel/standalone@^7.23.8
Updated@babel/types@^7.23.6
Updateddefu@^6.1.4
Updatedjiti@^1.21.0
Updatedscule@^1.2.0