Skip to content

Commit

Permalink
CHORE: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
HughePaul committed Sep 9, 2020
1 parent d933ee1 commit 961c446
Show file tree
Hide file tree
Showing 8 changed files with 1,292 additions and 945 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
language: node_js
node_js:
- "8"
- "10"
- "12"
- "14"
notifications:
email: false
sudo: false
7 changes: 5 additions & 2 deletions lib/pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,11 @@ class PDF {
},
set width(v) {
if (state.width === v) return;
if (v === undefined) return state.left = state.right = 0;
state.right = state.pageWidth - state.left - v;
if (v === undefined) {
state.left = state.right = 0;
} else {
state.right = state.pageWidth - state.left - v;
}
},
};
return state;
Expand Down
2,213 changes: 1,278 additions & 935 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"deep-clone-merge": "^1.5.1",
"hogan.js": "^3.0.2",
"pdfkit": "^0.11.0",
"underscore": "^1.9.2",
"underscore": "^1.11.0",
"xml2js": "^0.4.23"
},
"devDependencies": {
"chai": "^4.2.0",
"eslint": "^6.8.0",
"mocha": "^7.1.1",
"eslint": "^7.8.1",
"mocha": "^8.1.3",
"npm-run-all": "^4.0.2",
"nyc": "^15.0.0",
"sinon": "^9.0.1",
"nyc": "^15.1.0",
"sinon": "^9.0.3",
"sinon-chai": "^3.5.0"
},
"nyc": {
Expand All @@ -51,6 +51,6 @@
"statements": 92,
"branches": 84,
"functions": 98,
"lines": 95
"lines": 94
}
}
Binary file not shown.
Binary file added test/unit/fixtures/example-node12.pdf
Binary file not shown.
Binary file added test/unit/fixtures/example-node14.pdf
Binary file not shown.
3 changes: 2 additions & 1 deletion test/unit/lib/spec.generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ describe('generate', () => {

it('example pdf render', done => {
let sourcefilename = path.resolve(__dirname, '..', 'fixtures', 'example.xml');
let examplepdf = path.resolve(__dirname, '..', 'fixtures', 'example.pdf');
let nodeVersion = process.versions.node.split('.')[0];
let examplepdf = path.resolve(__dirname, '..', 'fixtures', 'example-node' + nodeVersion + '.pdf');
let xml = fs.readFileSync(sourcefilename);
generate.toBuffer(xml, path.dirname(sourcefilename), (err, buffer) => {
expect(err).to.be.null;
Expand Down

0 comments on commit 961c446

Please sign in to comment.