Skip to content

Commit

Permalink
Run taplo format and check consistency in CI (vercel#2866)
Browse files Browse the repository at this point in the history
* Add GitHub action step for taplo --check

* Run taplo format
  • Loading branch information
wbinnssmith authored Dec 1, 2022
1 parent 3ea7fe9 commit 18c9fc2
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 64 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ jobs:
fi
fi
- name: Check Cargo.toml formatting (taplo)
run: npx @taplo/cli format --check

- name: Check licenses
uses: EmbarkStudios/cargo-deny-action@v1
with:
Expand Down
1 change: 0 additions & 1 deletion .taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ keys = ["dependencies", "*-dependencies"]

[rule.formatting]
reorder_keys = true
align_entries = true
indent_tables = true
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ opt-level = 3
# This version pin is workaround for https://github.com/tkaitchuck/aHash/issues/95
indexmap = { version = "=1.6.2" }
swc_core = { version = "0.43.23" }
testing = {version = "0.31.14"}
testing = { version = "0.31.14" }
swc_emotion = { version = "0.28.1" }
styled_jsx = { version = "0.29.1" }
styled_components = { version = "0.52.1" }
Expand Down
65 changes: 20 additions & 45 deletions crates/next-binding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ bench = false

[features]
__swc = []
__swc_core = [
"__swc",
]
__swc_core = ["__swc"]
__swc_core_next_core = [
"__swc_core",
"swc_core/common_concurrent",
Expand All @@ -29,7 +27,7 @@ __swc_core_next_core = [
"swc_core/ecma_parser",
"swc_core/ecma_parser_typescript",
"swc_core/cached",
"swc_core/base"
"swc_core/base",
]

__swc_core_binding_napi = [
Expand All @@ -54,9 +52,7 @@ __swc_core_binding_napi = [
"swc_core/ecma_utils",
"swc_core/ecma_visit",
]
__swc_core_binding_napi_plugin = [
"swc_core/plugin_transform_host_native"
]
__swc_core_binding_napi_plugin = ["swc_core/plugin_transform_host_native"]

__swc_core_binding_wasm = [
"__swc_core",
Expand All @@ -71,62 +67,41 @@ __swc_core_binding_wasm = [
"swc_core/ecma_parser",
"swc_core/ecma_parser_typescript",
"swc_core/ecma_utils",
"swc_core/ecma_visit"
]
__swc_core_binding_wasm_plugin = [
"swc_core/plugin_transform_host_js"
"swc_core/ecma_visit",
]
__swc_core_binding_wasm_plugin = ["swc_core/plugin_transform_host_js"]

__swc_core_testing_transform = [
"swc_core/testing_transform"
]
__swc_core_testing_transform = ["swc_core/testing_transform"]

__turbo = []
__feature_next_dev_server = [
"__turbo",
"next-dev/serializable"
]
__feature_node_file_trace = [
"__turbo",
"node-file-trace/node-api"
]
__feature_next_dev_server = ["__turbo", "next-dev/serializable"]
__feature_node_file_trace = ["__turbo", "node-file-trace/node-api"]

__features = []
__feature_mdx_rs = [ "__features", "mdxjs/serializable"]
__feature_mdx_rs = ["__features", "mdxjs/serializable"]

__swc_custom_transform = []
__swc_transform_styled_components = [
"__swc",
"__swc_custom_transform",
"styled_components"
]
__swc_transform_styled_jsx = [
"__swc",
"__swc_custom_transform",
"styled_jsx"
]
__swc_transform_emotion = [
"__swc",
"__swc_custom_transform",
"swc_emotion"
"styled_components",
]
__swc_transform_styled_jsx = ["__swc", "__swc_custom_transform", "styled_jsx"]
__swc_transform_emotion = ["__swc", "__swc_custom_transform", "swc_emotion"]
__swc_transform_modularize_imports = [
"__swc",
"__swc_custom_transform",
"modularize_imports"
]
__swc_testing = [
"__swc",
"testing"
"modularize_imports",
]
__swc_testing = ["__swc", "testing"]

[dependencies]
swc_core = { optional = true, workspace = true }
mdxjs = { optional = true, workspace = true }
modularize_imports = { optional = true, workspace = true }
next-dev = { optional = true, workspace = true }
node-file-trace = { optional = true, workspace = true }
styled_components = { optional = true,workspace = true }
styled_jsx = { optional = true,workspace = true}
swc_emotion = { optional = true,workspace = true}
testing = {optional = true, workspace = true}
modularize_imports = { optional = true,workspace = true}
styled_components = { optional = true, workspace = true }
styled_jsx = { optional = true, workspace = true }
swc_core = { optional = true, workspace = true }
swc_emotion = { optional = true, workspace = true }
testing = { optional = true, workspace = true }
5 changes: 4 additions & 1 deletion crates/next-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,7 @@ nix = "0.25.0"

[build-dependencies]
turbo-tasks-build = { path = "../turbo-tasks-build" }
vergen = { version = "7.3.2", default-features = false, features = ["cargo", "build"] }
vergen = { version = "7.3.2", default-features = false, features = [
"cargo",
"build",
] }
6 changes: 3 additions & 3 deletions crates/turbo-tasks-build/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ serde = "1.0.136"
toml = "0.5"
turbo-tasks-macros-shared = { path = "../turbo-tasks-macros-shared" }

[dependencies.syn]
features = ["full"]
version = "1.0"
[dependencies.syn]
features = ["full"]
version = "1.0"
6 changes: 3 additions & 3 deletions crates/turbo-tasks-macros-shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ proc-macro-error = "1.0.4"
proc-macro2 = "1.0.36"
quote = "1.0"

[dependencies.syn]
features = ["full"]
version = "1.0"
[dependencies.syn]
features = ["full"]
version = "1.0"
6 changes: 3 additions & 3 deletions crates/turbo-tasks-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ proc-macro2 = "1.0.36"
quote = "1.0"
turbo-tasks-macros-shared = { path = "../turbo-tasks-macros-shared" }

[dependencies.syn]
features = ["full", "extra-traits"]
version = "1.0"
[dependencies.syn]
features = ["full", "extra-traits"]
version = "1.0"
10 changes: 5 additions & 5 deletions crates/turbopack-ecmascript/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ regex = "1.5.4"
serde = "1.0.136"
serde_json = "1.0.85"
serde_regex = "1.1.0"
styled_components = {workspace = true }
styled_jsx = {workspace = true}
swc_emotion = {workspace = true}
styled_components = { workspace = true }
styled_jsx = { workspace = true }
swc_emotion = { workspace = true }
tokio = "1.21.2"
tracing = "0.1.37"
turbo-tasks = { path = "../turbo-tasks" }
Expand Down Expand Up @@ -55,8 +55,8 @@ swc_core = { workspace = true, features = [
"base",
] }

[dependencies.num-bigint]
version = "0.4"
[dependencies.num-bigint]
version = "0.4"

[dev-dependencies]
criterion = { version = "0.3.5", features = ["async_tokio"] }
Expand Down
4 changes: 2 additions & 2 deletions crates/turbopack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ swc_core = { workspace = true, features = [
"ecma_visit",
] }

[dependencies.num-bigint]
version = "0.4"
[dependencies.num-bigint]
version = "0.4"

[dev-dependencies]
criterion = { version = "0.3.5", features = ["async_tokio"] }
Expand Down

0 comments on commit 18c9fc2

Please sign in to comment.