Skip to content

Commit

Permalink
Revert "Merge branch 'master' into master"
Browse files Browse the repository at this point in the history
This reverts commit da8b5ca, reversing
changes made to 82920c6.
  • Loading branch information
liborm85 committed Nov 9, 2023
1 parent da8b5ca commit 6b91d86
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 57 deletions.
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Fork of PDFKit [![npm][npm_img]][npm_url]

[npm_img]: https://img.shields.io/npm/v/@foliojs-fork/pdfkit.svg?colorB=0E7FBF
[npm_url]: https://www.npmjs.com/package/@foliojs-fork/pdfkit
# PDFKit

A JavaScript PDF generation library for Node and the browser.

Expand All @@ -19,17 +16,11 @@ folder.

You can also try out an interactive in-browser demo of PDFKit [here](http://pdfkit.org/demo/browser.html).

## Why fork?

Because PDFKit require up-to-date these dependencies:
- [foliojs-fork/fontkit](https://github.com/foliojs-fork/fontkit) (see [Why fork?](https://github.com/foliojs-fork/fontkit#why-fork))
- [foliojs-fork/linebreak](https://github.com/foliojs-fork/linebreak) (see [Why fork?](https://github.com/foliojs-fork/linebreak#why-fork))

## Installation

Installation uses the [npm](http://npmjs.org/) package manager. Just type the following command after installing npm.

npm install @foliojs-fork/pdfkit
npm install pdfkit

## Features

Expand Down
2 changes: 1 addition & 1 deletion lib/font_factory.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs';
import fontkit from '@foliojs-fork/fontkit';
import fontkit from 'fontkit';
import StandardFont from './font/standard';
import EmbeddedFont from './font/embedded';

Expand Down
2 changes: 1 addition & 1 deletion lib/line_wrapper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EventEmitter } from 'events';
import LineBreaker from '@foliojs-fork/linebreak';
import LineBreaker from 'linebreak';

class LineWrapper extends EventEmitter {
constructor(document, options) {
Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@foliojs-fork/pdfkit",
"name": "pdfkit",
"description": "A PDF generation library for Node.js",
"keywords": [
"pdf",
Expand All @@ -19,9 +19,9 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/foliojs-fork/pdfkit.git"
"url": "https://github.com/foliojs/pdfkit.git"
},
"bugs": "https://github.com/foliojs-fork/pdfkit/issues",
"bugs": "https://github.com/foliojs/pdfkit/issues",
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/plugin-external-helpers": "^7.10.4",
Expand Down Expand Up @@ -49,14 +49,15 @@
},
"dependencies": {
"crypto-js": "^4.2.0",
"@foliojs-fork/fontkit": "^1.9.1",
"@foliojs-fork/linebreak": "^1.1.1",
"fontkit": "^1.8.1",
"linebreak": "^1.0.2",
"png-js": "^1.0.0"
},
"scripts": {
"prepublishOnly": "npm run build",
"build": "rollup -c",
"browserify-example": "browserify examples/browserify/browser.js > examples/browserify/bundle.js", "pdf-guide": "node docs/generate.js",
"build": "rollup -c && browserify --standalone PDFDocument --ignore crypto --ignore iconv-lite js/pdfkit.js > js/pdfkit.standalone.js",
"browserify-example": "browserify examples/browserify/browser.js > examples/browserify/bundle.js",
"pdf-guide": "node docs/generate.js",
"website": "node docs/generate_website.js",
"publish-website": "node docs/publish_website.js",
"docs": "npm run pdf-guide && npm run website && npm run browserify-example",
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ const external = [
'stream',
'fs',
'zlib',
'@foliojs-fork/fontkit',
'fontkit',
'events',
'@foliojs-fork/linebreak',
'linebreak',
'png-js',
'crypto-js',
'saslprep'
Expand Down
89 changes: 54 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1222,36 +1222,6 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@foliojs-fork/fontkit@^1.9.1":
version "1.9.1"
resolved "https://registry.yarnpkg.com/@foliojs-fork/fontkit/-/fontkit-1.9.1.tgz#8124649168eb5273f580f66697a139fb5041296b"
integrity sha512-U589voc2/ROnvx1CyH9aNzOQWJp127JGU1QAylXGQ7LoEAF6hMmahZLQ4eqAcgHUw+uyW4PjtCItq9qudPkK3A==
dependencies:
"@foliojs-fork/restructure" "^2.0.2"
brfs "^2.0.0"
brotli "^1.2.0"
browserify-optional "^1.0.1"
clone "^1.0.4"
deep-equal "^1.0.0"
dfa "^1.2.0"
tiny-inflate "^1.0.2"
unicode-properties "^1.2.2"
unicode-trie "^2.0.0"

"@foliojs-fork/linebreak@^1.1.1":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@foliojs-fork/linebreak/-/linebreak-1.1.1.tgz#93ecd695b7d2bb0334b9481058c3e610e019a4eb"
integrity sha512-pgY/+53GqGQI+mvDiyprvPWgkTlVBS8cxqee03ejm6gKAQNsR1tCYCIvN9FHy7otZajzMqCgPOgC4cHdt4JPig==
dependencies:
base64-js "1.3.1"
brfs "^2.0.2"
unicode-trie "^2.0.0"

"@foliojs-fork/restructure@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@foliojs-fork/restructure/-/restructure-2.0.2.tgz#73759aba2aff1da87b7c4554e6839c70d43c92b4"
integrity sha512-59SgoZ3EXbkfSX7b63tsou/SDGzwUEK6MuB5sKqgVK1/XE0fxmpsOb9DQI8LXW3KfGnAjImCGhhEb7uPPAUVNA==

"@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
Expand Down Expand Up @@ -2234,10 +2204,10 @@ balanced-match@^1.0.0:
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=

base64-js@1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1"
integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
base64-js@0.0.8:
version "0.0.8"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-0.0.8.tgz#1101e9544f4a76b1bc3b26d452ca96d7a35e7978"
integrity sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=

base64-js@^1.0.2, base64-js@^1.1.2:
version "1.3.0"
Expand Down Expand Up @@ -2387,7 +2357,7 @@ browserify-des@^1.0.0:
inherits "^2.0.1"
safe-buffer "^5.1.2"

browserify-optional@^1.0.1:
browserify-optional@^1.0.0, browserify-optional@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/browserify-optional/-/browserify-optional-1.0.1.tgz#1e13722cfde0d85f121676c2a72ced533a018869"
integrity sha1-HhNyLP3g2F8SFnbCpyztUzoBiGk=
Expand Down Expand Up @@ -3785,6 +3755,23 @@ flatted@^2.0.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==

fontkit@^1.8.1:
version "1.8.1"
resolved "https://registry.yarnpkg.com/fontkit/-/fontkit-1.8.1.tgz#ae77485376f1096b45548bf6ced9a07af62a7846"
integrity sha512-BsNCjDoYRxmNWFdAuK1y9bQt+igIxGtTC9u/jSFjR9MKhmI00rP1fwSvERt+5ddE82544l0XH5mzXozQVUy2Tw==
dependencies:
babel-runtime "^6.26.0"
brfs "^2.0.0"
brotli "^1.2.0"
browserify-optional "^1.0.1"
clone "^1.0.4"
deep-equal "^1.0.0"
dfa "^1.2.0"
restructure "^0.5.3"
tiny-inflate "^1.0.2"
unicode-properties "^1.2.2"
unicode-trie "^0.3.0"

for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand Down Expand Up @@ -5186,6 +5173,15 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

linebreak@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/linebreak/-/linebreak-1.0.2.tgz#4b5781733e9a9eb2849dba2f963e47c887f8aa06"
integrity sha512-bJwSRsJeAmaZYnkcwl5sCQNfSDAhBuXxb6L27tb+qkBRtUQSSTUa5bcgCPD6hFEkRNlpWHfK7nFMmcANU7ZP1w==
dependencies:
base64-js "0.0.8"
brfs "^2.0.2"
unicode-trie "^1.0.0"

lines-and-columns@^1.1.6:
version "1.2.4"
resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
Expand Down Expand Up @@ -6407,6 +6403,13 @@ resolve@^1.20.0:
path-parse "^1.0.7"
supports-preserve-symlinks-flag "^1.0.0"

restructure@^0.5.3:
version "0.5.4"
resolved "https://registry.yarnpkg.com/restructure/-/restructure-0.5.4.tgz#f54e7dd563590fb34fd6bf55876109aeccb28de8"
integrity sha1-9U591WNZD7NP1r9Vh2EJrsyyjeg=
dependencies:
browserify-optional "^1.0.0"

ret@~0.1.10:
version "0.1.15"
resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"
Expand Down Expand Up @@ -7271,6 +7274,22 @@ unicode-property-aliases-ecmascript@^1.0.4:
resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57"
integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==

unicode-trie@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-0.3.1.tgz#d671dddd89101a08bac37b6a5161010602052085"
integrity sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU=
dependencies:
pako "^0.2.5"
tiny-inflate "^1.0.0"

unicode-trie@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-1.0.0.tgz#f649afdca127135edb55ca0ad7c8c60656d92ad1"
integrity sha512-v5raLKsobbFbWLMoX9+bChts/VhPPj3XpkNr/HbqkirXR1DPk8eo9IYKyvk0MQZFkaoRsFj2Rmaqgi2rfAZYtA==
dependencies:
pako "^0.2.5"
tiny-inflate "^1.0.0"

unicode-trie@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-trie/-/unicode-trie-2.0.0.tgz#8fd8845696e2e14a8b67d78fa9e0dd2cad62fec8"
Expand Down

0 comments on commit 6b91d86

Please sign in to comment.