From f0e0fe0f9c019110bf648b356c986aab59a8c276 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 21 Jul 2024 13:24:34 -0500 Subject: [PATCH 01/41] feat(plugins): allow dependencyUpdaters to be passed under a new `plugins` property --- package-lock.json | 10 +++++----- package.json | 2 +- src/options-validator.js | 6 ++++-- src/options-validator.test.js | 14 ++++++++++++-- .../features/step_definitions/common-steps.js | 7 +++++++ 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index f4de8149..f32305eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-semantically-released", "license": "MIT", "dependencies": { - "@form8ion/core": "^4.3.0", + "@form8ion/core": "^4.4.0", "@form8ion/execa-wrapper": "^1.0.0", "@form8ion/git": "^1.2.0", "@form8ion/overridable-prompts": "^1.1.0", @@ -1726,14 +1726,14 @@ } }, "node_modules/@form8ion/core": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.3.0.tgz", - "integrity": "sha512-Rt0wI65T6InL1+j5Bh31gJtG/FAW9CfiEcPqGyB94sCASnXYRnAcZPOk0+wJsHwchRbRRdBFxtzV2fpoj+vHRg==", - "license": "MIT", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.4.0.tgz", + "integrity": "sha512-+rIuzyonj2u6yM9Zmh6B40poQDVuBGYzQW8SsfVPkkXjh2Xi1vsRe2c+vKQ4bwThUkDHc8mn10BQMeCjdClWxQ==", "dependencies": { "@hapi/hoek": "^11.0.2", "@travi/cli-messages": "^1.0.5", "deepmerge": "^4.2.2", + "joi": "^17.13.3", "js-yaml": "^4.1.0", "spdx-license-list": "6.9.0" }, diff --git a/package.json b/package.json index b1ea9988..d8a46cb9 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ } }, "dependencies": { - "@form8ion/core": "^4.3.0", + "@form8ion/core": "^4.4.0", "@form8ion/execa-wrapper": "^1.0.0", "@form8ion/git": "^1.2.0", "@form8ion/overridable-prompts": "^1.1.0", diff --git a/src/options-validator.js b/src/options-validator.js index 40192e5b..186f052e 100644 --- a/src/options-validator.js +++ b/src/options-validator.js @@ -1,4 +1,4 @@ -import {validateOptions} from '@form8ion/core'; +import {validateOptions, form8ionPlugin} from '@form8ion/core'; import joi from 'joi'; import languagePluginsSchema from './language/schema.js'; @@ -11,6 +11,8 @@ export function validate(options) { languages: languagePluginsSchema, vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, - dependencyUpdaters: dependencyUpdaterPluginsSchema + dependencyUpdaters: dependencyUpdaterPluginsSchema, + plugins: joi.object({dependencyUpdaters: joi.object().pattern(joi.string(), form8ionPlugin)}) + // plugins: joi.object({dependencyUpdaters: joi.object().pattern(form8ionPlugin)}) }), options) || {}; } diff --git a/src/options-validator.test.js b/src/options-validator.test.js index 8375e142..fb676503 100644 --- a/src/options-validator.test.js +++ b/src/options-validator.test.js @@ -1,5 +1,5 @@ import joi from 'joi'; -import {validateOptions} from '@form8ion/core'; +import {validateOptions, form8ionPlugin} from '@form8ion/core'; import {describe, expect, it, beforeEach, afterEach, vi} from 'vitest'; import any from '@travi/any'; @@ -16,6 +16,7 @@ vi.mock('@form8ion/core'); describe('options validator', () => { beforeEach(() => { vi.spyOn(joi, 'object'); + vi.spyOn(joi, 'string'); }); afterEach(() => { @@ -24,13 +25,22 @@ describe('options validator', () => { it('should build the full schema and call the base validator', () => { const options = any.simpleObject(); + const pluginsSchema = any.simpleObject(); + const pluginMapSchema = any.simpleObject(); const fullSchema = any.simpleObject(); const validatedOptions = any.simpleObject(); + const joiPattern = vi.fn(); + const stringSchema = any.simpleObject(); + joi.string.mockReturnValue(stringSchema); + when(joiPattern).calledWith(stringSchema, form8ionPlugin).mockReturnValue(pluginMapSchema); + when(joi.object).calledWith().mockReturnValue({pattern: joiPattern}); + when(joi.object).calledWith({dependencyUpdaters: pluginMapSchema}).mockReturnValue(pluginsSchema); when(joi.object).calledWith({ languages: languagePluginsSchema, vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, - dependencyUpdaters: dependencyUpdaterPluginsSchema + dependencyUpdaters: dependencyUpdaterPluginsSchema, + plugins: pluginsSchema }).mockReturnValue(fullSchema); when(validateOptions).calledWith(fullSchema, options).mockReturnValue(validatedOptions); diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 38d026a6..915ba27f 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -62,6 +62,13 @@ When(/^the project is scaffolded$/, async function () { } } }, + plugins: { + ...this.updaterScaffolderDetails && { + dependencyUpdaters: { + [chosenUpdater]: {...this.updaterScaffolderDetails, scaffold: this.updaterScaffolderDetails.scaffolder} + } + } + }, ...this.updaterScaffolderDetails && {dependencyUpdaters: {[chosenUpdater]: this.updaterScaffolderDetails}}, ...vcsHost && { vcsHosts: { From bb1171856d88d24fefec27f179c36f51a323e53b Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 21 Jul 2024 13:41:43 -0500 Subject: [PATCH 02/41] ci(alpha-release): define necessary permissions for release process --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76e4e582..43f7032a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,11 @@ permissions: contents: read jobs: release: + permissions: + contents: write + id-token: write + issues: write + pull-requests: write uses: >- form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@d7062208039222450ac7926b68f3a30d32285f26 secrets: From 76a92a665953ed6b9947ebb26596f30811594b78 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 21 Jul 2024 14:13:43 -0500 Subject: [PATCH 03/41] fix(deps): upgraded to the latest version of the core package --- package-lock.json | 8 ++++---- package.json | 2 +- src/options-validator.js | 5 +++-- src/options-validator.test.js | 4 +++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index f32305eb..b505dd9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-semantically-released", "license": "MIT", "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", @@ -1726,9 +1726,9 @@ } }, "node_modules/@form8ion/core": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.4.0.tgz", - "integrity": "sha512-+rIuzyonj2u6yM9Zmh6B40poQDVuBGYzQW8SsfVPkkXjh2Xi1vsRe2c+vKQ4bwThUkDHc8mn10BQMeCjdClWxQ==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.4.1.tgz", + "integrity": "sha512-GGctHNb5FVw8oMe/I8ZuW9wvdRVbwrdw9MHLb+RIHihGK0k6vsttcThNPEZyWn3PpKefjUIJmz5+xVTUU8BMSQ==", "dependencies": { "@hapi/hoek": "^11.0.2", "@travi/cli-messages": "^1.0.5", diff --git a/package.json b/package.json index d8a46cb9..1a1e41e9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/options-validator.js b/src/options-validator.js index 186f052e..951fde8b 100644 --- a/src/options-validator.js +++ b/src/options-validator.js @@ -1,4 +1,4 @@ -import {validateOptions, form8ionPlugin} from '@form8ion/core'; +import {validateOptions, optionsSchemas} from '@form8ion/core'; import joi from 'joi'; import languagePluginsSchema from './language/schema.js'; @@ -6,6 +6,8 @@ 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, @@ -13,6 +15,5 @@ export function validate(options) { decisions: decisionsSchema, dependencyUpdaters: dependencyUpdaterPluginsSchema, plugins: joi.object({dependencyUpdaters: joi.object().pattern(joi.string(), form8ionPlugin)}) - // plugins: joi.object({dependencyUpdaters: joi.object().pattern(form8ionPlugin)}) }), options) || {}; } diff --git a/src/options-validator.test.js b/src/options-validator.test.js index fb676503..48a6fd5a 100644 --- a/src/options-validator.test.js +++ b/src/options-validator.test.js @@ -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'; @@ -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'); From 9c77ca5833557f8130dacdc6fce800ca3474eadb Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 21 Jul 2024 14:20:39 -0500 Subject: [PATCH 04/41] ci(release): upgraded the semantic-release reusable workflow to use latest --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43f7032a..44746e91 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,6 @@ jobs: id-token: write issues: write pull-requests: write - uses: >- - form8ion/.github/.github/workflows/release-package-semantic-release-19.yml@d7062208039222450ac7926b68f3a30d32285f26 + uses: form8ion/.github/.github/workflows/release-package.yml@master secrets: NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} From 4abf811d2852bb03eff61e65dd5ef7ba20bfbd81 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Sun, 21 Jul 2024 14:56:15 -0500 Subject: [PATCH 05/41] feat(plugins): moved the dependency-updaters under the plugins property and enabled passing as a full plugin that matches the form8ion conventional shape BREAKING CHANGE: a plugins map is now a required option and dependency-updaters are now expected to be provided there as a full plugin rather than just an object with a `scaffolder` plugin --- .remarkrc.cjs | 2 +- README.md | 5 +++++ example.js | 5 +++++ src/dependency-updater/schema.js | 5 ++--- src/dependency-updater/schema.test.js | 16 ++++++++-------- src/options-validator.js | 7 ++----- src/options-validator.test.js | 15 +++------------ src/scaffolder.js | 2 +- src/scaffolder.test.js | 18 +++++++++--------- .../features/step_definitions/common-steps.js | 1 - 10 files changed, 36 insertions(+), 40 deletions(-) diff --git a/.remarkrc.cjs b/.remarkrc.cjs index b79c1995..6d8b2bba 100644 --- a/.remarkrc.cjs +++ b/.remarkrc.cjs @@ -1,5 +1,5 @@ exports.settings = { - listItemIndent: 1, + listItemIndent: 'one', emphasis: '_', strong: '_', bullet: '*', diff --git a/README.md b/README.md index 96f594b2..8ee89b23 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,11 @@ import {lift, questionNames, scaffold} from '@form8ion/project'; }, languages: { foo: options => options + }, + plugins: { + dependencyUpdaters: { + bar: {scaffold: options => options} + } } }); diff --git a/example.js b/example.js index 1735be27..ae473e08 100644 --- a/example.js +++ b/example.js @@ -24,6 +24,11 @@ import {lift, questionNames, scaffold} from './lib/index.js'; }, languages: { foo: options => options + }, + plugins: { + dependencyUpdaters: { + bar: {scaffold: options => options} + } } }); diff --git a/src/dependency-updater/schema.js b/src/dependency-updater/schema.js index ee074293..90e61ec2 100644 --- a/src/dependency-updater/schema.js +++ b/src/dependency-updater/schema.js @@ -1,5 +1,4 @@ import joi from 'joi'; +import {optionsSchemas} from '@form8ion/core'; -export default joi.object().pattern(/^/, joi.object({ - scaffolder: joi.func().arity(1).required() -})).default({}); +export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({}); diff --git a/src/dependency-updater/schema.test.js b/src/dependency-updater/schema.test.js index 2a93eaae..58c47ce4 100644 --- a/src/dependency-updater/schema.test.js +++ b/src/dependency-updater/schema.test.js @@ -11,7 +11,7 @@ describe('dependency-updater plugins schema', () => { it('should return the validated options', () => { const options = any.objectWithKeys( any.listOf(any.string), - {factory: () => ({scaffolder: foo => foo})} + {factory: () => ({scaffold: foo => foo})} ); expect(validateOptions(dependencyUpdaterPluginsSchema, options)).toEqual(options); @@ -22,19 +22,19 @@ describe('dependency-updater plugins schema', () => { .toThrowError(`"${key}" must be of type object`); }); - it('should require a `scaffolder` to be included', () => { + it('should require a `scaffold` property to be included', () => { expect(() => validateOptions(dependencyUpdaterPluginsSchema, {[key]: {}})) - .toThrowError(`"${key}.scaffolder" is required`); + .toThrowError(`"${key}.scaffold" is required`); }); - it('should require `scaffolder` to be a function', () => { - expect(() => validateOptions(dependencyUpdaterPluginsSchema, {[key]: {scaffolder: any.word()}})) - .toThrowError(`"${key}.scaffolder" must be of type function`); + it('should require `scaffold` to be a function', () => { + expect(() => validateOptions(dependencyUpdaterPluginsSchema, {[key]: {scaffold: any.word()}})) + .toThrowError(`"${key}.scaffold" must be of type function`); }); it('should require the scaffolder to accept a single argument', () => { - expect(() => validateOptions(dependencyUpdaterPluginsSchema, {[key]: {scaffolder: () => undefined}})) - .toThrowError(`"${key}.scaffolder" must have an arity of 1`); + expect(() => validateOptions(dependencyUpdaterPluginsSchema, {[key]: {scaffold: () => undefined}})) + .toThrowError(`"${key}.scaffold" must have an arity of 1`); }); it('should default to an empty map when no updaters are provided', () => { diff --git a/src/options-validator.js b/src/options-validator.js index 951fde8b..db075fbd 100644 --- a/src/options-validator.js +++ b/src/options-validator.js @@ -1,4 +1,4 @@ -import {validateOptions, optionsSchemas} from '@form8ion/core'; +import {validateOptions} from '@form8ion/core'; import joi from 'joi'; import languagePluginsSchema from './language/schema.js'; @@ -6,14 +6,11 @@ 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: dependencyUpdaterPluginsSchema}) }), options) || {}; } diff --git a/src/options-validator.test.js b/src/options-validator.test.js index 48a6fd5a..b08b1a98 100644 --- a/src/options-validator.test.js +++ b/src/options-validator.test.js @@ -1,7 +1,7 @@ import joi from 'joi'; -import {validateOptions, optionsSchemas} from '@form8ion/core'; +import {validateOptions} from '@form8ion/core'; -import {describe, expect, it, beforeEach, afterEach, vi} from 'vitest'; +import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; @@ -14,8 +14,6 @@ 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'); @@ -28,20 +26,13 @@ describe('options validator', () => { it('should build the full schema and call the base validator', () => { const options = any.simpleObject(); const pluginsSchema = any.simpleObject(); - const pluginMapSchema = any.simpleObject(); const fullSchema = any.simpleObject(); const validatedOptions = any.simpleObject(); - const joiPattern = vi.fn(); - const stringSchema = any.simpleObject(); - joi.string.mockReturnValue(stringSchema); - when(joiPattern).calledWith(stringSchema, form8ionPlugin).mockReturnValue(pluginMapSchema); - when(joi.object).calledWith().mockReturnValue({pattern: joiPattern}); - when(joi.object).calledWith({dependencyUpdaters: pluginMapSchema}).mockReturnValue(pluginsSchema); + when(joi.object).calledWith({dependencyUpdaters: dependencyUpdaterPluginsSchema}).mockReturnValue(pluginsSchema); when(joi.object).calledWith({ languages: languagePluginsSchema, vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, - dependencyUpdaters: dependencyUpdaterPluginsSchema, plugins: pluginsSchema }).mockReturnValue(fullSchema); when(validateOptions).calledWith(fullSchema, options).mockReturnValue(validatedOptions); diff --git a/src/scaffolder.js b/src/scaffolder.js index 3d4a89ef..c120305f 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -19,7 +19,7 @@ import lift from './lift.js'; export async function scaffold(options) { const projectRoot = process.cwd(); - const {languages = {}, vcsHosts = {}, decisions, dependencyUpdaters} = validate(options); + const {languages = {}, vcsHosts = {}, decisions, plugins: {dependencyUpdaters}} = validate(options); const { [coreQuestionNames.PROJECT_NAME]: projectName, diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 0be7634e..acd54e1d 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -94,7 +94,7 @@ describe('project scaffolder', () => { const contributingResults = any.simpleObject(); when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, dependencyUpdaters}); + .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {dependencyUpdaters}}); when(prompts.promptForBaseDetails) .calledWith(projectPath, decisions) .mockResolvedValue({ @@ -160,7 +160,7 @@ describe('project scaffolder', () => { it('should consider all options to be optional', async () => { const gitRepoShouldBeInitialized = any.boolean(); - optionsValidator.validate.mockReturnValue({}); + optionsValidator.validate.mockReturnValue({plugins: {}}); when(prompts.promptForBaseDetails) .calledWith(projectPath, undefined) .mockResolvedValue({ @@ -175,9 +175,9 @@ describe('project scaffolder', () => { .toHaveBeenCalledWith(gitRepoShouldBeInitialized, projectPath, projectName, {}, undefined, undefined); }); - it('should consider each option optional', async () => { + it('should consider each option except the plugins map optional', async () => { const emptyOptions = {}; - when(optionsValidator.validate).calledWith(emptyOptions).mockReturnValue({}); + when(optionsValidator.validate).calledWith(emptyOptions).mockReturnValue({plugins: {}}); when(prompts.promptForBaseDetails).calledWith(projectPath, undefined, undefined).mockResolvedValue({}); languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); @@ -223,7 +223,7 @@ describe('project scaffolder', () => { }); it('should not scaffold the git repo if not requested', async () => { - when(optionsValidator.validate).calledWith(options).mockReturnValue({}); + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); prompts.promptForBaseDetails.mockResolvedValue({[questionNames.GIT_REPO]: false}); languagePrompt.default.mockResolvedValue({}); scaffoldReadme.mockResolvedValue(); @@ -259,7 +259,7 @@ describe('project scaffolder', () => { }; when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions}); + .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {}}); scaffoldGit.mockResolvedValue(vcs); liftGit.mockResolvedValue({nextSteps: gitNextSteps}); prompts.promptForBaseDetails.mockResolvedValue({ @@ -308,7 +308,7 @@ describe('project scaffolder', () => { it('should consider the language details to be optional', async () => { when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions}); + .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {}}); scaffoldGit.mockResolvedValue(vcs); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, @@ -334,7 +334,7 @@ describe('project scaffolder', () => { }); it('should pass the license to the language scaffolder as `UNLICENSED` when no license was chosen', async () => { - when(optionsValidator.validate).calledWith(options).mockReturnValue({}); + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); prompts.promptForBaseDetails.mockResolvedValue({}); languagePrompt.default.mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); scaffoldGit.mockResolvedValue({}); @@ -356,7 +356,7 @@ describe('project scaffolder', () => { }); it('should not run a verification command when one is not provided', async () => { - when(optionsValidator.validate).calledWith(options).mockReturnValue({}); + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); prompts.promptForBaseDetails.mockResolvedValue({}); languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 915ba27f..812ff188 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -69,7 +69,6 @@ When(/^the project is scaffolded$/, async function () { } } }, - ...this.updaterScaffolderDetails && {dependencyUpdaters: {[chosenUpdater]: this.updaterScaffolderDetails}}, ...vcsHost && { vcsHosts: { [vcsHost]: { From e0abe8e43203de06033731dfd4c7db067d0a2817 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 01:48:41 +0000 Subject: [PATCH 06/41] chore(deps): lock file maintenance --- package-lock.json | 153 +++++++++++++++++++++++----------------------- 1 file changed, 77 insertions(+), 76 deletions(-) diff --git a/package-lock.json b/package-lock.json index b505dd9d..a5edcd7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,9 +98,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.8.tgz", - "integrity": "sha512-c4IM7OTg6k1Q+AJ153e2mc2QVTezTwnb4VzquwcyiEzGnW0Kedv4do/TrkU98qPeC5LNiMt/QXwIjzYXLBpyZg==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz", + "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==", "dev": true, "license": "MIT", "engines": { @@ -108,22 +108,22 @@ } }, "node_modules/@babel/core": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.8.tgz", - "integrity": "sha512-6AWcmZC/MZCO0yKys4uhg5NlxL0ESF3K6IAaoQ+xSXvPyPyxNWRafP+GDbI88Oh68O7QkJgmEtedWPM9U0pZNg==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.9.tgz", + "integrity": "sha512-5e3FI4Q3M3Pbr21+5xJwCv6ZT6KmGkI0vw3Tozy5ODAQFTIWe37iT8Cr7Ice2Ntb+M3iSKCEWMB1MBgKrW3whg==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", + "@babel/generator": "^7.24.9", "@babel/helper-compilation-targets": "^7.24.8", - "@babel/helper-module-transforms": "^7.24.8", + "@babel/helper-module-transforms": "^7.24.9", "@babel/helpers": "^7.24.8", "@babel/parser": "^7.24.8", "@babel/template": "^7.24.7", "@babel/traverse": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/types": "^7.24.9", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -149,13 +149,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.8.tgz", - "integrity": "sha512-47DG+6F5SzOi0uEvK4wMShmn5yY0mVjVJoWTphdY2B4Rx9wHgjK7Yhtr0ru6nE+sn0v38mzrWOlah0p/YlHHOQ==", + "version": "7.24.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz", + "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.8", + "@babel/types": "^7.24.9", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -263,9 +263,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.8.tgz", - "integrity": "sha512-m4vWKVqvkVAWLXfHCCfff2luJj86U+J0/x+0N3ArG/tP0Fq7zky2dYwMbtPmkc/oulkkbjdL3uWzuoBwQ8R00Q==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz", + "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==", "dev": true, "license": "MIT", "dependencies": { @@ -724,9 +724,9 @@ } }, "node_modules/@babel/types": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.8.tgz", - "integrity": "sha512-SkSBEHwwJRU52QEVZBmMBnE5Ux2/6WU1grdYyOhpbCNxbmJrDuDCphBzKZSO3taf0zztp+qkWlymE5tVL5l0TA==", + "version": "7.24.9", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", + "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1729,6 +1729,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.4.1.tgz", "integrity": "sha512-GGctHNb5FVw8oMe/I8ZuW9wvdRVbwrdw9MHLb+RIHihGK0k6vsttcThNPEZyWn3PpKefjUIJmz5+xVTUU8BMSQ==", + "license": "MIT", "dependencies": { "@hapi/hoek": "^11.0.2", "@travi/cli-messages": "^1.0.5", @@ -4148,9 +4149,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.10", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.10.tgz", - "integrity": "sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==", + "version": "20.14.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", + "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", "dev": true, "license": "MIT", "dependencies": { @@ -5587,9 +5588,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001642", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001642.tgz", - "integrity": "sha512-3XQ0DoRgLijXJErLSl+bLnJ+Et4KqV1PY6JJBGAFlsNsz31zeAIncyeZfLCabHK/jtSh+671RM9YMldxjUPZtA==", + "version": "1.0.30001643", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001643.tgz", + "integrity": "sha512-ERgWGNleEilSrHM6iUz/zJNSQTP8Mr21wDWpdgvRwcTXGAq6jMtOUPP4dqFPTdKqZ2wKTdtB+uucZ3MRpAUSmg==", "dev": true, "funding": [ { @@ -6857,9 +6858,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.827", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.827.tgz", - "integrity": "sha512-VY+J0e4SFcNfQy19MEoMdaIcZLmDCprqvBtkii1WTCTQHpRvf5N8+3kTYCgL/PcntvwQvmMJWTuDPsq+IlhWKQ==", + "version": "1.4.832", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", + "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", "dev": true, "license": "ISC" }, @@ -10294,9 +10295,9 @@ } }, "node_modules/is-core-module": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.14.0.tgz", - "integrity": "sha512-a5dFJih5ZLYlRtDc0dZWP7RiKr6xIKzmn/oAYCDvdLThadVgyJwlaoQPmRtMSpz+rk0OGAgIu+TcM9HUF0fk1A==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", "dev": true, "license": "MIT", "dependencies": { @@ -10735,9 +10736,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "license": "ISC", "peer": true, @@ -12248,9 +12249,9 @@ } }, "node_modules/ls-engines/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "license": "ISC", "bin": { @@ -12902,9 +12903,9 @@ } }, "node_modules/mdast-util-to-hast/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -14192,9 +14193,9 @@ "peer": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz", + "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==", "dev": true, "license": "MIT" }, @@ -19228,9 +19229,9 @@ } }, "node_modules/remark-usage/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -19268,9 +19269,9 @@ } }, "node_modules/remark-validate-links/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -21122,9 +21123,9 @@ } }, "node_modules/type-fest": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.21.0.tgz", - "integrity": "sha512-ADn2w7hVPcK6w1I0uWnM//y1rLXZhzB9mr0a3OirzclKF1Wp6VzevUmzz/NRAWunOT6E8HrnpGY7xOfc6K57fA==", + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.22.1.tgz", + "integrity": "sha512-9tHNEa0Ov81YOopiVkcCJVz5TM6AEQ+CHHjFIktqPnE3NV0AHIkx+gh9tiCl58m/66wWxkOC9eltpa75J4lQPA==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -21430,9 +21431,9 @@ } }, "node_modules/unified-engine/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -21615,9 +21616,9 @@ } }, "node_modules/unified/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "license": "MIT", "dependencies": { "@types/unist": "^3.0.0", @@ -21683,9 +21684,9 @@ } }, "node_modules/unist-util-inspect": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-8.0.0.tgz", - "integrity": "sha512-/3Wn/wU6/H6UEo4FoYUeo8KUePN8ERiZpQYFWYoihOsr1DoDuv80PeB0hobVZyYSvALa2e556bG1A1/AbwU4yg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/unist-util-inspect/-/unist-util-inspect-8.1.0.tgz", + "integrity": "sha512-mOlg8Mp33pR0eeFpo5d2902ojqFFOKMMG2hF8bmH7ZlhnmjFgh0NI3/ZDwdaBJNbvrS7LZFVrBVtIE9KZ9s7vQ==", "dev": true, "license": "MIT", "dependencies": { @@ -22008,9 +22009,9 @@ } }, "node_modules/vfile-find-up/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -22148,9 +22149,9 @@ } }, "node_modules/vfile-reporter/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -22179,9 +22180,9 @@ } }, "node_modules/vfile-sort/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -22210,9 +22211,9 @@ } }, "node_modules/vfile-statistics/node_modules/vfile": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.1.tgz", - "integrity": "sha512-1bYqc7pt6NIADBJ98UiG0Bn/CHIVOoZ/IyEkqIruLg0mE1BKzkOXY2D6CSqQIcKqgadppE5lrxgWXJmXd7zZJw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", + "integrity": "sha512-zND7NlS8rJYb/sPqkb13ZvbbUoExdbi4w3SfRrMq6R3FvnLQmmfpajJNITuuYm6AZ5uao9vy4BAos3EXBPf2rg==", "dev": true, "license": "MIT", "dependencies": { @@ -22262,9 +22263,9 @@ } }, "node_modules/vite": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.3.tgz", - "integrity": "sha512-NPQdeCU0Dv2z5fu+ULotpuq5yfCS1BzKUIPhNbP3YBfAMGJXbt2nS+sbTFu+qchaqWTD+H3JK++nRwr6XIcp6A==", + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.4.tgz", + "integrity": "sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==", "dev": true, "license": "MIT", "dependencies": { From 7330434a65694fd893260d1c0c16e9986ad83d48 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:53:05 +0000 Subject: [PATCH 07/41] chore(deps): update dependency vitest to v2.0.4 --- package-lock.json | 80 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5edcd7d..65888c08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "sinon": "18.0.0", "testdouble": "3.20.2", "unist-util-find": "3.0.0", - "vitest": "2.0.3" + "vitest": "2.0.4" }, "engines": { "node": "^18.17 || >=20.6.1" @@ -4241,14 +4241,14 @@ "license": "ISC" }, "node_modules/@vitest/expect": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.3.tgz", - "integrity": "sha512-X6AepoOYePM0lDNUPsGXTxgXZAl3EXd0GYe/MZyVE4HzkUqyUVC6S3PrY5mClDJ6/7/7vALLMV3+xD/Ko60Hqg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.4.tgz", + "integrity": "sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.0.3", - "@vitest/utils": "2.0.3", + "@vitest/spy": "2.0.4", + "@vitest/utils": "2.0.4", "chai": "^5.1.1", "tinyrainbow": "^1.2.0" }, @@ -4257,9 +4257,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.3.tgz", - "integrity": "sha512-URM4GLsB2xD37nnTyvf6kfObFafxmycCL8un3OC9gaCs5cti2u+5rJdIflZ2fUJUen4NbvF6jCufwViAFLvz1g==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.4.tgz", + "integrity": "sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==", "dev": true, "license": "MIT", "dependencies": { @@ -4270,13 +4270,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.3.tgz", - "integrity": "sha512-EmSP4mcjYhAcuBWwqgpjR3FYVeiA4ROzRunqKltWjBfLNs1tnMLtF+qtgd5ClTwkDP6/DGlKJTNa6WxNK0bNYQ==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.4.tgz", + "integrity": "sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.0.3", + "@vitest/utils": "2.0.4", "pathe": "^1.1.2" }, "funding": { @@ -4284,13 +4284,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.3.tgz", - "integrity": "sha512-6OyA6v65Oe3tTzoSuRPcU6kh9m+mPL1vQ2jDlPdn9IQoUxl8rXhBnfICNOC+vwxWY684Vt5UPgtcA2aPFBb6wg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.4.tgz", + "integrity": "sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.0.3", + "@vitest/pretty-format": "2.0.4", "magic-string": "^0.30.10", "pathe": "^1.1.2" }, @@ -4299,9 +4299,9 @@ } }, "node_modules/@vitest/spy": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.3.tgz", - "integrity": "sha512-sfqyAw/ypOXlaj4S+w8689qKM1OyPOqnonqOc9T91DsoHbfN5mU7FdifWWv3MtQFf0lEUstEwR9L/q/M390C+A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.4.tgz", + "integrity": "sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==", "dev": true, "license": "MIT", "dependencies": { @@ -4312,13 +4312,13 @@ } }, "node_modules/@vitest/utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.3.tgz", - "integrity": "sha512-c/UdELMuHitQbbc/EVctlBaxoYAwQPQdSNwv7z/vHyBKy2edYZaFgptE27BRueZB7eW8po+cllotMNTDpL3HWg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.4.tgz", + "integrity": "sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.0.3", + "@vitest/pretty-format": "2.0.4", "estree-walker": "^3.0.3", "loupe": "^3.1.1", "tinyrainbow": "^1.2.0" @@ -22319,9 +22319,9 @@ } }, "node_modules/vite-node": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.3.tgz", - "integrity": "sha512-14jzwMx7XTcMB+9BhGQyoEAmSl0eOr3nrnn+Z12WNERtOvLN+d2scbRUvyni05rT3997Bg+rZb47NyP4IQPKXg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.4.tgz", + "integrity": "sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==", "dev": true, "license": "MIT", "dependencies": { @@ -22342,19 +22342,19 @@ } }, "node_modules/vitest": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.3.tgz", - "integrity": "sha512-o3HRvU93q6qZK4rI2JrhKyZMMuxg/JRt30E6qeQs6ueaiz5hr1cPj+Sk2kATgQzMMqsa2DiNI0TIK++1ULx8Jw==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.4.tgz", + "integrity": "sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", - "@vitest/expect": "2.0.3", - "@vitest/pretty-format": "^2.0.3", - "@vitest/runner": "2.0.3", - "@vitest/snapshot": "2.0.3", - "@vitest/spy": "2.0.3", - "@vitest/utils": "2.0.3", + "@vitest/expect": "2.0.4", + "@vitest/pretty-format": "^2.0.4", + "@vitest/runner": "2.0.4", + "@vitest/snapshot": "2.0.4", + "@vitest/spy": "2.0.4", + "@vitest/utils": "2.0.4", "chai": "^5.1.1", "debug": "^4.3.5", "execa": "^8.0.1", @@ -22365,8 +22365,8 @@ "tinypool": "^1.0.0", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.0.3", - "why-is-node-running": "^2.2.2" + "vite-node": "2.0.4", + "why-is-node-running": "^2.3.0" }, "bin": { "vitest": "vitest.mjs" @@ -22380,8 +22380,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.0.3", - "@vitest/ui": "2.0.3", + "@vitest/browser": "2.0.4", + "@vitest/ui": "2.0.4", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 1a1e41e9..07c5299f 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,6 @@ "sinon": "18.0.0", "testdouble": "3.20.2", "unist-util-find": "3.0.0", - "vitest": "2.0.3" + "vitest": "2.0.4" } } From 70c7b7502db4e6e6a050364221485ba36c9e7d00 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 23 Jul 2024 22:19:59 -0500 Subject: [PATCH 08/41] feat(languages): moved the languages plugins under the `plugins` property BREAKING CHANGE: languages now must be provided under the `plugins` property and as full plugins rather than a direct scaffolder function --- README.md | 6 ++-- example.js | 6 ++-- src/language/scaffolder.js | 6 ++-- src/language/scaffolder.test.js | 4 +-- src/language/schema.js | 3 +- src/language/schema.test.js | 29 +++++++++++++++---- src/options-validator.js | 3 +- src/options-validator.test.js | 5 ++-- src/scaffolder.js | 2 +- src/scaffolder.test.js | 16 +++++----- .../features/step_definitions/common-steps.js | 20 +++++++------ 11 files changed, 60 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 8ee89b23..ad6c7ba4 100644 --- a/README.md +++ b/README.md @@ -88,12 +88,12 @@ import {lift, questionNames, scaffold} from '@form8ion/project'; [questionNames.COPYRIGHT_YEAR]: '2022', [questionNames.PROJECT_LANGUAGE]: 'foo' }, - languages: { - foo: options => options - }, plugins: { dependencyUpdaters: { bar: {scaffold: options => options} + }, + languages: { + foo: {scaffold: options => options} } } }); diff --git a/example.js b/example.js index ae473e08..0a0d59c6 100644 --- a/example.js +++ b/example.js @@ -22,12 +22,12 @@ import {lift, questionNames, scaffold} from './lib/index.js'; [questionNames.COPYRIGHT_YEAR]: '2022', [questionNames.PROJECT_LANGUAGE]: 'foo' }, - languages: { - foo: options => options - }, plugins: { dependencyUpdaters: { bar: {scaffold: options => options} + }, + languages: { + foo: {scaffold: options => options} } } }); diff --git a/src/language/scaffolder.js b/src/language/scaffolder.js index 346a1943..a2037552 100644 --- a/src/language/scaffolder.js +++ b/src/language/scaffolder.js @@ -1,7 +1,7 @@ -export default function (scaffolders, chosenLanguage, options) { - const scaffolder = scaffolders[chosenLanguage]; +export default function (languagePlugins, chosenLanguage, options) { + const plugin = languagePlugins[chosenLanguage]; - if (scaffolder) return scaffolder(options); + if (plugin) return plugin.scaffold(options); return undefined; } diff --git a/src/language/scaffolder.test.js b/src/language/scaffolder.test.js index b2a68775..2dab72fd 100644 --- a/src/language/scaffolder.test.js +++ b/src/language/scaffolder.test.js @@ -10,10 +10,10 @@ describe('language scaffolder', () => { const chosenLanguage = any.word(); const scaffolderResult = any.simpleObject(); const chosenLanguageScaffolder = vi.fn(); - const scaffolders = {...any.simpleObject(), [chosenLanguage]: chosenLanguageScaffolder}; + const plugins = {...any.simpleObject(), [chosenLanguage]: {scaffold: chosenLanguageScaffolder}}; when(chosenLanguageScaffolder).calledWith(options).mockResolvedValue(scaffolderResult); - expect(await scaffold(scaffolders, chosenLanguage, options)).toEqual(scaffolderResult); + expect(await scaffold(plugins, chosenLanguage, options)).toEqual(scaffolderResult); }); it('should not result in an error when choosing a language without a defined scaffolder', async () => { diff --git a/src/language/schema.js b/src/language/schema.js index 7874006e..90e61ec2 100644 --- a/src/language/schema.js +++ b/src/language/schema.js @@ -1,3 +1,4 @@ import joi from 'joi'; +import {optionsSchemas} from '@form8ion/core'; -export default joi.object().pattern(/^/, joi.func().arity(1)); +export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin).default({}); diff --git a/src/language/schema.test.js b/src/language/schema.test.js index 10ad280f..ef521481 100644 --- a/src/language/schema.test.js +++ b/src/language/schema.test.js @@ -9,18 +9,35 @@ describe('language plugins schema', () => { const key = any.word(); it('should return the validated options', () => { - const options = any.objectWithKeys(any.listOf(any.string), {factory: () => foo => foo}); + const options = any.objectWithKeys( + any.listOf(any.string), + {factory: () => ({scaffold: foo => foo})} + ); expect(validateOptions(languageSchema, options)).toEqual(options); }); - it('should require a scaffold function to be included', () => { - expect(() => validateOptions(languageSchema, {[key]: any.word()})) - .toThrowError(`"${key}" must be of type function`); + it('should require options to be provided as an object', () => { + expect(() => validateOptions(languageSchema, {[key]: []})) + .toThrowError(`"${key}" must be of type object`); + }); + + it('should require a `scaffold` property to be included', () => { + expect(() => validateOptions(languageSchema, {[key]: {}})) + .toThrowError(`"${key}.scaffold" is required`); + }); + + it('should require `scaffold` to be a function', () => { + expect(() => validateOptions(languageSchema, {[key]: {scaffold: any.word()}})) + .toThrowError(`"${key}.scaffold" must be of type function`); }); it('should require the scaffolder to accept a single argument', () => { - expect(() => validateOptions(languageSchema, {[key]: () => undefined})) - .toThrowError(`"${key}" must have an arity of 1`); + expect(() => validateOptions(languageSchema, {[key]: {scaffold: () => undefined}})) + .toThrowError(`"${key}.scaffold" must have an arity of 1`); + }); + + it('should default to an empty map when no updaters are provided', () => { + expect(validateOptions(languageSchema)).toEqual({}); }); }); diff --git a/src/options-validator.js b/src/options-validator.js index db075fbd..bdb55532 100644 --- a/src/options-validator.js +++ b/src/options-validator.js @@ -8,9 +8,8 @@ import {decisionsSchema} from './options-schemas.js'; export function validate(options) { return validateOptions(joi.object({ - languages: languagePluginsSchema, vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, - plugins: joi.object({dependencyUpdaters: dependencyUpdaterPluginsSchema}) + plugins: joi.object({dependencyUpdaters: dependencyUpdaterPluginsSchema, languages: languagePluginsSchema}) }), options) || {}; } diff --git a/src/options-validator.test.js b/src/options-validator.test.js index b08b1a98..d502e4fa 100644 --- a/src/options-validator.test.js +++ b/src/options-validator.test.js @@ -28,9 +28,10 @@ describe('options validator', () => { const pluginsSchema = any.simpleObject(); const fullSchema = any.simpleObject(); const validatedOptions = any.simpleObject(); - when(joi.object).calledWith({dependencyUpdaters: dependencyUpdaterPluginsSchema}).mockReturnValue(pluginsSchema); + when(joi.object) + .calledWith({dependencyUpdaters: dependencyUpdaterPluginsSchema, languages: languagePluginsSchema}) + .mockReturnValue(pluginsSchema); when(joi.object).calledWith({ - languages: languagePluginsSchema, vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, plugins: pluginsSchema diff --git a/src/scaffolder.js b/src/scaffolder.js index c120305f..2e9aadf4 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -19,7 +19,7 @@ import lift from './lift.js'; export async function scaffold(options) { const projectRoot = process.cwd(); - const {languages = {}, vcsHosts = {}, decisions, plugins: {dependencyUpdaters}} = validate(options); + const {vcsHosts = {}, decisions, plugins: {dependencyUpdaters, languages = {}}} = validate(options); const { [coreQuestionNames.PROJECT_NAME]: projectName, diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index acd54e1d..7402cd33 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -48,7 +48,7 @@ describe('project scaffolder', () => { const license = any.string(); const projectLanguage = any.word(); const licenseBadge = any.url(); - const languageScaffolders = any.simpleObject(); + const languages = any.simpleObject(); const vcsHosts = any.simpleObject(); const documentation = any.simpleObject(); const vcs = any.simpleObject(); @@ -94,7 +94,7 @@ describe('project scaffolder', () => { const contributingResults = any.simpleObject(); when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {dependencyUpdaters}}); + .mockReturnValue({vcsHosts, decisions, plugins: {dependencyUpdaters, languages}}); when(prompts.promptForBaseDetails) .calledWith(projectPath, decisions) .mockResolvedValue({ @@ -107,7 +107,7 @@ describe('project scaffolder', () => { [coreQuestionNames.VISIBILITY]: visibility }); when(languagePrompt.default) - .calledWith(languageScaffolders, decisions) + .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); when(scaffoldGit) .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, vcsHosts, visibility, decisions) @@ -259,7 +259,7 @@ describe('project scaffolder', () => { }; when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {}}); + .mockReturnValue({vcsHosts, decisions, plugins: {languages}}); scaffoldGit.mockResolvedValue(vcs); liftGit.mockResolvedValue({nextSteps: gitNextSteps}); prompts.promptForBaseDetails.mockResolvedValue({ @@ -270,9 +270,9 @@ describe('project scaffolder', () => { [coreQuestionNames.DESCRIPTION]: description }); when(languagePrompt.default) - .calledWith(languageScaffolders, decisions) + .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - when(languageScaffolder.default).calledWith(languageScaffolders, projectLanguage, { + when(languageScaffolder.default).calledWith(languages, projectLanguage, { projectName, projectRoot: projectPath, visibility, @@ -308,7 +308,7 @@ describe('project scaffolder', () => { it('should consider the language details to be optional', async () => { when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({languages: languageScaffolders, vcsHosts, decisions, plugins: {}}); + .mockReturnValue({vcsHosts, decisions, plugins: {languages}}); scaffoldGit.mockResolvedValue(vcs); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, @@ -318,7 +318,7 @@ describe('project scaffolder', () => { [coreQuestionNames.DESCRIPTION]: description }); when(languagePrompt.default) - .calledWith(languageScaffolders, decisions) + .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); vcsHostScaffolder.default.mockResolvedValue(vcsOriginDetails); languageScaffolder.default.mockResolvedValue({}); diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 812ff188..f435fd70 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -53,20 +53,22 @@ When(/^the project is scaffolded$/, async function () { this.projectDescription = any.sentence(); await scaffold({ - languages: { - ...'Other' !== chosenLanguage && { - [chosenLanguage]: ({projectName}) => { - info(`Scaffolding ${chosenLanguage} language details for ${projectName}`); - - return this.languageScaffolderResults; - } - } - }, plugins: { ...this.updaterScaffolderDetails && { dependencyUpdaters: { [chosenUpdater]: {...this.updaterScaffolderDetails, scaffold: this.updaterScaffolderDetails.scaffolder} } + }, + languages: { + ...'Other' !== chosenLanguage && { + [chosenLanguage]: { + scaffold: ({projectName}) => { + info(`Scaffolding ${chosenLanguage} language details for ${projectName}`); + + return this.languageScaffolderResults; + } + } + } } }, ...vcsHost && { From 188015fa20e58c1f347dfa0eba1b64bcdc3133b9 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Wed, 24 Jul 2024 14:18:21 -0500 Subject: [PATCH 09/41] fix(language-plugins): removed the default map since the schema already defines a default --- src/scaffolder.js | 2 +- src/scaffolder.test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 2e9aadf4..b31059c5 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -19,7 +19,7 @@ import lift from './lift.js'; export async function scaffold(options) { const projectRoot = process.cwd(); - const {vcsHosts = {}, decisions, plugins: {dependencyUpdaters, languages = {}}} = validate(options); + const {vcsHosts = {}, decisions, plugins: {dependencyUpdaters, languages}} = validate(options); const { [coreQuestionNames.PROJECT_NAME]: projectName, diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 7402cd33..c710473b 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -334,7 +334,7 @@ describe('project scaffolder', () => { }); it('should pass the license to the language scaffolder as `UNLICENSED` when no license was chosen', async () => { - when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {languages}}); prompts.promptForBaseDetails.mockResolvedValue({}); languagePrompt.default.mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); scaffoldGit.mockResolvedValue({}); @@ -342,7 +342,7 @@ describe('project scaffolder', () => { await scaffold(options); expect(languageScaffolder.default).toHaveBeenCalledWith( - {}, + languages, projectLanguage, { license: 'UNLICENSED', From 7ce00130788f862aaa0d9e22320b31f447a619af Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Wed, 24 Jul 2024 14:36:00 -0500 Subject: [PATCH 10/41] test(scaffolder-test): named the language scaffolder more appropriately --- src/scaffolder.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index c710473b..6cfc5c24 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -11,7 +11,7 @@ import {when} from 'jest-when'; import {scaffold as liftGit, initialize as scaffoldGit} from './vcs/git/git.js'; import * as vcsHostScaffolder from './vcs/host/scaffolder.js'; import * as licenseScaffolder from './license/scaffolder.js'; -import * as languageScaffolder from './language/scaffolder.js'; +import scaffoldLanguage from './language/scaffolder.js'; import * as languagePrompt from './language/prompt.js'; import * as dependencyUpdaterScaffolder from './dependency-updater/scaffolder.js'; import * as optionsValidator from './options-validator.js'; @@ -130,7 +130,7 @@ describe('project scaffolder', () => { } ) .mockResolvedValue(vcsOriginDetails); - languageScaffolder.default.mockResolvedValue(languageResults); + scaffoldLanguage.mockResolvedValue(languageResults); when(dependencyUpdaterScaffolder.default) .calledWith(dependencyUpdaters, decisions, {projectRoot: projectPath, vcs}) .mockResolvedValue(dependencyUpdaterResults); @@ -211,7 +211,7 @@ describe('project scaffolder', () => { .calledWith(projectPath, undefined, undefined) .mockResolvedValue({[coreQuestionNames.VISIBILITY]: visibility}); when(scaffoldContributing).calledWith({visibility}).mockReturnValue({badges: contributingBadges}); - languageScaffolder.default.mockResolvedValue(languageResults); + scaffoldLanguage.mockResolvedValue(languageResults); vcsHostScaffolder.default.mockResolvedValue(vcsOriginDetails); dependencyUpdaterScaffolder.default.mockResolvedValue({badges: dependencyUpdaterBadges}); licenseScaffolder.default.mockResolvedValue({badges: licenseBadges}); @@ -272,7 +272,7 @@ describe('project scaffolder', () => { when(languagePrompt.default) .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - when(languageScaffolder.default).calledWith(languages, projectLanguage, { + when(scaffoldLanguage).calledWith(languages, projectLanguage, { projectName, projectRoot: projectPath, visibility, @@ -321,7 +321,7 @@ describe('project scaffolder', () => { .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); vcsHostScaffolder.default.mockResolvedValue(vcsOriginDetails); - languageScaffolder.default.mockResolvedValue({}); + scaffoldLanguage.mockResolvedValue({}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); scaffoldContributing.mockResolvedValue({}); @@ -341,7 +341,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(languageScaffolder.default).toHaveBeenCalledWith( + expect(scaffoldLanguage).toHaveBeenCalledWith( languages, projectLanguage, { @@ -360,7 +360,7 @@ describe('project scaffolder', () => { prompts.promptForBaseDetails.mockResolvedValue({}); languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); - languageScaffolder.default.mockResolvedValue({badges: {}, projectDetails: {}}); + scaffoldLanguage.mockResolvedValue({badges: {}, projectDetails: {}}); await scaffold(options); From a4643622ba94fbdb8be04145c8cceaba2995253b Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Wed, 24 Jul 2024 18:59:51 -0500 Subject: [PATCH 11/41] feat(plugins): moved the vcs-host plugins under the plugins map BREAKING CHANGE: vcs-host plugins must now be supplied under the `plugins` property rather than as a direct property and must be a full plugin --- src/options-validator.js | 7 +++++-- src/options-validator.test.js | 17 +++++++++++----- src/scaffolder.js | 2 +- src/scaffolder.test.js | 4 ++-- src/vcs/host/scaffolder.js | 2 +- src/vcs/host/scaffolder.test.js | 2 +- src/vcs/host/schema.js | 4 ++-- src/vcs/host/schema.test.js | 20 +++++++++---------- .../features/step_definitions/common-steps.js | 14 ++++++------- 9 files changed, 41 insertions(+), 31 deletions(-) diff --git a/src/options-validator.js b/src/options-validator.js index bdb55532..348e9e5f 100644 --- a/src/options-validator.js +++ b/src/options-validator.js @@ -8,8 +8,11 @@ import {decisionsSchema} from './options-schemas.js'; export function validate(options) { return validateOptions(joi.object({ - vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, - plugins: joi.object({dependencyUpdaters: dependencyUpdaterPluginsSchema, languages: languagePluginsSchema}) + plugins: joi.object({ + dependencyUpdaters: dependencyUpdaterPluginsSchema, + languages: languagePluginsSchema, + vcsHosts: vcsHostPluginsSchema + }) }), options) || {}; } diff --git a/src/options-validator.test.js b/src/options-validator.test.js index d502e4fa..72925473 100644 --- a/src/options-validator.test.js +++ b/src/options-validator.test.js @@ -1,5 +1,5 @@ import joi from 'joi'; -import {validateOptions} from '@form8ion/core'; +import * as core from '@form8ion/core'; import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; @@ -11,7 +11,11 @@ import vcsHostPluginsSchema from './vcs/host/schema.js'; import dependencyUpdaterPluginsSchema from './dependency-updater/schema.js'; import {validate} from './options-validator.js'; -vi.mock('@form8ion/core'); +vi.mock('@form8ion/core', async () => ({ + validateOptions: vi.fn(), + optionsSchemas: {form8ionPlugin: joi.object()} +})); +vi.mock('./vcs/host/schema.js'); describe('options validator', () => { beforeEach(() => { @@ -29,14 +33,17 @@ describe('options validator', () => { const fullSchema = any.simpleObject(); const validatedOptions = any.simpleObject(); when(joi.object) - .calledWith({dependencyUpdaters: dependencyUpdaterPluginsSchema, languages: languagePluginsSchema}) + .calledWith({ + dependencyUpdaters: dependencyUpdaterPluginsSchema, + languages: languagePluginsSchema, + vcsHosts: vcsHostPluginsSchema + }) .mockReturnValue(pluginsSchema); when(joi.object).calledWith({ - vcsHosts: vcsHostPluginsSchema, decisions: decisionsSchema, plugins: pluginsSchema }).mockReturnValue(fullSchema); - when(validateOptions).calledWith(fullSchema, options).mockReturnValue(validatedOptions); + when(core.validateOptions).calledWith(fullSchema, options).mockReturnValue(validatedOptions); expect(validate(options)).toEqual(validatedOptions); }); diff --git a/src/scaffolder.js b/src/scaffolder.js index b31059c5..cc3d2694 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -19,7 +19,7 @@ import lift from './lift.js'; export async function scaffold(options) { const projectRoot = process.cwd(); - const {vcsHosts = {}, decisions, plugins: {dependencyUpdaters, languages}} = validate(options); + const {decisions, plugins: {dependencyUpdaters, languages, vcsHosts = {}}} = validate(options); const { [coreQuestionNames.PROJECT_NAME]: projectName, diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 6cfc5c24..11b409ae 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -94,7 +94,7 @@ describe('project scaffolder', () => { const contributingResults = any.simpleObject(); when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({vcsHosts, decisions, plugins: {dependencyUpdaters, languages}}); + .mockReturnValue({decisions, plugins: {dependencyUpdaters, languages, vcsHosts}}); when(prompts.promptForBaseDetails) .calledWith(projectPath, decisions) .mockResolvedValue({ @@ -259,7 +259,7 @@ describe('project scaffolder', () => { }; when(optionsValidator.validate) .calledWith(options) - .mockReturnValue({vcsHosts, decisions, plugins: {languages}}); + .mockReturnValue({decisions, plugins: {languages, vcsHosts}}); scaffoldGit.mockResolvedValue(vcs); liftGit.mockResolvedValue({nextSteps: gitNextSteps}); prompts.promptForBaseDetails.mockResolvedValue({ diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index d32d58cb..ba114ee2 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -5,7 +5,7 @@ export default function (hosts, options) { const {host: chosenHost, ...rest} = options; const host = lowercasedHosts[chosenHost]; - if (host) return host.scaffolder(rest); + if (host) return host.scaffold(rest); return {}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index 5343ff1d..c4a1ee23 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -10,7 +10,7 @@ describe('vcs host scaffolder', () => { const otherOptions = any.simpleObject(); const results = any.simpleObject(); const chosenHostScaffolder = vi.fn(); - const hostScaffolders = {...any.simpleObject(), [chosenHost]: {scaffolder: chosenHostScaffolder}}; + const hostScaffolders = {...any.simpleObject(), [chosenHost]: {scaffold: chosenHostScaffolder}}; when(chosenHostScaffolder).calledWith(otherOptions).mockResolvedValue(results); expect(await scaffoldVcsHost(hostScaffolders, {...otherOptions, host: chosenHost.toLowerCase()})).toEqual(results); diff --git a/src/vcs/host/schema.js b/src/vcs/host/schema.js index ba9b0d6f..3612530c 100644 --- a/src/vcs/host/schema.js +++ b/src/vcs/host/schema.js @@ -1,7 +1,7 @@ import joi from 'joi'; +import {optionsSchemas} from '@form8ion/core'; -export default joi.object().pattern(/^/, joi.object({ - scaffolder: joi.func().arity(1).required(), +export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin.keys({ prompt: joi.func().required(), public: joi.bool(), private: joi.bool() diff --git a/src/vcs/host/schema.test.js b/src/vcs/host/schema.test.js index 18a318fb..187a8b42 100644 --- a/src/vcs/host/schema.test.js +++ b/src/vcs/host/schema.test.js @@ -13,7 +13,7 @@ describe('vcs-host plugins schema', () => { any.listOf(any.string), { factory: () => ({ - scaffolder: foo => foo, + scaffold: foo => foo, prompt: () => undefined, public: any.boolean(), private: any.boolean() @@ -31,40 +31,40 @@ describe('vcs-host plugins schema', () => { it('should require a `scaffolder` to be included', () => { expect(() => validateOptions(vcsHostSchema, {[key]: {}})) - .toThrowError(`"${key}.scaffolder" is required`); + .toThrowError(`"${key}.scaffold" is required`); }); it('should require `scaffolder` to be a function', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffolder: any.word()}})) - .toThrowError(`"${key}.scaffolder" must be of type function`); + expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: any.word()}})) + .toThrowError(`"${key}.scaffold" must be of type function`); }); it('should require the scaffolder to accept a single argument', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffolder: () => undefined}})) - .toThrowError(`"${key}.scaffolder" must have an arity of 1`); + expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: () => undefined}})) + .toThrowError(`"${key}.scaffold" must have an arity of 1`); }); it('should require a `prompt` property', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffolder: foo => foo}})) + expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: foo => foo}})) .toThrowError(`"${key}.prompt" is required`); }); it('should require the `prompt` to be a function', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffolder: foo => foo, prompt: any.word()}})) + expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: foo => foo, prompt: any.word()}})) .toThrowError(`"${key}.prompt" must be of type function`); }); it('should require the `public` property to be a boolean', () => { expect(() => validateOptions( vcsHostSchema, - {[key]: {scaffolder: foo => foo, prompt: bar => bar, public: any.word()}} + {[key]: {scaffold: foo => foo, prompt: bar => bar, public: any.word()}} )).toThrowError(`"${key}.public" must be a boolean`); }); it('should require the `private` property to be a boolean', () => { expect(() => validateOptions( vcsHostSchema, - {[key]: {scaffolder: foo => foo, prompt: bar => bar, private: any.word()}} + {[key]: {scaffold: foo => foo, prompt: bar => bar, private: any.word()}} )).toThrowError(`"${key}.private" must be a boolean`); }); }); diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index f435fd70..07476f44 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -69,13 +69,13 @@ When(/^the project is scaffolded$/, async function () { } } } - } - }, - ...vcsHost && { - vcsHosts: { - [vcsHost]: { - scaffolder: ({name, owner}) => ({sshUrl: this.remoteOriginUrl, name, owner}), - prompt: () => undefined + }, + ...vcsHost && { + vcsHosts: { + [vcsHost]: { + scaffold: ({name, owner}) => ({sshUrl: this.remoteOriginUrl, name, owner}), + prompt: () => undefined + } } } }, From df49ff065703c61ddb849f361014a4f7f3fe42e0 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 09:25:08 +0000 Subject: [PATCH 12/41] chore(action): update github/codeql-action action to v3.25.14 --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/ossf-scorecard.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 6c817de3..e969ff14 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -45,7 +45,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13 + uses: github/codeql-action/init@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -56,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13 + uses: github/codeql-action/autobuild@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -70,4 +70,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13 + uses: github/codeql-action/analyze@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 7cb5b49a..887a92d1 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13 + uses: github/codeql-action/upload-sarif@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 with: sarif_file: results.sarif From 0f92d9399b2417be1ff337fc953955eec6e86844 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 25 Jul 2024 10:35:26 -0500 Subject: [PATCH 13/41] fix(plugins): actually call the proper scaffold function from the dependency-updater plugin --- src/dependency-updater/scaffolder.js | 10 +++++----- src/dependency-updater/scaffolder.test.js | 6 +++--- .../features/step_definitions/common-steps.js | 6 +++--- .../step_definitions/dependency-updater-steps.js | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/dependency-updater/scaffolder.js b/src/dependency-updater/scaffolder.js index 78fded2d..da03aeb4 100644 --- a/src/dependency-updater/scaffolder.js +++ b/src/dependency-updater/scaffolder.js @@ -1,14 +1,14 @@ import {questionNames} from '../prompts/question-names.js'; import {promptForDependencyUpdaterChoice} from './prompt.js'; -export default async function (scaffolders, decisions, options) { - if (!Object.keys(scaffolders).length) return undefined; +export default async function (plugins, decisions, options) { + if (!Object.keys(plugins).length) return undefined; - const scaffolderDetails = scaffolders[ - (await promptForDependencyUpdaterChoice(scaffolders, decisions))[questionNames.DEPENDENCY_UPDATER] + const plugin = plugins[ + (await promptForDependencyUpdaterChoice(plugins, decisions))[questionNames.DEPENDENCY_UPDATER] ]; - if (scaffolderDetails) return scaffolderDetails.scaffolder(options); + if (plugin) return plugin.scaffold(options); return undefined; } diff --git a/src/dependency-updater/scaffolder.test.js b/src/dependency-updater/scaffolder.test.js index 4d47cea7..cbbed534 100644 --- a/src/dependency-updater/scaffolder.test.js +++ b/src/dependency-updater/scaffolder.test.js @@ -19,14 +19,14 @@ describe('dependency-updater scaffolder', () => { const options = any.simpleObject(); const chosenUpdater = any.word(); const chosenUpdaterScaffolder = vi.fn(); - const scaffolders = {...any.simpleObject(), [chosenUpdater]: {scaffolder: chosenUpdaterScaffolder}}; + const plugins = {...any.simpleObject(), [chosenUpdater]: {scaffold: chosenUpdaterScaffolder}}; const scaffolderResult = any.simpleObject(); when(prompt.promptForDependencyUpdaterChoice) - .calledWith(scaffolders, decisions) + .calledWith(plugins, decisions) .mockResolvedValue({[questionNames.DEPENDENCY_UPDATER]: chosenUpdater}); when(chosenUpdaterScaffolder).calledWith(options).mockResolvedValue(scaffolderResult); - expect(await scaffoldUpdater(scaffolders, decisions, options)).toEqual(scaffolderResult); + expect(await scaffoldUpdater(plugins, decisions, options)).toEqual(scaffolderResult); }); it('should not present a prompt if no updaters are registered', async () => { diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 07476f44..56c49bd6 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -54,9 +54,9 @@ When(/^the project is scaffolded$/, async function () { await scaffold({ plugins: { - ...this.updaterScaffolderDetails && { + ...this.updatePlugin && { dependencyUpdaters: { - [chosenUpdater]: {...this.updaterScaffolderDetails, scaffold: this.updaterScaffolderDetails.scaffolder} + [chosenUpdater]: this.updatePlugin } }, languages: { @@ -92,7 +92,7 @@ When(/^the project is scaffolded$/, async function () { [questionNames.GIT_REPO]: repoShouldBeCreated ?? false, ...repoShouldBeCreated && {[questionNames.REPO_HOST]: vcsHost}, [questionNames.PROJECT_LANGUAGE]: chosenLanguage, - ...this.updaterScaffolderDetails && {[questionNames.DEPENDENCY_UPDATER]: chosenUpdater} + ...this.updatePlugin && {[questionNames.DEPENDENCY_UPDATER]: chosenUpdater} } }); }); diff --git a/test/integration/features/step_definitions/dependency-updater-steps.js b/test/integration/features/step_definitions/dependency-updater-steps.js index 8284e566..165ec2f8 100644 --- a/test/integration/features/step_definitions/dependency-updater-steps.js +++ b/test/integration/features/step_definitions/dependency-updater-steps.js @@ -12,7 +12,7 @@ After(function () { }); Given('a dependency updater can be chosen', async function () { - this.updaterScaffolderDetails = {scaffolder: foo => updaterScaffolder(foo)}; + this.updatePlugin = {scaffold: foo => updaterScaffolder(foo)}; }); Then('the dependency updater was executed', async function () { From ce227fdd1ad994f7c74658ffe8f7a00aec651580 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 25 Jul 2024 11:42:55 -0500 Subject: [PATCH 14/41] feat(dependency-updaters): apply lifters after scaffolding --- .eslintrc.yml | 3 + README.md | 50 ++++++++-------- example.js | 58 +++++++++---------- package-lock.json | 9 ++- package.json | 2 +- src/scaffolder.js | 2 +- src/scaffolder.test.js | 3 +- .../dependency-updater-steps.js | 22 ++++++- 8 files changed, 85 insertions(+), 64 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index 37194ee8..4b157d6b 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,3 +1,6 @@ extends: - '@form8ion' - '@form8ion/cucumber' + +parserOptions: + ecmaVersion: 2022 diff --git a/README.md b/README.md index ad6c7ba4..4493ffa6 100644 --- a/README.md +++ b/README.md @@ -77,33 +77,33 @@ import {lift, questionNames, scaffold} from '@form8ion/project'; #### Execute ```javascript - await scaffold({ - decisions: { - [questionNames.PROJECT_NAME]: 'my-project', - [questionNames.LICENSE]: 'MIT', - [questionNames.VISIBILITY]: 'Public', - [questionNames.DESCRIPTION]: 'My project', - [questionNames.GIT_REPO]: false, - [questionNames.COPYRIGHT_HOLDER]: 'John Smith', - [questionNames.COPYRIGHT_YEAR]: '2022', - [questionNames.PROJECT_LANGUAGE]: 'foo' +await scaffold({ + decisions: { + [questionNames.PROJECT_NAME]: 'my-project', + [questionNames.LICENSE]: 'MIT', + [questionNames.VISIBILITY]: 'Public', + [questionNames.DESCRIPTION]: 'My project', + [questionNames.GIT_REPO]: false, + [questionNames.COPYRIGHT_HOLDER]: 'John Smith', + [questionNames.COPYRIGHT_YEAR]: '2022', + [questionNames.PROJECT_LANGUAGE]: 'foo' + }, + plugins: { + dependencyUpdaters: { + bar: {scaffold: options => options} }, - plugins: { - dependencyUpdaters: { - bar: {scaffold: options => options} - }, - languages: { - foo: {scaffold: options => options} - } + languages: { + foo: {scaffold: options => options} } - }); - - await lift({ - projectRoot: process.cwd(), - results: {}, - enhancers: {foo: {test: () => true, lift: () => ({})}}, - vcs: {} - }); + } +}); + +await lift({ + projectRoot: process.cwd(), + results: {}, + enhancers: {foo: {test: () => true, lift: () => ({})}}, + vcs: {} +}); ``` ### API diff --git a/example.js b/example.js index 0a0d59c6..792c08e6 100644 --- a/example.js +++ b/example.js @@ -7,36 +7,36 @@ import {lift, questionNames, scaffold} from './lib/index.js'; // #### Execute -// remark-usage-ignore-next 2 -(async () => { - stubbedFs({templates: {'editorconfig.ini': await fs.readFile(resolve('templates', 'editorconfig.ini'))}}); +// remark-usage-ignore-next 4 +stubbedFs({ + templates: {'editorconfig.ini': await fs.readFile(resolve('templates', 'editorconfig.ini'))}, + node_modules: stubbedFs.load('node_modules') +}); - await scaffold({ - decisions: { - [questionNames.PROJECT_NAME]: 'my-project', - [questionNames.LICENSE]: 'MIT', - [questionNames.VISIBILITY]: 'Public', - [questionNames.DESCRIPTION]: 'My project', - [questionNames.GIT_REPO]: false, - [questionNames.COPYRIGHT_HOLDER]: 'John Smith', - [questionNames.COPYRIGHT_YEAR]: '2022', - [questionNames.PROJECT_LANGUAGE]: 'foo' +await scaffold({ + decisions: { + [questionNames.PROJECT_NAME]: 'my-project', + [questionNames.LICENSE]: 'MIT', + [questionNames.VISIBILITY]: 'Public', + [questionNames.DESCRIPTION]: 'My project', + [questionNames.GIT_REPO]: false, + [questionNames.COPYRIGHT_HOLDER]: 'John Smith', + [questionNames.COPYRIGHT_YEAR]: '2022', + [questionNames.PROJECT_LANGUAGE]: 'foo' + }, + plugins: { + dependencyUpdaters: { + bar: {scaffold: options => options} }, - plugins: { - dependencyUpdaters: { - bar: {scaffold: options => options} - }, - languages: { - foo: {scaffold: options => options} - } + languages: { + foo: {scaffold: options => options} } - }); + } +}); - await lift({ - projectRoot: process.cwd(), - results: {}, - enhancers: {foo: {test: () => true, lift: () => ({})}}, - vcs: {} - }); -// remark-usage-ignore-next -})(); +await lift({ + projectRoot: process.cwd(), + results: {}, + enhancers: {foo: {test: () => true, lift: () => ({})}}, + vcs: {} +}); diff --git a/package-lock.json b/package-lock.json index 65888c08..783cb9ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0-semantically-released", "license": "MIT", "dependencies": { - "@form8ion/core": "^4.4.1", + "@form8ion/core": "^4.6.0", "@form8ion/execa-wrapper": "^1.0.0", "@form8ion/git": "^1.2.0", "@form8ion/overridable-prompts": "^1.1.0", @@ -1726,10 +1726,9 @@ } }, "node_modules/@form8ion/core": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.4.1.tgz", - "integrity": "sha512-GGctHNb5FVw8oMe/I8ZuW9wvdRVbwrdw9MHLb+RIHihGK0k6vsttcThNPEZyWn3PpKefjUIJmz5+xVTUU8BMSQ==", - "license": "MIT", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.6.0.tgz", + "integrity": "sha512-wDPYTFZvsLZln3wJRwd7g+ixpy3PGABVMjeJ7XHQIOQJjgEpS/ACBuyBNMfuC+MC/Pw9SF3CJBTCO0xS062t0g==", "dependencies": { "@hapi/hoek": "^11.0.2", "@travi/cli-messages": "^1.0.5", diff --git a/package.json b/package.json index 07c5299f..ad8a3a85 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ } }, "dependencies": { - "@form8ion/core": "^4.4.1", + "@form8ion/core": "^4.6.0", "@form8ion/execa-wrapper": "^1.0.0", "@form8ion/git": "^1.2.0", "@form8ion/overridable-prompts": "^1.1.0", diff --git a/src/scaffolder.js b/src/scaffolder.js index cc3d2694..3c15f820 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -72,7 +72,7 @@ export async function scaffold(options) { nextSteps: contributedTasks }); - await lift({projectRoot, results: deepmerge.all(contributors)}); + await lift({projectRoot, results: deepmerge.all(contributors), enhancers: dependencyUpdaters}); const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 11b409ae..5e7179f6 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -151,7 +151,8 @@ describe('project scaffolder', () => { expect(scaffoldEditorconfig).toHaveBeenCalledWith({projectRoot: projectPath}); expect(lift).toHaveBeenCalledWith({ projectRoot: projectPath, - results: deepmerge.all([licenseResults, languageResults, dependencyUpdaterResults, contributingResults]) + results: deepmerge.all([licenseResults, languageResults, dependencyUpdaterResults, contributingResults]), + enhancers: dependencyUpdaters }); expect(resultsReporter.reportResults).toHaveBeenCalledWith({ nextSteps: [...gitNextSteps, ...dependencyUpdaterNextSteps] diff --git a/test/integration/features/step_definitions/dependency-updater-steps.js b/test/integration/features/step_definitions/dependency-updater-steps.js index 165ec2f8..d8584f4a 100644 --- a/test/integration/features/step_definitions/dependency-updater-steps.js +++ b/test/integration/features/step_definitions/dependency-updater-steps.js @@ -1,10 +1,15 @@ +import {promises as fs} from 'node:fs'; + import {After, Before, Given, Then} from '@cucumber/cucumber'; import sinon from 'sinon'; +import any from '@travi/any'; +import {fileExists} from '@form8ion/core'; -let updaterScaffolder; +let updaterScaffolder, updaterLifter; Before(function () { updaterScaffolder = sinon.stub(); + updaterLifter = sinon.stub(); }); After(function () { @@ -12,13 +17,26 @@ After(function () { }); Given('a dependency updater can be chosen', async function () { - this.updatePlugin = {scaffold: foo => updaterScaffolder(foo)}; + const filename = any.word(); + this.updatePlugin = { + scaffold: async ({projectRoot}) => { + updaterScaffolder(); + await fs.writeFile(`${projectRoot}/${filename}.txt`, any.sentence()); + }, + lift: foo => { + updaterLifter(foo); + return any.simpleObject(); + }, + test: async ({projectRoot}) => fileExists(`${projectRoot}/${filename}.txt`) + }; }); Then('the dependency updater was executed', async function () { sinon.assert.calledOnce(updaterScaffolder); + sinon.assert.calledOnce(updaterLifter); }); Then('the dependency updater was not executed', async function () { sinon.assert.notCalled(updaterScaffolder); + sinon.assert.notCalled(updaterLifter); }); From d61517dfa8518682cbf281e972daf40bae8b5f4c Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 16:48:02 +0000 Subject: [PATCH 15/41] chore(deps): update dependency husky to v9.1.2 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 783cb9ce..2713cb7b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.1", + "husky": "9.1.2", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", @@ -9881,9 +9881,9 @@ } }, "node_modules/husky": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.1.tgz", - "integrity": "sha512-fCqlqLXcBnXa/TJXmT93/A36tJsjdJkibQ1MuIiFyCCYUlpYpIaj2mv1w+3KR6Rzu1IC3slFTje5f6DUp2A2rg==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.2.tgz", + "integrity": "sha512-1/aDMXZdhr1VdJJTLt6e7BipM0Jd9qkpubPiIplon1WmCeOy3nnzsCMeBqS9AsL5ioonl8F8y/F2CLOmk19/Pw==", "dev": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index ad8a3a85..3ea023d3 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.1", + "husky": "9.1.2", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", From 142c124732f4d1de8dd9f1b4c0f3c08c28a837bc Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 25 Jul 2024 23:35:11 -0400 Subject: [PATCH 16/41] feat(vcs-hosts): apply lifters after scaffolding --- README.md | 6 ++++++ example.js | 6 ++++++ src/scaffolder.js | 2 +- src/scaffolder.test.js | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4493ffa6..a9196968 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,12 @@ await scaffold({ }, languages: { foo: {scaffold: options => options} + }, + vcsHosts: { + baz: { + scaffold: options => options, + prompt: () => ({repoOwner: 'form8ion'}) + } } } }); diff --git a/example.js b/example.js index 792c08e6..e8be7092 100644 --- a/example.js +++ b/example.js @@ -30,6 +30,12 @@ await scaffold({ }, languages: { foo: {scaffold: options => options} + }, + vcsHosts: { + baz: { + scaffold: options => options, + prompt: () => ({repoOwner: 'form8ion'}) + } } } }); diff --git a/src/scaffolder.js b/src/scaffolder.js index 3c15f820..90344938 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -72,7 +72,7 @@ export async function scaffold(options) { nextSteps: contributedTasks }); - await lift({projectRoot, results: deepmerge.all(contributors), enhancers: dependencyUpdaters}); + await lift({projectRoot, results: deepmerge.all(contributors), enhancers: {...dependencyUpdaters, ...vcsHosts}}); const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 5e7179f6..d8432c96 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -152,7 +152,7 @@ describe('project scaffolder', () => { expect(lift).toHaveBeenCalledWith({ projectRoot: projectPath, results: deepmerge.all([licenseResults, languageResults, dependencyUpdaterResults, contributingResults]), - enhancers: dependencyUpdaters + enhancers: {...dependencyUpdaters, ...vcsHosts} }); expect(resultsReporter.reportResults).toHaveBeenCalledWith({ nextSteps: [...gitNextSteps, ...dependencyUpdaterNextSteps] From 008a5a9359ad2c0e151649a1416fb75a80cbe499 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 25 Jul 2024 23:41:18 -0400 Subject: [PATCH 17/41] feat(lift): provide vcs details to the lift process --- src/scaffolder.js | 2 +- src/scaffolder.test.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 90344938..bd23fe8b 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -72,7 +72,7 @@ export async function scaffold(options) { nextSteps: contributedTasks }); - await lift({projectRoot, results: deepmerge.all(contributors), enhancers: {...dependencyUpdaters, ...vcsHosts}}); + await lift({projectRoot, vcs, results: deepmerge.all(contributors), enhancers: {...dependencyUpdaters, ...vcsHosts}}); const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index d8432c96..acdb1fe0 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -151,6 +151,7 @@ describe('project scaffolder', () => { expect(scaffoldEditorconfig).toHaveBeenCalledWith({projectRoot: projectPath}); expect(lift).toHaveBeenCalledWith({ projectRoot: projectPath, + vcs, results: deepmerge.all([licenseResults, languageResults, dependencyUpdaterResults, contributingResults]), enhancers: {...dependencyUpdaters, ...vcsHosts} }); From 969e585b32c6e6f618fbf1068a53bc57f094d170 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Thu, 25 Jul 2024 23:44:10 -0400 Subject: [PATCH 18/41] chore(husky): remove deprecated lines from hooks --- .husky/commit-msg | 5 +---- .husky/pre-commit | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.husky/commit-msg b/.husky/commit-msg index 314e8214..fd2bf708 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npx --no-install commitlint --edit $1 \ No newline at end of file +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit index 0396fa5e..72c4429b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - -npm test \ No newline at end of file +npm test From 9322e3aaaa6eb783ffd2abec47394e3e2c74246a Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Fri, 26 Jul 2024 00:08:09 -0400 Subject: [PATCH 19/41] feat(vcs-hosts): moved vcs-host scaffolding to earlier since lifting can be a separate phase now --- src/scaffolder.js | 56 +++++++++++++++++++----------------------- src/scaffolder.test.js | 23 ++++++++++------- 2 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index bd23fe8b..e252db7a 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -40,6 +40,24 @@ export async function scaffold(options) { scaffoldEditorConfig({projectRoot}) ]); + const [vcsHostResults, dependencyUpdaterResults] = vcs + ? await Promise.all([ + scaffoldVcsHost(vcsHosts, { + ...vcs, + projectRoot, + description, + visibility + }), + scaffoldDependencyUpdater( + dependencyUpdaters, + decisions, + {projectRoot, vcs} + ) + ]) + : []; + + const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); + const {[questionNames.PROJECT_LANGUAGE]: projectLanguage} = await promptForLanguageDetails(languages, decisions); const language = await scaffoldLanguage( @@ -48,34 +66,10 @@ export async function scaffold(options) { {projectRoot, projectName, vcs, visibility, license: chosenLicense || 'UNLICENSED', description} ); - const dependencyUpdaterResults = vcs && await scaffoldDependencyUpdater( - dependencyUpdaters, - decisions, - {projectRoot, vcs} - ); - - const contributors = [license, language, dependencyUpdaterResults, contributing].filter(Boolean); - const contributedTasks = contributors - .map(contributor => contributor.nextSteps) - .filter(Boolean) - .reduce((acc, contributedNextSteps) => ([...acc, ...contributedNextSteps]), []); - - const vcsHostResults = vcs && await scaffoldVcsHost(vcsHosts, { - ...vcs, - projectRoot, - description, - visibility, - ...language && { - homepage: language.projectDetails && language.projectDetails.homepage, - tags: language.tags - }, - nextSteps: contributedTasks - }); + const contributors = [license, language, dependencyUpdaterResults, contributing, gitResults].filter(Boolean); await lift({projectRoot, vcs, results: deepmerge.all(contributors), enhancers: {...dependencyUpdaters, ...vcsHosts}}); - const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); - if (language && language.verificationCommand) { info('Verifying the generated project'); @@ -84,10 +78,10 @@ export async function scaffold(options) { await subprocess; } - reportResults({ - nextSteps: [ - ...(gitResults && gitResults.nextSteps) ? gitResults.nextSteps : [], - ...contributedTasks - ] - }); + const contributedTasks = contributors + .map(contributor => contributor.nextSteps) + .filter(Boolean) + .reduce((acc, contributedNextSteps) => ([...acc, ...contributedNextSteps]), []); + + reportResults({nextSteps: contributedTasks}); } diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index acdb1fe0..0fbb249e 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -91,6 +91,7 @@ describe('project scaffolder', () => { tags }; const licenseResults = {badges: {consumer: {license: licenseBadge}}}; + const gitResults = {nextSteps: gitNextSteps}; const contributingResults = any.simpleObject(); when(optionsValidator.validate) .calledWith(options) @@ -112,7 +113,7 @@ describe('project scaffolder', () => { when(scaffoldGit) .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, vcsHosts, visibility, decisions) .mockResolvedValue(vcs); - liftGit.mockResolvedValue({nextSteps: gitNextSteps}); + liftGit.mockResolvedValue(gitResults); when(licenseScaffolder.default) .calledWith({projectRoot: projectPath, license, copyright}) .mockResolvedValue(licenseResults); @@ -123,10 +124,7 @@ describe('project scaffolder', () => { ...vcs, projectRoot: projectPath, description, - visibility, - homepage: undefined, - nextSteps: [...dependencyUpdaterNextSteps], - tags + visibility } ) .mockResolvedValue(vcsOriginDetails); @@ -152,11 +150,17 @@ describe('project scaffolder', () => { expect(lift).toHaveBeenCalledWith({ projectRoot: projectPath, vcs, - results: deepmerge.all([licenseResults, languageResults, dependencyUpdaterResults, contributingResults]), + results: deepmerge.all([ + licenseResults, + languageResults, + dependencyUpdaterResults, + contributingResults, + gitResults + ]), enhancers: {...dependencyUpdaters, ...vcsHosts} }); expect(resultsReporter.reportResults).toHaveBeenCalledWith({ - nextSteps: [...gitNextSteps, ...dependencyUpdaterNextSteps] + nextSteps: [...dependencyUpdaterNextSteps, ...gitNextSteps] }); }); @@ -259,11 +263,12 @@ describe('project scaffolder', () => { nextSteps: languageNextSteps, tags }; + const gitResults = {nextSteps: gitNextSteps}; when(optionsValidator.validate) .calledWith(options) .mockReturnValue({decisions, plugins: {languages, vcsHosts}}); scaffoldGit.mockResolvedValue(vcs); - liftGit.mockResolvedValue({nextSteps: gitNextSteps}); + liftGit.mockResolvedValue(gitResults); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, [coreQuestionNames.VISIBILITY]: visibility, @@ -304,7 +309,7 @@ describe('project scaffolder', () => { expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, origin: vcsOriginDetails}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execaPipe).toHaveBeenCalledWith(process.stdout); - expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...gitNextSteps, ...languageNextSteps]}); + expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...languageNextSteps, ...gitNextSteps]}); }); it('should consider the language details to be optional', async () => { From acd3026b0c393b8e366241546f4f8c3cc863fe12 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 15:10:14 +0000 Subject: [PATCH 20/41] chore(action): update github/codeql-action action to v3.25.15 --- .github/workflows/codeql-analysis.yml | 6 +++--- .github/workflows/ossf-scorecard.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index e969ff14..beeb3677 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -45,7 +45,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 + uses: github/codeql-action/init@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -56,7 +56,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 + uses: github/codeql-action/autobuild@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -70,4 +70,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 + uses: github/codeql-action/analyze@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 887a92d1..33b98deb 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -67,6 +67,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@5cf07d8b700b67e235fbb65cbc84f69c0cf10464 # v3.25.14 + uses: github/codeql-action/upload-sarif@afb54ba388a7dca6ecae48f608c4ff05ff4cc77a # v3.25.15 with: sarif_file: results.sarif From d0fcfe8d49b7a6ed216b4624e0ded45326245186 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 21:10:08 +0000 Subject: [PATCH 21/41] chore(deps): update dependency husky to v9.1.3 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2713cb7b..cf9b0f62 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.2", + "husky": "9.1.3", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", @@ -9881,9 +9881,9 @@ } }, "node_modules/husky": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.2.tgz", - "integrity": "sha512-1/aDMXZdhr1VdJJTLt6e7BipM0Jd9qkpubPiIplon1WmCeOy3nnzsCMeBqS9AsL5ioonl8F8y/F2CLOmk19/Pw==", + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.3.tgz", + "integrity": "sha512-ET3TQmQgdIu0pt+jKkpo5oGyg/4MQZpG6xcam5J5JyNJV+CBT23OBpCF15bKHKycRyMH9k6ONy8g2HdGIsSkMQ==", "dev": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index 3ea023d3..8864b641 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.2", + "husky": "9.1.3", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", From 2c9168fb39eb4ec565e47580767895e8a2c0cac8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 05:19:49 +0000 Subject: [PATCH 22/41] chore(deps): update dependency rollup to v4.19.1 --- package-lock.json | 136 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf9b0f62..85ece367 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.0", + "rollup": "4.19.1", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2", @@ -3423,9 +3423,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.0.tgz", - "integrity": "sha512-JlPfZ/C7yn5S5p0yKk7uhHTTnFlvTgLetl2VxqE518QgyM7C9bSfFTYvB/Q/ftkq0RIPY4ySxTz+/wKJ/dXC0w==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.1.tgz", + "integrity": "sha512-XzqSg714++M+FXhHfXpS1tDnNZNpgxxuGZWlRG/jSj+VEPmZ0yg6jV4E0AL3uyBKxO8mO3xtOsP5mQ+XLfrlww==", "cpu": [ "arm" ], @@ -3437,9 +3437,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.0.tgz", - "integrity": "sha512-RDxUSY8D1tWYfn00DDi5myxKgOk6RvWPxhmWexcICt/MEC6yEMr4HNCu1sXXYLw8iAsg0D44NuU+qNq7zVWCrw==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.1.tgz", + "integrity": "sha512-thFUbkHteM20BGShD6P08aungq4irbIZKUNbG70LN8RkO7YztcGPiKTTGZS7Kw+x5h8hOXs0i4OaHwFxlpQN6A==", "cpu": [ "arm64" ], @@ -3451,9 +3451,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.0.tgz", - "integrity": "sha512-emvKHL4B15x6nlNTBMtIaC9tLPRpeA5jMvRLXVbl/W9Ie7HhkrE7KQjvgS9uxgatL1HmHWDXk5TTS4IaNJxbAA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.1.tgz", + "integrity": "sha512-8o6eqeFZzVLia2hKPUZk4jdE3zW7LCcZr+MD18tXkgBBid3lssGVAYuox8x6YHoEPDdDa9ixTaStcmx88lio5Q==", "cpu": [ "arm64" ], @@ -3465,9 +3465,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.0.tgz", - "integrity": "sha512-fO28cWA1dC57qCd+D0rfLC4VPbh6EOJXrreBmFLWPGI9dpMlER2YwSPZzSGfq11XgcEpPukPTfEVFtw2q2nYJg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.1.tgz", + "integrity": "sha512-4T42heKsnbjkn7ovYiAdDVRRWZLU9Kmhdt6HafZxFcUdpjlBlxj4wDrt1yFWLk7G4+E+8p2C9tcmSu0KA6auGA==", "cpu": [ "x64" ], @@ -3479,9 +3479,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.0.tgz", - "integrity": "sha512-2Rn36Ubxdv32NUcfm0wB1tgKqkQuft00PtM23VqLuCUR4N5jcNWDoV5iBC9jeGdgS38WK66ElncprqgMUOyomw==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.1.tgz", + "integrity": "sha512-MXg1xp+e5GhZ3Vit1gGEyoC+dyQUBy2JgVQ+3hUrD9wZMkUw/ywgkpK7oZgnB6kPpGrxJ41clkPPnsknuD6M2Q==", "cpu": [ "arm" ], @@ -3493,9 +3493,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.0.tgz", - "integrity": "sha512-gJuzIVdq/X1ZA2bHeCGCISe0VWqCoNT8BvkQ+BfsixXwTOndhtLUpOg0A1Fcx/+eA6ei6rMBzlOz4JzmiDw7JQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.1.tgz", + "integrity": "sha512-DZNLwIY4ftPSRVkJEaxYkq7u2zel7aah57HESuNkUnz+3bZHxwkCUkrfS2IWC1sxK6F2QNIR0Qr/YXw7nkF3Pw==", "cpu": [ "arm" ], @@ -3507,9 +3507,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.0.tgz", - "integrity": "sha512-0EkX2HYPkSADo9cfeGFoQ7R0/wTKb7q6DdwI4Yn/ULFE1wuRRCHybxpl2goQrx4c/yzK3I8OlgtBu4xvted0ug==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.1.tgz", + "integrity": "sha512-C7evongnjyxdngSDRRSQv5GvyfISizgtk9RM+z2biV5kY6S/NF/wta7K+DanmktC5DkuaJQgoKGf7KUDmA7RUw==", "cpu": [ "arm64" ], @@ -3521,9 +3521,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.0.tgz", - "integrity": "sha512-GlIQRj9px52ISomIOEUq/IojLZqzkvRpdP3cLgIE1wUWaiU5Takwlzpz002q0Nxxr1y2ZgxC2obWxjr13lvxNQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.1.tgz", + "integrity": "sha512-89tFWqxfxLLHkAthAcrTs9etAoBFRduNfWdl2xUs/yLV+7XDrJ5yuXMHptNqf1Zw0UCA3cAutkAiAokYCkaPtw==", "cpu": [ "arm64" ], @@ -3535,9 +3535,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.0.tgz", - "integrity": "sha512-N6cFJzssruDLUOKfEKeovCKiHcdwVYOT1Hs6dovDQ61+Y9n3Ek4zXvtghPPelt6U0AH4aDGnDLb83uiJMkWYzQ==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.1.tgz", + "integrity": "sha512-PromGeV50sq+YfaisG8W3fd+Cl6mnOOiNv2qKKqKCpiiEke2KiKVyDqG/Mb9GWKbYMHj5a01fq/qlUR28PFhCQ==", "cpu": [ "ppc64" ], @@ -3549,9 +3549,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.0.tgz", - "integrity": "sha512-2DnD3mkS2uuam/alF+I7M84koGwvn3ZVD7uG+LEWpyzo/bq8+kKnus2EVCkcvh6PlNB8QPNFOz6fWd5N8o1CYg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.1.tgz", + "integrity": "sha512-/1BmHYh+iz0cNCP0oHCuF8CSiNj0JOGf0jRlSo3L/FAyZyG2rGBuKpkZVH9YF+x58r1jgWxvm1aRg3DHrLDt6A==", "cpu": [ "riscv64" ], @@ -3563,9 +3563,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.0.tgz", - "integrity": "sha512-D6pkaF7OpE7lzlTOFCB2m3Ngzu2ykw40Nka9WmKGUOTS3xcIieHe82slQlNq69sVB04ch73thKYIWz/Ian8DUA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.1.tgz", + "integrity": "sha512-0cYP5rGkQWRZKy9/HtsWVStLXzCF3cCBTRI+qRL8Z+wkYlqN7zrSYm6FuY5Kd5ysS5aH0q5lVgb/WbG4jqXN1Q==", "cpu": [ "s390x" ], @@ -3577,9 +3577,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.0.tgz", - "integrity": "sha512-HBndjQLP8OsdJNSxpNIN0einbDmRFg9+UQeZV1eiYupIRuZsDEoeGU43NQsS34Pp166DtwQOnpcbV/zQxM+rWA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.1.tgz", + "integrity": "sha512-XUXeI9eM8rMP8aGvii/aOOiMvTs7xlCosq9xCjcqI9+5hBxtjDpD+7Abm1ZhVIFE1J2h2VIg0t2DX/gjespC2Q==", "cpu": [ "x64" ], @@ -3591,9 +3591,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.0.tgz", - "integrity": "sha512-HxfbvfCKJe/RMYJJn0a12eiOI9OOtAUF4G6ozrFUK95BNyoJaSiBjIOHjZskTUffUrB84IPKkFG9H9nEvJGW6A==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.1.tgz", + "integrity": "sha512-V7cBw/cKXMfEVhpSvVZhC+iGifD6U1zJ4tbibjjN+Xi3blSXaj/rJynAkCFFQfoG6VZrAiP7uGVzL440Q6Me2Q==", "cpu": [ "x64" ], @@ -3605,9 +3605,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.0.tgz", - "integrity": "sha512-HxDMKIhmcguGTiP5TsLNolwBUK3nGGUEoV/BO9ldUBoMLBssvh4J0X8pf11i1fTV7WShWItB1bKAKjX4RQeYmg==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.1.tgz", + "integrity": "sha512-88brja2vldW/76jWATlBqHEoGjJLRnP0WOEKAUbMcXaAZnemNhlAHSyj4jIwMoP2T750LE9lblvD4e2jXleZsA==", "cpu": [ "arm64" ], @@ -3619,9 +3619,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.0.tgz", - "integrity": "sha512-xItlIAZZaiG/u0wooGzRsx11rokP4qyc/79LkAOdznGRAbOFc+SfEdfUOszG1odsHNgwippUJavag/+W/Etc6Q==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.1.tgz", + "integrity": "sha512-LdxxcqRVSXi6k6JUrTah1rHuaupoeuiv38du8Mt4r4IPer3kwlTo+RuvfE8KzZ/tL6BhaPlzJ3835i6CxrFIRQ==", "cpu": [ "ia32" ], @@ -3633,9 +3633,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.0.tgz", - "integrity": "sha512-xNo5fV5ycvCCKqiZcpB65VMR11NJB+StnxHz20jdqRAktfdfzhgjTiJ2doTDQE/7dqGaV5I7ZGqKpgph6lCIag==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.1.tgz", + "integrity": "sha512-2bIrL28PcK3YCqD9anGxDxamxdiJAxA+l7fWIwM5o8UqNy1t3d1NdAweO2XhA0KTDJ5aH1FsuiT5+7VhtHliXg==", "cpu": [ "x64" ], @@ -19577,9 +19577,9 @@ } }, "node_modules/rollup": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.0.tgz", - "integrity": "sha512-5r7EYSQIowHsK4eTZ0Y81qpZuJz+MUuYeqmmYmRMl1nwhdmbiYqt5jwzf6u7wyOzJgYqtCRMtVRKOtHANBz7rA==", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.1.tgz", + "integrity": "sha512-K5vziVlg7hTpYfFBI+91zHBEMo6jafYXpkMlqZjg7/zhIG9iHqazBf4xz9AVdjS9BruRn280ROqLI7G3OFRIlw==", "dev": true, "license": "MIT", "dependencies": { @@ -19593,22 +19593,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.19.0", - "@rollup/rollup-android-arm64": "4.19.0", - "@rollup/rollup-darwin-arm64": "4.19.0", - "@rollup/rollup-darwin-x64": "4.19.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.19.0", - "@rollup/rollup-linux-arm-musleabihf": "4.19.0", - "@rollup/rollup-linux-arm64-gnu": "4.19.0", - "@rollup/rollup-linux-arm64-musl": "4.19.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.19.0", - "@rollup/rollup-linux-riscv64-gnu": "4.19.0", - "@rollup/rollup-linux-s390x-gnu": "4.19.0", - "@rollup/rollup-linux-x64-gnu": "4.19.0", - "@rollup/rollup-linux-x64-musl": "4.19.0", - "@rollup/rollup-win32-arm64-msvc": "4.19.0", - "@rollup/rollup-win32-ia32-msvc": "4.19.0", - "@rollup/rollup-win32-x64-msvc": "4.19.0", + "@rollup/rollup-android-arm-eabi": "4.19.1", + "@rollup/rollup-android-arm64": "4.19.1", + "@rollup/rollup-darwin-arm64": "4.19.1", + "@rollup/rollup-darwin-x64": "4.19.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.19.1", + "@rollup/rollup-linux-arm-musleabihf": "4.19.1", + "@rollup/rollup-linux-arm64-gnu": "4.19.1", + "@rollup/rollup-linux-arm64-musl": "4.19.1", + "@rollup/rollup-linux-powerpc64le-gnu": "4.19.1", + "@rollup/rollup-linux-riscv64-gnu": "4.19.1", + "@rollup/rollup-linux-s390x-gnu": "4.19.1", + "@rollup/rollup-linux-x64-gnu": "4.19.1", + "@rollup/rollup-linux-x64-musl": "4.19.1", + "@rollup/rollup-win32-arm64-msvc": "4.19.1", + "@rollup/rollup-win32-ia32-msvc": "4.19.1", + "@rollup/rollup-win32-x64-msvc": "4.19.1", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index 8864b641..2cd075a6 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.0", + "rollup": "4.19.1", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2", From ab7f1df2eba8b1e2ee7fe4456d202eb58642bb81 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 27 Jul 2024 10:52:13 +0000 Subject: [PATCH 23/41] chore(action): update ossf/scorecard-action action to v2.4.0 --- .github/workflows/ossf-scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 33b98deb..63dddb95 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -37,7 +37,7 @@ jobs: persist-credentials: false - name: "Run analysis" - uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3 + uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 with: results_file: results.sarif results_format: sarif From e3904bb4a0afc884455eede8b97398aeb7218608 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 02:02:43 +0000 Subject: [PATCH 24/41] chore(deps): lock file maintenance --- package-lock.json | 225 +++++++++++++++++++--------------------------- 1 file changed, 93 insertions(+), 132 deletions(-) diff --git a/package-lock.json b/package-lock.json index 85ece367..a40e0e6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -98,9 +98,9 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.9.tgz", - "integrity": "sha512-e701mcfApCJqMMueQI0Fb68Amflj83+dvAvHawoBpAz+GDjCIyGHzNwnefjsWJ3xiYAqqiQFoWbspGYBdb2/ng==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.0.tgz", + "integrity": "sha512-P4fwKI2mjEb3ZU5cnMJzvRsRKGBUcs8jvxIoRmr6ufAY9Xk2Bz7JubRTTivkw55c7WQJfTECeqYVa+HZ0FzREg==", "dev": true, "license": "MIT", "engines": { @@ -149,13 +149,13 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.10", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.10.tgz", - "integrity": "sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.0.tgz", + "integrity": "sha512-3LEEcj3PVW8pW2R1SR1M89g/qrYk/m/mB/tLqn7dn4sbBUQyTqnlod+II2U4dqiGtUmkcnAmkMDralTFZttRiw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.24.9", + "@babel/types": "^7.25.0", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -208,46 +208,6 @@ "dev": true, "license": "ISC" }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", @@ -263,17 +223,16 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.9.tgz", - "integrity": "sha512-oYbh+rtFKj/HwBQkFlUzvcybzklmVdVV3UU+mN7n2t/q3yGHbuVdNxyFvSBO1tfvjyArpHNcWMAzsSPdyI46hw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.0.tgz", + "integrity": "sha512-bIkOa2ZJYn7FHnepzr5iX9Kmz8FjIz4UKzJ9zhX3dnYuVW0xul9RuR3skBfoLu+FPTQw90EHW9rJsSZhyLQ3fQ==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -307,19 +266,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { "version": "7.24.8", "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", @@ -351,14 +297,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.8.tgz", - "integrity": "sha512-gV2265Nkcz7weJJfvDoAEVzC1e2OTDpkGbEsebse8koXUJUXPsCMi7sRo/+SPMuMZ9MtUPnGwITTnQnU5YjyaQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.0.tgz", + "integrity": "sha512-MjgLZ42aCm0oGjJj8CtSM3DB8NOOf8h2l7DCTePJs29u+v7yO/RBX9nShlKMgFnRks/Q4tBAe7Hxnov9VkGwLw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.8" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -459,9 +405,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.8.tgz", - "integrity": "sha512-WzfbgXOkGzZiXXCqk43kKwZjzwx4oulxZi3nq2TYL9mOjQv6kYwul9mz6ID36njuL7Xkp6nJEfok848Zj10j/w==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.0.tgz", + "integrity": "sha512-CzdIU9jdP0dg7HdyB+bHvDJGagUv+qtzZt5rYCWwW6tITNqV9odjp6Qu41gkG0ca5UfdDUWrKkiAnHHdGRnOrA==", "dev": true, "license": "MIT", "bin": { @@ -677,35 +623,32 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.8.tgz", - "integrity": "sha512-t0P1xxAPzEDcEPmjprAQq19NWum4K0EQPjMwZQZbHt+GiZqvjCHjj755Weq1YRPVzBI+3zSfvScfpnuIecVFJQ==", + "version": "7.25.1", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.1.tgz", + "integrity": "sha512-LrHHoWq08ZpmmFqBAzN+hUdWwy5zt7FGa/hVwMcOqW6OVtwqaoD5utfuGYU87JYxdZgLUvktAsn37j/sYR9siA==", "dev": true, "license": "MIT", "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.8", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.8", - "@babel/types": "^7.24.8", + "@babel/generator": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -724,9 +667,9 @@ } }, "node_modules/@babel/types": { - "version": "7.24.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.9.tgz", - "integrity": "sha512-xm8XrMKz0IlUdocVbYJe0Z9xEgidU7msskG8BbhnTPK/HZ2z/7FP7ykqPgrUH+C+r414mNfNWam1f2vqOjqjYQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.0.tgz", + "integrity": "sha512-LcnxQSsd9aXOIgmmSpvZ/1yo46ra2ESYyqLcryaBZOghxy5qqOBjvCWP5JfkI8yl9rlxRgdLTTMCQQRcN2hdCg==", "dev": true, "license": "MIT", "dependencies": { @@ -1729,6 +1672,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-4.6.0.tgz", "integrity": "sha512-wDPYTFZvsLZln3wJRwd7g+ixpy3PGABVMjeJ7XHQIOQJjgEpS/ACBuyBNMfuC+MC/Pw9SF3CJBTCO0xS062t0g==", + "license": "MIT", "dependencies": { "@hapi/hoek": "^11.0.2", "@travi/cli-messages": "^1.0.5", @@ -2893,9 +2837,9 @@ } }, "node_modules/@npmcli/config/node_modules/npm-package-arg": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.2.tgz", - "integrity": "sha512-IGN0IAwmhDJwy13Wc8k+4PEbTPhpJnMtfR53ZbOyjkvmEcLS4nCwp6mvMWjS5sUjeiW3mpx6cHmuhKEu9XmcQw==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-11.0.3.tgz", + "integrity": "sha512-sHGJy8sOC1YraBywpzQlIKBE4pBbGbiF95U6Auspzyem956E0+FtDtsx1ZxlOJkQCZ1AFXAY/yuvtFYrOxF+Bw==", "dev": true, "license": "ISC", "dependencies": { @@ -4148,13 +4092,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.14.11", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz", - "integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.0.0.tgz", + "integrity": "sha512-VT7KSYudcPOzP5Q0wfbowyNLaVR8QWUdw+088uFWwfvpY6uCWaXpqV6ieLAu9WBcnTa7H4Z5RLK8I5t2FuOcqw==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.11.1" } }, "node_modules/@types/normalize-package-data": { @@ -6532,9 +6476,9 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "license": "MIT", "dependencies": { "ms": "2.1.2" @@ -6857,9 +6801,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.832", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.832.tgz", - "integrity": "sha512-cTen3SB0H2SGU7x467NRe1eVcQgcuS6jckKfWJHia2eo0cHIGOqHoAxevIYZD4eRHcWjkvFzo93bi3vJ9W+1lA==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.2.tgz", + "integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==", "dev": true, "license": "ISC" }, @@ -10005,9 +9949,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "license": "MIT", "peer": true, @@ -13772,9 +13716,9 @@ } }, "node_modules/minipass-json-stream": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz", - "integrity": "sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.2.tgz", + "integrity": "sha512-myxeeTm57lYs8pH2nxPzmEEg8DGIgW+9mv6D4JZD2pa81I/OBjeU7PtICXV6c9eRGTA5JMDsuIPUZRCyBMYNhg==", "dev": true, "license": "MIT", "dependencies": { @@ -14192,9 +14136,9 @@ "peer": true }, "node_modules/node-releases": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.17.tgz", - "integrity": "sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true, "license": "MIT" }, @@ -15194,9 +15138,9 @@ } }, "node_modules/postcss": { - "version": "8.4.39", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.39.tgz", - "integrity": "sha512-0vzE+lAiG7hZl1/9I8yzKLx3aR9Xbof3fBHKunvMfOCYAtMhrsnccJY2iTURb9EZd5+pLuiNV9/c/GZJOHsgIw==", + "version": "8.4.40", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.40.tgz", + "integrity": "sha512-YF2kKIUzAofPMpfH6hOi2cGnv/HrUlfucspc7pDyvv7kGdqXrfj8SCl/t8owkEgKEuu8ZcRjSOxFxVLqwChZ2Q==", "dev": true, "funding": [ { @@ -21122,9 +21066,9 @@ } }, "node_modules/type-fest": { - "version": "4.22.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.22.1.tgz", - "integrity": "sha512-9tHNEa0Ov81YOopiVkcCJVz5TM6AEQ+CHHjFIktqPnE3NV0AHIkx+gh9tiCl58m/66wWxkOC9eltpa75J4lQPA==", + "version": "4.23.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.23.0.tgz", + "integrity": "sha512-ZiBujro2ohr5+Z/hZWHESLz3g08BBdrdLMieYFULJO+tWc437sn8kQsWLJoZErY8alNhxre9K4p3GURAG11n+w==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -21219,9 +21163,9 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "5.5.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", - "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", "dev": true, "license": "Apache-2.0", "peer": true, @@ -21250,9 +21194,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.11.1", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.11.1.tgz", + "integrity": "sha512-mIDEX2ek50x0OlRgxryxsenE5XaQD4on5U2inY7RApK3SOJpofyw7uW2AyfMKkhAxXIceo2DeWGVGwyvng1GNQ==", "dev": true, "license": "MIT" }, @@ -21373,6 +21317,16 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/unified-engine/node_modules/@types/node": { + "version": "20.14.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.13.tgz", + "integrity": "sha512-+bHoGiZb8UiQ0+WEtmph2IWQCjIqg8MDZMAV+ppRRhUZnquF5mQkP/9vpSwJClEiSM/C7fZZExPzfU0vJTyp8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, "node_modules/unified-engine/node_modules/is-plain-obj": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz", @@ -21429,6 +21383,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unified-engine/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, "node_modules/unified-engine/node_modules/vfile": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.2.tgz", @@ -22262,9 +22223,9 @@ } }, "node_modules/vite": { - "version": "5.3.4", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.4.tgz", - "integrity": "sha512-Cw+7zL3ZG9/NZBB8C+8QbQZmR54GwqIz+WMI4b3JgdYJvX+ny9AjJXqkGQlDXSXRP9rP0B4tbciRMOVEKulVOA==", + "version": "5.3.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.5.tgz", + "integrity": "sha512-MdjglKR6AQXQb9JGiS7Rc2wC6uMjcm7Go/NHNO63EwiJXfuk9PgqiP/n5IDJCziMkfw9n4Ubp7lttNwz+8ZVKA==", "dev": true, "license": "MIT", "dependencies": { @@ -22826,9 +22787,9 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "2.4.5", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.5.tgz", - "integrity": "sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.5.0.tgz", + "integrity": "sha512-2wWLbGbYDiSqqIKoPjar3MPgB94ErzCtrNE1FdqGuaO0pi2JGjmE8aW8TDZwzU7vuxcGRdL/4gPQwQ7hD5AMSw==", "dev": true, "license": "ISC", "bin": { From ca5fd56ea844dd73d562942950a01871dc6dc536 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:25:10 +0000 Subject: [PATCH 25/41] chore(deps): update dependency husky to v9.1.4 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index a40e0e6f..a49eca55 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.3", + "husky": "9.1.4", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", @@ -9825,9 +9825,9 @@ } }, "node_modules/husky": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.3.tgz", - "integrity": "sha512-ET3TQmQgdIu0pt+jKkpo5oGyg/4MQZpG6xcam5J5JyNJV+CBT23OBpCF15bKHKycRyMH9k6ONy8g2HdGIsSkMQ==", + "version": "9.1.4", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.4.tgz", + "integrity": "sha512-bho94YyReb4JV7LYWRWxZ/xr6TtOTt8cMfmQ39MQYJ7f/YE268s3GdghGwi+y4zAeqewE5zYLvuhV0M0ijsDEA==", "dev": true, "license": "MIT", "bin": { diff --git a/package.json b/package.json index 2cd075a6..4eb0f856 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "cross-env": "7.0.3", "cz-conventional-changelog": "3.3.0", "gherkin-lint": "4.2.4", - "husky": "9.1.3", + "husky": "9.1.4", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", "ls-engines": "0.9.2", From 8353d1317c2340b5b67eb1092b6c1ec82f6ccf7e Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 29 Jul 2024 15:41:37 -0500 Subject: [PATCH 26/41] feat(vcs-host): expect vcs-host scaffolder to return details under the `vcs` results object --- src/scaffolder.js | 21 +++--- src/scaffolder.test.js | 70 +++++++++++++------ src/vcs/git/git.js | 12 ++-- src/vcs/git/git.test.js | 4 +- .../features/step_definitions/common-steps.js | 2 +- vitest.config.ts | 2 +- 6 files changed, 71 insertions(+), 40 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index e252db7a..68c92700 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -5,7 +5,7 @@ import {reportResults} from '@form8ion/results-reporter'; import {scaffold as scaffoldReadme} from '@form8ion/readme'; import {info} from '@travi/cli-messages'; -import {scaffold as scaffoldLanguage, prompt as promptForLanguageDetails} from './language/index.js'; +import {prompt as promptForLanguageDetails, scaffold as scaffoldLanguage} from './language/index.js'; import {initialize as scaffoldGit, scaffold as liftGit} from './vcs/git/git.js'; import {scaffold as scaffoldLicense} from './license/index.js'; import {scaffold as scaffoldVcsHost} from './vcs/host/index.js'; @@ -56,7 +56,7 @@ export async function scaffold(options) { ]) : []; - const gitResults = gitRepo && await liftGit({projectRoot, origin: vcsHostResults}); + const gitResults = gitRepo && await liftGit({projectRoot, vcs: vcsHostResults.vcs}); const {[questionNames.PROJECT_LANGUAGE]: projectLanguage} = await promptForLanguageDetails(languages, decisions); @@ -66,9 +66,15 @@ export async function scaffold(options) { {projectRoot, projectName, vcs, visibility, license: chosenLicense || 'UNLICENSED', description} ); - const contributors = [license, language, dependencyUpdaterResults, contributing, gitResults].filter(Boolean); + const mergedResults = deepmerge.all([ + license, + language, + dependencyUpdaterResults, + contributing, + gitResults + ].filter(Boolean)); - await lift({projectRoot, vcs, results: deepmerge.all(contributors), enhancers: {...dependencyUpdaters, ...vcsHosts}}); + await lift({projectRoot, vcs, results: mergedResults, enhancers: {...dependencyUpdaters, ...vcsHosts}}); if (language && language.verificationCommand) { info('Verifying the generated project'); @@ -78,10 +84,5 @@ export async function scaffold(options) { await subprocess; } - const contributedTasks = contributors - .map(contributor => contributor.nextSteps) - .filter(Boolean) - .reduce((acc, contributedNextSteps) => ([...acc, ...contributedNextSteps]), []); - - reportResults({nextSteps: contributedTasks}); + reportResults({nextSteps: mergedResults.nextSteps}); } diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 0fbb249e..a315d1c1 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -9,7 +9,7 @@ import any from '@travi/any'; import {when} from 'jest-when'; import {scaffold as liftGit, initialize as scaffoldGit} from './vcs/git/git.js'; -import * as vcsHostScaffolder from './vcs/host/scaffolder.js'; +import {scaffold as scaffoldVcsHost} from './vcs/host/index.js'; import * as licenseScaffolder from './license/scaffolder.js'; import scaffoldLanguage from './language/scaffolder.js'; import * as languagePrompt from './language/prompt.js'; @@ -27,7 +27,7 @@ vi.mock('@form8ion/execa-wrapper'); vi.mock('@form8ion/results-reporter'); vi.mock('./readme'); vi.mock('./vcs/git/git.js'); -vi.mock('./vcs/host/scaffolder'); +vi.mock('./vcs/host/index.js'); vi.mock('./license/scaffolder'); vi.mock('./language/scaffolder'); vi.mock('./language/prompt'); @@ -53,6 +53,7 @@ describe('project scaffolder', () => { const documentation = any.simpleObject(); const vcs = any.simpleObject(); const vcsOriginDetails = any.simpleObject(); + const vcsHostResults = {...any.simpleObject(), vcs: vcsOriginDetails}; const tags = any.listOf(any.word); const visibility = any.word(); const vcsIgnore = any.simpleObject(); @@ -117,7 +118,7 @@ describe('project scaffolder', () => { when(licenseScaffolder.default) .calledWith({projectRoot: projectPath, license, copyright}) .mockResolvedValue(licenseResults); - when(vcsHostScaffolder.default) + when(scaffoldVcsHost) .calledWith( vcsHosts, { @@ -127,7 +128,7 @@ describe('project scaffolder', () => { visibility } ) - .mockResolvedValue(vcsOriginDetails); + .mockResolvedValue(vcsHostResults); scaffoldLanguage.mockResolvedValue(languageResults); when(dependencyUpdaterScaffolder.default) .calledWith(dependencyUpdaters, decisions, {projectRoot: projectPath, vcs}) @@ -138,7 +139,7 @@ describe('project scaffolder', () => { expect(liftGit).toHaveBeenCalledWith({ projectRoot: projectPath, - origin: vcsOriginDetails + vcs: vcsOriginDetails }); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(dependencyUpdaterScaffolder.default).toHaveBeenCalledWith( @@ -173,7 +174,20 @@ describe('project scaffolder', () => { [coreQuestionNames.PROJECT_NAME]: projectName, [questionNames.GIT_REPO]: gitRepoShouldBeInitialized }); + + when(scaffoldGit).mockResolvedValue(vcs); languagePrompt.default.mockResolvedValue({}); + when(scaffoldVcsHost) + .calledWith( + {}, + { + ...vcs, + projectRoot: projectPath, + description: undefined, + visibility: undefined + } + ) + .mockResolvedValue(vcsHostResults); await scaffold(); @@ -184,9 +198,10 @@ describe('project scaffolder', () => { it('should consider each option except the plugins map optional', async () => { const emptyOptions = {}; when(optionsValidator.validate).calledWith(emptyOptions).mockReturnValue({plugins: {}}); - when(prompts.promptForBaseDetails).calledWith(projectPath, undefined, undefined).mockResolvedValue({}); + when(prompts.promptForBaseDetails).calledWith(projectPath, undefined).mockResolvedValue({}); languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); + scaffoldVcsHost.mockResolvedValue(vcsHostResults); await scaffold(emptyOptions); }); @@ -213,18 +228,36 @@ describe('project scaffolder', () => { contribution: any.simpleObject() }; const languageResults = {badges: languageBadges, vcsIgnore, documentation}; + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {vcsHosts}}); when(prompts.promptForBaseDetails) - .calledWith(projectPath, undefined, undefined) - .mockResolvedValue({[coreQuestionNames.VISIBILITY]: visibility}); + .calledWith(projectPath, undefined) + .mockResolvedValue({ + [coreQuestionNames.DESCRIPTION]: description, + [questionNames.GIT_REPO]: true, + [coreQuestionNames.PROJECT_NAME]: projectName, + [coreQuestionNames.VISIBILITY]: visibility + }); when(scaffoldContributing).calledWith({visibility}).mockReturnValue({badges: contributingBadges}); scaffoldLanguage.mockResolvedValue(languageResults); - vcsHostScaffolder.default.mockResolvedValue(vcsOriginDetails); + when(scaffoldVcsHost) + .calledWith( + vcsHosts, + { + ...vcs, + projectRoot: projectPath, + description, + visibility + } + ) + .mockResolvedValue(vcsHostResults); dependencyUpdaterScaffolder.default.mockResolvedValue({badges: dependencyUpdaterBadges}); licenseScaffolder.default.mockResolvedValue({badges: licenseBadges}); + languagePrompt.default.mockResolvedValue({}); + when(scaffoldGit).mockResolvedValue(vcs); await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, origin: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); }); @@ -238,7 +271,7 @@ describe('project scaffolder', () => { await scaffold(options); expect(liftGit).not.toHaveBeenCalled(); - expect(vcsHostScaffolder.default).not.toHaveBeenCalled(); + expect(scaffoldVcsHost).not.toHaveBeenCalled(); expect(dependencyUpdaterScaffolder.default).not.toHaveBeenCalled(); }); @@ -287,18 +320,15 @@ describe('project scaffolder', () => { vcs, description }).mockResolvedValue(languageResults); - when(vcsHostScaffolder.default).calledWith( + when(scaffoldVcsHost).calledWith( vcsHosts, { ...vcs, projectRoot: projectPath, description, - homepage, - visibility, - nextSteps: languageNextSteps, - tags + visibility } - ).mockResolvedValue(vcsOriginDetails); + ).mockResolvedValue(vcsHostResults); when(execa).calledWith(verificationCommand, {shell: true}).mockReturnValue({stdout: {pipe: execaPipe}}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); @@ -306,7 +336,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, origin: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execaPipe).toHaveBeenCalledWith(process.stdout); expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...languageNextSteps, ...gitNextSteps]}); @@ -327,7 +357,7 @@ describe('project scaffolder', () => { when(languagePrompt.default) .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - vcsHostScaffolder.default.mockResolvedValue(vcsOriginDetails); + scaffoldVcsHost.mockResolvedValue(vcsHostResults); scaffoldLanguage.mockResolvedValue({}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); @@ -335,7 +365,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, origin: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execa).not.toHaveBeenCalled(); }); diff --git a/src/vcs/git/git.js b/src/vcs/git/git.js index bede3829..192ca604 100644 --- a/src/vcs/git/git.js +++ b/src/vcs/git/git.js @@ -18,7 +18,7 @@ async function getExistingRemotes(git) { } } -async function defineRemoteOrigin(projectRoot, origin) { +async function defineRemoteOrigin(projectRoot, vcs) { const git = simpleGit({baseDir: projectRoot}); const existingRemotes = await getExistingRemotes(git); @@ -28,10 +28,10 @@ async function defineRemoteOrigin(projectRoot, origin) { return {nextSteps: []}; } - if (origin.sshUrl) { - info(`Setting remote origin to ${origin.sshUrl}`, {level: 'secondary'}); + if (vcs.sshUrl) { + info(`Setting remote origin to ${vcs.sshUrl}`, {level: 'secondary'}); - await git.addRemote('origin', origin.sshUrl); + await git.addRemote('origin', vcs.sshUrl); // info('Setting the local `master` branch to track `origin/master`'); // @@ -82,10 +82,10 @@ export async function initialize( return undefined; } -export async function scaffold({projectRoot, origin}) { +export async function scaffold({projectRoot, vcs}) { info('Finishing Git Configuration'); - const remoteOriginResults = await defineRemoteOrigin(projectRoot, origin); + const remoteOriginResults = await defineRemoteOrigin(projectRoot, vcs); return {nextSteps: [{summary: 'Commit scaffolded files'}, ...remoteOriginResults.nextSteps]}; } diff --git a/src/vcs/git/git.test.js b/src/vcs/git/git.test.js index d941ede6..4db4ac53 100644 --- a/src/vcs/git/git.test.js +++ b/src/vcs/git/git.test.js @@ -91,7 +91,7 @@ describe('git', () => { it('should scaffold the git repo', async () => { listRemote.mockRejectedValue(new Error('fatal: No remote configured to list refs from.\n')); - const result = await scaffold({projectRoot, origin: {}, results}); + const result = await scaffold({projectRoot, vcs: {}, results}); expect(result.nextSteps).toEqual([{summary: 'Commit scaffolded files'}]); }); @@ -109,7 +109,7 @@ describe('git', () => { // gitBranch.lookup.withArgs(repository, 'master', gitBranch.BRANCH.LOCAL).resolves(branch); listRemote.mockResolvedValue(any.listOf(any.word)); - const result = await scaffold({projectRoot, origin: {sshUrl}}); + const result = await scaffold({projectRoot, vcs: {sshUrl}}); expect(addRemote).toHaveBeenCalledWith('origin', sshUrl); expect(result.nextSteps).toEqual([ diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 56c49bd6..f4149d27 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -73,7 +73,7 @@ When(/^the project is scaffolded$/, async function () { ...vcsHost && { vcsHosts: { [vcsHost]: { - scaffold: ({name, owner}) => ({sshUrl: this.remoteOriginUrl, name, owner}), + scaffold: ({name, owner}) => ({vcs: {sshUrl: this.remoteOriginUrl, name, owner}}), prompt: () => undefined } } diff --git a/vitest.config.ts b/vitest.config.ts index 0f65ec76..0349add9 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -1,3 +1,3 @@ import {defineConfig} from 'vitest/config'; -export default defineConfig({test: {globals: true}}); +export default defineConfig({test: {globals: true, restoreMocks: true}}); From 1a1ae4186d590318bd1f0d63baf32cfd9446671d Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 29 Jul 2024 16:39:32 -0500 Subject: [PATCH 27/41] feat(vcs-host): pass `projectName` when scaffolding --- src/scaffolder.js | 1 + src/scaffolder.test.js | 4 ++++ test/integration/features/step_definitions/common-steps.js | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 68c92700..6ce6e3b0 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -44,6 +44,7 @@ export async function scaffold(options) { ? await Promise.all([ scaffoldVcsHost(vcsHosts, { ...vcs, + projectName, projectRoot, description, visibility diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index a315d1c1..d44918f5 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -124,6 +124,7 @@ describe('project scaffolder', () => { { ...vcs, projectRoot: projectPath, + projectName, description, visibility } @@ -183,6 +184,7 @@ describe('project scaffolder', () => { { ...vcs, projectRoot: projectPath, + projectName, description: undefined, visibility: undefined } @@ -245,6 +247,7 @@ describe('project scaffolder', () => { { ...vcs, projectRoot: projectPath, + projectName, description, visibility } @@ -325,6 +328,7 @@ describe('project scaffolder', () => { { ...vcs, projectRoot: projectPath, + projectName, description, visibility } diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index f4149d27..5b08fe44 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -73,7 +73,7 @@ When(/^the project is scaffolded$/, async function () { ...vcsHost && { vcsHosts: { [vcsHost]: { - scaffold: ({name, owner}) => ({vcs: {sshUrl: this.remoteOriginUrl, name, owner}}), + scaffold: ({projectName, owner}) => ({vcs: {sshUrl: this.remoteOriginUrl, name: projectName, owner}}), prompt: () => undefined } } From 9d52a5362b92581ac090494467bed8c57a8616db Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 29 Jul 2024 22:54:18 -0500 Subject: [PATCH 28/41] feat(vcs): expect vcs details as results from scaffolding the vcs host since the details are truly about the hosted repository rather than the local repository BREAKING CHANGE: vcs-host scaffolder is expected to return `host`, `name`, and `owner` details in a `vcs` object in results --- src/scaffolder.js | 37 ++++---- src/scaffolder.test.js | 86 ++++--------------- src/vcs/git/git.js | 15 ++-- src/vcs/git/git.test.js | 33 +++++-- src/vcs/host/scaffolder.js | 4 +- src/vcs/host/scaffolder.test.js | 15 +++- .../scaffold/dependency-updaters.feature | 1 + .../features/step_definitions/common-steps.js | 6 +- 8 files changed, 87 insertions(+), 110 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 6ce6e3b0..62468e0e 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -8,7 +8,6 @@ import {info} from '@travi/cli-messages'; import {prompt as promptForLanguageDetails, scaffold as scaffoldLanguage} from './language/index.js'; import {initialize as scaffoldGit, scaffold as liftGit} from './vcs/git/git.js'; import {scaffold as scaffoldLicense} from './license/index.js'; -import {scaffold as scaffoldVcsHost} from './vcs/host/index.js'; import scaffoldDependencyUpdater from './dependency-updater/scaffolder.js'; import {promptForBaseDetails} from './prompts/questions.js'; import {validate} from './options-validator.js'; @@ -32,39 +31,28 @@ export async function scaffold(options) { } = await promptForBaseDetails(projectRoot, decisions); const copyright = {year: copyrightYear, holder: copyHolder}; - const [vcs, contributing, license] = await Promise.all([ - scaffoldGit(gitRepo, projectRoot, projectName, vcsHosts, visibility, decisions), + const [vcsResults, contributing, license] = await Promise.all([ + scaffoldGit(gitRepo, projectRoot, projectName, description, vcsHosts, visibility, decisions), scaffoldContributing({visibility}), scaffoldLicense({projectRoot, license: chosenLicense, copyright}), scaffoldReadme({projectName, projectRoot, description}), scaffoldEditorConfig({projectRoot}) ]); - const [vcsHostResults, dependencyUpdaterResults] = vcs - ? await Promise.all([ - scaffoldVcsHost(vcsHosts, { - ...vcs, - projectName, - projectRoot, - description, - visibility - }), - scaffoldDependencyUpdater( - dependencyUpdaters, - decisions, - {projectRoot, vcs} - ) - ]) - : []; + const dependencyUpdaterResults = vcsResults.vcs && await scaffoldDependencyUpdater( + dependencyUpdaters, + decisions, + {projectRoot, vcs: vcsResults.vcs} + ); - const gitResults = gitRepo && await liftGit({projectRoot, vcs: vcsHostResults.vcs}); + const gitResults = gitRepo && await liftGit({projectRoot, vcs: vcsResults.vcs}); const {[questionNames.PROJECT_LANGUAGE]: projectLanguage} = await promptForLanguageDetails(languages, decisions); const language = await scaffoldLanguage( languages, projectLanguage, - {projectRoot, projectName, vcs, visibility, license: chosenLicense || 'UNLICENSED', description} + {projectRoot, projectName, vcs: vcsResults.vcs, visibility, license: chosenLicense || 'UNLICENSED', description} ); const mergedResults = deepmerge.all([ @@ -75,7 +63,12 @@ export async function scaffold(options) { gitResults ].filter(Boolean)); - await lift({projectRoot, vcs, results: mergedResults, enhancers: {...dependencyUpdaters, ...vcsHosts}}); + await lift({ + projectRoot, + vcs: vcsResults.vcs, + results: mergedResults, + enhancers: {...dependencyUpdaters, ...vcsHosts} + }); if (language && language.verificationCommand) { info('Verifying the generated project'); diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index d44918f5..39ddfe02 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -9,7 +9,6 @@ import any from '@travi/any'; import {when} from 'jest-when'; import {scaffold as liftGit, initialize as scaffoldGit} from './vcs/git/git.js'; -import {scaffold as scaffoldVcsHost} from './vcs/host/index.js'; import * as licenseScaffolder from './license/scaffolder.js'; import scaffoldLanguage from './language/scaffolder.js'; import * as languagePrompt from './language/prompt.js'; @@ -27,7 +26,6 @@ vi.mock('@form8ion/execa-wrapper'); vi.mock('@form8ion/results-reporter'); vi.mock('./readme'); vi.mock('./vcs/git/git.js'); -vi.mock('./vcs/host/index.js'); vi.mock('./license/scaffolder'); vi.mock('./language/scaffolder'); vi.mock('./language/prompt'); @@ -52,8 +50,7 @@ describe('project scaffolder', () => { const vcsHosts = any.simpleObject(); const documentation = any.simpleObject(); const vcs = any.simpleObject(); - const vcsOriginDetails = any.simpleObject(); - const vcsHostResults = {...any.simpleObject(), vcs: vcsOriginDetails}; + const vcsResults = {...any.simpleObject(), vcs}; const tags = any.listOf(any.word); const visibility = any.word(); const vcsIgnore = any.simpleObject(); @@ -112,24 +109,12 @@ describe('project scaffolder', () => { .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); when(scaffoldGit) - .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, vcsHosts, visibility, decisions) - .mockResolvedValue(vcs); + .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, description, vcsHosts, visibility, decisions) + .mockResolvedValue(vcsResults); liftGit.mockResolvedValue(gitResults); when(licenseScaffolder.default) .calledWith({projectRoot: projectPath, license, copyright}) .mockResolvedValue(licenseResults); - when(scaffoldVcsHost) - .calledWith( - vcsHosts, - { - ...vcs, - projectRoot: projectPath, - projectName, - description, - visibility - } - ) - .mockResolvedValue(vcsHostResults); scaffoldLanguage.mockResolvedValue(languageResults); when(dependencyUpdaterScaffolder.default) .calledWith(dependencyUpdaters, decisions, {projectRoot: projectPath, vcs}) @@ -138,10 +123,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({ - projectRoot: projectPath, - vcs: vcsOriginDetails - }); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(dependencyUpdaterScaffolder.default).toHaveBeenCalledWith( dependencyUpdaters, @@ -175,26 +157,13 @@ describe('project scaffolder', () => { [coreQuestionNames.PROJECT_NAME]: projectName, [questionNames.GIT_REPO]: gitRepoShouldBeInitialized }); - - when(scaffoldGit).mockResolvedValue(vcs); + when(scaffoldGit).mockResolvedValue(vcsResults); languagePrompt.default.mockResolvedValue({}); - when(scaffoldVcsHost) - .calledWith( - {}, - { - ...vcs, - projectRoot: projectPath, - projectName, - description: undefined, - visibility: undefined - } - ) - .mockResolvedValue(vcsHostResults); await scaffold(); expect(scaffoldGit) - .toHaveBeenCalledWith(gitRepoShouldBeInitialized, projectPath, projectName, {}, undefined, undefined); + .toHaveBeenCalledWith(gitRepoShouldBeInitialized, projectPath, projectName, undefined, {}, undefined, undefined); }); it('should consider each option except the plugins map optional', async () => { @@ -203,7 +172,6 @@ describe('project scaffolder', () => { when(prompts.promptForBaseDetails).calledWith(projectPath, undefined).mockResolvedValue({}); languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); - scaffoldVcsHost.mockResolvedValue(vcsHostResults); await scaffold(emptyOptions); }); @@ -241,26 +209,14 @@ describe('project scaffolder', () => { }); when(scaffoldContributing).calledWith({visibility}).mockReturnValue({badges: contributingBadges}); scaffoldLanguage.mockResolvedValue(languageResults); - when(scaffoldVcsHost) - .calledWith( - vcsHosts, - { - ...vcs, - projectRoot: projectPath, - projectName, - description, - visibility - } - ) - .mockResolvedValue(vcsHostResults); dependencyUpdaterScaffolder.default.mockResolvedValue({badges: dependencyUpdaterBadges}); licenseScaffolder.default.mockResolvedValue({badges: licenseBadges}); languagePrompt.default.mockResolvedValue({}); - when(scaffoldGit).mockResolvedValue(vcs); + when(scaffoldGit).mockResolvedValue(vcsResults); await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); }); @@ -269,12 +225,11 @@ describe('project scaffolder', () => { prompts.promptForBaseDetails.mockResolvedValue({[questionNames.GIT_REPO]: false}); languagePrompt.default.mockResolvedValue({}); scaffoldReadme.mockResolvedValue(); - scaffoldGit.mockResolvedValue(undefined); + scaffoldGit.mockResolvedValue({}); await scaffold(options); expect(liftGit).not.toHaveBeenCalled(); - expect(scaffoldVcsHost).not.toHaveBeenCalled(); expect(dependencyUpdaterScaffolder.default).not.toHaveBeenCalled(); }); @@ -303,7 +258,7 @@ describe('project scaffolder', () => { when(optionsValidator.validate) .calledWith(options) .mockReturnValue({decisions, plugins: {languages, vcsHosts}}); - scaffoldGit.mockResolvedValue(vcs); + scaffoldGit.mockResolvedValue(vcsResults); liftGit.mockResolvedValue(gitResults); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, @@ -323,16 +278,6 @@ describe('project scaffolder', () => { vcs, description }).mockResolvedValue(languageResults); - when(scaffoldVcsHost).calledWith( - vcsHosts, - { - ...vcs, - projectRoot: projectPath, - projectName, - description, - visibility - } - ).mockResolvedValue(vcsHostResults); when(execa).calledWith(verificationCommand, {shell: true}).mockReturnValue({stdout: {pipe: execaPipe}}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); @@ -340,7 +285,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execaPipe).toHaveBeenCalledWith(process.stdout); expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...languageNextSteps, ...gitNextSteps]}); @@ -350,7 +295,7 @@ describe('project scaffolder', () => { when(optionsValidator.validate) .calledWith(options) .mockReturnValue({vcsHosts, decisions, plugins: {languages}}); - scaffoldGit.mockResolvedValue(vcs); + scaffoldGit.mockResolvedValue(vcsResults); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, [coreQuestionNames.VISIBILITY]: visibility, @@ -361,7 +306,6 @@ describe('project scaffolder', () => { when(languagePrompt.default) .calledWith(languages, decisions) .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - scaffoldVcsHost.mockResolvedValue(vcsHostResults); scaffoldLanguage.mockResolvedValue({}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); @@ -369,7 +313,7 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs: vcsOriginDetails}); + expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execa).not.toHaveBeenCalled(); }); @@ -378,7 +322,7 @@ describe('project scaffolder', () => { when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {languages}}); prompts.promptForBaseDetails.mockResolvedValue({}); languagePrompt.default.mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - scaffoldGit.mockResolvedValue({}); + scaffoldGit.mockResolvedValue(vcsResults); await scaffold(options); @@ -390,7 +334,7 @@ describe('project scaffolder', () => { description: undefined, projectName: undefined, projectRoot: projectPath, - vcs: {}, + vcs, visibility: undefined } ); diff --git a/src/vcs/git/git.js b/src/vcs/git/git.js index 192ca604..e8024457 100644 --- a/src/vcs/git/git.js +++ b/src/vcs/git/git.js @@ -5,6 +5,7 @@ import {scaffold as scaffoldGit} from '@form8ion/git'; import promptForVcsHostDetails from '../host/prompt.js'; import {questionNames} from '../../prompts/question-names.js'; +import {scaffold as scaffoldVcsHost} from '../host/index.js'; async function getExistingRemotes(git) { try { @@ -52,6 +53,7 @@ export async function initialize( gitRepoShouldBeInitialized, projectRoot, projectName, + description, vcsHosts, visibility, decisions @@ -72,14 +74,17 @@ export async function initialize( scaffoldGit({projectRoot}) ]); - return { - host: answers[questionNames.REPO_HOST].toLowerCase(), + return scaffoldVcsHost(vcsHosts, { + chosenHost: answers[questionNames.REPO_HOST].toLowerCase(), owner: answers[questionNames.REPO_OWNER], - name: projectName - }; + projectName, + projectRoot, + description, + visibility + }); } - return undefined; + return {}; } export async function scaffold({projectRoot, vcs}) { diff --git a/src/vcs/git/git.test.js b/src/vcs/git/git.test.js index 4db4ac53..4ee82b4f 100644 --- a/src/vcs/git/git.test.js +++ b/src/vcs/git/git.test.js @@ -7,6 +7,7 @@ import any from '@travi/any'; import {when} from 'jest-when'; import promptForVcsHostDetails from '../host/prompt.js'; +import {scaffold as scaffoldVcsHost} from '../host/index.js'; import {questionNames} from '../../prompts/question-names.js'; import {initialize, scaffold} from './git.js'; @@ -15,6 +16,7 @@ vi.mock('hosted-git-info'); vi.mock('simple-git'); vi.mock('@form8ion/git'); vi.mock('../host/prompt'); +vi.mock('../host/index.js'); vi.mock('./ignore/index.js'); describe('git', () => { @@ -43,18 +45,39 @@ describe('git', () => { const repoOwner = any.word(); const githubAccount = any.word(); const projectName = any.word(); + const description = any.sentence(); it('should initialize the git repo', async () => { const vcsHosts = any.simpleObject(); when(checkIsRepo).calledWith('root').mockResolvedValue(false); + const vcsHostResults = any.simpleObject(); when(promptForVcsHostDetails) .calledWith(vcsHosts, visibility, decisions) .mockResolvedValue({[questionNames.REPO_HOST]: repoHost, [questionNames.REPO_OWNER]: repoOwner}); - - const hostDetails = await initialize(true, projectRoot, projectName, vcsHosts, visibility, decisions); - + when(scaffoldVcsHost) + .calledWith( + vcsHosts, + { + chosenHost: repoHost.toLowerCase(), + owner: repoOwner, + projectName, + projectRoot, + description, + visibility + } + ) + .mockResolvedValue(vcsHostResults); + + expect(await initialize( + true, + projectRoot, + projectName, + description, + vcsHosts, + visibility, + decisions + )).toEqual(vcsHostResults); expect(scaffoldGit).toHaveBeenCalledWith({projectRoot}); - expect(hostDetails).toEqual({host: repoHost.toLowerCase(), owner: repoOwner, name: projectName}); }); it('should not initialize the git repo if the project will not be versioned', async () => { @@ -66,7 +89,7 @@ describe('git', () => { const hostDetails = await initialize(false, projectRoot, projectName, githubAccount, visibility, decisions); expect(scaffoldGit).not.toHaveBeenCalled(); - expect(hostDetails).toBe(undefined); + expect(hostDetails).toEqual({}); }); it('should return the git details from an existing account', async () => { diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index ba114ee2..eec6018d 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -2,10 +2,10 @@ export default function (hosts, options) { const lowercasedHosts = Object.fromEntries( Object.entries(hosts).map(([name, details]) => [name.toLowerCase(), details]) ); - const {host: chosenHost, ...rest} = options; + const {chosenHost, ...rest} = options; const host = lowercasedHosts[chosenHost]; if (host) return host.scaffold(rest); - return {}; + return {vcs: {}}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index c4a1ee23..cc7d7042 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -5,14 +5,23 @@ import {when} from 'jest-when'; import scaffoldVcsHost from './scaffolder.js'; describe('vcs host scaffolder', () => { + const otherOptions = any.simpleObject(); + it('should scaffold the chosen vcs host', async () => { const chosenHost = `${any.word()}CAPITAL${any.word()}`; - const otherOptions = any.simpleObject(); const results = any.simpleObject(); const chosenHostScaffolder = vi.fn(); - const hostScaffolders = {...any.simpleObject(), [chosenHost]: {scaffold: chosenHostScaffolder}}; + const hostPlugins = {...any.simpleObject(), [chosenHost]: {scaffold: chosenHostScaffolder}}; when(chosenHostScaffolder).calledWith(otherOptions).mockResolvedValue(results); - expect(await scaffoldVcsHost(hostScaffolders, {...otherOptions, host: chosenHost.toLowerCase()})).toEqual(results); + expect(await scaffoldVcsHost(hostPlugins, {...otherOptions, chosenHost: chosenHost.toLowerCase()})) + .toEqual(results); + }); + + it('should return empty `vcs` results when no matching host is available', async () => { + const hostPlugins = any.simpleObject(); + + expect(await scaffoldVcsHost(hostPlugins, {...otherOptions, chosenHost: any.word()})) + .toEqual({vcs: {}}); }); }); diff --git a/test/integration/features/scaffold/dependency-updaters.feature b/test/integration/features/scaffold/dependency-updaters.feature index 24170c1c..6ec63ef5 100644 --- a/test/integration/features/scaffold/dependency-updaters.feature +++ b/test/integration/features/scaffold/dependency-updaters.feature @@ -2,6 +2,7 @@ Feature: Dependency Updaters Scenario: Registered updater Given the project should be versioned in git + And the git repository will be hosted And a dependency updater can be chosen When the project is scaffolded Then the dependency updater was executed diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 5b08fe44..7b693e87 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -70,10 +70,12 @@ When(/^the project is scaffolded$/, async function () { } } }, - ...vcsHost && { + ...vcsHost && 'Other' !== vcsHost && { vcsHosts: { [vcsHost]: { - scaffold: ({projectName, owner}) => ({vcs: {sshUrl: this.remoteOriginUrl, name: projectName, owner}}), + scaffold: ({projectName, owner}) => ({ + vcs: {sshUrl: this.remoteOriginUrl, name: projectName, owner, host: vcsHost} + }), prompt: () => undefined } } From 873c51a5fa7b528c5c453543576303de91244433 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 29 Jul 2024 23:44:15 -0500 Subject: [PATCH 29/41] feat(vcs): prevent passing the host sshUrl for the repository beyond the git initialization stage --- src/scaffolder.js | 6 +- src/scaffolder.test.js | 18 +--- src/vcs/git/git.js | 29 +++---- src/vcs/git/git.test.js | 184 +++++++++++++++++++--------------------- 4 files changed, 105 insertions(+), 132 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 62468e0e..25107bd5 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -6,7 +6,7 @@ import {scaffold as scaffoldReadme} from '@form8ion/readme'; import {info} from '@travi/cli-messages'; import {prompt as promptForLanguageDetails, scaffold as scaffoldLanguage} from './language/index.js'; -import {initialize as scaffoldGit, scaffold as liftGit} from './vcs/git/git.js'; +import {scaffold as scaffoldGit} from './vcs/git/git.js'; import {scaffold as scaffoldLicense} from './license/index.js'; import scaffoldDependencyUpdater from './dependency-updater/scaffolder.js'; import {promptForBaseDetails} from './prompts/questions.js'; @@ -45,8 +45,6 @@ export async function scaffold(options) { {projectRoot, vcs: vcsResults.vcs} ); - const gitResults = gitRepo && await liftGit({projectRoot, vcs: vcsResults.vcs}); - const {[questionNames.PROJECT_LANGUAGE]: projectLanguage} = await promptForLanguageDetails(languages, decisions); const language = await scaffoldLanguage( @@ -60,7 +58,7 @@ export async function scaffold(options) { language, dependencyUpdaterResults, contributing, - gitResults + vcsResults ].filter(Boolean)); await lift({ diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 39ddfe02..9ba3f515 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -8,7 +8,7 @@ import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import {scaffold as liftGit, initialize as scaffoldGit} from './vcs/git/git.js'; +import {scaffold as scaffoldGit} from './vcs/git/git.js'; import * as licenseScaffolder from './license/scaffolder.js'; import scaffoldLanguage from './language/scaffolder.js'; import * as languagePrompt from './language/prompt.js'; @@ -50,7 +50,8 @@ describe('project scaffolder', () => { const vcsHosts = any.simpleObject(); const documentation = any.simpleObject(); const vcs = any.simpleObject(); - const vcsResults = {...any.simpleObject(), vcs}; + const gitNextSteps = any.listOf(any.simpleObject); + const vcsResults = {...any.simpleObject(), vcs, nextSteps: gitNextSteps}; const tags = any.listOf(any.word); const visibility = any.word(); const vcsIgnore = any.simpleObject(); @@ -74,7 +75,6 @@ describe('project scaffolder', () => { const copyright = {year, holder}; const gitRepoShouldBeInitialized = true; const dependencyUpdaters = any.simpleObject(); - const gitNextSteps = any.listOf(any.simpleObject); const dependencyUpdaterNextSteps = any.listOf(any.simpleObject); const dependencyUpdaterContributionBadges = any.simpleObject(); const dependencyUpdaterResults = { @@ -89,7 +89,6 @@ describe('project scaffolder', () => { tags }; const licenseResults = {badges: {consumer: {license: licenseBadge}}}; - const gitResults = {nextSteps: gitNextSteps}; const contributingResults = any.simpleObject(); when(optionsValidator.validate) .calledWith(options) @@ -111,7 +110,6 @@ describe('project scaffolder', () => { when(scaffoldGit) .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, description, vcsHosts, visibility, decisions) .mockResolvedValue(vcsResults); - liftGit.mockResolvedValue(gitResults); when(licenseScaffolder.default) .calledWith({projectRoot: projectPath, license, copyright}) .mockResolvedValue(licenseResults); @@ -123,7 +121,6 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(dependencyUpdaterScaffolder.default).toHaveBeenCalledWith( dependencyUpdaters, @@ -139,7 +136,7 @@ describe('project scaffolder', () => { languageResults, dependencyUpdaterResults, contributingResults, - gitResults + vcsResults ]), enhancers: {...dependencyUpdaters, ...vcsHosts} }); @@ -216,7 +213,6 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); }); @@ -229,12 +225,10 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).not.toHaveBeenCalled(); expect(dependencyUpdaterScaffolder.default).not.toHaveBeenCalled(); }); it('should scaffold the details of the chosen language plugin', async () => { - const gitNextSteps = any.listOf(any.simpleObject); const languageConsumerBadges = any.simpleObject(); const languageContributionBadges = any.simpleObject(); const languageStatusBadges = any.simpleObject(); @@ -254,12 +248,10 @@ describe('project scaffolder', () => { nextSteps: languageNextSteps, tags }; - const gitResults = {nextSteps: gitNextSteps}; when(optionsValidator.validate) .calledWith(options) .mockReturnValue({decisions, plugins: {languages, vcsHosts}}); scaffoldGit.mockResolvedValue(vcsResults); - liftGit.mockResolvedValue(gitResults); prompts.promptForBaseDetails.mockResolvedValue({ [coreQuestionNames.PROJECT_NAME]: projectName, [coreQuestionNames.VISIBILITY]: visibility, @@ -285,7 +277,6 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execaPipe).toHaveBeenCalledWith(process.stdout); expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...languageNextSteps, ...gitNextSteps]}); @@ -313,7 +304,6 @@ describe('project scaffolder', () => { await scaffold(options); - expect(liftGit).toHaveBeenCalledWith({projectRoot: projectPath, vcs}); expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execa).not.toHaveBeenCalled(); }); diff --git a/src/vcs/git/git.js b/src/vcs/git/git.js index e8024457..04d7c7ae 100644 --- a/src/vcs/git/git.js +++ b/src/vcs/git/git.js @@ -19,7 +19,7 @@ async function getExistingRemotes(git) { } } -async function defineRemoteOrigin(projectRoot, vcs) { +async function defineRemoteOrigin(projectRoot, sshUrl) { const git = simpleGit({baseDir: projectRoot}); const existingRemotes = await getExistingRemotes(git); @@ -29,10 +29,10 @@ async function defineRemoteOrigin(projectRoot, vcs) { return {nextSteps: []}; } - if (vcs.sshUrl) { - info(`Setting remote origin to ${vcs.sshUrl}`, {level: 'secondary'}); + if (sshUrl) { + info(`Setting remote origin to ${sshUrl}`, {level: 'secondary'}); - await git.addRemote('origin', vcs.sshUrl); + await git.addRemote('origin', sshUrl); // info('Setting the local `master` branch to track `origin/master`'); // @@ -49,7 +49,7 @@ async function defineRemoteOrigin(projectRoot, vcs) { return {nextSteps: []}; } -export async function initialize( +export async function scaffold( gitRepoShouldBeInitialized, projectRoot, projectName, @@ -66,7 +66,7 @@ export async function initialize( const remoteOrigin = await git.remote(['get-url', 'origin']); const {user, project, type} = hostedGitInfo.fromUrl(remoteOrigin); - return {owner: user, name: project, host: type}; + return {vcs: {owner: user, name: project, host: type}}; } const [answers] = await Promise.all([ @@ -74,7 +74,7 @@ export async function initialize( scaffoldGit({projectRoot}) ]); - return scaffoldVcsHost(vcsHosts, { + const {vcs: {host, owner, name, sshUrl}} = await scaffoldVcsHost(vcsHosts, { chosenHost: answers[questionNames.REPO_HOST].toLowerCase(), owner: answers[questionNames.REPO_OWNER], projectName, @@ -82,15 +82,14 @@ export async function initialize( description, visibility }); - } - - return {}; -} -export async function scaffold({projectRoot, vcs}) { - info('Finishing Git Configuration'); + const remoteOriginResults = await defineRemoteOrigin(projectRoot, sshUrl); - const remoteOriginResults = await defineRemoteOrigin(projectRoot, vcs); + return { + vcs: {host, owner, name}, + nextSteps: [{summary: 'Commit scaffolded files'}, ...remoteOriginResults.nextSteps] + }; + } - return {nextSteps: [{summary: 'Commit scaffolded files'}, ...remoteOriginResults.nextSteps]}; + return {}; } diff --git a/src/vcs/git/git.test.js b/src/vcs/git/git.test.js index 4ee82b4f..2f014a87 100644 --- a/src/vcs/git/git.test.js +++ b/src/vcs/git/git.test.js @@ -9,7 +9,7 @@ import {when} from 'jest-when'; import promptForVcsHostDetails from '../host/prompt.js'; import {scaffold as scaffoldVcsHost} from '../host/index.js'; import {questionNames} from '../../prompts/question-names.js'; -import {initialize, scaffold} from './git.js'; +import {scaffold} from './git.js'; vi.mock('node:fs'); vi.mock('hosted-git-info'); @@ -24,6 +24,15 @@ describe('git', () => { const projectRoot = any.string(); const visibility = any.word(); const decisions = any.simpleObject(); + const vcsHost = `F${any.word()})O${any.word()}O`; + const vcsHostAccount = any.word(); + const repositoryName = any.word(); + const githubAccount = any.word(); + const projectName = any.word(); + const description = any.sentence(); + const sshUrl = any.url(); + const vcsDetails = {name: repositoryName, owner: vcsHostAccount, host: vcsHost, sshUrl}; + const vcsHostResults = {...any.simpleObject(), vcs: vcsDetails}; beforeEach(() => { checkIsRepo = vi.fn(); @@ -40,117 +49,94 @@ describe('git', () => { vi.clearAllMocks(); }); - describe('initialization', () => { - const repoHost = `F${any.word()})O${any.word()}O`; - const repoOwner = any.word(); - const githubAccount = any.word(); - const projectName = any.word(); - const description = any.sentence(); - - it('should initialize the git repo', async () => { - const vcsHosts = any.simpleObject(); - when(checkIsRepo).calledWith('root').mockResolvedValue(false); - const vcsHostResults = any.simpleObject(); - when(promptForVcsHostDetails) - .calledWith(vcsHosts, visibility, decisions) - .mockResolvedValue({[questionNames.REPO_HOST]: repoHost, [questionNames.REPO_OWNER]: repoOwner}); - when(scaffoldVcsHost) - .calledWith( - vcsHosts, - { - chosenHost: repoHost.toLowerCase(), - owner: repoOwner, - projectName, - projectRoot, - description, - visibility - } - ) - .mockResolvedValue(vcsHostResults); - - expect(await initialize( - true, - projectRoot, - projectName, - description, + it('should initialize the git repo', async () => { + const vcsHosts = any.simpleObject(); + when(checkIsRepo).calledWith('root').mockResolvedValue(false); + when(promptForVcsHostDetails) + .calledWith(vcsHosts, visibility, decisions) + .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); + when(scaffoldVcsHost) + .calledWith( vcsHosts, - visibility, - decisions - )).toEqual(vcsHostResults); - expect(scaffoldGit).toHaveBeenCalledWith({projectRoot}); - }); - - it('should not initialize the git repo if the project will not be versioned', async () => { - when(checkIsRepo).calledWith('root').mockResolvedValue(false); - when(promptForVcsHostDetails) - .calledWith(githubAccount, visibility, decisions) - .mockResolvedValue({[questionNames.REPO_HOST]: repoHost, [questionNames.REPO_OWNER]: repoOwner}); - - const hostDetails = await initialize(false, projectRoot, projectName, githubAccount, visibility, decisions); - - expect(scaffoldGit).not.toHaveBeenCalled(); - expect(hostDetails).toEqual({}); - }); - - it('should return the git details from an existing account', async () => { - const repoName = any.word(); - const remoteOrigin = any.url(); - when(checkIsRepo).calledWith('root').mockResolvedValue(true); - when(remote).calledWith(['get-url', 'origin']).mockResolvedValue(remoteOrigin); - when(hostedGitInfo.fromUrl) - .calledWith(remoteOrigin) - .mockReturnValue({user: repoOwner, project: repoName, type: repoHost.toLowerCase()}); - - const hostDetails = await initialize(true, projectRoot, projectName, githubAccount, visibility); - - expect(scaffoldGit).not.toHaveBeenCalled(); - expect(hostDetails).toEqual({host: repoHost.toLowerCase(), owner: repoOwner, name: repoName}); + { + chosenHost: vcsHost.toLowerCase(), + owner: vcsHostAccount, + projectName, + projectRoot, + description, + visibility + } + ) + .mockResolvedValue(vcsHostResults); + listRemote.mockResolvedValue(any.listOf(any.word)); + + expect(await scaffold( + true, + projectRoot, + projectName, + description, + vcsHosts, + visibility, + decisions + )).toEqual({ + vcs: {owner: vcsHostAccount, name: repositoryName, host: vcsHost}, + nextSteps: [ + {summary: 'Commit scaffolded files'}, + {summary: 'Set local `master` branch to track upstream `origin/master`'} + ] }); + expect(scaffoldGit).toHaveBeenCalledWith({projectRoot}); + expect(addRemote).toHaveBeenCalledWith('origin', sshUrl); }); - describe('scaffold', () => { - const results = any.simpleObject(); + it('should not initialize the git repo if the project will not be versioned', async () => { + when(checkIsRepo).calledWith('root').mockResolvedValue(false); + when(promptForVcsHostDetails) + .calledWith(githubAccount, visibility, decisions) + .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); - it('should scaffold the git repo', async () => { - listRemote.mockRejectedValue(new Error('fatal: No remote configured to list refs from.\n')); + const hostDetails = await scaffold(false, projectRoot, projectName, githubAccount, visibility, decisions); - const result = await scaffold({projectRoot, vcs: {}, results}); + expect(scaffoldGit).not.toHaveBeenCalled(); + expect(hostDetails).toEqual({}); + }); - expect(result.nextSteps).toEqual([{summary: 'Commit scaffolded files'}]); - }); + it('should return the git details from an existing remote', async () => { + const repoName = any.word(); + const remoteOrigin = any.url(); + when(checkIsRepo).calledWith('root').mockResolvedValue(true); + when(remote).calledWith(['get-url', 'origin']).mockResolvedValue(remoteOrigin); + when(hostedGitInfo.fromUrl) + .calledWith(remoteOrigin) + .mockReturnValue({user: vcsHostAccount, project: repoName, type: vcsHost.toLowerCase()}); - it('throws git errors that are not a lack of defined remotes', async () => { - const error = new Error(any.sentence()); - listRemote.mockRejectedValue(error); + const hostDetails = await scaffold(true, projectRoot, projectName, githubAccount, visibility); - await expect(scaffold({projectRoot, origin: {}})).rejects.toThrow(error); - }); - - it('should define the remote origin when an ssl-url is provided for the remote', async () => { - const sshUrl = any.url(); - // const branch = any.simpleObject(); - // gitBranch.lookup.withArgs(repository, 'master', gitBranch.BRANCH.LOCAL).resolves(branch); - listRemote.mockResolvedValue(any.listOf(any.word)); + expect(scaffoldGit).not.toHaveBeenCalled(); + expect(hostDetails).toEqual({vcs: {host: vcsHost.toLowerCase(), owner: vcsHostAccount, name: repoName}}); + }); - const result = await scaffold({projectRoot, vcs: {sshUrl}}); + it('should throw git errors that are not a lack of defined remotes', async () => { + const error = new Error(any.sentence()); + when(checkIsRepo).calledWith('root').mockResolvedValue(false); + when(promptForVcsHostDetails) + .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); + when(scaffoldVcsHost).mockResolvedValue(vcsHostResults); + listRemote.mockRejectedValue(error); - expect(addRemote).toHaveBeenCalledWith('origin', sshUrl); - expect(result.nextSteps).toEqual([ - {summary: 'Commit scaffolded files'}, - {summary: 'Set local `master` branch to track upstream `origin/master`'} - ]); - // assert.calledWith(gitBranch.setUpstream, branch, 'origin/master'); - }); + await expect(scaffold(true, projectRoot)).rejects.toThrow(error); + }); - it('should not define the remote origin if it already exists', async () => { - const sshUrl = any.url(); - listRemote.mockResolvedValue(['origin']); + it('should not define the remote origin if it already exists', async () => { + when(checkIsRepo).calledWith('root').mockResolvedValue(false); + when(promptForVcsHostDetails) + .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); + when(scaffoldVcsHost).mockResolvedValue(vcsHostResults); + listRemote.mockResolvedValue(['origin']); - await scaffold({projectRoot, origin: {sshUrl}}); + const result = await scaffold(true, projectRoot); - expect(addRemote).not.toHaveBeenCalled(); - // assert.notCalled(gitBranch.lookup); - // assert.notCalled(gitBranch.setUpstream); - }); + expect(addRemote).not.toHaveBeenCalled(); + expect(result.nextSteps).toEqual([{summary: 'Commit scaffolded files'}]); }); }); From 56c4bddb7de35d6fa7dc1f80497c3c9f00f04780 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 00:10:21 -0500 Subject: [PATCH 30/41] refactor(vcs-host): encapsulated the prompt into the scaffolding manager --- src/vcs/git/git.js | 15 ++------------- src/vcs/git/git.test.js | 25 +------------------------ src/vcs/host/scaffolder.js | 15 +++++++++++---- src/vcs/host/scaffolder.test.js | 24 ++++++++++++++++++------ 4 files changed, 32 insertions(+), 47 deletions(-) diff --git a/src/vcs/git/git.js b/src/vcs/git/git.js index 04d7c7ae..eff480c9 100644 --- a/src/vcs/git/git.js +++ b/src/vcs/git/git.js @@ -3,8 +3,6 @@ import hostedGitInfo from 'hosted-git-info'; import {info, warn} from '@travi/cli-messages'; import {scaffold as scaffoldGit} from '@form8ion/git'; -import promptForVcsHostDetails from '../host/prompt.js'; -import {questionNames} from '../../prompts/question-names.js'; import {scaffold as scaffoldVcsHost} from '../host/index.js'; async function getExistingRemotes(git) { @@ -69,20 +67,11 @@ export async function scaffold( return {vcs: {owner: user, name: project, host: type}}; } - const [answers] = await Promise.all([ - promptForVcsHostDetails(vcsHosts, visibility, decisions), + const [{vcs: {host, owner, name, sshUrl}}] = await Promise.all([ + scaffoldVcsHost(vcsHosts, visibility, decisions, {projectName, projectRoot, description, visibility}), scaffoldGit({projectRoot}) ]); - const {vcs: {host, owner, name, sshUrl}} = await scaffoldVcsHost(vcsHosts, { - chosenHost: answers[questionNames.REPO_HOST].toLowerCase(), - owner: answers[questionNames.REPO_OWNER], - projectName, - projectRoot, - description, - visibility - }); - const remoteOriginResults = await defineRemoteOrigin(projectRoot, sshUrl); return { diff --git a/src/vcs/git/git.test.js b/src/vcs/git/git.test.js index 2f014a87..9b262614 100644 --- a/src/vcs/git/git.test.js +++ b/src/vcs/git/git.test.js @@ -6,16 +6,13 @@ import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import promptForVcsHostDetails from '../host/prompt.js'; import {scaffold as scaffoldVcsHost} from '../host/index.js'; -import {questionNames} from '../../prompts/question-names.js'; import {scaffold} from './git.js'; vi.mock('node:fs'); vi.mock('hosted-git-info'); vi.mock('simple-git'); vi.mock('@form8ion/git'); -vi.mock('../host/prompt'); vi.mock('../host/index.js'); vi.mock('./ignore/index.js'); @@ -52,21 +49,8 @@ describe('git', () => { it('should initialize the git repo', async () => { const vcsHosts = any.simpleObject(); when(checkIsRepo).calledWith('root').mockResolvedValue(false); - when(promptForVcsHostDetails) - .calledWith(vcsHosts, visibility, decisions) - .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); when(scaffoldVcsHost) - .calledWith( - vcsHosts, - { - chosenHost: vcsHost.toLowerCase(), - owner: vcsHostAccount, - projectName, - projectRoot, - description, - visibility - } - ) + .calledWith(vcsHosts, visibility, decisions, {projectName, projectRoot, description, visibility}) .mockResolvedValue(vcsHostResults); listRemote.mockResolvedValue(any.listOf(any.word)); @@ -91,9 +75,6 @@ describe('git', () => { it('should not initialize the git repo if the project will not be versioned', async () => { when(checkIsRepo).calledWith('root').mockResolvedValue(false); - when(promptForVcsHostDetails) - .calledWith(githubAccount, visibility, decisions) - .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); const hostDetails = await scaffold(false, projectRoot, projectName, githubAccount, visibility, decisions); @@ -119,8 +100,6 @@ describe('git', () => { it('should throw git errors that are not a lack of defined remotes', async () => { const error = new Error(any.sentence()); when(checkIsRepo).calledWith('root').mockResolvedValue(false); - when(promptForVcsHostDetails) - .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); when(scaffoldVcsHost).mockResolvedValue(vcsHostResults); listRemote.mockRejectedValue(error); @@ -129,8 +108,6 @@ describe('git', () => { it('should not define the remote origin if it already exists', async () => { when(checkIsRepo).calledWith('root').mockResolvedValue(false); - when(promptForVcsHostDetails) - .mockResolvedValue({[questionNames.REPO_HOST]: vcsHost, [questionNames.REPO_OWNER]: vcsHostAccount}); when(scaffoldVcsHost).mockResolvedValue(vcsHostResults); listRemote.mockResolvedValue(['origin']); diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index eec6018d..6ff29be8 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -1,11 +1,18 @@ -export default function (hosts, options) { +import promptForVcsHostDetails from './prompt.js'; +import {questionNames} from '../../prompts/question-names.js'; + +export default async function (hosts, visibility, decisions, options) { + const { + [questionNames.REPO_HOST]: chosenHost, + [questionNames.REPO_OWNER]: owner + } = await promptForVcsHostDetails(hosts, visibility, decisions); + const lowercasedHosts = Object.fromEntries( Object.entries(hosts).map(([name, details]) => [name.toLowerCase(), details]) ); - const {chosenHost, ...rest} = options; - const host = lowercasedHosts[chosenHost]; + const host = lowercasedHosts[chosenHost.toLowerCase()]; - if (host) return host.scaffold(rest); + if (host) return host.scaffold({...options, owner}); return {vcs: {}}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index cc7d7042..78bf376a 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -3,25 +3,37 @@ import any from '@travi/any'; import {when} from 'jest-when'; import scaffoldVcsHost from './scaffolder.js'; +import promptForVcsHostDetails from './prompt.js'; +import {questionNames} from '../../prompts/question-names.js'; + +vi.mock('./prompt'); describe('vcs host scaffolder', () => { - const otherOptions = any.simpleObject(); + const options = any.simpleObject(); + const visibility = any.word(); + const decisions = any.simpleObject(); it('should scaffold the chosen vcs host', async () => { const chosenHost = `${any.word()}CAPITAL${any.word()}`; const results = any.simpleObject(); const chosenHostScaffolder = vi.fn(); - const hostPlugins = {...any.simpleObject(), [chosenHost]: {scaffold: chosenHostScaffolder}}; - when(chosenHostScaffolder).calledWith(otherOptions).mockResolvedValue(results); + const hostPlugins = {...any.simpleObject(), [chosenHost.toLowerCase()]: {scaffold: chosenHostScaffolder}}; + const owner = any.word; + when(promptForVcsHostDetails) + .calledWith(hostPlugins, visibility, decisions) + .mockResolvedValue({[questionNames.REPO_HOST]: chosenHost, [questionNames.REPO_OWNER]: owner}); + when(chosenHostScaffolder).calledWith({...options, owner}).mockResolvedValue(results); - expect(await scaffoldVcsHost(hostPlugins, {...otherOptions, chosenHost: chosenHost.toLowerCase()})) + expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)) .toEqual(results); }); it('should return empty `vcs` results when no matching host is available', async () => { const hostPlugins = any.simpleObject(); + when(promptForVcsHostDetails) + .calledWith(hostPlugins, visibility, decisions) + .mockResolvedValue({[questionNames.REPO_HOST]: any.word()}); - expect(await scaffoldVcsHost(hostPlugins, {...otherOptions, chosenHost: any.word()})) - .toEqual({vcs: {}}); + expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)).toEqual({vcs: {}}); }); }); From 3cf9dbbdc23c97e3fe6dd451142e934958873674 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 00:19:16 -0500 Subject: [PATCH 31/41] refactor(report-results): pass all of the merged results to the reporter --- src/scaffolder.js | 2 +- src/scaffolder.test.js | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/scaffolder.js b/src/scaffolder.js index 25107bd5..624c6aa8 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -76,5 +76,5 @@ export async function scaffold(options) { await subprocess; } - reportResults({nextSteps: mergedResults.nextSteps}); + reportResults(mergedResults); } diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 9ba3f515..274a1c04 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -90,6 +90,13 @@ describe('project scaffolder', () => { }; const licenseResults = {badges: {consumer: {license: licenseBadge}}}; const contributingResults = any.simpleObject(); + const mergedResults = deepmerge.all([ + licenseResults, + languageResults, + dependencyUpdaterResults, + contributingResults, + vcsResults + ]); when(optionsValidator.validate) .calledWith(options) .mockReturnValue({decisions, plugins: {dependencyUpdaters, languages, vcsHosts}}); @@ -131,18 +138,10 @@ describe('project scaffolder', () => { expect(lift).toHaveBeenCalledWith({ projectRoot: projectPath, vcs, - results: deepmerge.all([ - licenseResults, - languageResults, - dependencyUpdaterResults, - contributingResults, - vcsResults - ]), + results: mergedResults, enhancers: {...dependencyUpdaters, ...vcsHosts} }); - expect(resultsReporter.reportResults).toHaveBeenCalledWith({ - nextSteps: [...dependencyUpdaterNextSteps, ...gitNextSteps] - }); + expect(resultsReporter.reportResults).toHaveBeenCalledWith(mergedResults); }); it('should consider all options to be optional', async () => { @@ -279,7 +278,7 @@ describe('project scaffolder', () => { expect(scaffoldReadme).toHaveBeenCalledWith({projectName, projectRoot: projectPath, description}); expect(execaPipe).toHaveBeenCalledWith(process.stdout); - expect(resultsReporter.reportResults).toHaveBeenCalledWith({nextSteps: [...languageNextSteps, ...gitNextSteps]}); + expect(resultsReporter.reportResults).toHaveBeenCalledWith(deepmerge.all([languageResults, vcsResults])); }); it('should consider the language details to be optional', async () => { From 493d9395d49cfd1fa684cb1472a89f473da8976c Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 07:55:41 -0500 Subject: [PATCH 32/41] refactor(language): encapsulated the prompt with the scaffolding manager --- src/language/scaffolder.js | 7 ++++++- src/language/scaffolder.test.js | 14 ++++++++++++-- src/scaffolder.js | 6 ++---- src/scaffolder.test.js | 24 +++--------------------- 4 files changed, 23 insertions(+), 28 deletions(-) diff --git a/src/language/scaffolder.js b/src/language/scaffolder.js index a2037552..96600963 100644 --- a/src/language/scaffolder.js +++ b/src/language/scaffolder.js @@ -1,4 +1,9 @@ -export default function (languagePlugins, chosenLanguage, options) { +import {questionNames} from '../prompts/question-names.js'; +import promptForLanguageDetails from './prompt.js'; + +export default async function (languagePlugins, decisions, options) { + const {[questionNames.PROJECT_LANGUAGE]: chosenLanguage} = await promptForLanguageDetails(languagePlugins, decisions); + const plugin = languagePlugins[chosenLanguage]; if (plugin) return plugin.scaffold(options); diff --git a/src/language/scaffolder.test.js b/src/language/scaffolder.test.js index 2dab72fd..6370d7a0 100644 --- a/src/language/scaffolder.test.js +++ b/src/language/scaffolder.test.js @@ -2,21 +2,31 @@ import {describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; +import * as languagePrompt from './prompt.js'; +import {questionNames} from '../prompts/question-names.js'; import scaffold from './scaffolder.js'; +vi.mock('./prompt.js'); + describe('language scaffolder', () => { it('should scaffold the chosen language', async () => { const options = any.simpleObject(); const chosenLanguage = any.word(); const scaffolderResult = any.simpleObject(); + const decisions = any.simpleObject(); const chosenLanguageScaffolder = vi.fn(); const plugins = {...any.simpleObject(), [chosenLanguage]: {scaffold: chosenLanguageScaffolder}}; + when(languagePrompt.default) + .calledWith(plugins, decisions) + .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: chosenLanguage}); when(chosenLanguageScaffolder).calledWith(options).mockResolvedValue(scaffolderResult); - expect(await scaffold(plugins, chosenLanguage, options)).toEqual(scaffolderResult); + expect(await scaffold(plugins, decisions, options)).toEqual(scaffolderResult); }); it('should not result in an error when choosing a language without a defined scaffolder', async () => { - await scaffold(any.simpleObject(), any.word(), any.simpleObject()); + when(languagePrompt.default).mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: any.word()}); + + await scaffold(any.simpleObject(), any.simpleObject(), any.simpleObject()); }); }); diff --git a/src/scaffolder.js b/src/scaffolder.js index 624c6aa8..342d3a40 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -5,7 +5,7 @@ import {reportResults} from '@form8ion/results-reporter'; import {scaffold as scaffoldReadme} from '@form8ion/readme'; import {info} from '@travi/cli-messages'; -import {prompt as promptForLanguageDetails, scaffold as scaffoldLanguage} from './language/index.js'; +import {scaffold as scaffoldLanguage} from './language/index.js'; import {scaffold as scaffoldGit} from './vcs/git/git.js'; import {scaffold as scaffoldLicense} from './license/index.js'; import scaffoldDependencyUpdater from './dependency-updater/scaffolder.js'; @@ -45,11 +45,9 @@ export async function scaffold(options) { {projectRoot, vcs: vcsResults.vcs} ); - const {[questionNames.PROJECT_LANGUAGE]: projectLanguage} = await promptForLanguageDetails(languages, decisions); - const language = await scaffoldLanguage( languages, - projectLanguage, + decisions, {projectRoot, projectName, vcs: vcsResults.vcs, visibility, license: chosenLicense || 'UNLICENSED', description} ); diff --git a/src/scaffolder.test.js b/src/scaffolder.test.js index 274a1c04..ddc36bc8 100644 --- a/src/scaffolder.test.js +++ b/src/scaffolder.test.js @@ -11,7 +11,6 @@ import {when} from 'jest-when'; import {scaffold as scaffoldGit} from './vcs/git/git.js'; import * as licenseScaffolder from './license/scaffolder.js'; import scaffoldLanguage from './language/scaffolder.js'; -import * as languagePrompt from './language/prompt.js'; import * as dependencyUpdaterScaffolder from './dependency-updater/scaffolder.js'; import * as optionsValidator from './options-validator.js'; import * as prompts from './prompts/questions.js'; @@ -28,7 +27,6 @@ vi.mock('./readme'); vi.mock('./vcs/git/git.js'); vi.mock('./license/scaffolder'); vi.mock('./language/scaffolder'); -vi.mock('./language/prompt'); vi.mock('./dependency-updater/scaffolder'); vi.mock('./options-validator'); vi.mock('./prompts/questions'); @@ -44,7 +42,6 @@ describe('project scaffolder', () => { const description = any.string(); const homepage = any.url(); const license = any.string(); - const projectLanguage = any.word(); const licenseBadge = any.url(); const languages = any.simpleObject(); const vcsHosts = any.simpleObject(); @@ -111,9 +108,6 @@ describe('project scaffolder', () => { [coreQuestionNames.COPYRIGHT_YEAR]: year, [coreQuestionNames.VISIBILITY]: visibility }); - when(languagePrompt.default) - .calledWith(languages, decisions) - .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); when(scaffoldGit) .calledWith(gitRepoShouldBeInitialized, projectPath, projectName, description, vcsHosts, visibility, decisions) .mockResolvedValue(vcsResults); @@ -154,7 +148,6 @@ describe('project scaffolder', () => { [questionNames.GIT_REPO]: gitRepoShouldBeInitialized }); when(scaffoldGit).mockResolvedValue(vcsResults); - languagePrompt.default.mockResolvedValue({}); await scaffold(); @@ -166,7 +159,6 @@ describe('project scaffolder', () => { const emptyOptions = {}; when(optionsValidator.validate).calledWith(emptyOptions).mockReturnValue({plugins: {}}); when(prompts.promptForBaseDetails).calledWith(projectPath, undefined).mockResolvedValue({}); - languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); await scaffold(emptyOptions); @@ -207,7 +199,6 @@ describe('project scaffolder', () => { scaffoldLanguage.mockResolvedValue(languageResults); dependencyUpdaterScaffolder.default.mockResolvedValue({badges: dependencyUpdaterBadges}); licenseScaffolder.default.mockResolvedValue({badges: licenseBadges}); - languagePrompt.default.mockResolvedValue({}); when(scaffoldGit).mockResolvedValue(vcsResults); await scaffold(options); @@ -218,7 +209,6 @@ describe('project scaffolder', () => { it('should not scaffold the git repo if not requested', async () => { when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); prompts.promptForBaseDetails.mockResolvedValue({[questionNames.GIT_REPO]: false}); - languagePrompt.default.mockResolvedValue({}); scaffoldReadme.mockResolvedValue(); scaffoldGit.mockResolvedValue({}); @@ -258,10 +248,7 @@ describe('project scaffolder', () => { [coreQuestionNames.LICENSE]: license, [coreQuestionNames.DESCRIPTION]: description }); - when(languagePrompt.default) - .calledWith(languages, decisions) - .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); - when(scaffoldLanguage).calledWith(languages, projectLanguage, { + when(scaffoldLanguage).calledWith(languages, decisions, { projectName, projectRoot: projectPath, visibility, @@ -293,9 +280,6 @@ describe('project scaffolder', () => { [coreQuestionNames.LICENSE]: license, [coreQuestionNames.DESCRIPTION]: description }); - when(languagePrompt.default) - .calledWith(languages, decisions) - .mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); scaffoldLanguage.mockResolvedValue({}); dependencyUpdaterScaffolder.default.mockResolvedValue({}); licenseScaffolder.default.mockResolvedValue({}); @@ -308,16 +292,15 @@ describe('project scaffolder', () => { }); it('should pass the license to the language scaffolder as `UNLICENSED` when no license was chosen', async () => { - when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {languages}}); + when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {languages}, decisions}); prompts.promptForBaseDetails.mockResolvedValue({}); - languagePrompt.default.mockResolvedValue({[questionNames.PROJECT_LANGUAGE]: projectLanguage}); scaffoldGit.mockResolvedValue(vcsResults); await scaffold(options); expect(scaffoldLanguage).toHaveBeenCalledWith( languages, - projectLanguage, + decisions, { license: 'UNLICENSED', description: undefined, @@ -332,7 +315,6 @@ describe('project scaffolder', () => { it('should not run a verification command when one is not provided', async () => { when(optionsValidator.validate).calledWith(options).mockReturnValue({plugins: {}}); prompts.promptForBaseDetails.mockResolvedValue({}); - languagePrompt.default.mockResolvedValue({}); scaffoldGit.mockResolvedValue({}); scaffoldLanguage.mockResolvedValue({badges: {}, projectDetails: {}}); From cff87ff22cce92da68a41710363eb510f4e7a61c Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 08:18:39 -0500 Subject: [PATCH 33/41] feat(vcs-host): provided the terminal-prompt to the vcs-host scaffolder --- src/prompts/terminal-prompt.js | 5 +++++ src/prompts/terminal-prompt.test.js | 20 ++++++++++++++++++++ src/vcs/host/scaffolder.js | 5 +++-- src/vcs/host/scaffolder.test.js | 3 ++- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 src/prompts/terminal-prompt.js create mode 100644 src/prompts/terminal-prompt.test.js diff --git a/src/prompts/terminal-prompt.js b/src/prompts/terminal-prompt.js new file mode 100644 index 00000000..b4d26d54 --- /dev/null +++ b/src/prompts/terminal-prompt.js @@ -0,0 +1,5 @@ +import {prompt} from '@form8ion/overridable-prompts'; + +export default function ({questions, decisions}) { + return prompt(questions, decisions); +} diff --git a/src/prompts/terminal-prompt.test.js b/src/prompts/terminal-prompt.test.js new file mode 100644 index 00000000..72ea965f --- /dev/null +++ b/src/prompts/terminal-prompt.test.js @@ -0,0 +1,20 @@ +import {prompt as promptWithInquirer} from '@form8ion/overridable-prompts'; + +import {when} from 'jest-when'; +import {describe, it, vi, expect} from 'vitest'; +import any from '@travi/any'; + +import prompt from './terminal-prompt.js'; + +vi.mock('@form8ion/overridable-prompts'); + +describe('terminal prompt', () => { + it('should present the provided questions using inquirer', async () => { + const questions = any.listOf(any.simpleObject); + const decisions = any.simpleObject(); + const answers = any.simpleObject(); + when(promptWithInquirer).calledWith(questions, decisions).mockResolvedValue(answers); + + expect(await prompt({questions, decisions})).toEqual(answers); + }); +}); diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index 6ff29be8..2b584d5c 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -1,5 +1,6 @@ -import promptForVcsHostDetails from './prompt.js'; import {questionNames} from '../../prompts/question-names.js'; +import terminalPrompt from '../../prompts/terminal-prompt.js'; +import promptForVcsHostDetails from './prompt.js'; export default async function (hosts, visibility, decisions, options) { const { @@ -12,7 +13,7 @@ export default async function (hosts, visibility, decisions, options) { ); const host = lowercasedHosts[chosenHost.toLowerCase()]; - if (host) return host.scaffold({...options, owner}); + if (host) return host.scaffold({...options, owner}, {prompt: terminalPrompt}); return {vcs: {}}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index 78bf376a..3d05a3d1 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -5,6 +5,7 @@ import {when} from 'jest-when'; import scaffoldVcsHost from './scaffolder.js'; import promptForVcsHostDetails from './prompt.js'; import {questionNames} from '../../prompts/question-names.js'; +import terminalPrompt from '../../prompts/terminal-prompt.js'; vi.mock('./prompt'); @@ -22,7 +23,7 @@ describe('vcs host scaffolder', () => { when(promptForVcsHostDetails) .calledWith(hostPlugins, visibility, decisions) .mockResolvedValue({[questionNames.REPO_HOST]: chosenHost, [questionNames.REPO_OWNER]: owner}); - when(chosenHostScaffolder).calledWith({...options, owner}).mockResolvedValue(results); + when(chosenHostScaffolder).calledWith({...options, owner}, {prompt: terminalPrompt}).mockResolvedValue(results); expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)) .toEqual(results); From 7954df4dbab6fa101d0880201f8e4b94806fbfb9 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 08:55:31 -0500 Subject: [PATCH 34/41] fix(terminal-prompt): remove need for consumer to provide decisions --- src/prompts/terminal-prompt.js | 4 ++-- src/prompts/terminal-prompt.test.js | 2 +- src/vcs/host/scaffolder.js | 4 ++-- src/vcs/host/scaffolder.test.js | 13 +++++++++---- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/prompts/terminal-prompt.js b/src/prompts/terminal-prompt.js index b4d26d54..2f0ed522 100644 --- a/src/prompts/terminal-prompt.js +++ b/src/prompts/terminal-prompt.js @@ -1,5 +1,5 @@ import {prompt} from '@form8ion/overridable-prompts'; -export default function ({questions, decisions}) { - return prompt(questions, decisions); +export default function (decisions) { + return ({questions}) => prompt(questions, decisions); } diff --git a/src/prompts/terminal-prompt.test.js b/src/prompts/terminal-prompt.test.js index 72ea965f..0ac960dc 100644 --- a/src/prompts/terminal-prompt.test.js +++ b/src/prompts/terminal-prompt.test.js @@ -15,6 +15,6 @@ describe('terminal prompt', () => { const answers = any.simpleObject(); when(promptWithInquirer).calledWith(questions, decisions).mockResolvedValue(answers); - expect(await prompt({questions, decisions})).toEqual(answers); + expect(await prompt(decisions)({questions})).toEqual(answers); }); }); diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index 2b584d5c..a7d482b1 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -1,5 +1,5 @@ import {questionNames} from '../../prompts/question-names.js'; -import terminalPrompt from '../../prompts/terminal-prompt.js'; +import terminalPromptFactory from '../../prompts/terminal-prompt.js'; import promptForVcsHostDetails from './prompt.js'; export default async function (hosts, visibility, decisions, options) { @@ -13,7 +13,7 @@ export default async function (hosts, visibility, decisions, options) { ); const host = lowercasedHosts[chosenHost.toLowerCase()]; - if (host) return host.scaffold({...options, owner}, {prompt: terminalPrompt}); + if (host) return host.scaffold({...options, owner}, {prompt: terminalPromptFactory(decisions)}); return {vcs: {}}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index 3d05a3d1..c86d89e5 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -2,11 +2,12 @@ import {describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import scaffoldVcsHost from './scaffolder.js'; -import promptForVcsHostDetails from './prompt.js'; import {questionNames} from '../../prompts/question-names.js'; -import terminalPrompt from '../../prompts/terminal-prompt.js'; +import terminalPromptFactory from '../../prompts/terminal-prompt.js'; +import promptForVcsHostDetails from './prompt.js'; +import scaffoldVcsHost from './scaffolder.js'; +vi.mock('../../prompts/terminal-prompt.js'); vi.mock('./prompt'); describe('vcs host scaffolder', () => { @@ -20,10 +21,14 @@ describe('vcs host scaffolder', () => { const chosenHostScaffolder = vi.fn(); const hostPlugins = {...any.simpleObject(), [chosenHost.toLowerCase()]: {scaffold: chosenHostScaffolder}}; const owner = any.word; + const terminalPrompt = () => undefined; + when(terminalPromptFactory).calledWith(decisions).mockReturnValue(terminalPrompt); when(promptForVcsHostDetails) .calledWith(hostPlugins, visibility, decisions) .mockResolvedValue({[questionNames.REPO_HOST]: chosenHost, [questionNames.REPO_OWNER]: owner}); - when(chosenHostScaffolder).calledWith({...options, owner}, {prompt: terminalPrompt}).mockResolvedValue(results); + when(chosenHostScaffolder) + .calledWith({...options, owner}, {prompt: terminalPrompt}) + .mockResolvedValue(results); expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)) .toEqual(results); From 029761831f500a8217e795d0989da40ac719592f Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Tue, 30 Jul 2024 11:23:23 -0500 Subject: [PATCH 35/41] feat(vcs-host): remove requirement to provide a `prompt` as plugins are now expected to internally BREAKING CHANGE: `owner` is no longer prompted for or provided as input to the `scaffold` function of vcs-host plugins. plugins are expected to do this prompted internally within the `scaffold` function instead. remove the `prompt` function from provided plugins --- src/vcs/host/prompt.js | 2 +- src/vcs/host/prompt.test.js | 10 ++-------- src/vcs/host/scaffolder.js | 7 ++----- src/vcs/host/scaffolder.test.js | 7 ++----- src/vcs/host/schema.js | 1 - src/vcs/host/schema.test.js | 10 ---------- .../features/step_definitions/common-steps.js | 3 +-- 7 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/vcs/host/prompt.js b/src/vcs/host/prompt.js index 545c7527..1f7cbebd 100644 --- a/src/vcs/host/prompt.js +++ b/src/vcs/host/prompt.js @@ -12,5 +12,5 @@ export default async function (hosts, visibility, decisions) { }], decisions); const host = hosts[answers[questionNames.REPO_HOST]]; - return {...answers, ...host && await host.prompt({decisions})}; + return {...answers, ...host}; } diff --git a/src/vcs/host/prompt.test.js b/src/vcs/host/prompt.test.js index 800fa8ae..d6f1139b 100644 --- a/src/vcs/host/prompt.test.js +++ b/src/vcs/host/prompt.test.js @@ -23,14 +23,8 @@ describe('vcs host details prompt', () => { it('should prompt for the vcs hosting details', async () => { const host = any.string(); const hostNames = [...any.listOf(any.string), host]; - const hostPrompt = vi.fn(); - const hosts = any.objectWithKeys( - hostNames, - {factory: key => ({prompt: host === key ? hostPrompt : () => undefined})} - ); + const hosts = any.objectWithKeys(hostNames, {factory: () => ({})}); const answersWithHostChoice = {...answers, [questionNames.REPO_HOST]: host}; - const hostAnswers = any.simpleObject(); - when(hostPrompt).calledWith({decisions}).mockResolvedValue(hostAnswers); when(conditionals.filterChoicesByVisibility).calledWith(hosts, null).mockReturnValue(filteredHostChoices); when(prompts.prompt).calledWith([{ name: questionNames.REPO_HOST, @@ -39,7 +33,7 @@ describe('vcs host details prompt', () => { choices: filteredHostChoices }], decisions).mockResolvedValue(answersWithHostChoice); - expect(await promptForVcsHostDetails(hosts, null, decisions)).toEqual({...answersWithHostChoice, ...hostAnswers}); + expect(await promptForVcsHostDetails(hosts, null, decisions)).toEqual(answersWithHostChoice); }); it('should not throw an error when `Other` is chosen as the host', async () => { diff --git a/src/vcs/host/scaffolder.js b/src/vcs/host/scaffolder.js index a7d482b1..56b35e80 100644 --- a/src/vcs/host/scaffolder.js +++ b/src/vcs/host/scaffolder.js @@ -3,17 +3,14 @@ import terminalPromptFactory from '../../prompts/terminal-prompt.js'; import promptForVcsHostDetails from './prompt.js'; export default async function (hosts, visibility, decisions, options) { - const { - [questionNames.REPO_HOST]: chosenHost, - [questionNames.REPO_OWNER]: owner - } = await promptForVcsHostDetails(hosts, visibility, decisions); + const {[questionNames.REPO_HOST]: chosenHost} = await promptForVcsHostDetails(hosts, visibility, decisions); const lowercasedHosts = Object.fromEntries( Object.entries(hosts).map(([name, details]) => [name.toLowerCase(), details]) ); const host = lowercasedHosts[chosenHost.toLowerCase()]; - if (host) return host.scaffold({...options, owner}, {prompt: terminalPromptFactory(decisions)}); + if (host) return host.scaffold(options, {prompt: terminalPromptFactory(decisions)}); return {vcs: {}}; } diff --git a/src/vcs/host/scaffolder.test.js b/src/vcs/host/scaffolder.test.js index c86d89e5..7fd3d8fe 100644 --- a/src/vcs/host/scaffolder.test.js +++ b/src/vcs/host/scaffolder.test.js @@ -26,12 +26,9 @@ describe('vcs host scaffolder', () => { when(promptForVcsHostDetails) .calledWith(hostPlugins, visibility, decisions) .mockResolvedValue({[questionNames.REPO_HOST]: chosenHost, [questionNames.REPO_OWNER]: owner}); - when(chosenHostScaffolder) - .calledWith({...options, owner}, {prompt: terminalPrompt}) - .mockResolvedValue(results); + when(chosenHostScaffolder).calledWith(options, {prompt: terminalPrompt}).mockResolvedValue(results); - expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)) - .toEqual(results); + expect(await scaffoldVcsHost(hostPlugins, visibility, decisions, options)).toEqual(results); }); it('should return empty `vcs` results when no matching host is available', async () => { diff --git a/src/vcs/host/schema.js b/src/vcs/host/schema.js index 3612530c..966282b9 100644 --- a/src/vcs/host/schema.js +++ b/src/vcs/host/schema.js @@ -2,7 +2,6 @@ import joi from 'joi'; import {optionsSchemas} from '@form8ion/core'; export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin.keys({ - prompt: joi.func().required(), public: joi.bool(), private: joi.bool() })); diff --git a/src/vcs/host/schema.test.js b/src/vcs/host/schema.test.js index 187a8b42..098b2583 100644 --- a/src/vcs/host/schema.test.js +++ b/src/vcs/host/schema.test.js @@ -44,16 +44,6 @@ describe('vcs-host plugins schema', () => { .toThrowError(`"${key}.scaffold" must have an arity of 1`); }); - it('should require a `prompt` property', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: foo => foo}})) - .toThrowError(`"${key}.prompt" is required`); - }); - - it('should require the `prompt` to be a function', () => { - expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: foo => foo, prompt: any.word()}})) - .toThrowError(`"${key}.prompt" must be of type function`); - }); - it('should require the `public` property to be a boolean', () => { expect(() => validateOptions( vcsHostSchema, diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 7b693e87..2dc6f9b2 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -75,8 +75,7 @@ When(/^the project is scaffolded$/, async function () { [vcsHost]: { scaffold: ({projectName, owner}) => ({ vcs: {sshUrl: this.remoteOriginUrl, name: projectName, owner, host: vcsHost} - }), - prompt: () => undefined + }) } } } From fb78eba0c17b128e259aeebde525cdb5573aa53a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:14:25 +0000 Subject: [PATCH 36/41] chore(deps): update dependency vitest to v2.0.5 --- package-lock.json | 78 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index a49eca55..8ed21eb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "sinon": "18.0.0", "testdouble": "3.20.2", "unist-util-find": "3.0.0", - "vitest": "2.0.4" + "vitest": "2.0.5" }, "engines": { "node": "^18.17 || >=20.6.1" @@ -4184,14 +4184,14 @@ "license": "ISC" }, "node_modules/@vitest/expect": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.4.tgz", - "integrity": "sha512-39jr5EguIoanChvBqe34I8m1hJFI4+jxvdOpD7gslZrVQBKhh8H9eD7J/LJX4zakrw23W+dITQTDqdt43xVcJw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz", + "integrity": "sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "2.0.4", - "@vitest/utils": "2.0.4", + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", "chai": "^5.1.1", "tinyrainbow": "^1.2.0" }, @@ -4200,9 +4200,9 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.4.tgz", - "integrity": "sha512-RYZl31STbNGqf4l2eQM1nvKPXE0NhC6Eq0suTTePc4mtMQ1Fn8qZmjV4emZdEdG2NOWGKSCrHZjmTqDCDoeFBw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz", + "integrity": "sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4213,13 +4213,13 @@ } }, "node_modules/@vitest/runner": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.4.tgz", - "integrity": "sha512-Gk+9Su/2H2zNfNdeJR124gZckd5st4YoSuhF1Rebi37qTXKnqYyFCd9KP4vl2cQHbtuVKjfEKrNJxHHCW8thbQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.5.tgz", + "integrity": "sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "2.0.4", + "@vitest/utils": "2.0.5", "pathe": "^1.1.2" }, "funding": { @@ -4227,13 +4227,13 @@ } }, "node_modules/@vitest/snapshot": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.4.tgz", - "integrity": "sha512-or6Mzoz/pD7xTvuJMFYEtso1vJo1S5u6zBTinfl+7smGUhqybn6VjzCDMhmTyVOFWwkCMuNjmNNxnyXPgKDoPw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-2.0.5.tgz", + "integrity": "sha512-SgCPUeDFLaM0mIUHfaArq8fD2WbaXG/zVXjRupthYfYGzc8ztbFbu6dUNOblBG7XLMR1kEhS/DNnfCZ2IhdDew==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.0.4", + "@vitest/pretty-format": "2.0.5", "magic-string": "^0.30.10", "pathe": "^1.1.2" }, @@ -4242,9 +4242,9 @@ } }, "node_modules/@vitest/spy": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.4.tgz", - "integrity": "sha512-uTXU56TNoYrTohb+6CseP8IqNwlNdtPwEO0AWl+5j7NelS6x0xZZtP0bDWaLvOfUbaYwhhWp1guzXUxkC7mW7Q==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz", + "integrity": "sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA==", "dev": true, "license": "MIT", "dependencies": { @@ -4255,13 +4255,13 @@ } }, "node_modules/@vitest/utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.4.tgz", - "integrity": "sha512-Zc75QuuoJhOBnlo99ZVUkJIuq4Oj0zAkrQ2VzCqNCx6wAwViHEh5Fnp4fiJTE9rA+sAoXRf00Z9xGgfEzV6fzQ==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz", + "integrity": "sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "2.0.4", + "@vitest/pretty-format": "2.0.5", "estree-walker": "^3.0.3", "loupe": "^3.1.1", "tinyrainbow": "^1.2.0" @@ -22279,9 +22279,9 @@ } }, "node_modules/vite-node": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.4.tgz", - "integrity": "sha512-ZpJVkxcakYtig5iakNeL7N3trufe3M6vGuzYAr4GsbCTwobDeyPJpE4cjDhhPluv8OvQCFzu2LWp6GkoKRITXA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-2.0.5.tgz", + "integrity": "sha512-LdsW4pxj0Ot69FAoXZ1yTnA9bjGohr2yNBU7QKRxpz8ITSkhuDl6h3zS/tvgz4qrNjeRnvrWeXQ8ZF7Um4W00Q==", "dev": true, "license": "MIT", "dependencies": { @@ -22302,19 +22302,19 @@ } }, "node_modules/vitest": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.4.tgz", - "integrity": "sha512-luNLDpfsnxw5QSW4bISPe6tkxVvv5wn2BBs/PuDRkhXZ319doZyLOBr1sjfB5yCEpTiU7xCAdViM8TNVGPwoog==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-2.0.5.tgz", + "integrity": "sha512-8GUxONfauuIdeSl5f9GTgVEpg5BTOlplET4WEDaeY2QBiN8wSm68vxN/tb5z405OwppfoCavnwXafiaYBC/xOA==", "dev": true, "license": "MIT", "dependencies": { "@ampproject/remapping": "^2.3.0", - "@vitest/expect": "2.0.4", - "@vitest/pretty-format": "^2.0.4", - "@vitest/runner": "2.0.4", - "@vitest/snapshot": "2.0.4", - "@vitest/spy": "2.0.4", - "@vitest/utils": "2.0.4", + "@vitest/expect": "2.0.5", + "@vitest/pretty-format": "^2.0.5", + "@vitest/runner": "2.0.5", + "@vitest/snapshot": "2.0.5", + "@vitest/spy": "2.0.5", + "@vitest/utils": "2.0.5", "chai": "^5.1.1", "debug": "^4.3.5", "execa": "^8.0.1", @@ -22325,7 +22325,7 @@ "tinypool": "^1.0.0", "tinyrainbow": "^1.2.0", "vite": "^5.0.0", - "vite-node": "2.0.4", + "vite-node": "2.0.5", "why-is-node-running": "^2.3.0" }, "bin": { @@ -22340,8 +22340,8 @@ "peerDependencies": { "@edge-runtime/vm": "*", "@types/node": "^18.0.0 || >=20.0.0", - "@vitest/browser": "2.0.4", - "@vitest/ui": "2.0.4", + "@vitest/browser": "2.0.5", + "@vitest/ui": "2.0.5", "happy-dom": "*", "jsdom": "*" }, diff --git a/package.json b/package.json index 4eb0f856..e77a656b 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,6 @@ "sinon": "18.0.0", "testdouble": "3.20.2", "unist-util-find": "3.0.0", - "vitest": "2.0.4" + "vitest": "2.0.5" } } From a541e37cf464214d2cb4c0715fe670d5c0c1f9c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:31:13 +0000 Subject: [PATCH 37/41] chore(deps): update dependency ls-engines to v0.9.3 --- package-lock.json | 1243 ++++++--------------------------------------- package.json | 2 +- 2 files changed, 144 insertions(+), 1101 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8ed21eb7..da83a843 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "husky": "9.1.4", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", - "ls-engines": "0.9.2", + "ls-engines": "0.9.3", "make-dir": "4.0.0", "mdast-util-from-markdown": "2.0.1", "mdast-util-heading-range": "4.0.0", @@ -6492,17 +6492,6 @@ } } }, - "node_modules/debuglog": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", - "integrity": "sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", - "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", - "dev": true, - "license": "MIT", - "engines": { - "node": "*" - } - }, "node_modules/decamelize": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", @@ -6707,17 +6696,6 @@ "url": "https://github.com/sponsors/wooorm" } }, - "node_modules/dezalgo": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", - "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", - "dev": true, - "license": "ISC", - "dependencies": { - "asap": "^2.0.0", - "wrappy": "1" - } - }, "node_modules/diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -7928,1107 +7906,213 @@ "signal-exit": "^4.0.1" }, "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/foreground-child/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/fs-exists-sync": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fs-minipass": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", - "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^7.0.3" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true, - "license": "ISC" - }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/function.prototype.name": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", - "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "functions-have-names": "^1.2.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/functions-have-names": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/gauge": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-5.0.2.tgz", - "integrity": "sha512-pMaFftXPtiGIHCJHdcUUx9Rby/rFT/Kkt3fIIGCs+9PMDIljSyRiqraTlxNtBReJRDfUefpa263RQ3vnp5G/LQ==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^4.0.1", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, - "node_modules/gauge/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "license": "ISC", - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-current-line": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/get-current-line/-/get-current-line-7.4.0.tgz", - "integrity": "sha512-iPHQyqGX7ztEviLIrgq9qYZ/xTbxpQrOsZeUwiFs03uixOPK4IBQRQI4YE4Nsk9A5edUynAqK4BmRnd2Hh2a3g==", - "license": "Artistic-2.0", - "dependencies": { - "editions": "^6.21.0" - }, - "engines": { - "node": ">=4" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/get-dep-tree": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/get-dep-tree/-/get-dep-tree-1.0.4.tgz", - "integrity": "sha512-ozEmO7BTbo7vAAaBKgs9PiqqvfrtfoD4uEqc7X3LOpoeWmjK0IF5myqDpJwcBxAARkMh8xNgJdD3zVFG2yGnag==", - "dev": true, - "license": "MIT", - "dependencies": { - "@npmcli/arborist": "^5.6.3", - "array.prototype.flat": "^1.3.1", - "colors": "=1.4.0", - "lockfile-info": "^1.0.0", - "pacote": "^13.6.2" - }, - "engines": { - "node": ">= 16 || ^14.15 || ^12.13" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/arborist": { - "version": "5.6.3", - "resolved": "https://registry.npmjs.org/@npmcli/arborist/-/arborist-5.6.3.tgz", - "integrity": "sha512-/7hbqEM6YuRjwTcQXkK1+xKslEblY5kFQe0tZ7jKyMlIR6x4iOmhLErIkBBGtTKvYxRKdpcxnFXjCobg3UqmsA==", - "dev": true, - "license": "ISC", - "dependencies": { - "@isaacs/string-locale-compare": "^1.1.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/map-workspaces": "^2.0.3", - "@npmcli/metavuln-calculator": "^3.0.1", - "@npmcli/move-file": "^2.0.0", - "@npmcli/name-from-folder": "^1.0.1", - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/package-json": "^2.0.0", - "@npmcli/query": "^1.2.0", - "@npmcli/run-script": "^4.1.3", - "bin-links": "^3.0.3", - "cacache": "^16.1.3", - "common-ancestor-path": "^1.0.1", - "hosted-git-info": "^5.2.1", - "json-parse-even-better-errors": "^2.3.1", - "json-stringify-nice": "^1.1.4", - "minimatch": "^5.1.0", - "mkdirp": "^1.0.4", - "mkdirp-infer-owner": "^2.0.0", - "nopt": "^6.0.0", - "npm-install-checks": "^5.0.0", - "npm-package-arg": "^9.0.0", - "npm-pick-manifest": "^7.0.2", - "npm-registry-fetch": "^13.0.0", - "npmlog": "^6.0.2", - "pacote": "^13.6.1", - "parse-conflict-json": "^2.0.1", - "proc-log": "^2.0.0", - "promise-all-reject-late": "^1.0.0", - "promise-call-limit": "^1.0.1", - "read-package-json-fast": "^2.0.2", - "readdir-scoped-modules": "^1.1.0", - "rimraf": "^3.0.2", - "semver": "^7.3.7", - "ssri": "^9.0.0", - "treeverse": "^2.0.0", - "walk-up-path": "^1.0.0" - }, - "bin": { - "arborist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/fs": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", - "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "@gar/promisify": "^1.1.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/git": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@npmcli/git/-/git-3.0.2.tgz", - "integrity": "sha512-CAcd08y3DWBJqJDpfuVL0uijlq5oaXaOJEKHKc4wqrjd00gkvTZB+nFuLn+doOOKddaQS9JfqtNoFCO2LCvA3w==", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/promise-spawn": "^3.0.0", - "lru-cache": "^7.4.4", - "mkdirp": "^1.0.4", - "npm-pick-manifest": "^7.0.0", - "proc-log": "^2.0.0", - "promise-inflight": "^1.0.1", - "promise-retry": "^2.0.1", - "semver": "^7.3.5", - "which": "^2.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/installed-package-contents": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-1.0.7.tgz", - "integrity": "sha512-9rufe0wnJusCQoLpV9ZPKIVP55itrM5BxOXs10DmdbRfgWtHy1LDyskbwRnBghuB0PrF7pNPOqREVtpz4HqzKw==", - "dev": true, - "license": "ISC", - "dependencies": { - "npm-bundled": "^1.1.1", - "npm-normalize-package-bin": "^1.0.1" - }, - "bin": { - "installed-package-contents": "index.js" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/map-workspaces": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@npmcli/map-workspaces/-/map-workspaces-2.0.4.tgz", - "integrity": "sha512-bMo0aAfwhVwqoVM5UzX1DJnlvVvzDCHae821jv48L1EsrYwfOZChlqWYXEtto/+BkBXetPbEWgau++/brh4oVg==", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/name-from-folder": "^1.0.1", - "glob": "^8.0.1", - "minimatch": "^5.0.1", - "read-package-json-fast": "^2.0.3" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/metavuln-calculator": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@npmcli/metavuln-calculator/-/metavuln-calculator-3.1.1.tgz", - "integrity": "sha512-n69ygIaqAedecLeVH3KnO39M6ZHiJ2dEv5A7DGvcqCB8q17BGUgW8QaanIkbWUo2aYGZqJaOORTLAlIvKjNDKA==", - "dev": true, - "license": "ISC", - "dependencies": { - "cacache": "^16.0.0", - "json-parse-even-better-errors": "^2.3.1", - "pacote": "^13.0.3", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/name-from-folder": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/name-from-folder/-/name-from-folder-1.0.1.tgz", - "integrity": "sha512-qq3oEfcLFwNfEYOQ8HLimRGKlD8WSeGEdtUa7hmzpR8Sa7haL1KVQrvgO6wqMjhWFFVjgtrh1gIxDz+P8sjUaA==", - "dev": true, - "license": "ISC" - }, - "node_modules/get-dep-tree/node_modules/@npmcli/node-gyp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-2.0.0.tgz", - "integrity": "sha512-doNI35wIe3bBaEgrlPfdJPaCpUR89pJWep4Hq3aRdh6gKazIVWfs0jHttvSSoq47ZXgC7h73kDsUl8AoIQUB+A==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/package-json": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/package-json/-/package-json-2.0.0.tgz", - "integrity": "sha512-42jnZ6yl16GzjWSH7vtrmWyJDGVa/LXPdpN2rcUWolFjc9ON2N3uz0qdBbQACfmhuJZ2lbKYtmK5qx68ZPLHMA==", - "dev": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^2.3.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/promise-spawn": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-3.0.0.tgz", - "integrity": "sha512-s9SgS+p3a9Eohe68cSI3fi+hpcZUmXq5P7w0kMlAsWVtR7XbK3ptkZqKT2cK1zLDObJ3sR+8P59sJE0w/KTL1g==", - "dev": true, - "license": "ISC", - "dependencies": { - "infer-owner": "^1.0.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/query": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@npmcli/query/-/query-1.2.0.tgz", - "integrity": "sha512-uWglsUM3PjBLgTSmZ3/vygeGdvWEIZ3wTUnzGFbprC/RtvQSaT+GAXu1DXmSFj2bD3oOZdcRm1xdzsV2z1YWdw==", - "dev": true, - "license": "ISC", - "dependencies": { - "npm-package-arg": "^9.1.0", - "postcss-selector-parser": "^6.0.10", - "semver": "^7.3.7" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/@npmcli/run-script": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/@npmcli/run-script/-/run-script-4.2.1.tgz", - "integrity": "sha512-7dqywvVudPSrRCW5nTHpHgeWnbBtz8cFkOuKrecm6ih+oO9ciydhWt6OF7HlqupRRmB8Q/gECVdB9LMfToJbRg==", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/node-gyp": "^2.0.0", - "@npmcli/promise-spawn": "^3.0.0", - "node-gyp": "^9.0.0", - "read-package-json-fast": "^2.0.3", - "which": "^2.0.2" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true, - "license": "ISC" - }, - "node_modules/get-dep-tree/node_modules/are-we-there-yet": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", - "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/bin-links": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/bin-links/-/bin-links-3.0.3.tgz", - "integrity": "sha512-zKdnMPWEdh4F5INR07/eBrodC7QrF5JKvqskjz/ZZRXg5YSAZIbn8zGhbhUrElzHBZ2fvEQdOU59RHcTG3GiwA==", - "dev": true, - "license": "ISC", - "dependencies": { - "cmd-shim": "^5.0.0", - "mkdirp-infer-owner": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0", - "read-cmd-shim": "^3.0.0", - "rimraf": "^3.0.0", - "write-file-atomic": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/bin-links/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/builtins": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-5.1.0.tgz", - "integrity": "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg==", - "dev": true, - "license": "MIT", - "dependencies": { - "semver": "^7.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/cacache": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", - "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/fs": "^2.1.0", - "@npmcli/move-file": "^2.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "glob": "^8.0.1", - "infer-owner": "^1.0.4", - "lru-cache": "^7.7.1", - "minipass": "^3.1.6", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.4", - "mkdirp": "^1.0.4", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11", - "unique-filename": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/cmd-shim": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-5.0.0.tgz", - "integrity": "sha512-qkCtZ59BidfEwHltnJwkyVZn+XQojdAySM1D1gSeh11Z4pW1Kpolkyo53L5noc0nrxmIvyFwTmJRo4xs7FFLPw==", - "dev": true, - "license": "ISC", - "dependencies": { - "mkdirp-infer-owner": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dev": true, - "license": "ISC", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/get-dep-tree/node_modules/gauge": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", - "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.3", - "console-control-strings": "^1.1.0", - "has-unicode": "^2.0.1", - "signal-exit": "^3.0.7", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/get-dep-tree/node_modules/hosted-git-info": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-5.2.1.tgz", - "integrity": "sha512-xIcQYMnhcx2Nr4JTjsFmwwnr9vldugPy9uVm0o87bjqqWMv9GaqsTeT+i99wTl0mk1uLxJtHxLb8kymqTENQsw==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^7.5.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/ignore-walk": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-5.0.1.tgz", - "integrity": "sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==", - "dev": true, - "license": "ISC", - "dependencies": { - "minimatch": "^5.0.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "node_modules/get-dep-tree/node_modules/just-diff": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/just-diff/-/just-diff-5.2.0.tgz", - "integrity": "sha512-6ufhP9SHjb7jibNFrNxyFZ6od3g+An6Ai9mhGRvcYe8UJlH0prseN64M+6ZBBUoKYHZsitDP42gAJ8+eVWr3lw==", - "dev": true, - "license": "MIT" - }, - "node_modules/get-dep-tree/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", - "dev": true, - "license": "ISC", - "engines": { - "node": ">=12" - } - }, - "node_modules/get-dep-tree/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/get-dep-tree/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "license": "ISC", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/get-dep-tree/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/get-dep-tree/node_modules/nopt": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", - "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", - "dev": true, - "license": "ISC", - "dependencies": { - "abbrev": "^1.0.0" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/normalize-package-data": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-4.0.1.tgz", - "integrity": "sha512-EBk5QKKuocMJhB3BILuKhmaPjI8vNRSpIfO9woLC6NyHVkKKdVEdAO1mrT0ZfxNR1lKwCcTkuZfmGIFdizZ8Pg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "hosted-git-info": "^5.0.0", - "is-core-module": "^2.8.1", - "semver": "^7.3.5", - "validate-npm-package-license": "^3.0.4" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-bundled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.2.tgz", - "integrity": "sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "node_modules/get-dep-tree/node_modules/npm-install-checks": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-5.0.0.tgz", - "integrity": "sha512-65lUsMI8ztHCxFz5ckCEC44DRvEGdZX5usQFriauxHEwt7upv1FKaQEmAtU0YnOAdwuNWCmk64xYiQABNrEyLA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "semver": "^7.1.1" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-normalize-package-bin": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", - "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", - "dev": true, - "license": "ISC" - }, - "node_modules/get-dep-tree/node_modules/npm-package-arg": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-9.1.2.tgz", - "integrity": "sha512-pzd9rLEx4TfNJkovvlBSLGhq31gGu2QDexFPWT19yCDh0JgnRhlBLNo5759N0AJmBk+kQ9Y/hXoLnlgFD+ukmg==", - "dev": true, - "license": "ISC", - "dependencies": { - "hosted-git-info": "^5.0.0", - "proc-log": "^2.0.1", - "semver": "^7.3.5", - "validate-npm-package-name": "^4.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-packlist": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-5.1.3.tgz", - "integrity": "sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==", - "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^8.0.1", - "ignore-walk": "^5.0.1", - "npm-bundled": "^2.0.0", - "npm-normalize-package-bin": "^2.0.0" - }, - "bin": { - "npm-packlist": "bin/index.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-packlist/node_modules/npm-bundled": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-2.0.1.tgz", - "integrity": "sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==", - "dev": true, - "license": "ISC", - "dependencies": { - "npm-normalize-package-bin": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-packlist/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-pick-manifest": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-7.0.2.tgz", - "integrity": "sha512-gk37SyRmlIjvTfcYl6RzDbSmS9Y4TOBXfsPnoYqTHARNgWbyDiCSMLUpmALDj4jjcTZpURiEfsSHJj9k7EV4Rw==", - "dev": true, - "license": "ISC", - "dependencies": { - "npm-install-checks": "^5.0.0", - "npm-normalize-package-bin": "^2.0.0", - "npm-package-arg": "^9.0.0", - "semver": "^7.3.5" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-pick-manifest/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", - "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npm-registry-fetch": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-13.3.1.tgz", - "integrity": "sha512-eukJPi++DKRTjSBRcDZSDDsGqRK3ehbxfFUcgaRd0Yp6kRwOwh2WVn0r+8rMB4nnuzvAk6rQVzl6K5CkYOmnvw==", - "dev": true, - "license": "ISC", - "dependencies": { - "make-fetch-happen": "^10.0.6", - "minipass": "^3.1.6", - "minipass-fetch": "^2.0.3", - "minipass-json-stream": "^1.0.1", - "minizlib": "^2.1.2", - "npm-package-arg": "^9.0.1", - "proc-log": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/npmlog": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", - "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", - "deprecated": "This package is no longer supported.", - "dev": true, - "license": "ISC", - "dependencies": { - "are-we-there-yet": "^3.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^4.0.3", - "set-blocking": "^2.0.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/pacote": { - "version": "13.6.2", - "resolved": "https://registry.npmjs.org/pacote/-/pacote-13.6.2.tgz", - "integrity": "sha512-Gu8fU3GsvOPkak2CkbojR7vjs3k3P9cA6uazKTHdsdV0gpCEQq2opelnEv30KRQWgVzP5Vd/5umjcedma3MKtg==", - "dev": true, - "license": "ISC", - "dependencies": { - "@npmcli/git": "^3.0.0", - "@npmcli/installed-package-contents": "^1.0.7", - "@npmcli/promise-spawn": "^3.0.0", - "@npmcli/run-script": "^4.1.0", - "cacache": "^16.0.0", - "chownr": "^2.0.0", - "fs-minipass": "^2.1.0", - "infer-owner": "^1.0.4", - "minipass": "^3.1.6", - "mkdirp": "^1.0.4", - "npm-package-arg": "^9.0.0", - "npm-packlist": "^5.1.0", - "npm-pick-manifest": "^7.0.0", - "npm-registry-fetch": "^13.0.1", - "proc-log": "^2.0.0", - "promise-retry": "^2.0.1", - "read-package-json": "^5.0.0", - "read-package-json-fast": "^2.0.3", - "rimraf": "^3.0.2", - "ssri": "^9.0.0", - "tar": "^6.1.11" - }, - "bin": { - "pacote": "lib/bin.js" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } - }, - "node_modules/get-dep-tree/node_modules/parse-conflict-json": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/parse-conflict-json/-/parse-conflict-json-2.0.2.tgz", - "integrity": "sha512-jDbRGb00TAPFsKWCpZZOT93SxVP9nONOSgES3AevqRq/CHvavEBvKAjxX9p5Y5F0RZLxH9Ufd9+RwtCsa+lFDA==", - "dev": true, - "license": "ISC", - "dependencies": { - "json-parse-even-better-errors": "^2.3.1", - "just-diff": "^5.0.1", - "just-diff-apply": "^5.2.0" - }, - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-dep-tree/node_modules/proc-log": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/proc-log/-/proc-log-2.0.1.tgz", - "integrity": "sha512-Kcmo2FhfDTXdcbfDH76N7uBYHINxc/8GW7UAVuVP9I+Va3uHSerrnKV6dLooga/gh7GlgzuCCr/eoldnL1muGw==", + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-dep-tree/node_modules/read-cmd-shim": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/read-cmd-shim/-/read-cmd-shim-3.0.1.tgz", - "integrity": "sha512-kEmDUoYf/CDy8yZbLTmhB1X9kkjf9Q80PCNsDMb7ufrGd6zZSQA1+UyjrO+pZm5K/S4OXCWJeiIt1JA8kAsa6g==", - "dev": true, - "license": "ISC", + "node_modules/fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg==", + "license": "MIT", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=0.10.0" } }, - "node_modules/get-dep-tree/node_modules/read-package-json": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-5.0.2.tgz", - "integrity": "sha512-BSzugrt4kQ/Z0krro8zhTwV1Kd79ue25IhNN/VtHFy1mG/6Tluyi+msc0UpwaoQzxSHa28mntAjIZY6kEgfR9Q==", - "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "glob": "^8.0.1", - "json-parse-even-better-errors": "^2.3.1", - "normalize-package-data": "^4.0.0", - "npm-normalize-package-bin": "^2.0.0" + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=10" } }, - "node_modules/get-dep-tree/node_modules/read-package-json-fast": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-2.0.3.tgz", - "integrity": "sha512-W/BKtbL+dUjTuRL2vziuYhp76s5HZ9qQhd/dKfWIZveD0O40453QNyZhC0e63lqZrAQ4jiOapVoeJ7JrszenQQ==", + "node_modules/fs-minipass": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.3.tgz", + "integrity": "sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw==", "dev": true, "license": "ISC", "dependencies": { - "json-parse-even-better-errors": "^2.3.0", - "npm-normalize-package-bin": "^1.0.1" + "minipass": "^7.0.3" }, "engines": { - "node": ">=10" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/get-dep-tree/node_modules/read-package-json/node_modules/npm-normalize-package-bin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-2.0.0.tgz", - "integrity": "sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==", + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", "dev": true, - "license": "ISC", - "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" - } + "license": "ISC" }, - "node_modules/get-dep-tree/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "deprecated": "Rimraf versions prior to v4 are no longer supported", + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, - "license": "ISC", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/get-dep-tree/node_modules/rimraf/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-dep-tree/node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" }, "engines": { - "node": "*" + "node": ">= 0.4" }, "funding": { - "url": "https://github.com/sponsors/isaacs" + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-dep-tree/node_modules/rimraf/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-dep-tree/node_modules/ssri": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", - "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", + "node_modules/gauge": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-5.0.2.tgz", + "integrity": "sha512-pMaFftXPtiGIHCJHdcUUx9Rby/rFT/Kkt3fIIGCs+9PMDIljSyRiqraTlxNtBReJRDfUefpa263RQ3vnp5G/LQ==", + "deprecated": "This package is no longer supported.", "dev": true, "license": "ISC", "dependencies": { - "minipass": "^3.1.1" + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^4.0.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/get-dep-tree/node_modules/treeverse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/treeverse/-/treeverse-2.0.0.tgz", - "integrity": "sha512-N5gJCkLu1aXccpOTtqV6ddSEi6ZmGkh3hjmbu1IjcavJK4qyOVQmi0myQKM7z5jVGmD68SJoliaVrMmVObhj6A==", + "node_modules/gauge/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, "license": "ISC", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/get-dep-tree/node_modules/unique-filename": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", - "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, - "license": "ISC", - "dependencies": { - "unique-slug": "^3.0.0" - }, + "license": "MIT", "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=6.9.0" } }, - "node_modules/get-dep-tree/node_modules/unique-slug": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", - "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-current-line": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/get-current-line/-/get-current-line-7.4.0.tgz", + "integrity": "sha512-iPHQyqGX7ztEviLIrgq9qYZ/xTbxpQrOsZeUwiFs03uixOPK4IBQRQI4YE4Nsk9A5edUynAqK4BmRnd2Hh2a3g==", + "license": "Artistic-2.0", "dependencies": { - "imurmurhash": "^0.1.4" + "editions": "^6.21.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">=4" + }, + "funding": { + "url": "https://bevry.me/fund" } }, - "node_modules/get-dep-tree/node_modules/validate-npm-package-name": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-4.0.0.tgz", - "integrity": "sha512-mzR0L8ZDktZjpX4OB46KT+56MAhl4EIazWP/+G/HPGuvfdaqg4YsCdtOm6U9+LOFyYDoh4dpnpxZRB9MQQns5Q==", + "node_modules/get-dep-tree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-dep-tree/-/get-dep-tree-2.0.0.tgz", + "integrity": "sha512-kEPR3I4I3mFvywlHd8UcCaZRjHTfMctp532faCk1afUQL7XGaTep/YSZ15E64/iS9oVzgbJAWO5OzLRZTnfYhA==", "dev": true, - "license": "ISC", + "license": "MIT", "dependencies": { - "builtins": "^5.0.0" + "@npmcli/arborist": "^6.5.1", + "array.prototype.flat": "^1.3.2", + "colors": "=1.4.0", + "lockfile-info": "^1.0.0", + "pacote": "^15.2.0" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + "node": ">= 19 || ^18 || ^16.13 || ^14.18" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/get-dep-tree/node_modules/walk-up-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/walk-up-path/-/walk-up-path-1.0.0.tgz", - "integrity": "sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg==", - "dev": true, - "license": "ISC" - }, "node_modules/get-func-name": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", @@ -12159,9 +11243,9 @@ "license": "ISC" }, "node_modules/ls-engines": { - "version": "0.9.2", - "resolved": "https://registry.npmjs.org/ls-engines/-/ls-engines-0.9.2.tgz", - "integrity": "sha512-2Pq4KVA3lWMAYBhnfYUjxqbE95Jl1KOTzXPtORUhzun+MA7oCK+ojApTARUCf76F95r5O5UuMro+CWcfUEI9aQ==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/ls-engines/-/ls-engines-0.9.3.tgz", + "integrity": "sha512-vvaAldgMQpU646VlFmHq73f723UycwZW7FeJCeP1GLuAGvjX/K336JIFPvz8Eo0fUXcyLIgbpD4s7HY9C7yb/A==", "dev": true, "license": "MIT", "dependencies": { @@ -12170,7 +11254,7 @@ "array.prototype.tosorted": "^1.1.4", "colors": "=1.4.0", "fast_array_intersect": "^1.1.0", - "get-dep-tree": "^1.0.4", + "get-dep-tree": "^2.0.0", "get-json": "^1.1.0", "json-file-plus": "^3.3.1", "lockfile-info": "^1.0.0", @@ -12179,7 +11263,7 @@ "object.values": "^1.2.0", "pacote": "^15.2.0", "promise.allsettled": "^1.0.7", - "semver": "^7.6.2", + "semver": "^7.6.3", "table": "^6.8.2", "yargs": "^17.7.2" }, @@ -12187,7 +11271,7 @@ "ls-engines": "bin/ls-engines" }, "engines": { - "node": ">= 19 || ^18 || ^16.13 || ^14.17", + "node": ">= 19 || ^18 || ^16.13 || ^14.18", "npm": ">=8" } }, @@ -13834,34 +12918,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/mkdirp-infer-owner": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mkdirp-infer-owner/-/mkdirp-infer-owner-2.0.0.tgz", - "integrity": "sha512-sdqtiFt3lkOaYvTXSRIUjkIdPTcxgv5+fgqYE/5qgwdw12cOrAuzzgzvVExIkH/ul1oeHN3bCLOWSG3XOqbKKw==", - "dev": true, - "license": "ISC", - "dependencies": { - "chownr": "^2.0.0", - "infer-owner": "^1.0.4", - "mkdirp": "^1.0.3" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mkdirp-infer-owner/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/mock-fs": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/mock-fs/-/mock-fs-5.2.0.tgz", @@ -15822,20 +14878,6 @@ "node": ">= 6" } }, - "node_modules/readdir-scoped-modules": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", - "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", - "deprecated": "This functionality has been moved to @npmcli/fs", - "dev": true, - "license": "ISC", - "dependencies": { - "debuglog": "^1.0.1", - "dezalgo": "^1.0.0", - "graceful-fs": "^4.1.2", - "once": "^1.3.0" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -22684,6 +21726,7 @@ "integrity": "sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==", "dev": true, "license": "ISC", + "peer": true, "dependencies": { "imurmurhash": "^0.1.4", "signal-exit": "^3.0.7" diff --git a/package.json b/package.json index e77a656b..deb215ed 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "husky": "9.1.4", "jest-when": "3.6.0", "lockfile-lint": "4.14.0", - "ls-engines": "0.9.2", + "ls-engines": "0.9.3", "make-dir": "4.0.0", "mdast-util-from-markdown": "2.0.1", "mdast-util-heading-range": "4.0.0", From 1551bc83a5069519e04c02344f84cd36726f600d Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 21:37:47 +0000 Subject: [PATCH 38/41] chore(deps): update dependency rollup to v4.19.2 --- package-lock.json | 136 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index da83a843..9a248ebf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.1", + "rollup": "4.19.2", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2", @@ -3367,9 +3367,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.1.tgz", - "integrity": "sha512-XzqSg714++M+FXhHfXpS1tDnNZNpgxxuGZWlRG/jSj+VEPmZ0yg6jV4E0AL3uyBKxO8mO3xtOsP5mQ+XLfrlww==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.2.tgz", + "integrity": "sha512-OHflWINKtoCFSpm/WmuQaWW4jeX+3Qt3XQDepkkiFTsoxFc5BpF3Z5aDxFZgBqRjO6ATP5+b1iilp4kGIZVWlA==", "cpu": [ "arm" ], @@ -3381,9 +3381,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.1.tgz", - "integrity": "sha512-thFUbkHteM20BGShD6P08aungq4irbIZKUNbG70LN8RkO7YztcGPiKTTGZS7Kw+x5h8hOXs0i4OaHwFxlpQN6A==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.2.tgz", + "integrity": "sha512-k0OC/b14rNzMLDOE6QMBCjDRm3fQOHAL8Ldc9bxEWvMo4Ty9RY6rWmGetNTWhPo+/+FNd1lsQYRd0/1OSix36A==", "cpu": [ "arm64" ], @@ -3395,9 +3395,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.1.tgz", - "integrity": "sha512-8o6eqeFZzVLia2hKPUZk4jdE3zW7LCcZr+MD18tXkgBBid3lssGVAYuox8x6YHoEPDdDa9ixTaStcmx88lio5Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.2.tgz", + "integrity": "sha512-IIARRgWCNWMTeQH+kr/gFTHJccKzwEaI0YSvtqkEBPj7AshElFq89TyreKNFAGh5frLfDCbodnq+Ye3dqGKPBw==", "cpu": [ "arm64" ], @@ -3409,9 +3409,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.1.tgz", - "integrity": "sha512-4T42heKsnbjkn7ovYiAdDVRRWZLU9Kmhdt6HafZxFcUdpjlBlxj4wDrt1yFWLk7G4+E+8p2C9tcmSu0KA6auGA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.2.tgz", + "integrity": "sha512-52udDMFDv54BTAdnw+KXNF45QCvcJOcYGl3vQkp4vARyrcdI/cXH8VXTEv/8QWfd6Fru8QQuw1b2uNersXOL0g==", "cpu": [ "x64" ], @@ -3423,9 +3423,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.1.tgz", - "integrity": "sha512-MXg1xp+e5GhZ3Vit1gGEyoC+dyQUBy2JgVQ+3hUrD9wZMkUw/ywgkpK7oZgnB6kPpGrxJ41clkPPnsknuD6M2Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.2.tgz", + "integrity": "sha512-r+SI2t8srMPYZeoa1w0o/AfoVt9akI1ihgazGYPQGRilVAkuzMGiTtexNZkrPkQsyFrvqq/ni8f3zOnHw4hUbA==", "cpu": [ "arm" ], @@ -3437,9 +3437,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.1.tgz", - "integrity": "sha512-DZNLwIY4ftPSRVkJEaxYkq7u2zel7aah57HESuNkUnz+3bZHxwkCUkrfS2IWC1sxK6F2QNIR0Qr/YXw7nkF3Pw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.2.tgz", + "integrity": "sha512-+tYiL4QVjtI3KliKBGtUU7yhw0GMcJJuB9mLTCEauHEsqfk49gtUBXGtGP3h1LW8MbaTY6rSFIQV1XOBps1gBA==", "cpu": [ "arm" ], @@ -3451,9 +3451,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.1.tgz", - "integrity": "sha512-C7evongnjyxdngSDRRSQv5GvyfISizgtk9RM+z2biV5kY6S/NF/wta7K+DanmktC5DkuaJQgoKGf7KUDmA7RUw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.2.tgz", + "integrity": "sha512-OR5DcvZiYN75mXDNQQxlQPTv4D+uNCUsmSCSY2FolLf9W5I4DSoJyg7z9Ea3TjKfhPSGgMJiey1aWvlWuBzMtg==", "cpu": [ "arm64" ], @@ -3465,9 +3465,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.1.tgz", - "integrity": "sha512-89tFWqxfxLLHkAthAcrTs9etAoBFRduNfWdl2xUs/yLV+7XDrJ5yuXMHptNqf1Zw0UCA3cAutkAiAokYCkaPtw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.2.tgz", + "integrity": "sha512-Hw3jSfWdUSauEYFBSFIte6I8m6jOj+3vifLg8EU3lreWulAUpch4JBjDMtlKosrBzkr0kwKgL9iCfjA8L3geoA==", "cpu": [ "arm64" ], @@ -3479,9 +3479,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.1.tgz", - "integrity": "sha512-PromGeV50sq+YfaisG8W3fd+Cl6mnOOiNv2qKKqKCpiiEke2KiKVyDqG/Mb9GWKbYMHj5a01fq/qlUR28PFhCQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.2.tgz", + "integrity": "sha512-rhjvoPBhBwVnJRq/+hi2Q3EMiVF538/o9dBuj9TVLclo9DuONqt5xfWSaE6MYiFKpo/lFPJ/iSI72rYWw5Hc7w==", "cpu": [ "ppc64" ], @@ -3493,9 +3493,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.1.tgz", - "integrity": "sha512-/1BmHYh+iz0cNCP0oHCuF8CSiNj0JOGf0jRlSo3L/FAyZyG2rGBuKpkZVH9YF+x58r1jgWxvm1aRg3DHrLDt6A==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.2.tgz", + "integrity": "sha512-EAz6vjPwHHs2qOCnpQkw4xs14XJq84I81sDRGPEjKPFVPBw7fwvtwhVjcZR6SLydCv8zNK8YGFblKWd/vRmP8g==", "cpu": [ "riscv64" ], @@ -3507,9 +3507,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.1.tgz", - "integrity": "sha512-0cYP5rGkQWRZKy9/HtsWVStLXzCF3cCBTRI+qRL8Z+wkYlqN7zrSYm6FuY5Kd5ysS5aH0q5lVgb/WbG4jqXN1Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.2.tgz", + "integrity": "sha512-IJSUX1xb8k/zN9j2I7B5Re6B0NNJDJ1+soezjNojhT8DEVeDNptq2jgycCOpRhyGj0+xBn7Cq+PK7Q+nd2hxLA==", "cpu": [ "s390x" ], @@ -3521,9 +3521,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.1.tgz", - "integrity": "sha512-XUXeI9eM8rMP8aGvii/aOOiMvTs7xlCosq9xCjcqI9+5hBxtjDpD+7Abm1ZhVIFE1J2h2VIg0t2DX/gjespC2Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.2.tgz", + "integrity": "sha512-OgaToJ8jSxTpgGkZSkwKE+JQGihdcaqnyHEFOSAU45utQ+yLruE1dkonB2SDI8t375wOKgNn8pQvaWY9kPzxDQ==", "cpu": [ "x64" ], @@ -3535,9 +3535,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.1.tgz", - "integrity": "sha512-V7cBw/cKXMfEVhpSvVZhC+iGifD6U1zJ4tbibjjN+Xi3blSXaj/rJynAkCFFQfoG6VZrAiP7uGVzL440Q6Me2Q==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.2.tgz", + "integrity": "sha512-5V3mPpWkB066XZZBgSd1lwozBk7tmOkKtquyCJ6T4LN3mzKENXyBwWNQn8d0Ci81hvlBw5RoFgleVpL6aScLYg==", "cpu": [ "x64" ], @@ -3549,9 +3549,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.1.tgz", - "integrity": "sha512-88brja2vldW/76jWATlBqHEoGjJLRnP0WOEKAUbMcXaAZnemNhlAHSyj4jIwMoP2T750LE9lblvD4e2jXleZsA==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.2.tgz", + "integrity": "sha512-ayVstadfLeeXI9zUPiKRVT8qF55hm7hKa+0N1V6Vj+OTNFfKSoUxyZvzVvgtBxqSb5URQ8sK6fhwxr9/MLmxdA==", "cpu": [ "arm64" ], @@ -3563,9 +3563,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.1.tgz", - "integrity": "sha512-LdxxcqRVSXi6k6JUrTah1rHuaupoeuiv38du8Mt4r4IPer3kwlTo+RuvfE8KzZ/tL6BhaPlzJ3835i6CxrFIRQ==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.2.tgz", + "integrity": "sha512-Mda7iG4fOLHNsPqjWSjANvNZYoW034yxgrndof0DwCy0D3FvTjeNo+HGE6oGWgvcLZNLlcp0hLEFcRs+UGsMLg==", "cpu": [ "ia32" ], @@ -3577,9 +3577,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.1.tgz", - "integrity": "sha512-2bIrL28PcK3YCqD9anGxDxamxdiJAxA+l7fWIwM5o8UqNy1t3d1NdAweO2XhA0KTDJ5aH1FsuiT5+7VhtHliXg==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.2.tgz", + "integrity": "sha512-DPi0ubYhSow/00YqmG1jWm3qt1F8aXziHc/UNy8bo9cpCacqhuWu+iSq/fp2SyEQK7iYTZ60fBU9cat3MXTjIQ==", "cpu": [ "x64" ], @@ -18563,9 +18563,9 @@ } }, "node_modules/rollup": { - "version": "4.19.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.1.tgz", - "integrity": "sha512-K5vziVlg7hTpYfFBI+91zHBEMo6jafYXpkMlqZjg7/zhIG9iHqazBf4xz9AVdjS9BruRn280ROqLI7G3OFRIlw==", + "version": "4.19.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.2.tgz", + "integrity": "sha512-6/jgnN1svF9PjNYJ4ya3l+cqutg49vOZ4rVgsDKxdl+5gpGPnByFXWGyfH9YGx9i3nfBwSu1Iyu6vGwFFA0BdQ==", "dev": true, "license": "MIT", "dependencies": { @@ -18579,22 +18579,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.19.1", - "@rollup/rollup-android-arm64": "4.19.1", - "@rollup/rollup-darwin-arm64": "4.19.1", - "@rollup/rollup-darwin-x64": "4.19.1", - "@rollup/rollup-linux-arm-gnueabihf": "4.19.1", - "@rollup/rollup-linux-arm-musleabihf": "4.19.1", - "@rollup/rollup-linux-arm64-gnu": "4.19.1", - "@rollup/rollup-linux-arm64-musl": "4.19.1", - "@rollup/rollup-linux-powerpc64le-gnu": "4.19.1", - "@rollup/rollup-linux-riscv64-gnu": "4.19.1", - "@rollup/rollup-linux-s390x-gnu": "4.19.1", - "@rollup/rollup-linux-x64-gnu": "4.19.1", - "@rollup/rollup-linux-x64-musl": "4.19.1", - "@rollup/rollup-win32-arm64-msvc": "4.19.1", - "@rollup/rollup-win32-ia32-msvc": "4.19.1", - "@rollup/rollup-win32-x64-msvc": "4.19.1", + "@rollup/rollup-android-arm-eabi": "4.19.2", + "@rollup/rollup-android-arm64": "4.19.2", + "@rollup/rollup-darwin-arm64": "4.19.2", + "@rollup/rollup-darwin-x64": "4.19.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.19.2", + "@rollup/rollup-linux-arm-musleabihf": "4.19.2", + "@rollup/rollup-linux-arm64-gnu": "4.19.2", + "@rollup/rollup-linux-arm64-musl": "4.19.2", + "@rollup/rollup-linux-powerpc64le-gnu": "4.19.2", + "@rollup/rollup-linux-riscv64-gnu": "4.19.2", + "@rollup/rollup-linux-s390x-gnu": "4.19.2", + "@rollup/rollup-linux-x64-gnu": "4.19.2", + "@rollup/rollup-linux-x64-musl": "4.19.2", + "@rollup/rollup-win32-arm64-msvc": "4.19.2", + "@rollup/rollup-win32-ia32-msvc": "4.19.2", + "@rollup/rollup-win32-x64-msvc": "4.19.2", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index deb215ed..8e69fd96 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.1", + "rollup": "4.19.2", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2", From 3a308af8764a4bf0b3240b6b0b850920278132e2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 15:53:14 +0000 Subject: [PATCH 39/41] chore(action): update actions/upload-artifact action to v4.3.5 --- .github/workflows/ossf-scorecard.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index 63dddb95..559d1361 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -59,7 +59,7 @@ jobs: # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF # format to the repository Actions tab. - name: "Upload artifact" - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@89ef406dd8d7e03cfd12d9e0a4a378f454709029 # v4.3.5 with: name: SARIF file path: results.sarif From e50006ae92b29ca30bcf66ea4b8ee1a1cf95d6aa Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Fri, 2 Aug 2024 22:37:43 -0500 Subject: [PATCH 40/41] feat(prompt): stopped filtering vcs-host choices by project visibility will likely provide another way of filtering in the future, but this approach didnt support all visibility options and was not appropriately flexible for expansion BREAKING CHANGE: vcs-host choices are no longer filtered by project visibility --- src/prompts/conditionals.js | 12 ------------ src/prompts/conditionals.test.js | 31 ------------------------------- src/vcs/host/prompt.js | 3 +-- src/vcs/host/prompt.test.js | 8 ++------ src/vcs/host/schema.js | 5 +---- src/vcs/host/schema.test.js | 14 -------------- 6 files changed, 4 insertions(+), 69 deletions(-) diff --git a/src/prompts/conditionals.js b/src/prompts/conditionals.js index 72e6fa02..359a1d2f 100644 --- a/src/prompts/conditionals.js +++ b/src/prompts/conditionals.js @@ -1,5 +1,3 @@ -import {Separator} from '@form8ion/overridable-prompts'; - import {questionNames} from './question-names.js'; export function unlicensedConfirmationShouldBePresented(answers) { @@ -13,13 +11,3 @@ export function licenseChoicesShouldBePresented(answers) { export function copyrightInformationShouldBeRequested(answers) { return !!answers[questionNames.LICENSE]; } - -export function filterChoicesByVisibility(choices, visibility) { - return [ - ...Object.entries(choices) - .filter(([, choice]) => choice[visibility.toLowerCase()]) - .reduce((acc, [name]) => ([...acc, name]), []), - new Separator(), - 'Other' - ]; -} diff --git a/src/prompts/conditionals.test.js b/src/prompts/conditionals.test.js index b95b04c5..9a40395e 100644 --- a/src/prompts/conditionals.test.js +++ b/src/prompts/conditionals.test.js @@ -1,12 +1,9 @@ -import {Separator} from '@form8ion/overridable-prompts'; - import {describe, expect, it} from 'vitest'; import any from '@travi/any'; import {questionNames} from './question-names.js'; import { copyrightInformationShouldBeRequested, - filterChoicesByVisibility, licenseChoicesShouldBePresented, unlicensedConfirmationShouldBePresented } from './conditionals.js'; @@ -51,32 +48,4 @@ describe('prompt conditionals', () => { expect(copyrightInformationShouldBeRequested({[questionNames.LICENSE]: undefined})).toBe(false); }); }); - - describe('choices by project visibility', () => { - const publicChoices = any.objectWithKeys( - any.listOf(any.word), - {factory: () => ({...any.simpleObject(), public: true})} - ); - const privateChoices = any.objectWithKeys( - any.listOf(any.word), - {factory: () => ({...any.simpleObject(), private: true})} - ); - const choices = {...publicChoices, ...privateChoices}; - - it('should list the public hosts for `Public` projects', () => { - expect(filterChoicesByVisibility(choices, 'Public')).toEqual([ - ...Object.keys(publicChoices), - new Separator(), - 'Other' - ]); - }); - - it('should list the private hosts for `Private` projects', () => { - expect(filterChoicesByVisibility(choices, 'Private')).toEqual([ - ...Object.keys(privateChoices), - new Separator(), - 'Other' - ]); - }); - }); }); diff --git a/src/vcs/host/prompt.js b/src/vcs/host/prompt.js index 1f7cbebd..ae9c5495 100644 --- a/src/vcs/host/prompt.js +++ b/src/vcs/host/prompt.js @@ -1,14 +1,13 @@ import {prompt} from '@form8ion/overridable-prompts'; import {questionNames} from '../../prompts/question-names.js'; -import {filterChoicesByVisibility} from '../../prompts/conditionals.js'; export default async function (hosts, visibility, decisions) { const answers = await prompt([{ name: questionNames.REPO_HOST, type: 'list', message: 'Where will the repository be hosted?', - choices: filterChoicesByVisibility(hosts, visibility) + choices: hosts }], decisions); const host = hosts[answers[questionNames.REPO_HOST]]; diff --git a/src/vcs/host/prompt.test.js b/src/vcs/host/prompt.test.js index d6f1139b..3c7eed67 100644 --- a/src/vcs/host/prompt.test.js +++ b/src/vcs/host/prompt.test.js @@ -4,7 +4,6 @@ import {afterEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import * as conditionals from '../../prompts/conditionals.js'; import {questionNames} from '../../prompts/question-names.js'; import promptForVcsHostDetails from './prompt.js'; @@ -12,7 +11,6 @@ vi.mock('@form8ion/overridable-prompts'); vi.mock('../../prompts/conditionals'); describe('vcs host details prompt', () => { - const filteredHostChoices = any.listOf(any.word); const answers = any.simpleObject(); const decisions = any.simpleObject(); @@ -25,12 +23,11 @@ describe('vcs host details prompt', () => { const hostNames = [...any.listOf(any.string), host]; const hosts = any.objectWithKeys(hostNames, {factory: () => ({})}); const answersWithHostChoice = {...answers, [questionNames.REPO_HOST]: host}; - when(conditionals.filterChoicesByVisibility).calledWith(hosts, null).mockReturnValue(filteredHostChoices); when(prompts.prompt).calledWith([{ name: questionNames.REPO_HOST, type: 'list', message: 'Where will the repository be hosted?', - choices: filteredHostChoices + choices: hosts }], decisions).mockResolvedValue(answersWithHostChoice); expect(await promptForVcsHostDetails(hosts, null, decisions)).toEqual(answersWithHostChoice); @@ -40,12 +37,11 @@ describe('vcs host details prompt', () => { const hosts = {}; const visibility = any.word(); const answersWithHostChoice = {...answers, [questionNames.REPO_HOST]: 'Other'}; - when(conditionals.filterChoicesByVisibility).calledWith(hosts, visibility).mockReturnValue(filteredHostChoices); when(prompts.prompt).calledWith([{ name: questionNames.REPO_HOST, type: 'list', message: 'Where will the repository be hosted?', - choices: filteredHostChoices + choices: hosts }], decisions).mockResolvedValue(answersWithHostChoice); expect(await promptForVcsHostDetails(hosts, visibility, decisions)).toEqual(answersWithHostChoice); diff --git a/src/vcs/host/schema.js b/src/vcs/host/schema.js index 966282b9..557f63fe 100644 --- a/src/vcs/host/schema.js +++ b/src/vcs/host/schema.js @@ -1,7 +1,4 @@ import joi from 'joi'; import {optionsSchemas} from '@form8ion/core'; -export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin.keys({ - public: joi.bool(), - private: joi.bool() -})); +export default joi.object().pattern(/^/, optionsSchemas.form8ionPlugin); diff --git a/src/vcs/host/schema.test.js b/src/vcs/host/schema.test.js index 098b2583..fb83e5be 100644 --- a/src/vcs/host/schema.test.js +++ b/src/vcs/host/schema.test.js @@ -43,18 +43,4 @@ describe('vcs-host plugins schema', () => { expect(() => validateOptions(vcsHostSchema, {[key]: {scaffold: () => undefined}})) .toThrowError(`"${key}.scaffold" must have an arity of 1`); }); - - it('should require the `public` property to be a boolean', () => { - expect(() => validateOptions( - vcsHostSchema, - {[key]: {scaffold: foo => foo, prompt: bar => bar, public: any.word()}} - )).toThrowError(`"${key}.public" must be a boolean`); - }); - - it('should require the `private` property to be a boolean', () => { - expect(() => validateOptions( - vcsHostSchema, - {[key]: {scaffold: foo => foo, prompt: bar => bar, private: any.word()}} - )).toThrowError(`"${key}.private" must be a boolean`); - }); }); From c2b0d0a3defd7bafc88eaa14151ea033dc6131db Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 3 Aug 2024 07:58:07 +0000 Subject: [PATCH 41/41] chore(deps): update dependency rollup to v4.20.0 --- package-lock.json | 136 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a248ebf..b6504571 100644 --- a/package-lock.json +++ b/package-lock.json @@ -55,7 +55,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.2", + "rollup": "4.20.0", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2", @@ -3367,9 +3367,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.19.2.tgz", - "integrity": "sha512-OHflWINKtoCFSpm/WmuQaWW4jeX+3Qt3XQDepkkiFTsoxFc5BpF3Z5aDxFZgBqRjO6ATP5+b1iilp4kGIZVWlA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.20.0.tgz", + "integrity": "sha512-TSpWzflCc4VGAUJZlPpgAJE1+V60MePDQnBd7PPkpuEmOy8i87aL6tinFGKBFKuEDikYpig72QzdT3QPYIi+oA==", "cpu": [ "arm" ], @@ -3381,9 +3381,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.19.2.tgz", - "integrity": "sha512-k0OC/b14rNzMLDOE6QMBCjDRm3fQOHAL8Ldc9bxEWvMo4Ty9RY6rWmGetNTWhPo+/+FNd1lsQYRd0/1OSix36A==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.20.0.tgz", + "integrity": "sha512-u00Ro/nok7oGzVuh/FMYfNoGqxU5CPWz1mxV85S2w9LxHR8OoMQBuSk+3BKVIDYgkpeOET5yXkx90OYFc+ytpQ==", "cpu": [ "arm64" ], @@ -3395,9 +3395,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.19.2.tgz", - "integrity": "sha512-IIARRgWCNWMTeQH+kr/gFTHJccKzwEaI0YSvtqkEBPj7AshElFq89TyreKNFAGh5frLfDCbodnq+Ye3dqGKPBw==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.20.0.tgz", + "integrity": "sha512-uFVfvzvsdGtlSLuL0ZlvPJvl6ZmrH4CBwLGEFPe7hUmf7htGAN+aXo43R/V6LATyxlKVC/m6UsLb7jbG+LG39Q==", "cpu": [ "arm64" ], @@ -3409,9 +3409,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.19.2.tgz", - "integrity": "sha512-52udDMFDv54BTAdnw+KXNF45QCvcJOcYGl3vQkp4vARyrcdI/cXH8VXTEv/8QWfd6Fru8QQuw1b2uNersXOL0g==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.20.0.tgz", + "integrity": "sha512-xbrMDdlev53vNXexEa6l0LffojxhqDTBeL+VUxuuIXys4x6xyvbKq5XqTXBCEUA8ty8iEJblHvFaWRJTk/icAQ==", "cpu": [ "x64" ], @@ -3423,9 +3423,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.19.2.tgz", - "integrity": "sha512-r+SI2t8srMPYZeoa1w0o/AfoVt9akI1ihgazGYPQGRilVAkuzMGiTtexNZkrPkQsyFrvqq/ni8f3zOnHw4hUbA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.20.0.tgz", + "integrity": "sha512-jMYvxZwGmoHFBTbr12Xc6wOdc2xA5tF5F2q6t7Rcfab68TT0n+r7dgawD4qhPEvasDsVpQi+MgDzj2faOLsZjA==", "cpu": [ "arm" ], @@ -3437,9 +3437,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.19.2.tgz", - "integrity": "sha512-+tYiL4QVjtI3KliKBGtUU7yhw0GMcJJuB9mLTCEauHEsqfk49gtUBXGtGP3h1LW8MbaTY6rSFIQV1XOBps1gBA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.20.0.tgz", + "integrity": "sha512-1asSTl4HKuIHIB1GcdFHNNZhxAYEdqML/MW4QmPS4G0ivbEcBr1JKlFLKsIRqjSwOBkdItn3/ZDlyvZ/N6KPlw==", "cpu": [ "arm" ], @@ -3451,9 +3451,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.19.2.tgz", - "integrity": "sha512-OR5DcvZiYN75mXDNQQxlQPTv4D+uNCUsmSCSY2FolLf9W5I4DSoJyg7z9Ea3TjKfhPSGgMJiey1aWvlWuBzMtg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.20.0.tgz", + "integrity": "sha512-COBb8Bkx56KldOYJfMf6wKeYJrtJ9vEgBRAOkfw6Ens0tnmzPqvlpjZiLgkhg6cA3DGzCmLmmd319pmHvKWWlQ==", "cpu": [ "arm64" ], @@ -3465,9 +3465,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.19.2.tgz", - "integrity": "sha512-Hw3jSfWdUSauEYFBSFIte6I8m6jOj+3vifLg8EU3lreWulAUpch4JBjDMtlKosrBzkr0kwKgL9iCfjA8L3geoA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.20.0.tgz", + "integrity": "sha512-+it+mBSyMslVQa8wSPvBx53fYuZK/oLTu5RJoXogjk6x7Q7sz1GNRsXWjn6SwyJm8E/oMjNVwPhmNdIjwP135Q==", "cpu": [ "arm64" ], @@ -3479,9 +3479,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.19.2.tgz", - "integrity": "sha512-rhjvoPBhBwVnJRq/+hi2Q3EMiVF538/o9dBuj9TVLclo9DuONqt5xfWSaE6MYiFKpo/lFPJ/iSI72rYWw5Hc7w==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.20.0.tgz", + "integrity": "sha512-yAMvqhPfGKsAxHN8I4+jE0CpLWD8cv4z7CK7BMmhjDuz606Q2tFKkWRY8bHR9JQXYcoLfopo5TTqzxgPUjUMfw==", "cpu": [ "ppc64" ], @@ -3493,9 +3493,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.19.2.tgz", - "integrity": "sha512-EAz6vjPwHHs2qOCnpQkw4xs14XJq84I81sDRGPEjKPFVPBw7fwvtwhVjcZR6SLydCv8zNK8YGFblKWd/vRmP8g==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.20.0.tgz", + "integrity": "sha512-qmuxFpfmi/2SUkAw95TtNq/w/I7Gpjurx609OOOV7U4vhvUhBcftcmXwl3rqAek+ADBwSjIC4IVNLiszoj3dPA==", "cpu": [ "riscv64" ], @@ -3507,9 +3507,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.19.2.tgz", - "integrity": "sha512-IJSUX1xb8k/zN9j2I7B5Re6B0NNJDJ1+soezjNojhT8DEVeDNptq2jgycCOpRhyGj0+xBn7Cq+PK7Q+nd2hxLA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.20.0.tgz", + "integrity": "sha512-I0BtGXddHSHjV1mqTNkgUZLnS3WtsqebAXv11D5BZE/gfw5KoyXSAXVqyJximQXNvNzUo4GKlCK/dIwXlz+jlg==", "cpu": [ "s390x" ], @@ -3521,9 +3521,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.19.2.tgz", - "integrity": "sha512-OgaToJ8jSxTpgGkZSkwKE+JQGihdcaqnyHEFOSAU45utQ+yLruE1dkonB2SDI8t375wOKgNn8pQvaWY9kPzxDQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.20.0.tgz", + "integrity": "sha512-y+eoL2I3iphUg9tN9GB6ku1FA8kOfmF4oUEWhztDJ4KXJy1agk/9+pejOuZkNFhRwHAOxMsBPLbXPd6mJiCwew==", "cpu": [ "x64" ], @@ -3535,9 +3535,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.19.2.tgz", - "integrity": "sha512-5V3mPpWkB066XZZBgSd1lwozBk7tmOkKtquyCJ6T4LN3mzKENXyBwWNQn8d0Ci81hvlBw5RoFgleVpL6aScLYg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.20.0.tgz", + "integrity": "sha512-hM3nhW40kBNYUkZb/r9k2FKK+/MnKglX7UYd4ZUy5DJs8/sMsIbqWK2piZtVGE3kcXVNj3B2IrUYROJMMCikNg==", "cpu": [ "x64" ], @@ -3549,9 +3549,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.19.2.tgz", - "integrity": "sha512-ayVstadfLeeXI9zUPiKRVT8qF55hm7hKa+0N1V6Vj+OTNFfKSoUxyZvzVvgtBxqSb5URQ8sK6fhwxr9/MLmxdA==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.20.0.tgz", + "integrity": "sha512-psegMvP+Ik/Bg7QRJbv8w8PAytPA7Uo8fpFjXyCRHWm6Nt42L+JtoqH8eDQ5hRP7/XW2UiIriy1Z46jf0Oa1kA==", "cpu": [ "arm64" ], @@ -3563,9 +3563,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.19.2.tgz", - "integrity": "sha512-Mda7iG4fOLHNsPqjWSjANvNZYoW034yxgrndof0DwCy0D3FvTjeNo+HGE6oGWgvcLZNLlcp0hLEFcRs+UGsMLg==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.20.0.tgz", + "integrity": "sha512-GabekH3w4lgAJpVxkk7hUzUf2hICSQO0a/BLFA11/RMxQT92MabKAqyubzDZmMOC/hcJNlc+rrypzNzYl4Dx7A==", "cpu": [ "ia32" ], @@ -3577,9 +3577,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.19.2.tgz", - "integrity": "sha512-DPi0ubYhSow/00YqmG1jWm3qt1F8aXziHc/UNy8bo9cpCacqhuWu+iSq/fp2SyEQK7iYTZ60fBU9cat3MXTjIQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.20.0.tgz", + "integrity": "sha512-aJ1EJSuTdGnM6qbVC4B5DSmozPTqIag9fSzXRNNo+humQLG89XpPgdt16Ia56ORD7s+H8Pmyx44uczDQ0yDzpg==", "cpu": [ "x64" ], @@ -18563,9 +18563,9 @@ } }, "node_modules/rollup": { - "version": "4.19.2", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.19.2.tgz", - "integrity": "sha512-6/jgnN1svF9PjNYJ4ya3l+cqutg49vOZ4rVgsDKxdl+5gpGPnByFXWGyfH9YGx9i3nfBwSu1Iyu6vGwFFA0BdQ==", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.20.0.tgz", + "integrity": "sha512-6rbWBChcnSGzIlXeIdNIZTopKYad8ZG8ajhl78lGRLsI2rX8IkaotQhVas2Ma+GPxJav19wrSzvRvuiv0YKzWw==", "dev": true, "license": "MIT", "dependencies": { @@ -18579,22 +18579,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.19.2", - "@rollup/rollup-android-arm64": "4.19.2", - "@rollup/rollup-darwin-arm64": "4.19.2", - "@rollup/rollup-darwin-x64": "4.19.2", - "@rollup/rollup-linux-arm-gnueabihf": "4.19.2", - "@rollup/rollup-linux-arm-musleabihf": "4.19.2", - "@rollup/rollup-linux-arm64-gnu": "4.19.2", - "@rollup/rollup-linux-arm64-musl": "4.19.2", - "@rollup/rollup-linux-powerpc64le-gnu": "4.19.2", - "@rollup/rollup-linux-riscv64-gnu": "4.19.2", - "@rollup/rollup-linux-s390x-gnu": "4.19.2", - "@rollup/rollup-linux-x64-gnu": "4.19.2", - "@rollup/rollup-linux-x64-musl": "4.19.2", - "@rollup/rollup-win32-arm64-msvc": "4.19.2", - "@rollup/rollup-win32-ia32-msvc": "4.19.2", - "@rollup/rollup-win32-x64-msvc": "4.19.2", + "@rollup/rollup-android-arm-eabi": "4.20.0", + "@rollup/rollup-android-arm64": "4.20.0", + "@rollup/rollup-darwin-arm64": "4.20.0", + "@rollup/rollup-darwin-x64": "4.20.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.20.0", + "@rollup/rollup-linux-arm-musleabihf": "4.20.0", + "@rollup/rollup-linux-arm64-gnu": "4.20.0", + "@rollup/rollup-linux-arm64-musl": "4.20.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.20.0", + "@rollup/rollup-linux-riscv64-gnu": "4.20.0", + "@rollup/rollup-linux-s390x-gnu": "4.20.0", + "@rollup/rollup-linux-x64-gnu": "4.20.0", + "@rollup/rollup-linux-x64-musl": "4.20.0", + "@rollup/rollup-win32-arm64-msvc": "4.20.0", + "@rollup/rollup-win32-ia32-msvc": "4.20.0", + "@rollup/rollup-win32-x64-msvc": "4.20.0", "fsevents": "~2.3.2" } }, diff --git a/package.json b/package.json index 8e69fd96..403ac382 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "remark-toc": "9.0.0", "remark-usage": "11.0.1", "rimraf": "6.0.1", - "rollup": "4.19.2", + "rollup": "4.20.0", "rollup-plugin-auto-external": "2.0.0", "sinon": "18.0.0", "testdouble": "3.20.2",