<commit_before>const { resolve, join } = require("path");
const { NormalModule } = require("../../../../");

/**
 * @param {import("../../../../").Compiler} compiler the compiler
 */
var testPlugin = compiler => {
	compiler.hooks.compilation.tap("TestPlugin", compilation => {
		let shouldReplace = false;
		NormalModule.getCompilationHooks(compilation).loader.tap(
			"TestPlugin",
			loaderContext => {
				loaderContext.shouldReplace = shouldReplace;
			}
		);
		compilation.hooks.finishModules.tapAsync(
			"TestPlugin",
			function (modules, callback) {
				const src = resolve(join(__dirname, "other-file.js"));

				/**
				 *<commit_msg>fix typing issue<commit_after>const { resolve, join } = require("path");
const { NormalModule } = require("../../../../");

/**
 * @param {import("../../../../").Compiler} compiler the compiler
 */
var testPlugin = compiler => {
	compiler.hooks.compilation.tap("TestPlugin", compilation => {
		let shouldReplace = false;
		NormalModule.getCompilationHooks(compilation).loader.tap(
			"TestPlugin",
			loaderContext => {
				/** @type {any} */ (loaderContext).shouldReplace = shouldReplace;
			}
		);
		compilation.hooks.finishModules.tapAsync(
			"TestPlugin",
			function (modules, callback) {
				const src = resolve(join(__dirname, "other-file.js"));

				/**
				 *
{'fraction_non_alphanumeric': 0.1872146118721461, 'fraction_numerical': 0.0, 'mean_word_length': 3.4880546075085324, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '7147457', 'n_tokens_mistral': 437, 'n_tokens_neox': 380, 'n_words': 72}