Socket
Socket
Sign inDemoInstall

react-pdf

Package Overview
Dependencies
103
Maintainers
1
Versions
143
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.1 to 6.0.2

5

dist/cjs/entry.vite.js

@@ -29,3 +29,2 @@ "use strict";

exports.pdfjs = pdfjs;
var _pdfWorker = _interopRequireDefault(require("./pdf.worker.entry?url"));
var _Document = _interopRequireDefault(require("./Document"));

@@ -37,5 +36,3 @@ var _Outline = _interopRequireDefault(require("./Outline"));

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
// eslint-disable-next-line import/no-unresolved
(0, _utils.displayWorkerWarning)();
pdfjs.GlobalWorkerOptions.workerSrc = _pdfWorker["default"];
pdfjs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.js', import.meta.url);

4

dist/esm/entry.vite.js
import * as pdfjs from 'pdfjs-dist/build/pdf';
// eslint-disable-next-line import/no-unresolved
import pdfjsWorker from './pdf.worker.entry?url';
import Document from './Document';

@@ -9,3 +7,3 @@ import Outline from './Outline';

displayWorkerWarning();
pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker;
pdfjs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.js', import.meta.url);
export { pdfjs, Document, Outline, Page };
{
"name": "react-pdf",
"version": "6.0.1",
"version": "6.0.2",
"description": "Display PDFs in your React app as easily as if they were images.",

@@ -5,0 +5,0 @@ "main": "dist/cjs/entry.js",

@@ -124,5 +124,5 @@ [![npm](https://img.shields.io/npm/v/react-pdf.svg)](https://www.npmjs.com/package/react-pdf) ![downloads](https://img.shields.io/npm/dt/react-pdf.svg) [![CI](https://github.com/wojtekmaj/react-pdf/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-pdf/actions) [![tested with jest](https://img.shields.io/badge/tested_with-jest-99424f.svg)](https://github.com/facebook/jest)

| Parcel 2 | `react-pdf/dist/esm/entry.parcel2` |
| Vite ≥3.2 | `react-pdf/dist/esm/entry.vite` |
| Webpack 4 | `react-pdf/dist/esm/entry.webpack` |
| Webpack 5 | `react-pdf/dist/esm/entry.webpack5` |
| Vite | `react-pdf/dist/esm/entry.vite` |

@@ -129,0 +129,0 @@ #### Webpack 4

import * as pdfjs from 'pdfjs-dist/build/pdf';
// eslint-disable-next-line import/no-unresolved
import pdfjsWorker from './pdf.worker.entry?url';

@@ -13,4 +11,4 @@ import Document from './Document';

pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker;
pdfjs.GlobalWorkerOptions.workerSrc = new URL('pdfjs-dist/build/pdf.worker.js', import.meta.url);
export { pdfjs, Document, Outline, Page };
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc