Releases: wapc/widl-js
Releases · wapc/widl-js
Stream keyword on unary parameters and returns
What's Changed
Full Changelog: v0.0.11...v0.0.12
Flagging imported definitions
v0.0.11 Flagging imported definitions
Misc fixes
v0.0.10 Fix imports above namespace in "namespace_first" rule. Few other misc…
Miscellaneous fixes
- Added rules that check:
- Only one namespace is defined and it must be at the top of the WIDL document
- Only one interface can be defined
- Allow ALIAS as a directive location
- Fixed enumeration parsing of optional display string.
- Added
Annotated
interface for use in the code generator.
Alias types
Alias syntax:
alias UUID = bytes
Aliases are similar to (and inspired by) Scalar types from GraphQL, but the difference is that Aliases target a primitive or user-defined type. The intention is mainly to help the a code generation module redirect an aliased type to an alternate type that is treated a specific way. For example, the alias of UUID = bytes
might indicate that a byte array that should be treated as a UUID (16 bytes). The code generator would select the ideal internal type for its targeted programming language.
Added WIDL module template
You can now use the CLI to bootstrap a codegen plugin.
wapc new @wapc/widl/module my_module
cd my_module
npm install
npm run build
Misc fixes
- Fixed required annotation error message
- Making a return type optional (assumes void) and fixing validation rule for void returns
- Disable camel case directive name rule
- Fix descriptions over namespaces, imports, directives, interfaces and roles
- Make parameters parenthesis options for directive definitions
- Added parseType
- Switch on kind improvement
- Added annotation callback
- novisit annotation for types and enums
- Operation returns void validation fix
- Required field from type in valid annotation check
Misc refactoring, imports, directive "requires", and validation
Add a few language features:
- Imports - includes types and directives from a
resolver
function. In practice, this will load from~/.wapc/definitions
which is installed towapc install
(upcoming PR in the CLI) - Directive
requires @other on TYPE | etc.
syntax to target what other directives must exist in relation to it (validation forthcoming)
Refactored:
- Added
validate
function that takes in configuration rules (which as visitors inrules
) - Kinds are now an enum - no more
instanceof
- Organization of classes into definitions, nodes, types & values
- More visitor hooks
Add isKind helper method to the AST
v0.0.4 Version bump to v0.0.4
Initial release
Merge pull request #2 from wapc/initial_version Initial version