Skip to content

Commit 2c3e1a4

Browse files
authored
fix(deps): update @stoplight/reporter (#3)
* fix(deps): update @stoplight/reporter * chore: we do not use cc anymore
1 parent ea2fdac commit 2c3e1a4

File tree

6 files changed

+403
-158
lines changed

6 files changed

+403
-158
lines changed

.circleci/config.yml

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,8 @@ jobs:
66
- image: circleci/node:10
77
steps:
88
- checkout
9-
- run:
10-
name: Download cc-test-reporter
11-
command: |
12-
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
13-
chmod +x ./cc-test-reporter
149
- run: yarn
15-
- run:
16-
name: cc-before
17-
command: |
18-
./cc-test-reporter before-build
1910
- run: yarn test.prod
20-
- run:
21-
name: cc-after
22-
command: |
23-
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
2411

2512
build:
2613
docker:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"react-dom": ">=16.8"
4242
},
4343
"dependencies": {
44-
"@stoplight/types": "^11.1.0"
44+
"@stoplight/types": "^11.9.0"
4545
},
4646
"devDependencies": {
47-
"@stoplight/reporter": "^1.1.1",
47+
"@stoplight/reporter": "^1.7.6",
4848
"@stoplight/scripts": "^7.0.3",
4949
"@stoplight/storybook-config": "^2.0.4",
5050
"@types/enzyme": "^3.10.3",

src/ErrorBoundaryProvider.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { IReportingAPI } from '@stoplight/reporter';
1+
import { ICoreReportingAPI } from '@stoplight/reporter';
22
import * as React from 'react';
33

4-
export const ErrorBoundaryContext = React.createContext<IReportingAPI>(console);
4+
export const ErrorBoundaryContext = React.createContext<ICoreReportingAPI>(console);
55

6-
export const ErrorBoundaryProvider: React.FunctionComponent<{ reporter: IReportingAPI }> = ({ reporter, children }) => (
7-
<ErrorBoundaryContext.Provider value={reporter}>{children}</ErrorBoundaryContext.Provider>
8-
);
6+
export const ErrorBoundaryProvider: React.FunctionComponent<{ reporter: ICoreReportingAPI }> = ({
7+
reporter,
8+
children,
9+
}) => <ErrorBoundaryContext.Provider value={reporter}>{children}</ErrorBoundaryContext.Provider>;

src/__tests__/ErrorBoundary.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* tslint:disable:jsx-wrap-multiline */
2-
import { IReportingAPI } from '@stoplight/reporter';
2+
import { ICoreReportingAPI } from '@stoplight/reporter';
33
import { mount } from 'enzyme';
44
import * as React from 'react';
55

@@ -20,7 +20,7 @@ describe('ErrorBoundary component', () => {
2020
return <span>{String(value)}</span>;
2121
};
2222

23-
let reporter: IReportingAPI;
23+
let reporter: ICoreReportingAPI;
2424

2525
beforeEach(() => {
2626
reporter = {

src/hooks/useReporter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { IReportingAPI } from '@stoplight/reporter';
1+
import { ICoreReportingAPI } from '@stoplight/reporter';
22
import { useContext } from 'react';
33
import { ErrorBoundaryContext } from '../ErrorBoundaryProvider';
44

5-
export const useReporter = (): IReportingAPI => {
6-
return useContext<IReportingAPI>(ErrorBoundaryContext);
5+
export const useReporter = (): ICoreReportingAPI => {
6+
return useContext<ICoreReportingAPI>(ErrorBoundaryContext);
77
};

0 commit comments

Comments
 (0)