<commit_before>'use strict';
var packageJson = require('../../package.json');
var util = require('util');
console.log("Checking dependencies for wildcards");
var dependencySections = [packageJson.dependencies, packageJson.devDependencies];
dependencySections.forEach(checkDependencySection);

function checkDependencySection(dependencySection) {
    Object.keys(dependencySection).forEach(function (dependencyName) {
        var versionString = dependencySection[dependencyName];
        var allowedCharacters = /^[a-zA-Z\d\.]{1,}$/;
        var valid = allowedCharacters.test(versionString);
        if (!valid) {
            throw new Error(util.format("Dependency %s has a version string (%s) with invalid characters", dependencyName, versionString));
        }
    });
}
console.log("All dependencies are wildcard free");<commit_msg>adding exception for http dependencies.<commit_after>'use strict';
var packageJson = require('../../package.json');
var util = require('util');
console.log("Checking dependencies for wildcards");
var dependencySections = [packageJson.dependencies, packageJson.devDependencies];
dependencySections.forEach(checkDependencySection);

function checkDependencySection(dependencySection) {
    Object.keys(dependencySection).forEach(function (dependencyName) {
        var versionString = dependencySection[dependencyName];
        if (versionString.startsWith('http')) {
            console.warn(util.format('Http dependency detected (%s), skipping.', versionString));
            return;
        }
        var allowedCharacters = /^[a-zA-Z\d\.]{1,}$/;
        var valid = allowedCharacters.test(versionString);
        if (!valid) {
            throw new Error(util.format("Dependency %s has a version string (%s) with invalid characters", dependencyName, versionString));
        }
    });
}
console.log("All dependencies are wildcard free");
{'fraction_non_alphanumeric': 0.1279317697228145, 'fraction_numerical': 0.0010660980810234541, 'mean_word_length': 4.317280453257791, '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': '6075287', 'n_tokens_mistral': 479, 'n_tokens_neox': 458, 'n_words': 114}