Skip to content

Commit

Permalink
Merge pull request RyanClementsHax#116 from RyanClementsHax/next-rout…
Browse files Browse the repository at this point in the history
…er-versions

fix(deps): remove unnecessary nextjs versions
  • Loading branch information
RyanClementsHax committed Sep 6, 2022
2 parents 1217c51 + 9b5d7f2 commit b72a426
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 3,418 deletions.
3 changes: 0 additions & 3 deletions package.json
Expand Up @@ -69,9 +69,6 @@
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"next": "^12.0.7",
"nextv10": "npm:next@10.0.0",
"nextv11": "npm:next@11.0.0",
"nextv9": "npm:next@9.0.0",
"prettier": "^2.5.1",
"react": "^17.0.2",
"semantic-release": "^19.0.3",
Expand Down
6 changes: 2 additions & 4 deletions src/routing/decorator.tsx
@@ -1,7 +1,6 @@
// this will be aliased by webpack at runtime (this is just for typing)
import { RouterContext } from './resolved-router-context'
// this will be aliased by webpack at runtime (this is just for typing)
import Router from './resolved-router'
import Router from 'next/router'
import { action } from '@storybook/addon-actions'
import { StoryContext } from '@storybook/addons'

Expand Down Expand Up @@ -58,8 +57,7 @@ export const RouterDecorator = (
} as NonNullable<typeof Router.router>

return (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
<RouterContext.Provider value={Router.router as any}>
<RouterContext.Provider value={Router.router}>
<Story />
</RouterContext.Provider>
)
Expand Down
11 changes: 1 addition & 10 deletions src/routing/resolved-router-context.ts
@@ -1,12 +1,3 @@
// this file will be aliased by webpack at runtime (this is just for typing)

import { RouterContext as RouterContextV12 } from 'next/dist/shared/lib/router-context'
import { RouterContext as RouterContextV11 } from 'nextv11/dist/next-server/lib/router-context'
import { RouterContext as RouterContextV10 } from 'nextv10/dist/next-server/lib/router-context'
import { RouterContext as RouterContextV9 } from 'next-server/dist/lib/router-context'

export const RouterContext:
| typeof RouterContextV12
| typeof RouterContextV11
| typeof RouterContextV10
| typeof RouterContextV9 = RouterContextV12
export { RouterContext } from 'next/dist/shared/lib/router-context'
14 changes: 0 additions & 14 deletions src/routing/resolved-router.ts

This file was deleted.

0 comments on commit b72a426

Please sign in to comment.