Skip to content

Commit 5867f07

Browse files
committed
Other: Removed debug build, made it an extension
1 parent 2dcae25 commit 5867f07

File tree

6 files changed

+8
-30
lines changed

6 files changed

+8
-30
lines changed

debug.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

debug.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

ext/debug/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
protobufjs/ext/debug
2+
=========================
3+
4+
Experimental debugging extension.
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
// WARNING: highly experimental.
2-
// might eventually become a starting point for a real debug build.
3-
41
"use strict";
5-
var protobuf = module.exports = require("./index");
2+
var protobuf = require("../..");
63

74
/**
85
* Debugging utility functions. Only present in debug builds.
96
* @namespace
107
*/
11-
var debug = protobuf.debug = {};
8+
var debug = protobuf.debug = module.exports = {};
129

1310
var codegen = protobuf.util.codegen;
1411

index.d.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -338,23 +338,6 @@ export interface IExtensionField extends IField {
338338
*/
339339
type FieldDecorator = (prototype: object, fieldName: string) => void;
340340

341-
/** Debugging utility functions. Only present in debug builds. */
342-
export namespace debug {
343-
344-
/**
345-
* Returns a list of unused types within the specified root.
346-
* @param ns Namespace to search
347-
* @returns Unused types
348-
*/
349-
function unusedTypes(ns: NamespaceBase): Type[];
350-
351-
/** Enables debugging extensions. */
352-
function enable(): void;
353-
354-
/** Disables debugging extensions. */
355-
function disable(): void;
356-
}
357-
358341
/**
359342
* A node-style callback as used by {@link load} and {@link Root#load}.
360343
* @param error Error, if any, otherwise `null`

tests/other_basics-debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
var tape = require("tape");
1+
/* var tape = require("tape");
22
33
var protobuf = require("../debug");
44
@@ -105,4 +105,4 @@ tape.test("google.protobuf.Any type", function(test) {
105105
test.end();
106106
107107
});
108-
});
108+
}); */

0 commit comments

Comments
 (0)