diff --git a/README.md b/README.md index d4725cd4..522033af 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ found at the end of this document. ## Status -* Current bwip-js version is 3.0.0 (2021-04-28) +* Current bwip-js version is 3.0.1 (2021-06-16) * Current BWIPP version is 2021-02-06 * Node.js compatibility: 0.12+ * Browser compatibility: Edge, Firefox, Chrome @@ -233,7 +233,7 @@ The ESM also facilitates bundler tree shaking by providing the individual encode Each exported encoder functions identically to `bwipjs.toCanvas()`. The exported names are the same as the `bcid` names, with the caveat that dashes `-` are replaced with -underscores `_`. For example, if you want to import the `gs1-128` encoder, you would use: +underscores `_`. For example, to import the `gs1-128` encoder, you would use: ```javascript import { gs1_128 } from 'bwip-js'; diff --git a/dist/bwip-js-min.js b/dist/bwip-js-min.js index d0652860..c4077cf7 100644 --- a/dist/bwip-js-min.js +++ b/dist/bwip-js-min.js @@ -64,7 +64,7 @@ FontLib.loadFont("OCR-B", 96, 100, "AAEAAAAPAIAAAwBwRkZUTXxHn14AADmUAAAAHEdERUYA toCanvas:ToCanvas, render:Render, raw:ToRaw, fixupOptions:FixupOptions, loadFont:FontLib.loadFont, - BWIPJS_VERSION:'3.0.0 (2021-04-28)', + BWIPJS_VERSION:'3.0.1 (2021-06-16)', BWIPP_VERSION:BWIPP_VERSION, // Internals BWIPJS:BWIPJS, STBTT:STBTT, FontLib:FontLib, diff --git a/dist/bwip-js-node.js b/dist/bwip-js-node.js index d6bca197..8b21f1f6 100644 --- a/dist/bwip-js-node.js +++ b/dist/bwip-js-node.js @@ -36509,7 +36509,7 @@ var PNG_CRC = (function() { })(); var PNG_ZLIB = require('zlib'); -require('stream'); // fix for https://github.com/nodejs/node/issues/37021 +var __unused = require('stream'); // fix for https://github.com/nodejs/node/issues/37021 // opts is the same options object passed into the bwipjs methods. function DrawingZlibPng(opts, callback) { @@ -38769,7 +38769,7 @@ module.exports = { request:Request, toBuffer:ToBuffer, render:Render, raw:ToRaw, fixupOptions:FixupOptions, loadFont:FontLib.loadFont, - BWIPJS_VERSION:'3.0.0 (2021-04-28)', + BWIPJS_VERSION:'3.0.1 (2021-06-16)', BWIPP_VERSION:BWIPP_VERSION, // Internals BWIPJS:BWIPJS, STBTT:STBTT, FontLib:FontLib, diff --git a/dist/bwip-js-node.mjs b/dist/bwip-js-node.mjs index f4662a8f..b410cad4 100644 --- a/dist/bwip-js-node.mjs +++ b/dist/bwip-js-node.mjs @@ -38877,7 +38877,7 @@ export default { request:Request, toBuffer:ToBuffer, render:Render, raw:ToRaw, fixupOptions : FixupOptions, loadFont : FontLib.loadFont, - BWIPJS_VERSION : '__BWIPJS_VERS__', + BWIPJS_VERSION : '3.0.1 (2021-06-16)', BWIPP_VERSION : BWIPP_VERSION, // Internals BWIPJS, STBTT, FontLib, DrawingBuiltin, DrawingZlibPng, diff --git a/dist/bwip-js.js b/dist/bwip-js.js index 20372619..0277e1ed 100644 --- a/dist/bwip-js.js +++ b/dist/bwip-js.js @@ -38607,7 +38607,7 @@ FontLib.loadFont("OCR-B", 96, 100, "AAEAAAAPAIAAAwBwRkZUTXxHn14AADmUAAAAHEdERUYA toCanvas:ToCanvas, render:Render, raw:ToRaw, fixupOptions:FixupOptions, loadFont:FontLib.loadFont, - BWIPJS_VERSION:'3.0.0 (2021-04-28)', + BWIPJS_VERSION:'3.0.1 (2021-06-16)', BWIPP_VERSION:BWIPP_VERSION, // Internals BWIPJS:BWIPJS, STBTT:STBTT, FontLib:FontLib, diff --git a/dist/bwip-js.mjs b/dist/bwip-js.mjs index bf4c0ff4..c8387dc8 100644 --- a/dist/bwip-js.mjs +++ b/dist/bwip-js.mjs @@ -38706,7 +38706,7 @@ export default { toCanvas : ToCanvas, render : Render, raw : ToRaw, fixupOptions : FixupOptions, loadFont : FontLib.loadFont, - BWIPJS_VERSION : '__BWIPJS_VERS__', + BWIPJS_VERSION : '3.0.1 (2021-06-16)', BWIPP_VERSION : BWIPP_VERSION, // Internals BWIPJS, STBTT, FontLib, DrawingBuiltin, DrawingCanvas, diff --git a/examples/server.js b/examples/server.js index 99c8d368..544cf12d 100644 --- a/examples/server.js +++ b/examples/server.js @@ -29,6 +29,8 @@ console.log('bwip-js ' + bwipjs.BWIPJS_VERSION + ' / BWIPP ' + bwipjs.BWIPP_VERS // 100 (100%) indicates to use the font's default size. //bwipjs.loadFont('Inconsolata', 100, // require('fs').readFileSync(__dirname + '/fonts/Inconsolata.otf', 'binary')); +bwipjs.loadFont('Verdana', 100, + require('fs').readFileSync('c:/downloads/verdana.otf', 'binary')); const server = http.createServer(function(req, res) { // If the url does not begin /?bcid= then 404. Otherwise, we end up diff --git a/package.json b/package.json index 344368bd..fa9dad4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bwip-js", - "version": "3.0.0", + "version": "3.0.1", "description": "JavaScript barcode generator supporting over 100 types and standards.", "main": "./dist/bwip-js-node.js", "browser": "./dist/bwip-js.js", @@ -12,6 +12,7 @@ }, "electron": "./dist/bwip-js-node.js", "node": { + "import": "./dist/bwip-js-node.mjs", "require": "./dist/bwip-js-node.js" } }, diff --git a/src/drawing-zlibpng.js b/src/drawing-zlibpng.js index 5ea79f9f..fe91002c 100644 --- a/src/drawing-zlibpng.js +++ b/src/drawing-zlibpng.js @@ -20,7 +20,7 @@ var PNG_CRC = (function() { })(); var PNG_ZLIB = require('zlib'); -require('stream'); // fix for https://github.com/nodejs/node/issues/37021 +var __unused = require('stream'); // fix for https://github.com/nodejs/node/issues/37021 // opts is the same options object passed into the bwipjs methods. function DrawingZlibPng(opts, callback) {