Skip to content

Commit

Permalink
Other: Moved a few things out of the root folder
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Mar 11, 2017
1 parent ac26a7a commit 95cd64e
Show file tree
Hide file tree
Showing 26 changed files with 77 additions and 169 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ engines:
tslint:
enabled: true
channel: beta
config: tslint.json
config: .tslint.json
ratings:
paths:
- "src/**.js"
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ cli/wrappers/*
coverage/*
dist/*
docs/*
gulpfile.js
lib/deep-equal/*
lib/prelude.js
lib/polyfill.js
lib/tape-adapter.js
lib/tsd-jsdoc/*
lib/*/tests/*
sandbox/*
scripts/*
tests/*
File renamed without changes.
2 changes: 1 addition & 1 deletion cli/pbts.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ exports.main = function(args, callback) {
// There is no proper API for jsdoc, so this executes the CLI and pipes the output
var basedir = path.join(__dirname, "..");
var moduleName = argv.name || "null";
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "jsdoc.types.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
var cmd = "node \"" + require.resolve("jsdoc/jsdoc.js") + "\" -c \"" + path.join(basedir, "scripts", "jsdoc.types.json") + "\" -q \"module=" + encodeURIComponent(moduleName) + "&comments=" + Boolean(argv.comments) + "\" " + files.map(function(file) { return "\"" + file + "\""; }).join(" ");
var child = child_process.exec(cmd, {
cwd: process.cwd(),
argv0: "node",
Expand Down
44 changes: 12 additions & 32 deletions dist/light/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/light/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/light/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/light/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/light/protobuf.min.js.map

Large diffs are not rendered by default.

41 changes: 10 additions & 31 deletions dist/minimal/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/minimal/protobuf.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/minimal/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/minimal/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/minimal/protobuf.min.js.map

Large diffs are not rendered by default.

44 changes: 12 additions & 32 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

28 changes: 9 additions & 19 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2322,10 +2322,16 @@ export namespace util {
constructor(message: string, instance?: Message);

/**
* Underlying plain error.
* @type {Error}
* Error message.
* @type {string}
*/
public error: Error;
public message: string;

/**
* Stack trace.
* @type {string}
*/
public stack: string;

/**
* So far decoded message instance, if applicable.
Expand All @@ -2338,22 +2344,6 @@ export namespace util {
* @type {string}
*/
public name: string;

/**
* Error message.
* @name util.ProtocolError#message
* @type {string}
* @readonly
*/
public readonly message: string;

/**
* Stack trace.
* @name util.ProtocolError#stack
* @type {string}
* @readonly
*/
public readonly stack: string;
}

/**
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
},
"scripts": {
"bench": "node bench",
"build": "gulp",
"build": "gulp --gulpfile scripts/gulpfile.js",
"changelog": "node scripts/changelog -w",
"coverage": "istanbul cover node_modules/tape/bin/tape tests/*.js tests/node/*.js",
"coverage-ci": "npm run coverage && codeclimate-test-reporter < coverage/lcov.info",
"docs": "jsdoc -c jsdoc.docs.json -R README.md --verbose --pedantic",
"lint": "eslint **/*.js && tslint **/*.d.ts -e **/node_modules/** -t stylish",
"docs": "jsdoc -c scripts/jsdoc.docs.json -R README.md --verbose --pedantic",
"lint": "eslint **/*.js && tslint **/*.d.ts -e **/node_modules/** -t stylish -c .tslint.json",
"pages": "node scripts/pages",
"prepublish": "node scripts/prepublish",
"postinstall": "node scripts/postinstall",
Expand Down
2 changes: 1 addition & 1 deletion runtime.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// deprecated - compatibility layer for v6.5 and earlier
"use strict";
module.exports = require("./minimal");
module.exports = require("./src/index-minimal");
8 changes: 4 additions & 4 deletions gulpfile.js → scripts/gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var gulp = require("gulp"),
bundle = require("./scripts/bundle");
bundle = require("./bundle");

var defaultTask = [];

Expand All @@ -23,8 +23,8 @@ function defineTask(name, entry, target) {
defaultTask.push(name + "-bundle", name + "-minify", name + "-compress");
}

defineTask("full" , "./src/index" , "./dist" );
defineTask("light" , "./src/index-light" , "./dist/light" );
defineTask("minimal", "./src/index-minimal", "./dist/minimal");
defineTask("full" , "../src/index" , "../dist" );
defineTask("light" , "../src/index-light" , "../dist/light" );
defineTask("minimal", "../src/index-minimal", "../dist/minimal");

gulp.task("default", defaultTask);
File renamed without changes.
File renamed without changes.
39 changes: 9 additions & 30 deletions src/util/protocolerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,16 @@ function ProtocolError(message, instance) {
return new ProtocolError(message, instance);

/**
* Underlying plain error.
* @type {Error}
* Error message.
* @type {string}
*/
this.error = Error(message);
this.message = message;

/**
* Stack trace.
* @type {string}
*/
this.stack = Error(message).stack || /* istanbul ignore next */ ""; // not supported in IE9/Safari5

/**
* So far decoded message instance, if applicable.
Expand All @@ -43,30 +49,3 @@ function ProtocolError(message, instance) {
* @type {string}
*/
ProtocolError.prototype.name = "ProtocolError";

Object.defineProperties(ProtocolError.prototype, {

/**
* Error message.
* @name util.ProtocolError#message
* @type {string}
* @readonly
*/
message: {
get: function() {
return this.error.message;
}
},

/**
* Stack trace.
* @name util.ProtocolError#stack
* @type {string}
* @readonly
*/
stack: {
get: function() {
return this.error.stack;
}
}
});

0 comments on commit 95cd64e

Please sign in to comment.