diff --git a/.github/issue-up.yml b/.github/issue-up.yml deleted file mode 100644 index bdb92c0608..0000000000 --- a/.github/issue-up.yml +++ /dev/null @@ -1,5 +0,0 @@ -# https://github.com/antfu/issue-up -upstream: - nitro: unjs/nitro - unimport: unjs/unimport - untyped: unjs/untyped diff --git a/.github/workflows/docs-check-links.yml b/.github/workflows/docs-check-links.yml index 2090a8fe8f..18aa5cbec0 100644 --- a/.github/workflows/docs-check-links.yml +++ b/.github/workflows/docs-check-links.yml @@ -33,14 +33,14 @@ jobs: with: # arguments with file types to check args: >- - --cache - --verbose - --no-progress - --max-cache-age=1d - './**/*.md' - './**/*.html' + '-c=lychee.toml' + './docs/**/*.md' + './docs/**/*.html' + './packages/*/src/**/*.ts' + './packages/*/src/**/*.js' + './packages/*/src/**/*.md' # fail the action on broken links fail: true env: # to be used in case rate limits are surpassed - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/docs/1.getting-started/1.introduction.md b/docs/1.getting-started/1.introduction.md index 28e8a38178..151f747c3e 100644 --- a/docs/1.getting-started/1.introduction.md +++ b/docs/1.getting-started/1.introduction.md @@ -75,7 +75,7 @@ Nuxt is composed of different [core packages](https://github.com/nuxt/nuxt/tree/ - Core Engine: [nuxt](https://github.com/nuxt/nuxt/tree/main/packages/nuxt) - Bundlers: [@nuxt/vite-builder](https://github.com/nuxt/nuxt/tree/main/packages/vite) and [@nuxt/webpack-builder](https://github.com/nuxt/nuxt/tree/main/packages/webpack) - Command line interface: [nuxi](https://github.com/nuxt/nuxt/tree/main/packages/nuxi) -- Server engine: [nitro](https://github.com/unjs/nitro) +- Server engine: [nitro](https://github.com/nitrojs/nitro) - Development kit: [@nuxt/kit](https://github.com/nuxt/nuxt/tree/main/packages/kit) We recommend reading each concept to have a full vision of Nuxt capabilities and the scope of each package. diff --git a/docs/1.getting-started/12.upgrade.md b/docs/1.getting-started/12.upgrade.md index 717f49c265..cd85d163c8 100644 --- a/docs/1.getting-started/12.upgrade.md +++ b/docs/1.getting-started/12.upgrade.md @@ -42,7 +42,7 @@ You can opt in to the 3.x branch nightly releases with `"nuxt": "npm:nuxt-nightl ## Testing Nuxt 4 -The release date of Nuxt 4 is **to be announced**. It is dependent on having enough time after Nitro's major release to be properly tested in the community. You can follow progress towards Nitro's release in [this PR](https://github.com/unjs/nitro/pull/2521). +The release date of Nuxt 4 is **to be announced**. It is dependent on having enough time after Nitro's major release to be properly tested in the community. You can follow progress towards Nitro's release in [this PR](https://github.com/nitrojs/nitro/pull/2521). Until the release, it is possible to test many of Nuxt 4's breaking changes from Nuxt version 3.12+. diff --git a/docs/1.getting-started/8.server.md b/docs/1.getting-started/8.server.md index 434d7619ef..cf9c43218a 100644 --- a/docs/1.getting-started/8.server.md +++ b/docs/1.getting-started/8.server.md @@ -10,7 +10,7 @@ navigation.icon: i-ph-computer-tower ![Server engine](/assets/docs/getting-started/server.svg) -Nuxt's server is [Nitro](https://github.com/unjs/nitro). It was originally created for Nuxt but is now part of [UnJS](https://unjs.io) and open for other frameworks - and can even be used on its own. +Nuxt's server is [Nitro](https://github.com/nitrojs/nitro). It was originally created for Nuxt but is now part of [UnJS](https://unjs.io) and open for other frameworks - and can even be used on its own. Using Nitro gives Nuxt superpowers: diff --git a/docs/2.guide/1.concepts/4.server-engine.md b/docs/2.guide/1.concepts/4.server-engine.md index b668b85c10..7ee4591963 100644 --- a/docs/2.guide/1.concepts/4.server-engine.md +++ b/docs/2.guide/1.concepts/4.server-engine.md @@ -57,6 +57,6 @@ Nuxt generates this dist when running `nuxt build` into a [`.output`](/docs/guid The output contains runtime code to run your Nuxt server in any environment (including experimental browser service workers!) and serve your static files, making it a true hybrid framework for the JAMstack. In addition, Nuxt implements a native storage layer, supporting multi-source drivers and local assets. -::read-more{color="gray" icon="i-simple-icons-github" to="https://github.com/unjs/nitro" target="_blank"} +::read-more{color="gray" icon="i-simple-icons-github" to="https://github.com/nitrojs/nitro" target="_blank"} Read more about Nitro engine on GitHub. :: diff --git a/docs/2.guide/2.directory-structure/3.app-config.md b/docs/2.guide/2.directory-structure/3.app-config.md index d170a6ce5a..f35bfb7196 100644 --- a/docs/2.guide/2.directory-structure/3.app-config.md +++ b/docs/2.guide/2.directory-structure/3.app-config.md @@ -173,5 +173,5 @@ Related issues: ::info Nitro v3 will resolve these limitations by removing support for the app config. -You can track the progress in [this pull request](https://github.com/unjs/nitro/pull/2521). +You can track the progress in [this pull request](https://github.com/nitrojs/nitro/pull/2521). :: diff --git a/docs/3.api/6.advanced/1.hooks.md b/docs/3.api/6.advanced/1.hooks.md index 3c5381308a..7e34060918 100644 --- a/docs/3.api/6.advanced/1.hooks.md +++ b/docs/3.api/6.advanced/1.hooks.md @@ -99,7 +99,7 @@ Hook | Arguments | Description `render:html` | `html, { event }` | Called before constructing the HTML. | [html](https://github.com/nuxt/nuxt/blob/71ef8bd3ff207fd51c2ca18d5a8c7140476780c7/packages/nuxt/src/core/runtime/nitro/renderer.ts#L15), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38) `render:island` | `islandResponse, { event, islandContext }` | Called before constructing the island HTML. | [islandResponse](https://github.com/nuxt/nuxt/blob/e50cabfed1984c341af0d0c056a325a8aec26980/packages/nuxt/src/core/runtime/nitro/renderer.ts#L28), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), [islandContext](https://github.com/nuxt/nuxt/blob/e50cabfed1984c341af0d0c056a325a8aec26980/packages/nuxt/src/core/runtime/nitro/renderer.ts#L38) `close` | - | Called when Nitro is closed. | - -`error` | `error, { event? }` | Called when an error occurs. | [error](https://github.com/unjs/nitro/blob/d20ffcbd16fc4003b774445e1a01e698c2bb078a/src/types/runtime/nitro.ts#L48), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38) +`error` | `error, { event? }` | Called when an error occurs. | [error](https://github.com/nitrojs/nitro/blob/d20ffcbd16fc4003b774445e1a01e698c2bb078a/src/types/runtime/nitro.ts#L48), [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38) `request` | `event` | Called when a request is received. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38) `beforeResponse` | `event, { body }` | Called before sending the response. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), unknown `afterResponse` | `event, { body }` | Called after sending the response. | [event](https://github.com/unjs/h3/blob/f6ceb5581043dc4d8b6eab91e9be4531e0c30f8e/src/types.ts#L38), unknown diff --git a/docs/5.community/4.contribution.md b/docs/5.community/4.contribution.md index d8e58c24dc..7f024ff84c 100644 --- a/docs/5.community/4.contribution.md +++ b/docs/5.community/4.contribution.md @@ -137,7 +137,7 @@ Under projects with configuration as shown below, Corepack will install `v7.5.0` #### Use ESLint -We use [ESLint](https://eslint.org) for both linting and formatting with [`@nuxt/eslint-config`](https://github.com/nuxt/eslint-config). +We use [ESLint](https://eslint.org) for both linting and formatting with [`@nuxt/eslint`](https://github.com/nuxt/eslint). ##### IDE Setup @@ -158,11 +158,9 @@ Since ESLint is already configured to format the code, there is no need to dupli If you have Prettier installed in your editor, we recommend you disable it when working on the project to avoid conflict. -**Note**: [we are discussing](https://github.com/nuxt/eslint-config/issues/224) enabling Prettier in future. - #### Package Manager -For libraries, we recommend `pnpm`. For modules, we still recommend `yarn` but we may well switch this recommendation to `pnpm` in future once we support plug and play mode with Nuxt itself. +We recommend `pnpm` as a package manager for modules, libraries and apps. It is important to enable Corepack to ensure you are on the same version of the package manager as the project. Corepack is built-in to new node versions for seamless package manager integration. diff --git a/lychee.toml b/lychee.toml index b00e5bee37..8f9c2921e0 100644 --- a/lychee.toml +++ b/lychee.toml @@ -1,9 +1,18 @@ # Cache the results of Lychee if ran locally in order to minimise the chance of rate limiting cache = true + +# Discard all cached requests older than this duration. +max_cache_age = "1d" # Ignore all private link (such as localhost) to avoid errors exclude_all_private = true # HTTP status code: 429 (Too Many Requests) will also be treated as a valid link if Lychee gets rate limited accept = [200, 429] + +# Base URL or website root directory to check relative URLs. +base = "https://nuxt.com" + +no_progress = true + # retry max_retries = 6 # Explicitly exclude some URLs @@ -11,10 +20,17 @@ exclude = [ "https://twitter.nuxt.dev/", "https://github.com/nuxt/translations/discussions/4", "https://stackoverflow.com/help/minimal-reproducible-example", - # TODO: remove when their SSL certificate is valid again - "https://www.conventionalcommits.org", + "https://gsap.com/", + # dummy example URLs + "https://myawesome-lib.js/", + "https://awesome-lib.js/", + "https://myawesome-lib.css/", + "https://awesome-lib.css/", + 'https://www.npmjs.com/package/(.*)importName(.*)', + # TODO: address 404s (non-prerendered files?) from nuxt.com + "https://nuxt.com/docs/guide/going-further/modules", + "https://nuxt.com/docs/guide/directory-structure/pages", # single-quotes are required for regexp - '(https?:\/\/github\.com\/)(.*\/)(generate)', - "https://localhost:3000", + '(https?:\/\/github\.com\/)(.*\/)(generate)', "https://github.com/nuxt-contrib/vue3-ssr-starter/generate", ] diff --git a/packages/kit/src/runtime-config.ts b/packages/kit/src/runtime-config.ts index 034c59fa14..e25a387ee7 100644 --- a/packages/kit/src/runtime-config.ts +++ b/packages/kit/src/runtime-config.ts @@ -36,9 +36,9 @@ export function updateRuntimeConfig (runtimeConfig: Record) { } /** - * https://github.com/unjs/nitro/blob/main/src/runtime/utils.env.ts. + * https://github.com/nitrojs/nitro/blob/main/src/runtime/internal/utils.env.ts. * - * These utils will be replaced by util exposed from nitropack. See https://github.com/unjs/nitro/pull/2404 + * These utils will be replaced by util exposed from nitropack. See https://github.com/nitrojs/nitro/pull/2404 * for more context and future plans.) * * @internal diff --git a/packages/nuxt/src/core/nitro.ts b/packages/nuxt/src/core/nitro.ts index 66bd666bf4..d5da556ee3 100644 --- a/packages/nuxt/src/core/nitro.ts +++ b/packages/nuxt/src/core/nitro.ts @@ -86,7 +86,7 @@ export async function initNitro (nuxt: Nuxt & { _nitro?: Nitro }) { from: resolve(distDir, 'core/runtime/nitro/paths'), }, { - // TODO: Remove after https://github.com/unjs/nitro/issues/1049 + // TODO: Remove after https://github.com/nitrojs/nitro/issues/1049 as: 'defineAppConfig', name: 'defineAppConfig', from: resolve(distDir, 'core/runtime/nitro/config'), diff --git a/packages/nuxt/src/core/runtime/nitro/error.ts b/packages/nuxt/src/core/runtime/nitro/error.ts index 25f6cca69d..003fc14e65 100644 --- a/packages/nuxt/src/core/runtime/nitro/error.ts +++ b/packages/nuxt/src/core/runtime/nitro/error.ts @@ -86,7 +86,7 @@ export default async function errorhandler (error: H3Error, } /** - * Nitro internal functions extracted from https://github.com/unjs/nitro/blob/main/src/runtime/internal/utils.ts + * Nitro internal functions extracted from https://github.com/nitrojs/nitro/blob/main/src/runtime/internal/utils.ts */ function isJsonRequest (event: H3Event) { @@ -112,7 +112,7 @@ function hasReqHeader (event: H3Event, name: string, includes: string) { } function normalizeError (error: any) { - // temp fix for https://github.com/unjs/nitro/issues/759 + // temp fix for https://github.com/nitrojs/nitro/issues/759 // TODO: investigate vercel-edge not using unenv pollyfill const cwd = typeof process.cwd === 'function' ? process.cwd() : '/' diff --git a/packages/schema/src/config/experimental.ts b/packages/schema/src/config/experimental.ts index 9479ffd402..8a00c71794 100644 --- a/packages/schema/src/config/experimental.ts +++ b/packages/schema/src/config/experimental.ts @@ -99,7 +99,7 @@ export default defineUntypedSchema({ }, // TODO: Remove when nitro has support for mocking traced dependencies - // https://github.com/unjs/nitro/issues/1118 + // https://github.com/nitrojs/nitro/issues/1118 /** * Externalize `vue`, `@vue/*` and `vue-router` when building. * @see [Nuxt Issue #13632](https://github.com/nuxt/nuxt/issues/13632)