File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -138,14 +138,6 @@ export class TestProject {
138138 return this . serializeDir ( '.output' , ignoreContentsOfFilenames ) ;
139139 }
140140
141- /**
142- * Read all the files from the test project's `.wxt` directory and combine them into a string
143- * that can be used in a snapshot.
144- */
145- serializeWxtDir ( ) : Promise < string > {
146- return this . serializeDir ( resolve ( this . root , '.wxt/types' ) ) ;
147- }
148-
149141 /**
150142 * Deeply print the filename and contents of all files in a directory.
151143 *
Original file line number Diff line number Diff line change @@ -207,10 +207,6 @@ interface ExtensionReload extends RebuildChange {
207207 type : 'extension-reload' ;
208208}
209209
210- // interface BrowserRestart extends RebuildChange {
211- // type: 'browser-restart';
212- // }
213-
214210interface ContentScriptReload extends RebuildChange {
215211 type : 'content-script-reload' ;
216212 changedSteps : BuildStepOutput [ ] ;
Original file line number Diff line number Diff line change @@ -133,8 +133,8 @@ function printValidationResults({
133133 } , new Map < Entrypoint , ValidationResult [ ] > ( ) ) ;
134134
135135 Array . from ( entrypointErrors . entries ( ) ) . forEach ( ( [ entrypoint , errors ] ) => {
136- wxt . logger . log ( relative ( cwd , entrypoint . inputPath ) ) ;
137- console . log ( ) ;
136+ wxt . logger . log ( relative ( cwd , entrypoint . inputPath ) + '\n' ) ;
137+
138138 errors . forEach ( ( err ) => {
139139 const type = err . type === 'error' ? pc . red ( 'ERROR' ) : pc . yellow ( 'WARN' ) ;
140140 const received = pc . dim ( `(received: ${ JSON . stringify ( err . value ) } )` ) ;
Original file line number Diff line number Diff line change @@ -3,6 +3,5 @@ import { version } from '../../../version';
33import { consola } from 'consola' ;
44
55export function printHeader ( ) {
6- console . log ( ) ;
7- consola . log ( `${ pc . gray ( 'WXT' ) } ${ pc . gray ( pc . bold ( version ) ) } ` ) ;
6+ consola . log ( `\n${ pc . gray ( 'WXT' ) } ${ pc . gray ( pc . bold ( version ) ) } ` ) ;
87}
Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import {
1414 OptionsEntrypoint ,
1515 PopupEntrypoint ,
1616 OutputChunk ,
17- OutputFile ,
1817 OutputAsset ,
1918 BuildOutput ,
2019 BuildStepOutput ,
@@ -208,10 +207,6 @@ export const fakeOutputAsset = fakeObjectCreator<OutputAsset>(() => ({
208207 fileName : fakeFileName ( ) ,
209208} ) ) ;
210209
211- export function fakeOutputFile ( ) : OutputFile {
212- return faker . helpers . arrayElement ( [ fakeOutputAsset ( ) , fakeOutputChunk ( ) ] ) ;
213- }
214-
215210export const fakeManifest = fakeObjectCreator < Browser . runtime . Manifest > ( ( ) => ( {
216211 manifest_version : faker . helpers . arrayElement ( [ 2 , 3 ] ) ,
217212 name : faker . string . alphanumeric ( ) ,
Original file line number Diff line number Diff line change @@ -170,9 +170,6 @@ export function addImportPreset(
170170 preset : UnimportOptions [ 'presets' ] [ 0 ] ,
171171) : void {
172172 wxt . hooks . hook ( 'config:resolved' , ( wxt ) => {
173- // In older versions of WXT, `wxt.config.imports` could be false
174- if ( ! wxt . config . imports ) return ;
175-
176173 wxt . config . imports . presets ??= [ ] ;
177174 // De-duplicate built-in named presets
178175 if ( wxt . config . imports . presets . includes ( preset ) ) return ;
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export function createIframeUi<TMounted>(
1919 iframe . src = browser . runtime . getURL ( options . page ) ;
2020 wrapper . appendChild ( iframe ) ;
2121
22- let mounted : TMounted | undefined = undefined ;
22+ let mounted : TMounted | undefined ;
2323 const mount = ( ) => {
2424 applyPosition ( wrapper , iframe , options ) ;
2525 options . onBeforeMount ?.( wrapper , iframe ) ;
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export function createIntegratedUi<TMounted>(
1414) : IntegratedContentScriptUi < TMounted > {
1515 const wrapper = document . createElement ( options . tag || 'div' ) ;
1616
17- let mounted : TMounted | undefined = undefined ;
17+ let mounted : TMounted | undefined ;
1818 const mount = ( ) => {
1919 applyPosition ( wrapper , undefined , options ) ;
2020 mountUi ( wrapper , options ) ;
Original file line number Diff line number Diff line change @@ -108,15 +108,14 @@ export function mountUi(
108108 break ;
109109 default :
110110 options . append ( anchor , root ) ;
111- break ;
112111 }
113112}
114113
115114export function createMountFunctions < TMounted > (
116115 baseFunctions : BaseMountFunctions ,
117116 options : ContentScriptUiOptions < TMounted > ,
118117) : MountFunctions {
119- let autoMountInstance : AutoMount | undefined = undefined ;
118+ let autoMountInstance : AutoMount | undefined ;
120119
121120 const stopAutoMount = ( ) => {
122121 autoMountInstance ?. stopAutoMount ( ) ;
Original file line number Diff line number Diff line change @@ -29,9 +29,6 @@ let ws: WxtWebSocket | undefined;
2929
3030/**
3131 * Connect to the websocket and listen for messages.
32- *
33- * @param onMessage Optional callback that is called when a message is recieved and we've verified
34- * it's structure is what we expect.
3532 */
3633export function getDevServerWebSocket ( ) : WxtWebSocket {
3734 if ( import . meta. env . COMMAND !== 'serve' )
You can’t perform that action at this time.
0 commit comments