<commit_before>// Current status: Broken.
// Running unpacked tests with the packed extension doesn't work for two main reasons:
//
// 1. State is duplicated - referenced in the packed extension code, and the unpacked tests.
//    This means if we run some extension code then try to read the state in a test to verify
//    it, it's not there.
// 2. Class definitions are also duplicated. If a test gets a class from the extension and then
//    does `item instanceof SomeClass` it will fail because the `SomeClass` the test references
//    is not the same one that the extension used to create the instance.

"use strict";

const path = require("path");

/**
 * @type {import('webpack').Configuration}
 */
const config = {
	devtool: "source-map",
	entry: "./src/extension/extension.ts",
	externals: {
		vscode: "commonjs vscode",
		ws: "ws",
	},
	module: {
		rules: [{
			exclude: /node_modules/,
			test: /\.ts$/,
			use: [{
				loader: "ts-loader",
			}],
		}],
	},
	output: {
		devtoolModuleFilenameTemplate: "../[resource-path]",
		filename: "extension.js",
		libraryTarget: "commonjs2",
		path: path.resolve(__dirname, "out/dist"),
	},
	resolve: {
		extensions: [".ts", ".js"],
	},
	target: "node",
};<commit_msg>Don't exclude ws from packing<commit_after>//@ts-check

"use strict";

const path = require("path");

/**
 * @type {import("webpack").Configuration}
 */
const config = {
	devtool: "source-map",
	entry: "./src/extension/extension.ts",
	// https://webpack.js.org/configuration/externals/
	externals: {
		vscode: "commonjs vscode",
	},
	module: {
		rules: [{
			exclude: /node_modules/,
			test: /\.ts$/,
			use: [{
				loader: "ts-loader",
			}],
		}],
	},
	output: {
		devtoolModuleFilenameTemplate: "../[resource-path]",
		filename: "extension.js",
		libraryTarget: "commonjs2",
		path: path.resolve(__dirname, "out/dist"),
	},
	resolve: {
		extensions: [".ts", ".js"],
	},
	target: "node",
};
{'fraction_non_alphanumeric': 0.1698014629049112, 'fraction_numerical': 0.0020898641588296763, 'mean_word_length': 3.4022988505747125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2595002', 'n_tokens_mistral': 681, 'n_tokens_neox': 625, 'n_words': 189}