gatsby-plugin-utils
Advanced tools
Comparing version 0.2.26 to 0.2.27
@@ -6,2 +6,8 @@ # Change Log | ||
## [0.2.27](https://github.com/gatsbyjs/gatsby/compare/gatsby-plugin-utils@0.2.26...gatsby-plugin-utils@0.2.27) (2020-10-07) | ||
### Features | ||
- **gatsby:** plugin option validation ([#27242](https://github.com/gatsbyjs/gatsby/issues/27242)) ([9b01ca7](https://github.com/gatsbyjs/gatsby/commit/9b01ca7926efa1c4c6d58b33a137c2f0a0ef99b7)) | ||
## 0.2.26 (2020-10-06) | ||
@@ -8,0 +14,0 @@ |
export * from "./validate"; | ||
export * from "./joi"; |
@@ -10,2 +10,9 @@ "use strict"; | ||
exports[key] = _validate[key]; | ||
}); | ||
var _joi = require("./joi"); | ||
Object.keys(_joi).forEach(function (key) { | ||
if (key === "default" || key === "__esModule") return; | ||
exports[key] = _joi[key]; | ||
}); |
@@ -1,6 +0,6 @@ | ||
import { Schema } from "joi"; | ||
import { ObjectSchema } from "./utils/plugin-options-schema-joi-type"; | ||
interface IOptions { | ||
validateExternalRules?: boolean; | ||
} | ||
export declare function validateOptionsSchema<PluginOptions = object>(pluginSchema: Schema, pluginOptions: PluginOptions, options?: IOptions): Promise<PluginOptions>; | ||
export declare function validateOptionsSchema<PluginOptions = object>(pluginSchema: ObjectSchema, pluginOptions: PluginOptions, options?: IOptions): Promise<PluginOptions>; | ||
export {}; |
{ | ||
"name": "gatsby-plugin-utils", | ||
"version": "0.2.26", | ||
"version": "0.2.27", | ||
"description": "Gatsby utils that help creating plugins", | ||
@@ -41,3 +41,3 @@ "main": "dist/index.js", | ||
}, | ||
"gitHead": "84fa4be59108d02c40acbd2fb07c96a0c85aa85c" | ||
"gitHead": "7d094d3eb33452783eefd7902282d47ade356e48" | ||
} |
/* eslint-disable @typescript-eslint/explicit-function-return-type */ | ||
import Joi from "joi" | ||
import { validateOptionsSchema } from "../" | ||
import { validateOptionsSchema, Joi } from "../" | ||
@@ -5,0 +4,0 @@ it(`validates a basic schema`, async () => { |
export * from "./validate" | ||
export * from "./joi" |
@@ -1,2 +0,3 @@ | ||
import { BaseValidationOptions, Schema } from "joi" | ||
import { BaseValidationOptions } from "joi" | ||
import { ObjectSchema } from "./utils/plugin-options-schema-joi-type" | ||
@@ -14,3 +15,3 @@ const validationOptions: BaseValidationOptions = { | ||
export async function validateOptionsSchema<PluginOptions = object>( | ||
pluginSchema: Schema, | ||
pluginSchema: ObjectSchema, | ||
pluginOptions: PluginOptions, | ||
@@ -17,0 +18,0 @@ options: IOptions = {} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
143960
18
4013
1