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

Commit 0058f6c

Browse files
committed
Clean up
1 parent bad514f commit 0058f6c

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

commands/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { ensureTextFile } from '../shared/fs.ts'
77
import util from '../shared/util.ts'
88
import { defaultReactVersion } from '../shared/constants.ts'
99
import { VERSION } from '../version.ts'
10-
import { x_brotli, x_flate } from '../server/compress.ts'
10+
import { deno_x_brotli, deno_x_flate } from '../server/compress.ts'
1111

1212
export const helpMessage = `
1313
Usage:
@@ -77,7 +77,7 @@ export default async function (nameArg?: string) {
7777

7878
const urls = Object.values(importMap.imports).filter(v => !v.endsWith('/'))
7979
const p = Deno.run({
80-
cmd: [Deno.execPath(), 'cache', ...urls, x_brotli, x_flate]
80+
cmd: [Deno.execPath(), 'cache', ...urls, deno_x_brotli, deno_x_flate]
8181
})
8282
await p.status()
8383
p.close()

framework/react/context.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ import { createNamedContext } from './helper.ts'
55
import type { RendererStore } from './renderer.ts'
66

77
export const RouterContext = createNamedContext<RouterURL>(createBlankRouterURL(), 'RouterContext')
8-
9-
export const FallbackContext = createNamedContext<{ to: ReactNode }>({
10-
to: null
11-
}, 'FallbackContext')
12-
8+
export const FallbackContext = createNamedContext<{ to: ReactNode }>({ to: null }, 'FallbackContext')
139
export const SSRContext = createContext<RendererStore>({
1410
headElements: new Map(),
1511
inlineStyles: new Map(),

server/compress.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
export const x_brotli = 'https://deno.land/x/[email protected]/mod.ts'
2-
export const x_flate = 'https://deno.land/x/[email protected]/mod.ts'
1+
export const deno_x_brotli = 'https://deno.land/x/[email protected]/mod.ts'
2+
export const deno_x_flate = 'https://deno.land/x/[email protected]/mod.ts'
33

44
class Compression {
55
#brotli: ((data: Uint8Array) => Uint8Array) | null = null
@@ -32,13 +32,13 @@ class Compression {
3232
): Promise<Uint8Array> {
3333
if (encoding === 'br') {
3434
if (this.#brotli === null) {
35-
const { compress } = await import(x_brotli)
35+
const { compress } = await import(deno_x_brotli)
3636
this.#brotli = compress
3737
}
3838
return this.#brotli!(data)
3939
} else if (encoding === 'gzip') {
4040
if (this.#gzip === null) {
41-
const denoflate = await import(x_flate)
41+
const denoflate = await import(deno_x_flate)
4242
this.#gzip = (data: Uint8Array) => denoflate.gzip(data, undefined)
4343
}
4444
return this.#gzip!(data)

0 commit comments

Comments
 (0)