From 02390109c903fa9737e4a81ac1e517ed4c465676 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Mon, 9 Dec 2024 14:25:38 +0000 Subject: [PATCH] test: add additional attw test for built packages (#30206) --- .github/workflows/ci.yml | 3 + package.json | 2 + packages/kit/.attw.json | 3 + packages/kit/package.json | 3 +- packages/nuxt/.attw.json | 3 + packages/nuxt/app/defaults.d.ts | 1 + packages/nuxt/package.json | 12 +- .../app/components/nuxt-route-announcer.ts | 2 +- .../nuxt/src/app/composables/asyncData.ts | 7 +- packages/nuxt/src/app/composables/fetch.ts | 6 +- packages/nuxt/src/app/composables/index.ts | 1 + packages/nuxt/src/app/index.ts | 2 +- packages/nuxt/src/app/nuxt.ts | 9 +- packages/nuxt/src/core/app.ts | 4 +- .../nuxt/src/core/plugins/plugin-metadata.ts | 3 +- packages/nuxt/src/core/runtime/nitro/error.ts | 4 +- .../nuxt/src/core/runtime/nitro/renderer.ts | 3 +- .../nuxt/src/pages/runtime/composables.ts | 2 +- .../nuxt/src/pages/runtime/plugins/router.ts | 3 +- packages/rspack/.attw.json | 3 + packages/rspack/package.json | 3 +- packages/schema/.attw.json | 5 + packages/schema/build.config.ts | 2 +- packages/schema/builder-env.d.ts | 2 +- packages/schema/package.json | 4 +- packages/schema/src/config/experimental.ts | 2 +- packages/vite/.attw.json | 3 + packages/vite/package.json | 3 +- packages/webpack/.attw.json | 3 + packages/webpack/package.json | 3 +- pnpm-lock.yaml | 211 ++++++++++++++++++ test/fixtures/basic-types/types.ts | 7 +- 32 files changed, 288 insertions(+), 36 deletions(-) create mode 100644 packages/kit/.attw.json create mode 100644 packages/nuxt/.attw.json create mode 100644 packages/nuxt/app/defaults.d.ts create mode 100644 packages/rspack/.attw.json create mode 100644 packages/schema/.attw.json create mode 100644 packages/vite/.attw.json create mode 100644 packages/webpack/.attw.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 756a93c2d1..db86af612a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,6 +56,9 @@ jobs: - name: Build run: pnpm build + - name: Check types + run: pnpm test:attw + - name: Cache dist uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: diff --git a/package.json b/package.json index 07d493c374..c2675cfaf6 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "test:runtime": "vitest -c vitest.nuxt.config.ts", "test:types": "pnpm --filter './test/fixtures/**' test:types", "test:unit": "vitest run packages/", + "test:attw": "pnpm --filter './packages/**' test:attw", "typecheck": "tsc --noEmit", "typecheck:docs": "DOCS_TYPECHECK=true pnpm nuxi prepare && nuxt-content-twoslash verify --content-dir docs --languages html" }, @@ -62,6 +63,7 @@ "vue": "3.5.13" }, "devDependencies": { + "@arethetypeswrong/cli": "0.17.1", "@nuxt/eslint-config": "0.7.2", "@nuxt/kit": "workspace:*", "@nuxt/rspack-builder": "workspace:*", diff --git a/packages/kit/.attw.json b/packages/kit/.attw.json new file mode 100644 index 0000000000..ac2579855e --- /dev/null +++ b/packages/kit/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm"] +} diff --git a/packages/kit/package.json b/packages/kit/package.json index e55ee2b447..4ab5fe5373 100644 --- a/packages/kit/package.json +++ b/packages/kit/package.json @@ -23,7 +23,8 @@ "dist" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "dependencies": { "@nuxt/schema": "workspace:*", diff --git a/packages/nuxt/.attw.json b/packages/nuxt/.attw.json new file mode 100644 index 0000000000..80f18ecbfd --- /dev/null +++ b/packages/nuxt/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm", "false-esm"] +} diff --git a/packages/nuxt/app/defaults.d.ts b/packages/nuxt/app/defaults.d.ts new file mode 100644 index 0000000000..40999029b6 --- /dev/null +++ b/packages/nuxt/app/defaults.d.ts @@ -0,0 +1 @@ +export * from '../dist/app/defaults' diff --git a/packages/nuxt/package.json b/packages/nuxt/package.json index 1b1cd823ca..50a7835402 100644 --- a/packages/nuxt/package.json +++ b/packages/nuxt/package.json @@ -37,6 +37,10 @@ "types": "./dist/app/index.d.ts", "import": "./dist/app/index.js" }, + "./app/defaults": { + "types": "./dist/app/defaults.d.ts", + "import": "./dist/app/defaults.js" + }, "./package.json": "./package.json" }, "imports": { @@ -44,16 +48,13 @@ "types": "./dist/app/index.d.ts", "import": "./dist/app/index.js" }, - "#app/defaults": { - "types": "./dist/app/defaults.d.ts", - "import": "./dist/app/defaults.js" - }, "#app/nuxt": { "types": "./dist/app/nuxt.d.ts", "import": "./dist/app/nuxt.js" } }, "files": [ + "app/defaults.d.ts", "app.d.ts", "bin", "types.d.ts", @@ -64,7 +65,8 @@ "schema.*" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "dependencies": { "@nuxt/devalue": "^2.0.2", diff --git a/packages/nuxt/src/app/components/nuxt-route-announcer.ts b/packages/nuxt/src/app/components/nuxt-route-announcer.ts index 035e9e9e50..389ae3be0c 100644 --- a/packages/nuxt/src/app/components/nuxt-route-announcer.ts +++ b/packages/nuxt/src/app/components/nuxt-route-announcer.ts @@ -1,5 +1,5 @@ import { defineComponent, h } from 'vue' -import type { Politeness } from '#app/composables/route-announcer' +import type { Politeness } from 'nuxt/app' import { useRouteAnnouncer } from '#app/composables/route-announcer' export default defineComponent({ diff --git a/packages/nuxt/src/app/composables/asyncData.ts b/packages/nuxt/src/app/composables/asyncData.ts index 9dc1144424..ef68f6c74f 100644 --- a/packages/nuxt/src/app/composables/asyncData.ts +++ b/packages/nuxt/src/app/composables/asyncData.ts @@ -1,5 +1,9 @@ import { computed, getCurrentInstance, getCurrentScope, onBeforeMount, onScopeDispose, onServerPrefetch, onUnmounted, ref, shallowRef, toRef, unref, watch } from 'vue' import type { MultiWatchSources, Ref } from 'vue' + +// TODO: temporary module for backwards compatibility +import type { DedupeOption, DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from 'nuxt/app/defaults' + import type { NuxtApp } from '../nuxt' import { useNuxtApp } from '../nuxt' import { toArray } from '../utils' @@ -10,9 +14,6 @@ import { onNuxtReady } from './ready' // @ts-expect-error virtual file import { asyncDataDefaults, resetAsyncDataToUndefined } from '#build/nuxt.config.mjs' -// TODO: temporary module for backwards compatibility -import type { DedupeOption, DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from '#app/defaults' - export type AsyncDataRequestStatus = 'idle' | 'pending' | 'success' | 'error' export type _Transform = (input: Input) => Output | Promise diff --git a/packages/nuxt/src/app/composables/fetch.ts b/packages/nuxt/src/app/composables/fetch.ts index d505af3501..d1e8906e55 100644 --- a/packages/nuxt/src/app/composables/fetch.ts +++ b/packages/nuxt/src/app/composables/fetch.ts @@ -4,13 +4,13 @@ import type { MaybeRef, Ref } from 'vue' import { computed, reactive, toValue } from 'vue' import { hash } from 'ohash' +// TODO: temporary module for backwards compatibility +import type { DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from 'nuxt/app/defaults' + import { useRequestFetch } from './ssr' import type { AsyncData, AsyncDataOptions, KeysOf, MultiWatchSources, PickFrom } from './asyncData' import { useAsyncData } from './asyncData' -// TODO: temporary module for backwards compatibility -import type { DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from '#app/defaults' - // @ts-expect-error virtual file import { fetchDefaults } from '#build/nuxt.config.mjs' diff --git a/packages/nuxt/src/app/composables/index.ts b/packages/nuxt/src/app/composables/index.ts index 7d5e0e317f..c837ba8dfb 100644 --- a/packages/nuxt/src/app/composables/index.ts +++ b/packages/nuxt/src/app/composables/index.ts @@ -38,4 +38,5 @@ export { useRequestURL } from './url' export { usePreviewMode } from './preview' export { useId } from './id' export { useRouteAnnouncer } from './route-announcer' +export type { Politeness } from './route-announcer' export { useRuntimeHook } from './runtime-hook' diff --git a/packages/nuxt/src/app/index.ts b/packages/nuxt/src/app/index.ts index c530599b28..9935ab9f75 100644 --- a/packages/nuxt/src/app/index.ts +++ b/packages/nuxt/src/app/index.ts @@ -2,7 +2,7 @@ export { applyPlugin, applyPlugins, callWithNuxt, createNuxtApp, defineAppConfig export type { CreateOptions, NuxtApp, NuxtPayload, NuxtPluginIndicator, NuxtSSRContext, ObjectPlugin, Plugin, PluginEnvContext, PluginMeta, ResolvedPluginMeta, RuntimeNuxtHooks } from './nuxt' export { defineNuxtComponent, useAsyncData, useLazyAsyncData, useNuxtData, refreshNuxtData, clearNuxtData, useHydration, callOnce, useState, clearNuxtState, clearError, createError, isNuxtError, showError, useError, useFetch, useLazyFetch, useCookie, refreshCookie, onPrehydrate, prerenderRoutes, useRequestHeaders, useRequestEvent, useRequestFetch, setResponseStatus, useResponseHeader, onNuxtReady, abortNavigation, addRouteMiddleware, defineNuxtRouteMiddleware, onBeforeRouteLeave, onBeforeRouteUpdate, setPageLayout, navigateTo, useRoute, useRouter, preloadComponents, prefetchComponents, preloadRouteComponents, isPrerendered, loadPayload, preloadPayload, definePayloadReducer, definePayloadReviver, getAppManifest, getRouteRules, reloadNuxtApp, useRequestURL, usePreviewMode, useId, useRouteAnnouncer, useHead, useSeoMeta, useServerSeoMeta, useRuntimeHook } from './composables/index' -export type { AddRouteMiddlewareOptions, AsyncData, AsyncDataOptions, AsyncDataRequestStatus, CookieOptions, CookieRef, FetchResult, NuxtAppManifest, NuxtAppManifestMeta, NuxtError, ReloadNuxtAppOptions, RouteMiddleware, UseFetchOptions } from './composables/index' +export type { AddRouteMiddlewareOptions, AsyncData, AsyncDataOptions, AsyncDataRequestStatus, CookieOptions, CookieRef, FetchResult, NuxtAppManifest, NuxtAppManifestMeta, NuxtError, Politeness, ReloadNuxtAppOptions, RouteMiddleware, UseFetchOptions } from './composables/index' export { defineNuxtLink } from './components/index' export type { NuxtLinkOptions, NuxtLinkProps } from './components/index' diff --git a/packages/nuxt/src/app/nuxt.ts b/packages/nuxt/src/app/nuxt.ts index 82c2e3d37b..1cfc640b2b 100644 --- a/packages/nuxt/src/app/nuxt.ts +++ b/packages/nuxt/src/app/nuxt.ts @@ -11,6 +11,11 @@ import type { RenderResponse } from 'nitropack' import type { LogObject } from 'consola' import type { MergeHead, VueHeadClient } from '@unhead/vue' +import type { NuxtAppLiterals } from 'nuxt/app' + +// TODO: temporary module for backwards compatibility +import type { DefaultAsyncDataErrorValue, DefaultErrorValue } from 'nuxt/app/defaults' + import type { NuxtIslandContext } from '../app/types' import type { RouteMiddleware } from '../app/composables/router' import type { NuxtError } from '../app/composables/error' @@ -22,10 +27,6 @@ import type { RouteAnnouncer } from '../app/composables/route-announcer' // @ts-expect-error virtual file import { appId, chunkErrorEvent, multiApp } from '#build/nuxt.config.mjs' -// TODO: temporary module for backwards compatibility -import type { DefaultAsyncDataErrorValue, DefaultErrorValue } from '#app/defaults' -import type { NuxtAppLiterals } from '#app' - function getNuxtAppCtx (id = appId || 'nuxt-app') { return getContext(id, { asyncContext: !!__NUXT_ASYNC_CONTEXT__ && import.meta.server, diff --git a/packages/nuxt/src/core/app.ts b/packages/nuxt/src/core/app.ts index 7648b0e0fb..3837d2b057 100644 --- a/packages/nuxt/src/core/app.ts +++ b/packages/nuxt/src/core/app.ts @@ -4,12 +4,12 @@ import { defu } from 'defu' import { compileTemplate as _compileTemplate, findPath, logger, normalizePlugin, normalizeTemplate, resolveAlias, resolveFiles, resolvePath, templateUtils } from '@nuxt/kit' import type { Nuxt, NuxtApp, NuxtPlugin, NuxtTemplate, ResolvedNuxtTemplate } from 'nuxt/schema' +import type { PluginMeta } from 'nuxt/app' + import * as defaultTemplates from './templates' import { getNameFromPath, hasSuffix, uniqueBy } from './utils' import { extractMetadata, orderMap } from './plugins/plugin-metadata' -import type { PluginMeta } from '#app' - export function createApp (nuxt: Nuxt, options: Partial = {}): NuxtApp { return defu(options, { dir: nuxt.options.srcDir, diff --git a/packages/nuxt/src/core/plugins/plugin-metadata.ts b/packages/nuxt/src/core/plugins/plugin-metadata.ts index 495a2e0507..728e68e41b 100644 --- a/packages/nuxt/src/core/plugins/plugin-metadata.ts +++ b/packages/nuxt/src/core/plugins/plugin-metadata.ts @@ -7,11 +7,10 @@ import { createUnplugin } from 'unplugin' import MagicString from 'magic-string' import { normalize } from 'pathe' import { logger } from '@nuxt/kit' +import type { ObjectPlugin, PluginMeta } from 'nuxt/app' import { parseAndWalk, withLocations } from '../../core/utils/parse' -import type { ObjectPlugin, PluginMeta } from '#app' - const internalOrderMap = { // -50: pre-all (nuxt) 'nuxt-pre-all': -50, diff --git a/packages/nuxt/src/core/runtime/nitro/error.ts b/packages/nuxt/src/core/runtime/nitro/error.ts index a6cb2190e9..de7e89192d 100644 --- a/packages/nuxt/src/core/runtime/nitro/error.ts +++ b/packages/nuxt/src/core/runtime/nitro/error.ts @@ -2,10 +2,12 @@ import { joinURL, withQuery } from 'ufo' import type { NitroErrorHandler } from 'nitropack' import type { H3Error } from 'h3' import { getRequestHeaders, send, setResponseHeader, setResponseStatus } from 'h3' + +import type { NuxtPayload } from 'nuxt/app' + import { useRuntimeConfig } from '#internal/nitro' import { useNitroApp } from '#internal/nitro/app' import { isJsonRequest, normalizeError } from '#internal/nitro/utils' -import type { NuxtPayload } from '#app' export default async function errorhandler (error: H3Error, event) { // Parse and normalize error diff --git a/packages/nuxt/src/core/runtime/nitro/renderer.ts b/packages/nuxt/src/core/runtime/nitro/renderer.ts index 024a54fa96..bec00f7492 100644 --- a/packages/nuxt/src/core/runtime/nitro/renderer.ts +++ b/packages/nuxt/src/core/runtime/nitro/renderer.ts @@ -21,6 +21,8 @@ import type { Head, HeadEntryOptions } from '@unhead/schema' import type { Link, Script, Style } from '@unhead/vue' import { createServerHead, resolveUnrefHeadInput } from '@unhead/vue' +import type { NuxtPayload, NuxtSSRContext } from 'nuxt/app' + import { defineRenderHandler, getRouteRules, useRuntimeConfig, useStorage } from '#internal/nitro' import { useNitroApp } from '#internal/nitro/app' @@ -29,7 +31,6 @@ import unheadPlugins from '#internal/unhead-plugins.mjs' // @ts-expect-error virtual file import { renderSSRHeadOptions } from '#internal/unhead.config.mjs' -import type { NuxtPayload, NuxtSSRContext } from '#app' // @ts-expect-error virtual file import { appHead, appId, appRootAttrs, appRootTag, appTeleportAttrs, appTeleportTag, componentIslands, appManifest as isAppManifestEnabled, multiApp } from '#internal/nuxt.config.mjs' // @ts-expect-error virtual file diff --git a/packages/nuxt/src/pages/runtime/composables.ts b/packages/nuxt/src/pages/runtime/composables.ts index 7880812a8f..7a5b59eb46 100644 --- a/packages/nuxt/src/pages/runtime/composables.ts +++ b/packages/nuxt/src/pages/runtime/composables.ts @@ -3,8 +3,8 @@ import { getCurrentInstance } from 'vue' import type { RouteLocationNormalized, RouteLocationNormalizedLoaded, RouteRecordRaw, RouteRecordRedirectOption } from 'vue-router' import { useRoute } from 'vue-router' import type { NitroRouteConfig } from 'nitropack' +import type { NuxtError } from 'nuxt/app' import { useNuxtApp } from '#app/nuxt' -import type { NuxtError } from '#app' export interface PageMeta { [key: string]: unknown diff --git a/packages/nuxt/src/pages/runtime/plugins/router.ts b/packages/nuxt/src/pages/runtime/plugins/router.ts index 0bf42801ef..894d915a5d 100644 --- a/packages/nuxt/src/pages/runtime/plugins/router.ts +++ b/packages/nuxt/src/pages/runtime/plugins/router.ts @@ -5,10 +5,11 @@ import { START_LOCATION, createMemoryHistory, createRouter, createWebHashHistory import { createError } from 'h3' import { isEqual, withoutBase } from 'ufo' +import type { Plugin, RouteMiddleware } from 'nuxt/app' import type { PageMeta } from '../composables' import { toArray } from '../utils' -import type { Plugin, RouteMiddleware } from '#app' + import { getRouteRules } from '#app/composables/manifest' import { defineNuxtPlugin, useRuntimeConfig } from '#app/nuxt' import { clearError, showError, useError } from '#app/composables/error' diff --git a/packages/rspack/.attw.json b/packages/rspack/.attw.json new file mode 100644 index 0000000000..ac2579855e --- /dev/null +++ b/packages/rspack/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm"] +} diff --git a/packages/rspack/package.json b/packages/rspack/package.json index 7c2fe3ad17..7f08d48eef 100644 --- a/packages/rspack/package.json +++ b/packages/rspack/package.json @@ -26,7 +26,8 @@ "builder.mjs" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "dependencies": { "@nuxt/friendly-errors-webpack-plugin": "^2.6.0", diff --git a/packages/schema/.attw.json b/packages/schema/.attw.json new file mode 100644 index 0000000000..7aa79ea413 --- /dev/null +++ b/packages/schema/.attw.json @@ -0,0 +1,5 @@ +{ + "ignoreRules": [ + "cjs-resolves-to-esm" + ] +} diff --git a/packages/schema/build.config.ts b/packages/schema/build.config.ts index a909ceba30..95ad1ce591 100644 --- a/packages/schema/build.config.ts +++ b/packages/schema/build.config.ts @@ -22,7 +22,7 @@ export default defineBuildConfig({ ], externals: [ // Type imports - '#app/components/nuxt-link', + 'nuxt/app', 'cssnano', 'autoprefixer', 'ofetch', diff --git a/packages/schema/builder-env.d.ts b/packages/schema/builder-env.d.ts index 3fc7325ea7..ebfb9fce8e 100644 --- a/packages/schema/builder-env.d.ts +++ b/packages/schema/builder-env.d.ts @@ -1 +1 @@ -export * from './dist/env' +export * from './dist/builder-env' diff --git a/packages/schema/package.json b/packages/schema/package.json index 33e255a032..8ae5a31fa4 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -28,10 +28,12 @@ "files": [ "dist", "schema", + "builder-env.d.ts", "env.d.ts" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "devDependencies": { "@types/file-loader": "5.0.4", diff --git a/packages/schema/src/config/experimental.ts b/packages/schema/src/config/experimental.ts index c5fef8816e..93d03a18a3 100644 --- a/packages/schema/src/config/experimental.ts +++ b/packages/schema/src/config/experimental.ts @@ -452,7 +452,7 @@ export default defineUntypedSchema({ * `app/` directory. */ defaults: { - /** @type {typeof import('#app/components/nuxt-link')['NuxtLinkOptions']} */ + /** @type {typeof import('nuxt/app')['NuxtLinkOptions']} */ nuxtLink: { componentName: 'NuxtLink', prefetch: true, diff --git a/packages/vite/.attw.json b/packages/vite/.attw.json new file mode 100644 index 0000000000..ac2579855e --- /dev/null +++ b/packages/vite/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm"] +} diff --git a/packages/vite/package.json b/packages/vite/package.json index 5a64008740..b912c58acd 100644 --- a/packages/vite/package.json +++ b/packages/vite/package.json @@ -21,7 +21,8 @@ "dist" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "devDependencies": { "@nuxt/schema": "workspace:*", diff --git a/packages/webpack/.attw.json b/packages/webpack/.attw.json new file mode 100644 index 0000000000..ac2579855e --- /dev/null +++ b/packages/webpack/.attw.json @@ -0,0 +1,3 @@ +{ + "ignoreRules": ["cjs-resolves-to-esm"] +} diff --git a/packages/webpack/package.json b/packages/webpack/package.json index 1d02695334..9df644f7a7 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -26,7 +26,8 @@ "builder.mjs" ], "scripts": { - "prepack": "unbuild" + "prepack": "unbuild", + "test:attw": "attw --pack" }, "dependencies": { "@nuxt/friendly-errors-webpack-plugin": "^2.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 498a5bf66b..d9eb6f87bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,6 +36,9 @@ importers: .: devDependencies: + '@arethetypeswrong/cli': + specifier: 0.17.1 + version: 0.17.1 '@nuxt/eslint-config': specifier: 0.7.2 version: 0.7.2(@vue/compiler-sfc@3.5.13)(eslint@9.16.0(jiti@2.4.1))(typescript@5.6.2) @@ -1167,6 +1170,9 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} + '@andrewbranch/untar.js@1.0.3': + resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} + '@antfu/install-pkg@0.4.1': resolution: {integrity: sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw==} @@ -1177,6 +1183,15 @@ packages: resolution: {integrity: sha512-4gY54eEGEstClvEkGnwVkTkrx0sqwemEFG5OSRRn3tD91XH0+Q8XIkYIfo7IwEWPpJZwILb9GUXeShtplRc/eA==} engines: {node: '>= 16'} + '@arethetypeswrong/cli@0.17.1': + resolution: {integrity: sha512-WNKTcC7lqWmbRWWku3Xz0hl7zj9szoGzx7gcGaZPxszKcMPiRnKsiLbxMpf1FzA6myIjE1yalqxNCJ0UkCWTXQ==} + engines: {node: '>=18'} + hasBin: true + + '@arethetypeswrong/core@0.17.1': + resolution: {integrity: sha512-NgEuyO/D79q2K6lVoSLmRX2YzKNlh2LHU+no3AVkpY4gA20zEhp129KUV1W6jMnbmpRm3xAxF+v3myZ/eFixnA==} + engines: {node: '>=18'} + '@babel/code-frame@7.26.2': resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} @@ -1334,6 +1349,10 @@ packages: resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} engines: {node: '>=16.13'} + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + '@discoveryjs/json-ext@0.5.7': resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} @@ -3411,6 +3430,10 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} + ansi-escapes@7.0.0: + resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} + engines: {node: '>=18'} + ansi-html-community@0.0.8: resolution: {integrity: sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==} engines: {'0': node >= 0.8.0} @@ -3444,6 +3467,9 @@ packages: resolution: {integrity: sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==} engines: {node: '>=15'} + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -3718,6 +3744,9 @@ packages: citty@0.1.6: resolution: {integrity: sha512-tskPPKEs8D2KPafUypv2gxwJP8h/OaJmC82QQGGDQcHvXX43xF2VDACcJVmZ0EuSxkpO9Kc4MlrA3q0+FG58AQ==} + cjs-module-lexer@1.4.1: + resolution: {integrity: sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==} + clean-regexp@1.0.0: resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} engines: {node: '>=4'} @@ -3729,10 +3758,22 @@ packages: clear@0.1.0: resolution: {integrity: sha512-qMjRnoL+JDPJHeLePZJuao6+8orzHMGP04A8CdwCNsKhRbOnKRjefxONR7bwILT3MHecxKBjHkKL/tkZ8r4Uzw==} + cli-highlight@2.1.11: + resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + clipboardy@4.0.0: resolution: {integrity: sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==} engines: {node: '>=18'} + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} @@ -4247,6 +4288,10 @@ packages: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + errno@0.1.8: resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==} hasBin: true @@ -4517,6 +4562,9 @@ packages: picomatch: optional: true + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -4822,6 +4870,9 @@ packages: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true + highlight.js@10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + hookable@5.5.3: resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} @@ -5498,6 +5549,17 @@ packages: resolution: {integrity: sha512-s73fU2CQN7WCgjhaQUQ8wYESQNzGRNOKDd+3xgVqu8kuTEhmwepd/mxOv1LR2oV046ONrTLBFsM7IoKWNvmy5g==} engines: {node: '>=18'} + marked-terminal@7.2.1: + resolution: {integrity: sha512-rQ1MoMFXZICWNsKMiiHwP/Z+92PLKskTPXj+e7uwXmuMPkNn7iTqC+IvDekVm1MPeC9wYQeLxeFaOvudRR/XbQ==} + engines: {node: '>=16.0.0'} + peerDependencies: + marked: '>=1 <15' + + marked@9.1.6: + resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} + engines: {node: '>= 16'} + hasBin: true + mdast-util-find-and-replace@3.0.1: resolution: {integrity: sha512-SG21kZHGC3XRTSUhtofZkBzZTJNM5ecCi0SK2IMKmSXR8vO3peL+kb1O0z7Zl83jKtutG4k5Wv/W7V3/YHvzPA==} @@ -5775,6 +5837,9 @@ packages: muggle-string@0.4.1: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nanoid@3.3.8: resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -6038,6 +6103,15 @@ packages: parse-url@8.1.0: resolution: {integrity: sha512-xDvOoLU5XRrcOZvnI6b8zA6n9O9ejNk/GExuz1yBuWUGn9KA97GI6HTs6u02wKara1CeVmZhH+0TZFdWScR89w==} + parse5-htmlparser2-tree-adapter@6.0.1: + resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + + parse5@5.1.1: + resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==} + + parse5@6.0.1: + resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + parse5@7.2.1: resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} @@ -7028,6 +7102,10 @@ packages: resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} engines: {node: '>=12'} + supports-hyperlinks@3.1.0: + resolution: {integrity: sha512-2rn0BZ+/f7puLOHZm1HOJfwBggfaHXUpPUSSG/SWM4TWp5KCfmNYwnC3hruy2rZlMnmWZ+QAGpZfchu3f3695A==} + engines: {node: '>=14.18'} + supports-preserve-symlinks-flag@1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} @@ -7094,6 +7172,13 @@ packages: text-decoder@1.2.1: resolution: {integrity: sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + thingies@1.21.0: resolution: {integrity: sha512-hsqsJsFMsV+aD4s3CWKk85ep/3I9XzYV/IXaSouJMYIoDlgyi11cBhsqYe9/geRfB0YIikBQg6raRaM+nIMP9g==} engines: {node: '>=10.18'} @@ -7448,6 +7533,10 @@ packages: validate-npm-package-license@3.0.4: resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + version-guard@1.1.3: resolution: {integrity: sha512-JwPr6erhX53EWH/HCSzfy1tTFrtPXUe927wdM1jqBBeYp1OM+qPHjWbsvv6pIBduqdgxxS+ScfG7S28pzyr2DQ==} engines: {node: '>=0.10.48'} @@ -7893,10 +7982,18 @@ packages: engines: {node: '>= 14'} hasBin: true + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} @@ -7935,6 +8032,8 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 + '@andrewbranch/untar.js@1.0.3': {} + '@antfu/install-pkg@0.4.1': dependencies: package-manager-detector: 0.2.5 @@ -7948,6 +8047,26 @@ snapshots: '@types/json-schema': 7.0.15 js-yaml: 4.1.0 + '@arethetypeswrong/cli@0.17.1': + dependencies: + '@arethetypeswrong/core': 0.17.1 + chalk: 4.1.2 + cli-table3: 0.6.5 + commander: 10.0.1 + marked: 9.1.6 + marked-terminal: 7.2.1(marked@9.1.6) + semver: 7.6.3 + + '@arethetypeswrong/core@0.17.1': + dependencies: + '@andrewbranch/untar.js': 1.0.3 + cjs-module-lexer: 1.4.1 + fflate: 0.8.2 + lru-cache: 10.4.3 + semver: 7.6.3 + typescript: 5.6.2 + validate-npm-package-name: 5.0.1 + '@babel/code-frame@7.26.2': dependencies: '@babel/helper-validator-identifier': 7.25.9 @@ -8160,6 +8279,9 @@ snapshots: dependencies: mime: 3.0.0 + '@colors/colors@1.5.0': + optional: true + '@discoveryjs/json-ext@0.5.7': {} '@es-joy/jsdoccomment@0.49.0': @@ -10573,6 +10695,10 @@ snapshots: dependencies: type-fest: 0.21.3 + ansi-escapes@7.0.0: + dependencies: + environment: 1.1.0 + ansi-html-community@0.0.8: {} ansi-regex@5.0.1: {} @@ -10593,6 +10719,8 @@ snapshots: ansis@3.3.2: {} + any-promise@1.3.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -10913,6 +11041,8 @@ snapshots: dependencies: consola: 3.2.3 + cjs-module-lexer@1.4.1: {} + clean-regexp@1.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -10921,12 +11051,33 @@ snapshots: clear@0.1.0: {} + cli-highlight@2.1.11: + dependencies: + chalk: 4.1.2 + highlight.js: 10.7.3 + mz: 2.7.0 + parse5: 5.1.1 + parse5-htmlparser2-tree-adapter: 6.0.1 + yargs: 16.2.0 + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + clipboardy@4.0.0: dependencies: execa: 8.0.1 is-wsl: 3.1.0 is64bit: 2.0.0 + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + cliui@8.0.1: dependencies: string-width: 4.2.3 @@ -11385,6 +11536,8 @@ snapshots: env-paths@2.2.1: {} + environment@1.1.0: {} + errno@0.1.8: dependencies: prr: 1.0.1 @@ -11833,6 +11986,8 @@ snapshots: optionalDependencies: picomatch: 4.0.2 + fflate@0.8.2: {} + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -12217,6 +12372,8 @@ snapshots: he@1.2.0: {} + highlight.js@10.7.3: {} + hookable@5.5.3: {} hosted-git-info@2.8.9: {} @@ -12884,6 +13041,19 @@ snapshots: markdown-it: 14.1.0 markdownlint-micromark: 0.1.12 + marked-terminal@7.2.1(marked@9.1.6): + dependencies: + ansi-escapes: 7.0.0 + ansi-regex: 6.1.0 + chalk: 5.3.0 + cli-highlight: 2.1.11 + cli-table3: 0.6.5 + marked: 9.1.6 + node-emoji: 2.1.3 + supports-hyperlinks: 3.1.0 + + marked@9.1.6: {} + mdast-util-find-and-replace@3.0.1: dependencies: '@types/mdast': 4.0.4 @@ -13324,6 +13494,12 @@ snapshots: muggle-string@0.4.1: {} + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + nanoid@3.3.8: {} nanoid@5.0.9: {} @@ -13699,6 +13875,14 @@ snapshots: dependencies: parse-path: 7.0.0 + parse5-htmlparser2-tree-adapter@6.0.1: + dependencies: + parse5: 6.0.1 + + parse5@5.1.1: {} + + parse5@6.0.1: {} + parse5@7.2.1: dependencies: entities: 4.5.0 @@ -14775,6 +14959,11 @@ snapshots: supports-color@9.4.0: {} + supports-hyperlinks@3.1.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + supports-preserve-symlinks-flag@1.0.0: {} svg-tags@1.0.0: {} @@ -14852,6 +15041,14 @@ snapshots: text-decoder@1.2.1: {} + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + thingies@1.21.0(tslib@2.8.1): dependencies: tslib: 2.8.1 @@ -15259,6 +15456,8 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 + validate-npm-package-name@5.0.1: {} + version-guard@1.1.3: {} vfile-location@5.0.3: @@ -15825,8 +16024,20 @@ snapshots: yaml@2.6.1: {} + yargs-parser@20.2.9: {} + yargs-parser@21.1.1: {} + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 + yargs@17.7.2: dependencies: cliui: 8.0.1 diff --git a/test/fixtures/basic-types/types.ts b/test/fixtures/basic-types/types.ts index 4d0e3a1a89..11314d2b8e 100644 --- a/test/fixtures/basic-types/types.ts +++ b/test/fixtures/basic-types/types.ts @@ -6,15 +6,16 @@ import type { NavigationFailure, RouteLocationNormalized, RouteLocationRaw, Rout import type { AppConfig, RuntimeValue, UpperSnakeCase } from 'nuxt/schema' import { defineNuxtModule } from 'nuxt/kit' import { defineNuxtConfig } from 'nuxt/config' + +// TODO: temporary module for backwards compatibility +import type { DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from 'nuxt/app/defaults' + import { callWithNuxt, isVue3 } from '#app' import type { NuxtError } from '#app' import type { NavigateToOptions } from '#app/composables/router' import { NuxtLayout, NuxtLink, NuxtPage, ServerComponent, WithTypes } from '#components' import { useRouter } from '#imports' -// TODO: temporary module for backwards compatibility -import type { DefaultAsyncDataErrorValue, DefaultAsyncDataValue } from '#app/defaults' - interface TestResponse { message: string } describe('API routes', () => {