@@ -17,26 +17,31 @@ export function getPackageJson(relativePath: string): JSONSchemaForNPMPackageJso
17
17
}
18
18
19
19
const pkg = getPackageJson ( "../../package.json" )
20
+ const codePkg = getPackageJson ( "../../vendor/modules/code-oss-dev/package.json" )
20
21
21
22
export const pkgName = pkg . name || "code-server"
22
23
export const version = pkg . version || "development"
23
24
export const commit = pkg . commit || "development"
24
25
export const rootPath = path . resolve ( __dirname , "../.." )
25
26
export const vsRootPath = path . join ( rootPath , "vendor/modules/code-oss-dev" )
26
- export const codeVersion = require ( path . join ( vsRootPath , "package.json" ) ) . version || "development"
27
+ export const codeVersion = codePkg . version || "development"
27
28
export const tmpdir = path . join ( os . tmpdir ( ) , "code-server" )
28
29
export const isDevMode = commit === "development"
29
30
export const httpProxyUri =
30
31
process . env . HTTPS_PROXY || process . env . https_proxy || process . env . HTTP_PROXY || process . env . http_proxy
31
32
32
- // getVersionString returns a human-readable version string suitable
33
- // for outputting to the console.
33
+ /**
34
+ * getVersionString returns a human-readable version string suitable
35
+ * for outputting to the console.
36
+ */
34
37
export function getVersionString ( ) : string {
35
38
return [ version , commit ] . join ( " " )
36
39
}
37
40
38
- // getVersionJsonString returns a machine-readable version string
39
- // suitable for outputting to the console.
41
+ /**
42
+ * getVersionJsonString returns a machine-readable version string
43
+ * suitable for outputting to the console.
44
+ */
40
45
export function getVersionJsonString ( ) : string {
41
46
return JSON . stringify ( {
42
47
codeServer : version ,
0 commit comments