protobufjs 8.5.0 → 8.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- var path = require("path"),
4
- fs = require("fs"),
5
- pkg = require(path.join(__dirname, "..", "package.json"));
6
-
7
- // check version scheme used by dependents
8
- if (!pkg.versionScheme)
9
- return;
10
-
11
- var warn = process.stderr.isTTY
12
- ? "\x1b[30m\x1b[43mWARN\x1b[0m \x1b[35m" + path.basename(process.argv[1], ".js") + "\x1b[0m"
13
- : "WARN " + path.basename(process.argv[1], ".js");
14
-
15
- var basePkg;
16
- try {
17
- basePkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "..", "package.json")));
18
- } catch (e) {
19
- return;
20
- }
21
-
22
- [
23
- "dependencies",
24
- "devDependencies",
25
- "optionalDependencies",
26
- "peerDependencies"
27
- ]
28
- .forEach(function(check) {
29
- var version = basePkg && basePkg[check] && basePkg[check][pkg.name];
30
- if (typeof version === "string" && version.charAt(0) !== pkg.versionScheme)
31
- process.stderr.write(pkg.name + " " + warn + " " + pkg.name + "@" + version + " is configured as a dependency of " + basePkg.name + ". use " + pkg.name + "@" + pkg.versionScheme + version.substring(1) + " instead for API compatibility.\n");
32
- });
@@ -1,10 +0,0 @@
1
- export = inquire;
2
-
3
- /**
4
- * Requires a module only if available.
5
- * @memberof util
6
- * @param {string} moduleName Module to require
7
- * @returns {?Object} Required module if available and not empty, otherwise `null`
8
- * @deprecated Legacy optional require helper. Will be removed in a future release.
9
- */
10
- declare function inquire(moduleName: string): object;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- module.exports = inquire;
3
-
4
- /**
5
- * Requires a module only if available.
6
- * @memberof util
7
- * @param {string} moduleName Module to require
8
- * @returns {?Object} Required module if available and not empty, otherwise `null`
9
- * @deprecated Legacy optional require helper. Will be removed in a future release.
10
- */
11
- function inquire(moduleName) {
12
- try {
13
- if (typeof require !== "function") {
14
- return null;
15
- }
16
- var mod = require(moduleName);
17
- if (mod && (mod.length || Object.keys(mod).length)) return mod;
18
- return null;
19
- } catch (err) {
20
- // ignore
21
- return null;
22
- }
23
- }
24
-
25
- /*
26
- // maybe worth a shot to prevent renaming issues:
27
- // see: https://github.com/webpack/webpack/blob/master/lib/dependencies/CommonJsRequireDependencyParserPlugin.js
28
- // triggers on:
29
- // - expression require.cache
30
- // - expression require (???)
31
- // - call require
32
- // - call require:commonjs:item
33
- // - call require:commonjs:context
34
-
35
- Object.defineProperty(Function.prototype, "__self", { get: function() { return this; } });
36
- var r = require.__self;
37
- delete Function.prototype.__self;
38
- */