<commit_before>const DescriptorStorage = require('./DescriptorStorage');
const Generator = require('@jymfony/compiler/src/SourceMap/Generator');
const ManagedProxy = require('./Proxy/ManagedProxy');
const StackHandler = require('@jymfony/compiler/src/SourceMap/StackHandler');
const CircularDependencyException = require('./Exception/CircularDependencyException');

let Typescript;
let TypescriptConfig;

try {
    Typescript = require('typescript');
    TypescriptConfig = {
        inlineSourceMap: true,
        inlineSources: true,
        declaration: true,
        module: Typescript.ModuleKind.ESNext,
        target: Typescript.ScriptTarget.ES2017,
        noResolve: true,
        isolatedModules: true,
        strict: true,
    };
} catch (e) {
    // @ignoreException
}

let Compiler;
let Parser;
let AST;

const isNyc = !! global.__coverage__;
const { normalize } = require('path');

const Storage = function () {};
Storage.prototype = {};

let codeCache = new Storage();
let _cache = new Storage();

let { resolve } = require;
if (__jymfony.version_compare(process.versions.v8, '12.0.0', '<')) {
    resolve = (id, { paths } = { paths: [ __dirname ]}) => {
        if (id.startsWith('.')) {
            return require.resolve(id, { paths });
        }

        return require.resolve(id, { paths: [ paths[0] + '/node_modules' ] });
    };
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 * because the buffer-to-string conversion in `fs.readFileSync()`
 * translates it to FEFF, the UTF-16 BOM.
 */
const stripBOM = (content) => 0xFEFF === content.charCodeAt(0) ? content.slice(1) : content;
<commit_msg>[Autoloader] add ts to require extension to resolve modules correctly<commit_after>const DescriptorStorage = require('./DescriptorStorage');
const Generator = require('@jymfony/compiler/src/SourceMap/Generator');
const ManagedProxy = require('./Proxy/ManagedProxy');
const StackHandler = require('@jymfony/compiler/src/SourceMap/StackHandler');
const CircularDependencyException = require('./Exception/CircularDependencyException');

let Typescript;
let TypescriptConfig;

try {
    Typescript = require('typescript');
    TypescriptConfig = {
        inlineSourceMap: true,
        inlineSources: true,
        declaration: true,
        module: Typescript.ModuleKind.ESNext,
        target: Typescript.ScriptTarget.ES2017,
        noResolve: true,
        isolatedModules: true,
        strict: true,
    };
} catch (e) {
    // @ignoreException
}

let Compiler;
let Parser;
let AST;

const isNyc = !! global.__coverage__;
const { normalize } = require('path');

const Storage = function () {};
Storage.prototype = {};

let codeCache = new Storage();
let _cache = new Storage();

let { resolve } = require;
if (__jymfony.version_compare(process.versions.v8, '12.0.0', '<')) {
    resolve = (id, { paths } = { paths: [ __dirname ]}) => {
        if (id.startsWith('.')) {
            return require.resolve(id, { paths });
        }

        return require.resolve(id, { paths: [ paths[0] + '/node_modules' ] });
    };
}

if (Typescript) {
    require.extensions['.ts'] = require.extensions['.ts'] ||
        ((m, filename) => __jymfony.autoload.classLoader.loadFile(filename));
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 * because the buffer-to-string conversion in `fs.readFileSync()`
 * translates it to FEFF, the UTF-16 BOM.
 */
const stripBOM = (content) => 0xFEFF === content.charCodeAt(0) ? content.slice(1) : content;

{'fraction_non_alphanumeric': 0.14554794520547945, 'fraction_numerical': 0.0091324200913242, 'mean_word_length': 3.5757180156657964, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '6949920', 'n_tokens_mistral': 1068, 'n_tokens_neox': 1046, 'n_words': 254}