Merge branch 'master' into js-default-options

This commit is contained in:
Liam Newman 2018-10-23 03:13:43 -07:00 committed by GitHub
commit 97342b11c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 71 additions and 31 deletions

View File

@ -1,4 +1,27 @@
# Changelog
## v1.8.8
### Description
### Closed Issues
* async function in object wrong indentation ([#1573](https://github.com/beautify-web/js-beautify/issues/1573))
## v1.8.7
### Description
### Closed Issues
* Add tests for html `indent_scripts` option ([#1518](https://github.com/beautify-web/js-beautify/issues/1518))
* Support dynamic import ([#1197](https://github.com/beautify-web/js-beautify/issues/1197))
* HTML: add an option to preserve manual wrapping of attributes ([#1125](https://github.com/beautify-web/js-beautify/issues/1125))
* js-beautify adds a space between # and include ([#1114](https://github.com/beautify-web/js-beautify/issues/1114))
* space_after_anon_function doesn't work with anon async functions ([#1034](https://github.com/beautify-web/js-beautify/issues/1034))
* Space before function arguments (space-after-function) ([#608](https://github.com/beautify-web/js-beautify/issues/608))
## v1.8.6
### Description
@ -23,19 +46,6 @@ Broader adoption of 1.8.x revealed a few more high priority fixes
* unindent_chained_methods broken ([#1533](https://github.com/beautify-web/js-beautify/issues/1533))
## v1.8.3
### Description
### Closed Issues
* Missing Bower Assets ([#1521](https://github.com/beautify-web/js-beautify/issues/1521))
* Javascript ternary breaked with `await` ([#1519](https://github.com/beautify-web/js-beautify/issues/1519))
* Object property indented after `await` ([#1517](https://github.com/beautify-web/js-beautify/issues/1517))
* Handlebars formatting problems ([#870](https://github.com/beautify-web/js-beautify/issues/870))
* beautify.js doesn't have indent_level option ([#724](https://github.com/beautify-web/js-beautify/issues/724))
## v1.8.1
### Description

View File

@ -62,17 +62,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
To pull the latest version from one of these services include one set of the script tags below in your document:
```html
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify-css.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify-html.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.7/beautify-html.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify-css.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.8.8/beautify-html.min.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.7/js/lib/beautify.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.7/js/lib/beautify-css.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.7/js/lib/beautify-html.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.8/js/lib/beautify.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.8/js/lib/beautify-css.js"></script>
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.8.8/js/lib/beautify-html.js"></script>
```
Older versions are available by changing the version number.
@ -377,4 +377,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
Mathias Bynens, Vittorio Gambaletta and others.
(README.md: js-beautify@1.8.7)
(README.md: js-beautify@1.8.8)

View File

@ -2258,6 +2258,15 @@ function run_javascript_tests(test_obj, Urlencoded, js_beautify, html_beautify,
' yield b;\n' +
' }\n' +
'}');
bt(
'a = {\n' +
' myVar: async () => {\n' +
' return a;\n' +
' },\n' +
' myOtherVar: async async () => {\n' +
' yield b;\n' +
' }\n' +
'}');
//============================================================

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "js-beautify",
"version": "1.8.7",
"version": "1.8.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "js-beautify",
"version": "1.8.7",
"version": "1.8.8",
"description": "beautifier.io for node",
"main": "js/index.js",
"bin": {

View File

@ -1 +1 @@
__version__ = '1.8.7'
__version__ = '1.8.8'

View File

@ -2028,6 +2028,15 @@ class TestJSBeautifier(unittest.TestCase):
' yield b;\n' +
' }\n' +
'}')
bt(
'a = {\n' +
' myVar: async () => {\n' +
' return a;\n' +
' },\n' +
' myOtherVar: async async () => {\n' +
' yield b;\n' +
' }\n' +
'}')
#============================================================

View File

@ -1003,6 +1003,18 @@ exports.test_data = {
' }',
'}'
]
},
{
unchanged: [
'a = {',
' myVar: async () => {',
' return a;',
' },',
' myOtherVar: async async () => {',
' yield b;',
' }',
'}'
]
}
]
}, {