From 85645de58d9f2a6b692bba6d9f19456a201eb774 Mon Sep 17 00:00:00 2001 From: strager Date: Fri, 18 Aug 2023 06:10:41 -0700 Subject: [PATCH 1/6] fix(docs): fix typo (#4770) --- .../rome_js_analyze/src/assists/correctness/organize_imports.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs b/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs index afad2378d09..a13be6ce3e7 100644 --- a/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs +++ b/crates/rome_js_analyze/src/assists/correctness/organize_imports.rs @@ -666,7 +666,7 @@ impl PartialEq for ImportKey { /// are listed before imports closer to the source file. #[derive(Eq, Ord, PartialEq, PartialOrd)] enum ImportCategory { - /// Anythign with an explicit `node:` prefix, or one of the recognized + /// Anything with an explicit `node:` prefix, or one of the recognized /// Node built-ins, such `"fs"`, `"child_process"`, etc.. NodeBuiltin, /// NPM dependencies with an explicit `npm:` prefix, such as supported by From 9f3bbe9061dd65993469faac9f6d4ad39f18a038 Mon Sep 17 00:00:00 2001 From: LW Date: Sat, 19 Aug 2023 11:25:15 -0700 Subject: [PATCH 2/6] fix(noRedeclare): allow merging namespace + variable (#4772) --- .../noRedeclare/valid-declaration-merging.ts | 22 +++++++++++++++++ .../valid-declaration-merging.ts.snap | 24 ++++++++++++++++++- crates/rome_js_syntax/src/binding_ext.rs | 1 + 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts index af03a7223c0..50e20de5aa4 100644 --- a/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts +++ b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts @@ -69,6 +69,28 @@ export namespace Orientation { export function f(): void {} } +// variable and namespace merging +declare namespace bodyParser { + interface BodyParser { + /** @deprecated */ + (): void + } + interface Options { + inflate?: boolean | undefined + } +} +declare const bodyParser: bodyParser.BodyParser + +namespace ConcreteNamespaceMergeVar { + export interface Foo { + foo: string + } +} + +export const ConcreteNamespaceMergeVar = { foo: 'bar' } +ConcreteNamespaceMergeVar.foo = 'baz' +type Bar = ConcreteNamespaceMergeVar.Foo + // namespace merging export namespace X { export function f(): void {} diff --git a/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap index 39f28f1b978..31c10c164ea 100644 --- a/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap +++ b/crates/rome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snap @@ -1,6 +1,6 @@ --- source: crates/rome_js_analyze/tests/spec_tests.rs -assertion_line: 91 +assertion_line: 80 expression: valid-declaration-merging.ts --- # Input @@ -76,6 +76,28 @@ export namespace Orientation { export function f(): void {} } +// variable and namespace merging +declare namespace bodyParser { + interface BodyParser { + /** @deprecated */ + (): void + } + interface Options { + inflate?: boolean | undefined + } +} +declare const bodyParser: bodyParser.BodyParser + +namespace ConcreteNamespaceMergeVar { + export interface Foo { + foo: string + } +} + +export const ConcreteNamespaceMergeVar = { foo: 'bar' } +ConcreteNamespaceMergeVar.foo = 'baz' +type Bar = ConcreteNamespaceMergeVar.Foo + // namespace merging export namespace X { export function f(): void {} diff --git a/crates/rome_js_syntax/src/binding_ext.rs b/crates/rome_js_syntax/src/binding_ext.rs index 2baa9102c16..8c8bf60006f 100644 --- a/crates/rome_js_syntax/src/binding_ext.rs +++ b/crates/rome_js_syntax/src/binding_ext.rs @@ -135,6 +135,7 @@ impl AnyJsBindingDeclaration { AnyJsBindingDeclaration::TsModuleDeclaration(_), AnyJsBindingDeclaration::JsClassDeclaration(_) | AnyJsBindingDeclaration::JsFunctionDeclaration(_) + | AnyJsBindingDeclaration::JsVariableDeclarator(_) | AnyJsBindingDeclaration::TsDeclareFunctionDeclaration(_) | AnyJsBindingDeclaration::TsEnumDeclaration(_) | AnyJsBindingDeclaration::TsInterfaceDeclaration(_) From 964a039f31b5b6bbd5e301e5f18682104866fbff Mon Sep 17 00:00:00 2001 From: Abhishek Rawat <47311875+AbePlays@users.noreply.github.com> Date: Wed, 23 Aug 2023 03:56:20 +0530 Subject: [PATCH 3/6] docs: fix typo (#4768) --- website/src/pages/internals/versioning.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/pages/internals/versioning.mdx b/website/src/pages/internals/versioning.mdx index 3b69ef25582..f2d373c7ce5 100644 --- a/website/src/pages/internals/versioning.mdx +++ b/website/src/pages/internals/versioning.mdx @@ -7,8 +7,8 @@ description: How we version Rome. # Versioning -Fixes to lint rules, formatting layouts, etc. might prevent your scripts from passing. Due to the nature of these changes -it's **high recommended** to save the _exact_ version in your `package.json`, instead of using range operators. +Fixes to lint rules, formatting layouts, etc. might prevent your scripts from passing. Due to the nature of these changes, +it's **highly recommended** to save the _exact_ version in your `package.json`, instead of using range operators. This methodology will make sure that your script won't fail unexpectedly. From 16cfe419407d86c8dcea5271e91623c29f31fb4b Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Tue, 29 Aug 2023 16:25:02 +0200 Subject: [PATCH 4/6] docs(README): announcing Biome (#4788) --- npm/rome/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/npm/rome/README.md b/npm/rome/README.md index fdba255e485..0d1a4008781 100644 --- a/npm/rome/README.md +++ b/npm/rome/README.md @@ -1,3 +1,10 @@ + +> [!IMPORTANT] +> Welcome to [Biome]([https://github.com/biomejs/biome](https://biomejs.dev/blog/annoucing-biome)), the community successor of Rome Tools! + +> [!WARNING] +> Rome Tools is no longer maintained. +

From f1f0bc547f6af3934c54206628b253353803e058 Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Tue, 29 Aug 2023 16:30:32 +0200 Subject: [PATCH 5/6] fix(README): fix link (#4789) --- npm/rome/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/rome/README.md b/npm/rome/README.md index 0d1a4008781..2954f4888ef 100644 --- a/npm/rome/README.md +++ b/npm/rome/README.md @@ -1,9 +1,9 @@ > [!IMPORTANT] -> Welcome to [Biome]([https://github.com/biomejs/biome](https://biomejs.dev/blog/annoucing-biome)), the community successor of Rome Tools! +> Welcome to [Biome](https://github.com/biomejs/biome](https://biomejs.dev/blog/annoucing-biome), the community successor of Rome Tools! > [!WARNING] -> Rome Tools is no longer maintained. +> As such, Rome Tools is no longer maintained.

From 392d188a49d70e495f13b1bb08cd7d9c43690f9b Mon Sep 17 00:00:00 2001 From: Victorien Elvinger Date: Tue, 29 Aug 2023 16:44:32 +0200 Subject: [PATCH 6/6] docs: improve warning notice (#4790) --- npm/rome/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/npm/rome/README.md b/npm/rome/README.md index 2954f4888ef..0be7399920a 100644 --- a/npm/rome/README.md +++ b/npm/rome/README.md @@ -1,9 +1,9 @@ > [!IMPORTANT] -> Welcome to [Biome](https://github.com/biomejs/biome](https://biomejs.dev/blog/annoucing-biome), the community successor of Rome Tools! +> # Welcome to [Biome](https://biomejs.dev/blog/annoucing-biome), the community successor of Rome! > [!WARNING] -> As such, Rome Tools is no longer maintained. +> # Rome won't be maintained anymore by the same people that maintained it so far. Biome will provide new features and fixes.