Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
/* eslint-disable no-unused-vars */
const should = require('should');
const packageName = require('./utils/publish-please-version-under-test');
const reporter = require('../lib/reporters/elegant-status-reporter');
const rename = require('fs').renameSync;
const pathJoin = require('path').join;
const emoji = require('node-emoji').emoji;
const chalk = require('chalk');
const envType = require('../lib/reporters/env-type');
const lineSeparator = '----------------------------------';
describe('Elegant status reporter', () => {
let nativeExit;
let nativeConsoleLog;
let nativeIsCI;
let exitCode;
let output;
beforeEach(() => {
console.log(`${lineSeparator} begin test ${lineSeparator}`);
exitCode = undefined;
output = '';
nativeExit = process.exit;
const chalk = require('chalk');
const elegantStatus = require('elegant-status');
const emoji = require('node-emoji').emoji;
const validations = [
require('./vulnerable-dependencies'),
require('./uncommitted-changes'),
require('./untracked-files'),
require('./sensitive-data'),
require('./branch'),
require('./git-tag'),
];
function runValidation(validation, param, pkg, errs) {
const done = elegantStatus(validation.statusText);
// prettier-ignore
return validation
.run(param, pkg)
bot.sendMessage(msg.chat.id, view.buildMessage(className), view.buildOptions(className))
})
.catch((e) => {
console.log(e)
bot.sendMessage(msg.chat.id, view.error, view.errorKeyboard)
})
}
function checkClass (className) {
if (!classFromName(className)) {
throw new Error(`Class doesn't exist`)
}
}
module.exports = {
message: new RegExp(`${emoji.emoji.question} (.+)`),
handler,
}
function reportSucceededSequence(_message) {
const chalk = require('chalk');
const emoji = require('node-emoji').emoji;
console.log(chalk.yellow('-------------------'));
console.log(emoji['+1'], emoji['+1'], emoji['+1']);
console.log('');
}
export function getEmojiSuggestions(word) {
const emojiOptions = [];
const emojiNames = Object.keys(NodeEmoji.emoji).sort();
for (const emojiName of emojiNames) {
if (word === emojiName.substring(0, word.length)) {
emojiOptions.push(emojiName);
}
}
return emojiOptions;
}
'use strict';
const readFile = require('fs').readFileSync;
const chalk = require('chalk');
const defaults = require('lodash/defaultsDeep');
const pkgd = require('pkgd');
const exec = require('cp-sugar').exec;
const spawn = require('cp-sugar').spawn;
const emoji = require('node-emoji').emoji;
const validate = require('./validations').validate;
const confirm = require('./utils/inquires').confirm;
const DEFAULT_OPTIONS = require('./default-options');
function printReleaseInfo (pkgVersion, publishTag) {
let commitInfo = null;
return exec('git log -1 --oneline')
.then(info => {
commitInfo = info;
return exec('npm whoami --silent');
})
.catch(() => chalk.red(''))
.then(publisher => {
static _findMatches(word) {
const emojiOptions = [];
const emojiNames = Object.keys(emoji.emoji).sort();
for (const emojiName of emojiNames) {
if (word === emojiName.substring(0, word.length)) {
emojiOptions.push(emojiName);
}
}
return emojiOptions;
}
}
const noop = require('lodash/noop');
const chalk = require('chalk');
const elegantStatus = require('elegant-status');
const emoji = require('node-emoji').emoji;
const validations = [
require('./vulnerable-dependencies'),
require('./uncommitted-changes'),
require('./untracked-files'),
require('./sensitive-data'),
require('./branch'),
require('./git-tag')
];
function runValidation (validation, param, pkgInfo, errs) {
const done = module.exports.testMode ? noop : elegantStatus(validation.statusText);
return validation
.run(param, pkgInfo)
.then(() => done(true))
static _findMatches(word) {
const emojiOptions = []
const emojiNames = Object.keys(emoji.emoji).sort();
for (const emojiName of emojiNames) {
if (word === emojiName.substring(0, word.length)) {
emojiOptions.push(emojiName);
}
}
return emojiOptions;
}
export function getEmojiSuggestions(word: string) {
const emojiOptions = [];
const emojiNames = Object.keys(NodeEmoji.emoji).sort();
for (const emojiName of emojiNames) {
if (word === emojiName.substring(0, word.length)) {
emojiOptions.push(emojiName);
}
}
return emojiOptions;
}