-
-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2167 from honojs/v4
v4
- Loading branch information
Showing
176 changed files
with
12,527 additions
and
5,779 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,6 @@ sandbox | |
worker | ||
.wrangler | ||
|
||
# Bun | ||
bun.lockb | ||
|
||
# Logs | ||
logs | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import config from '../vitest.config' | ||
config.esbuild = { | ||
jsx: 'automatic', | ||
jsxImportSource: __dirname + '/../src/jsx', | ||
} | ||
if (config.test) { | ||
config.test.include = [ | ||
'**/src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', | ||
'src/jsx/hooks/dom.test.tsx', | ||
] | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import config from '../vitest.config' | ||
config.esbuild = { | ||
jsx: 'automatic', | ||
jsxImportSource: __dirname + '/../src/jsx/dom', | ||
} | ||
if (config.test) { | ||
config.test.include = [ | ||
'**/src/jsx/dom/**/(*.)+(spec|test).+(ts|tsx|js)', | ||
'src/jsx/hooks/dom.test.tsx', | ||
] | ||
} | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[install.lockfile] | ||
print = "yarn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
declare namespace Deno { | ||
/** | ||
* Creates a new directory with the specified path. | ||
* | ||
* @param path The path to create a directory. | ||
* @param options Options for creating a directory. | ||
* @returns A promise that resolves when the directory is created. | ||
*/ | ||
export function mkdir(path: string, options?: { recursive?: boolean }): Promise<void> | ||
|
||
/** | ||
* Write a new file, with the specified path and data. | ||
* | ||
* @param path The path to the file to write. | ||
* @param data The data to write to the file. | ||
* @returns A promise that resolves when the file is written. | ||
*/ | ||
export function writeFile(path: string, data: Uint8Array): Promise<void> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { serveStatic } from './serve-static.ts' | ||
export { toSSG, denoFileSystemModule } from './ssg.ts' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { toSSG as baseToSSG } from '../../helper/ssg/index.ts' | ||
import type { FileSystemModule, ToSSGAdaptorInterface } from '../../helper/ssg/index.ts' | ||
|
||
/** | ||
* @experimental | ||
* `denoFileSystemModule` is an experimental feature. | ||
* The API might be changed. | ||
*/ | ||
export const denoFileSystemModule: FileSystemModule = { | ||
writeFile: async (path, data) => { | ||
const uint8Data = | ||
typeof data === 'string' ? new TextEncoder().encode(data) : new Uint8Array(data) | ||
await Deno.writeFile(path, uint8Data) | ||
}, | ||
mkdir: async (path, options) => { | ||
return Deno.mkdir(path, { recursive: options?.recursive ?? false }) | ||
}, | ||
} | ||
|
||
/** | ||
* @experimental | ||
* `toSSG` is an experimental feature. | ||
* The API might be changed. | ||
*/ | ||
export const toSSG: ToSSGAdaptorInterface = async (app, options) => { | ||
return baseToSSG(app, denoFileSystemModule, options) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.