File tree Expand file tree Collapse file tree 4 files changed +10
-17
lines changed
Expand file tree Collapse file tree 4 files changed +10
-17
lines changed Original file line number Diff line number Diff line change 1010- Run all tests: ` yarn test `
1111- Run specific test: ` vitest ./src/filename.test.ts `
1212- CI test mode: ` yarn test:ci `
13+ - Integration tests: ` yarn test:integration `
1314
1415## Code Style Guidelines
1516
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ import * as fs from "fs/promises";
66import * as jsonc from "jsonc-parser" ;
77import * as os from "os" ;
88import * as path from "path" ;
9- // Dynamic import for ESM module
10- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11- let prettyBytes : any ;
9+ import prettyBytes from "pretty-bytes" ;
1210import * as semver from "semver" ;
1311import * as vscode from "vscode" ;
1412import {
@@ -852,10 +850,6 @@ export class Remote {
852850 download_bytes_sec : number ;
853851 using_coder_connect : boolean ;
854852 } ) => {
855- // Load ESM module if not already loaded
856- if ( ! prettyBytes ) {
857- prettyBytes = ( await import ( "pretty-bytes" ) ) . default ;
858- }
859853 let statusText = "$(globe) " ;
860854
861855 // Coder Connect doesn't populate any other stats
Original file line number Diff line number Diff line change @@ -3,9 +3,7 @@ import { createWriteStream } from "fs";
33import fs from "fs/promises" ;
44import { IncomingMessage } from "http" ;
55import path from "path" ;
6- // Dynamic import for ESM module
7- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8- let prettyBytes : any ;
6+ import prettyBytes from "pretty-bytes" ;
97import * as vscode from "vscode" ;
108import { errToStr } from "./api-helper" ;
119import * as cli from "./cliManager" ;
@@ -124,10 +122,6 @@ export class Storage {
124122 * downloads being disabled.
125123 */
126124 public async fetchBinary ( restClient : Api , label : string ) : Promise < string > {
127- // Load ESM module if not already loaded
128- if ( ! prettyBytes ) {
129- prettyBytes = ( await import ( "pretty-bytes" ) ) . default ;
130- }
131125 const baseUrl = restClient . getAxiosInstance ( ) . defaults . baseURL ;
132126
133127 // Settings can be undefined when set to their defaults (true in this case),
Original file line number Diff line number Diff line change 11{
22 "compilerOptions" : {
3- "module" : " Node16 " ,
3+ "module" : " commonjs " ,
44 "target" : " ES2022" ,
5+ "moduleResolution" : " node" ,
56 "outDir" : " out" ,
67 // "dom" is required for importing the API from coder/coder.
78 "lib" : [" ES2022" , " dom" ],
89 "sourceMap" : true ,
910 "strict" : true ,
10- "skipLibCheck" : true
11+ "esModuleInterop" : true ,
12+ "skipLibCheck" : true ,
13+ "forceConsistentCasingInFileNames" : true
1114 },
12- "exclude" : [" vitest.config.ts" ]
15+ "exclude" : [" node_modules" , " vitest.config.ts" ],
16+ "include" : [" src/**/*" ]
1317}
You can’t perform that action at this time.
0 commit comments