Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 nitro v3 #2521

Draft
wants to merge 38 commits into
base: v2
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
63cc133
refactor(core)!: remove deprecated exports
pi0 Jun 13, 2024
23c715a
refactor(runtime)!: remove `runtime/*` compatibility exports
pi0 Jun 13, 2024
9bdce70
refactor!: use `nitro` as canonical name
pi0 Jun 13, 2024
c453130
chore: publish nightly with v3 tag
pi0 Jun 13, 2024
646d2f2
chore: bump nightly with 3.0.0-beta
pi0 Jun 13, 2024
d12305b
refactor!: remove `runtime/*` subpath export
pi0 Jun 13, 2024
5d54ed1
refactor!: remove `legacy-externals` plugin
pi0 Jun 13, 2024
f094c66
refactor: remove types for`nitro/runtime/*` subpath exports
pi0 Jun 13, 2024
25df63e
chore: lint with biome
pi0 Jun 13, 2024
d19d3f0
Merge branch 'v2'
pi0 Jun 13, 2024
0bd61f1
chore: update v2/main
pi0 Jun 13, 2024
1c220ef
chore: manually apply changes from #2524 to main
pi0 Jun 13, 2024
7f21afc
chore: use `import type` for `_types.gen.ts`
pi0 Jun 13, 2024
a45a10a
chore: fix build
pi0 Jun 13, 2024
f7e1c46
feat: enable async context by default
pi0 Jun 13, 2024
ba3ee3c
refactor!: remove webpack dynamic require plugin
pi0 Jun 13, 2024
1fe7b89
ci: change tag to 3x
pi0 Jun 13, 2024
b32e083
refactor!: remove app config support (#2526)
pi0 Jun 13, 2024
3253d31
refactor!: always use native fetch in builds (#2527)
pi0 Jun 13, 2024
ebeda79
chore: improve internal `tsconfig.json` (#2529)
danielroe Jun 14, 2024
85769d0
docs: update link to runtime hook source code (#2537)
aryan02420 Jun 17, 2024
7e0b49e
feat!: increase generated `tsconfig.json` strictness (#2533)
danielroe Jun 17, 2024
e1c52af
fix(core): scan handlers when initialising nitro (#2546)
danielroe Jun 19, 2024
77e4b5a
rebase with v2
pi0 Jun 19, 2024
9a71720
Merge branch 'v2'
pi0 Jun 20, 2024
f3b11e2
Merge branch 'v2'
pi0 Jun 26, 2024
859de2d
Merge branch 'v2'
pi0 Jun 28, 2024
e727afd
feat: upgrade to jiti v2 (#2582)
pi0 Jul 2, 2024
24fa444
docs(storage): fix typo (#2639)
iiio2 Jul 31, 2024
a928594
Merge branch 'v2'
pi0 Aug 23, 2024
48e8789
chore: lint
pi0 Aug 23, 2024
27692e3
chore: update undocs
pi0 Sep 4, 2024
97dc8d6
docs: remove old components
pi0 Sep 4, 2024
2917029
chore: update undocs
pi0 Sep 20, 2024
286c18c
fix(scanner)!: limit patterns scanned from `modules/` dir (#2681)
Barbapapazes Sep 28, 2024
67d1275
perf: limit open files in generateFSTree (#2458)
marvin-j97 Sep 29, 2024
d434900
chore: enable `interopDefault` for stub mode
pi0 Sep 30, 2024
359af68
feat: add pdf and wasm to compressible mime types (#2766)
Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: ci
on:
push:
branches:
- v2
- main
pull_request:
branches:
- v2
- main

jobs:
lint:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Create web servers that run anywhere! 📖 [**documentation**](https://nitro.unjs.io)

> [!NOTE]
> You are on the v2 branch. Check [main branch](https://github.com/unjs/nitro/tree/main) for v3 development tree.
> You are on the v3 development branch. Check [here](https://github.com/unjs/nitro/pull/2521/) for status.

## Contribution

Expand Down
19 changes: 12 additions & 7 deletions build.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export default defineBuildConfig({
{ input: "src/types/index.ts" },
],
alias: {
nitropack: "nitropack",
"nitropack/meta": resolve(srcDir, "../meta.ts"),
"nitropack/runtime/meta": resolve(srcDir, "../runtime-meta.mjs"),
nitro: "nitro",
"nitro/meta": resolve(srcDir, "../meta.ts"),
"nitro/runtime/meta": resolve(srcDir, "../runtime-meta.mjs"),
...Object.fromEntries(
subpaths.map((subpath) => [
`nitropack/${subpath}`,
`nitro/${subpath}`,
resolve(srcDir, `${subpath}/index.ts`),
])
),
Expand All @@ -64,12 +64,17 @@ export default defineBuildConfig({
},
externals: [
"nitro",
"nitropack",
"nitropack/runtime/meta",
...subpaths.map((subpath) => `nitropack/${subpath}`),
"nitro/runtime/meta",
...subpaths.map((subpath) => `nitro/${subpath}`),
"firebase-functions",
"@scalar/api-reference",
],
stubOptions: {
jiti: {
// TOODO: remove when unbuild upgraded
interopDefault: true,
},
},
rollup: {
output: {
chunkFileNames(chunk: any) {
Expand Down
15 changes: 0 additions & 15 deletions docs/.docs/components/global/Ellipsis.vue

This file was deleted.

3 changes: 0 additions & 3 deletions docs/.docs/components/global/IconNitro.vue

This file was deleted.

32 changes: 0 additions & 32 deletions docs/.docs/components/global/IconUnJS.vue

This file was deleted.

16 changes: 0 additions & 16 deletions docs/.docs/components/global/Logo.vue

This file was deleted.

Binary file removed docs/.docs/public/favicon.ico
Binary file not shown.
Binary file removed docs/.docs/public/icon.png
Binary file not shown.
38 changes: 0 additions & 38 deletions docs/.docs/public/nitro-dark.svg

This file was deleted.

38 changes: 0 additions & 38 deletions docs/.docs/public/nitro-light.svg

This file was deleted.

2 changes: 1 addition & 1 deletion docs/1.guide/4.storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Nitro has built-in integration with [unjs/unstorage](https://unstorage.unjs.io)
To use the storage layer, you can use the `useStorage()` and call `getItem(key)` to retrieve an item and `setItem(key, value)` to set an item.

```ts
// Default storage is in memory
// Default storage is in-memory
await useStorage().setItem('test:foo', { hello: 'world' })
await useStorage().getItem('test:foo')

Expand Down
2 changes: 1 addition & 1 deletion docs/1.guide/9.plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default defineNitroPlugin((nitro) => {

### Available hooks

See the [source code](https://github.com/unjs/nitro/blob/main/src/runtime/types.ts#L24) for list of all available runtime hooks.
See the [source code](https://github.com/unjs/nitro/blob/main/src/types/runtime/nitro.ts#L46) for list of all available runtime hooks.

- `"close", () => {}`
- `"error", (error, { event? }) => {}`
Expand Down
2 changes: 2 additions & 0 deletions docs/3.config/0.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ List of compressible MIME types:
- `application/json`
- `application/opentype`
- `application/otf`
- `application/pdf`
- `application/pkcs7-mime`
- `application/protobuf`
- `application/rss+xml`
Expand All @@ -171,6 +172,7 @@ List of compressible MIME types:
- `application/vnd.apple.mpegurl`
- `application/vnd.mapbox-vector-tile`
- `application/vnd.ms-fontobject`
- `application/wasm`
- `application/xhtml+xml`
- `application/xml`
- `application/x-font-opentype`
Expand Down
Binary file modified docs/bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"build": "undocs build"
},
"devDependencies": {
"undocs": "^0.2.21"
"undocs": "^0.2.28"
}
}
2 changes: 1 addition & 1 deletion examples/graceful-shutdown/nitro.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { defineNitroConfig } from "nitropack/config";
import { defineNitroConfig } from "nitro/config";

export default defineNitroConfig({});
Loading