Skip to content

Commit 5dc851e

Browse files
committed
Versioning, actually had a couple of minor but breaking API changes [ci skip]
1 parent 014fb66 commit 5dc851e

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ var protobuf = require("protobufjs");
6969

7070
Development:
7171
```
72-
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.js"></script>
72+
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.js"></script>
7373
```
7474

7575
Production:
7676
```
77-
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.min.js"></script>
77+
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.min.js"></script>
7878
```
7979

8080
The `protobuf` namespace will be available globally.

cli/targets/json-module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
"use strict";
2-
module.exports = json_modulee;
2+
module.exports = json_module;
33

44
var path = require("path"),
55
fs = require("fs");
66

77
var protobuf = require("../..");
88

9-
json_modulee.description = "JSON representation as a module (AMD, CommonJS, global)"
9+
json_module.description = "JSON representation as a module (AMD, CommonJS, global)"
1010

11-
function json_modulee(root, options, callback) {
11+
function json_module(root, options, callback) {
1212
if (options.wrap)
1313
options.wrap = path.resolve(process.cwd(), options.wrap);
1414
else

cli/util.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,23 @@ var fs = require("fs"),
44

55
var protobuf = require("..");
66

7+
function basenameCompare(a, b) {
8+
var aa = String(a).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g),
9+
bb = String(b).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g);
10+
for (var i = 0, k = Math.min(aa.length, bb.length); i < k; i++) {
11+
var x = parseFloat(aa[i]) || aa[i].toLowerCase(),
12+
y = parseFloat(bb[i]) || bb[i].toLowerCase();
13+
if (x < y)
14+
return -1;
15+
if (x > y)
16+
return 1;
17+
}
18+
return a.length < b.length ? -1 : 0;
19+
};
20+
721
exports.requireAll = function requireAll(dirname) {
822
dirname = path.join(__dirname, dirname);
9-
var files = fs.readdirSync(dirname),
23+
var files = fs.readdirSync(dirname).sort(basenameCompare),
1024
all = {};
1125
files.forEach(function(file) {
1226
var basename = path.basename(file, ".js"),

dist/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ CDN usage
77

88
Development:
99
```
10-
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.js"></script>
10+
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.js"></script>
1111
```
1212

1313
Production:
1414
```
15-
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.min.js"></script>
15+
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.min.js"></script>
1616
```
1717

1818
**NOTE:** Remember to replace the version tag with the exact [release](https://github.com/dcodeIO/protobuf.js/releases) your project depends upon.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "protobufjs",
3-
"version": "6.0.2",
3+
"version": "6.1.0",
44
"description": "Protocol Buffers for JavaScript.",
55
"author": "Daniel Wirtz",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)