<commit_before># Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Helper to manage DEPS.
"""

import os
import os.path as path
import json
import shutil
import subprocess
import sys

scripts_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(scripts_path)

import devtools_paths

LICENSES = [
    "MIT",
    "Apache-2.0",
    "BSD",
    "BSD-2-Clause",
    "BSD-3-Clause",
    "CC0-1.0",
    "CC-BY-3.0",
    "ISC",
]

# List all DEPS here.
DEPS = {
    "@types/chai": "4.2.0",
    "@types/mocha": "5.2.7",
    "chai": "4.2.0",
    "escodegen": "1.12.0",
    "eslint": "6.0.1",
    "esprima": "git+https://git@github.com/ChromeDevTools/esprima.git#4d0f0e18bd8d3731e5f931bf573af3394cbf7cbe",
    "handlebars": "4.3.1",
    "karma": "4.2.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "3.1.0",
    "karma-coverage-istanbul-instrumenter": "1.0.1",
    "karma-coverage-istanbul-reporter": "2.1.0",
    "karma-mocha": "1.3.0",
    "karma-typescript": "4.1.1",
    "license-checker": "25.0.1",
    "mocha": "6.2.0",
    "puppeteer": "2.0.0",
    "rollup": "1.23.1",
    "typescript": "3.5.3",
    "yargs": "15.0.2"
}

def exec_command(cmd):
    try:
        cmd_proc_result = subprocess.check_call(cmd, cwd=devtools_paths.root_path())
    except CalledProcessError as error:
        print(error.output)
        return True

    return False


def ensure_licenses():<commit_msg>Add typescript-eslint to node_modules<commit_after># Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Helper to manage DEPS.
"""

import os
import os.path as path
import json
import shutil
import subprocess
import sys

scripts_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(scripts_path)

import devtools_paths

LICENSES = [
    "MIT",
    "Apache-2.0",
    "BSD",
    "BSD-2-Clause",
    "BSD-3-Clause",
    "CC0-1.0",
    "CC-BY-3.0",
    "ISC",
]

# List all DEPS here.
DEPS = {
    "@types/chai": "4.2.0",
    "@types/mocha": "5.2.7",
    "@typescript-eslint/parser": "2.16.0",
    "@typescript-eslint/eslint-plugin": "2.16.0",
    "chai": "4.2.0",
    "escodegen": "1.12.0",
    "eslint": "6.0.1",
    "esprima": "git+https://git@github.com/ChromeDevTools/esprima.git#4d0f0e18bd8d3731e5f931bf573af3394cbf7cbe",
    "handlebars": "4.3.1",
    "karma": "4.2.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "3.1.0",
    "karma-coverage-istanbul-instrumenter": "1.0.1",
    "karma-coverage-istanbul-reporter": "2.1.0",
    "karma-mocha": "1.3.0",
    "karma-typescript": "4.1.1",
    "license-checker": "25.0.1",
    "mocha": "6.2.0",
    "puppeteer": "2.0.0",
    "rollup": "1.23.1",
    "typescript": "3.5.3",
    "yargs": "15.0.2"
}

def exec_command(cmd):
    try:
        cmd_proc_result = subprocess.check_call(cmd, cwd=devtools_paths.root_path())
    except CalledProcessError as error:
        print(error.output)
        return True

    return False


def ensure_licenses():
{'fraction_non_alphanumeric': 0.18433469644542308, 'fraction_numerical': 0.06291286568103177, 'mean_word_length': 3.0664961636828645, 'pattern_counts': {'":': 42, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '4647310', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1336, 'n_words': 250}