@@ -15,7 +15,7 @@ import type { APIHandler, Config, RouterURL } from './types.ts'
15
15
import util , { hashShort , MB , reHashJs , reHttp , reLocaleID , reMDExt , reModuleExt , reStyleModuleExt } from './util.ts'
16
16
import { createHTMLDocument } from './vendor/deno-dom/document.ts'
17
17
import less from './vendor/less/less.js'
18
- import { version } from './version.ts'
18
+ import { VERSION } from './version.ts'
19
19
20
20
interface Module {
21
21
id : string
@@ -641,7 +641,7 @@ export class Project {
641
641
// inject env variables
642
642
Object . entries ( {
643
643
...this . config . env ,
644
- __version : version ,
644
+ __version : VERSION ,
645
645
__buildMode : this . mode ,
646
646
__buildTarget : this . config . buildTarget ,
647
647
} ) . forEach ( ( [ key , value ] ) => Deno . env . set ( key , value ) )
@@ -690,7 +690,7 @@ export class Project {
690
690
const { renderPage } = await import ( 'file://' + this . #modules. get ( '//deno.land/x/aleph/renderer.js' ) ! . jsFile )
691
691
this . #renderer = { renderPage }
692
692
693
- log . info ( colors . bold ( `Aleph.js v${ version } ` ) )
693
+ log . info ( colors . bold ( `Aleph.js v${ VERSION } ` ) )
694
694
if ( this . config . __file ) {
695
695
log . info ( colors . bold ( '- Config' ) )
696
696
log . info ( ' ▲' , this . config . __file )
@@ -986,7 +986,7 @@ export class Project {
986
986
}
987
987
dlUrl = u . toString ( ) . replace ( / = ( & | $ ) / , '$1' )
988
988
} else if ( dlUrl . startsWith ( 'https://deno.land/x/aleph/' ) ) {
989
- dlUrl = `https://deno.land/x/aleph@v${ version } /` + util . trimPrefix ( dlUrl , 'https://deno.land/x/aleph/' )
989
+ dlUrl = `https://deno.land/x/aleph@v${ VERSION } /` + util . trimPrefix ( dlUrl , 'https://deno.land/x/aleph/' )
990
990
}
991
991
if ( mod . sourceHash === '' ) {
992
992
log . info ( 'Download' , url , dlUrl != url ? colors . dim ( `• ${ dlUrl } ` ) : '' )
@@ -1117,7 +1117,7 @@ export class Project {
1117
1117
reactRefresh : this . isDev && ! mod . isRemote ,
1118
1118
rewriteImportPath : ( path : string ) => this . _resolveImportURL ( mod , path ) ,
1119
1119
signUseDeno : ( id : string ) => {
1120
- const sig = 'useDeno.' + ( new Sha1 ( ) ) . update ( id ) . update ( version ) . update ( Date . now ( ) . toString ( ) ) . hex ( ) . slice ( 0 , hashShort )
1120
+ const sig = 'useDeno.' + ( new Sha1 ( ) ) . update ( id ) . update ( VERSION ) . update ( Date . now ( ) . toString ( ) ) . hex ( ) . slice ( 0 , hashShort )
1121
1121
useDenos . push ( sig )
1122
1122
return sig
1123
1123
}
@@ -1567,7 +1567,7 @@ function getHash(content: string | Uint8Array, checkVersion = false) {
1567
1567
const sha1 = new Sha1 ( )
1568
1568
sha1 . update ( content )
1569
1569
if ( checkVersion ) {
1570
- sha1 . update ( version )
1570
+ sha1 . update ( VERSION )
1571
1571
}
1572
1572
return sha1 . hex ( )
1573
1573
}
0 commit comments