Skip to content

Commit 1c492b2

Browse files
authored
Merge branch 'main' into fix/css-media-query-range-operator-spacing
2 parents 9244d0e + 1b6d627 commit 1c492b2

8 files changed

Lines changed: 52 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v2.0.1
4+
* Removed all usage of six and dropped support for Python 2. ([#2374](https://github.com/beautifier/js-beautify/pull/2374))
5+
* Move minimum version to Nodejs v22.x ([#2363](https://github.com/beautifier/js-beautify/pull/2363))
6+
* Bump nopt from 7.2.1 to 8.1.0 ([#2361](https://github.com/beautifier/js-beautify/pull/2361))
7+
* Fix minor crash for certain oddly formed *.js files ([#2128](https://github.com/beautifier/js-beautify/pull/2128))
8+
39
## v1.15.4
410
* Downgrade nopt to v7.x to maintain Node.js v14 compatibility ([#2358](https://github.com/beautifier/js-beautify/issues/2358))
511

CONTRIBUTING.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,32 @@ To publish a Beta or RC (Release Candidate), add `-beta1` or `-rc1` to the end o
137137

138138

139139

140+
## Version Numbering Policy
141+
142+
This project follows semantic versioning for API compatibility, with additional guidance for formatting changes.
143+
144+
### What each version number means
145+
146+
* Major (`x.0.0`): API compatibility changes. We reserve major versions for intentional API-incompatible changes.
147+
* Minor (`x.y.0`): Significant formatting fixes, behavior improvements, or new features/options that may affect output.
148+
* Patch (`x.y.z`): Small, low-risk fixes that should not cause side effects.
149+
150+
### Output compatibility expectations
151+
152+
Formatting output for the same input may change in minor and patch releases.
153+
For this project, output compatibility is not equivalent to API compatibility:
154+
155+
* API compatibility is represented by major versions.
156+
* Formatting correctness and behavior improvements are delivered in minor/patch releases based on scope and risk.
157+
158+
### Rules for introducing formatting behavior changes
159+
160+
* Fixes for strictly incorrect formatting should be enabled by default.
161+
* New formatting features should be introduced as options and must default to off, so valid input formatting does not change unexpectedly.
162+
* We avoid unnecessary output churn and treat invalid input handling as best-effort.
163+
164+
### Guidance for consumers
165+
166+
If your workflows are sensitive to output differences, pin exact versions or use conservative ranges.
167+
Using broad ranges (for example, `^x.y.z`) may pull in output-affecting updates by design.
168+

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ JS Beautifier is hosted on two CDN services: [cdnjs](https://cdnjs.com/libraries
5858

5959
To pull the latest version from one of these services include one set of the script tags below in your document:
6060
```html
61-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.js"></script>
62-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-css.js"></script>
63-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-html.js"></script>
61+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify.js"></script>
62+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify-css.js"></script>
63+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify-html.js"></script>
6464

65-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.min.js"></script>
66-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-css.min.js"></script>
67-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify-html.min.js"></script>
65+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify.min.js"></script>
66+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify-css.min.js"></script>
67+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify-html.min.js"></script>
6868
```
6969

7070
Example usage of a JS tag in html:
@@ -76,7 +76,7 @@ Example usage of a JS tag in html:
7676

7777
. . .
7878

79-
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.15.4/beautify.min.js"></script>
79+
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-beautify/2.0.1/beautify.min.js"></script>
8080
<script src="script.js"></script>
8181
</body>
8282
</html>
@@ -446,4 +446,4 @@ Thanks also to Jason Diamond, Patrick Hof, Nochum Sossonko, Andreas Schneider, D
446446
Vasilevsky, Vital Batmanov, Ron Baldwin, Gabriel Harrison, Chris J. Shull,
447447
Mathias Bynens, Vittorio Gambaletta and others.
448448
449-
(README.md: js-beautify@1.15.4)
449+
(README.md: js-beautify@2.0.1)

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-beautify",
3-
"version": "1.15.4",
3+
"version": "2.0.1",
44
"description": "beautifier.io for node",
55
"main": "js/index.js",
66
"bin": {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.15.4"
1+
__version__ = "2.0.1"

python/jsbeautifier/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.15.4"
1+
__version__ = "2.0.1"

tools/release-all.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ release_python()
2121
cd python
2222
# python setup.py register -r pypi
2323
cp setup-js.py setup.py || exit 1
24-
python setup.py sdist bdist_wheel || exit 1
24+
$SCRIPT_DIR/python -m pip install setuptools black
25+
$SCRIPT_DIR/python setup.py sdist bdist_wheel || exit 1
2526
cp setup-css.py setup.py || exit 1
26-
python setup.py sdist bdist_wheel || exit 1
27+
$SCRIPT_DIR/python setup.py sdist bdist_wheel || exit 1
2728
rm setup.py || exit 1
28-
python -m twine upload dist/* || exit 1
29+
$SCRIPT_DIR/python -m twine upload dist/* || exit 1
2930
}
3031

3132
release_node()

0 commit comments

Comments
 (0)