diff --git a/.github/ISSUE_TEMPLATE/question-about-usage.md b/.github/ISSUE_TEMPLATE/question-about-usage.md index fc005b4c2..e09160b13 100644 --- a/.github/ISSUE_TEMPLATE/question-about-usage.md +++ b/.github/ISSUE_TEMPLATE/question-about-usage.md @@ -5,5 +5,5 @@ about: You have a question about how to use the beautifier --- # **DO NOT FILE USAGE QUESTIONS AS ISSUES** -Review the [README.md](https://github.com/beautify-web/js-beautify/blob/main/README.md). -If that does not help, join us on gitter: https://gitter.im/beautify-web/js-beautify . +Review the [README.md](https://github.com/beautifier/js-beautify/blob/main/README.md). +If that does not help, join us on gitter: https://gitter.im/beautifier/js-beautify . diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d06cc5721..ef32eeaad 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -50,7 +50,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -64,4 +64,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c65be9cc..41b5b1b87 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cached node_modules diff --git a/.github/workflows/milestone-publish.yml b/.github/workflows/milestone-publish.yml index 5fa2256e7..93f72ec36 100644 --- a/.github/workflows/milestone-publish.yml +++ b/.github/workflows/milestone-publish.yml @@ -21,7 +21,7 @@ jobs: node-version: 18 registry-url: https://registry.npmjs.org/ - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.11 - name: Set git user @@ -49,7 +49,7 @@ jobs: ssh-add ~/.ssh/deploy_js_beautify git remote add site git@beautifier-github.com:beautifier/beautifier.io.git - git remote add trigger git@js-beautify-github.com:beautify-web/js-beautify.git + git remote add trigger git@js-beautify-github.com:beautifier/js-beautify.git git fetch --all - name: Install python twinE run: pip install twine diff --git a/.gitignore b/.gitignore index 149f92d82..45181bd5c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ python/*/__pycache__ python/MANIFEST python/build python/dist +python/.eggs/ python/jsbeautifier.egg-info python/cssbeautifier.egg-info .nvmrc diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cbba96a8..08fec4233 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,512 +1,515 @@ # Changelog +## v1.15.0 +* Fixed #2219 - formatting of new Angular control flow syntax ([#2221](https://github.com/beautifier/js-beautify/pull/2221)) + ## v1.14.11 -* Editor not working https://beautifier.io/ ([#2201](https://github.com/beautify-web/js-beautify/issues/2201)) -* Set nodejs minimum to v14 ([#2169](https://github.com/beautify-web/js-beautify/pull/2169)) -* Invalid prettification of object with unicode escape character as object key ([#2159](https://github.com/beautify-web/js-beautify/issues/2159)) -* invalid json being generated with wrap\_line\_length ([#1932](https://github.com/beautify-web/js-beautify/issues/1932)) +* Editor not working https://beautifier.io/ ([#2201](https://github.com/beautifier/js-beautify/issues/2201)) +* Set nodejs minimum to v14 ([#2169](https://github.com/beautifier/js-beautify/pull/2169)) +* Invalid prettification of object with unicode escape character as object key ([#2159](https://github.com/beautifier/js-beautify/issues/2159)) +* invalid json being generated with wrap\_line\_length ([#1932](https://github.com/beautifier/js-beautify/issues/1932)) ## v1.14.9 -* Bump semver and editorconfig ([#2161](https://github.com/beautify-web/js-beautify/pull/2161)) -* Update editorconfig package ([#2160](https://github.com/beautify-web/js-beautify/issues/2160)) -* Allow to configure the "custom elements as inline elements" behavior ([#2113](https://github.com/beautify-web/js-beautify/issues/2113)) +* Bump semver and editorconfig ([#2161](https://github.com/beautifier/js-beautify/pull/2161)) +* Update editorconfig package ([#2160](https://github.com/beautifier/js-beautify/issues/2160)) +* Allow to configure the "custom elements as inline elements" behavior ([#2113](https://github.com/beautifier/js-beautify/issues/2113)) ## v1.14.8 -* Require nodejs v12 or greater ([#2151](https://github.com/beautify-web/js-beautify/pull/2151)) -* CSS insideNonNestedAtRule generic variable ([#2147](https://github.com/beautify-web/js-beautify/pull/2147)) -* Update dependencies ([#2145](https://github.com/beautify-web/js-beautify/pull/2145)) -* Fix CI build ([#2144](https://github.com/beautify-web/js-beautify/pull/2144)) -* Fixed #2133 Theme Toggle on without\_codemirror Mode ([#2138](https://github.com/beautify-web/js-beautify/pull/2138)) -* use correct variable name ([#2135](https://github.com/beautify-web/js-beautify/pull/2135)) -* docs: Fix a few typos ([#2127](https://github.com/beautify-web/js-beautify/pull/2127)) -* Add support for new record types (cont.) ([#2118](https://github.com/beautify-web/js-beautify/pull/2118)) -* fix - semicolon followed by block statement doesnt have new line ([#2117](https://github.com/beautify-web/js-beautify/pull/2117)) -* Fix formatting related to the element ([#2114](https://github.com/beautify-web/js-beautify/pull/2114)) -* issue prettifying (function(){code();{code}})() ([#1852](https://github.com/beautify-web/js-beautify/issues/1852)) +* Require nodejs v12 or greater ([#2151](https://github.com/beautifier/js-beautify/pull/2151)) +* CSS insideNonNestedAtRule generic variable ([#2147](https://github.com/beautifier/js-beautify/pull/2147)) +* Update dependencies ([#2145](https://github.com/beautifier/js-beautify/pull/2145)) +* Fix CI build ([#2144](https://github.com/beautifier/js-beautify/pull/2144)) +* Fixed #2133 Theme Toggle on without\_codemirror Mode ([#2138](https://github.com/beautifier/js-beautify/pull/2138)) +* use correct variable name ([#2135](https://github.com/beautifier/js-beautify/pull/2135)) +* docs: Fix a few typos ([#2127](https://github.com/beautifier/js-beautify/pull/2127)) +* Add support for new record types (cont.) ([#2118](https://github.com/beautifier/js-beautify/pull/2118)) +* fix - semicolon followed by block statement doesnt have new line ([#2117](https://github.com/beautifier/js-beautify/pull/2117)) +* Fix formatting related to the element ([#2114](https://github.com/beautifier/js-beautify/pull/2114)) +* issue prettifying (function(){code();{code}})() ([#1852](https://github.com/beautifier/js-beautify/issues/1852)) ## v1.14.7 -* Doc: Updates web browser implementation examples ([#2107](https://github.com/beautify-web/js-beautify/pull/2107)) -* HTML formatter breaks layout by introducing newlines ([#1989](https://github.com/beautify-web/js-beautify/issues/1989)) +* Doc: Updates web browser implementation examples ([#2107](https://github.com/beautifier/js-beautify/pull/2107)) +* HTML formatter breaks layout by introducing newlines ([#1989](https://github.com/beautifier/js-beautify/issues/1989)) ## v1.14.6 -* Globs no longer work on Windows in 1.14.5 ([#2093](https://github.com/beautify-web/js-beautify/issues/2093)) +* Globs no longer work on Windows in 1.14.5 ([#2093](https://github.com/beautifier/js-beautify/issues/2093)) ## v1.14.5 -* Dependency updates and UI tweaks ([#2088](https://github.com/beautify-web/js-beautify/pull/2088)) -* Bump terser from 5.12.1 to 5.14.2 ([#2084](https://github.com/beautify-web/js-beautify/pull/2084)) -* new layout breaks everything on long lines ([#2071](https://github.com/beautify-web/js-beautify/issues/2071)) -* Dark mode ([#2057](https://github.com/beautify-web/js-beautify/issues/2057)) +* Dependency updates and UI tweaks ([#2088](https://github.com/beautifier/js-beautify/pull/2088)) +* Bump terser from 5.12.1 to 5.14.2 ([#2084](https://github.com/beautifier/js-beautify/pull/2084)) +* new layout breaks everything on long lines ([#2071](https://github.com/beautifier/js-beautify/issues/2071)) +* Dark mode ([#2057](https://github.com/beautifier/js-beautify/issues/2057)) ## v1.14.4 -* Extra space before `!important` added ([#2056](https://github.com/beautify-web/js-beautify/issues/2056)) -* css format removes space after quoted value ([#2051](https://github.com/beautify-web/js-beautify/issues/2051)) -* Add grid-template-areas to NON\_SEMICOLON\_NEWLINE\_PROPERTY list ([#2035](https://github.com/beautify-web/js-beautify/pull/2035)) -* CSS formatter removes useful space ([#2024](https://github.com/beautify-web/js-beautify/issues/2024)) -* CHANGELOG.md file was wiped out in v1.14.2 ([#2022](https://github.com/beautify-web/js-beautify/issues/2022)) -* Fails to recognize Handlebars block with whitespace control, e.g. {{~#if true ~}} ([#1988](https://github.com/beautify-web/js-beautify/issues/1988)) -* Support new sass `@use` syntax ([#1976](https://github.com/beautify-web/js-beautify/issues/1976)) -* Do not remove whitespace after number ([#1950](https://github.com/beautify-web/js-beautify/issues/1950)) -* html formatter doesn't support handlebars partial blocks (`#>`) ([#1869](https://github.com/beautify-web/js-beautify/issues/1869)) -* in keyword in class method causes indentation problem ([#1846](https://github.com/beautify-web/js-beautify/issues/1846)) -* space\_after\_named\_function not working inside an ES6 class ([#1622](https://github.com/beautify-web/js-beautify/issues/1622)) -* Restyle website ([#1444](https://github.com/beautify-web/js-beautify/issues/1444)) -* improper line concatenation between 'return' and a prefix expression ([#1095](https://github.com/beautify-web/js-beautify/issues/1095)) +* Extra space before `!important` added ([#2056](https://github.com/beautifier/js-beautify/issues/2056)) +* css format removes space after quoted value ([#2051](https://github.com/beautifier/js-beautify/issues/2051)) +* Add grid-template-areas to NON\_SEMICOLON\_NEWLINE\_PROPERTY list ([#2035](https://github.com/beautifier/js-beautify/pull/2035)) +* CSS formatter removes useful space ([#2024](https://github.com/beautifier/js-beautify/issues/2024)) +* CHANGELOG.md file was wiped out in v1.14.2 ([#2022](https://github.com/beautifier/js-beautify/issues/2022)) +* Fails to recognize Handlebars block with whitespace control, e.g. {{~#if true ~}} ([#1988](https://github.com/beautifier/js-beautify/issues/1988)) +* Support new sass `@use` syntax ([#1976](https://github.com/beautifier/js-beautify/issues/1976)) +* Do not remove whitespace after number ([#1950](https://github.com/beautifier/js-beautify/issues/1950)) +* html formatter doesn't support handlebars partial blocks (`#>`) ([#1869](https://github.com/beautifier/js-beautify/issues/1869)) +* in keyword in class method causes indentation problem ([#1846](https://github.com/beautifier/js-beautify/issues/1846)) +* space\_after\_named\_function not working inside an ES6 class ([#1622](https://github.com/beautifier/js-beautify/issues/1622)) +* Restyle website ([#1444](https://github.com/beautifier/js-beautify/issues/1444)) +* improper line concatenation between 'return' and a prefix expression ([#1095](https://github.com/beautifier/js-beautify/issues/1095)) ## v1.14.3 -* [LESS] Fixing issues with spacing when an object literal lives inside a mixin ([#2017](https://github.com/beautify-web/js-beautify/pull/2017)) -* Overindentation when using "class" as a key in an object ([#1838](https://github.com/beautify-web/js-beautify/issues/1838)) -* CSS Grid template formatting is broken when adding track size after line names ([#1817](https://github.com/beautify-web/js-beautify/issues/1817)) -* SCSS module system @use problem ([#1798](https://github.com/beautify-web/js-beautify/issues/1798)) -* JS "space\_in\_empty\_paren" failing for class methods ([#1151](https://github.com/beautify-web/js-beautify/issues/1151)) -* LESS mixins gets formatted strangely ([#722](https://github.com/beautify-web/js-beautify/issues/722)) +* [LESS] Fixing issues with spacing when an object literal lives inside a mixin ([#2017](https://github.com/beautifier/js-beautify/pull/2017)) +* Overindentation when using "class" as a key in an object ([#1838](https://github.com/beautifier/js-beautify/issues/1838)) +* CSS Grid template formatting is broken when adding track size after line names ([#1817](https://github.com/beautifier/js-beautify/issues/1817)) +* SCSS module system @use problem ([#1798](https://github.com/beautifier/js-beautify/issues/1798)) +* JS "space\_in\_empty\_paren" failing for class methods ([#1151](https://github.com/beautifier/js-beautify/issues/1151)) +* LESS mixins gets formatted strangely ([#722](https://github.com/beautifier/js-beautify/issues/722)) ## v1.14.2 -* Why put npm in dependencies? ([#2005](https://github.com/beautify-web/js-beautify/issues/2005)) -* [Bug] Logical assignments in JS are incorrectly beautified ([#1991](https://github.com/beautify-web/js-beautify/issues/1991)) +* Why put npm in dependencies? ([#2005](https://github.com/beautifier/js-beautify/issues/2005)) +* [Bug] Logical assignments in JS are incorrectly beautified ([#1991](https://github.com/beautifier/js-beautify/issues/1991)) ## v1.14.1 -* feature request: cmd+enter hotkey for mac users ([#1985](https://github.com/beautify-web/js-beautify/issues/1985)) -* Wrong indentation when the last line in a case is a right brace ([#1683](https://github.com/beautify-web/js-beautify/issues/1683)) +* feature request: cmd+enter hotkey for mac users ([#1985](https://github.com/beautifier/js-beautify/issues/1985)) +* Wrong indentation when the last line in a case is a right brace ([#1683](https://github.com/beautifier/js-beautify/issues/1683)) ## v1.14.0 -* import.meta appears on newline ([#1978](https://github.com/beautify-web/js-beautify/issues/1978)) -* Added buttons to website ([#1930](https://github.com/beautify-web/js-beautify/pull/1930)) -* Logical assignment operators; Fix parsing of optional chaining ([#1888](https://github.com/beautify-web/js-beautify/issues/1888)) -* Numbers should be allowed to contain underscores ([#1836](https://github.com/beautify-web/js-beautify/issues/1836)) -* Use native mkdirSync instead of 'mkdirp' package ([#1833](https://github.com/beautify-web/js-beautify/pull/1833)) -* selector\_separator\_newline adds erroneous newline on @extend SCSS statements ([#1799](https://github.com/beautify-web/js-beautify/issues/1799)) +* import.meta appears on newline ([#1978](https://github.com/beautifier/js-beautify/issues/1978)) +* Added buttons to website ([#1930](https://github.com/beautifier/js-beautify/pull/1930)) +* Logical assignment operators; Fix parsing of optional chaining ([#1888](https://github.com/beautifier/js-beautify/issues/1888)) +* Numbers should be allowed to contain underscores ([#1836](https://github.com/beautifier/js-beautify/issues/1836)) +* Use native mkdirSync instead of 'mkdirp' package ([#1833](https://github.com/beautifier/js-beautify/pull/1833)) +* selector\_separator\_newline adds erroneous newline on @extend SCSS statements ([#1799](https://github.com/beautifier/js-beautify/issues/1799)) ## v1.13.13 -* IE11 compatibility failure v>1.13.5 ([#1918](https://github.com/beautify-web/js-beautify/issues/1918)) +* IE11 compatibility failure v>1.13.5 ([#1918](https://github.com/beautifier/js-beautify/issues/1918)) ## v1.13.11 -* Support short PHP tags ([#1840](https://github.com/beautify-web/js-beautify/issues/1840)) +* Support short PHP tags ([#1840](https://github.com/beautifier/js-beautify/issues/1840)) ## v1.13.6 -* Fix space-before-conditional: false to work on switch-case statement ([#1881](https://github.com/beautify-web/js-beautify/pull/1881)) -* Optional chaining obj?.[expr] ([#1801](https://github.com/beautify-web/js-beautify/issues/1801)) +* Fix space-before-conditional: false to work on switch-case statement ([#1881](https://github.com/beautifier/js-beautify/pull/1881)) +* Optional chaining obj?.[expr] ([#1801](https://github.com/beautifier/js-beautify/issues/1801)) ## v1.13.5 ## v1.13.1 -* Option 'max\_preserve\_newlines' not working on beautify\_css.js CSS Beautifier ([#1863](https://github.com/beautify-web/js-beautify/issues/1863)) -* React Fragment Short Syntax <> issue ([#1854](https://github.com/beautify-web/js-beautify/issues/1854)) -* add viewport meta tag to index.html ([#1843](https://github.com/beautify-web/js-beautify/pull/1843)) -* Add basic smarty templating support ([#1820](https://github.com/beautify-web/js-beautify/issues/1820)) -* Tagged Template literals ([#1244](https://github.com/beautify-web/js-beautify/issues/1244)) +* Option 'max\_preserve\_newlines' not working on beautify\_css.js CSS Beautifier ([#1863](https://github.com/beautifier/js-beautify/issues/1863)) +* React Fragment Short Syntax <> issue ([#1854](https://github.com/beautifier/js-beautify/issues/1854)) +* add viewport meta tag to index.html ([#1843](https://github.com/beautifier/js-beautify/pull/1843)) +* Add basic smarty templating support ([#1820](https://github.com/beautifier/js-beautify/issues/1820)) +* Tagged Template literals ([#1244](https://github.com/beautifier/js-beautify/issues/1244)) ## v1.13.0 -* (internal) Refactor python cssbeautifier to reuse jsbeautifier CLI methods ([#1832](https://github.com/beautify-web/js-beautify/pull/1832)) -* (internal) Switch from node-static to serve ([#1831](https://github.com/beautify-web/js-beautify/pull/1831)) -* Fixed pip install cssbeautifier ([#1830](https://github.com/beautify-web/js-beautify/pull/1830)) +* (internal) Refactor python cssbeautifier to reuse jsbeautifier CLI methods ([#1832](https://github.com/beautifier/js-beautify/pull/1832)) +* (internal) Switch from node-static to serve ([#1831](https://github.com/beautifier/js-beautify/pull/1831)) +* Fixed pip install cssbeautifier ([#1830](https://github.com/beautifier/js-beautify/pull/1830)) ## v1.12.0 -* Python jsbeautifier fails for special chars ([#1809](https://github.com/beautify-web/js-beautify/issues/1809)) -* pip install cssbeautifier fails ([#1808](https://github.com/beautify-web/js-beautify/issues/1808)) -* Add expand brace-style option to css beautifier ([#1796](https://github.com/beautify-web/js-beautify/pull/1796)) -* Support nullish-coalescing ([#1794](https://github.com/beautify-web/js-beautify/issues/1794)) -* Upgrade ga.js to analytics.js ([#1777](https://github.com/beautify-web/js-beautify/issues/1777)) -* Newline rule not working with css-like files ([#1776](https://github.com/beautify-web/js-beautify/issues/1776)) -* no new line after self closing tag ([#1718](https://github.com/beautify-web/js-beautify/issues/1718)) -* HTML format, no break after