Skip to content

Commit

Permalink
fix(deps): upgraded to the latest version of the core package
Browse files Browse the repository at this point in the history
  • Loading branch information
travi committed Jul 21, 2024
1 parent bb11718 commit 76a92a6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
}
},
"dependencies": {
"@form8ion/core": "^4.4.0",
"@form8ion/core": "^4.4.1",
"@form8ion/execa-wrapper": "^1.0.0",
"@form8ion/git": "^1.2.0",
"@form8ion/overridable-prompts": "^1.1.0",
Expand Down
5 changes: 3 additions & 2 deletions src/options-validator.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import {validateOptions, form8ionPlugin} from '@form8ion/core';
import {validateOptions, optionsSchemas} from '@form8ion/core';
import joi from 'joi';

import languagePluginsSchema from './language/schema.js';
import vcsHostPluginsSchema from './vcs/host/schema.js';
import dependencyUpdaterPluginsSchema from './dependency-updater/schema.js';
import {decisionsSchema} from './options-schemas.js';

const {form8ionPlugin} = optionsSchemas;

export function validate(options) {
return validateOptions(joi.object({
languages: languagePluginsSchema,
vcsHosts: vcsHostPluginsSchema,
decisions: decisionsSchema,
dependencyUpdaters: dependencyUpdaterPluginsSchema,
plugins: joi.object({dependencyUpdaters: joi.object().pattern(joi.string(), form8ionPlugin)})
// plugins: joi.object({dependencyUpdaters: joi.object().pattern(form8ionPlugin)})
}), options) || {};
}
4 changes: 3 additions & 1 deletion src/options-validator.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import joi from 'joi';
import {validateOptions, form8ionPlugin} from '@form8ion/core';
import {validateOptions, optionsSchemas} from '@form8ion/core';

import {describe, expect, it, beforeEach, afterEach, vi} from 'vitest';
import any from '@travi/any';
Expand All @@ -14,6 +14,8 @@ import {validate} from './options-validator.js';
vi.mock('@form8ion/core');

describe('options validator', () => {
const {form8ionPlugin} = optionsSchemas;

beforeEach(() => {
vi.spyOn(joi, 'object');
vi.spyOn(joi, 'string');
Expand Down

0 comments on commit 76a92a6

Please sign in to comment.