Skip to content

Latest commit

 

History

History
255 lines (215 loc) · 31.8 KB

CHANGELOG.md

File metadata and controls

255 lines (215 loc) · 31.8 KB

Breaking

#️⃣ Renamed asJSON option keys (enum to enums, long to longs) because enum is a reserved keyword
#️⃣ Moved JSON/Message conversion to its own source file and added Message/Type.from + test case, see #575
#️⃣ Relicensed the library and its components to BSD-3-Clause to match the official implementation (again)
#️⃣ Dropped support for browser buffer entirely (is an Uint8Array anyway), ensures performance and makes things simpler
#️⃣ Removed dead parts of the Reader API
#️⃣ Refactored BufferReader/Writer to their own files and removed unnecessary operations (node always has FloatXXArray and browser buffer uses ieee anyway)
#️⃣ Stripped out fallback encoder/decoder/verifier completely (even IE8 supports codegen), significantly reduces bundle size, can use static codegen elsewhere

Fixed

#️⃣ Properly set long defaults on prototypes
#️⃣ Fixed reference error in minimal runtime, see #580
#️⃣ Non-repeated empty messages are always present on the wire, see #581
#️⃣ Properly check Buffer.prototype.set with node v4
#️⃣ Prevent NRE and properly annotate verify signature in tsd-jsdoc, fixed #572
#️⃣ Fix directly using Buffer instead of util.Buffer
#️⃣ Added filter type to Namespace#lookup, fixes #569
#️⃣ Fixed parsing enum inner options, see #565
#️⃣ Fixed release links in README files

New

#️⃣ Now compresses .gz files using zopfli to make them useful beyond being just a reference
#️⃣ Updated non-bundled google types folder with missing descriptors and added wrappers to core
#️⃣ Replaced the ieee754 implementation for old browsers with a faster, use-case specific one + simple test case
#️⃣ Added .create to statically generated types and uppercase nested elements to reflection namespaces, see #576
#️⃣ Also added Namespace#getEnum for completeness, see #576
#️⃣ Added Namespace#getEnum and changed #lookupEnum to the same behavior, see #576
#️⃣ Added a heap of coverage comments for usually unused code paths to open things up
#️⃣ Added codegen test to determine if any ancient browsers don't actually support it
#️⃣ Added legacy groups support to pbjs, see #568
#️⃣ Initial support for legacy groups + test case, see #568
#️⃣ Added asJSON bytes as Buffer, see #566

CLI

#️⃣ Annotated callback types in pbjs-generated services, see #582
#️⃣ Removed type/ns alias comment in static target to not confuse jsdoc unnecessarily
#️⃣ Made pbjs use loadSync for deterministic outputs, see #573

Docs

#️⃣ Fixed an issue with the changelog generator skipping some commits
#️⃣ Added notes on how to use pbjs and pbts programmatically
#️⃣ Manually sorted old changelog entries
#️⃣ Initial changelog generator, see #574
#️⃣ Added static/JSON module interchangeability to README
#️⃣ Updated README and bundler according to dynamic require calls

Other

#️⃣ Updated test cases
#️⃣ Added assumptions to float test case
#️⃣ Updated travis config to use C++11
#️⃣ Updated / added additional LICENSE files where appropriate
#️⃣ Integrated changelog into build process, now also has 'npm run make' for everything, see #574
#️⃣ Minor optimizations through providing type-hints
#️⃣ Reverted shortened switch statements in verifier
#️⃣ Enums can't be map key types
#️⃣ Use custom require (now a micromodule) for all optional modules, see #571
#️⃣ Support usage when size = 0
#️⃣ Reverted aliases frequently used in codegen for better gzip ratio
#️⃣ Shrinked bundle size - a bit
#️⃣ Can finally run with --trace-deopt again without crashes
#️⃣ Other minor optimizations

New

#️⃣ Added ParseOptions to protobuf.parse and --keep-case for .proto sources to pbjs, see #564

Other

