New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

yaschema-api

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yaschema-api - npm Package Compare versions

Comparing version 2.0.3 to 2.1.0

lib/cjs/config/exports.js

1

lib/types/exports.d.ts

@@ -19,2 +19,3 @@ export * from './AnyBody';

export * from './HttpMethod';
export * from './HttpRequestType';
export * from './HttpResponseType';

@@ -21,0 +22,0 @@ export * from './OptionalIfPossiblyUndefined';

@@ -9,2 +9,3 @@ import type { AnyBody } from './AnyBody';

import type { HttpMethod } from './HttpMethod';
import type { HttpRequestType } from './HttpRequestType';
import type { HttpResponseType } from './HttpResponseType';

@@ -18,2 +19,18 @@ /** An HTTP API description */

/**
* The type of request to make.
*
* ### form-data
*
* The responsibility for encoding requests is handled by separate packages, such as
* [yaschema-api-fetcher](https://www.npmjs.com/package/yaschema-api-fetcher), but generally, for `"form-data"`, body fields will be
* encoded similarly to how query fields are sent. That is, one should generally use `setAllowedSerializationForms` on numbers and
* booleans, since primitives are encoded as strings and arrays will be sent using the `[]` suffixed field names. Unlike queries
* however, form data supports Files. [express-yaschema-api-handler](https://www.npmjs.com/package/express-yaschema-api-handler)
* and [yaschema-api-fetcher](https://www.npmjs.com/package/yaschema-api-fetcher) also support JSON-encoded form data fields, which are
* automatically prefixed with `yaschema/json:` (for encoding objects and nested arrays, for example).
*
* @defaultValue `"json"`
*/
requestType?: HttpRequestType;
/**
* The type of response that will be generated. Use `"dynamic"` if the response type will be determined dynamically.

@@ -20,0 +37,0 @@ *

35

package.json
{
"name": "yaschema-api",
"version": "2.0.3",
"version": "2.1.0",
"description": "Yet another API",

@@ -11,3 +11,4 @@ "keywords": [

],
"main": "lib/index.js",
"main": "lib/cjs/index.js",
"module": "lib/mjs/index.js",
"types": "lib/index.d.ts",

@@ -19,6 +20,6 @@ "repository": "https://github.com/TypeScript-OSS/yaschema-api.git",

"scripts": {
"build": "tsc -p tsconfig.build.json",
"build": "tsc -p tsconfig.cjs.json && tsc -p tsconfig.mjs.json",
"build:dev": "trash dev-build && yarn build && mkdir dev-build && cp -r lib dev-build && cp package.json dev-build && (cd dev-build && echo 'package' `pwd`)",
"clean": "trash coverage dev-build docs lib",
"generate:docs": "npx typedoc src/index.ts",
"generate:docs": "npx typedoc src/index.ts --skipErrorChecking",
"lint": "eslint 'src/**/*.ts?(x)' --max-warnings 0",

@@ -29,16 +30,16 @@ "prepublishOnly": "yarn clean && yarn test && yarn lint && yarn test:audit && yarn clean && yarn build && yarn generate:docs",

"test:check-circular-dependencies": "yarn build && npx madge --circular ./lib",
"test:unit-tests:": "npx jest --runInBand --coverage",
"test:unit-tests:": "NODE_OPTIONS=--experimental-vm-modules npx jest --runInBand --coverage",
"test:unit-tests": "yarn test:unit-tests: src"
},
"dependencies": {
"yaschema": "^2.0.2"
"yaschema": "^2.1.0"
},
"devDependencies": {
"@types/jest": "^29.4.4",
"@types/lodash": "4.14.191",
"@typescript-eslint/eslint-plugin": "^5.55.0",
"@typescript-eslint/parser": "^5.55.0",
"eslint": "8.36.0",
"eslint-config-prettier": "^8.7.0",
"eslint-import-resolver-typescript": "^3.5.3",
"@types/jest": "^29.5.1",
"@types/lodash": "4.14.194",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"eslint": "8.39.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-import": "^2.27.5",

@@ -52,8 +53,8 @@ "eslint-plugin-prefer-arrow": "^1.2.3",

"madge": "6.0.0",
"prettier": "2.8.4",
"prettier": "2.8.8",
"trash-cli": "5.0.0",
"ts-jest": "^29.0.5",
"typedoc": "^0.23.27",
"typescript": "4.9.5"
"ts-jest": "^29.1.0",
"typedoc": "^0.24.6",
"typescript": "5.0.4"
}
}

@@ -19,2 +19,3 @@ export * from './AnyBody';

export * from './HttpMethod';
export * from './HttpRequestType';
export * from './HttpResponseType';

@@ -21,0 +22,0 @@ export * from './OptionalIfPossiblyUndefined';

@@ -9,2 +9,3 @@ import type { AnyBody } from './AnyBody';

import type { HttpMethod } from './HttpMethod';
import type { HttpRequestType } from './HttpRequestType';
import type { HttpResponseType } from './HttpResponseType';

@@ -31,2 +32,18 @@

/**
* The type of request to make.
*
* ### form-data
*
* The responsibility for encoding requests is handled by separate packages, such as
* [yaschema-api-fetcher](https://www.npmjs.com/package/yaschema-api-fetcher), but generally, for `"form-data"`, body fields will be
* encoded similarly to how query fields are sent. That is, one should generally use `setAllowedSerializationForms` on numbers and
* booleans, since primitives are encoded as strings and arrays will be sent using the `[]` suffixed field names. Unlike queries
* however, form data supports Files. [express-yaschema-api-handler](https://www.npmjs.com/package/express-yaschema-api-handler)
* and [yaschema-api-fetcher](https://www.npmjs.com/package/yaschema-api-fetcher) also support JSON-encoded form data fields, which are
* automatically prefixed with `yaschema/json:` (for encoding objects and nested arrays, for example).
*
* @defaultValue `"json"`
*/
requestType?: HttpRequestType;
/**
* The type of response that will be generated. Use `"dynamic"` if the response type will be determined dynamically.

@@ -33,0 +50,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc