nushell/crates/nu-protocol/src
Bahex 4ac4f71a37
feat(overlay): expose constants with overlay use (#15081)
# Description

`overlay use` now imports constants exported from modules, just like
`use`.

```nushell
# foo.nu
export const a = 1
export const b = 2
```

- `overlay use foo.nu` being equivalent to `use foo.nu *` and exposing
constants `$a = 1` and `$b = 2`
- `overlay use foo.nu -p` being equivalent to `use foo.nu` and exposing
the constant `$foo = {a: 1, b: 2}`

# User-Facing Changes

`overlay use` now imports constants just like `use`.

# Tests + Formatting

- 🟢 toolkit fmt
- 🟢 toolkit clippy
- 🟢 toolkit test
- 🟢 toolkit test stdlib

# After Submitting
N/A
2025-02-13 18:55:03 +08:00
..
ast Rework operator type errors (#14429) 2025-02-12 20:03:40 -08:00
config Improve and fix filesize formatting/display (#14397) 2025-01-22 22:24:51 -08:00
debugger Custom command attributes (#14906) 2025-02-11 06:34:51 -06:00
engine feat(overlay): expose constants with overlay use (#15081) 2025-02-13 18:55:03 +08:00
errors Rework operator type errors (#14429) 2025-02-12 20:03:40 -08:00
ir fix: clippy warning of rust 1.8.4 (#14984) 2025-02-02 07:56:54 -06:00
pipeline check signals while printing values (#14980) 2025-02-07 06:56:07 -05:00
plugin Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
process Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
value Rework operator type errors (#14429) 2025-02-12 20:03:40 -08:00
alias.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
did_you_mean.rs Improve case insensitivity consistency (#10884) 2023-11-08 23:58:54 +01:00
eval_base.rs Rework operator type errors (#14429) 2025-02-12 20:03:40 -08:00
eval_const.rs Refactor I/O Errors (#14927) 2025-01-28 16:03:31 -06:00
example.rs Overhaul the plugin cache file with a new msgpack+brotli format (#12579) 2024-04-21 07:36:26 -05:00
id.rs Make SpanId and RegId also use new ID struct (#13963) 2024-10-01 13:23:27 +02:00
lev_distance.rs Rework for new clippy lints (#12736) 2024-05-02 19:29:03 +02:00
lib.rs Start to Add WASM Support Again (#14418) 2024-11-30 07:57:11 -06:00
module.rs refactor(parser): use var_id for most constants in ResolvedImportPattern (#14920) 2025-01-26 15:43:34 +02:00
parser_path.rs Replace raw usize IDs with new types (#13832) 2024-09-30 13:20:15 +02:00
signature.rs Custom command attributes (#14906) 2025-02-11 06:34:51 -06:00
span.rs Fix cargo doc Warnings (#14948) 2025-01-28 18:09:53 -06:00
syntax_shape.rs Remove unsued types (#14916) 2025-01-26 12:30:58 +08:00
ty.rs Fix cargo doc Warnings (#14948) 2025-01-28 18:09:53 -06:00