Closes #ISSUE This PR is rather a nice to have change than anything critical, so review priority should remain low. Switch to using `semver::Version` for representing node binary and npm package versions. This is in an effort to root out implicit behavior and improve type safety when interacting with the `node_runtime` crate by catching invalid versions where they appear. Currently Zed may implicitly assume the current version is correct, or always install the newest version when a invalid version is passed. `semver::Version` also doesn't require the heap, which is probably more of a fun fact than anything useful. `npm_install_packages` still takes versions as a `&str`, because `latest` can be used to fetch the latest version on npm. This could likely be made into an enum as well, but would make the PR even larger. I tested changes with some node based language servers and external agents, which all worked fine. It would be nice to have some e2e tests for node. To be safe I'd put it on nightly after a Wednesday release. Release Notes: - N/A *or* Added/Fixed/Improved ...
113 lines
3.2 KiB
TOML
113 lines
3.2 KiB
TOML
[package]
|
|
name = "languages"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
test-support = [
|
|
"load-grammars"
|
|
]
|
|
load-grammars = [
|
|
"tree-sitter",
|
|
"tree-sitter-bash",
|
|
"tree-sitter-c",
|
|
"tree-sitter-cpp",
|
|
"tree-sitter-css",
|
|
"tree-sitter-diff",
|
|
"tree-sitter-gitcommit",
|
|
"tree-sitter-go",
|
|
"tree-sitter-go-mod",
|
|
"tree-sitter-gowork",
|
|
"tree-sitter-jsdoc",
|
|
"tree-sitter-json",
|
|
"tree-sitter-md",
|
|
"tree-sitter-python",
|
|
"tree-sitter-regex",
|
|
"tree-sitter-rust",
|
|
"tree-sitter-typescript",
|
|
"tree-sitter-yaml",
|
|
]
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
async-compression.workspace = true
|
|
async-fs.workspace = true
|
|
async-tar.workspace = true
|
|
async-trait.workspace = true
|
|
chrono.workspace = true
|
|
collections.workspace = true
|
|
futures.workspace = true
|
|
globset.workspace = true
|
|
gpui.workspace = true
|
|
http_client.workspace = true
|
|
itertools.workspace = true
|
|
json_schema_store.workspace = true
|
|
language.workspace = true
|
|
log.workspace = true
|
|
lsp.workspace = true
|
|
node_runtime.workspace = true
|
|
parking_lot.workspace = true
|
|
pet-conda.workspace = true
|
|
pet-core.workspace = true
|
|
pet-fs.workspace = true
|
|
pet-poetry.workspace = true
|
|
pet-reporter.workspace = true
|
|
pet-virtualenv.workspace = true
|
|
pet.workspace = true
|
|
project.workspace = true
|
|
regex.workspace = true
|
|
rope.workspace = true
|
|
rust-embed.workspace = true
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
serde_json_lenient.workspace = true
|
|
settings.workspace = true
|
|
smallvec.workspace = true
|
|
semver.workspace = true
|
|
smol.workspace = true
|
|
snippet.workspace = true
|
|
task.workspace = true
|
|
terminal.workspace = true
|
|
theme.workspace = true
|
|
toml.workspace = true
|
|
tree-sitter = { workspace = true, optional = true }
|
|
tree-sitter-bash = { workspace = true, optional = true }
|
|
tree-sitter-c = { workspace = true, optional = true }
|
|
tree-sitter-cpp = { workspace = true, optional = true }
|
|
tree-sitter-css = { workspace = true, optional = true }
|
|
tree-sitter-diff = { workspace = true, optional = true }
|
|
tree-sitter-gitcommit = { workspace = true, optional = true }
|
|
tree-sitter-go = { workspace = true, optional = true }
|
|
tree-sitter-go-mod = { workspace = true, optional = true }
|
|
tree-sitter-gowork = { workspace = true, optional = true }
|
|
tree-sitter-jsdoc = { workspace = true, optional = true }
|
|
tree-sitter-json = { workspace = true, optional = true }
|
|
tree-sitter-md = { workspace = true, optional = true }
|
|
tree-sitter-python = { workspace = true, optional = true }
|
|
tree-sitter-regex = { workspace = true, optional = true }
|
|
tree-sitter-rust = { workspace = true, optional = true }
|
|
tree-sitter-typescript = { workspace = true, optional = true }
|
|
tree-sitter-yaml = { workspace = true, optional = true }
|
|
url.workspace = true
|
|
util.workspace = true
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions.workspace = true
|
|
text.workspace = true
|
|
theme = { workspace = true, features = ["test-support"] }
|
|
tree-sitter-bash.workspace = true
|
|
tree-sitter-c.workspace = true
|
|
tree-sitter-cpp.workspace = true
|
|
tree-sitter-css.workspace = true
|
|
tree-sitter-go.workspace = true
|
|
tree-sitter-python.workspace = true
|
|
tree-sitter-typescript.workspace = true
|
|
tree-sitter.workspace = true
|
|
unindent.workspace = true
|
|
workspace = { workspace = true, features = ["test-support"] }
|