mirror of
https://github.com/nushell/nushell.git
synced 2025-04-29 07:34:28 +02:00
Closes #13972 # Description First commit: a hotfix concerning my last PR #15544! I had a ``unwrap_or_default`` that resulted in all years before ~1800 being considered as "now", because the ``num_nanoseconds()`` overflowed. Cc @fdncred Second: about #13972 Negative years are not allowed with RFC 2822 formatting, so I fallback RTC 3339 in such cases. If you want you might Rebase and Merge, and not squash. # User-Facing Changes On master 🔴 : ```nu ~> {year: 1900} | into datetime Mon, 1 Jan 1900 00:00:00 +0200 (125 years ago) # OK ~> {year: 1000} | into datetime Wed, 1 Jan 1000 00:00:00 +0200 (now) # NOT OK: now? ~> {year: -1000} | into datetime -1000-01-01T00:00:00+02:00 (now) # NOT OK: now? ~> {year: -1000} | into datetime | format date Error: × Main thread panicked. ├─▶ at C:\Users\RIL1RT\.cargo\registry\src\index.crates.io-6f17d22bba15001f\chrono-0.4.39\src\datetime\mod.rs:626:14 ╰─▶ writing rfc2822 datetime to string should never fail: Error help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace. # NOT OK: panics ``` On this branch 🟢 : ```nu ~> {year: 1900} | into datetime Mon, 1 Jan 1900 00:00:00 +0200 (in 125 years) ~> {year: 1000} | into datetime Wed, 1 Jan 1000 00:00:00 +0200 (1025 years ago) ~> {year: -1000} | into datetime -1000-01-01T00:00:00+02:00 (3025 years ago) ~> {year: -1000} | into datetime | format date -1000-01-01T00:00:00+02:00 ~> '3000 years ago' | date from-human | format date -0975-04-11T18:18:24.301641100+02:00 ``` # Tests + Formatting # After Submitting Nothing required IMO |
||
---|---|---|
.. | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_nu_example | ||
nu_plugin_polars | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stress_internals | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-cmd-plugin | ||
nu-color-config | ||
nu-command | ||
nu-derive-value | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-plugin-core | ||
nu-plugin-engine | ||
nu-plugin-protocol | ||
nu-plugin-test-support | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
nuon | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.