107 Commits

Author SHA1 Message Date
Robin Anil
a510692fe9 Cleanup 2017-05-23 13:44:27 -05:00
Robin Anil
2059ee0f6f Add support to generate types for JSON object.
Add support for string types.
2017-05-23 13:28:37 -05:00
Marcus Ilgner
429de19d85
Fix Reader argument conversion in static module 2017-05-14 13:57:52 +02:00
dcodeIO
17c2797592 New: Upgrade to codegen 2 2017-04-23 14:51:58 +02:00
dcodeIO
13bf9c2635 CLI: Various improvements to statically generated JSDoc, also fixes #772 2017-04-22 00:27:33 +02:00
dcodeIO
03194c203d Use JSDoc, they said, it documents code, they said. Fixes #770 2017-04-21 15:29:36 +02:00
dcodeIO
23f4b99037 Docs: Replaced nullable types with explicit type|null for better tooling compatibility, also fixes #766 and fixes 767 2017-04-20 14:42:45 +02:00
dcodeIO
2dcae25c99 CLI: Several improvements to tsd-jsdoc emitted comments 2017-04-17 23:44:59 +02:00
dcodeIO
22f907c49a CLI: Relieved tsd files from unnecessary comments; CLI: Generate TS namespaces for vars and functions with properties; Other: Regenerated dist files; Breaking: Removed Message#toObject in favor of having just the static version (unnecessary static code otherwise) 2017-04-16 03:30:25 +02:00
dcodeIO
c97b618112 Breaking: Everything uses interfaces now instead of typedefs (SomethingProperties is now ISomething) 2017-04-15 19:29:31 +02:00
dcodeIO
7ab136daa5 Other: Initial map fields support for ext/descriptor, see #757 2017-04-12 22:59:55 +02:00
dcodeIO
708552bb84 Other: Added infrastructure for TypeScript support of extensions 2017-04-12 19:03:14 +02:00
dcodeIO
7a6f98b5e7 Breaking: Initial implementation of TypeScript decorators; Breaking: Refactored protobuf.Class away; Breaking: TypeScript definitions now have (a lot of) generics; Breaking: Removed deprecated features; Other: tsd-jsdoc now has limited generics support 2017-04-10 17:17:27 +02:00
dcodeIO
bed514290c CLI: With null/undefined eliminated by constructors and .create, document message fields as non-optional where applicable (ideally used with TS & strictNullChecks), see #743 2017-04-04 10:23:52 +02:00
dcodeIO
007b232984 CLI: Renamed --strict-long/message to --force-long/message with backward compatible aliases, see #741 2017-04-03 17:09:26 +02:00
dcodeIO
6aae71f75e CLI: Keep $Properties with --strict-message but require actual instances within, see #741 2017-04-03 16:52:05 +02:00
dcodeIO
c812cef0ef CLI: Added --strict-message option to pbjs to strictly reference message instances instead of $Properties, see #741 2017-04-03 13:48:13 +02:00
dcodeIO
ca0dce2d7f Other: Updated deps, ts fixes and regenerated dist files 2017-03-31 15:47:20 +02:00
dcodeIO
2ebb1b7818 CLI: Prepare static code with estraverse instead of regular expressions, see #732 2017-03-27 23:11:34 +02:00
dcodeIO
8aa21268aa Fixed: Ensure that fields have been resolved when looking up js types in static target, see #731 2017-03-27 21:41:03 +02:00
dcodeIO
8de21e1a94 CLI: $Properties are just a type that's satisfied, not implemented, by classes, see #723 2017-03-27 00:45:58 +02:00
dcodeIO
8a60174932 CLI: Fixed computed array indexes not being renamed in static code, see #726 2017-03-24 18:34:16 +01:00
dcodeIO
6423a419fe CLI: Preparations for moving the CLI to its own package, see #716 2017-03-24 16:14:59 +01:00
dcodeIO
afefa3de09 CLI: Properly implement $Properties interface in JSDoc, see #723 2017-03-24 03:33:10 +01:00
dcodeIO
a1f23e09fb CLI: Recursively use $Properties inside of $Properties in static code, see #717 2017-03-24 02:04:41 +01:00
dcodeIO
c3f0a2124c CLI: Added --strict-long option to pbjs to always emit 'Long' instead of 'number|Long' (only relevant with long.js), see #718 2017-03-24 00:57:06 +01:00
dcodeIO
e1dd1bc266 Other: With stubs in place, 'number|Long' return values can be just 'Long' instead, see #718 2017-03-24 00:02:04 +01:00
dcodeIO
0bc4a14501 CLI: Statically emitted long type is 'Long' now instead of '$protobuf.Long', see #718 2017-03-23 23:24:47 +01:00
dcodeIO
c04d4a5ab8 New: Implemented stubs for long.js / node buffers to be used where either one isn't wanted, see #718 2017-03-23 23:15:08 +01:00
dcodeIO
a06691f5b8 Fixed: Actually emit TS compatible enums in static target if not aliases, see #720 2017-03-23 21:03:13 +01:00
dcodeIO
a75625d176 CLI: Decoupled message properties as an interface in static code for TS intellisense support, see #717 2017-03-23 17:27:02 +01:00
dcodeIO
23f14a61e8 CLI: Static code statically resolves types[..], see #715 2017-03-23 16:13:49 +01:00
dcodeIO
88ca8f0d1e Other: Retain alias order in static code for what it's worth, see #712 2017-03-22 18:29:33 +01:00
dcodeIO
47bb95a317 Other: Determine necessary aliases depending on config, see #712 2017-03-22 16:28:08 +01:00
dcodeIO
588ffd9b12 Other: Use more precise types for message-like plain objects 2017-03-21 23:13:46 +01:00
dcodeIO
fe917652f8 Other: Updated tests to use new simplified encoder logic 2017-03-20 20:30:25 +01:00
dcodeIO
c0b7c9fa63 Other: Added codegen support for constructor functions, see #700 2017-03-12 22:06:11 +01:00
dcodeIO
ac26a7aa60 New: pbjs now generates multiple exports when using ES6 syntax, see #686 2017-03-11 03:23:57 +01:00
dcodeIO
364e7d457e Other: Exclude dist/ from codeclimate checks 2017-03-07 23:04:37 +01:00
dcodeIO
26d9fadb21 New: decode throws specific ProtocolError with a reference to the so far decoded message if required fields are missing + example 2017-03-06 03:31:51 +01:00
dcodeIO
7502dd2dfd Docs: Documented that Type#encode respectively Message.encode do not implicitly .verify, see #696 [ci-skip] 2017-03-05 23:15:27 +01:00
dcodeIO
e7e123aa0b Other: Cache any regexp instance (perf); Docs: Documented throwing behavior of Reader.create and Message.decode 2017-03-05 23:08:53 +01:00
dcodeIO
7c3506b3f0 Fixed: Post-merge, also tackles #683 2017-02-23 04:07:08 +01:00
David Fox
f8b415a2fc Mark optional fields as possibly being undefined 2017-02-22 18:04:14 -06:00
dcodeIO
d246024f4c Other: Minor optimizations to dependencies, build process and tsd 2017-02-03 18:27:51 +01:00
dcodeIO
6a0920b2c3 Other: Added ES6 syntax flag to pbjs, see #667 2017-01-30 16:13:50 +01:00
dcodeIO
3aea1bf3d4 Fixed: Properly replace short vars when beautifying static code, see #663 2017-01-27 16:21:49 +01:00
dcodeIO
dd96dcdacb Other: Various other minor improvements / assertions refactored away, see #653 2017-01-24 05:05:26 +01:00
dcodeIO
735da4315a CLI: Also reuse specified root in pbjs for JSON modules, see #653 2017-01-24 03:12:32 +01:00
dcodeIO
3a056244d3 CLI: Reuse specified root name in pbjs to be able to split definitions over multiple files more easily, see #653 2017-01-24 02:07:46 +01:00