Skip to content

Commit 7a9170d

Browse files
committed
Use .js extension for all relative imports
1 parent ad340b6 commit 7a9170d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+76
-69
lines changed

packages/react-router-config/modules/__tests__/integration-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { StaticRouter } from "react-router";
33
import { matchRoutes, renderRoutes } from "react-router-config";
44

5-
import renderToStringStrict from "./utils/renderToStringStrict";
5+
import renderToStringStrict from "./utils/renderToStringStrict.js";
66

77
describe("integration", () => {
88
it("generates the same matches in renderRoutes and matchRoutes", () => {

packages/react-router-config/modules/__tests__/renderRoutes-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { createMemoryHistory as createHistory } from "history";
33
import { Router, StaticRouter } from "react-router";
44
import { renderRoutes } from "react-router-config";
55

6-
import renderStrict from "./utils/renderStrict";
7-
import renderToStringStrict from "./utils/renderToStringStrict";
6+
import renderStrict from "./utils/renderStrict.js";
7+
import renderToStringStrict from "./utils/renderToStringStrict.js";
88

99
describe("renderRoutes", () => {
1010
let renderedRoutes;

packages/react-router-config/modules/__tests__/utils/renderStrict.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
33

4-
import StrictMode from "./StrictMode";
4+
import StrictMode from "./StrictMode.js";
55

66
function renderStrict(element, node) {
77
ReactDOM.render(<StrictMode>{element}</StrictMode>, node);

packages/react-router-config/modules/__tests__/utils/renderToStringStrict.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react";
22
import ReactDOMServer from "react-dom/server";
33

4-
import StrictMode from "./StrictMode";
4+
import StrictMode from "./StrictMode.js";
55

66
function renderToStringStrict(element) {
77
return ReactDOMServer.renderToString(<StrictMode>{element}</StrictMode>);
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export { default as matchRoutes } from "./matchRoutes";
2-
export { default as renderRoutes } from "./renderRoutes";
1+
export { default as matchRoutes } from "./matchRoutes.js";
2+
export { default as renderRoutes } from "./renderRoutes.js";

packages/react-router-dom/modules/Link.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ import React from "react";
22
import { __RouterContext as RouterContext } from "react-router";
33
import PropTypes from "prop-types";
44
import invariant from "tiny-invariant";
5-
import { resolveToLocation, normalizeToLocation } from "./utils/locationUtils";
5+
import {
6+
resolveToLocation,
7+
normalizeToLocation
8+
} from "./utils/locationUtils.js";
69

710
// React 15 compat
811
const forwardRefShim = C => C;

packages/react-router-dom/modules/NavLink.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import React from "react";
22
import { __RouterContext as RouterContext, matchPath } from "react-router";
33
import PropTypes from "prop-types";
44
import invariant from "tiny-invariant";
5-
import Link from "./Link";
6-
import { resolveToLocation, normalizeToLocation } from "./utils/locationUtils";
5+
import Link from "./Link.js";
6+
import {
7+
resolveToLocation,
8+
normalizeToLocation
9+
} from "./utils/locationUtils.js";
710

811
// React 15 compat
912
const forwardRefShim = C => C;

packages/react-router-dom/modules/__tests__/BrowserRouter-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import ReactDOM from "react-dom";
33
import { BrowserRouter } from "react-router-dom";
44

5-
import renderStrict from "./utils/renderStrict";
5+
import renderStrict from "./utils/renderStrict.js";
66

77
describe("A <BrowserRouter>", () => {
88
const node = document.createElement("div");

packages/react-router-dom/modules/__tests__/HashRouter-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import ReactDOM from "react-dom";
33
import { HashRouter } from "react-router-dom";
44

5-
import renderStrict from "./utils/renderStrict";
5+
import renderStrict from "./utils/renderStrict.js";
66

77
describe("A <HashRouter>", () => {
88
const node = document.createElement("div");

packages/react-router-dom/modules/__tests__/Link-click-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import TestUtils from "react-dom/test-utils";
44
import { Router, Link } from "react-router-dom";
55
import { createMemoryHistory } from "history";
66

7-
import renderStrict from "./utils/renderStrict";
7+
import renderStrict from "./utils/renderStrict.js";
88

99
describe("<Link> click events", () => {
1010
const node = document.createElement("div");

0 commit comments

Comments
 (0)