#️⃣ Better TypeScript definition support for @property-annotated objects
#️⃣ Can't just inline longNeq but can be simplified
#️⃣ Array abuse and varint optimization
#️⃣ Updated dependencies
#️⃣ Other minor improvements to short ifs
#️⃣ Reader/Writer example

Fixed

#️⃣ Fixed reserved names re, also ensure valid service method names, see #559
#️⃣ Fix d.ts whitespace on empty lines, added tsd-jsdoc LICENSE
#️⃣ Fix asJSON defaults option, make it work for repeated fields.
#️⃣ Inlined any Reader/Writer#tag calls, also fixes #556
#️⃣ Fix building default dist files with explicit runtime=false
#️⃣ Apply asJSON recursively
#️⃣ Ensure working reflection class names with minified builds
#️⃣ Lazily resolve (some) cyclic dependencies, see #560

New

#️⃣ Added protobuf.roots to minimal runtime, see #554
#️⃣ Repo now includes a restructured version of tsd-jsdoc with our changes incorporated for issues/prs, see #550

CLI

#️⃣ Updated pbjs arguments
#️⃣ Pipe tsd-jsdoc output (requires dcodeIO/tsd-jsdoc/master) and respect cwd, see #550
#️⃣ tsd-jsdoc progress

Docs

#️⃣ README

Other

#️⃣ Added GH issue template
#️⃣ Path micromodule, dependencies
#️⃣ Test case for #556
#️⃣ Raw alloc benchmark
#️⃣ Other minor optimizations

Fixed

#️⃣ Properly encode/decode map kv pairs as repeated messages (codegen and fallback), see #547
#️⃣ Make genVerifyKey actually generate conditions for 32bit values and bool, fixes #546
#️⃣ Fix to generation of verify methods for bytes
#️⃣ Take special care of oneofs when encoding (i.e. when explicitly set to defaults), see #542

New

#️⃣ Added Message#asJSON option for bytes conversion
#️⃣ Added Namespace#lookupType and Namespace#lookupService (throw instead of returning null), see #544
#️⃣ Provide prebuilt browser versions of the static runtime

CLI

#️⃣ Initial pbts CLI for generating TypeScript definitions, see #550
#️⃣ Refactored json/static-module targets to use common wrappers
#️⃣ Refactor cli to support multiple built-in wrappers, added named roots instead of always using global.root and added additionally necessary eslint comments, see #540
#️⃣ Annotate namespaces generated by static target, see #550
#️⃣ static target: Basic support for oneof fields, see #542

Docs

#️⃣ Fix to reflection documentation
#️⃣ README on minimal runtime / available downloads
#️⃣ Notes on descriptors vs static modules

Other

#️⃣ A lot of minor optimizations to performance and gzip ratio
#️⃣ Minimized base64 tables

Breaking

#️⃣ Removed as-function overload for Reader/Writer, profiler stub, optimized version of Reader#int32
#️⃣ Refactored Prototype and inherits away, is now Class and Message for more intuitive documentation and type refs

Fixed

#️⃣ Fixed failing test case on node < 6
#️⃣ Fixed serialization order of sfixed64, fixes #536
#️⃣ Fixed serialization order of fixed64, fallback to parseInt with no long lib, see #534
#️⃣ Actually allow undefined as service method type, fixes #528
#️⃣ Do not skip optional delimiter after aggregate options, fixes #520
#️⃣ Verify empty base64 encoded strings for bytes fields, see #535
#️⃣ wrong spell role should be rule
#️⃣ decodeDelimited always forks if writer is specified, see #531
#️⃣ Mimic spec-compliant behaviour in oneof getVirtual, see #523

New

#️⃣ Initial base64 string support for bytes fields, see #535
#️⃣ Initial type-checking verifier, see #526, added to bench out of competition
#️⃣ Initial loadSync (node only), see #529
#️⃣ Initial RPC service implementaion, see #529
#️⃣ added 'defaults' option to Prototype#asJSON, see #521
#️⃣ Use Uint8Array pool in browsers, just like node does with buffers
#️⃣ Also validate map fields, see #526 (this really needs some tests)

CLI

