Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 0456c9d

Browse files
authored
Merge pull request #85 from jajaperson/master
Rename version to VERSION
2 parents f2c8cd9 + 94d2fbe commit 0456c9d

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

cli.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import log from './log.ts'
55
import { getContentType } from './mime.ts'
66
import { listenAndServe, path, ServerRequest, walk } from './std.ts'
77
import util from './util.ts'
8-
import { version } from './version.ts'
8+
import { VERSION } from './version.ts'
99

1010
const commands = {
1111
'init': 'Create a new application',
@@ -15,7 +15,7 @@ const commands = {
1515
'upgrade': 'Upgrade Aleph.js command'
1616
}
1717

18-
const helpMessage = `Aleph.js v${version}
18+
const helpMessage = `Aleph.js v${VERSION}
1919
The React Framework in deno.
2020
2121
Docs: https://alephjs.org/docs
@@ -63,14 +63,14 @@ async function main() {
6363

6464
// prints aleph.js version
6565
if (argOptions.v && command != 'upgrade') {
66-
console.log(`aleph.js v${version}`)
66+
console.log(`aleph.js v${VERSION}`)
6767
Deno.exit(0)
6868
}
6969

7070
// prints aleph.js and deno version
7171
if (argOptions.version && command != 'upgrade') {
7272
const { deno, v8, typescript } = Deno.version
73-
console.log(`aleph.js ${version}`)
73+
console.log(`aleph.js ${VERSION}`)
7474
console.log(`deno ${deno}`)
7575
console.log(`v8 ${v8}`)
7676
console.log(`typescript ${typescript}`)

project.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { APIHandler, Config, RouterURL } from './types.ts'
1515
import util, { hashShort, MB, reHashJs, reHttp, reLocaleID, reMDExt, reModuleExt, reStyleModuleExt } from './util.ts'
1616
import { createHTMLDocument } from './vendor/deno-dom/document.ts'
1717
import less from './vendor/less/less.js'
18-
import { version } from './version.ts'
18+
import { VERSION } from './version.ts'
1919

2020
interface Module {
2121
id: string
@@ -641,7 +641,7 @@ export class Project {
641641
// inject env variables
642642
Object.entries({
643643
...this.config.env,
644-
__version: version,
644+
__version: VERSION,
645645
__buildMode: this.mode,
646646
__buildTarget: this.config.buildTarget,
647647
}).forEach(([key, value]) => Deno.env.set(key, value))
@@ -690,7 +690,7 @@ export class Project {
690690
const { renderPage } = await import('file://' + this.#modules.get('//deno.land/x/aleph/renderer.js')!.jsFile)
691691
this.#renderer = { renderPage }
692692

693-
log.info(colors.bold(`Aleph.js v${version}`))
693+
log.info(colors.bold(`Aleph.js v${VERSION}`))
694694
if (this.config.__file) {
695695
log.info(colors.bold('- Config'))
696696
log.info(' ▲', this.config.__file)
@@ -986,7 +986,7 @@ export class Project {
986986
}
987987
dlUrl = u.toString().replace(/=(&|$)/, '$1')
988988
} 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/')
990990
}
991991
if (mod.sourceHash === '') {
992992
log.info('Download', url, dlUrl != url ? colors.dim(`• ${dlUrl}`) : '')
@@ -1117,7 +1117,7 @@ export class Project {
11171117
reactRefresh: this.isDev && !mod.isRemote,
11181118
rewriteImportPath: (path: string) => this._resolveImportURL(mod, path),
11191119
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)
11211121
useDenos.push(sig)
11221122
return sig
11231123
}
@@ -1567,7 +1567,7 @@ function getHash(content: string | Uint8Array, checkVersion = false) {
15671567
const sha1 = new Sha1()
15681568
sha1.update(content)
15691569
if (checkVersion) {
1570-
sha1.update(version)
1570+
sha1.update(VERSION)
15711571
}
15721572
return sha1.hex()
15731573
}

version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '0.2.28'
1+
export const VERSION = '0.2.28'

0 commit comments

Comments
 (0)