Skip to content

Commit

Permalink
Fixed breaking changes with nuxt rc-9, updated deps
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgarciaesgi committed Sep 3, 2022
1 parent bb88e06 commit 80dfc8f
Show file tree
Hide file tree
Showing 7 changed files with 1,947 additions and 2,225 deletions.
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuxt-typed-router",
"version": "1.1.2",
"version": "1.2.0",
"description": "Provide autocompletion for pages route names generated by Nuxt router",
"type": "module",
"scripts": {
Expand Down Expand Up @@ -51,28 +51,28 @@
"url": "https://github.com/victorgarciaesgi/nuxt-typed-router/issues"
},
"dependencies": {
"@nuxt/kit": "npm:@nuxt/kit-edge@latest",
"@nuxt/kit": "^3.0.0-rc.9",
"chalk": "^4.1.2",
"lodash-es": "^4.17.21",
"log-symbols": "^5.1.0",
"mkdirp": "^1.0.4",
"pathe": "^0.2.0",
"prettier": "^2.6.1"
"prettier": "^2.7.1"
},
"devDependencies": {
"@nuxt/module-builder": "latest",
"@nuxt/types": "^2.15.8",
"@nuxtjs/eslint-config-typescript": "9.0.0",
"@nuxtjs/eslint-config-typescript": "latest",
"@types/lodash-es": "^4.17.6",
"@types/mkdirp": "^1.0.2",
"@types/node": "^17.0.23",
"@types/prettier": "^2.4.4",
"@types/prettier": "^2.7.0",
"cross-env": "^7.0.3",
"eslint": "8.12.0",
"eslint": "8.23.0",
"eslint-config-prettier": "^8.5.0",
"nuxt3": "3.0.0-27474800.8dd77d7",
"nuxt": "^3.0.0-rc.9",
"typescript": "^4.6.3",
"vitest": "^0.7.12",
"vue-router": "^4.0.14"
"vitest": "^0.22.1",
"vue-router": "^4.1.5"
}
}
2 changes: 1 addition & 1 deletion playground/generated/typed-router.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface TypedRouter {
): Promise<NavigationFailure | void | undefined>;
}

declare module 'nuxt3/dist/app/nuxt' {
declare module 'nuxt/dist/app/nuxt' {
export interface NuxtApp {
$typedRouter: TypedRouter;
$routesList: RouteListDecl;
Expand Down
2 changes: 1 addition & 1 deletion playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineNuxtConfig } from 'nuxt3';
import { defineNuxtConfig } from 'nuxt';
import MyModule from '..';

export default defineNuxtConfig({
Expand Down
2 changes: 1 addition & 1 deletion src/generators/output.templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const staticDeclarations = `
): Promise<NavigationFailure | void | undefined>;
}
declare module 'nuxt3/dist/app/nuxt' {
declare module 'nuxt/dist/app/nuxt' {
export interface NuxtApp {
$typedRouter: TypedRouter;
$routesList: RouteListDecl;
Expand Down
2 changes: 1 addition & 1 deletion src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineNuxtModule<ModuleOptions>({
configKey: 'nuxtTypedRouter',
compatibility: { nuxt: '^3.0.0-rc.1', bridge: false },
},
setup(moduleOptions, nuxt) {
setup(moduleOptions, nuxt: any) {
const srcDir = nuxt.options.srcDir;
const { outDir = `./generated`, routesObjectName = 'routerPagesNames' } = moduleOptions;

Expand Down
2 changes: 1 addition & 1 deletion test/unit/__snapshots__/root.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export interface TypedRouter {
): Promise<NavigationFailure | void | undefined>;
}
declare module 'nuxt3/dist/app/nuxt' {
declare module 'nuxt/dist/app/nuxt' {
export interface NuxtApp {
$typedRouter: TypedRouter;
$routesList: RouteListDecl;
Expand Down

0 comments on commit 80dfc8f

Please sign in to comment.