-- in.cue --
service: [ID=string]: {
	ports: [...{
		protocol: *"TCP" | "UDP"
		extra:    3
	}]
}

service: a: {
	ports: [{
		name:     "a"
		protocol: "TCP"
		key:      "bar"
	}]
}

service: a: {
	ports: [{
		protocol: "TCP"
		key:      "bar"
	}]
}

service: a: {
	ports: [{
		extra: 3
	}]
}
-- out/trim-v3 --
== in.cue
service: [ID=string]: {
	ports: [...{
		protocol: *"TCP" | "UDP"
		extra:    3
	}]
}

service: a: {
	ports: [{
		name: "a"
		key:  "bar"
	}]
}

service: a: {
	ports: [{}]
}

service: a: {
	ports: [{}]
}
-- diff/-out/trim-v3<==>+out/trim --
diff old new
--- old
+++ new
@@ -14,9 +14,7 @@
 }
 
 service: a: {
-	ports: [{
-		key: "bar"
-	}]
+	ports: [{}]
 }
 
 service: a: {
-- out/trim-v3-noshare --
== in.cue
service: [ID=string]: {
	ports: [...{
		protocol: *"TCP" | "UDP"
		extra:    3
	}]
}

service: a: {
	ports: [{
		name: "a"
		key:  "bar"
	}]
}

service: a: {
	ports: [{}]
}

service: a: {
	ports: [{}]
}
-- diff/-out/trim-v3-noshare<==>+out/trim --
diff old new
--- old
+++ new
@@ -14,9 +14,7 @@
 }
 
 service: a: {
-	ports: [{
-		key: "bar"
-	}]
+	ports: [{}]
 }
 
 service: a: {
-- out/trim --
== in.cue
service: [ID=string]: {
	ports: [...{
		protocol: *"TCP" | "UDP"
		extra:    3
	}]
}

service: a: {
	ports: [{
		name: "a"
		key:  "bar"
	}]
}

service: a: {
	ports: [{
		key: "bar"
	}]
}

service: a: {
	ports: [{}]
}
