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

chore: adjust all @reach/router imports to not rely just on webpack alias (#30033) #30049

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/gatsby-link/src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from "prop-types"
import React from "react"
import { Link, Location } from "@reach/router"
import { Link, Location } from "@gatsbyjs/reach-router"
import { resolve } from "@gatsbyjs/reach-router/lib/utils"

import { parsePath } from "./parse-path"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-react-router-scroll/src/scroll-handler.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from "react"
import { LocationContext } from "@reach/router"
import { LocationContext } from "@gatsbyjs/reach-router"
import PropTypes from "prop-types"
import { SessionStorage } from "./session-storage"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ScrollContext } from "./scroll-handler"
import { useRef, useContext, useLayoutEffect, MutableRefObject } from "react"
import { useLocation } from "@reach/router"
import { useLocation } from "@gatsbyjs/reach-router"

interface IScrollRestorationProps {
ref: MutableRefObject<HTMLElement | undefined>
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby/cache-dir/navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import redirects from "./redirects.json"
import { apiRunner } from "./api-runner-browser"
import emitter from "./emitter"
import { RouteAnnouncerProps } from "./route-announcer-props"
import { navigate as reachNavigate } from "@reach/router"
import { globalHistory } from "@reach/router/lib/history"
import { navigate as reachNavigate } from "@gatsbyjs/reach-router"
import { globalHistory } from "@gatsbyjs/reach-router/lib/history"
import { parsePath } from "gatsby-link"

// Convert to a map for faster lookup in maybeRedirect()
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/cache-dir/production-app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { apiRunner, apiRunnerAsync } from "./api-runner-browser"
import React from "react"
import ReactDOM from "react-dom"
import { Router, navigate, Location, BaseContext } from "@reach/router"
import { Router, navigate, Location, BaseContext } from "@gatsbyjs/reach-router"
import { ScrollContext } from "gatsby-react-router-scroll"
import domReady from "@mikaelkristiansson/domready"
import { StaticQueryContext } from "gatsby"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/cache-dir/root.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import { Router, Location, BaseContext } from "@reach/router"
import { Router, Location, BaseContext } from "@gatsbyjs/reach-router"
import { ScrollContext } from "gatsby-react-router-scroll"

import { shouldUpdateScroll, RouteUpdates } from "./navigation"
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby/cache-dir/static-entry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const React = require(`react`)
const path = require(`path`)
const { renderToString, renderToStaticMarkup } = require(`react-dom/server`)
const { ServerLocation, Router, isRedirect } = require(`@reach/router`)
const { ServerLocation, Router, isRedirect } = require(`@gatsbyjs/reach-router`)
const { merge, flattenDeep, replace } = require(`lodash`)
const { StaticQueryContext } = require(`gatsby`)
const fs = require(`fs`)
Expand Down