Skip to content

Commit 2832679

Browse files
committed
fix: modify import index.js => index/index.ts
1 parent 3a7b63c commit 2832679

File tree

10 files changed

+16
-14
lines changed

10 files changed

+16
-14
lines changed

rollup.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const env = process.env.NODE_ENV
1010
const extensions = ['.js', '.ts', '.tsx', '.json']
1111

1212
const config = {
13-
input: 'src/index.js',
13+
input: 'src/index.ts',
1414
external: Object.keys(pkg.peerDependencies || {}).concat('react-dom'),
1515
output: {
1616
format: 'umd',

test/components/Provider.spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
import React, { Component } from 'react'
44
import ReactDOM from 'react-dom'
55
import { createStore } from 'redux'
6-
import { Provider, connect, ReactReduxContext } from '../../src/index.js'
6+
import { Provider, connect, ReactReduxContext } from '../../src/index'
77
import * as rtl from '@testing-library/react'
88
import '@testing-library/jest-dom/extend-expect'
99

10-
const createExampleTextReducer = () => (state = 'example text') => state
10+
const createExampleTextReducer =
11+
() =>
12+
(state = 'example text') =>
13+
state
1114

1215
describe('React', () => {
1316
describe('Provider', () => {

test/components/connect.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import createClass from 'create-react-class'
55
import PropTypes from 'prop-types'
66
import ReactDOM from 'react-dom'
77
import { createStore, applyMiddleware } from 'redux'
8-
import { Provider as ProviderMock, connect } from '../../src/index.js'
8+
import { Provider as ProviderMock, connect } from '../../src/index'
99
import * as rtl from '@testing-library/react'
1010
import '@testing-library/jest-dom/extend-expect'
1111

test/components/connectAdvanced.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { Component } from 'react'
22
import * as rtl from '@testing-library/react'
3-
import { Provider as ProviderMock, connectAdvanced } from '../../src/index.js'
3+
import { Provider as ProviderMock, connectAdvanced } from '../../src/index'
44
import { createStore } from 'redux'
55
import '@testing-library/jest-dom/extend-expect'
66

test/components/hooks.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import React from 'react'
44
import { createStore } from 'redux'
5-
import { Provider as ProviderMock, connect } from '../../src/index.js'
5+
import { Provider as ProviderMock, connect } from '../../src/index'
66
import * as rtl from '@testing-library/react'
77
import '@testing-library/jest-dom/extend-expect'
88

test/hooks/useDispatch.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
Provider as ProviderMock,
66
useDispatch,
77
createDispatchHook,
8-
} from '../../src/index.js'
8+
} from '../../src/index'
99

1010
const store = createStore((c) => c + 1)
1111
const store2 = createStore((c) => c + 2)

test/hooks/useSelector.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
shallowEqual,
1111
connect,
1212
createSelectorHook,
13-
} from '../../src/index.js'
13+
} from '../../src/index'
1414
import { useReduxContext } from '../../src/hooks/useReduxContext'
1515

1616
describe('React', () => {

test/integration/dynamic-reducers.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React from 'react'
44
import ReactDOMServer from 'react-dom/server'
55
import { createStore, combineReducers } from 'redux'
6-
import { connect, Provider, ReactReduxContext } from '../../src/index.js'
6+
import { connect, Provider, ReactReduxContext } from '../../src/index'
77
import * as rtl from '@testing-library/react'
88

99
describe('React', () => {

test/integration/server-rendering.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import React from 'react'
1212
import { renderToString } from 'react-dom/server'
1313
import { createStore } from 'redux'
14-
import { Provider, connect } from '../../src/index.js'
14+
import { Provider, connect } from '../../src/index'
1515

1616
describe('React', () => {
1717
describe('server rendering', () => {

test/react-native/batch-integration.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
batch,
88
useSelector,
99
useDispatch,
10-
} from '../../src/index.js'
10+
} from '../../src/index'
1111
import { useIsomorphicLayoutEffect } from '../../src/utils/useIsomorphicLayoutEffect'
1212
import * as rtl from '@testing-library/react-native'
1313
import '@testing-library/jest-native/extend-expect'
@@ -468,9 +468,8 @@ describe('React Native', () => {
468468
const rendered = rtl.render(<ReduxBugDemo />)
469469

470470
const assertValuesMatch = (rendered) => {
471-
const [, boolFromSelector] = rendered.getByTestId(
472-
'boolFromSelector'
473-
).children
471+
const [, boolFromSelector] =
472+
rendered.getByTestId('boolFromSelector').children
474473
const [, boolFromStore] = rendered.getByTestId('boolFromStore').children
475474
expect(boolFromSelector).toBe(boolFromStore)
476475
}

0 commit comments

Comments
 (0)