CHANGELOG

Fixed

Drop TS Long import better

Fixed

remove long import (#7arrow-up-right)

Other

Revert "Map field TypeScript types shouldn't imply all keys exist"

Other

Allow turning off generation of fromObject Allow pre-encoded messages in repeated fields

Map field TypeScript types shouldn't imply all keys exist

New

Allow plain JS object repeated fields to use toArray() method (see https://github.com/protobufjs/protobuf.js/pull/1302)

Other

Remove duplicated Long types in index.d.ts

Other

update version to 1.0.2 and npm install commit changes after running npm install update peerDependencies in pacakge.standalone.json @apollo/protobufjs version to be the correct 1.0.1

Fixed

Rename pbjs and pbts to include apollo- prefix and update version.

Fixed

Fix minify build error in root.js fix typo (#1241arrow-up-right) fix stale links to API documentation (#1235arrow-up-right) Fix spacing in root.js again Fix spacing of root.js Properly iterate and return method descriptors run npm audit fix (#1208arrow-up-right) Fix indentation to match existing styles. Fixed descriptor README code problem npm audit fixes Import Long types Bundled definitions were loaded correctly Second part of a reserved range is exclusive (#1122arrow-up-right)

CLI

Add missing 'force-number' pbjs option

Docs

Remove non-existent method from README (#1119arrow-up-right)

Other

package-lock changes after running npm install Change all appropriate references from protobufjs to @apollo/protobufjs Update build artifacts after running npm run make Update jsdoc version to 3.6.3 to make the project build with Node 12 Use Object.hasOwnProperty instead of prototype (#1233arrow-up-right) Revert generated files, since other pull requests do not appear to be more explicit about tested versions of nodejs (#1213arrow-up-right) //github.com/protobufjs/protobuf.js/issues/1200 Remove useless config import Add working rpcImpl with grpc node package allow file-level options everywhere in the file

Fixed

Persist recent index.d.ts changes in JSDoc

Fixed

Fix package browser field descriptor (#1046arrow-up-right) Fix static codegen issues with uglifyjs3 Fix lint issues / pbts on windows Fix empty 'bytes' field decoding, now using Buffer where applicable (#1020arrow-up-right) Fix circular dependency of Namespace and Enum (#994arrow-up-right) Ignore optional commas in aggregate options (#999arrow-up-right)

New

Make Message have a default type param (#1086arrow-up-right) Explicitly define service method names when generating static code, see #857arrow-up-right Also handle services in ext/descriptor (#1001arrow-up-right)

CLI

Extend list of ignored ESLint rules for pbjs, fixes #1085arrow-up-right Fix declared return type of pbjs/pbts callback (#1025arrow-up-right) Added an option to pbts to allow custom imports (#1038arrow-up-right) Get node executable path from process.execPath (#1018arrow-up-right)

Other

Slim down CI testing and remove some not ultimately necesssary dependencies with audit issues Move global handling to util, see #995arrow-up-right

Fixed

Fix typeRefRe being vulnerable to ReDoS

New

Preserve comments when serializing/deserializing with toJSON and fromJSON. (#983arrow-up-right) Add more details to some frequent error messages (#962arrow-up-right) Add IParseOptions#alternateCommentMode (#968arrow-up-right) Added field_mask to built-in common wrappers (#982arrow-up-right)

Other

Remove code climate config in order to use 'in-app' config instead

Other

Update jsdoc dependency (pinned vulnerable marked)

CLI

Use correct safeProp in json-module target, see #956arrow-up-right

Other

Include dist files in npm package, see #955arrow-up-right

Fixed

Prevent invalid JSDoc names when generating service methods, see #870arrow-up-right Prevent parse errors when generating service method names, see #870arrow-up-right Support parsing nested option-values with or without ':' (#951arrow-up-right, fixes #946arrow-up-right) Add support for reserved keyword in enums (#950arrow-up-right, fixes #949arrow-up-right) Unified safe property escapes and added a test for #834arrow-up-right Fix codegen if type name starts with "Object" Fixed dependency for json-module to use "light". Basic support for URL prefixes in google.protobuf.Any types. fixed 'error is not defined linter warning when using static/static-module and es6 Fixed wrong type_url for any type (no leading '.' allowed). Fixed fromObject() for google.protobuf.Any types. Handle case where 'extendee' is undefined in ext/descriptor

CLI

Sanitize CR-only line endings (coming from jsdoc?) Make sure enum typings become generated (#884arrow-up-right didn't solve this) Remove exclude and include patterns from jsdoc config Skip defaults when generating proto3 Wait for both the 'end' and 'close' event to happen before finishing in pbts, see #863arrow-up-right Accept null for optional fields in generated static code Annotate TS classes with @implements Annotate virtual oneofs as string literal unions

New

Also check for reserved ids and names in enums Also support 'reserved' in enum descriptors

Other

Include just relevant files in npm package, fixes #781arrow-up-right Fix travis build

Breaking

Replaced Buffer and Long types with interfaces and removed stubs Removed Message#toObject in favor of having just the static version (unnecessary static code otherwise) Everything uses interfaces now instead of typedefs (SomethingProperties is now ISomething) ReflectionObject#toJSON properly omits explicit undefined values Initial implementation of TypeScript decorators Refactored protobuf.Class away TypeScript definitions now have (a lot of) generics Removed deprecated features

Fixed

Added 'undefined' besides 'null' as a valid value of an optional field, fixes #826arrow-up-right Fixed an issue with codegen typings, see #819arrow-up-right Ported utf8 chunking mechanism to base64 as well, fixes #800arrow-up-right Also be more verbose when defining properties for ES6, fixes #820arrow-up-right Generate more verbose JSDoc comments for ES6 support, fixes #820arrow-up-right Emit a maximum of one error var when generating verifiers, fixes #786arrow-up-right Fixed missing semicolon after 'extensions' and 'reserved' when generating proto files, fixes #810arrow-up-right Call npm with '--no-bin-links' when installing CLI deps, fixes #823arrow-up-right Fix Reader argument conversion in static module Use JSDoc, they said, it documents code, they said. Fixes #770arrow-up-right parser should not confuse previous trailing line comments with comments for the next declaration, see #762arrow-up-right Types should not clear constructor with cache (fixes decorators) Namespace#lookup should also check in nested namespaces (wtf) Reader#bytes should also support plain arrays Fix markdown for pipe in code in table

New

Upgrade to codegen 2 ext/descriptor enables interoperability between reflection and descriptor.proto (experimental), see #757arrow-up-right Added 'json' conversion option for proto3 JSON mapping compatibility of NaN and Infinity + additional documentation of util.toJSONOptions, see #351arrow-up-right

CLI

Use protobuf/minimal when pbjs target is static-module Added closure wrapper Various improvements to statically generated JSDoc, also fixes #772arrow-up-right Check incompatible properties for namespaces only in tsd-jsdoc Additional tsd-jsdoc handling of properties inside of namespaces and TS specific API exposure Several improvements to tsd-jsdoc emitted comments Further TypeScript definition improvements Relieved tsd files from unnecessary comments Generate TS namespaces for vars and functions with properties Prefer @tstype over @type when generating typedefs (tsd-jsdoc)

Docs

Replaced nullable types with explicit type|null for better tooling compatibility, also fixes #766arrow-up-right and fixes 767 Added more info to ext/descriptor README, see #757arrow-up-right Additional notes on ext/descriptor Updated CHANGELOG so everyone knows what's going on (and soon, breaking) Additional docs on TS/decorators usage

Other

Updated dist files Added package-lock.json Minor formatting Generate files Remove the no-constructor arg Remove the ctor option. Add support to generate types for JSON object. aspromise performance pass codegen 2 performance pass, #653arrow-up-right might benefit Fixed minimal library including reflection functionality Minor compression ratio tuning Fixed failing test case + coverage Improved fromObject wrapper for google.protobuf.Any. Fixed failing tokenize test case Removed debug build, made it an extension Regenerated dist files Even more documentation and typings for ext/descriptor ext/descriptor docs Decorators coverage ext/descriptor support for various standard options, see #757arrow-up-right ext/descriptor passes descriptor.proto test with no differences, see #757arrow-up-right Properly remove unnecessary (packed) options from JSON descriptors Use typedefs in ext/descriptor (like everywhere else), see #757arrow-up-right Fixed obvious issues with ext/descriptor, does not throw anymore when throwing descriptor.proto itself at it, see #757arrow-up-right Added still missing root traversal to ext/descriptor, see #757arrow-up-right Initial map fields support for ext/descriptor, see #757arrow-up-right Added infrastructure for TypeScript support of extensions TypeScript generics improvements More ext/descriptor progress, see #757arrow-up-right Just export the relevant namespace in ext/descriptor Initial descriptor.proto extension for reflection interoperability, see #757arrow-up-right Moved custom wrappers to its own module instead, also makes the API easier to use manually, see #677arrow-up-right Added infrastructure for custom wrapping/unwrapping of special types, see #677arrow-up-right More decorator progress (MapField.d, optional Type.d) tsd-jsdoc now has limited generics support

Other

long, @types/long and @types/node are just dependencies, see #753arrow-up-right

New

Split up NamespaceDescriptor to make nested plain namespaces a thing, see #749arrow-up-right

Docs

More README Replaced 'runtime message' with 'message instance' for clarity Rephrased the Usage section around the concept of valid messages Added toolset diagram to README

Other

Touched benchmark output metrics once more Fixed failing browser test Output more human friendly metrics from benchmark Stripped down static bench code to what's necessary Revamped benchmark, now also covers Google's JS implementation Updated dependencies and dist files

New

Made .verify behave more like .encode, see #710arrow-up-right

CLI

With null/undefined eliminated by constructors and .create, document message fields as non-optional where applicable (ideally used with TS & strictNullChecks), see #743arrow-up-right Renamed --strict-long/message to --force-long/message with backward compatible aliases, see #741arrow-up-right Keep $Properties with --strict-message but require actual instances within, see #741arrow-up-right Added --strict-message option to pbjs to strictly reference message instances instead of $Properties, see #741arrow-up-right

Docs

Restructured README Added more information on typings usage, see #744arrow-up-right Clarified typescript example in README, see #744arrow-up-right Clarified that the service API targets clients consuming a service, see #742arrow-up-right

Other

Omit copying of undefined or null in constructors and .create, see #743arrow-up-right

Breaking

Namespace#lookupEnum should actually look up the reflected enum and not just its values Decoder now throws if required fields are missing, see #695arrow-up-right / #696arrow-up-right

Fixed

Added functionality to filter for multiple types at once in lookup(), used by lookupTypeOrEnum(), fixes #740arrow-up-right Ensure that fields have been resolved when looking up js types in static target, see #731arrow-up-right Properly copy fields array before sorting in toObject, fixes #729arrow-up-right Actually emit TS compatible enums in static target if not aliases, see #720arrow-up-right Hardened tokenize/parse, esp. comment parsing, see #713arrow-up-right Exclude any fields part of some oneof when populating defaults in toObject, see #710arrow-up-right Most of the parser is not case insensitive, see #705arrow-up-right Retain options argument in Root#load when used with promises, see #684arrow-up-right

New

Created a micromodule from (currently still bundled) float support util.isset(obj, prop) can be used to test if a message property is considered to be set, see #728arrow-up-right Implemented stubs for long.js / node buffers to be used where either one isn't wanted, see #718arrow-up-right Simplified reusing / replacing internal constructors Constructors/.create always initialize proper mutable objects/arrays, see #700arrow-up-right Verifiers return an error if multiple fields part of the same oneof are set, see #710arrow-up-right Added oneofs: true to ConversionOptions, see #710arrow-up-right Optional fields handle null just like undefined regardless of type see #709arrow-up-right Encoders no longer examine virtual oneof properties but encode whatever is present, see #710arrow-up-right pbjs now generates multiple exports when using ES6 syntax, see #686arrow-up-right Sequentially serialize fields ordered by id, as of the spec. decode throws specific ProtocolError with a reference to the so far decoded message if required fields are missing + example Reader.create asserts that buffer is a valid buffer, see #695arrow-up-right

CLI

Exclude JSDoc on typedefs from generated d.ts files because typescript@next, see #737arrow-up-right Prepare static code with estraverse instead of regular expressions, see #732arrow-up-right Moved tsd-jsdoc to future cli package, see #716arrow-up-right $Properties are just a type that's satisfied, not implemented, by classes, see #723arrow-up-right More progress on decoupling the CLI Fixed computed array indexes not being renamed in static code, see #726arrow-up-right Check upfront if key-var is required in static decoders with maps, see #726arrow-up-right Fixed handling of stdout if callback is specified, see #724arrow-up-right Preparations for moving the CLI to its own package, see #716arrow-up-right Properly implement $Properties interface in JSDoc, see #723arrow-up-right Recursively use $Properties inside of $Properties in static code, see #717arrow-up-right Added --strict-long option to pbjs to always emit 'Long' instead of 'number|Long' (only relevant with long.js), see #718arrow-up-right Statically emitted long type is 'Long' now instead of '$protobuf.Long', see #718arrow-up-right Decoupled message properties as an interface in static code for TS intellisense support, see #717arrow-up-right Static code statically resolves types[..], see #715arrow-up-right

Docs

Added type definitions for all possible JSON descriptors Explained the JSON structure in README and moved CLI specific information to the CLI package Added information on how to use the stubs to README, see #718arrow-up-right Added 'What is a valid message' section to README Added a hint on using .create to initial example Even more usage for README Additional information on general usage (README) Restructured README to Installation, Usage and Examples sections Added a longish section on the correct use of the toolset to README Added a few additional notes on core methods to README, see #710arrow-up-right Extended traverse-types example, see #693arrow-up-right Better explain how .verify, .encode and .decode are connected Documented that Type#encode respectively Message.encode do not implicitly .verify, see #696arrow-up-right [ci-skip] Documented throwing behavior of Reader.create and Message.decode Added error handling notes to README, see #696arrow-up-right

Other

Use @protobufjs/float Rebuilt dist files for 6.7.0 Updated deps, ts fixes and regenerated dist files Manually merged gentests improvements, fixes #733arrow-up-right Make sure that util.Long is overridden by AMD loaders only if present, see #730arrow-up-right Coverage for util.isset and service as a namespace Shortened !== undefined && !== null to equivalent != null in static code With stubs in place, 'number|Long' return values can be just 'Long' instead, see #718arrow-up-right Just alias as the actual ideal type when using stubs, see #718arrow-up-right General cleanup + regenerated dist/test files Simplified camel case regex, see #714arrow-up-right Regenerated dist files and changelog for 6.7.0 Retain alias order in static code for what it's worth, see #712arrow-up-right Everything can be block- or line-style when parsing, see #713arrow-up-right Determine necessary aliases depending on config, see #712arrow-up-right Use more precise types for message-like plain objects Regenerated dist files Regenerated relevant files Moved field comparer to util Updated tests to use new simplified encoder logic Updated path to tsd-jsdoc template used by pbts, see #707arrow-up-right Additional restructuring for moving configuration files out of the root folder Added codegen support for constructor functions, see #700arrow-up-right Attempted to fix broken custom error test Trying out a more aggressive aproach for custom error subclasses Moved a few things out of the root folder Coverage for encoder compat. / protocolerror Updated dist and generated test files Added tslint Exclude dist/ from codeclimate checks Also lint cli utilities Cache any regexp instance (perf) Use code climate badges Updated travis to pipe to codeclimate, coverage More precise linter configuration Added codeclimate Moved cli deps placeholder creation to post install script

Fixed

sfixed64 is not zig-zag encoded, see #692arrow-up-right

CLI

Added a placeholder to cli deps node_modules folder to make sure node can load from it

Other

Restructured a few failing tests Traversal example + minimalistic documentation Added a custom getters/setters example for gRPC

Fixed

Made sure that LongBits ctor is always called with unsigned 32 bits + static codegen compat., fixes #690arrow-up-right Properly handle multiple ../.. in path.normalize, see #688arrow-up-right Post-merge, also tackles #683arrow-up-right (packed option for repeated enum values)

New

Verify accepts non-null objects only, see #685arrow-up-right allow_alias enum option was not being honored. This case is now handled and a test case was added

CLI

Added an experimental --sparse option to limit pbjs output to actually referenced types within main files

Docs

Added explicit hint on Uint8Array to initial example, see #670arrow-up-right

Other

Ranges and names support for reserved fields, see #676arrow-up-right Updated depdendencies / rebuilt dist files Use ?: instead of |undefined in .d.ts files Mark optional fields as possibly being undefined Added a few more common google types from google/api, see #433arrow-up-right Minor optimizations to dependencies, build process and tsd

Fixed

Support node 4.2.0 to 4.4.7 buffers + travis case, see #665arrow-up-right

CLI

Added ES6 syntax flag to pbjs, see #667arrow-up-right

Docs

Reference Buffer for BufferReader/Writer, see #668arrow-up-right Slightly shortened README Additional notes on the distinction of different use cases / distributions, see #666arrow-up-right Extended README with additional information on JSON format Added extended usage instructions for TypeScript and custom classes to README, see #666arrow-up-right

Other

Updated dist files Updated test cases to use new buffer util Added fetch test cases + some test cleanup

Fixed

Properly replace short vars when beautifying static code, see #663arrow-up-right Use custom prelude in order to exclude any module loader code from source (for webpack), see #658arrow-up-right Make sure to check optional inner messages for null when encoding, see #658arrow-up-right

New

Initial attempt on a backwards compatible fetch implementation with binary support, see #661arrow-up-right

Other

Root#resolvePath skips files when returning null, see #368arrow-up-right Changes callback on failed response decode in rpc service to pass actual error instead of 'error' string Travis should exit with the respective error when running sauce tests Moved checks whether a test case is applicable to parent case Added eventemitter tests and updated micromodule dependencies (so far) Added lib/path tests and updated a few dependencies Moved micro modules to lib so they can have their own tests etc. Updated travis

Fixed

Properly set up reflection when using light build

Breaking

Inlined / refactored away .testJSON, see #653arrow-up-right Refactored util.extend away Reflected and statically generated services use common utility, now work exactly the same fromObject now throws for entirely bogus values (repeated, map and inner message fields), fixes #601arrow-up-right Cleaned up library distributions, now is full / light / minimal with proper browserify support for each

Fixed

Do not randomly remove slashes from comments, fixes #656arrow-up-right Properly parse nested textformat options, also tackles #655arrow-up-right

New

Relieved the requirement to call .resolveAll() on roots in order to populate static code-compatible properties, see #653arrow-up-right Added a (highly experimental) debug build as a starting point for #653arrow-up-right Full build depends on light build depends on minimal build, shares all relevant code

CLI

Also reuse specified root in pbjs for JSON modules, see #653arrow-up-right Reuse specified root name in pbjs to be able to split definitions over multiple files more easily, see #653arrow-up-right

Docs

Improved pbjs/pbts examples, better covers reflection with definitions for static modules Fixed centered formatting on npm

Other

Various other minor improvements / assertions refactored away, see #653arrow-up-right Fixed some common reflection deopt sites, see #653arrow-up-right Reflection performance pass, see #653arrow-up-right Added TS definitions to alternative builds' index files Removed unnecessary prototype aliases, improves gzip ratio Unified behaviour of and docs on Class constructor / Class.create Statically generated services actually inherit from rpc.Service Do not try to run sauce tests for PRs Added utility to enable/disable debugging extensions to experimental debug build Fixed node 0.12 tests Fixed coverage Added a test case for #652arrow-up-right

Other

In fromObject, check if object is already a runtime message, see #652arrow-up-right

Docs

Added coverage reporting

CLI

Added version scheme warning to everything CLI so that we don't need this overly explicit in README

Other

Coverage progress, 100% Coverage progress Attempted to fix badges once and for all Coverage progress

CLI

Reuse module paths when looking up cli dependencies, see #648arrow-up-right Check actual module directories to determine if cli dependencies are present and bootstrap semver, see #648arrow-up-right

Docs

Added a note on semver-incompatibility, see #649arrow-up-right

Other

Coverage progress

Breaking

Initial upgrade of converters to real generated functions, see #620arrow-up-right

Fixed

An enum's default value present as a string looks up using typeDefault, not defaultValue which is an array if repeated Use common utility for virtual oneof getters and setters in both reflection and static code, see #644arrow-up-right Properly use Type.toObject/Message.toObject within converters, see #641arrow-up-right Generate null/undefined assertion in fromObject if actually NOT an enum, see #620arrow-up-right Replace ALL occurencies of types[%d].values in static code, see #641arrow-up-right

New

Switched to own property-aware encoders for compatibility, see #639arrow-up-right Now also parses comments, sets them on reflected objects and re-uses them when generating static code, see #640arrow-up-right

CLI

Further improved generated static code style Removed scoping iifes from generated static code Removed even more clutter from generated static code Removed various clutter from generated static code Made sure that static target's replacement regexes don't match fields Also accept (trailing) triple-slash comments for compatibility with protoc-gen-doc, see #640arrow-up-right Use semver to validate that CLI dependencies actually satisfy the required version, see #637arrow-up-right

Docs

Added a hint on documenting .proto files for static code Documented internally used codegen partials for what it's worth Updated converter documentation

Other

Bundler provides useful stuff to uglify and a global var without extra bloat Cleaned and categorized tests, coverage progress Properly removed builtins from bundle Call hasOwnProperty builtin as late as possible decreasing the probability of having to call it at all (perf) Slightly hardened codegen sprintf Significantly improved uint32 write performance Cleaned up test case data and removed unused files Removed now useless trailing comment checks, see #640arrow-up-right Ensured that pbjs' beautify does not break regular expressions in generated verify functions

Fixed

Case-sensitively test for legacy group definitions, fixes #638arrow-up-right Properly parse text format options + simple test case, fixes #636arrow-up-right

Docs

Added SVG logo, see #629arrow-up-right

Other

Also refactored Service and Type to inherit from NamespaceBase, see #635arrow-up-right Moved TS-compatible Namespace features to a virtual NamespaceBase class, compiles with strictNullChecks by default now, see #635arrow-up-right Minor codegen enhancements

Fixed

Properly handle empty/noop Writer#ldelim, fixes #625arrow-up-right Properly annotate map fields in pbjs, fixes #624arrow-up-right

New

Made sure that Writer#bytes is always able to handle plain arrays

Other

Slightly restructured utility to better support static code default values

Fixed

Dynamically resolve jsdoc when running pbts, fixes #622arrow-up-right

Docs

Explain 6.4.2 vs 6.4.3 in changelog

Fixed

Fixed invalid definition of Field#packed property, also introduced decoder.compat mode (packed fields, on by default) Always decode packed/non-packed based on wire format only, see #602arrow-up-right Use full library for JSON modules and runtime dependency for static modules, fixes #621arrow-up-right

CLI

Additional workarounds for on demand CLI dependencies, see #618arrow-up-right Revised automatic setup of cli dependencies, see #618arrow-up-right

Other

Removed Android 4.0 test (no longer supported by sauce) Removed some unused utility, slightly more efficient codegen, additional comments Updated tests for new package.json layout Added break/continue label support to codegen Updated dependencies, rebuilt dist files and changed logo to use an absolute url

6.4.2 had been accidentally published as 6.4.3.

Fixed

Added more default value checks to converter, fixes #616arrow-up-right Respect long defaults in converters Convert inner messages and undefined/null values more thoroughly, fixes #615arrow-up-right Always use first defined enum value as field default, fixes #613arrow-up-right Install correct 'tmp' dependency when running pbts without dev dependencies installed, fixes #612arrow-up-right

New

Generate named constructors for runtime messages, see #588arrow-up-right

CLI

pbjs/pbts no longer generate any volatile headers, see #614arrow-up-right

Docs

Attempted to make broken shields less annoying Updated README

Other

Some cleanup and added a logo use $protobuf.Long

Breaking

Dropped IE8 support Removed now unused util.longNeq which was used by early static code

Fixed

Do not swallow errors in loadSync, also accept negative enum values in Enum#add, fixes #609arrow-up-right Improved bytes field support, also fixes #606arrow-up-right Fall back to browser Reader when passing an Uint8Array under node, fixes #605arrow-up-right Respect optional properties when writing interfaces in tsd-jsdoc, fixes #598arrow-up-right

New

Instead of protobuf.parse.keepCase, fall back to protobuf.parse.defaults holding all possible defaults, see #608arrow-up-right Added global ParseOptions#keepCase fallback as protobuf.parse.keepCase, see #608arrow-up-right Converters use code generation and support custom implementations Be more verbose when throwing invalid wire type errors, see #602arrow-up-right Added an asJSON-option to always populate array fields, even if defaults=false, see #597arrow-up-right Attempt to improve TypeScript support by using explicit exports Copy-pasted typescript definitions to micro modules, see #599arrow-up-right Emit an error on resolveAll() if any extension fields cannot be resolved, see #595arrow-up-right + test case

CLI

Removed 'not recommend' label for --keep-case, see #608arrow-up-right Added customizable linter configuration to pbjs Added stdin support to pbjs and pbts Static code no longer uses IE8 support utility Generated static code now supports asJSON/from Added support for TypeScript enums to pbts Added a few helpful comments to static code Slightly beautify statically generated code Do not wrap main definition as a module and export directly instead Generate prettier definitions with --no-comments Added variable arguments support to tsd-jsdoc Reference dependency imports as a module to prevent name collisions, see #596arrow-up-right Removed now unnecessary comment lines in generated static code

Docs

Added notes on CSP-restricted environments to README, see #593arrow-up-right

Other

Added test case for asJSON with arrays=true, see #597arrow-up-right Added a tape adapter to assert message equality accross browsers Refactored some internal utility away Reverted previous attempt on #597arrow-up-right Minor tsd-jsdoc refactor Removed unused sandbox files Updated package.json of micro modules to reference types, see #599arrow-up-right Reference dependencies as imports in generated typescript definitions, see #596arrow-up-right Allow null values on optional long fields, see #590arrow-up-right Various jsdoc improvements and a workaround for d.ts generation, see #592arrow-up-right

Fixed

Empty inner messages are always present on the wire + test case + removed now unused Writer#ldelim parameter, see #585arrow-up-right

CLI

Expose tsd-jsdoc's comments option to pbts as --no-comments, see #587arrow-up-right Increase child process max buffer when running jsdoc from pbts, see #587arrow-up-right pbjs now generates more convenient dot-notation property accessors

Other

And fixed IE8 again (should probably just drop IE8 for good)

Breaking

Moved camelCase/underScore away from util to where actually used 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 #575arrow-up-right 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

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

New

Added a noparse build for completeness 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 #576arrow-up-right Also added Namespace#getEnum for completeness, see #576arrow-up-right Added Namespace#getEnum and changed #lookupEnum to the same behavior, see #576arrow-up-right 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 #568arrow-up-right Initial support for legacy groups + test case, see #568arrow-up-right Added asJSON bytes as Buffer, see #566arrow-up-right

CLI

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

Docs

Updated documentation on runtime and noparse builds 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 #574arrow-up-right Added static/JSON module interchangeability to README Updated README and bundler according to dynamic require calls

Other

Added basic services test case Just polyfill Buffer.from / .allocUnsafe for good Added a test case to find out if all the fallbacks are just for IE8 Commented out float assertions in float test including explanation Expose array implementation used with (older) browsers on util for tests 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 #574arrow-up-right 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 #571arrow-up-right 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 #564arrow-up-right

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 #559arrow-up-right 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 #556arrow-up-right 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 #560arrow-up-right

New

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

CLI

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

Docs

README

Other

Added GH issue template Path micromodule, dependencies Test case for #556arrow-up-right Raw alloc benchmark Other minor optimizations

Fixed

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

New

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

CLI

Initial pbts CLI for generating TypeScript definitions, see #550arrow-up-right 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 #540arrow-up-right Annotate namespaces generated by static target, see #550arrow-up-right static target: Basic support for oneof fields, see #542arrow-up-right

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 #536arrow-up-right Fixed serialization order of fixed64, fallback to parseInt with no long lib, see #534arrow-up-right Actually allow undefined as service method type, fixes #528arrow-up-right Do not skip optional delimiter after aggregate options, fixes #520arrow-up-right Verify empty base64 encoded strings for bytes fields, see #535arrow-up-right wrong spell role should be rule decodeDelimited always forks if writer is specified, see #531arrow-up-right Mimic spec-compliant behaviour in oneof getVirtual, see #523arrow-up-right

New

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

CLI

Added json-module target to pbjs, renamed static to static-module, see #522arrow-up-right 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 #518arrow-up-right Added variations for Root#load, see #527arrow-up-right Added benchmark and profile related information to README Added service example to README, see #529arrow-up-right README on tests Update README/dist to reflect recent changes Minimal documentation for micromodules Document all the callbacks, see #527arrow-up-right Documented streaming-rpc example a bit

Other

Removed the need for triple-slash references in .d.ts by providing a minimal Long interface, see #527arrow-up-right, see #530arrow-up-right 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 #531arrow-up-right Safer signaling for synchronous load, see #529arrow-up-right Proper end of stream signaling to rpcImpl, see #529arrow-up-right Moved event emitter to util, also accepts listener context, see #529arrow-up-right Probably the worst form of hiding require programmatically, see #527arrow-up-right Attempt to hide require('fs') from webpack, see #527arrow-up-right Trying out jsdoc variations, see #527arrow-up-right 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 #513arrow-up-right

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 #512arrow-up-right

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 #503arrow-up-right Restructured encoder / decoder to better support static code gen

Fixed

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

New

Initial take on runtime services, see #507arrow-up-right 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 #503arrow-up-right Notes on dist files

Other

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

Last updated