From 051af7c50446d2c05df8e88814be28a868936429 Mon Sep 17 00:00:00 2001 From: Emanuele Stoppa Date: Mon, 6 Jun 2022 12:05:52 -0300 Subject: [PATCH] release: 0.6.0 --- CHANGELOG.md | 28 +++++++++++++++++++++ editors/vscode/package-lock.json | 4 +-- editors/vscode/package.json | 2 +- npm/rome/package.json | 2 +- website/src/_includes/docs/ci.md | 15 +++++++++++ website/src/_includes/docs/formatter.md | 3 --- website/src/_includes/docs/linter.md | 33 +++++++++++++++++++++++++ website/src/index.md | 2 ++ 8 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 website/src/_includes/docs/ci.md create mode 100644 website/src/_includes/docs/linter.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c688b932e780..ecf4403de814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Rome changelog +## 0.6.0 + +- BREAKING CHANGES: the command `rome format --ci` has been removed, use `rome ci` instead. +- Improved the compatibility with Prettier: + - TypeScript's formatting is now in line with what Prettier does. + - Better formatting of string literals. The formatter now does a lot of cleaning: + ```js + // original code + let a = { + "something": 3 + } + let b = "cool ins\'t it"; + + // formatted code + let a = { + someething: 3 + } + let b = "cool ins't it"; + ``` + - Better formatting of various statements + - Improved the performance of the formatting of averagely 20%! Check the [relative +PR](https://github.com/rome/tools/pull/2634) if you're interested of what the team did. + - + +To reach a better compatibility with Prettier, the team had to review the foundation of our printer, +which caused some regressions around how comments are printed. These are known issues that we +plan to close by next release. + ## 0.5.0 - BREAKING CHANGES: the `format` command doesn't write on disk by default. Now the command prints on terminal. diff --git a/editors/vscode/package-lock.json b/editors/vscode/package-lock.json index 35274c446854..a21096a597fc 100644 --- a/editors/vscode/package-lock.json +++ b/editors/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "rome", - "version": "0.6.0", + "version": "0.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rome", - "version": "0.6.0", + "version": "0.8.0", "license": "MIT", "dependencies": { "vscode-languageclient": "^8.0.0-next.13" diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 98bc9c2db6de..3491a2fd62cd 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -3,7 +3,7 @@ "publisher": "rome", "displayName": "Rome", "description": "Rome LSP VS Code Extension", - "version": "0.6.0", + "version": "0.8.0", "icon": "icon.png", "activationEvents": [ "onLanguage:javascript", diff --git a/npm/rome/package.json b/npm/rome/package.json index ab7122dec16d..d0edcad96b11 100644 --- a/npm/rome/package.json +++ b/npm/rome/package.json @@ -1,6 +1,6 @@ { "name": "rome", - "version": "0.5.0-next", + "version": "0.6.0-next", "bin": "bin/rome", "scripts": { "postinstall": "node scripts/postinstall.js" diff --git a/website/src/_includes/docs/ci.md b/website/src/_includes/docs/ci.md new file mode 100644 index 000000000000..1dd31fe06d79 --- /dev/null +++ b/website/src/_includes/docs/ci.md @@ -0,0 +1,15 @@ +## CI + +Rome comes with a CI mode that allows run multiple CI checks jsut by +running one single command. + +This mode is only available via CLI. + +### Use CI mode via CLI + +```shell +rome ci +``` + +This command will: +- run the formatter in check mode \ No newline at end of file diff --git a/website/src/_includes/docs/formatter.md b/website/src/_includes/docs/formatter.md index 84f293275aa1..435042b75181 100644 --- a/website/src/_includes/docs/formatter.md +++ b/website/src/_includes/docs/formatter.md @@ -35,8 +35,6 @@ appear only for documents that Rome supports. ### Use the formatter with the CLI -The only command that is supported is `format`. - You can start by running the CLI with the `--help` flag: ```shell @@ -55,7 +53,6 @@ USAGE: OPTIONS: --write Write the output of the formatter to the files instead of printing the diff to the console - --ci Enable CI mode, lock files and exit with an error if the formatter would modify them --skip-errors Skip over files containing syntax errors instead of returning an error --indent-style Determine whether the formatter should use tabs or spaces for indentation (default: tabs) --indent-size If the indentation style is set to spaces, determine how many spaces should be used for indentation (default: 2) diff --git a/website/src/_includes/docs/linter.md b/website/src/_includes/docs/linter.md new file mode 100644 index 000000000000..ba9eda261606 --- /dev/null +++ b/website/src/_includes/docs/linter.md @@ -0,0 +1,33 @@ +## Linter + +You can use the linter via our [VS Code extension] or by downloading our CLI directly from our [release page]. + +> WARNING: The CLI and VS Code extension are packaged with separate binaries, which means that if you don't +> use our default options, you will have to **pass them to both the extension AND the CLI**. +> +> This is a temporary choice to allow people to play with our formatter. This will change in the near future. + + +> WARNING: this command is experimental for the time being won't do anything + +### Use the formatter via CLI + +You can start by running the CLI with the `--help` flag: + +```shell +rome check --help +``` + +Which will show you the options available at the moment: + +```shell +USAGE: + rome check + + INPUTS can be one or more filesystem path, each pointing to a single file or an entire directory to be searched recursively for supported files + +``` + + +[VS Code extension]: https://marketplace.visualstudio.com/items?itemName=rome.rome +[release page]: https://github.com/rome/tools/releases diff --git a/website/src/index.md b/website/src/index.md index 372c7521a203..9745063648c4 100644 --- a/website/src/index.md +++ b/website/src/index.md @@ -8,5 +8,7 @@ layout: layouts/homepage.liquid {% include docs/getting-started.md %} {% include docs/status.md %} {% include docs/formatter.md %} +{% include docs/linter.md %} +{% include docs/ci.md %} {% include docs/philosophy.md %} {% include docs/_old_diagnostic-anatomy.md %}