Releases: betwixt-labs/bebop
Bebop v2.8.6
What's Changed
- feat: allow Guid instances to be used like primitives by @andrewmd5 in #274
- feat: binary schema by @andrewmd5 in #276
- feat: enable emit-binary-schema in bebop.json by @andrewmd5 in #277
- refactor(logger): improve logging layer by @andrewmd5 in #278
Full Changelog: v2.8.5...v2.8.6
Bebop v2.8.5
What's Changed
- fix!: refactor generated JSON methods from toJson to toJSON by @andrewmd5 in #273
Full Changelog: v2.8.4...v2.8.5
Bebop v2.8.4
Typescript: the runtime is no longer minified to fix instanceof
Full Changelog: v2.8.3...v2.8.4
Bebop v2.8.3
What's Changed
- fix(json): source objects being modified by @andrewmd5 in #271
Full Changelog: v2.8.2...v2.8.3
Bebop v2.8.2
What's Changed
- feat: prevent Javascript prototype pollution by @andrewmd5 in #270
Full Changelog: v2.8.1...v2.8.2
Bebop v2.8.1
What's Changed
- codegen(ts): support to/from json methods in Tempo methods by @andrewmd5 in #269
Full Changelog: v2.8.0...v2.8.1
Bebop v2.8.0
Typescript Code Gen
- fixed a bug where camelCase was not being applied to fields in generated code.
- fixed a bug where PascalCase was not being applied to types in generated code.
guid
now generates aGuid
class instead of astring
.- each record now generates
toJson
,encodeToJson
,fromJson
,validateTypes
, andvalidateCompatibility
methods. For more information see #267.
Typescript Runtime
GuidMap
andGuid
have been added to the runtime. TheGuidMap
was added so aGuid
class can be used as a key in a map.
JSON-Over-Bebop
In #267 an experimental JSON compatability layer was introduced that allows JSON to be marshaled to and from Bebop records. The spec is a work in progress and is subject to change. For more information see the wiki page JSON-Over-Bebop.
Bebop v2.7.4
VSCode
The extension has moved: https://marketplace.visualstudio.com/items?itemName=betwixt.bebop-lang
Ignore the gap in release versions; fighting the pipeline and the pipeline won.
Bebop v2.7.1
What's Changed
- repl: monarch grammar by @andrewmd5 in #254
- chore: update repl gif by @andrewmd5 in #255
- repl: avoid 'getawaiter' by @andrewmd5 in #256
- tools: powershell install script by @andrewmd5 in #257
- website: detect OS for install script by @andrewmd5 in #258
- powershel: exit -> break by @andrewmd5 in #259
- readme: make REPL gif smaller (both size and dimension wise) by @andrewmd5 in #260
- codegen(ts): ensure 'MethodType' import is written by @andrewmd5 in #261
Full Changelog: v2.7.0...v2.7.1
Bebop v2.7.0
REPL
The REPL has gotten some much needed love. Gone are the <textarea>
and Prism highlighting and in their place a REPL that utilizes Monaco Editor.
Diagnostics will be reported as you write schemas in the REPL now and there is basic highlighting.
Services
It is now possible to define a service method which can accept a stream of records or return a stream of records. Just use the new stream
keyword before writing the type identifier.
service Music {
getSongsByMusician(Musician): stream Song;
}
To utilize streams, update to the latest version of Tempo.
Documentation will now also generate alongside service code
You can now also apply the deprecated
attribute to service definitions and their methods
/** A service for getting songs */
service Music {
/** Gets a stream of songs by the specified musician */
[deprecated("Use of getSongsByMusician is not recommended")]
getSongsByMusician(Musician): stream Song;
}
bebopc fixes
Block Comment Crash
In previous versions of bebopc
not completing a block comment could in some cases cause the compiler to crash rather than provide diagnostics. This has now been fixed.
Block comments @ EOF
In previous versions of bebopc
a block comment left at the end of a schema would produce a diagnostic error; the compiler has been updated to allow this behavior.
--watch crash
In previous versions of bebopc
while quickly editing and committing changes to a schema, watch mode could hard crash. A fix has been put in place to mitigate this.
Improved service diagnostics
When attempting to use an undefined type in a service method, it now reports the correct parent in the diagnostic
Attempting to use a scalar or enum type in a service method produces a more understandable error
Notices
bebopc
3.0.0 is on the horizon and some major changes are on the way
- We plan to introduce compiler plugins. Give us your feedback here
- the
readonly
modifier is deprecated and astruct
will soon be immutable by default. Give us your feedback here. - The Dart generator will be removed from the compiler. Give us your feedback here
Misc
- In #253 we removed the NodeJS Polyfill present in the Typescript runtime. If you encounter a
BebopRuntimeError
while using the runtime under node, you'll need to polyfillTextDecoder
so it is on the global scope (just as we were doing for you.) This was removed because it would make non-node projects be detected as such. - Also in #253 we removed an erroneous dependency on
@types/node
which would cause bundlers to bundle them. - #244 fixed an issue on some linux distributions where the compiler would crash because it couldn't find a file
dotnet
was looking for.