From 3e9fca02c356e61997321e74947042944a4afd22 Mon Sep 17 00:00:00 2001 From: Julio Cesar Ody Date: Thu, 1 Dec 2022 13:07:32 -0300 Subject: [PATCH] Extirpate --- package.json | 2 +- src/util.js | 1 - src/util/minimal.js | 26 -------------------------- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/package.json b/package.json index 4a16b4864..7d45f754b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@supernormalco/protobufjs", - "version": "7.1.3", + "version": "7.1.4", "versionScheme": "~", "description": "Protocol Buffers for JavaScript (& TypeScript).", "author": "Daniel Wirtz ", diff --git a/src/util.js b/src/util.js index c39d33a6a..ea404d65f 100644 --- a/src/util.js +++ b/src/util.js @@ -19,7 +19,6 @@ util.path = require("@protobufjs/path"); * Node's fs module if available. * @type {Object.} */ -util.fs = util.inquire("fs"); /** * Converts an object's values to an array. diff --git a/src/util/minimal.js b/src/util/minimal.js index 35008ecc4..c4ae13986 100644 --- a/src/util/minimal.js +++ b/src/util/minimal.js @@ -13,9 +13,6 @@ util.EventEmitter = require("@protobufjs/eventemitter"); // float handling accross browsers util.float = require("@protobufjs/float"); -// requires modules optionally and hides the call from bundlers -util.inquire = require("@protobufjs/inquire"); - // converts to / from utf8 encoded strings util.utf8 = require("@protobufjs/utf8"); @@ -119,21 +116,6 @@ util.isSet = function isSet(obj, prop) { * @extends Uint8Array */ -/** - * Node's Buffer class if available. - * @type {Constructor} - */ -util.Buffer = (function() { - try { - var Buffer = util.inquire("buffer").Buffer; - // refuse to use non-node buffers if not explicitly assigned (perf reasons): - return Buffer.prototype.utf8Write ? Buffer : /* istanbul ignore next */ null; - } catch (e) { - /* istanbul ignore next */ - return null; - } -})(); - // Internal alias of or polyfull for Buffer.from. util._Buffer_from = null; @@ -173,14 +155,6 @@ util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore n * @property {boolean} unsigned Whether unsigned or not */ -/** - * Long.js's Long class if available. - * @type {Constructor} - */ -util.Long = /* istanbul ignore next */ util.global.dcodeIO && /* istanbul ignore next */ util.global.dcodeIO.Long - || /* istanbul ignore next */ util.global.Long - || util.inquire("long"); - /** * Regular expression used to verify 2 bit (`bool`) map keys. * @type {RegExp}