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 10
10
- Run all tests: ` yarn test `
11
11
- Run specific test: ` vitest ./src/filename.test.ts `
12
12
- CI test mode: ` yarn test:ci `
13
+ - Integration tests: ` yarn test:integration `
13
14
14
15
## Code Style Guidelines
15
16
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ import * as fs from "fs/promises";
6
6
import * as jsonc from "jsonc-parser" ;
7
7
import * as os from "os" ;
8
8
import * 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" ;
12
10
import * as semver from "semver" ;
13
11
import * as vscode from "vscode" ;
14
12
import {
@@ -852,10 +850,6 @@ export class Remote {
852
850
download_bytes_sec : number ;
853
851
using_coder_connect : boolean ;
854
852
} ) => {
855
- // Load ESM module if not already loaded
856
- if ( ! prettyBytes ) {
857
- prettyBytes = ( await import ( "pretty-bytes" ) ) . default ;
858
- }
859
853
let statusText = "$(globe) " ;
860
854
861
855
// 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";
3
3
import fs from "fs/promises" ;
4
4
import { IncomingMessage } from "http" ;
5
5
import 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" ;
9
7
import * as vscode from "vscode" ;
10
8
import { errToStr } from "./api-helper" ;
11
9
import * as cli from "./cliManager" ;
@@ -124,10 +122,6 @@ export class Storage {
124
122
* downloads being disabled.
125
123
*/
126
124
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
- }
131
125
const baseUrl = restClient . getAxiosInstance ( ) . defaults . baseURL ;
132
126
133
127
// Settings can be undefined when set to their defaults (true in this case),
Original file line number Diff line number Diff line change 1
1
{
2
2
"compilerOptions" : {
3
- "module" : " Node16 " ,
3
+ "module" : " commonjs " ,
4
4
"target" : " ES2022" ,
5
+ "moduleResolution" : " node" ,
5
6
"outDir" : " out" ,
6
7
// "dom" is required for importing the API from coder/coder.
7
8
"lib" : [" ES2022" , " dom" ],
8
9
"sourceMap" : true ,
9
10
"strict" : true ,
10
- "skipLibCheck" : true
11
+ "esModuleInterop" : true ,
12
+ "skipLibCheck" : true ,
13
+ "forceConsistentCasingInFileNames" : true
11
14
},
12
- "exclude" : [" vitest.config.ts" ]
15
+ "exclude" : [" node_modules" , " vitest.config.ts" ],
16
+ "include" : [" src/**/*" ]
13
17
}
You can’t perform that action at this time.
0 commit comments