From 56c367a529ef2e9cffb0ef1a93ce01e3daf49289 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:11:40 -0500 Subject: [PATCH 01/13] feat(lift): migrated the `predicate` public function to be named `test` to align with the form8ion convention BREAKING CHANGE: `predicate` is now `test` to better align with the form8ion convention --- .remarkrc.cjs | 2 +- README.md | 2 +- example.js | 2 +- package.json | 1 + src/lift/index.js | 2 +- test/integration/features/lift/badge.feature | 1 + test/integration/features/lift/branches.feature | 1 + .../features/step_definitions/common-steps.js | 9 ++++++--- .../features/step_definitions/config-steps.js | 8 ++++++++ 9 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 test/integration/features/step_definitions/config-steps.js diff --git a/.remarkrc.cjs b/.remarkrc.cjs index 9c7b2d17..4db1f61f 100644 --- a/.remarkrc.cjs +++ b/.remarkrc.cjs @@ -1,6 +1,6 @@ // https://github.com/remarkjs/remark/tree/master/packages/remark-stringify#options exports.settings = { - listItemIndent: 1, + listItemIndent: 'one', emphasis: '_', strong: '_', bullet: '*', diff --git a/README.md b/README.md index 4b5ba018..43083541 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ $ npm install @form8ion/renovate-scaffolder --save-prod #### Import ```javascript -import {lift, predicate as projectUsesRenovate, scaffold} from '@form8ion/renovate-scaffolder'; +import {lift, test as projectUsesRenovate, scaffold} from '@form8ion/renovate-scaffolder'; ``` #### Execute diff --git a/example.js b/example.js index 4debfe6d..a4b5e328 100644 --- a/example.js +++ b/example.js @@ -1,7 +1,7 @@ // #### Import // remark-usage-ignore-next import stubbedFs from 'mock-fs'; -import {lift, predicate as projectUsesRenovate, scaffold} from './lib/index.js'; +import {lift, test as projectUsesRenovate, scaffold} from './lib/index.js'; // remark-usage-ignore-next stubbedFs(); diff --git a/package.json b/package.json index a8f13e12..33d346e2 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "lint:engines": "ls-engines", "test:integration": "run-s 'test:integration:base -- --profile noWip'", "test:integration:base": "NODE_OPTIONS=--enable-source-maps DEBUG=any cucumber-js test/integration", + "pretest:integration:base": "npm run build", "test:integration:debug": "DEBUG=test run-s test:integration", "test:integration:wip": "run-s 'test:integration:base -- --profile wip'", "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'", diff --git a/src/lift/index.js b/src/lift/index.js index 30ba5363..14b72b82 100644 --- a/src/lift/index.js +++ b/src/lift/index.js @@ -1,2 +1,2 @@ export {default as lift} from './lift.js'; -export {default as predicate} from './predicate.js'; +export {default as test} from './predicate.js'; diff --git a/test/integration/features/lift/badge.feature b/test/integration/features/lift/badge.feature index 7e281362..700534f6 100644 --- a/test/integration/features/lift/badge.feature +++ b/test/integration/features/lift/badge.feature @@ -1,5 +1,6 @@ Feature: Badge Scenario: define a renovate badge + Given the project uses a renovate config with the modern filename When the scaffolder results are processed Then the renovate badge details are defined diff --git a/test/integration/features/lift/branches.feature b/test/integration/features/lift/branches.feature index ee3e579f..a4f81bf9 100644 --- a/test/integration/features/lift/branches.feature +++ b/test/integration/features/lift/branches.feature @@ -1,5 +1,6 @@ Feature: Branches Scenario: enable verification of renovate branches + Given the project uses a renovate config with the modern filename When the scaffolder results are processed Then renovate branches are suggested for verification diff --git a/test/integration/features/step_definitions/common-steps.js b/test/integration/features/step_definitions/common-steps.js index 371b3a92..f4890ef9 100644 --- a/test/integration/features/step_definitions/common-steps.js +++ b/test/integration/features/step_definitions/common-steps.js @@ -4,14 +4,15 @@ import {fileURLToPath} from 'node:url'; import stubbedFs from 'mock-fs'; import {After, Before, When} from '@cucumber/cucumber'; -let lift; +let lift, test; const __dirname = dirname(fileURLToPath(import.meta.url)); // eslint-disable-line no-underscore-dangle const stubbedNodeModules = stubbedFs.load(resolve(__dirname, '..', '..', '..', '..', 'node_modules')); Before(async function () { + this.projectRoot = process.cwd(); // eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved - ({lift} = await import('@form8ion/renovate-scaffolder')); + ({lift, test} = await import('@form8ion/renovate-scaffolder')); stubbedFs({ node_modules: stubbedNodeModules @@ -23,5 +24,7 @@ After(function () { }); When('the scaffolder results are processed', async function () { - this.result = await lift(); + if (await test({projectRoot: this.projectRoot})) { + this.result = await lift({projectRoot: this.projectRoot}); + } }); diff --git a/test/integration/features/step_definitions/config-steps.js b/test/integration/features/step_definitions/config-steps.js new file mode 100644 index 00000000..ea4c5e14 --- /dev/null +++ b/test/integration/features/step_definitions/config-steps.js @@ -0,0 +1,8 @@ +import {promises as fs} from 'node:fs'; + +import {Given} from '@cucumber/cucumber'; +import any from '@travi/any'; + +Given('the project uses a renovate config with the modern filename', async function () { + await fs.writeFile(`${this.projectRoot}/.renovaterc.json`, JSON.stringify(any.simpleObject())); +}); From 56272106c3d3892cb5ddbbf44e6fca544040e810 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:19:28 -0500 Subject: [PATCH 02/13] refactor(config): extracted the scaffolder to a directory to prepare for a lifter --- src/config/index.js | 1 + src/{scaffolder/config.js => config/scaffolder.js} | 0 src/{scaffolder/config.test.js => config/scaffolder.test.js} | 2 +- src/scaffolder/scaffolder.js | 2 +- src/scaffolder/scaffolder.test.js | 4 ++-- 5 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 src/config/index.js rename src/{scaffolder/config.js => config/scaffolder.js} (100%) rename src/{scaffolder/config.test.js => config/scaffolder.test.js} (93%) diff --git a/src/config/index.js b/src/config/index.js new file mode 100644 index 00000000..8a5a8f5a --- /dev/null +++ b/src/config/index.js @@ -0,0 +1 @@ +export {default as scaffold} from './scaffolder.js'; diff --git a/src/scaffolder/config.js b/src/config/scaffolder.js similarity index 100% rename from src/scaffolder/config.js rename to src/config/scaffolder.js diff --git a/src/scaffolder/config.test.js b/src/config/scaffolder.test.js similarity index 93% rename from src/scaffolder/config.test.js rename to src/config/scaffolder.test.js index 8aef334c..95f77d5c 100644 --- a/src/scaffolder/config.test.js +++ b/src/config/scaffolder.test.js @@ -4,7 +4,7 @@ import {write} from '@form8ion/config-file'; import {afterEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; -import scaffoldConfig from './config.js'; +import scaffoldConfig from './scaffolder.js'; vi.mock('@form8ion/config-file'); diff --git a/src/scaffolder/scaffolder.js b/src/scaffolder/scaffolder.js index 0cef8e62..84d1fa7d 100644 --- a/src/scaffolder/scaffolder.js +++ b/src/scaffolder/scaffolder.js @@ -2,7 +2,7 @@ import deepmerge from 'deepmerge'; import {info} from '@travi/cli-messages'; import {scaffold as scaffoldBadges} from '../badges/index.js'; -import scaffoldConfig from './config.js'; +import {scaffold as scaffoldConfig} from '../config/index.js'; export default async function ({projectRoot}) { info('Configuring Renovate'); diff --git a/src/scaffolder/scaffolder.test.js b/src/scaffolder/scaffolder.test.js index 5052f65d..06524059 100644 --- a/src/scaffolder/scaffolder.test.js +++ b/src/scaffolder/scaffolder.test.js @@ -4,13 +4,13 @@ import {afterEach, describe, expect, it, vi} from 'vitest'; import any from '@travi/any'; import {when} from 'jest-when'; -import scaffoldConfig from './config.js'; +import {scaffold as scaffoldConfig} from '../config/index.js'; import {scaffold as scaffoldBadges} from '../badges/index.js'; import scaffold from './scaffolder.js'; vi.mock('deepmerge'); vi.mock('../badges'); -vi.mock('./config'); +vi.mock('../config/index.js'); describe('scaffolder', () => { afterEach(() => { From 07602216750eee5740ca7714f7f017ac94c90f28 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:25:55 -0500 Subject: [PATCH 03/13] feat(node-versions): dropped support for node versions v16 and v19 BREAKING CHANGE: node versions v16 and v19 are no longer supported --- .github/workflows/node-ci.yml | 7 +++---- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 64eff87c..61271995 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -18,10 +18,9 @@ jobs: strategy: matrix: node: - - 16.14.0 - - 18.0.0 - - 18 - - 20 + - 18.17.0 + - 20.6.1 + - 21 steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup node diff --git a/package-lock.json b/package-lock.json index 14692b96..51b45e0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,7 +44,7 @@ "vitest": "2.0.4" }, "engines": { - "node": "^16.14 || >=18" + "node": "^18.17 || >=20.6.1" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 33d346e2..a07e7cc3 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "version": "0.0.0-semantically-released", "type": "module", "engines": { - "node": "^16.14 || >=18" + "node": "^18.17 || >=20.6.1" }, "author": "Matt Travi (https://matt.travi.org/)", "repository": "form8ion/renovate-scaffolder", From 92d9c8e2d7fe0eb967de6c5280c1c71b54bda4c1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 04:27:50 +0000 Subject: [PATCH 04/13] chore(deps): update dependency @cucumber/cucumber to v10 --- package-lock.json | 425 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 264 insertions(+), 163 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51b45e0d..96b4e60a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "deepmerge": "^4.3.1" }, "devDependencies": { - "@cucumber/cucumber": "9.6.0", + "@cucumber/cucumber": "10.8.0", "@form8ion/commitlint-config": "1.0.76", "@form8ion/eslint-config": "7.0.9", "@form8ion/eslint-config-cucumber": "1.4.1", @@ -848,26 +848,28 @@ } }, "node_modules/@cucumber/ci-environment": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/@cucumber/ci-environment/-/ci-environment-9.2.0.tgz", - "integrity": "sha512-jLzRtVwdtNt+uAmTwvXwW9iGYLEOJFpDSmnx/dgoMGKXUWRx1UHT86Q696CLdgXO8kyTwsgJY0c6n5SW9VitAA==", - "dev": true + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@cucumber/ci-environment/-/ci-environment-10.0.1.tgz", + "integrity": "sha512-/+ooDMPtKSmvcPMDYnMZt4LuoipfFfHaYspStI4shqw8FyKcfQAmekz6G+QKWjQQrvM+7Hkljwx58MEwPCwwzg==", + "dev": true, + "license": "MIT" }, "node_modules/@cucumber/cucumber": { - "version": "9.6.0", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber/-/cucumber-9.6.0.tgz", - "integrity": "sha512-bCw2uJdGHHLg4B3RoZpLzx0RXyXURmPe+swtdK1cGoA8rs+vv+/6osifcNwvFM2sv0nQ91+gDACSrXK7AHCylg==", + "version": "10.8.0", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber/-/cucumber-10.8.0.tgz", + "integrity": "sha512-o8SR6MRQVCKKw4tytWqCqOjfX4cASj9dqpdHKHMi09rZWBCNQHBwH1TO9wj7NKjOa6RfUOTcgvDlayTcjyCH4A==", "dev": true, + "license": "MIT", "dependencies": { - "@cucumber/ci-environment": "9.2.0", - "@cucumber/cucumber-expressions": "16.1.2", - "@cucumber/gherkin": "26.2.0", + "@cucumber/ci-environment": "10.0.1", + "@cucumber/cucumber-expressions": "17.1.0", + "@cucumber/gherkin": "28.0.0", "@cucumber/gherkin-streams": "5.0.1", - "@cucumber/gherkin-utils": "8.0.2", - "@cucumber/html-formatter": "20.4.0", + "@cucumber/gherkin-utils": "9.0.0", + "@cucumber/html-formatter": "21.3.1", "@cucumber/message-streams": "4.0.1", - "@cucumber/messages": "22.0.0", - "@cucumber/tag-expressions": "5.0.1", + "@cucumber/messages": "24.1.0", + "@cucumber/tag-expressions": "6.1.0", "assertion-error-formatter": "^3.0.0", "capital-case": "^1.0.4", "chalk": "^4.1.2", @@ -876,7 +878,7 @@ "debug": "^4.3.4", "error-stack-parser": "^2.1.4", "figures": "^3.2.0", - "glob": "^7.1.6", + "glob": "^10.3.10", "has-ansi": "^4.0.1", "indent-string": "^4.0.0", "is-installed-globally": "^0.4.0", @@ -888,14 +890,15 @@ "mkdirp": "^2.1.5", "mz": "^2.7.0", "progress": "^2.0.3", + "read-pkg-up": "^7.0.1", "resolve-pkg": "^2.0.0", "semver": "7.5.3", - "string-argv": "^0.3.1", + "string-argv": "0.3.1", "strip-ansi": "6.0.1", "supports-color": "^8.1.1", - "tmp": "^0.2.1", + "tmp": "0.2.3", + "type-fest": "^4.8.3", "util-arity": "^1.1.0", - "verror": "^1.10.0", "xmlbuilder": "^15.1.1", "yaml": "^2.2.2", "yup": "1.2.0" @@ -904,25 +907,200 @@ "cucumber-js": "bin/cucumber.js" }, "engines": { - "node": "14 || 16 || >=18" + "node": "18 || >=20" + }, + "funding": { + "url": "https://opencollective.com/cucumber" } }, "node_modules/@cucumber/cucumber-expressions": { - "version": "16.1.2", - "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-16.1.2.tgz", - "integrity": "sha512-CfHEbxJ5FqBwF6mJyLLz4B353gyHkoi6cCL4J0lfDZ+GorpcWw4n2OUAdxJmP7ZlREANWoTFlp4FhmkLKrCfUA==", + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/cucumber-expressions/-/cucumber-expressions-17.1.0.tgz", + "integrity": "sha512-PCv/ppsPynniKPWJr5v566daCVe+pbxQpHGrIu/Ev57cCH9Rv+X0F6lio4Id3Z64TaG7btCRLUGewIgLwmrwOA==", "dev": true, + "license": "MIT", "dependencies": { "regexp-match-indices": "1.0.2" } }, + "node_modules/@cucumber/cucumber/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/@cucumber/cucumber/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@cucumber/cucumber/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@cucumber/cucumber/node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/@cucumber/cucumber/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@cucumber/cucumber/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@cucumber/cucumber/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@cucumber/cucumber/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@cucumber/cucumber/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@cucumber/cucumber/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/@cucumber/cucumber/node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/@cucumber/cucumber/node_modules/type-fest": { + "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": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@cucumber/gherkin": { - "version": "26.2.0", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-26.2.0.tgz", - "integrity": "sha512-iRSiK8YAIHAmLrn/mUfpAx7OXZ7LyNlh1zT89RoziSVCbqSVDxJS6ckEzW8loxs+EEXl0dKPQOXiDmbHV+C/fA==", + "version": "28.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-28.0.0.tgz", + "integrity": "sha512-Ee6zJQq0OmIUPdW0mSnsCsrWA2PZAELNDPICD2pLfs0Oz7RAPgj80UsD2UCtqyAhw2qAR62aqlktKUlai5zl/A==", "dev": true, + "license": "MIT", "dependencies": { - "@cucumber/messages": ">=19.1.4 <=22" + "@cucumber/messages": ">=19.1.4 <=24" } }, "node_modules/@cucumber/gherkin-streams": { @@ -953,62 +1131,38 @@ } }, "node_modules/@cucumber/gherkin-utils": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin-utils/-/gherkin-utils-8.0.2.tgz", - "integrity": "sha512-aQlziN3r3cTwprEDbLEcFoMRQajb9DTOu2OZZp5xkuNz6bjSTowSY90lHUD2pWT7jhEEckZRIREnk7MAwC2d1A==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/@cucumber/gherkin-utils/-/gherkin-utils-9.0.0.tgz", + "integrity": "sha512-clk4q39uj7pztZuZtyI54V8lRsCUz0Y/p8XRjIeHh7ExeEztpWkp4ca9q1FjUOPfQQ8E7OgqFbqoQQXZ1Bx7fw==", "dev": true, + "license": "MIT", "dependencies": { - "@cucumber/gherkin": "^25.0.0", - "@cucumber/messages": "^19.1.4", - "@teppeis/multimaps": "2.0.0", - "commander": "9.4.1", + "@cucumber/gherkin": "^28.0.0", + "@cucumber/messages": "^24.0.0", + "@teppeis/multimaps": "3.0.0", + "commander": "12.0.0", "source-map-support": "^0.5.21" }, "bin": { "gherkin-utils": "bin/gherkin-utils" } }, - "node_modules/@cucumber/gherkin-utils/node_modules/@cucumber/gherkin": { - "version": "25.0.2", - "resolved": "https://registry.npmjs.org/@cucumber/gherkin/-/gherkin-25.0.2.tgz", - "integrity": "sha512-EdsrR33Y5GjuOoe2Kq5Y9DYwgNRtUD32H4y2hCrT6+AWo7ibUQu7H+oiWTgfVhwbkHsZmksxHSxXz/AwqqyCRQ==", - "dev": true, - "dependencies": { - "@cucumber/messages": "^19.1.4" - } - }, - "node_modules/@cucumber/gherkin-utils/node_modules/@cucumber/messages": { - "version": "19.1.4", - "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-19.1.4.tgz", - "integrity": "sha512-Pksl0pnDz2l1+L5Ug85NlG6LWrrklN9qkMxN5Mv+1XZ3T6u580dnE6mVaxjJRdcOq4tR17Pc0RqIDZMyVY1FlA==", - "dev": true, - "dependencies": { - "@types/uuid": "8.3.4", - "class-transformer": "0.5.1", - "reflect-metadata": "0.1.13", - "uuid": "9.0.0" - } - }, - "node_modules/@cucumber/gherkin-utils/node_modules/@types/uuid": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", - "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==", - "dev": true - }, "node_modules/@cucumber/gherkin-utils/node_modules/commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.0.0.tgz", + "integrity": "sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.20.0 || >=14" + "node": ">=18" } }, "node_modules/@cucumber/html-formatter": { - "version": "20.4.0", - "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-20.4.0.tgz", - "integrity": "sha512-TnLSXC5eJd8AXHENo69f5z+SixEVtQIf7Q2dZuTpT/Y8AOkilGpGl1MQR1Vp59JIw+fF3EQSUKdf+DAThCxUNg==", + "version": "21.3.1", + "resolved": "https://registry.npmjs.org/@cucumber/html-formatter/-/html-formatter-21.3.1.tgz", + "integrity": "sha512-M1zbre7e8MsecXheqNv62BKY5J06YJSv1LmsD7sJ3mu5t1jirLjj2It1HqPsX5CQAfg9n69xFRugPgLMSte9TA==", "dev": true, + "license": "MIT", "peerDependencies": { "@cucumber/messages": ">=18" } @@ -1023,22 +1177,24 @@ } }, "node_modules/@cucumber/messages": { - "version": "22.0.0", - "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-22.0.0.tgz", - "integrity": "sha512-EuaUtYte9ilkxcKmfqGF9pJsHRUU0jwie5ukuZ/1NPTuHS1LxHPsGEODK17RPRbZHOFhqybNzG2rHAwThxEymg==", + "version": "24.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/messages/-/messages-24.1.0.tgz", + "integrity": "sha512-hxVHiBurORcobhVk80I9+JkaKaNXkW6YwGOEFIh/2aO+apAN+5XJgUUWjng9NwqaQrW1sCFuawLB1AuzmBaNdQ==", "dev": true, + "license": "MIT", "dependencies": { - "@types/uuid": "9.0.1", + "@types/uuid": "9.0.8", "class-transformer": "0.5.1", - "reflect-metadata": "0.1.13", - "uuid": "9.0.0" + "reflect-metadata": "0.2.1", + "uuid": "9.0.1" } }, "node_modules/@cucumber/tag-expressions": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@cucumber/tag-expressions/-/tag-expressions-5.0.1.tgz", - "integrity": "sha512-N43uWud8ZXuVjza423T9ZCIJsaZhFekmakt7S9bvogTxqdVGbRobjR663s0+uW0Rz9e+Pa8I6jUuWtoBLQD2Mw==", - "dev": true + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@cucumber/tag-expressions/-/tag-expressions-6.1.0.tgz", + "integrity": "sha512-+3DwRumrCJG27AtzCIL37A/X+A/gSfxOPLg8pZaruh5SLumsTmpvilwroVWBT2fPzmno/tGXypeK5a7NHU4RzA==", + "dev": true, + "license": "MIT" }, "node_modules/@esbuild/aix-ppc64": { "version": "0.19.11", @@ -3790,12 +3946,13 @@ } }, "node_modules/@teppeis/multimaps": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@teppeis/multimaps/-/multimaps-2.0.0.tgz", - "integrity": "sha512-TL1adzq1HdxUf9WYduLcQ/DNGYiz71U31QRgbnr0Ef1cPyOUOsBojxHVWpFeOSUucB6Lrs0LxFRA14ntgtkc9w==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@teppeis/multimaps/-/multimaps-3.0.0.tgz", + "integrity": "sha512-ID7fosbc50TbT0MK0EG12O+gAP3W3Aa/Pz4DaTtQtEvlc9Odaqi0de+xuZ7Li2GtK4HzEX7IuRWS/JmZLksR3Q==", "dev": true, + "license": "MIT", "engines": { - "node": ">=10.17" + "node": ">=14" } }, "node_modules/@tootallnate/once": { @@ -4115,10 +4272,11 @@ "dev": true }, "node_modules/@types/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-rFT3ak0/2trgvp4yYZo5iKFEPsET7vKydKF+VRCxlQ9bpheehyAJH89dAkaLEq/j/RZXJIqcgsmPJKUP1Z28HA==", - "dev": true + "version": "9.0.8", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.8.tgz", + "integrity": "sha512-jg+97EGIcY9AGHJJRaaPVgetKDsrTgbRjQ5Msgjh/DQKEFl0DtyRr/VCOyD1T2R1MNeWPK/u7JoGhlDZnKBAfA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/yargs": { "version": "17.0.32", @@ -4773,15 +4931,6 @@ "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", "dev": true }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, "node_modules/assertion-error-formatter": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/assertion-error-formatter/-/assertion-error-formatter-3.0.0.tgz", @@ -6275,12 +6424,6 @@ "url": "https://opencollective.com/core-js" } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, "node_modules/cosmiconfig": { "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", @@ -7699,15 +7842,6 @@ "node": ">=0.6.0" } }, - "node_modules/extsprintf": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.4.1.tgz", - "integrity": "sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, "node_modules/fast_array_intersect": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast_array_intersect/-/fast_array_intersect-1.1.0.tgz", @@ -16202,10 +16336,12 @@ } }, "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", - "dev": true + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.2.1.tgz", + "integrity": "sha512-i5lLI6iw9AU3Uu4szRNPPEkomnkjRTaVt9hy/bn5g/oSzekBSMeLZblcjP74AW0vBabqERLLIrz+gR8QYR54Tw==", + "deprecated": "This version has a critical bug in fallback handling. Please upgrade to reflect-metadata@0.2.2 or newer.", + "dev": true, + "license": "Apache-2.0" }, "node_modules/regexp-match-indices": { "version": "1.0.2", @@ -19482,15 +19618,6 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/string-argv": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", - "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", - "dev": true, - "engines": { - "node": ">=0.6.19" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -19899,30 +20026,13 @@ } }, "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, + "license": "MIT", "engines": { - "node": ">=8.17.0" - } - }, - "node_modules/tmp/node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=14.14" } }, "node_modules/tmpl": { @@ -20912,10 +21022,15 @@ "dev": true }, "node_modules/uuid": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", - "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", "bin": { "uuid": "dist/bin/uuid" } @@ -21001,20 +21116,6 @@ "semver": "^7.0.0" } }, - "node_modules/verror": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.1.tgz", - "integrity": "sha512-veufcmxri4e3XSrT0xwfUR7kguIkaxBeosDg00yDWhk49wdwkSUrvvsm7nc75e1PUyvIeZj6nS8VQRYz2/S4Xg==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", diff --git a/package.json b/package.json index a07e7cc3..de64c784 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "deepmerge": "^4.3.1" }, "devDependencies": { - "@cucumber/cucumber": "9.6.0", + "@cucumber/cucumber": "10.8.0", "@form8ion/commitlint-config": "1.0.76", "@form8ion/eslint-config": "7.0.9", "@form8ion/eslint-config-cucumber": "1.4.1", From 2a851f15d895d35fcf1f3ea349681eeb0b9f0183 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:27:36 -0500 Subject: [PATCH 05/13] test(jetbrains): versioned the run-config file for unit tests --- .gitignore | 7 ++++++- .idea/runConfigurations/unit.xml | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .idea/runConfigurations/unit.xml diff --git a/.gitignore b/.gitignore index 6757de2a..c4246a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,9 @@ /coverage/ /.nyc_output/ -.eslintcache \ No newline at end of file +.eslintcache + +.idea +!.idea/ +.idea/* +!.idea/runConfigurations/ diff --git a/.idea/runConfigurations/unit.xml b/.idea/runConfigurations/unit.xml new file mode 100644 index 00000000..e354809e --- /dev/null +++ b/.idea/runConfigurations/unit.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file From e2b16424951ede58de167bd3cf80c4cef9550b3b Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:28:33 -0500 Subject: [PATCH 06/13] test(lint): added the fix script for eslint --- package-lock.json | 2 -- package.json | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 96b4e60a..b19add9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12049,7 +12049,6 @@ "resolved": "https://registry.npmjs.org/ls-engines/-/ls-engines-0.9.2.tgz", "integrity": "sha512-2Pq4KVA3lWMAYBhnfYUjxqbE95Jl1KOTzXPtORUhzun+MA7oCK+ojApTARUCf76F95r5O5UuMro+CWcfUEI9aQ==", "dev": true, - "license": "MIT", "dependencies": { "@npmcli/arborist": "^6.5.1", "array.prototype.some": "^1.1.6", @@ -15782,7 +15781,6 @@ "resolved": "https://registry.npmjs.org/publint/-/publint-0.2.9.tgz", "integrity": "sha512-nITKS1NSwD68PQlts0ntryhxrWObep6P0CCycwi1lgXI+K7uKyacMYRRCQi7hTae8imkI3FCi0FlgnwLxjM8yA==", "dev": true, - "license": "MIT", "dependencies": { "npm-packlist": "^5.1.3", "picocolors": "^1.0.1", diff --git a/package.json b/package.json index de64c784..4e33a48a 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,8 @@ "test:integration:wip": "run-s 'test:integration:base -- --profile wip'", "test:integration:wip:debug": "DEBUG=test run-s 'test:integration:wip'", "test:integration:focus": "run-s 'test:integration:base -- --profile focus'", - "lint:gherkin": "gherkin-lint --config=.gherkin-lintrc.json" + "lint:gherkin": "gherkin-lint --config=.gherkin-lintrc.json", + "lint:js:fix": "run-s 'lint:js -- --fix'" }, "files": [ "lib/" From aedf665bd24088adb5a41ca1af0b9a64e0f334f1 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:29:23 -0500 Subject: [PATCH 07/13] docs(badges): added logos to the npm and license badges --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 43083541..aefc79e1 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ $ npm test [npm-link]: https://www.npmjs.com/package/@form8ion/renovate-scaffolder -[npm-badge]: https://img.shields.io/npm/v/@form8ion/renovate-scaffolder.svg +[npm-badge]: https://img.shields.io/npm/v/@form8ion/renovate-scaffolder?logo=npm [runkit-link]: https://npm.runkit.com/@form8ion/renovate-scaffolder @@ -109,7 +109,7 @@ $ npm test [license-link]: LICENSE -[license-badge]: https://img.shields.io/github/license/form8ion/renovate-scaffolder.svg +[license-badge]: https://img.shields.io/github/license/form8ion/renovate-scaffolder.svg?logo=opensourceinitiative [commit-convention-link]: https://conventionalcommits.org From 0b14663a395acc9b0f5ba896f7be2150d4f116cc Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:29:59 -0500 Subject: [PATCH 08/13] docs(badges): switched from to the shields.io badge for ci --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aefc79e1..65f16ef9 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ $ npm test [github-actions-ci-link]: https://github.com/form8ion/renovate-scaffolder/actions?query=workflow%3A%22Node.js+CI%22+branch%3Amaster -[github-actions-ci-badge]: https://github.com/form8ion/renovate-scaffolder/workflows/Node.js%20CI/badge.svg +[github-actions-ci-badge]: https://img.shields.io/github/actions/workflow/status/form8ion/renovate-scaffolder/node-ci.yml.svg?branch=master&logo=github [coverage-link]: https://codecov.io/github/form8ion/renovate-scaffolder From 6c2767e6fb1139afc4072044b4067a4f2d43f9dd Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:30:22 -0500 Subject: [PATCH 09/13] chore: pinned the expected development npm version --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 4e33a48a..fd62dc35 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "access": "public", "provenance": true }, + "packageManager": "npm@10.8.2+sha512.c7f0088c520a46596b85c6f8f1da943400199748a0f7ea8cb8df75469668dc26f6fb3ba26df87e2884a5ebe91557292d0f3db7d0929cdb4f14910c3032ac81fb", "dependencies": { "@form8ion/config-file": "^1.0.1", "@form8ion/core": "^3.0.0", From bd6b9c1b15fb5e8df8b7fa7705fdb9ebeb403590 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 04:34:44 +0000 Subject: [PATCH 10/13] fix(deps): update dependency @form8ion/core to v4 --- package-lock.json | 82 +++++++++++++++++++++++++++++++++++++++++------ package.json | 2 +- 2 files changed, 74 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index b19add9a..35fa1775 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@form8ion/config-file": "^1.0.1", - "@form8ion/core": "^3.0.0", + "@form8ion/core": "^4.0.0", "@travi/cli-messages": "^1.0.2", "deepmerge": "^4.3.1" }, @@ -2237,18 +2237,20 @@ } }, "node_modules/@form8ion/core": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@form8ion/core/-/core-3.2.2.tgz", - "integrity": "sha512-XalScUoMDawmjoxfkdsRNjL9v5FUal9gCk8BFhDra5wmBDf59YVOB/RyMYp8/L1MSWbjyraJUvcW+slwc/TaEg==", + "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", "deepmerge": "^4.2.2", + "joi": "^17.13.3", "js-yaml": "^4.1.0", - "spdx-license-list": "6.8.0" + "spdx-license-list": "6.9.0" }, "engines": { - "node": "^16.14 || >=18" + "node": "^18.17 || >=20.6.1" } }, "node_modules/@form8ion/eslint-config": { @@ -2309,6 +2311,21 @@ "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-11.0.4.tgz", "integrity": "sha512-PnsP5d4q7289pS2T2EgGz147BFJ2Jpb4yrEdkpz2IhgEUzos1S7HTl7ezWh1yfYzYlj89KzLdCRkqsP6SIryeQ==" }, + "node_modules/@hapi/topo": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", + "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@hapi/topo/node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.14", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", @@ -3779,6 +3796,33 @@ "win32" ] }, + "node_modules/@sideway/address": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.5.tgz", + "integrity": "sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.0.0" + } + }, + "node_modules/@sideway/address/node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/formula": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.1.tgz", + "integrity": "sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==", + "license": "BSD-3-Clause" + }, + "node_modules/@sideway/pinpoint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", + "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", + "license": "BSD-3-Clause" + }, "node_modules/@sigstore/bundle": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@sigstore/bundle/-/bundle-1.1.0.tgz", @@ -11480,6 +11524,25 @@ "jiti": "bin/jiti.js" } }, + "node_modules/joi": { + "version": "17.13.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.13.3.tgz", + "integrity": "sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==", + "license": "BSD-3-Clause", + "dependencies": { + "@hapi/hoek": "^9.3.0", + "@hapi/topo": "^5.1.0", + "@sideway/address": "^4.1.5", + "@sideway/formula": "^3.0.1", + "@sideway/pinpoint": "^2.0.0" + } + }, + "node_modules/joi/node_modules/@hapi/hoek": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", + "integrity": "sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==", + "license": "BSD-3-Clause" + }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -19517,9 +19580,10 @@ "dev": true }, "node_modules/spdx-license-list": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.8.0.tgz", - "integrity": "sha512-5UdM7r9yJ1EvsPQZWfa41AZjLQngl9iMMysm9XBW7Lqhq7aF8cllfqjS+rFCHB8FFMGSM0yFWue2LUV9mR0QzQ==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/spdx-license-list/-/spdx-license-list-6.9.0.tgz", + "integrity": "sha512-L2jl5vc2j6jxWcNCvcVj/BW9A8yGIG02Dw+IUw0ZxDM70f7Ylf5Hq39appV1BI9yxyWQRpq2TQ1qaXvf+yjkqA==", + "license": "CC0-1.0", "engines": { "node": ">=8" }, diff --git a/package.json b/package.json index fd62dc35..0edd3c5f 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "packageManager": "npm@10.8.2+sha512.c7f0088c520a46596b85c6f8f1da943400199748a0f7ea8cb8df75469668dc26f6fb3ba26df87e2884a5ebe91557292d0f3db7d0929cdb4f14910c3032ac81fb", "dependencies": { "@form8ion/config-file": "^1.0.1", - "@form8ion/core": "^3.0.0", + "@form8ion/core": "^4.0.0", "@travi/cli-messages": "^1.0.2", "deepmerge": "^4.3.1" }, From c4e10c23224072eecae642c05f830ace6923516c Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Mon, 22 Jul 2024 23:51:39 -0500 Subject: [PATCH 11/13] feat(config): migrate legacy config name to modern config name --- README.md | 2 +- example.js | 2 +- src/config/index.js | 1 + src/config/lifter.js | 8 +++++ src/config/lifter.test.js | 35 +++++++++++++++++++ src/lift/lift.js | 5 ++- src/lift/lift.test.js | 9 +++-- test/integration/features/lift/config.feature | 6 ++++ .../features/step_definitions/config-steps.js | 13 ++++++- 9 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 src/config/lifter.js create mode 100644 src/config/lifter.test.js create mode 100644 test/integration/features/lift/config.feature diff --git a/README.md b/README.md index 65f16ef9..2bfa63a4 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ import {lift, test as projectUsesRenovate, scaffold} from '@form8ion/renovate-sc await scaffold({projectRoot: process.cwd()}); if (await projectUsesRenovate({projectRoot: process.cwd()})) { - await lift(); + await lift({projectRoot: process.cwd()}); } })(); ``` diff --git a/example.js b/example.js index a4b5e328..644cf66f 100644 --- a/example.js +++ b/example.js @@ -11,6 +11,6 @@ stubbedFs(); await scaffold({projectRoot: process.cwd()}); if (await projectUsesRenovate({projectRoot: process.cwd()})) { - await lift(); + await lift({projectRoot: process.cwd()}); } })(); diff --git a/src/config/index.js b/src/config/index.js index 8a5a8f5a..3ebb2e96 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -1 +1,2 @@ export {default as scaffold} from './scaffolder.js'; +export {default as lift} from './lifter.js'; diff --git a/src/config/lifter.js b/src/config/lifter.js new file mode 100644 index 00000000..a8693aba --- /dev/null +++ b/src/config/lifter.js @@ -0,0 +1,8 @@ +import {promises as fs} from 'node:fs'; +import {fileExists} from '@form8ion/core'; + +export default async function ({projectRoot}) { + if (await fileExists(`${projectRoot}/renovate.json`)) { + await fs.rename(`${projectRoot}/renovate.json`, `${projectRoot}/.renovaterc.json`); + } +} diff --git a/src/config/lifter.test.js b/src/config/lifter.test.js new file mode 100644 index 00000000..110b325d --- /dev/null +++ b/src/config/lifter.test.js @@ -0,0 +1,35 @@ +import {promises as fs} from 'node:fs'; +import {fileExists} from '@form8ion/core'; + +import any from '@travi/any'; +import {when} from 'jest-when'; +import {afterEach, describe, expect, it, vi} from 'vitest'; + +import liftConfig from './lifter.js'; + +vi.mock('node:fs'); +vi.mock('@form8ion/core'); + +describe('config lifter', () => { + const projectRoot = any.string(); + + afterEach(() => { + vi.clearAllMocks(); + }); + + it('should move legacy config to the modern filename', async () => { + when(fileExists).calledWith(`${projectRoot}/renovate.json`).mockResolvedValue(true); + + await liftConfig({projectRoot}); + + expect(fs.rename).toHaveBeenCalledWith(`${projectRoot}/renovate.json`, `${projectRoot}/.renovaterc.json`); + }); + + it('should not attempt to move legacy config if none exists', async () => { + when(fileExists).calledWith(`${projectRoot}/renovate.json`).mockResolvedValue(false); + + await liftConfig({projectRoot}); + + expect(fs.rename).not.toHaveBeenCalled(); + }); +}); diff --git a/src/lift/lift.js b/src/lift/lift.js index ab3d6dcb..3b66331c 100644 --- a/src/lift/lift.js +++ b/src/lift/lift.js @@ -1,8 +1,11 @@ import deepmerge from 'deepmerge'; import {scaffold as scaffoldBadges} from '../badges/index.js'; +import {lift as liftConfig} from '../config/index.js'; + +export default async function ({projectRoot}) { + await liftConfig({projectRoot}); -export default function () { return deepmerge.all([ scaffoldBadges(), {branchesToVerify: ['renovate/**']} diff --git a/src/lift/lift.test.js b/src/lift/lift.test.js index 63d6a079..a352eef1 100644 --- a/src/lift/lift.test.js +++ b/src/lift/lift.test.js @@ -5,24 +5,29 @@ import {when} from 'jest-when'; import any from '@travi/any'; import {scaffold as scaffoldBadges} from '../badges/index.js'; +import {lift as liftConfig} from '../config/index.js'; import lift from './lift.js'; vi.mock('deepmerge'); vi.mock('../badges'); +vi.mock('../config/index.js'); describe('lift', () => { afterEach(() => { vi.clearAllMocks(); }); - it('should define renovate branches as branches to verify', () => { + it('should define renovate branches as branches to verify', async () => { const badgesResults = any.simpleObject(); const mergedResults = any.simpleObject(); + const projectRoot = any.string(); scaffoldBadges.mockReturnValue(badgesResults); when(deepmerge.all) .calledWith([badgesResults, {branchesToVerify: ['renovate/**']}]) .mockReturnValue(mergedResults); - expect(lift()).toEqual(mergedResults); + expect(await lift({projectRoot})).toEqual(mergedResults); + + expect(liftConfig).toHaveBeenCalledWith({projectRoot}); }); }); diff --git a/test/integration/features/lift/config.feature b/test/integration/features/lift/config.feature new file mode 100644 index 00000000..694c4853 --- /dev/null +++ b/test/integration/features/lift/config.feature @@ -0,0 +1,6 @@ +Feature: Lift Config + + Scenario: legacy config + Given the project uses a renovate config with the legacy filename + When the scaffolder results are processed + Then the project uses config with the modern filename diff --git a/test/integration/features/step_definitions/config-steps.js b/test/integration/features/step_definitions/config-steps.js index ea4c5e14..53f0b4f7 100644 --- a/test/integration/features/step_definitions/config-steps.js +++ b/test/integration/features/step_definitions/config-steps.js @@ -1,8 +1,19 @@ import {promises as fs} from 'node:fs'; +import {fileExists} from '@form8ion/core'; -import {Given} from '@cucumber/cucumber'; +import assert from 'node:assert'; +import {Given, Then} from '@cucumber/cucumber'; import any from '@travi/any'; Given('the project uses a renovate config with the modern filename', async function () { await fs.writeFile(`${this.projectRoot}/.renovaterc.json`, JSON.stringify(any.simpleObject())); }); + +Given('the project uses a renovate config with the legacy filename', async function () { + await fs.writeFile(`${this.projectRoot}/renovate.json`, JSON.stringify(any.simpleObject())); +}); + +Then('the project uses config with the modern filename', async function () { + assert.equal(await fileExists(`${this.projectRoot}/renovate.json`), false); + assert.equal(await fileExists(`${this.projectRoot}/.renovaterc.json`), true); +}); From e8accd46c50de2213b68612edeef7812828728ef Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 14:43:15 +0000 Subject: [PATCH 12/13] 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 35fa1775..a2ef0800 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,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", @@ -9910,9 +9910,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 0edd3c5f..57a04366 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,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 58ca0a3c100c1d4ab83ab348aca10873f6950050 Mon Sep 17 00:00:00 2001 From: Matt Travi Date: Fri, 26 Jul 2024 11:12:12 -0400 Subject: [PATCH 13/13] test(plugin): ensured the plugin produces an api that is compatible with form8ion expectations --- test/integration/features/form8ion.feature | 5 +++++ .../features/step_definitions/form8ion-steps.js | 14 ++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/integration/features/form8ion.feature create mode 100644 test/integration/features/step_definitions/form8ion-steps.js diff --git a/test/integration/features/form8ion.feature b/test/integration/features/form8ion.feature new file mode 100644 index 00000000..c90dc4d0 --- /dev/null +++ b/test/integration/features/form8ion.feature @@ -0,0 +1,5 @@ +Feature: renovate-scaffolder as form8ion plugin + + Scenario: plugin conventions + When the renovate plugin is compared to form8ion plugin conventions + Then the public interface is compatible with the plugin schema diff --git a/test/integration/features/step_definitions/form8ion-steps.js b/test/integration/features/step_definitions/form8ion-steps.js new file mode 100644 index 00000000..ff02fbff --- /dev/null +++ b/test/integration/features/step_definitions/form8ion-steps.js @@ -0,0 +1,14 @@ +import {validateOptions, optionsSchemas} from '@form8ion/core'; + +import {Then, When} from '@cucumber/cucumber'; + +// eslint-disable-next-line import/no-extraneous-dependencies,import/no-unresolved +import * as plugin from '@form8ion/renovate-scaffolder'; + +When('the renovate plugin is compared to form8ion plugin conventions', async function () { + return undefined; +}); + +Then('the public interface is compatible with the plugin schema', async function () { + validateOptions(optionsSchemas.form8ionPlugin, plugin); +});