async function handleBumpVersionInJson(outfile, label, options) {
    outfile = resolve(outfile);

    let json;

    try {
        json = JSON.parse(await readFile(outfile, { encoding: 'utf8' }));
    } catch (err) {
        json = {};

        message(`${label} is a new file`, 'notice');

        await mkdir(dirname(outfile), { recursive: true });
    }

    json[options.key] = createVersionNumber(options.format, json?.[options.key]);

    return await writeFile(
        outfile,
        JSON.stringify(json, null, options.pretty),
        { encoding: 'utf8' }
    );
}
Changes the version number for the provided JSON key in file.

@async
@param  {string} outfile
@param  {string} label
@param  {object} options
@param  {string} options.key
@return {Promise}