#️⃣ Added json-module target to pbjs, renamed static to static-module, see #522
#️⃣ updated internals and static target to use immutable objects on prototypes

Docs

#️⃣ Added a couple of alternative signatures, protobuf.load returns promise or undefined, aliased Reader/Writer-as-function signature with Reader/Writer.create for typed dialects, see #518
#️⃣ Added variations for Root#load, see #527
#️⃣ Added benchmark and profile related information to README
#️⃣ Added service example to README, see #529
#️⃣ README on tests
#️⃣ Update README/dist to reflect recent changes
#️⃣ Minimal documentation for micromodules
#️⃣ Document all the callbacks, see #527
#️⃣ Documented streaming-rpc example a bit

Other

#️⃣ Removed the need for triple-slash references in .d.ts by providing a minimal Long interface, see #527, see #530
#️⃣ Transition to micromodules
#️⃣ Refactored argument order of utf8 for plausibility
#️⃣ Restructured reusable micromodules
#️⃣ Can't use Uint8Array#set on node < 6 buffers
#️⃣ Test case for #531
#️⃣ Safer signaling for synchronous load, see #529
#️⃣ Proper end of stream signaling to rpcImpl, see #529
#️⃣ Moved event emitter to util, also accepts listener context, see #529
#️⃣ Probably the worst form of hiding require programmatically, see #527
#️⃣ Attempt to hide require('fs') from webpack, see #527
#️⃣ Trying out jsdoc variations, see #527
#️⃣ by the way, why not include the json->proto functionality into "util"?
#️⃣ Update proto.js
#️⃣ Automatic profile generation and processing
#️⃣ Generalized buffer pool and moved it to util
#️⃣ Make shields visible on npm, yey
#️⃣ More shields, I love shields, and maybe a workaround for travis timing out when sauce takes forever
#️⃣ Trying SauceLabs with higher concurrency

Fixed

#️⃣ Fix packable float/double see #513

New

#️⃣ Handle oneofs in prototype ctor, add non-ES5 fallbacks, test case
#️⃣ Be nice to AMD, allow reconfiguration of Reader/Writer interface

CLI

#️⃣ Initial static codegen target for reference
#️⃣ pbjs static target services support
#️⃣ pbjs static target progress, uses customizable wrapper template
#️⃣ Static pbjs target progress, now generates usable CommonJS code, see #512

Docs

#️⃣ TypeScript example
#️⃣ Adjectives, notes on browserify

Other

#️⃣ Refactor runtime util into separate file, reader/writer uses runtime util
#️⃣ Also optimize reader with what we have learned
#️⃣ More (shameless) writer over-optimization
#️⃣ Trading package size for float speed
#️⃣ Skip defining getters and setters on IE8 entirely, automate defining fallbacks
#️⃣ Unified proto/reflection/classes/static encoding API to always return a writer
#️⃣ plain js utf8 is faster for short strings
#️⃣ improve TypeScript support. add simple test script.
#️⃣ Use long.js dependency in tests, reference types instead of paths in .d.ts see #503
#️⃣ Restructured encoder / decoder to better support static code gen

Fixed

#️⃣ Add support for long strings, fixes #509
#️⃣ expose zero on LongBits, fixes #508
#️⃣ Fixed issues with Root.fromJSON/#addJSON, search global for Long
#️⃣ Properly exclude browserify's annoying _process, again, fixes #502
#️⃣ Remember loaded files earlier to prevent race conditions, fixes #501
#️⃣ Allow negative enum ids even if super inefficient (encodes as 10 bytes), fixes #499, fixes #500
#️⃣ set resolvedResponseType on resolve(), fixes #497

New

#️⃣ Initial take on runtime services, see #507
#️⃣ Include dist/ in npm package for frontend use

CLI

#️⃣ pbjs proto target field options, language-level compliance with jspb test.proto

Docs

#️⃣ always use Uint8Array in docs for tsd, see #503
#️⃣ Notes on dist files

Other

#️⃣ Update eslint env
#️⃣ Browser field in package.json isn't required