Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add unstable field #14

Merged
merged 4 commits into from
Oct 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ pub struct ConfigFileJson {
pub workspace: bool,
#[serde(default)]
pub members: Vec<String>,
#[serde(default)]
pub unstable: Vec<String>,
}

#[derive(Clone, Debug)]
Expand Down Expand Up @@ -1145,7 +1147,8 @@ mod tests {
"tasks": {
"build": "deno run --allow-read --allow-write build.ts",
"server": "deno run --allow-net --allow-read server.ts"
}
},
"unstable": ["kv", "ffi"]
}"#;
let config_dir = Url::parse("file:///deno/").unwrap();
let config_specifier = config_dir.join("tsconfig.json").unwrap();
Expand Down Expand Up @@ -1206,6 +1209,11 @@ mod tests {
tasks_config["server"],
"deno run --allow-net --allow-read server.ts"
);

assert_eq!(
config_file.json.unstable,
vec!["kv".to_string(), "ffi".to_string()],
)
}

/// if either "include" or "exclude" is specified, "files" is ignored
Expand Down