From 66a8fc39795da73afb985b506ef71f03b44a36df Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 8 Oct 2022 16:07:43 -0500 Subject: [PATCH] fix(build): reduce coverage requirements to match previous, fix typedef warnings --- config/api-extractor.json | 2 +- config/node.mk | 4 ++ .../api/js-yaml-schema.createincludeschema.md | 2 +- .../js-yaml-schema.includeschemaoptions.md | 1 + docs/js-yaml-schema.api.md | 63 +++++++++++++++++++ src/schema.ts | 4 +- 6 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 docs/js-yaml-schema.api.md diff --git a/config/api-extractor.json b/config/api-extractor.json index 2bbeed9..e9b5ab9 100644 --- a/config/api-extractor.json +++ b/config/api-extractor.json @@ -4,7 +4,7 @@ "mainEntryPointFilePath": "/out/src/index.d.ts", "apiReport": { "enabled": true, - "reportFolder": "/out/", + "reportFolder": "/docs/", "reportTempFolder": "/out/tmp/" }, "docModel": { diff --git a/config/node.mk b/config/node.mk index 39fdec1..907e6e0 100644 --- a/config/node.mk +++ b/config/node.mk @@ -32,6 +32,10 @@ clean-deps: ## clean up the node_modules directory COVER_ARGS := --all \ --check-coverage \ + --branches 75 \ + --functions 75 \ + --lines 75 \ + --statements 75 \ --exclude ".eslintrc.js" \ --exclude "config/**" \ --exclude "docs/**" \ diff --git a/docs/api/js-yaml-schema.createincludeschema.md b/docs/api/js-yaml-schema.createincludeschema.md index ee8b47d..f61affc 100644 --- a/docs/api/js-yaml-schema.createincludeschema.md +++ b/docs/api/js-yaml-schema.createincludeschema.md @@ -6,7 +6,7 @@ > Warning: This API is now obsolete. > -> use `createSchema` unless the include type is needed, since it requires a number of callbacks +> either use `createSchema` by itself, or `createInclude` and extend the schema yourself > Extended schema with the include type, and auto-configuration of the include schema. diff --git a/docs/api/js-yaml-schema.includeschemaoptions.md b/docs/api/js-yaml-schema.includeschemaoptions.md index 1b743a7..07d4bd5 100644 --- a/docs/api/js-yaml-schema.includeschemaoptions.md +++ b/docs/api/js-yaml-schema.includeschemaoptions.md @@ -6,6 +6,7 @@ > Warning: This API is now obsolete. > +> either use `createSchema` by itself, or `createInclude` and extend the schema yourself > Signature: diff --git a/docs/js-yaml-schema.api.md b/docs/js-yaml-schema.api.md new file mode 100644 index 0000000..ac238d1 --- /dev/null +++ b/docs/js-yaml-schema.api.md @@ -0,0 +1,63 @@ +## API Report File for "@apextoaster/js-yaml-schema" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { Maybe } from '@apextoaster/js-utils'; +import { Schema } from 'js-yaml'; +import { Type } from 'js-yaml'; + +// Warning: (ae-forgotten-export) The symbol "IncludeResult" needs to be exported by the entry point index.d.ts +// +// @public +export function createInclude(options: Readonly): IncludeResult; + +// @public @deprecated +export function createIncludeSchema(options: Readonly): Schema; + +// @public (undocumented) +export function createSchema(options: SchemaOptions): Schema; + +// @public (undocumented) +export const envType: Type; + +// @public +export interface IncludeOptions { + // (undocumented) + exists: (path: string) => boolean; + // (undocumented) + join: (...path: Array) => string; + // Warning: (ae-forgotten-export) The symbol "IncludeReader" needs to be exported by the entry point index.d.ts + // + // (undocumented) + read: IncludeReader; + // (undocumented) + resolve: (path: string) => string; + // (undocumented) + schema: Maybe; +} + +// @public @deprecated (undocumented) +export interface IncludeSchemaOptions { + // (undocumented) + base?: Schema; + // (undocumented) + include: Readonly>; +} + +// @public (undocumented) +export const regexpType: Type; + +// @public (undocumented) +export interface SchemaOptions { + // (undocumented) + base?: Schema; +} + +// @public (undocumented) +export const streamType: Type; + +// (No @packageDocumentation comment for this package) + +``` diff --git a/src/schema.ts b/src/schema.ts index e54ceac..b1f7981 100644 --- a/src/schema.ts +++ b/src/schema.ts @@ -28,7 +28,7 @@ export function createSchema(options: SchemaOptions): Schema { /** * @public - * @deprecated + * @deprecated either use `createSchema` by itself, or `createInclude` and extend the schema yourself */ export interface IncludeSchemaOptions { base?: Schema; @@ -40,7 +40,7 @@ export interface IncludeSchemaOptions { * of the include schema. * * @public - * @deprecated use `createSchema` unless the include type is needed, since it requires a number of callbacks + * @deprecated either use `createSchema` by itself, or `createInclude` and extend the schema yourself */ export function createIncludeSchema(options: Readonly): Schema { const base = mustDefault(options.base, DEFAULT_SCHEMA);