For the future changelog please visit https://github.com/riot/compiler/releases
- Add: support for optional chaining and null coalescing expressions riot/riot#2880
- Fix riot/riot#2876
- Add support for inline
<script src='path/to/somewhere'>
tags
- Fix riot/riot#2874
- Fix #134
- Fix riot/riot#2866
- Add better interoperability with native custom elements riot/riot#2864
slot
attributes will be no longer removed
- Fix riot/riot#2859
- Fix riot/riot#2858
- Fix make sure that all the text expressions mixed with comments are properly rendered
- Fix improve the solution for riot/riot#2836
- Add support for HTML comments generation via
comments: true
option - Fix riot/riot#2836
- Add performance improvement avoiding the use of redundant static attributes expressions binding
- Fix false positive "out of root html" checks in case of html comments
- Update
@riotjs/parser
version
- Fix parsing issues due to false positive matches - related to #130
- Add support for ES2020
import()
expressions
- Fix #130
- Add support for shorthand object properties
- Fix HTML entities encoding riot/riot#2791
- Fix wrong arguments compilation in expression attributes riot/riot#2788
- Fix avoid to set the
expr
attribute as redundant expressions
- Remove unecessary code
- Fix riot/riot#2761
- Update the text expressions handling removing trailing white spaces
- Fix merge #128
- Fix make sure the
name
slot attributes will not be used to extend the parent scope
- Fix bundle the esmodules directly into the cjs bundle
- Add allow the use of attributes on slot tags
- Fix riot/riot#2760
- Fix riot/riot#2753
- Fix riot/riot#2748
- Update acorn to v7.0.0
- Fix make sure that the
createExpression
internal function receives always all its arguments
- Fix #121
- Fix backslashed unicode css properties
- Fix escape backslashes in css strings riot/riot#2726
- Fix #119
- Fix riot/riot#2726
-
Fix void tags will be automatically corrected for example:
<svg> <circle></circle> </svg>
Will be transfromed to
<svg> <circle /> </svg>
- Fix riot/riot#2719
- Fix riot/riot#2723
- Add support for dynamic import
- Fix expression parts issues riot/riot#2701
- Fix riot/riot#2700 replacing the
esprima
parser withacorn
- Fix attributes on custom tags having
if
oreach
directives
- Update
@riotjs/dom-bindings
using v4.0.0 - Update npm dependencies
- Fix riot#2691
- Fix css generation with
@media
queries
- Add support for
<a {href}/>
shortcut expressions - Fix spread expressions issue riot/2679
- Fix commonjs imports
- Add support for the slot attribute binding
- Fix avoid removing selector attributes twice on custom tags
- Fix attributes handling on custom children nodes riot#2680
- Fix spread operator on each directives riot#2679
- Fix attributes mixed with expressions riot#2681
- Complete rewrite not backward compatible
- New output compatible only for Riot.js 4.0.0
- Add better sourcemaps generation
- Add the
@riotjs/parser
fixing odd issues with regex like #114 - Improve the code generation strategy preferring AST to regex parsing
- Remove all the preprocessors from the core in favor of
registerPreprocessor
andregisterPostprocessor
instead
- Fix riot/riot#2669
- Fix #115
- Add support for multiple expressions on the same attribute node
- Update rename the
tag
propertyexports
- Fix handle escaped chars
- Fix bug in nodes with a single expression
- Add the
name
key to the tag exports - Fix self-closed tag bindings
- Remove unused dev dependencies
- Breaking change: make the compiler API synchronous
- Fix slots root nodes handling
- Add sourcemap tests for babel preprocessor
- Update handling of multiple line text expressions, from template literal to array
- Update output format
- Fix sourcemap for the multiple text expressions
- Check make sure that
slot
tags will not be considered custom tags
- Fix sourcemap
sourcesContent
property - Update sourcemap filename
- Fix sourcemap generation for the
if
andeach
tag bindings
- Update enhance sourcemaps generation
- Change second arguments for the pre/post processors. The
meta
object will contain info about the current compilation
- Fix move
recast
into the package dependencies
- Enhance the source map generation
- Improve performance
- Update npm dependencies
- Add support for the scoped css
- Update the Tag bindings output to support dynamic tags
- Fix issue with the object expressions scoping
- Update the tag bindings API to get the component implementation via function
- Fix issues related to the member expressions traversal and the scope
- Fix issue with custom tags and no slots
- Add support for the spread attributes
<a {...foo}/>
- Add the
tagName
to the compiler options in runtime - Fix the options were not passed to the postprocessor
- New complete rewrite from scratch
- Change npm name from
riot-compiler
to@riotjs/compiler
- First alpha release not backward compatible
- Fix es6 dynamic imports riot/riot#2641
- Fix try importing
@babel/core
first and then fallback tobabel-core
for thees6
parser
- Add support for Babel 7
- Add inline sourcemap support via
sourcemap='inline'
option
- Improve the sourcemap generation adding the
sourceContent
key
- Add initial experimental sourcemaps support via
sourcemap: true
option
- Fix #105
- Fix #104
- Update dependencies and refactor some internal code avoiding bitwise operators
- Fix coffeescript parser require #102
- Fix riot#2369 : Possible bug involving compilation of tags containing regex.
- Using the
skip-regex
function from npm for sharing bwteen modules (at future). - Using the
jsSplitter
function for safer replacement of JS code, part of the next compiler.
- Fixes various issues with literal regexes.
- Fix avoid the
filename
option for the babel-standalone parser
- Fix babel in browser runtime parser riot/examples#51
- Fix riot#2210 : Style tag get stripped from riot tag even if it's in a javascript string.
- Updated devDependencies.
- Adds support for css @apply rule: now ScopedCSS parser can handle it properly
- Deprecate old
babel
support, now thees6
parser will use Babel 6 by default - Change css always scoped by default
- Fix all the
value
attributes using expressions will be output asriot-value
to riot#1957
- Fix to erroneous version number in the package.json, v2.5.4 was released before.
- Removed unuseful files from the npm package.
- Updated credits in package.json
- Updated devDependencies, skip ESLint in CI test for node v0.12
- BuGless-hack for riot#1966 - You can use
<-/>
to signal the end of the html if your html is ending with an expression.
- Fix #68 : SASS inside Pug template gives Invalid CSS.
- Added parser for bublé as
buble
in the browser. Optionmodules
isfalse
in all versions. - Added parser for bublé as
buble
. - Added support for es6
import
statements. Thanks to @kuashe! - Related to riot#1715, riot#1784, and riot#1864.
- Fix #73 : resolveModuleSource must be a function - Option removed from the default Babel options.
- Updated node.js to 4.4 in the Travis environment.
- Downgraded ESLint to 2.x for using with node v0.12.x
- Fix #72:
undefined
is not a function when evaluatingparsers._req
. - Updated node versions for travis, including v5.x
- Add the
pug
parser (it will replace completelyjade
in the next major release) - Add the possibility to pass custom parsers options directly via the
compiler.compile
method through theparserOptions: {js: {}, template: {}, style: {}}
key more info - Fix un-escape parser options in html more info
- The parsers are moved to its own directory in the node version. The load is on first use.
- Fix riot#1325 : Gulp + Browserify + Babelify + type="es6" error.
- Fix riot#1342, riot#1636 and request from dwyl/learn-riot#8 : Server-Side Rendered Page Fails W3C Check. The new
data-is
attribute is used for scoped styles in addition toriot-tag
(the later will be removed in compiler v3.x) - The keyword
defer
in<script src=file>
avoids that the compiler loads the file, preserving the tag - Requested by riot#1492 : Stop script tags from being evaluated with serversideriot.render
. It is removed in client-side compilation because browsers will not load scripts through innerHTML. - It has changed the character used to hide expressions during the compilation, maybe this fix riot#1588 : Syntax Error: Invalid character
\0129
(riot+compiler.min). - The option
debug
inserts newlines between theriot.tag2
parameters and the call is prefixed with the source filename - Requested by riot#1646 : Split portions of generated html with newline instead of space - Removed the unused parameter with the compiled-time brackets from the call to
riot.tag2
. - Removed support for raw expressions. It is unlikely this feature will be implemented in v2.3.x
- Updated the regex that is used to match tag names, more closer to the HTML5 specs.
- Update devDependencies.
- Fix riot#1511 : Escape Quotes - They may be some issues to fix.
- Regression of logic to parse style and script tags, due to loss of performance and other issues.
- Removed the "compress" option of the
less
parser, which is deprecated and generates warnings in the console. - Removed the unuseful CSS parser
stylus
from the browser version. - Refactorization of all the code, with more comments in preparation for the automatic documentation of the API.
- Various tweaks to increase performance and reduce (~55%) memory consumption.
- Files to preprocess are moved from "lib" to the "src" directory, now "lib" has the required node.js files only.
- Fix riot#1495 : Warning of input tag value - Avoids warnings for date/datetime/time/month/email/color types with expression in its value.
- Fix riot#1488 : Cannot read property 'replace' of undefined when compiling in Node a tag with an import in its less stylesheet -- Thanks to @jrx-jsj
- Fix riot#1448 : Riot compiler parses and removes content from string declaration. This is partial fix, you need to write
<\/script>
for closing script tags within quoted strings. - Revised regex that matches
<pre>
tags. @import
directives ofstylus
,sass
,scss
, andless
can be relative to the file being processed.- Fixed lint issues with new .eslintrc.yml, almost compatible with JavaScript Standard Style
- Fixing issues with double quotes.
- Removed dependency on riot-tmpl for the node build, now we are using a local version of
brackets
.
- Regression of optimized regexes not working in IE9/10.
- Fix #36 : removed the excluded strings from the ouput.
- Fix: avoid changing the global brackets when the compiler is called with other brackets (requires riot-tmpl v2.3.15).
- A new property
version
(string) is included in the compiler set. - Fixes to travis CI and the bump routine
- Preparation for use as ES6 module through rollup.js
- Update devDependencies, including jspreproc v0.2.5 with an important fix.
- Partial regression of fix riot#1120,
tmpl
can parse double-quotes within expressions, encoding double-quotes generates issues.
- The prefix
__
for boolean attributes is not used anymore. This IE8 hack and it is not neccessary for current supported versions. - Option
exclude
for ignore parts of the tag. This is an array with one or more of 'html', 'css', 'attribs', 'js'. - Removed
inert
from the boolean attributes list, this html5 attribute was dropped from the specs. - Fixed normalization of root attributes, was not working as expected. Example updated.
- Fixed the
style
option for setting the CSS parser through theoptions
object. - Fixed an issue in preservation of line endings in the generated html markup.
- Fixed tests, coverage is 100% again.
- Updated doc/guide.md and doc/attributes.md with the latest features.
- Gets rid of the zero-indentation restriction for custom tags, now you can indent these tags, but the opening and closing tag must have exactly the same indentation (length and type). All the tag will be unindented by this amount.
- Support for
src
andcharset
attributes in<script>
tags for reading JavaScript sources from the file system - riot#1116, riot#507 - The
compile
function can return separate parts by setting the newentities
option. These parts has unescaped newlines. - New attribute
options
forscript
andstyle
tags will append/overwrite attributes in the default configuration object of the parser at tag level. - Fix riot#1261 :
<pre>
tag does not preserve neither\n
nor\t
. Now whitespace within<pre>
tags is always preserved. - Fix riot#1358 : Empty style in tag (scoped) breaks.
- New type="babel" supports babel-core v6.x. You must
npm install babel-preset-es2015
too, for this works. Use type="es6" for babel and babel-core v5.8.x and bellow - riot#1039 - Fix riot#1306 : Compiler preserves newlines in class objects, causing "Unterminated String Constant" errors.
- Fix riot#1314 :
settings.brackets
no longer works. - Fix riot#1309 : Tag renders js instead of content when no attributes present.
This is a complete rewrite and the first solo version of the compiler.
- Now the compiler generates a call to the new
riot.tag2
function, with the same parameters asriot.tag
and an additional one: the brackets used in the compilation.riot.tag2
requires all parameters except the brackets, so the compiler generates all but ignores the brackets if there are no generated expressions. - Unlike previous versions, backslashes are removed from the expressions (before being sent to any parser). Outside of expressions, all backslashes are preserved.
- Double quotes inside expressions are converted to
"
, to avoid issues with HTML markup. - Fix riot#1207 : Riot compiler/parser breaks indentation.
- Fix riot#1120 : Double quotes break Riot attributes
Enhancements
- The compiler loads the brackets in runtime on each tag, allowing use of different brackets. riot#1122 related.
- Multiple
<script>
blocks. These can have different types and are merged with the untagged script block, if any. - More flexible formats in ES6 style method definitions.
- In the JavaScript, trailing whitespace are removed and multiple empty lines are combined into one.
- Better recognition of expressions. Now you can use almost any character, even in unquoted expressions (expressions containing the
>
operator needs to be enclosed in quotes) - riot#744 - If the first character inside an expression is
^
, the expression is not passed to any parser. This is some sort of type=none at expression level - riot#543, riot#1090 - Type es6 now supports babel-core - riot#1039
- New logic for scoped style blocks, if a style contains the ":scoped" selector, this is replaced by the name of the root element, if not, the name is prepended - riot#912
type="scoped-css"
forstyle
tags is deprecated, use onlyscoped
orscoped="scoped"