Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-pdf/font

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf/font - npm Package Compare versions

Comparing version 2.5.2 to 3.0.0

4

lib/index.browser.js

@@ -121,3 +121,3 @@ import 'is-url';

if (!res) {
throw new Error("Could not resolve font for " + this.family + ", fontWeight " + fontWeight);
throw new Error(`Could not resolve font for ${this.family}, fontWeight ${fontWeight}`);
}

@@ -178,3 +178,3 @@ return res;

if (!fonts[fontFamily]) {
throw new Error("Font family not registered: " + fontFamily + ". Please register it calling Font.register() method.");
throw new Error(`Font family not registered: ${fontFamily}. Please register it calling Font.register() method.`);
}

@@ -181,0 +181,0 @@ return fonts[fontFamily].resolve(descriptor);

@@ -123,3 +123,3 @@ import isUrl from 'is-url';

if (!res) {
throw new Error("Could not resolve font for " + this.family + ", fontWeight " + fontWeight);
throw new Error(`Could not resolve font for ${this.family}, fontWeight ${fontWeight}`);
}

@@ -180,3 +180,3 @@ return res;

if (!fonts[fontFamily]) {
throw new Error("Font family not registered: " + fontFamily + ". Please register it calling Font.register() method.");
throw new Error(`Font family not registered: ${fontFamily}. Please register it calling Font.register() method.`);
}

@@ -183,0 +183,0 @@ return fonts[fontFamily].resolve(descriptor);

{
"name": "@react-pdf/font",
"version": "2.5.2",
"version": "3.0.0",
"license": "MIT",

@@ -14,15 +14,6 @@ "description": "Register font and emoji source for react-pdf document",

"type": "module",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"main": "./lib/index.js",
"browser": {
"./lib/index.js": "./lib/index.browser.js",
"./lib/index.cjs": "./lib/index.browser.cjs"
"./lib/index.js": "./lib/index.browser.js"
},
"exports": {
".": {
"import": "./lib/index.js",
"require": "./lib/index.cjs",
"default": "./lib/index.js"
}
},
"scripts": {

@@ -35,3 +26,3 @@ "test": "vitest",

"@babel/runtime": "^7.20.13",
"@react-pdf/types": "^2.6.0",
"@react-pdf/types": "^2.7.0",
"cross-fetch": "^3.1.5",

@@ -38,0 +29,0 @@ "fontkit": "^2.0.2",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc