1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00

feat(unstable): remove --unstable-workspaces flag (#21891)

The workspaces feature is still considered unstable and can change.
Requiring this flag hinders DX.
This commit is contained in:
Bartek Iwańczuk 2024-01-14 22:58:06 +01:00 committed by GitHub
parent fc17ddbcc4
commit a918804ee0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 23 deletions

View file

@ -902,7 +902,6 @@ pub fn flags_from_vec(args: Vec<String>) -> clap::error::Result<Flags> {
matches.get_flag("unstable-bare-node-builtins");
flags.unstable_byonm = matches.get_flag("unstable-byonm");
flags.unstable_sloppy_imports = matches.get_flag("unstable-sloppy-imports");
flags.unstable_workspaces = matches.get_flag("unstable-workspaces");
if matches.get_flag("quiet") {
flags.log_level = Some(Level::Error);
@ -1030,15 +1029,6 @@ fn clap_root() -> Command {
.value_parser(FalseyValueParser::new())
.action(ArgAction::SetTrue)
.global(true),
)
.arg(
Arg::new("unstable-workspaces")
.long("unstable-workspaces")
.help("Enable unstable 'workspaces' feature")
.env("DENO_UNSTABLE_WORKSPACES")
.value_parser(FalseyValueParser::new())
.action(ArgAction::SetTrue)
.global(true),
);
for (flag_name, help, _) in crate::UNSTABLE_GRANULAR_FLAGS {

View file

@ -707,14 +707,6 @@ impl CliOptions {
None
};
// TODO(bartlomieju): remove in v1.39 or v1.40.
if let Some(wsconfig) = &maybe_workspace_config {
if !wsconfig.members.is_empty() && !flags.unstable_workspaces {
eprintln!("Use of unstable 'workspaces' feature. The --unstable-workspaces flags must be provided.");
std::process::exit(70);
}
}
if let Some(env_file_name) = &flags.env_file {
if (from_filename(env_file_name)).is_err() {
bail!("Unable to load '{env_file_name}' environment variable file")

View file

@ -72,7 +72,7 @@ itest!(successful {
});
itest!(workspace_all {
args: "publish --unstable-workspaces --token 'sadfasdf'",
args: "publish --token 'sadfasdf'",
output: "publish/workspace.out",
cwd: Some("publish/workspace"),
copy_temp_dir: Some("publish/workspace"),
@ -82,7 +82,7 @@ itest!(workspace_all {
});
itest!(workspace_individual {
args: "publish --unstable-workspaces --token 'sadfasdf'",
args: "publish --token 'sadfasdf'",
output: "publish/workspace_individual.out",
cwd: Some("publish/workspace/bar"),
copy_temp_dir: Some("publish/workspace"),

View file

@ -4804,7 +4804,7 @@ itest!(explicit_resource_management {
});
itest!(workspaces_basic {
args: "run -L debug -A --unstable-workspaces main.ts",
args: "run -L debug -A main.ts",
output: "run/workspaces/basic/main.out",
cwd: Some("run/workspaces/basic/"),
copy_temp_dir: Some("run/workspaces/basic/"),
@ -4813,7 +4813,7 @@ itest!(workspaces_basic {
});
itest!(workspaces_member_outside_root_dir {
args: "run -A --unstable-workspaces main.ts",
args: "run -A main.ts",
output: "run/workspaces/member_outside_root_dir/main.out",
cwd: Some("run/workspaces/member_outside_root_dir/"),
copy_temp_dir: Some("run/workspaces/member_outside_root_dir/"),
@ -4823,7 +4823,7 @@ itest!(workspaces_member_outside_root_dir {
});
itest!(workspaces_nested_member {
args: "run -A --unstable-workspaces main.ts",
args: "run -A main.ts",
output: "run/workspaces/nested_member/main.out",
cwd: Some("run/workspaces/nested_member/"),
copy_temp_dir: Some("run/workspaces/nested_member/"),