Skip to content

Commit 2ba7fad

Browse files
committed
Remove create-react-context and start v3.0.0 development
1 parent 42964d0 commit 2ba7fad

File tree

6 files changed

+34
-35
lines changed

6 files changed

+34
-35
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Dylan
3+
Copyright (c) 2017 Dylan Paulus
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

config/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = {
1515
context: path.resolve(__dirname, ".."),
1616
resolve: {
1717
modules: [path.resolve(__dirname, "..", "src"), "node_modules"],
18-
extensions: [".js", ".jsx"]
18+
extensions: [".js", ".jsx", ".ts", ".tsx"]
1919
},
2020
externals: [
2121
{

package.json

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-scroll-to",
3-
"version": "2.0.9",
3+
"version": "3.0.0-beta.1",
44
"description": "Scroll to a position using react",
55
"main": "./dist/react-scroll-to.js",
66
"types": "./dist/definitions",
@@ -15,23 +15,6 @@
1515
"storybook": "start-storybook -p 9001 -c .storybook",
1616
"build:docs": "build-storybook -c .storybook -o docs"
1717
},
18-
"repository": {
19-
"type": "git",
20-
"url": "git+https://github.com/ganderzz/react-scroll-to.git"
21-
},
22-
"keywords": [
23-
"react",
24-
"scroll",
25-
"to",
26-
"window",
27-
"position"
28-
],
29-
"author": "Dylan Paulus",
30-
"license": "MIT",
31-
"bugs": {
32-
"url": "https://github.com/ganderzz/react-scroll-to/issues"
33-
},
34-
"homepage": "https://github.com/ganderzz/react-scroll-to#readme",
3518
"peerDepedencies": {
3619
"react": ">= ^16.0.0"
3720
},
@@ -41,17 +24,17 @@
4124
"@babel/preset-env": "7.4.5",
4225
"@babel/preset-react": "7.0.0",
4326
"@storybook/react": "5.0.11",
44-
"all-contributors-cli": "6.6.0",
27+
"all-contributors-cli": "6.6.1",
4528
"babel-core": "7.0.0-bridge.0",
4629
"babel-jest": "24.8.0",
4730
"babel-loader": "8.0.6",
48-
"copy-webpack-plugin": "4.6.0",
31+
"copy-webpack-plugin": "5.0.3",
4932
"enzyme": "3.7.0",
5033
"enzyme-adapter-react-16": "1.6.0",
5134
"eslint": "5.16.0",
5235
"eslint-config-airbnb": "17.1.0",
5336
"eslint-config-prettier": "4.3.0",
54-
"eslint-plugin-import": "2.17.2",
37+
"eslint-plugin-import": "2.17.3",
5538
"eslint-plugin-jsx-a11y": "6.2.1",
5639
"eslint-plugin-react": "7.13.0",
5740
"husky": "2.3.0",
@@ -60,11 +43,29 @@
6043
"prettier": "1.17.1",
6144
"react": "16.8.6",
6245
"react-dom": "16.8.6",
63-
"react-testing-library": "7.0.1",
64-
"ts-loader": "^6.0.1",
46+
"react-testing-library": "8.0.1",
47+
"ts-loader": "6.0.2",
48+
"typescript": "^3.5.1",
6549
"webpack": "4.32.1",
6650
"webpack-cli": "3.3.2"
6751
},
52+
"repository": {
53+
"type": "git",
54+
"url": "git+https://github.com/ganderzz/react-scroll-to.git"
55+
},
56+
"keywords": [
57+
"react",
58+
"scroll",
59+
"to",
60+
"window",
61+
"position"
62+
],
63+
"author": "Dylan Paulus",
64+
"license": "MIT",
65+
"bugs": {
66+
"url": "https://github.com/ganderzz/react-scroll-to/issues"
67+
},
68+
"homepage": "https://github.com/ganderzz/react-scroll-to#readme",
6869
"jest": {
6970
"setupFiles": [
7071
"./src/tests/setup/shim.js",
@@ -96,8 +97,5 @@
9697
"hooks": {
9798
"pre-commit": "lint-staged"
9899
}
99-
},
100-
"dependencies": {
101-
"create-react-context": "^0.2.3"
102100
}
103101
}

src/ScrollTo.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
import React, { Component, isValidElement } from "react";
22
import ReactDOM from "react-dom";
33
import { relative } from "./utilities/relative";
4-
import createReactContext from "create-react-context";
54

65
/* istanbul ignore next */
7-
export const ScrollToContext = React.createContext
8-
? React.createContext({}) /* istanbul ignore next */
9-
: createReactContext({});
6+
export const ScrollToContext = React.createContext({});
107

118
/**
129
* Component that uses render props to inject

src/tests/ScrollTo.spec.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from "react";
22
import { render, cleanup, fireEvent } from "react-testing-library";
33
import { shallow } from "enzyme";
4-
import createReactContext from "create-react-context";
54
import ScrollTo from "../ScrollTo";
65

76
afterEach(cleanup);
@@ -255,7 +254,7 @@ describe("Test render prop.", () => {
255254
});
256255

257256
it("Should handle using the relative() function", () => {
258-
const refDOM = React.createRef ? React.createRef() : createReactContext();
257+
const refDOM = React.createRef();
259258
const { getByText } = render(
260259
<ScrollTo>
261260
{({ scrollTo, relative }) => (

yarn.lock

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ create-react-context@<=0.2.2:
36863686
fbjs "^0.8.0"
36873687
gud "^1.0.0"
36883688

3689-
create-react-context@^0.2.1, create-react-context@^0.2.3:
3689+
create-react-context@^0.2.1:
36903690
version "0.2.3"
36913691
resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.3.tgz#9ec140a6914a22ef04b8b09b7771de89567cb6f3"
36923692
dependencies:
@@ -10393,6 +10393,11 @@ typedarray@^0.0.6:
1039310393
version "0.0.6"
1039410394
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
1039510395

10396+
typescript@^3.5.1:
10397+
version "3.5.1"
10398+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202"
10399+
integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==
10400+
1039610401
ua-parser-js@^0.7.18:
1039710402
version "0.7.19"
1039810403
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"

0 commit comments

Comments
 (0)