v1.0.0-beta.5
Pre-release-
5ccfee4: v1.0.0-beta.5
-
e44f475: update links
-
377ae05: use cached storage
-
2ee7ae9: add storage driver
-
4bdd7b1: no comma dangle
-
e8d6cb7: explain parser and add test case for escaped comment delimiter
-
dd8fa7f: new syntax for nodes and comments
-
1713d3a: new license link
-
49d38ac: add route tests
100% coverage!
-
a9d5cce: refactor browser
-
5c8189f: revamp parser & generator
-
a32f80f: add test for failed cleanup
-
b94ea11: add test for failed child process execution
-
e01b9a6: add test for failed download in cli
-
cf8488b: add tests for failed http request in cli
-
9be5cc4: add tests for invalid http status codes and fix error messages
-
8ca4505: add cli tests for basic errors
-
50dcfc9: update comment on how view driver works
-
67a08cf: replace ariaset & dataset with attributes
-
1eace08: use pad instead of repeat in cli help table
-
06521d6: refactor main build script
-
4af1e8c: refactor release scripts
-
834d64b: use stat over lstat
-
0bb77dd: add cli tests for create command
-
b042095: update file size
-
2c97a77: add basic cli tests and remove perf tests
-
7f44bef: match package readme to descriptions
-
a04365c: remove mvl
-
b030ccb: add version property to all modules
-
a8b1c96: change order of gitignore
-
018cd3e: update descriptions and keywords
-
0851dd3: consistent spacing in switch statements
-
6cc066b: consistent error messages: failure of -> failed
-
253e22d: handle filesystem errors in cli
-
6170ffc: handle all http errors in cli
-
c43353b: refactor router
-
989e749: route driver
-
b842b29: refactor moon cli
-
7b391f8: style attributes -> style properties
-
8f528af: hoist value when creating nodes and blur without check when removing focus
-
e7a7cd9: new view patch children storage
Children are stored in
Node.MoonChildren
in order to optimize access
of the DOM (such aschildNodes
orfirstChild
/nextSibling
). -
a2ffd83: move diff equality checks to children
-
8a63274: remove extra check from view driver and use terser
-
1e65d81: escape unescaped string characters in text correctly
-
af10f7d: remove special diff case for text
-
06b5d0f: generate node creation functions in a loop
-
8bb1eb2: update perf test
-
1d453bb: declare all view functions manually
-
3cddda0: allow escapes in text and optimize whitespace
-
a112d53: refactor generator
Some things can be assumed by looking at the grammar. Blocks can be
expected in node children and node data as an expression. In these
cases, it is now assumed that they are blocks, and they are generated
without surrounding parentheses. -
981c575: new MVL, compiler, and router
First, this change involves a refactor of some of the module structure
of the code to be consistent.Next, there is a new Moon View Language (MVL). It has three types of
nodes:- Node: A node that is equivalent to the contents of the
expression within it, analogous to a variable reference.<{node}#>
- Data Node: A node that is equivalent to a function call that can call
a function with an expression directly or attributes to represent an
object.<{node} {data}/>
<{node} foo="bar" bar="baz"/>
- Data & Children Node: A node that is equivalent to a function call
with attributes representing an object along with support for children,
which can include text, dynamic text blocks, and other nodes.<{node} foo="bar" bar="baz">Text {dynamic} <node#></>
<p>Hello Moon!</p>
This means that all nodes must now be functions, so
Moon.view.m
is now
an object with keys being HTML elements and a specialtext
element
which takes avalue
data property. All elements must then usually be
imported or declared at the top of files.The new parser uses parser combinators and comes with better error
reporting that displays the line of the error, the surrounding lines,
and the exact position where something was expected. It also supports
full JavaScript syntax along with MVL, without needing parentheses
around nodes.The new generator is much simpler and only generates function calls or
variable references as appropriate for the node type in question. It
doesn't do any static function call optimization as the nodes can be
dynamic at any time. This can easily be done by the developer and
included with a reference using a normal variable reference node.Lastly, work on the router has started. There is a simple file structure
set up, a basic driver that changes the route using thehistory
API,
and a basicLink
component that createsa
elements with the data
provided. Nothing fancy for now. - Node: A node that is equivalent to the contents of the
-
b56a09e: fix options terminal highlighting in CLI
The options regular expression matched anything starting with a dash.
This makes it so that a word must start with one or two dashes and a
word must start with an opening bracket. There must be whitespace
separating them. -
b055b9a: remove extra break
-
71c13a6: improve CLI UX
Adds CLI commands, including a
help
command capable of displaying help
messages for individual commands. This will make it easier for people to
directly installmoon-cli
and work with it without having to reference
the documentation for the previous simple but obscure behavior. There
are now three commands,moon version
,moon help
, andmoon create
.
They all have error messages and help messages to guide users through
the process of using them.moon create
now accepts the template as an
option rather than a positional argument, using the-t
or--template
option instead. -
d9cb7a7: add tests for multiple HTTP requests
The HTTP driver can send multiple concurrent requests, but can only
receive one at a time. If JavaScript were ever to get true parallelism,
one could use multiple HTTP drivers to account for multiple physical
network ports that could receive complete HTTP requests at the same
time. This adds tests for sending multiple requests and receiving them
individually. -
6eb9010: make HTTP request headers optional (#260)
Extra HTTP request headers are usually not required. This change makes
them optional and makes it so that the HTTP driver only requires the
url
field to perform a request. This also adds tests for using default
HTTP requests that are both successful and result in an error. -
9838956: make HTTP request headers optional
Extra HTTP request headers are usually not required. This change makes
them optional and makes it so that the HTTP driver only requires the
url
field to perform a request. This also adds tests for using default
HTTP requests that are both successful and result in an error. -
3d7174e: use consistent event for moon browser XHR (#259)
In the HTTP driver, the
onload
event is used rather than
addEventListener
. This PR refactors Moon Browser to use the same
method by usingonload
along with an arrow function to clean up the
event handling code that adds the listener. -
aab846f: use consistent event for moon browser XHR
In the HTTP driver, the
onload
event is used rather than
addEventListener
. This PR refactors Moon Browser to use the same
method by usingonload
along with an arrow function to clean up the
event handling code that adds the listener. -
855db29: add basic http tests
This includes tests for a successful load event and an error event. It
currently provides every single parameter, including optional ones.
However, it does test that the request/response headers and body are
sent properly using a mock XHR implementation. -
b13176a: add basic http tests
This includes tests for a successful load event and an error event. It
currently provides every single parameter, including optional ones.
However, it does test that the request/response headers and body are
sent properly using a mock XHR implementation. -
1797a44: http driver
-
3bdb6cf: add tests for browser
-
3610856: remove initial data option from data driver
This is a change to make drivers consistent. They should only be an
interface between an application and the browser. In this case, the
browser would have a way of storing things in memory (a variable), and
the data driver provides an interface to changing it. This means there
should not be an initial data option. -
8cd670e: add tests for focus
-
3a71f9f: add focus attribute
-
6597ae0: use switch statement for setting properties
-
192e96d: allow components to have uppercase letter anywhere
-
9eb9e17: add time driver