-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a83d8b
commit 7ce5c34
Showing
410 changed files
with
150 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/target | ||
/Cargo.lock | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"deno.enable": true, | ||
"deno.enablePaths": [ | ||
"./crates/rome_fmt/test_deno" | ||
"./crates/biome_fmt/test_deno" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,21 @@ resolver = "2" | |
|
||
[workspace.package] | ||
authors = ["magic-akari <[email protected]>"] | ||
description = "JavaScript/TypeScript formatter powered by wasm ported from Rome" | ||
description = "JavaScript/TypeScript formatter powered by wasm ported from Biome" | ||
edition = "2021" | ||
homepage = "https://github.com/wasm-fmt/rome_fmt" | ||
homepage = "https://github.com/wasm-fmt/biome_fmt" | ||
keywords = [ | ||
"wasm", | ||
"JavaScript", | ||
"TypeScript", | ||
"JSX", | ||
"TSX", | ||
"formatter", | ||
"Rome", | ||
"Biome", | ||
] | ||
license = "MIT" | ||
readme = "README.md" | ||
repository = "https://github.com/wasm-fmt/rome_fmt" | ||
repository = "https://github.com/wasm-fmt/biome_fmt" | ||
version = "0.0.2" | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import init from "./biome_fmt.js"; | ||
import wasm from "./biome_fmt_bg.wasm?url"; | ||
|
||
export default function __wbg_init(input = wasm) { | ||
return init(input); | ||
} | ||
|
||
export * from "./biome_fmt.js"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
cd $(dirname $0)/.. | ||
crates_dir=$(pwd) | ||
|
||
cd ../.. | ||
wasm-pack build --target=web --scope=wasm-fmt crates/biome_fmt | ||
cp README.md LICENSE crates/biome_fmt/pkg/ | ||
|
||
cd $crates_dir | ||
# backup biome_fmt.js | ||
cp ./pkg/biome_fmt.js ./pkg/biome_fmt.js.bak | ||
|
||
git apply ./patch/biome_fmt.patch | ||
|
||
cp -R ./extra/. ./pkg/ | ||
|
||
./scripts/package.mjs ./pkg/package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
crates/biome_fmt/test_data/specs/js/module/expression/binary_range_expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 + 2 + <<<ROME_RANGE_START>>>3 + 4<<<ROME_RANGE_END>>> + 5 |
1 change: 1 addition & 0 deletions
1
crates/biome_fmt/test_data/specs/js/module/expression/binary_range_expression.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 + 2 + <<<ROME_RANGE_START>>>3 + 4<<<ROME_RANGE_END>>> + 5 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
crates/biome_fmt/test_data/specs/js/module/indent-width/example-1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function foo() { | ||
return ["1234567890", "1234567890", "1234567890", "1234567890", "1234567890"]; | ||
} |
3 changes: 3 additions & 0 deletions
3
crates/biome_fmt/test_data/specs/js/module/indent-width/example-1.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function foo() { | ||
return ["1234567890", "1234567890", "1234567890", "1234567890", "1234567890"]; | ||
} |
17 changes: 17 additions & 0 deletions
17
crates/biome_fmt/test_data/specs/js/module/indent-width/example-2.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
return ["long", "long", "long", "long", "long"]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
crates/biome_fmt/test_data/specs/js/module/indent-width/example-2.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
function foo() { | ||
function bar() { | ||
return ["long", "long", "long", "long", "long"]; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
crates/biome_fmt/test_data/specs/js/module/no-semi/semicolons_range.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
statement_1() | ||
<<<ROME_RANGE_START>>>statement_2()<<<ROME_RANGE_END>>> | ||
statement_3() |
4 changes: 4 additions & 0 deletions
4
crates/biome_fmt/test_data/specs/js/module/no-semi/semicolons_range.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
statement_1() << | ||
<ROME_RANGE_START>>>statement_2()<<<ROME_RANGE_END>>> | ||
statement_3() | ||
; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions
1
crates/biome_fmt/test_data/specs/js/module/parentheses/range_parentheses_binary.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import React from 'react'; function test() { const AppShelled = () => <<<ROME_RANGE_START>>>(1 + 2)<<<ROME_RANGE_END>>> } function one() {return 1} |
2 changes: 2 additions & 0 deletions
2
crates/biome_fmt/test_data/specs/js/module/parentheses/range_parentheses_binary.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import React from "react"; | ||
function test() { const AppShelled = () => <<<ROME_RANGE_START>>>(1 + 2)<<<ROME_RANGE_END>>> } function one() {return 1} |
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
crates/biome_fmt/test_data/specs/js/module/range/range_parenthesis_after_semicol.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
a?.b | ||
const a = () => {sdasdsa; | ||
kek; | ||
dsad<<<ROME_RANGE_START>>>sa; | ||
123; | ||
("y̆es"); | ||
}; | ||
console.log("🚀".length); | ||
<<<ROME_RANGE_END>>> | ||
("Jan 1, 2018 – Jan 1, 2019"); |
10 changes: 10 additions & 0 deletions
10
crates/biome_fmt/test_data/specs/js/module/range/range_parenthesis_after_semicol.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
a?.b; | ||
const a = () => {sdasdsa; | ||
kek; | ||
dsad<<<ROME_RANGE_START>>>sa; | ||
123; | ||
("y̆es"); | ||
}; | ||
console.log("🚀".length); | ||
<<<ROME_RANGE_END>>> | ||
("Jan 1, 2018 – Jan 1, 2019"); |
8 changes: 8 additions & 0 deletions
8
crates/biome_fmt/test_data/specs/js/module/range/range_parenthesis_after_semicol_1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
a?.b | ||
const a = () => {sdasdsa; | ||
kek; | ||
dsad<<<ROME_RANGE_START>>>sa; | ||
123; | ||
("y̆es"); | ||
}; | ||
console.log("🚀".length);<<<ROME_RANGE_END>>>("Jan 1, 2018 – Jan 1, 2019"); |
8 changes: 8 additions & 0 deletions
8
crates/biome_fmt/test_data/specs/js/module/range/range_parenthesis_after_semicol_1.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
a?.b; | ||
const a = () => {sdasdsa; | ||
kek; | ||
dsad<<<ROME_RANGE_START>>>sa; | ||
123; | ||
("y̆es"); | ||
}; | ||
console.log("🚀".length);<<<ROME_RANGE_END>>>("Jan 1, 2018 – Jan 1, 2019"); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import React from 'react'; function test() { const AppShelled = () => <<<ROME_RANGE_START>>>(<Component />)<<<ROME_RANGE_END>>> } function lol() {return 1} |
2 changes: 2 additions & 0 deletions
2
crates/biome_fmt/test_data/specs/jsx/parentheses_range.jsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import React from "react"; | ||
function test() { const AppShelled = () => <<<ROME_RANGE_START>>>(<Component />)<<<ROME_RANGE_END>>> } function lol() {return 1} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.