How to use is-scoped - 2 common examples

To help you get started, we’ve selected a few is-scoped examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pikapkg / pack / checkpoint / dist-src / util / publish / ui.js View on Github external
return true;
            }
        },
        {
            type: 'confirm',
            name: 'confirm',
            message: answers => {
                const tag = answers.tag || options.tag;
                const tagPart = tag ? ` and tag this release in npm as ${tag}` : '';
                return `Will bump from ${chalk.cyan(oldVersion)} to ${chalk.cyan(answers.version + tagPart)}. Continue?`;
            }
        },
        {
            type: 'confirm',
            name: 'publishScoped',
            when: isScoped(pkg.name) && options.publish && !pkg.private,
            message: `${chalk.bold.magenta(pkg.name)} is a scoped package. Do you want to publish it publicly?`,
            default: true
        }
    ];
    const { hasCommits, releaseNotes } = await printCommitLog(repoUrl);
    if (!hasCommits) {
        const answers = await inquirer.prompt([{
                type: 'confirm',
                name: 'confirm',
                message: 'No commits found since previous release, continue?',
                default: false
            }]);
        if (!answers.confirm) {
            return Object.assign({}, options, answers);
        }
    }
github pikapkg / pack / src / util / publish / ui.ts View on Github external
}
		},
		{
			type: 'confirm',
			name: 'confirm',
			message: answers => {
				const tag = answers.tag || options.tag;
				const tagPart = tag ? ` and tag this release in npm as ${tag}` : '';

				return `Will bump from ${chalk.cyan(oldVersion)} to ${chalk.cyan(answers.version + tagPart)}. Continue?`;
			}
		},
		{
			type: 'confirm',
			name: 'publishScoped',
			when: isScoped(pkg.name) && options.publish && !pkg.private,
			message: `${chalk.bold.magenta(pkg.name)} is a scoped package. Do you want to publish it publicly?`,
			default: true
		}
	];

	const {hasCommits, releaseNotes} = await printCommitLog(repoUrl);

	if (!hasCommits) {
		const answers = await inquirer.prompt([{
			type: 'confirm',
			name: 'confirm',
			message: 'No commits found since previous release, continue?',
			default: false
		}]);

		if (!answers.confirm) {

is-scoped

Check if a string is a scoped npm package name

MIT
Latest version published 3 years ago

Package Health Score

65 / 100
Full package analysis

Popular is-scoped functions