From 0bec4936037869f71b41f83655a581068ff3de89 Mon Sep 17 00:00:00 2001 From: AnthonyLenglet Date: Mon, 17 Oct 2022 12:47:15 +0000 Subject: [PATCH] migrate away from the fork of foliojs packages --- package.json | 4 ++-- src/PDFDocument.js | 2 +- src/TextBreaker.js | 2 +- src/browser-extensions/standard-fonts/Courier.js | 8 ++++---- src/browser-extensions/standard-fonts/Helvetica.js | 8 ++++---- src/browser-extensions/standard-fonts/Symbol.js | 2 +- src/browser-extensions/standard-fonts/Times.js | 8 ++++---- src/browser-extensions/standard-fonts/ZapfDingbats.js | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 5e7ae8dee..1b6a351c5 100644 --- a/package.json +++ b/package.json @@ -9,9 +9,9 @@ "test": "tests" }, "dependencies": { - "@foliojs-fork/linebreak": "^1.1.1", - "@foliojs-fork/pdfkit": "^0.13.0", "iconv-lite": "^0.6.3", + "linebreak": "^1.1.0", + "pdfkit": "^0.13.0", "xmldoc": "^1.1.2" }, "devDependencies": { diff --git a/src/PDFDocument.js b/src/PDFDocument.js index 6d126d5fd..320f8a984 100644 --- a/src/PDFDocument.js +++ b/src/PDFDocument.js @@ -1,4 +1,4 @@ -import PDFKit from '@foliojs-fork/pdfkit'; +import PDFKit from "pdfkit"; const typeName = (bold, italics) => { let type = 'normal'; diff --git a/src/TextBreaker.js b/src/TextBreaker.js index e43ae07a0..4e4aff3df 100644 --- a/src/TextBreaker.js +++ b/src/TextBreaker.js @@ -1,4 +1,4 @@ -import LineBreaker from '@foliojs-fork/linebreak'; +import LineBreaker from 'linebreak'; import { isObject } from './helpers/variableType'; import StyleContextStack from './StyleContextStack'; diff --git a/src/browser-extensions/standard-fonts/Courier.js b/src/browser-extensions/standard-fonts/Courier.js index 3d78b16a5..316809d87 100644 --- a/src/browser-extensions/standard-fonts/Courier.js +++ b/src/browser-extensions/standard-fonts/Courier.js @@ -2,10 +2,10 @@ var fs = require('fs'); var fontContainer = { vfs: { - 'data/Courier.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Courier.afm', 'utf8'), encoding: 'utf8' }, - 'data/Courier-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Courier-Bold.afm', 'utf8'), encoding: 'utf8' }, - 'data/Courier-Oblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Courier-Oblique.afm', 'utf8'), encoding: 'utf8' }, - 'data/Courier-BoldOblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Courier-BoldOblique.afm', 'utf8'), encoding: 'utf8' } + 'data/Courier.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Courier.afm', 'utf8'), encoding: 'utf8' }, + 'data/Courier-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Courier-Bold.afm', 'utf8'), encoding: 'utf8' }, + 'data/Courier-Oblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Courier-Oblique.afm', 'utf8'), encoding: 'utf8' }, + 'data/Courier-BoldOblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Courier-BoldOblique.afm', 'utf8'), encoding: 'utf8' } }, fonts: { Courier: { diff --git a/src/browser-extensions/standard-fonts/Helvetica.js b/src/browser-extensions/standard-fonts/Helvetica.js index e65f701fb..3baa5111b 100644 --- a/src/browser-extensions/standard-fonts/Helvetica.js +++ b/src/browser-extensions/standard-fonts/Helvetica.js @@ -2,10 +2,10 @@ var fs = require('fs'); var fontContainer = { vfs: { - 'data/Helvetica.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Helvetica.afm', 'utf8'), encoding: 'utf8' }, - 'data/Helvetica-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Helvetica-Bold.afm', 'utf8'), encoding: 'utf8' }, - 'data/Helvetica-Oblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Helvetica-Oblique.afm', 'utf8'), encoding: 'utf8' }, - 'data/Helvetica-BoldOblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Helvetica-BoldOblique.afm', 'utf8'), encoding: 'utf8' } + 'data/Helvetica.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Helvetica.afm', 'utf8'), encoding: 'utf8' }, + 'data/Helvetica-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Helvetica-Bold.afm', 'utf8'), encoding: 'utf8' }, + 'data/Helvetica-Oblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Helvetica-Oblique.afm', 'utf8'), encoding: 'utf8' }, + 'data/Helvetica-BoldOblique.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Helvetica-BoldOblique.afm', 'utf8'), encoding: 'utf8' } }, fonts: { Helvetica: { diff --git a/src/browser-extensions/standard-fonts/Symbol.js b/src/browser-extensions/standard-fonts/Symbol.js index 0022a62c0..c8cdb6502 100644 --- a/src/browser-extensions/standard-fonts/Symbol.js +++ b/src/browser-extensions/standard-fonts/Symbol.js @@ -2,7 +2,7 @@ var fs = require('fs'); var fontContainer = { vfs: { - 'data/Symbol.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Symbol.afm', 'utf8'), encoding: 'utf8' } + 'data/Symbol.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Symbol.afm', 'utf8'), encoding: 'utf8' } }, fonts: { Symbol: { diff --git a/src/browser-extensions/standard-fonts/Times.js b/src/browser-extensions/standard-fonts/Times.js index f7dad42cd..7374f8b90 100644 --- a/src/browser-extensions/standard-fonts/Times.js +++ b/src/browser-extensions/standard-fonts/Times.js @@ -2,10 +2,10 @@ var fs = require('fs'); var fontContainer = { vfs: { - 'data/Times-Roman.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Times-Roman.afm', 'utf8'), encoding: 'utf8' }, - 'data/Times-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Times-Bold.afm', 'utf8'), encoding: 'utf8' }, - 'data/Times-Italic.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Times-Italic.afm', 'utf8'), encoding: 'utf8' }, - 'data/Times-BoldItalic.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/Times-BoldItalic.afm', 'utf8'), encoding: 'utf8' } + 'data/Times-Roman.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Times-Roman.afm', 'utf8'), encoding: 'utf8' }, + 'data/Times-Bold.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Times-Bold.afm', 'utf8'), encoding: 'utf8' }, + 'data/Times-Italic.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Times-Italic.afm', 'utf8'), encoding: 'utf8' }, + 'data/Times-BoldItalic.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/Times-BoldItalic.afm', 'utf8'), encoding: 'utf8' } }, fonts: { Times: { diff --git a/src/browser-extensions/standard-fonts/ZapfDingbats.js b/src/browser-extensions/standard-fonts/ZapfDingbats.js index cfaeb5a2a..e5281f163 100644 --- a/src/browser-extensions/standard-fonts/ZapfDingbats.js +++ b/src/browser-extensions/standard-fonts/ZapfDingbats.js @@ -2,7 +2,7 @@ var fs = require('fs'); var fontContainer = { vfs: { - 'data/ZapfDingbats.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/@foliojs-fork/pdfkit/js/data/ZapfDingbats.afm', 'utf8'), encoding: 'utf8' } + 'data/ZapfDingbats.afm': { data: fs.readFileSync(__dirname + '/../../../node_modules/pdfkit/js/data/ZapfDingbats.afm', 'utf8'), encoding: 'utf8' } }, fonts: { ZapfDingbats: {