js-beautify 1.7.0 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/CONTRIBUTING.md +3 -3
- package/README.md +15 -12
- package/js/bin/css-beautify.js +4 -0
- package/js/bin/html-beautify.js +4 -0
- package/js/bin/js-beautify.js +4 -0
- package/js/config/defaults.json +18 -0
- package/js/lib/beautify-css.js +1046 -0
- package/js/lib/beautify-html.js +1387 -0
- package/js/lib/beautify.js +2820 -0
- package/js/lib/cli.js +623 -0
- package/js/lib/unpackers/javascriptobfuscator_unpacker.js +103 -0
- package/js/lib/unpackers/myobfuscate_unpacker.js +90 -0
- package/js/lib/unpackers/p_a_c_k_e_r_unpacker.js +83 -0
- package/js/lib/unpackers/urlencode_unpacker.js +73 -0
- package/js/src/core/acorn.js +63 -0
- package/js/src/core/inputscanner.js +95 -0
- package/js/src/core/options.js +48 -0
- package/js/src/core/output.js +234 -0
- package/js/src/core/token.js +49 -0
- package/js/src/css/beautifier.js +477 -0
- package/js/src/css/index.js +36 -0
- package/js/src/html/beautifier.js +1035 -0
- package/js/src/html/index.js +36 -0
- package/js/src/index.js +27 -0
- package/js/src/javascript/beautifier.js +1449 -0
- package/js/src/javascript/index.js +36 -0
- package/js/src/javascript/tokenizer.js +620 -0
- package/js/test/amd-beautify-tests.js +62 -0
- package/js/test/generated/beautify-css-tests.js +1393 -0
- package/js/test/generated/beautify-html-tests.js +3212 -0
- package/js/test/generated/beautify-javascript-tests.js +5896 -0
- package/js/test/node-beautify-html-perf-tests.js +51 -0
- package/js/test/node-beautify-perf-tests.js +50 -0
- package/js/test/node-beautify-tests.js +45 -0
- package/js/test/requirejs-html-beautify.html +58 -0
- package/js/test/resources/configerror/.jsbeautifyrc +6 -0
- package/js/test/resources/configerror/subDir1/subDir2/empty.txt +0 -0
- package/js/test/resources/editorconfig/.editorconfig +6 -0
- package/js/test/resources/editorconfig/cr/.editorconfig +3 -0
- package/js/test/resources/editorconfig/crlf/.editorconfig +3 -0
- package/js/test/resources/editorconfig/error/.editorconfig +1 -0
- package/js/test/resources/editorconfig/example-base.js +3 -0
- package/js/test/resources/example1.js +3 -0
- package/js/test/resources/indent11chars/.jsbeautifyrc +6 -0
- package/js/test/resources/indent11chars/subDir1/subDir2/empty.txt +0 -0
- package/js/test/run-tests +17 -0
- package/js/test/sanitytest.js +144 -0
- package/js/test/shell-smoke-test.sh +383 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
|
+
## v1.7.4
|
|
3
|
+
|
|
4
|
+
### Description
|
|
5
|
+
Thanks @cejast for contributing!
|
|
6
|
+
|
|
7
|
+
### Closed Issues
|
|
8
|
+
* Whitespace after ES7 `async` keyword for arrow functions ([#896](https://github.com/beautify-web/js-beautify/issues/896))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## v1.7.3
|
|
12
|
+
|
|
13
|
+
### Description
|
|
14
|
+
* Fixed broken installs
|
|
15
|
+
|
|
16
|
+
Lessons learned:
|
|
17
|
+
* Don't publish and go to bed.
|
|
18
|
+
* I thought I had sufficient test coverage and I did not. Tests will be implemented to protect against this before the next release (#1254).
|
|
19
|
+
* Also, this break highlights the need to create a beta channel for releases and a way to request feedback on beta releases (#1255).
|
|
20
|
+
* The project has been maintained by mostly one person over the past year or so, with some additions by other individuals. This break also highlights the need for this project to have a few more people who have the ability address issues/emergencies (#1256).
|
|
21
|
+
* Many projects do not not lock or even limit their version dependencies. Those that do often use `^x.x.x` instead of `~x.x.x`. Consider switching to making major version updates under more circumstances to limit risk to dependent projects. (#1257)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Closed Issues
|
|
25
|
+
* Version 1.7.0 fail to install through pip ([#1250](https://github.com/beautify-web/js-beautify/issues/1250))
|
|
26
|
+
* Installing js-beautify fails ([#1247](https://github.com/beautify-web/js-beautify/issues/1247))
|
|
27
|
+
|
|
28
|
+
|
|
2
29
|
## v1.7.0
|
|
3
30
|
|
|
4
31
|
### Description
|
package/CONTRIBUTING.md
CHANGED
|
@@ -93,10 +93,10 @@ Each platform has it's own release process.
|
|
|
93
93
|
|
|
94
94
|
NOTE: Before you do any of these make sure the latest changes have passed the travis-ci build!
|
|
95
95
|
|
|
96
|
-
##Web
|
|
96
|
+
## Web
|
|
97
97
|
Merge changes from `master` to `gh-pages` branch. This is very low cost and can be done whenever is convenient.
|
|
98
98
|
|
|
99
|
-
##Python
|
|
99
|
+
## Python
|
|
100
100
|
NOTE: For now, we'd like to keep python and node version numbers synchronized,
|
|
101
101
|
so if you publish a python release, you should publish a node release as well.
|
|
102
102
|
|
|
@@ -118,7 +118,7 @@ python setup.py sdist bdist_wininst upload
|
|
|
118
118
|
git push
|
|
119
119
|
```
|
|
120
120
|
|
|
121
|
-
##Node
|
|
121
|
+
## Node
|
|
122
122
|
NOTE: For now, we'd like to keep python and node version numbers synchronized,
|
|
123
123
|
so if you plan to publish a node release, you should publish a python release *first*,
|
|
124
124
|
then perform the steps below.
|
package/README.md
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
# JS Beautifier
|
|
2
|
-
[](http://travis-ci.org/beautify-web/js-beautify)
|
|
3
3
|
[](https://ci.appveyor.com/project/beautify-web/js-beautify/branch/master)
|
|
4
|
+
|
|
5
|
+
[](https://pypi.python.org/pypi/jsbeautifier)
|
|
4
6
|
[](https://cdnjs.com/libraries/js-beautify)
|
|
5
7
|
[](https://www.npmjs.com/package/js-beautify)
|
|
6
8
|
[](https://www.npmjs.com/package/js-beautify)
|
|
9
|
+
|
|
7
10
|
[](https://gitter.im/beautify-web/js-beautify?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
8
11
|
|
|
9
12
|
[](https://www.npmjs.org/package/js-beautify)
|
|
@@ -21,17 +24,17 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
|
|
|
21
24
|
|
|
22
25
|
To pull from one of these services include one set of the script tags below in your document:
|
|
23
26
|
```html
|
|
24
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
25
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
26
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
27
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify.js"></script>
|
|
28
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify-css.js"></script>
|
|
29
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify-html.js"></script>
|
|
27
30
|
|
|
28
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
29
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
30
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.
|
|
31
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify.min.js"></script>
|
|
32
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify-css.min.js"></script>
|
|
33
|
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.7.4/beautify-html.min.js"></script>
|
|
31
34
|
|
|
32
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.
|
|
33
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.
|
|
34
|
-
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.
|
|
35
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.4/js/lib/beautify.js"></script>
|
|
36
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.4/js/lib/beautify-css.js"></script>
|
|
37
|
+
<script src="https://cdn.rawgit.com/beautify-web/js-beautify/v1.7.4/js/lib/beautify-html.js"></script>
|
|
35
38
|
```
|
|
36
39
|
Disclaimer: These are free services, so there are [no uptime or support guarantees](https://github.com/rgrove/rawgit/wiki/Frequently-Asked-Questions#i-need-guaranteed-100-uptime-should-i-use-cdnrawgitcom).
|
|
37
40
|
|
|
@@ -274,7 +277,7 @@ HTML Beautifier Options:
|
|
|
274
277
|
-A, --wrap-attributes Wrap attributes to new lines [auto|force|force-aligned|force-expand-multiline] ["auto"]
|
|
275
278
|
-i, --wrap-attributes-indent-size Indent wrapped attributes to after N characters [indent-size] (ignored if wrap-attributes is "force-aligned")
|
|
276
279
|
-U, --unformatted List of tags (defaults to inline) that should not be reformatted
|
|
277
|
-
-T, --content_unformatted List of tags (defaults to pre)
|
|
280
|
+
-T, --content_unformatted List of tags (defaults to pre) whose content should not be reformatted
|
|
278
281
|
-E, --extra_liners List of tags (defaults to [head,body,/html] that should have an extra newline before them.
|
|
279
282
|
--editorconfig Use EditorConfig to set up the options
|
|
280
283
|
```
|
|
@@ -318,4 +321,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
|
|
|
318
321
|
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
|
|
319
322
|
Mathias Bynens, Vittorio Gambaletta and others.
|
|
320
323
|
|
|
321
|
-
(README.md: js-beautify@1.7.
|
|
324
|
+
(README.md: js-beautify@1.7.4)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"indent_size": 4,
|
|
3
|
+
"indent_char": " ",
|
|
4
|
+
"indent_level": 0,
|
|
5
|
+
"indent_with_tabs": false,
|
|
6
|
+
"preserve_newlines": true,
|
|
7
|
+
"max_preserve_newlines": 10,
|
|
8
|
+
"jslint_happy": false,
|
|
9
|
+
"space_after_anon_function": false,
|
|
10
|
+
"brace_style": "collapse",
|
|
11
|
+
"keep_array_indentation": false,
|
|
12
|
+
"keep_function_indentation": false,
|
|
13
|
+
"space_before_conditional": true,
|
|
14
|
+
"break_chained_methods": false,
|
|
15
|
+
"eval_code": false,
|
|
16
|
+
"unescape_strings": false,
|
|
17
|
+
"wrap_line_length": 0
|
|
18
|
+
}
|