Skip to content

Commit 208ffdc

Browse files
authored
Move some from xxx commands to plugin (#7942)
# Description From nushell 0.8 philosophy: https://github.com/nushell/nushell.github.io/blob/main/contributor-book/philosophy_0_80.md#core-categories > The following categories should be moved to plugins: Uncommon format support So this pr is trying to move following commands to plugin: - [X] from eml - [x] from ics - [x] from ini - [x] from vcf And we can have a new plugin handles for these formatting, currently it's implemented here: https://github.com/WindSoilder/nu_plugin_format The command usage should be the same to original command. If it's ok, the plugin can support more formats like [parquet](https://github.com/fdncred/nu_plugin_from_parquet), or [EDN format](#6415), or something else. Just create a draft pr to show what's the blueprint looks like, and is it a good direction to move forward? # User-Facing Changes _(List of all changes that impact the user experience here. This helps us keep track of breaking changes.)_ # Tests + Formatting Don't forget to add tests that cover your changes. Make sure you've run and fixed any issues with these commands: - `cargo fmt --all -- --check` to check standard code formatting (`cargo fmt --all` applies these changes) - `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used -A clippy::needless_collect` to check that you're using the standard code style - `cargo test --workspace` to check that all tests pass # After Submitting If your PR had any user-facing changes, update [the documentation](https://github.com/nushell/nushell.github.io) after the PR is merged, if necessary. This will help us keep the docs up to date.
1 parent 4468dc8 commit 208ffdc

32 files changed

Lines changed: 734 additions & 828 deletions

File tree

Cargo.lock

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ members = [
3535
"crates/nu_plugin_example",
3636
"crates/nu_plugin_query",
3737
"crates/nu_plugin_custom_values",
38+
"crates/nu_plugin_formats",
3839
"crates/nu-utils",
3940
]
4041

build-all.nu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let plugins = [
1212
nu_plugin_query,
1313
nu_plugin_example,
1414
nu_plugin_custom_values,
15+
nu_plugin_formats,
1516
]
1617

1718
for plugin in $plugins {

crates/nu-command/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ csv = "1.1.6"
4646
dialoguer = { default-features = false, version = "0.10.3" }
4747
digest = { default-features = false, version = "0.10.0" }
4848
dtparse = "1.2.0"
49-
eml-parser = "0.1.0"
5049
encoding_rs = "0.8.30"
5150
fancy-regex = "0.11.0"
5251
filesize = "0.2.0"
5352
filetime = "0.2.15"
5453
fs_extra = "1.3.0"
5554
htmlescape = "0.3.1"
56-
ical = "0.8.0"
5755
indexmap = { version = "1.7", features = ["serde-1"] }
5856
indicatif = "0.17.2"
5957
is-root = "0.1.2"

crates/nu-command/src/default_context.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,17 +328,13 @@ pub fn create_default_context() -> EngineState {
328328
bind_command! {
329329
From,
330330
FromCsv,
331-
FromEml,
332-
FromIcs,
333-
FromIni,
334331
FromJson,
335332
FromNuon,
336333
FromOds,
337334
FromSsv,
338335
FromToml,
339336
FromTsv,
340337
FromUrl,
341-
FromVcf,
342338
FromXlsx,
343339
FromXml,
344340
FromYaml,

crates/nu-command/src/formats/from/eml.rs

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)