diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..eb712c80b --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ +# [6.3.0](https://github.com/dcodeIO/protobuf.js/releases/tag/6.3.0) + +## Breaking +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/22a64c641d4897965035cc80e92667bd243f182f) Removed dead parts of the Reader API
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/964f65a9dd94ae0a18b8be3d9a9c1b0b1fdf6424) Refactored BufferReader/Writer to their own files and removed unnecessary operations (node always has FloatXXArray and browser buffer uses ieee anyway)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/bfac0ea9afa3dbaf5caf79ddf0600c3c7772a538) Stripped out fallback encoder/decoder/verifier completely (even IE8 supports codegen), significantly reduces bundle size, can use static codegen elsewhere
+ +## Fixed +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7fac9d6a39bf42d316c1676082a2d0804bc55934) Properly check Buffer.prototype.set with node v4
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3ad8108eab57e2b061ee6f1fddf964abe3f4cbc7) Prevent NRE and properly annotate verify signature in tsd-jsdoc, fixed [#572](https://github.com/dcodeIO/protobuf.js/issues/572)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/6c2415d599847cbdadc17dee3cdf369fc9facade) Fix directly using Buffer instead of util.Buffer
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ea7ba8b83890084d61012cb5386dc11dadfb3908) Fixed release links in README files [ci skip]
+ +## New +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ef43acff547c0cd84cfb7a892fe94504a586e491) Added Namespace#getEnum and changed #lookupEnum to the same behavior, see [#576](https://github.com/dcodeIO/protobuf.js/issues/576)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/1fcfdfe21c1b321d975a8a96d133a452c9a9c0d8) Added a heap of coverage comments for usually unused code paths to open things up
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/c234de7f0573ee30ed1ecb15aa82b74c0f994876) Added codegen test to determine if any ancient browsers don't actually support it
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/fed2000e7e461efdb1c3a1a1aeefa8b255a7c20b) Added legacy groups support to pbjs, see [#568](https://github.com/dcodeIO/protobuf.js/issues/568)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/974a1321da3614832aa0a5b2e7c923f66e4ba8ae) Initial support for legacy groups + test case, see [#568](https://github.com/dcodeIO/protobuf.js/issues/568)
+ +## CLI +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/3e7e4fc59e6d2d6c862410b4b427fbedccdb237b) Removed type/ns alias comment in static target to not confuse jsdoc unnecessarily
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/99ad9cc08721b834a197d4bbb67fa152d7ad79aa) Made pbjs use loadSync for deterministic outputs, see [#573](https://github.com/dcodeIO/protobuf.js/issues/573)
+ +## Docs +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/7939a4bd8baca5f7e07530fc93f27911a6d91c6f) Updated README and bundler according to dynamic require calls
+ +## Other +[:hash:](https://github.com/dcodeIO/protobuf.js/commit/ab3e236a967a032a98267a648f84d129fdb4d4a6) Enums can't be map key types
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/8ef6975b0bd372b79e9b638f43940424824e7176) Use custom require (now a micromodule) for all optional modules, see [#571](https://github.com/dcodeIO/protobuf.js/issues/571)
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/19e906c2a15acc6178b3bba6b19c2f021e681176) Reverted aliases frequently used in codegen for better gzip ratio
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/47b51ec95a540681cbed0bac1b2f02fc4cf0b73d) Shrinked bundle size - a bit
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/f8451f0058fdf7a1fac15ffc529e4e899c6b343c) Can finally run with --trace-deopt again without crashes
+[:hash:](https://github.com/dcodeIO/protobuf.js/commit/9c9a66bf393d9d6927f35a9c18abf5d1c31db912) Other minor optimizations
diff --git a/scripts/changelog.js b/scripts/changelog.js new file mode 100644 index 000000000..5d6a8d492 --- /dev/null +++ b/scripts/changelog.js @@ -0,0 +1,97 @@ +var gitSemverTags = require("git-semver-tags"), + gitRawCommits = require("git-raw-commits"); + +var pkg = require("../package.json"); + +var breakingFallback = /removed|stripped|dropped/i; + +// categories to be used in the future and regexes for lazy / older subjects +var validCategories = { + "Breaking": null, + "Fixed": /fix|properly|prevent/i, + "New": /added|initial/i, + "CLI": /pbjs|pbts/, + "Docs": /README/i, + "Other": null +}; + +var repo = "https://github.com/dcodeIO/protobuf.js"; + +gitSemverTags(function(err, tags) { + if (err) + throw err; + + var categories = {}; + Object.keys(validCategories).forEach(function(category) { + categories[category] = []; + }); + + var commits = gitRawCommits({ + from: tags[0], + to: 'HEAD', + merges: false, + format: "%B%n#%H" + }); + + commits.on("error", function(err) { + throw err; + }); + + commits.on("data", function(chunk) { + chunk.toString("utf8").trim().split(";").forEach(function(message) { + if (/^(Merge pull request |Post\-merge)/.test(message)) + return; + var match = /#([0-9a-f]{40})$/.exec(message); + var hash; + if (match) { + message = message.substring(0, message.length - match[1].length).trim(); + hash = match[1]; + } + match = /^(\w+):/i.exec(message = message.trim()); + var category; + if (match && match[1] in validCategories) { + category = match[1]; + message = message.substring(match[1].length + 1).trim(); + } else { + var keys = Object.keys(validCategories); + for (var i = 0; i < keys.length; ++i) { + var re = validCategories[keys[i]]; + if (re && re.test(message)) { + category = keys[i]; + break; + } + } + message = message.replace(/^(\w+):/i, "").trim(); + } + if (!category) { + if (breakingFallback.test(message)) + category = "Breaking"; + else + category = "Other"; + } + var nl = message.indexOf("\n"); + if (nl > -1) + message = message.substring(0, nl).trim(); + if (!hash || message.length < 12) + return; + categories[category].push({ + text: message, + hash: hash + }); + }); + }); + + commits.on("end", function() { + console.log("# [" + pkg.version + "](" + repo + "/releases/tag/" + pkg.version + ")"); + Object.keys(categories).forEach(function(category) { + var messages = categories[category]; + if (!messages.length) + return; + console.log("\n## " + category); + messages.forEach(function(message) { + var text = message.text.replace(/#(\d+)/g, "[#$1](" + repo + "/issues/$1)"); + console.log("[:hash:](" + repo + "/commit/" + message.hash + ") " + text + "
"); + }); + }); + }); +}); diff --git a/scripts/release.js b/scripts/release.js deleted file mode 100644 index 9a9dce61d..000000000 --- a/scripts/release.js +++ /dev/null @@ -1,39 +0,0 @@ -var child_process = require("child_process"), - gitSemverTags = require("git-semver-tags"), - gitRawCommits = require("git-raw-commits"); -var pkg = require("../package.json"); - -var categories = {}; -var validCategories = [ - "Breaking", - "Added", - "Fixed", - "Docs" -]; - -gitSemverTags(function(err, tags) { - if (err) - throw err; - var commits = gitRawCommits({ from: tags[0], to: 'HEAD' }); - commits.on("error", function(err) { - throw err; - }); - commits.on("data", function(chunk) { - chunk.toString("utf8").trim().split(";").forEach(function(message) { - var match = /(\w+): (.*)/.exec(message = message.trim()); - var category; - if (match && validCategories.indexOf(match[1]) > -1) { - category = match[1]; - message = match[2].trim(); - } else - category = "Other"; - (categories[category] || (categories[category] = [])).push(message); - }); - }); - commits.on("end", function() { - console.log(categories); - }); -}); - -// child_process.execSync("git tag " + pkg.version); -// child_process.execSync("git push -u origin master --tags");