Skip to content

Commit

Permalink
Replace tiny-warning with warning
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Jan 5, 2024
1 parent 78e123d commit 6a748e1
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 19 deletions.
3 changes: 2 additions & 1 deletion packages/react-pdf/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,15 @@
"pdfjs-dist": "3.11.174",
"prop-types": "^15.6.2",
"tiny-invariant": "^1.0.0",
"tiny-warning": "^1.0.0"
"warning": "^4.0.0"
},
"devDependencies": {
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@types/node": "*",
"@types/react": "*",
"@types/warning": "^3.0.0",
"cpy-cli": "^5.0.0",
"eslint": "^8.26.0",
"eslint-config-wojtekmaj": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import makeEventProps from 'make-event-props';
import makeCancellable from 'make-cancellable-promise';
import clsx from 'clsx';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';
import pdfjs from './pdfjs.js';

import DocumentContext from './DocumentContext.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Outline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import makeCancellable from 'make-cancellable-promise';
import makeEventProps from 'make-event-props';
import clsx from 'clsx';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';

import OutlineContext from './OutlineContext.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import makeEventProps from 'make-event-props';
import clsx from 'clsx';
import mergeRefs from 'merge-refs';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';

import PageContext from './PageContext.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Page/AnnotationLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useEffect, useMemo, useRef } from 'react';
import makeCancellable from 'make-cancellable-promise';
import clsx from 'clsx';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';
import pdfjs from '../pdfjs.js';

import useDocumentContext from '../shared/hooks/useDocumentContext.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Page/PageCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
import mergeRefs from 'merge-refs';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';
import pdfjs from '../pdfjs.js';

import StructTree from '../StructTree.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Page/PageSVG.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useMemo } from 'react';
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';
import pdfjs from '../pdfjs.js';

import usePageContext from '../shared/hooks/usePageContext.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/Page/TextLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef } from
import makeCancellable from 'make-cancellable-promise';
import clsx from 'clsx';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';
import pdfjs from '../pdfjs.js';

import usePageContext from '../shared/hooks/usePageContext.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/StructTree.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import makeCancellable from 'make-cancellable-promise';
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';

import StructTreeItem from './StructTreeItem.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-pdf/src/shared/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import invariant from 'tiny-invariant';
import warning from 'tiny-warning';
import warning from 'warning';

import type { PDFPageProxy } from 'pdfjs-dist';
import type { PageCallback } from './types.js';
Expand Down
28 changes: 19 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,13 @@ __metadata:
languageName: node
linkType: hard

"@types/warning@npm:^3.0.0":
version: 3.0.3
resolution: "@types/warning@npm:3.0.3"
checksum: 82c1235bd05d7f6940f80012404844e225d589ad338aa4585b231a2c8deacc695b683f4168757c82c10047b81854cbeaaeefd60536dd67bb48f8a65e20410652
languageName: node
linkType: hard

"@typescript-eslint/eslint-plugin@npm:^6.0.0":
version: 6.0.0
resolution: "@typescript-eslint/eslint-plugin@npm:6.0.0"
Expand Down Expand Up @@ -3460,7 +3467,7 @@ __metadata:
languageName: node
linkType: hard

"loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
"loose-envify@npm:^1.0.0, loose-envify@npm:^1.1.0, loose-envify@npm:^1.4.0":
version: 1.4.0
resolution: "loose-envify@npm:1.4.0"
dependencies:
Expand Down Expand Up @@ -4543,6 +4550,7 @@ __metadata:
"@testing-library/react": "npm:^14.0.0"
"@types/node": "npm:*"
"@types/react": "npm:*"
"@types/warning": "npm:^3.0.0"
clsx: "npm:^2.0.0"
cpy-cli: "npm:^5.0.0"
eslint: "npm:^8.26.0"
Expand All @@ -4559,10 +4567,10 @@ __metadata:
react-dom: "npm:^18.2.0"
rimraf: "npm:^3.0.0"
tiny-invariant: "npm:^1.0.0"
tiny-warning: "npm:^1.0.0"
typescript: "npm:^5.3.2"
vitest: "npm:^1.0.2"
vitest-canvas-mock: "npm:^0.2.2"
warning: "npm:^4.0.0"
peerDependencies:
"@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0
react: ^16.8.0 || ^17.0.0 || ^18.0.0
Expand Down Expand Up @@ -5288,13 +5296,6 @@ __metadata:
languageName: node
linkType: hard

"tiny-warning@npm:^1.0.0":
version: 1.0.3
resolution: "tiny-warning@npm:1.0.3"
checksum: ef8531f581b30342f29670cb41ca248001c6fd7975ce22122bd59b8d62b4fc84ad4207ee7faa95cde982fa3357cd8f4be650142abc22805538c3b1392d7084fa
languageName: node
linkType: hard

"tinybench@npm:^2.5.1":
version: 2.5.1
resolution: "tinybench@npm:2.5.1"
Expand Down Expand Up @@ -5680,6 +5681,15 @@ __metadata:
languageName: node
linkType: hard

"warning@npm:^4.0.0":
version: 4.0.3
resolution: "warning@npm:4.0.3"
dependencies:
loose-envify: "npm:^1.0.0"
checksum: aebab445129f3e104c271f1637fa38e55eb25f968593e3825bd2f7a12bd58dc3738bb70dc8ec85826621d80b4acfed5a29ebc9da17397c6125864d72301b937e
languageName: node
linkType: hard

"webidl-conversions@npm:^3.0.0":
version: 3.0.1
resolution: "webidl-conversions@npm:3.0.1"
Expand Down

0 comments on commit 6a748e1

Please sign in to comment.