Skip to content

Commit

Permalink
Path micromodule, dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Dec 14, 2016
1 parent 0b9b1d8 commit 6f9ffb6
Show file tree
Hide file tree
Showing 17 changed files with 257 additions and 235 deletions.
411 changes: 209 additions & 202 deletions dist/protobuf.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

8 changes: 4 additions & 4 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.

25 changes: 16 additions & 9 deletions dist/runtime/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/runtime/protobuf.js.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protobufjs",
"version": "6.1.2",
"version": "6.2.0",
"description": "Protocol Buffers for JavaScript (& TypeScript).",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"license": "Apache-2.0",
Expand Down Expand Up @@ -44,6 +44,7 @@
"@protobufjs/eventemitter": "^1.0.2",
"@protobufjs/fetch": "^1.0.1",
"@protobufjs/fs": "^1.0.1",
"@protobufjs/path": "^1.0.0",
"@protobufjs/pool": "^1.0.1",
"@protobufjs/utf8": "^1.0.3"
},
Expand All @@ -52,7 +53,7 @@
},
"devDependencies": {
"@types/long": "^3.0.31",
"@types/node": "0.0.3",
"@types/node": "6.0.52",
"benchmark": "^2.1.2",
"browserify": "^13.1.1",
"bundle-collapser": "^1.2.1",
Expand All @@ -72,7 +73,7 @@
"tap-spec": "^4.1.1",
"tape": "^4.6.3",
"tsd-jsdoc": "dcodeIO/tsd-jsdoc",
"typescript": "^2.2.0-dev.20161212",
"typescript": "^2.2.0-dev.20161214",
"vinyl-buffer": "^1.0.0",
"vinyl-fs": "^2.4.4",
"vinyl-source-stream": "^1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ util.codegen = require("@protobufjs/codegen");
util.EventEmitter = require("@protobufjs/eventemitter");
util.fetch = require("@protobufjs/fetch");
util.fs = require("@protobufjs/fs");
util.path = require("./util/path");
util.path = require("@protobufjs/path");

var runtime = require("./util/runtime");

Expand Down
9 changes: 8 additions & 1 deletion src/util/path/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@
================
[![npm](https://img.shields.io/npm/v/@protobufjs/path.svg)](https://www.npmjs.com/package/@protobufjs/path)

A minimal path module for Unix, Windows and URL paths.
A minimal path module to resolve Unix, Windows and URL paths alike.

API
---

* **path.isAbsolute(path: `string`): `boolean`**<br />
Tests if the specified path is absolute.

* **path.normalize(path: `string`): `string`**<br />
Normalizes the specified path.

* **path.resolve(originPath: `string`, includePath: `string`, [alreadyNormalized=false: `boolean`]): `string`**<br />
Resolves the specified include path against the specified origin path.

**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
4 changes: 2 additions & 2 deletions src/util/path/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

/**
* A minimal path module for Unix, Windows and URL paths alike.
* A minimal path module to resolve Unix, Windows and URL paths alike.
* @memberof util
* @namespace
*/
Expand Down Expand Up @@ -51,7 +51,7 @@ path.normalize = function normalize(path) {
* Resolves the specified include path against the specified origin path.
* @param {string} originPath Path to the origin file
* @param {string} includePath Include path relative to origin path
* @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized
* @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
* @returns {string} Path to the include file
*/
path.resolve = function resolve(originPath, includePath, alreadyNormalized) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/path/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@protobufjs/path",
"description": "A minimal path module for Unix, Windows and URL paths alike.",
"description": "A minimal path module to resolve Unix, Windows and URL paths alike.",
"version": "1.0.0",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions tests/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ tape.test("long tags", function(test) {
var message = { val: 1 };
var buf = Message.encode(message).finish();

test.equal(buf[0], 0xF8, "should write F8 (78)");
test.equal(buf[0], 0xf8, "should write F8 (78)");
test.equal(buf[1], 0xff, "should write FF (7F)");
test.equal(buf[2], 0xff, "should write FF (7F)");
test.equal(buf[3], 0xff, "should write FF (7F)");
test.equal(buf[4], 0b1111, "should write 1111b");
test.equal(buf[4], 0x0f, "should write 1111b");
test.equal(buf[5], 1, "should write value 1");

var comp = Message.decode(buf);
Expand Down
6 changes: 3 additions & 3 deletions types/protobuf.js.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// $> pbts --name protobufjs --out types/protobuf.js.d.ts src
// Generated Wed, 14 Dec 2016 12:24:00 UTC
// Generated Wed, 14 Dec 2016 14:46:41 UTC

declare module "protobufjs" {

Expand Down Expand Up @@ -1910,7 +1910,7 @@ declare module "protobufjs" {
}

/**
* A minimal path module for Unix, Windows and URL paths alike.
* A minimal path module to resolve Unix, Windows and URL paths alike.
* @memberof util
* @namespace
*/
Expand All @@ -1933,7 +1933,7 @@ declare module "protobufjs" {
* Resolves the specified include path against the specified origin path.
* @param {string} originPath Path to the origin file
* @param {string} includePath Include path relative to origin path
* @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized
* @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
* @returns {string} Path to the include file
*/
function resolve(originPath: string, includePath: string, alreadyNormalized?: boolean): string;
Expand Down

0 comments on commit 6f9ffb6

Please sign in to comment.