From 7b07db1c860706895b1dfe2578e21bfada9468ec Mon Sep 17 00:00:00 2001 From: Peter Kiss Date: Thu, 7 Sep 2023 17:04:01 +0200 Subject: [PATCH 01/28] Adapt Sensei release.mjs --- package.json | 5 +- scripts/includes/chalk-lite.sh | 116 +++++++++ scripts/includes/proceed_p.sh | 37 +++ scripts/release.mjs | 360 ++++++++++++++++++++++++++++ scripts/replace-next-version-tag.sh | 97 ++++++++ 5 files changed, 614 insertions(+), 1 deletion(-) create mode 100644 scripts/includes/chalk-lite.sh create mode 100755 scripts/includes/proceed_p.sh create mode 100644 scripts/release.mjs create mode 100755 scripts/replace-next-version-tag.sh diff --git a/package.json b/package.json index f8ce8c5c5..655e9db2c 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,11 @@ "devDependencies": { "@wordpress/jest-preset-default": "11.1.0", "@wordpress/scripts": "26.1.0", + "dotenv": "^16.3.1", "file-loader": "6.2.0", "grunt": "^1.5.3", "husky": "7.0.4", + "inquirer": "^9.2.10", "lint-staged": "12.3.4" }, "scripts": { @@ -48,7 +50,8 @@ "test": "npm run test-php", "test-php": "./vendor/bin/phpunit", "i18n:build": "npm run i18n:php", - "i18n:php": "wp i18n make-pot --exclude=lib,build,vendor,node_modules --skip-js --headers='{\"Last-Translator\":null,\"Language-Team\":null,\"Report-Msgid-Bugs-To\":\"https://wordpress.org/support/plugin/wp-job-manager/\"}' . languages/wp-job-manager.pot" + "i18n:php": "wp i18n make-pot --exclude=lib,build,vendor,node_modules --skip-js --headers='{\"Last-Translator\":null,\"Language-Team\":null,\"Report-Msgid-Bugs-To\":\"https://wordpress.org/support/plugin/wp-job-manager/\"}' . languages/wp-job-manager.pot", + "release": "node scripts/release.mjs wp-job-manager" }, "lint-staged": { "*.php": [ diff --git a/scripts/includes/chalk-lite.sh b/scripts/includes/chalk-lite.sh new file mode 100644 index 000000000..7398b367f --- /dev/null +++ b/scripts/includes/chalk-lite.sh @@ -0,0 +1,116 @@ +#!/bin/bash + +# Test if color is supported. +function color_supported { + [[ -n "$NO_COLOR" ]] && return 1 + [[ -n "$FORCE_COLOR" ]] && return 0 + [[ -t 1 ]] +} + +# Print possibly-colored text to standard output. +# +# The first parameter is the ANSI SGR parameter string, i.e. the part that +# goes in between the `\e[` and the `m`. +# +# If passed additional parameters, those are printed. Otherwise, lines are read +# from standard input and printed. Examples: +# +# chalk 31 'This prints red text' +# +# chalk 31 <&2 +function chalk { + local CC="$1" LINE FMT + shift + if color_supported; then + FMT="\e[${CC}m%s\e[0m\n" + else + FMT="%s\n" + fi + if [[ $# -gt 0 ]]; then + printf "$FMT" "$*" + else + while IFS= read -r LINE; do + printf "$FMT" "$LINE" + done + fi +} + +# All the rest of these functions are just wrappers around `chalk` that +# supply a particular first argument. `error` and `warn` also output to STDERR +# by default. +# +# info "Here's some information" +# +# error <<-EOM +# Something went wrong! +# EOM + + +function debug { + chalk '1;30' "$@" +} + +function success { + if [[ $(tput colors 2>/dev/null) -gt 8 ]]; then + chalk '1;38;5;41' "$@" + else + chalk '1;32' "$@" + fi +} + +function info { + chalk '1;37' "$@" +} + +function warn { + chalk '1;33' "$@" >&2 +} + +function error { + chalk '1;31' "$@" >&2 +} + +function die { + error "$@" + exit 1 +} + +function prompt { + yellow "$@" +} + +function red { + chalk '31' "$@" +} + +function green { + chalk '32' "$@" +} + +function jetpackGreen { + if [[ $(tput colors 2>/dev/null) -gt 8 ]]; then + chalk '38;5;41' "$@" + else + chalk '32' "$@" + fi +} + +function yellow { + chalk '33' "$@" +} + +function blue { + chalk '34' "$@" +} + +function purple { + chalk '35' "$@" +} + +function cyan { + chalk '36' "$@" +} diff --git a/scripts/includes/proceed_p.sh b/scripts/includes/proceed_p.sh new file mode 100755 index 000000000..9576f1dfd --- /dev/null +++ b/scripts/includes/proceed_p.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +INTERACTIVE=true +if [[ ! -t 0 ]]; then + INTERACTIVE=false +fi + +. "$(dirname "$BASH_SOURCE[0]")/chalk-lite.sh" + +# Ask whether to proceed. +# +# Args: +# 1: The situation that requires prompting. +# 2: Optional text to replace "Proceed?" as the question. +# +# Returns success if "yes", failure if "no" or non-interactive. +function proceed_p { + if ! $INTERACTIVE; then + error "$1 Aborting" + return 42 + fi + local OK + + # Clear input before prompting + while read -r -t 0 OK; do read -r OK; done + + local PROMPT + [[ -n "$1" ]] && PROMPT="$1 " + PROMPT="${PROMPT}${2:-Proceed?} [y/N] " + if color_supported; then + PROMPT=$(FORCE_COLOR=1 prompt "$PROMPT") + fi + + read -n 1 -p "$PROMPT" OK + echo "" + [[ "$OK" == "y" || "$OK" == "Y" ]] +} diff --git a/scripts/release.mjs b/scripts/release.mjs new file mode 100644 index 000000000..7a373354a --- /dev/null +++ b/scripts/release.mjs @@ -0,0 +1,360 @@ +/** + * External dependencies + */ +import { config } from 'dotenv'; +import fs from 'fs'; +import process from 'process'; +import inquirer from 'inquirer'; +import { execSync } from 'child_process'; + +const PLUGINS = { + 'wp-job-manager': { + file: 'wp-job-manager.php', + constant: 'JOB_MANAGER_VERSION', + }, +}; + +/* eslint-disable no-console */ + +// Processes the .env variables. +config(); + +// // Assert git status if not disabled by env variable. +// if ( process.env.SENSEI_RELEASE_SKIP_REPOSITORY_CHECK !== 'true' ) { +// assertGitStatus(); +// } + +// Get plugin information. +const pluginSlug = getPluginSlug(); +const pluginFileName = PLUGINS[ pluginSlug ].file; +const pluginFileContents = readFileContents( pluginFileName ); +const pluginVersion = pluginFileContents.match( /Version: (.*)/ )[ 1 ]; +const pluginName = pluginFileContents.match( /Plugin Name: (.*)/ )[ 1 ]; + +const version = process.argv[ 3 ]; + +// Confirm versions through CLI. +if ( + ! ( await askForConfirmationOnVersionsInformation( + version, + pluginFileContents, + ) ) +) { + console.log( 'Aborted!' ); + process.exit( 0 ); +} + +// Create release branch. +const { originalBranchName, releaseBranchName } = createReleaseBranch( + pluginSlug, + version, +); +try { + // Add changes to release branch. + setNewPluginVersion( + pluginFileName, + pluginFileContents, + version, + ); + replaceNextVersionPlaceholder( version ); + // TODO Update the readme.txt and commit (Sensei LMS only). + updatePackageJsonFiles( version ); + generatePotFiles(); + const changelog = generateChangelog(); + + // Create PR + pushBranch( releaseBranchName ); + createPR( version, changelog ); + +} catch ( error ) { + revertOnError( originalBranchName, releaseBranchName ); + console.log( `\n\nORIGINAL ERROR: '${ error.name }'` ); + console.log( error.message ); +} + +/* + * HELPER FUNCTIONS FROM HERE. + */ + +/** + * Check that we are in the default branch and there are no uncommitted changes. + * If check is not successful an error will be thrown finishing the execution. + */ +function assertGitStatus() { + const defaultBranchName = execSync( + 'basename $(git symbolic-ref --short refs/remotes/origin/HEAD)', + ) + .toString() + .trim(); + const currentBranchName = execSync( 'git branch --show-current' ) + .toString() + .trim(); + if ( currentBranchName !== defaultBranchName ) { + throw new Error( + `Release script must only be run while on '${ defaultBranchName }' branch. You are on '${ currentBranchName }'.`, + ); + } + const gitStatus = execSync( 'git status -suno\n' ).toString().trim(); + if ( gitStatus !== '' ) { + throw new Error( + `Uncommitted changes detected in your repository! Please ensure you are in a clean status before releasing.`, + ); + } +} + +/** + * Get plugin slug from command arguments. + * Throws an error if invalid. + * + * @return {string} The plugin slug. + */ +function getPluginSlug() { + const slug = process.argv[ 2 ]; + if ( ! ( slug in PLUGINS ) ) { + throw new Error( + 'Please provide a valid plugin slug as the first parameter: ' + + Object.keys( PLUGINS ).join( ', ' ), + ); + } + return slug; +} + +/** + * Return file contents given the filepath. + * This method will throw an error if the file does not exist. + * + * @param {string} filepath The file path to be read. + * @return {string} The file contents. + */ +function readFileContents( filepath ) { + let contents = false; + try { + contents = fs.readFileSync( filepath, 'utf8' ); + } catch ( err ) { + throw new Error( `File (${ filepath }) could not be read.` ); + } + + return contents; +} + +/** + * Ask for confirmation on new version and dependency versions through the CLI. + * + * @param {string} newVersion The new version. + * @param {string} fileContents The current contents of the main plugin file. + * @return {boolean} Whether the confirmation was accepted or not. + */ +async function askForConfirmationOnVersionsInformation( + newVersion, + fileContents, +) { + // WP Versions + const currentWPRequiresAtLeast = fileContents.match( + /Requires at least: (.*)/, + )[ 1 ]; + const currentWPTestedUpTo = fileContents.match( /Tested up to: (.*)/ )[ 1 ]; + // PHP + const currentRequiresPhp = fileContents.match( /Requires PHP: (.*)/ )[ 1 ]; + // WC + // const currentWCRequiresAtLeast = fileContents.match( + // /WC requires at least: (.*)/, + // )[ 1 ] ?? ' - '; + // const currentWCTestedUpTo = fileContents.match( + // /WC tested up to: (.*)/, + // )[ 1 ] ?? ' - '; + + // Display all versioning information and ask for confirmation. + console.log( 'New release version:' ); + console.log( `Version: ${ newVersion }` ); + console.log( '---' ); + console.log( `(WP) Requires at least: ${ currentWPRequiresAtLeast }` ); + console.log( `(WP) Tested up to: ${ currentWPTestedUpTo }` ); + console.log( `(PHP) Requires PHP: ${ currentRequiresPhp }` ); + // console.log( `(WC) WC requires at least: ${ currentWCRequiresAtLeast }` ); + // console.log( `(WC) WC tested up to: ${ currentWCTestedUpTo }` ); + // const { confirmation } = await inquirer.prompt( { + // type: 'confirm', + // name: 'confirmation', + // message: 'Is the above information correct?', + // default: false, + // } ); + // return confirmation; + return true; +} + +/** + * Create release branch given the slug and version. + * + * @param {string} slug Plugin slug name. + * @param {string} version New version. + * @return {Object} The name of the original and the new release branches. + */ +function createReleaseBranch( slug, version ) { + const currentBranchName = execSync( 'git branch --show-current' ) + .toString() + .trim(); + const branchName = `release/${ slug }-${ version }`; + console.log( `Creating branch '${ branchName }' ...` ); + try { + execSync( `git checkout -b ${ branchName }` ); + } catch { + throw new Error( + 'Error creating branch. Check branch does not exist.', + ); + } + return { + originalBranchName: currentBranchName, + releaseBranchName: branchName, + }; +} + +/** + * Set new version in the main plugin file. + * This method also creates a commit in the current branch. + * + * @param {string} filename The path to the main plugin file. + * @param {string} fileContents The contents of the main plugin file. + * @param {string} version The new version to be released. + */ +function setNewPluginVersion( filename, fileContents, version ) { + console.log( 'Updating plugin file versions ...' ); + let newPluginFileContents = fileContents.replace( + /Version: (.*)/, + `Version: ${ version }`, + ); + + // Update version constant. + const { constant } = PLUGINS[ pluginSlug ]; + newPluginFileContents = newPluginFileContents.replace( + new RegExp( `define\( '${constant}', '.*' \);` ), + `define( '${ constant }', '${ version }' );`, + ); + + fs.writeFileSync( filename, newPluginFileContents, 'utf-8' ); + execSync( + `git add ${ filename } && git commit -m "Update plugin file versions."`, + ); +} + +/** + * Replaces the next-version placeholder with the new version to be released. + * This method also creates a commit in the current branch. + * + * @param {string} version The new version. + */ +function replaceNextVersionPlaceholder( version ) { + console.log( `Replacing next version placeholder with ${ version } ...` ); + execSync( `bash scripts/replace-next-version-tag.sh ${ version }` ); + execSync( + `git add . && git commit --allow-empty -m "Replace next version placeholders."`, + ); +} + +/** + * Update package.json and package-lock.json files with the new version to be released. + * This method also creates a commit in the current branch. + * + * @param {string} version The new version. + */ +function updatePackageJsonFiles( version ) { + console.log( 'Updating package.json version...' ); + try { + execSync( `npm version ${ version } --no-git-tag-version` ); + } catch { + throw new Error( 'Version could not be updated in package.json file.' ); + } + + execSync( + `git add package.json package-lock.json && git commit -m "Update package.json versions."`, + ); +} + +/** + * Generate POT files (translations). + * This method also creates a commit in the current branch. + */ +function generatePotFiles() { + console.log( 'Updating POT files...' ); + try { + execSync( `npm run i18n:build` ); + } catch { + throw new Error( 'POT file generation failed.' ); + } + execSync( `git add lang/ && git commit -m "Generate pot files."` ); +} + +/** + * Generates the changelog using the changelogger script. + * This method also creates a commit in the current branch. + */ +function generateChangelog( version ) { + + const search = `milestone:${ version }`; + let prs = execSync( `gh pr list --state merged --base trunk -search "${ search }" --json number,title,body,labels` ); // | jq -r '.[] | [.number,.title,.body] + prs = JSON.parse( prs ); + + return prs.map( pr => ` - ${ pr.title } (#{ pr.number })` ).join( "\n" ) +} + +/** + * Create release PR. + * + * @param version + * @param changelog + */ +function createPR( version, changelog ) { + let body = ` + +### Changelog + +${ changelog } + +### Hooks, templates + +... + +### Release + +- [ ] Click 'Ready for review' if everything looks right. +- [ ] Plugin zip built. +- [ ] New version deployed at test site. +- [ ] Merge PR. +- [ ] GH release tag created. +- [ ] Plugin pushed to WordPress.org +- [ ] WPJobManager.com release created. +- [ ] P2 release post created. + + +`; + body = body.replace( '"', '\"' ); + + execSync( `gh pr create --assignee @me --base trunk --draft --title "Release ${ version }" --label "[Type] Maintenance" --label "Release" --body="${ body }" 2> /dev/null` ); +} + +/** + * Pushes release branch. + * + * @param {string} branch The release branch name. + */ +function pushBranch( branch ) { + console.log( 'Pushing branch ...' ); + try { + execSync( `git push origin ${ branch } 2> /dev/null` ); + } catch { + throw Error( `New branch '${ branch }' could not be pushed.` ); + } +} + +/** + * Revert workspace to original status. + * + * @param {string} originalBranch The original branch name. + * @param {string} releaseBranch The new release branch name. + */ +function revertOnError( originalBranch, releaseBranch ) { + console.log( '❌ ERROR!' ); + console.log( 'Trying to move back to previous branch...' ); + execSync( `git checkout . && git checkout ${ originalBranch }` ); + console.log( `Deleting '${ releaseBranch }'....` ); + execSync( `git branch -D ${ releaseBranch }` ); +} diff --git a/scripts/replace-next-version-tag.sh b/scripts/replace-next-version-tag.sh new file mode 100755 index 000000000..dd2b6544c --- /dev/null +++ b/scripts/replace-next-version-tag.sh @@ -0,0 +1,97 @@ +#!/usr/bin/env bash + +# Adapted from https://github.com/Automattic/jetpack/blob/b3179d4347dcf73269985e1801b61bf53fbc441a/tools/replace-next-version-tag.sh + +set -eo pipefail + +BASE=$(cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd) +. "$BASE/scripts/includes/chalk-lite.sh" +. "$BASE/scripts/includes/proceed_p.sh" + +# Print help and exit. +function usage { + cat <<-'EOH' + usage: $0 [-v] + + Replace the `$$next-version$$` token in doc tags with the specified version. + Recognized patterns: + - `@since $$next-version$$` + - `@deprecated $$next-version$$` + - `@deprecated since $$next-version$$` + - `_deprecated_function( ..., 'prefix-$$next-version$$' )` + Other WordPress deprecation functions also work. The call must be on one + line, indented with tabs, and the '$$next-version$$' token must be in a + single-quoted string. + EOH + exit 1 +} + +if [[ $# -eq 0 ]]; then + usage +fi + +# Sets options. +VERBOSE= +while getopts ":vh" opt; do + case ${opt} in + v) + if [[ -n "$VERBOSE" ]]; then + VERBOSE="${VERBOSE}v" + else + VERBOSE="-v" + fi + ;; + h) + usage + ;; + :) + die "Argument -$OPTARG requires a value." + ;; + ?) + error "Invalid argument: -$OPTARG" + echo "" + usage + ;; + esac +done +shift "$(($OPTIND - 1))" + +if [[ -z "$VERBOSE" ]]; then + function debug { + : + } +fi + +# Determine the version +[[ -z "$1" ]] && die "A version must be specified." +VERSION="$1" +if ! grep -E -q '^[0-9]+(\.[0-9]+)+(-(a|alpha|beta)([-.]?[0-9]+)?)?$' <<<"$VERSION"; then + proceed_p "Version $VERSION does not seem to be a valid version number." "Continue?" +fi +VE=$(sed 's/[&\\/]/\\&/g' <<<"$VERSION") + +cd "$BASE" +EXIT=0 +for FILE in $(git ls-files); do + [ "$FILE" == "scripts/replace-next-version-tag.sh" ] && continue; + grep -F -q '$$next-version$$' "$FILE" 2>/dev/null || continue + debug "Processing $FILE" + + sed -i.bak -E -e 's!\$\$next-version\$\$!'"$VE"'!g' "$FILE" + rm "$FILE.bak" # We need a backup file because macOS requires it. +# sed -i.bak -E -e $'s!(^\t*_deprecated_(function|constructor|file|argument|hook)\\( .*, \'[^\']*)\\$\\$next-version\\$\\$\'!\\1'"$VE"$'\'!g' "$FILE" +# rm "$FILE.bak" # We need a backup file because macOS requires it. + + if grep -F -q '$$next-version$$' "$FILE"; then + EXIT=1 + while IFS=':' read -r LINE DUMMY; do + if [[ -n "$CI" ]]; then + echo "::error file=$FILE,line=$LINE::"'Unexpected `$$next-version$$` token.' + else + error "$FILE:$LINE:"' Unexpected `$$next-version$$` token.' + fi + done < <( grep --line-number -F '$$next-version$$' "$FILE" || echo "" ) + fi +done + +exit $EXIT From 3273bce3185bf6f25eeb6d348383705f85fd9a55 Mon Sep 17 00:00:00 2001 From: Peter Kiss Date: Thu, 7 Sep 2023 20:17:42 +0200 Subject: [PATCH 02/28] Add PR creation --- scripts/release.mjs | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/scripts/release.mjs b/scripts/release.mjs index 7a373354a..86dcef7f4 100644 --- a/scripts/release.mjs +++ b/scripts/release.mjs @@ -11,6 +11,7 @@ const PLUGINS = { 'wp-job-manager': { file: 'wp-job-manager.php', constant: 'JOB_MANAGER_VERSION', + repo: 'Automattic/wp-job-manager', }, }; @@ -26,13 +27,21 @@ config(); // Get plugin information. const pluginSlug = getPluginSlug(); -const pluginFileName = PLUGINS[ pluginSlug ].file; +const plugin = PLUGINS[ pluginSlug ]; +const pluginFileName = plugin.file; const pluginFileContents = readFileContents( pluginFileName ); const pluginVersion = pluginFileContents.match( /Version: (.*)/ )[ 1 ]; -const pluginName = pluginFileContents.match( /Plugin Name: (.*)/ )[ 1 ]; +const pluginName = pluginFileContents.match( /Plugin Name: (.*)/ )[ 1 ]; const version = process.argv[ 3 ]; +// +// const changelog = generateChangelog( version ); +// console.log( changelog ); +// createPR( version, changelog ); +// +// process.exit(); + // Confirm versions through CLI. if ( ! ( await askForConfirmationOnVersionsInformation( @@ -276,11 +285,11 @@ function updatePackageJsonFiles( version ) { function generatePotFiles() { console.log( 'Updating POT files...' ); try { - execSync( `npm run i18n:build` ); + execSync( `npm run i18n:build 2> /dev/null` ); } catch { throw new Error( 'POT file generation failed.' ); } - execSync( `git add lang/ && git commit -m "Generate pot files."` ); + execSync( `git add languages/ && git commit -m "Generate pot files."` ); } /** @@ -288,12 +297,27 @@ function generatePotFiles() { * This method also creates a commit in the current branch. */ function generateChangelog( version ) { - const search = `milestone:${ version }`; - let prs = execSync( `gh pr list --state merged --base trunk -search "${ search }" --json number,title,body,labels` ); // | jq -r '.[] | [.number,.title,.body] + let prs = execSync( + `gh pr list --state all --base trunk --search "${ search }" --json number,title,body,labels`, + ); prs = JSON.parse( prs ); - return prs.map( pr => ` - ${ pr.title } (#{ pr.number })` ).join( "\n" ) + const changelogs = prs.map( ( pr ) => { + const body = pr.body; + let changelogIndex = body.indexOf( "### Changelog" ); + if ( changelogIndex === -1 ) { + // Fall back to PR title. + return `* ${ pr.title } (#${ pr.number })`; + } + changelogIndex += "### Changelog".length; + const nextSectionIndex = body.indexOf( "###", changelogIndex + 1 ); + const changelogEndIndex = + nextSectionIndex === -1 ? body.length : nextSectionIndex; + return body.substring( changelogIndex, changelogEndIndex ); + } ); + + return changelogs.join( "\n" ); } /** @@ -328,7 +352,7 @@ ${ changelog } `; body = body.replace( '"', '\"' ); - execSync( `gh pr create --assignee @me --base trunk --draft --title "Release ${ version }" --label "[Type] Maintenance" --label "Release" --body="${ body }" 2> /dev/null` ); + execSync( `gh pr create -R ${ plugin.repo } --assignee @me --base trunk --draft --title "Release ${ version }" --label "[Type] Maintenance" --label "Release" --body "${ body }" 2> /dev/null` ); } /** From 271c5f4331fd1a260f714d6fa3caf626f625f09d Mon Sep 17 00:00:00 2001 From: Peter Kiss Date: Mon, 11 Sep 2023 13:34:45 +0200 Subject: [PATCH 03/28] Add create release script --- .github/PULL_REQUEST_TEMPLATE.md | 17 +- .github/workflows/create-release.yml | 27 + .github/workflows/deploy-wporg-release.yml | 32 + package-lock.json | 1327 +++++++++++++++++++- package.json | 5 +- scripts/create-release.sh | 11 + scripts/prepare-release.sh | 11 + scripts/release-create.mjs | 99 ++ scripts/{release.mjs => release-pr.mjs} | 198 ++- 9 files changed, 1571 insertions(+), 156 deletions(-) create mode 100644 .github/workflows/create-release.yml create mode 100644 .github/workflows/deploy-wporg-release.yml create mode 100755 scripts/create-release.sh create mode 100755 scripts/prepare-release.sh create mode 100644 scripts/release-create.mjs rename scripts/{release.mjs => release-pr.mjs} (62%) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9204f723a..7f1dd1aab 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,15 +1,20 @@ Fixes # -### Changes proposed in this Pull Request +### Changes Proposed in this Pull Request * -### Testing instructions +### Testing Instructions * - -### New/Updated Hooks + +### Release Notes + +* + +### New or Updated Hooks and Templates + * @@ -18,8 +23,4 @@ Fixes # * - ### Screenshot / Video diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 000000000..e1dc35365 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,27 @@ +name: Deploy Plugin Release + +on: + pull_request: + types: + - closed + branches: + - 'trunk' + +jobs: + deploy: + if: github.event.pull_request.merged == true && startsWith( github.head_ref, 'release/' ) + runs-on: ubuntu-latest + name: WPJM Release + steps: + - uses: actions/checkout@v2 + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: composer + coverage: none + - name: Install JS dependencies + run: npm ci + - name: Install PHP dependencies + run: composer install --no-ansi --no-interaction --prefer-dist --no-progress + - name: Create Release + run: npm run release:create ${{ github.event.number }} diff --git a/.github/workflows/deploy-wporg-release.yml b/.github/workflows/deploy-wporg-release.yml new file mode 100644 index 000000000..8581de041 --- /dev/null +++ b/.github/workflows/deploy-wporg-release.yml @@ -0,0 +1,32 @@ +name: Release +on: + release: + types: [published] +jobs: + wporg: + name: Deploy Release to WordPress.org + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install JS dependencies + run: npm ci + - uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + tools: composer + coverage: none + - name: Install PHP dependencies + run: composer install --no-ansi --no-interaction --prefer-dist --no-progress + - name: Build Plugin + run: npm run build + - name: Decompress plugin + run: unzip wp-job-manager.zip -d wp-job-manager + - name: WordPress Plugin Deploy + uses: 10up/action-wordpress-plugin-deploy@stable + with: + dry-run: true + env: + SVN_PASSWORD: ${{ secrets.WORDPRESSORG_SVN_PASSWORD }} + SVN_USERNAME: ${{ secrets.WORDPRESSORG_SVN_USERNAME }} + BUILD_DIR: wp-job-manager + SLUG: wp-job-manager diff --git a/package-lock.json b/package-lock.json index 5ac4bc313..3fbec0a8f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,13 @@ "devDependencies": { "@wordpress/jest-preset-default": "11.1.0", "@wordpress/scripts": "26.1.0", + "chalk": "^5.3.0", + "dotenv": "^16.3.1", "file-loader": "6.2.0", "grunt": "^1.5.3", "husky": "7.0.4", + "inquirer": "^9.2.10", + "keep-a-changelog": "^2.3.0", "lint-staged": "12.3.4" }, "engines": { @@ -1952,6 +1956,37 @@ "postcss-selector-parser": "^6.0.10" } }, + "node_modules/@deno/shim-deno": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.16.1.tgz", + "integrity": "sha512-s9v0kzF5bm/o9TgdwvsraHx6QNllYrXXmKzgOG2lh4LFXnVMr2gpjK/c/ve6EflQn1MqImcWmVD8HAv5ahuuZQ==", + "dev": true, + "dependencies": { + "@deno/shim-deno-test": "^0.4.0", + "which": "^2.0.2" + } + }, + "node_modules/@deno/shim-deno-test": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.4.0.tgz", + "integrity": "sha512-oYWcD7CpERZy/TXMTM9Tgh1HD/POHlbY9WpzmAk+5H8DohcxG415Qws8yLGlim3EaKBT2v3lJv01x4G0BosnaQ==", + "dev": true + }, + "node_modules/@deno/shim-deno/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -2263,6 +2298,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/console/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@jest/core": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-29.5.0.tgz", @@ -2310,6 +2361,22 @@ } } }, + "node_modules/@jest/core/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@jest/environment": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.5.0.tgz", @@ -2425,6 +2492,22 @@ } } }, + "node_modules/@jest/reporters/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@jest/schemas": { "version": "29.4.3", "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.4.3.tgz", @@ -2507,6 +2590,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/transform/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@jest/transform/node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2530,6 +2629,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/@jest/types/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", @@ -2607,6 +2722,15 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "node_modules/@ljharb/through": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.9.tgz", + "integrity": "sha512-yN599ZBuMPPK4tdoToLlvgJB4CLK8fGl7ntfy0Wn7U6ttNvHYurd81bfUiK/6sMkiIwm65R6ck4L6+Y3DfVbNQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -4276,6 +4400,22 @@ "react-dom": "^18.0.0" } }, + "node_modules/@wordpress/scripts/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/@wordpress/scripts/node_modules/cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -4533,12 +4673,12 @@ } }, "node_modules/ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "dependencies": { - "type-fest": "^0.11.0" + "type-fest": "^0.21.3" }, "engines": { "node": ">=8" @@ -4548,12 +4688,12 @@ } }, "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4881,6 +5021,22 @@ "@babel/core": "^7.8.0" } }, + "node_modules/babel-jest/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/babel-loader": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.3.0.tgz", @@ -5387,16 +5543,12 @@ "dev": true }, "node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, "engines": { - "node": ">=10" + "node": "^12.17.0 || ^14.13 || >=16.0.0" }, "funding": { "url": "https://github.com/chalk/chalk?sponsor=1" @@ -5437,6 +5589,12 @@ "node": ">=10" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "node_modules/check-node-version": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.2.1.tgz", @@ -5585,6 +5743,18 @@ "node": ">=8" } }, + "node_modules/cli-spinners": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-truncate": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", @@ -5685,6 +5855,15 @@ "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -5716,6 +5895,15 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/clone-deep": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", @@ -6640,6 +6828,18 @@ "node": ">= 10" } }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -6927,6 +7127,18 @@ "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", "dev": true }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -7716,6 +7928,22 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/eslint/node_modules/eslint-scope": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", @@ -8070,6 +8298,20 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -8205,6 +8447,46 @@ "pend": "~1.2.0" } }, + "node_modules/figures": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -8370,6 +8652,22 @@ "find-process": "bin/find-process.js" } }, + "node_modules/find-process/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -8978,6 +9276,22 @@ "node": ">=10" } }, + "node_modules/grunt-legacy-log-utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/grunt-legacy-util": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", @@ -9585,6 +9899,32 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/inquirer": { + "version": "9.2.10", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.10.tgz", + "integrity": "sha512-tVVNFIXU8qNHoULiazz612GFl+yqNfjMTbLuViNJE/d860Qxrd3NMrse8dm40VUQLOQeULvaQF8lpAhvysjeyA==", + "dev": true, + "dependencies": { + "@ljharb/through": "^2.3.9", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^5.0.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + }, + "engines": { + "node": ">=14.18.0" + } + }, "node_modules/internal-slot": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", @@ -9823,6 +10163,15 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -10277,6 +10626,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-circus/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-cli": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.5.0.tgz", @@ -10311,6 +10676,22 @@ } } }, + "node_modules/jest-cli/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-config": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-29.5.0.tgz", @@ -10356,6 +10737,22 @@ } } }, + "node_modules/jest-config/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-dev-server": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/jest-dev-server/-/jest-dev-server-6.2.0.tgz", @@ -10371,6 +10768,22 @@ "wait-on": "^6.0.1" } }, + "node_modules/jest-dev-server/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-diff": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.5.0.tgz", @@ -10386,6 +10799,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-diff/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-docblock": { "version": "29.4.3", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-29.4.3.tgz", @@ -10414,6 +10843,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-each/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-environment-jsdom": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-29.5.0.tgz", @@ -10520,6 +10965,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-matcher-utils/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-message-util": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-29.5.0.tgz", @@ -10540,6 +11001,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-message-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-mock": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.5.0.tgz", @@ -10613,6 +11090,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-resolve/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-runner": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-29.5.0.tgz", @@ -10645,6 +11138,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-runner/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-runtime": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.5.0.tgz", @@ -10678,6 +11187,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-runtime/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-snapshot": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-29.5.0.tgz", @@ -10709,7 +11234,23 @@ "semver": "^7.3.5" }, "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/jest-snapshot/node_modules/lru-cache": { @@ -10762,6 +11303,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-util/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-validate": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-29.5.0.tgz", @@ -10779,6 +11336,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-validate/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-watcher": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-29.5.0.tgz", @@ -10798,6 +11371,22 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/jest-watcher/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/jest-worker": { "version": "29.5.0", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.5.0.tgz", @@ -10991,6 +11580,18 @@ "node": ">=4.0" } }, + "node_modules/keep-a-changelog": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/keep-a-changelog/-/keep-a-changelog-2.3.0.tgz", + "integrity": "sha512-ETUAMEhHlECpaOwWNB6eZPFt4o2vkADIPtuNXZI46kOdsExkeRfWUiGPeMLSfztQHrNkAXDTbgud4HeWcIYIDA==", + "dev": true, + "dependencies": { + "@deno/shim-deno": "~0.16.1" + }, + "bin": { + "changelog": "esm/bin.js" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -11423,6 +12024,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/log-update": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-4.0.0.tgz", @@ -12047,6 +12664,15 @@ "multicast-dns": "cli.js" } }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -12279,6 +12905,22 @@ "npm": ">=6.0.0" } }, + "node_modules/npm-package-json-lint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/npm-package-json-lint/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -12646,6 +13288,45 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -14453,6 +15134,15 @@ "rimraf": "bin.js" } }, + "node_modules/run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/run-con": { "version": "1.2.11", "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.11.tgz", @@ -14501,9 +15191,9 @@ } }, "node_modules/rxjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.4.tgz", - "integrity": "sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, "dependencies": { "tslib": "^2.1.0" @@ -15955,6 +16645,18 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -16552,6 +17254,15 @@ "minimalistic-assert": "^1.0.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -16632,6 +17343,22 @@ "node": ">= 10.13.0" } }, + "node_modules/webpack-bundle-analyzer/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/webpack-bundle-analyzer/node_modules/commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", @@ -18622,6 +19349,33 @@ "dev": true, "requires": {} }, + "@deno/shim-deno": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.16.1.tgz", + "integrity": "sha512-s9v0kzF5bm/o9TgdwvsraHx6QNllYrXXmKzgOG2lh4LFXnVMr2gpjK/c/ve6EflQn1MqImcWmVD8HAv5ahuuZQ==", + "dev": true, + "requires": { + "@deno/shim-deno-test": "^0.4.0", + "which": "^2.0.2" + }, + "dependencies": { + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "@deno/shim-deno-test": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.4.0.tgz", + "integrity": "sha512-oYWcD7CpERZy/TXMTM9Tgh1HD/POHlbY9WpzmAk+5H8DohcxG415Qws8yLGlim3EaKBT2v3lJv01x4G0BosnaQ==", + "dev": true + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -18851,6 +19605,18 @@ "jest-message-util": "^29.5.0", "jest-util": "^29.5.0", "slash": "^3.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "@jest/core": { @@ -18887,6 +19653,18 @@ "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-ansi": "^6.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "@jest/environment": { @@ -18976,6 +19754,18 @@ "string-length": "^4.0.1", "strip-ansi": "^6.0.0", "v8-to-istanbul": "^9.0.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "@jest/schemas": { @@ -19045,6 +19835,16 @@ "write-file-atomic": "^4.0.2" }, "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -19065,6 +19865,18 @@ "@types/node": "*", "@types/yargs": "^17.0.8", "chalk": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "@jridgewell/gen-mapping": { @@ -19134,6 +19946,12 @@ "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==", "dev": true }, + "@ljharb/through": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/@ljharb/through/-/through-2.3.9.tgz", + "integrity": "sha512-yN599ZBuMPPK4tdoToLlvgJB4CLK8fGl7ntfy0Wn7U6ttNvHYurd81bfUiK/6sMkiIwm65R6ck4L6+Y3DfVbNQ==", + "dev": true + }, "@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -20411,6 +21229,16 @@ "webpack-dev-server": "^4.4.0" }, "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -20615,18 +21443,18 @@ "peer": true }, "ansi-escapes": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", - "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", "dev": true, "requires": { - "type-fest": "^0.11.0" + "type-fest": "^0.21.3" }, "dependencies": { "type-fest": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", - "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true } } @@ -20857,6 +21685,18 @@ "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "slash": "^3.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "babel-loader": { @@ -21236,14 +22076,10 @@ } }, "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true }, "change-case": { "version": "4.1.2", @@ -21279,6 +22115,12 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "check-node-version": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/check-node-version/-/check-node-version-4.2.1.tgz", @@ -21384,6 +22226,12 @@ "restore-cursor": "^3.1.0" } }, + "cli-spinners": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.0.tgz", + "integrity": "sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==", + "dev": true + }, "cli-truncate": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", @@ -21444,6 +22292,12 @@ } } }, + "cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true + }, "cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", @@ -21468,6 +22322,12 @@ } } }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true + }, "clone-deep": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.2.4.tgz", @@ -22166,6 +23026,15 @@ "execa": "^5.0.0" } }, + "defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "requires": { + "clone": "^1.0.2" + } + }, "define-lazy-prop": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz", @@ -22388,6 +23257,12 @@ } } }, + "dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true + }, "duplexer": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", @@ -22718,6 +23593,16 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "eslint-scope": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", @@ -23259,6 +24144,17 @@ "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extract-zip": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz", @@ -23372,6 +24268,30 @@ "pend": "~1.2.0" } }, + "figures": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-5.0.0.tgz", + "integrity": "sha512-ej8ksPF4x6e5wvK9yevct0UCXh8TTFlWGVLlgjZuoBH1HwjIfKE/IdL5mq89sFA7zELi1VhKpmtDnrs7zWyeyg==", + "dev": true, + "requires": { + "escape-string-regexp": "^5.0.0", + "is-unicode-supported": "^1.2.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true + }, + "is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true + } + } + }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -23494,6 +24414,18 @@ "chalk": "^4.0.0", "commander": "^5.1.0", "debug": "^4.1.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "find-up": { @@ -23978,6 +24910,18 @@ "requires": { "chalk": "~4.1.0", "lodash": "~4.17.19" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "grunt-legacy-util": { @@ -24387,6 +25331,29 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "inquirer": { + "version": "9.2.10", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-9.2.10.tgz", + "integrity": "sha512-tVVNFIXU8qNHoULiazz612GFl+yqNfjMTbLuViNJE/d860Qxrd3NMrse8dm40VUQLOQeULvaQF8lpAhvysjeyA==", + "dev": true, + "requires": { + "@ljharb/through": "^2.3.9", + "ansi-escapes": "^4.3.2", + "chalk": "^5.3.0", + "cli-cursor": "^3.1.0", + "cli-width": "^4.1.0", + "external-editor": "^3.1.0", + "figures": "^5.0.0", + "lodash": "^4.17.21", + "mute-stream": "1.0.0", + "ora": "^5.4.1", + "run-async": "^3.0.0", + "rxjs": "^7.8.1", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0" + } + }, "internal-slot": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", @@ -24550,6 +25517,12 @@ "is-extglob": "^2.1.1" } }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true + }, "is-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz", @@ -24865,6 +25838,18 @@ "pure-rand": "^6.0.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-cli": { @@ -24885,6 +25870,18 @@ "jest-validate": "^29.5.0", "prompts": "^2.0.1", "yargs": "^17.3.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-config": { @@ -24915,6 +25912,18 @@ "pretty-format": "^29.5.0", "slash": "^3.0.0", "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-dev-server": { @@ -24930,6 +25939,18 @@ "spawnd": "^6.2.0", "tree-kill": "^1.2.2", "wait-on": "^6.0.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-diff": { @@ -24942,6 +25963,18 @@ "diff-sequences": "^29.4.3", "jest-get-type": "^29.4.3", "pretty-format": "^29.5.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-docblock": { @@ -24964,6 +25997,18 @@ "jest-get-type": "^29.4.3", "jest-util": "^29.5.0", "pretty-format": "^29.5.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-environment-jsdom": { @@ -25042,6 +26087,18 @@ "jest-diff": "^29.5.0", "jest-get-type": "^29.4.3", "pretty-format": "^29.5.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-message-util": { @@ -25059,6 +26116,18 @@ "pretty-format": "^29.5.0", "slash": "^3.0.0", "stack-utils": "^2.0.3" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-mock": { @@ -25100,6 +26169,18 @@ "resolve": "^1.20.0", "resolve.exports": "^2.0.0", "slash": "^3.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-resolve-dependencies": { @@ -25139,6 +26220,18 @@ "jest-worker": "^29.5.0", "p-limit": "^3.1.0", "source-map-support": "0.5.13" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-runtime": { @@ -25169,6 +26262,18 @@ "jest-util": "^29.5.0", "slash": "^3.0.0", "strip-bom": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-snapshot": { @@ -25202,6 +26307,16 @@ "semver": "^7.3.5" }, "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -25240,6 +26355,18 @@ "ci-info": "^3.2.0", "graceful-fs": "^4.2.9", "picomatch": "^2.2.3" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-validate": { @@ -25254,6 +26381,18 @@ "jest-get-type": "^29.4.3", "leven": "^3.1.0", "pretty-format": "^29.5.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-watcher": { @@ -25270,6 +26409,18 @@ "emittery": "^0.13.1", "jest-util": "^29.5.0", "string-length": "^4.0.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "jest-worker": { @@ -25422,6 +26573,15 @@ "object.assign": "^4.1.3" } }, + "keep-a-changelog": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/keep-a-changelog/-/keep-a-changelog-2.3.0.tgz", + "integrity": "sha512-ETUAMEhHlECpaOwWNB6eZPFt4o2vkADIPtuNXZI46kOdsExkeRfWUiGPeMLSfztQHrNkAXDTbgud4HeWcIYIDA==", + "dev": true, + "requires": { + "@deno/shim-deno": "~0.16.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -25751,6 +26911,18 @@ "requires": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } } }, "log-update": { @@ -26238,6 +27410,12 @@ "thunky": "^1.0.2" } }, + "mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true + }, "nanoid": { "version": "3.3.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", @@ -26422,6 +27600,16 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -26696,6 +27884,35 @@ "word-wrap": "^1.2.3" } }, + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "requires": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", @@ -27970,6 +29187,12 @@ "glob": "^7.1.3" } }, + "run-async": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-3.0.0.tgz", + "integrity": "sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==", + "dev": true + }, "run-con": { "version": "1.2.11", "resolved": "https://registry.npmjs.org/run-con/-/run-con-1.2.11.tgz", @@ -28000,9 +29223,9 @@ } }, "rxjs": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.4.tgz", - "integrity": "sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -29151,6 +30374,15 @@ "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==", "dev": true }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -29605,6 +30837,15 @@ "minimalistic-assert": "^1.0.0" } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "requires": { + "defaults": "^1.0.3" + } + }, "webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -29661,6 +30902,16 @@ "ws": "^7.3.1" }, "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, "commander": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", diff --git a/package.json b/package.json index 655e9db2c..7c714e866 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,13 @@ "devDependencies": { "@wordpress/jest-preset-default": "11.1.0", "@wordpress/scripts": "26.1.0", + "chalk": "^5.3.0", "dotenv": "^16.3.1", "file-loader": "6.2.0", "grunt": "^1.5.3", "husky": "7.0.4", "inquirer": "^9.2.10", + "keep-a-changelog": "^2.3.0", "lint-staged": "12.3.4" }, "scripts": { @@ -51,7 +53,8 @@ "test-php": "./vendor/bin/phpunit", "i18n:build": "npm run i18n:php", "i18n:php": "wp i18n make-pot --exclude=lib,build,vendor,node_modules --skip-js --headers='{\"Last-Translator\":null,\"Language-Team\":null,\"Report-Msgid-Bugs-To\":\"https://wordpress.org/support/plugin/wp-job-manager/\"}' . languages/wp-job-manager.pot", - "release": "node scripts/release.mjs wp-job-manager" + "release": "./scripts/prepare-release.sh", + "release:Create": "./scripts/create-release.sh" }, "lint-staged": { "*.php": [ diff --git a/scripts/create-release.sh b/scripts/create-release.sh new file mode 100755 index 000000000..36291fa07 --- /dev/null +++ b/scripts/create-release.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + + +if [ -z "$1" ]; then + echo "Create release tag and GH release. Triggers deploy to WordPress.org" + echo "" + echo "Usage: npm run release:create [PR]" + exit 1 +fi + +node scripts/release-create.mjs wp-job-manager $1 diff --git a/scripts/prepare-release.sh b/scripts/prepare-release.sh new file mode 100755 index 000000000..54bcd99b3 --- /dev/null +++ b/scripts/prepare-release.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + + +if [ -z "$1" ]; then + echo "Prepare a new version for release." + echo "" + echo "Usage: npm run release [version]" + exit 1 +fi + +node scripts/release.mjs wp-job-manager $1 diff --git a/scripts/release-create.mjs b/scripts/release-create.mjs new file mode 100644 index 000000000..d4b8d3804 --- /dev/null +++ b/scripts/release-create.mjs @@ -0,0 +1,99 @@ +/** + * External dependencies + */ +// import { config } from 'dotenv'; +import fs from 'fs'; +import process from 'process'; +import chalk from 'chalk'; +import { execSync } from 'child_process'; + +const PLUGINS = { + 'wp-job-manager': { + file: 'wp-job-manager.php', + constant: 'JOB_MANAGER_VERSION', + repo: 'yscik/wp-job-manager', + }, +}; + +const REMOTE = `testing`; + +/* eslint-disable no-console */ + +// // Processes the .env variables. +// config(); + +// Get plugin information. +const pluginSlug = process.argv[ 2 ]; +const plugin = PLUGINS[ pluginSlug ]; +const pluginFileName = plugin.file; +const pluginFileContents = fs.readFileSync( pluginFileName, 'utf8' ); +const pluginVersion = pluginFileContents.match( /Version: (.*)/ )[ 1 ]; +const pluginName = pluginFileContents.match( /Plugin Name: (.*)/ )[ 1 ]; + +const prNumber = process.argv[ 3 ]; + +const releaseNotes = getReleaseChangelog(); + +updateChangelog(); +commitChangelog(); +tagRelease(); +buildPluginZip(); +createGithubRelease(); + +function getReleaseChangelog() { + // Get PR description + const prDescription = execSync( `gh pr view ${ prNumber } --json body` ).toString(); + // Get changelog section + const changelogSection = prDescription.match( /### Changelog([\S\s]*?)(?:###|