Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions packages/wxt/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ export class TestProject {
return this.serializeDir('.output', ignoreContentsOfFilenames);
}

/**
* Read all the files from the test project's `.wxt` directory and combine them into a string
* that can be used in a snapshot.
*/
serializeWxtDir(): Promise<string> {
return this.serializeDir(resolve(this.root, '.wxt/types'));
}

/**
* Deeply print the filename and contents of all files in a directory.
*
Expand Down
4 changes: 0 additions & 4 deletions packages/wxt/src/core/utils/building/detect-dev-changes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,6 @@ interface ExtensionReload extends RebuildChange {
type: 'extension-reload';
}

// interface BrowserRestart extends RebuildChange {
// type: 'browser-restart';
// }

interface ContentScriptReload extends RebuildChange {
type: 'content-script-reload';
changedSteps: BuildStepOutput[];
Expand Down
4 changes: 2 additions & 2 deletions packages/wxt/src/core/utils/building/internal-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ function printValidationResults({
}, new Map<Entrypoint, ValidationResult[]>());

Array.from(entrypointErrors.entries()).forEach(([entrypoint, errors]) => {
wxt.logger.log(relative(cwd, entrypoint.inputPath));
console.log();
wxt.logger.log(relative(cwd, entrypoint.inputPath) + '\n');

errors.forEach((err) => {
const type = err.type === 'error' ? pc.red('ERROR') : pc.yellow('WARN');
const recieved = pc.dim(`(recieved: ${JSON.stringify(err.value)})`);
Expand Down
3 changes: 1 addition & 2 deletions packages/wxt/src/core/utils/log/printHeader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ import { version } from '../../../version';
import { consola } from 'consola';

export function printHeader() {
console.log();
consola.log(`${pc.gray('WXT')} ${pc.gray(pc.bold(version))}`);
consola.log(`\n${pc.gray('WXT')} ${pc.gray(pc.bold(version))}`);
}
5 changes: 0 additions & 5 deletions packages/wxt/src/core/utils/testing/fake-objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
OptionsEntrypoint,
PopupEntrypoint,
OutputChunk,
OutputFile,
OutputAsset,
BuildOutput,
BuildStepOutput,
Expand Down Expand Up @@ -204,10 +203,6 @@ export const fakeOutputAsset = fakeObjectCreator<OutputAsset>(() => ({
fileName: fakeFileName(),
}));

export function fakeOutputFile(): OutputFile {
return faker.helpers.arrayElement([fakeOutputAsset(), fakeOutputChunk()]);
}

export const fakeManifest = fakeObjectCreator<Browser.runtime.Manifest>(() => ({
manifest_version: faker.helpers.arrayElement([2, 3]),
name: faker.string.alphanumeric(),
Expand Down
3 changes: 0 additions & 3 deletions packages/wxt/src/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ export function addImportPreset(
preset: UnimportOptions['presets'][0],
): void {
wxt.hooks.hook('config:resolved', (wxt) => {
// In older versions of WXT, `wxt.config.imports` could be false
if (!wxt.config.imports) return;

wxt.config.imports.presets ??= [];
// De-dupelicate built-in named presets
if (wxt.config.imports.presets.includes(preset)) return;
Expand Down
2 changes: 1 addition & 1 deletion packages/wxt/src/utils/content-script-ui/iframe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function createIframeUi<TMounted>(
iframe.src = browser.runtime.getURL(options.page);
wrapper.appendChild(iframe);

let mounted: TMounted | undefined = undefined;
let mounted: TMounted | undefined;
const mount = () => {
applyPosition(wrapper, iframe, options);
options.onBeforeMount?.(wrapper, iframe);
Expand Down
2 changes: 1 addition & 1 deletion packages/wxt/src/utils/content-script-ui/integrated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function createIntegratedUi<TMounted>(
): IntegratedContentScriptUi<TMounted> {
const wrapper = document.createElement(options.tag || 'div');

let mounted: TMounted | undefined = undefined;
let mounted: TMounted | undefined;
const mount = () => {
applyPosition(wrapper, undefined, options);
mountUi(wrapper, options);
Expand Down
3 changes: 1 addition & 2 deletions packages/wxt/src/utils/content-script-ui/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,14 @@ export function mountUi(
break;
default:
options.append(anchor, root);
break;
}
}

export function createMountFunctions<TMounted>(
baseFunctions: BaseMountFunctions,
options: ContentScriptUiOptions<TMounted>,
): MountFunctions {
let autoMountInstance: AutoMount | undefined = undefined;
let autoMountInstance: AutoMount | undefined;

const stopAutoMount = () => {
autoMountInstance?.stopAutoMount();
Expand Down
3 changes: 0 additions & 3 deletions packages/wxt/src/utils/internal/dev-server-websocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ let ws: WxtWebSocket | undefined;

/**
* Connect to the websocket and listen for messages.
*
* @param onMessage Optional callback that is called when a message is recieved and we've verified
* it's structure is what we expect.
*/
export function getDevServerWebSocket(): WxtWebSocket {
if (import.meta.env.COMMAND !== 'serve')
Expand Down
Loading