<commit_before>'use strict';

const bower = require('bower');
const childProcess = require('child_process');
const url = require('url');

const Ana = require('./ana_log');

// Don't retry ECONFLICT ("Unable to find suitable version for...").
// Don't retry ENORESTARGET ("Tag/branch x does not exist").
// Don't retry ECMDERR ("Fatal: reference is not a tree:...")
// Don't retry EMALFORMED ("Unexpected token } in JSON at position:...")
const fatalErrorCodes = ['ECMDERR', 'ECONFLICT', 'ENORESTARGET', 'EMALFORMED'];

/**
 * Service for communicating with Bower on the local machine.
 * Provides support for installing packages, enumerating their dependencies etc...
 */
class Bower {

 /**
  * Clean up (rm -rf) the local Bower working area.<commit_msg>Don't retry on package not found errors (#1060)<commit_after>'use strict';

const bower = require('bower');
const childProcess = require('child_process');
const url = require('url');

const Ana = require('./ana_log');

// Don't retry ECONFLICT ("Unable to find suitable version for...").
// Don't retry ENORESTARGET ("Tag/branch x does not exist").
// Don't retry ECMDERR ("Fatal: reference is not a tree:...")
// Don't retry EMALFORMED ("Unexpected token } in JSON at position:...")
const fatalErrorCodes = ['ECMDERR', 'ECONFLICT', 'ENORESTARGET', 'EMALFORMED', 'ENOTFOUND'];

/**
 * Service for communicating with Bower on the local machine.
 * Provides support for installing packages, enumerating their dependencies etc...
 */
class Bower {

 /**
  * Clean up (rm -rf) the local Bower working area.
{'fraction_non_alphanumeric': 0.14836223506743737, 'fraction_numerical': 0.002569043031470777, 'mean_word_length': 4.3174061433447095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6499552', 'n_tokens_mistral': 467, 'n_tokens_neox': 445, 'n_words': 175}