Skip to content

Commit

Permalink
Versioning, actually had a couple of minor but breaking API changes […
Browse files Browse the repository at this point in the history
…ci skip]
  • Loading branch information
dcodeIO committed Dec 7, 2016
1 parent 014fb66 commit 5dc851e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ var protobuf = require("protobufjs");

Development:
```
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.js"></script>
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.js"></script>
```

Production:
```
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.min.js"></script>
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.min.js"></script>
```

The `protobuf` namespace will be available globally.
Expand Down
6 changes: 3 additions & 3 deletions cli/targets/json-module.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use strict";
module.exports = json_modulee;
module.exports = json_module;

var path = require("path"),
fs = require("fs");

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

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

function json_modulee(root, options, callback) {
function json_module(root, options, callback) {
if (options.wrap)
options.wrap = path.resolve(process.cwd(), options.wrap);
else
Expand Down
16 changes: 15 additions & 1 deletion cli/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,23 @@ var fs = require("fs"),

var protobuf = require("..");

function basenameCompare(a, b) {
var aa = String(a).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g),
bb = String(b).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g);
for (var i = 0, k = Math.min(aa.length, bb.length); i < k; i++) {
var x = parseFloat(aa[i]) || aa[i].toLowerCase(),
y = parseFloat(bb[i]) || bb[i].toLowerCase();
if (x < y)
return -1;
if (x > y)
return 1;
}
return a.length < b.length ? -1 : 0;
};

exports.requireAll = function requireAll(dirname) {
dirname = path.join(__dirname, dirname);
var files = fs.readdirSync(dirname),
var files = fs.readdirSync(dirname).sort(basenameCompare),
all = {};
files.forEach(function(file) {
var basename = path.basename(file, ".js"),
Expand Down
4 changes: 2 additions & 2 deletions dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ CDN usage

Development:
```
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.js"></script>
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.js"></script>
```

Production:
```
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.0.1/dist/protobuf.min.js"></script>
<script src="//cdn.rawgit.com/dcodeIO/protobuf.js/6.1.0/dist/protobuf.min.js"></script>
```

**NOTE:** Remember to replace the version tag with the exact [release](https://github.com/dcodeIO/protobuf.js/releases) your project depends upon.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "protobufjs",
"version": "6.0.2",
"version": "6.1.0",
"description": "Protocol Buffers for JavaScript.",
"author": "Daniel Wirtz",
"license": "Apache-2.0",
Expand Down

0 comments on commit 5dc851e

Please sign in to comment.