Skip to content

Commit 6f9ffb6

Browse files
committed
Path micromodule, dependencies
1 parent 0b9b1d8 commit 6f9ffb6

17 files changed

+257
-235
lines changed

dist/protobuf.js

+209-202
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/protobuf.min.js.gz

29 Bytes
Binary file not shown.

dist/protobuf.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.js

+16-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/runtime/protobuf.min.js.gz

34 Bytes
Binary file not shown.

dist/runtime/protobuf.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "protobufjs",
3-
"version": "6.1.2",
3+
"version": "6.2.0",
44
"description": "Protocol Buffers for JavaScript (& TypeScript).",
55
"author": "Daniel Wirtz <[email protected]>",
66
"license": "Apache-2.0",
@@ -44,6 +44,7 @@
4444
"@protobufjs/eventemitter": "^1.0.2",
4545
"@protobufjs/fetch": "^1.0.1",
4646
"@protobufjs/fs": "^1.0.1",
47+
"@protobufjs/path": "^1.0.0",
4748
"@protobufjs/pool": "^1.0.1",
4849
"@protobufjs/utf8": "^1.0.3"
4950
},
@@ -52,7 +53,7 @@
5253
},
5354
"devDependencies": {
5455
"@types/long": "^3.0.31",
55-
"@types/node": "0.0.3",
56+
"@types/node": "6.0.52",
5657
"benchmark": "^2.1.2",
5758
"browserify": "^13.1.1",
5859
"bundle-collapser": "^1.2.1",
@@ -72,7 +73,7 @@
7273
"tap-spec": "^4.1.1",
7374
"tape": "^4.6.3",
7475
"tsd-jsdoc": "dcodeIO/tsd-jsdoc",
75-
"typescript": "^2.2.0-dev.20161212",
76+
"typescript": "^2.2.0-dev.20161214",
7677
"vinyl-buffer": "^1.0.0",
7778
"vinyl-fs": "^2.4.4",
7879
"vinyl-source-stream": "^1.1.0",

src/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ util.codegen = require("@protobufjs/codegen");
1111
util.EventEmitter = require("@protobufjs/eventemitter");
1212
util.fetch = require("@protobufjs/fetch");
1313
util.fs = require("@protobufjs/fs");
14-
util.path = require("./util/path");
14+
util.path = require("@protobufjs/path");
1515

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

src/util/path/README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
================
33
[![npm](https://img.shields.io/npm/v/@protobufjs/path.svg)](https://www.npmjs.com/package/@protobufjs/path)
44

5-
A minimal path module for Unix, Windows and URL paths.
5+
A minimal path module to resolve Unix, Windows and URL paths alike.
66

77
API
88
---
99

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

13+
* **path.normalize(path: `string`): `string`**<br />
14+
Normalizes the specified path.
15+
16+
* **path.resolve(originPath: `string`, includePath: `string`, [alreadyNormalized=false: `boolean`]): `string`**<br />
17+
Resolves the specified include path against the specified origin path.
1118

1219
**License:** [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)

src/util/path/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22

33
/**
4-
* A minimal path module for Unix, Windows and URL paths alike.
4+
* A minimal path module to resolve Unix, Windows and URL paths alike.
55
* @memberof util
66
* @namespace
77
*/
@@ -51,7 +51,7 @@ path.normalize = function normalize(path) {
5151
* Resolves the specified include path against the specified origin path.
5252
* @param {string} originPath Path to the origin file
5353
* @param {string} includePath Include path relative to origin path
54-
* @param {boolean} [alreadyNormalized] `true` if both paths are already known to be normalized
54+
* @param {boolean} [alreadyNormalized=false] `true` if both paths are already known to be normalized
5555
* @returns {string} Path to the include file
5656
*/
5757
path.resolve = function resolve(originPath, includePath, alreadyNormalized) {

src/util/path/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@protobufjs/path",
3-
"description": "A minimal path module for Unix, Windows and URL paths alike.",
3+
"description": "A minimal path module to resolve Unix, Windows and URL paths alike.",
44
"version": "1.0.0",
55
"author": "Daniel Wirtz <[email protected]>",
66
"repository": {

tests/tag.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ tape.test("long tags", function(test) {
2121
var message = { val: 1 };
2222
var buf = Message.encode(message).finish();
2323

24-
test.equal(buf[0], 0xF8, "should write F8 (78)");
24+
test.equal(buf[0], 0xf8, "should write F8 (78)");
2525
test.equal(buf[1], 0xff, "should write FF (7F)");
2626
test.equal(buf[2], 0xff, "should write FF (7F)");
2727
test.equal(buf[3], 0xff, "should write FF (7F)");
28-
test.equal(buf[4], 0b1111, "should write 1111b");
28+
test.equal(buf[4], 0x0f, "should write 1111b");
2929
test.equal(buf[5], 1, "should write value 1");
3030

3131
var comp = Message.decode(buf);

types/protobuf.js.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// $> pbts --name protobufjs --out types/protobuf.js.d.ts src
2-
// Generated Wed, 14 Dec 2016 12:24:00 UTC
2+
// Generated Wed, 14 Dec 2016 14:46:41 UTC
33

44
declare module "protobufjs" {
55

@@ -1910,7 +1910,7 @@ declare module "protobufjs" {
19101910
}
19111911

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

0 commit comments

Comments
 (0)