From cb1c20cb01fe7b40a510f5639cddb2ebadb47e45 Mon Sep 17 00:00:00 2001 From: Andrew Dillon Date: Sun, 15 Nov 2020 09:45:46 -0600 Subject: [PATCH] Bump version to 1.12.0 --- apps/deno/dummy.d.ts | 20 ++++++++++++++++++ apps/deno/index.ts | 44 +++++++++++++++++++-------------------- apps/deno/tests/test1.ts | 2 ++ apps/deno/tests/test10.ts | 2 ++ apps/deno/tests/test11.ts | 2 ++ apps/deno/tests/test12.ts | 2 ++ apps/deno/tests/test13.ts | 2 ++ apps/deno/tests/test14.ts | 2 ++ apps/deno/tests/test15.ts | 2 ++ apps/deno/tests/test16.ts | 2 ++ apps/deno/tests/test17.ts | 2 ++ apps/deno/tests/test2.ts | 2 ++ apps/deno/tests/test3.ts | 2 ++ apps/deno/tests/test4.ts | 2 ++ apps/deno/tests/test5.ts | 2 ++ apps/deno/tests/test6.ts | 2 ++ apps/deno/tests/test7.ts | 2 ++ apps/deno/tests/test8.ts | 2 ++ apps/deno/tests/test9.ts | 2 ++ apps/rn/yarn.lock | 2 +- package.json | 2 +- 21 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 apps/deno/dummy.d.ts diff --git a/apps/deno/dummy.d.ts b/apps/deno/dummy.d.ts new file mode 100644 index 000000000..f857371db --- /dev/null +++ b/apps/deno/dummy.d.ts @@ -0,0 +1,20 @@ +declare const ParseSpeeds: any; +declare const PDFPage: any; +declare const clip: any; +declare const clipEvenOdd: any; +declare const closePath: any; +declare const cmyk: any; +declare const degrees: any; +declare const drawRectangle: any; +declare const endPath: any; +declare const grayscale: any; +declare const LineCapStyle: any; +declare const LineJoinStyle: any; +declare const typedArrayFor: any; +declare const lineTo: any; +declare const PDFDocument: any; +declare const popGraphicsState: any; +declare const pushGraphicsState: any; +declare const rgb: any; +declare const setLineJoin: any; +declare const StandardFonts: any; diff --git a/apps/deno/index.ts b/apps/deno/index.ts index 8d530445f..b7acac38b 100644 --- a/apps/deno/index.ts +++ b/apps/deno/index.ts @@ -1,24 +1,23 @@ -import { dirname } from 'https://deno.land/std@0.50.0/path/mod.ts'; -import { readLines } from 'https://deno.land/std@v0.50.0/io/bufio.ts'; -import { sep } from 'https://deno.land/std@v0.50.0/path/mod.ts'; - -import test1 from './tests/test1.ts'; -import test2 from './tests/test2.ts'; -import test3 from './tests/test3.ts'; -import test4 from './tests/test4.ts'; -import test5 from './tests/test5.ts'; -import test6 from './tests/test6.ts'; -import test7 from './tests/test7.ts'; -import test8 from './tests/test8.ts'; -import test9 from './tests/test9.ts'; -import test10 from './tests/test10.ts'; -import test11 from './tests/test11.ts'; -import test12 from './tests/test12.ts'; -import test13 from './tests/test13.ts'; -import test14 from './tests/test14.ts'; -import test15 from './tests/test15.ts'; -import test16 from './tests/test16.ts'; -import test17 from './tests/test17.ts'; +import { readLines } from 'https://deno.land/std@0.67.0/io/bufio.ts'; +import { SEP, dirname } from 'https://deno.land/std@0.67.0/path/mod.ts'; + +import { default as test1 } from './tests/test1.ts'; +import { default as test2 } from './tests/test2.ts'; +import { default as test3 } from './tests/test3.ts'; +import { default as test4 } from './tests/test4.ts'; +import { default as test5 } from './tests/test5.ts'; +import { default as test6 } from './tests/test6.ts'; +import { default as test7 } from './tests/test7.ts'; +import { default as test8 } from './tests/test8.ts'; +import { default as test9 } from './tests/test9.ts'; +import { default as test10 } from './tests/test10.ts'; +import { default as test11 } from './tests/test11.ts'; +import { default as test12 } from './tests/test12.ts'; +import { default as test13 } from './tests/test13.ts'; +import { default as test14 } from './tests/test14.ts'; +import { default as test15 } from './tests/test15.ts'; +import { default as test16 } from './tests/test16.ts'; +import { default as test17 } from './tests/test17.ts'; const promptToContinue = () => { const prompt = 'Press to run the next test...'; @@ -49,7 +48,7 @@ const openPdf = (path: string, reader: string = '') => { const tempDir = () => dirname(Deno.makeTempDirSync()); const writePdfToTmp = (pdf: Uint8Array) => { - const path = `${tempDir()}${sep}${Date.now()}.pdf`; + const path = `${tempDir()}${SEP}${Date.now()}.pdf`; Deno.writeFileSync(path, pdf); return path; }; @@ -136,6 +135,7 @@ const assets = { }; export type Assets = typeof assets; +// export type Assets = any; // This script can be executed with 0, 1, or 2 CLI arguments: // $ deno index.ts diff --git a/apps/deno/tests/test1.ts b/apps/deno/tests/test1.ts index 52957b5eb..f3552e16b 100644 --- a/apps/deno/tests/test1.ts +++ b/apps/deno/tests/test1.ts @@ -1,5 +1,7 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { clip, clipEvenOdd, diff --git a/apps/deno/tests/test10.ts b/apps/deno/tests/test10.ts index 820e8b744..384fe0899 100644 --- a/apps/deno/tests/test10.ts +++ b/apps/deno/tests/test10.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument, StandardFonts, diff --git a/apps/deno/tests/test11.ts b/apps/deno/tests/test11.ts index 04b2089a9..7a747c2ab 100644 --- a/apps/deno/tests/test11.ts +++ b/apps/deno/tests/test11.ts @@ -1,5 +1,7 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { last, PDFDocument, diff --git a/apps/deno/tests/test12.ts b/apps/deno/tests/test12.ts index 5efec01d2..0ad1f319d 100644 --- a/apps/deno/tests/test12.ts +++ b/apps/deno/tests/test12.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PageSizes, PDFDocument, diff --git a/apps/deno/tests/test13.ts b/apps/deno/tests/test13.ts index 1d58233c8..4c496c380 100644 --- a/apps/deno/tests/test13.ts +++ b/apps/deno/tests/test13.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument, rgb } from '../../../dist/pdf-lib.esm.js'; // prettier-ignore diff --git a/apps/deno/tests/test14.ts b/apps/deno/tests/test14.ts index 4076fe499..55e92da3e 100644 --- a/apps/deno/tests/test14.ts +++ b/apps/deno/tests/test14.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument, values, diff --git a/apps/deno/tests/test15.ts b/apps/deno/tests/test15.ts index a37ee888e..4a0553a11 100644 --- a/apps/deno/tests/test15.ts +++ b/apps/deno/tests/test15.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument, StandardFonts, diff --git a/apps/deno/tests/test16.ts b/apps/deno/tests/test16.ts index 63f1b035f..2559fe72d 100644 --- a/apps/deno/tests/test16.ts +++ b/apps/deno/tests/test16.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument } from '../../../dist/pdf-lib.esm.js'; const fieldNames = { diff --git a/apps/deno/tests/test17.ts b/apps/deno/tests/test17.ts index bbad56991..10c9b8494 100644 --- a/apps/deno/tests/test17.ts +++ b/apps/deno/tests/test17.ts @@ -1,6 +1,8 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { PDFDocument, StandardFonts, diff --git a/apps/deno/tests/test2.ts b/apps/deno/tests/test2.ts index dd9d3d0a7..668373511 100644 --- a/apps/deno/tests/test2.ts +++ b/apps/deno/tests/test2.ts @@ -1,5 +1,7 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { ParseSpeeds, PDFPage, diff --git a/apps/deno/tests/test3.ts b/apps/deno/tests/test3.ts index a494e2b4e..4d91bc16f 100644 --- a/apps/deno/tests/test3.ts +++ b/apps/deno/tests/test3.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { degrees, ParseSpeeds, diff --git a/apps/deno/tests/test4.ts b/apps/deno/tests/test4.ts index 3bf9cee39..2d3adbf2a 100644 --- a/apps/deno/tests/test4.ts +++ b/apps/deno/tests/test4.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { ParseSpeeds, PDFDocument, diff --git a/apps/deno/tests/test5.ts b/apps/deno/tests/test5.ts index c6373fea9..b91d2a082 100644 --- a/apps/deno/tests/test5.ts +++ b/apps/deno/tests/test5.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { ParseSpeeds, PDFPage, diff --git a/apps/deno/tests/test6.ts b/apps/deno/tests/test6.ts index a43232a5d..d9379fbad 100644 --- a/apps/deno/tests/test6.ts +++ b/apps/deno/tests/test6.ts @@ -1,5 +1,7 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { degrees, ParseSpeeds, diff --git a/apps/deno/tests/test7.ts b/apps/deno/tests/test7.ts index 0baa12818..226436602 100644 --- a/apps/deno/tests/test7.ts +++ b/apps/deno/tests/test7.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { degrees, ParseSpeeds, diff --git a/apps/deno/tests/test8.ts b/apps/deno/tests/test8.ts index 62c76f59a..edb4a8188 100644 --- a/apps/deno/tests/test8.ts +++ b/apps/deno/tests/test8.ts @@ -1,4 +1,6 @@ import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { ParseSpeeds, PDFDocument, diff --git a/apps/deno/tests/test9.ts b/apps/deno/tests/test9.ts index 8186e45a0..b11fc4764 100644 --- a/apps/deno/tests/test9.ts +++ b/apps/deno/tests/test9.ts @@ -1,5 +1,7 @@ import fontkit from 'https://cdn.skypack.dev/@pdf-lib/fontkit@^1.0.0?dts'; import { Assets } from '../index.ts'; + +// @deno-types="../dummy.d.ts" import { ParseSpeeds, PDFDocument, diff --git a/apps/rn/yarn.lock b/apps/rn/yarn.lock index 6bb33a8fa..e755b3264 100644 --- a/apps/rn/yarn.lock +++ b/apps/rn/yarn.lock @@ -4885,7 +4885,7 @@ path-type@^3.0.0: pify "^3.0.0" pdf-lib@./../..: - version "1.11.1" + version "1.12.0" dependencies: "@pdf-lib/standard-fonts" "^1.0.0" "@pdf-lib/upng" "^1.0.1" diff --git a/package.json b/package.json index 1145f5adb..63127582e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdf-lib", - "version": "1.11.2", + "version": "1.12.0", "description": "Create and modify PDF files with JavaScript", "author": "Andrew Dillon ", "contributors": [