Skip to content

Commit 158c6fe

Browse files
committed
Fix up
1 parent 1bc07f7 commit 158c6fe

File tree

2 files changed

+150
-5
lines changed

2 files changed

+150
-5
lines changed

crates/turborepo-lib/src/query/file.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,10 @@ impl File {
255255
.packages()
256256
.map(|(name, _)| Package::new(self.run.clone(), name.clone()))
257257
.collect::<Result<Vec<_>, Error>>()?;
258-
258+
259259
packages.sort_by(|a, b| a.get_name().cmp(b.get_name()));
260260
Ok(Array::from(packages))
261-
},
261+
}
262262
Ok(Some(PackageMapping::Package(package))) => {
263263
let node: PackageNode = PackageNode::Workspace(package.get_name().clone());
264264
let mut ancestors = self

crates/turborepo/tests/snapshots/query__basic_monorepo_get_schema_([email protected]).snap

+148-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,49 @@ expression: query_output
1111
"mutationType": null,
1212
"subscriptionType": null,
1313
"types": [
14+
{
15+
"kind": "OBJECT",
16+
"name": "All",
17+
"description": null,
18+
"fields": [
19+
{
20+
"name": "reason",
21+
"description": null,
22+
"args": [],
23+
"type": {
24+
"kind": "NON_NULL",
25+
"name": null,
26+
"ofType": {
27+
"kind": "UNION",
28+
"name": "PackageChangeReason",
29+
"ofType": null
30+
}
31+
},
32+
"isDeprecated": false,
33+
"deprecationReason": null
34+
},
35+
{
36+
"name": "count",
37+
"description": null,
38+
"args": [],
39+
"type": {
40+
"kind": "NON_NULL",
41+
"name": null,
42+
"ofType": {
43+
"kind": "SCALAR",
44+
"name": "Int",
45+
"ofType": null
46+
}
47+
},
48+
"isDeprecated": false,
49+
"deprecationReason": null
50+
}
51+
],
52+
"inputFields": null,
53+
"interfaces": [],
54+
"enumValues": null,
55+
"possibleTypes": null
56+
},
1457
{
1558
"kind": "SCALAR",
1659
"name": "Boolean",
@@ -725,6 +768,18 @@ expression: query_output
725768
"name": "path",
726769
"description": null,
727770
"args": [],
771+
"type": {
772+
"kind": "SCALAR",
773+
"name": "String",
774+
"ofType": null
775+
},
776+
"isDeprecated": false,
777+
"deprecationReason": null
778+
},
779+
{
780+
"name": "absolutePath",
781+
"description": null,
782+
"args": [],
728783
"type": {
729784
"kind": "NON_NULL",
730785
"name": null,
@@ -738,15 +793,27 @@ expression: query_output
738793
"deprecationReason": null
739794
},
740795
{
741-
"name": "absolutePath",
796+
"name": "package",
742797
"description": null,
743798
"args": [],
799+
"type": {
800+
"kind": "UNION",
801+
"name": "PackageMapping",
802+
"ofType": null
803+
},
804+
"isDeprecated": false,
805+
"deprecationReason": null
806+
},
807+
{
808+
"name": "affectedPackages",
809+
"description": "Gets the affected packages for the file, i.e. all packages that depend\non the file.",
810+
"args": [],
744811
"type": {
745812
"kind": "NON_NULL",
746813
"name": null,
747814
"ofType": {
748-
"kind": "SCALAR",
749-
"name": "String",
815+
"kind": "OBJECT",
816+
"name": "Packages",
750817
"ofType": null
751818
}
752819
},
@@ -1619,6 +1686,27 @@ expression: query_output
16191686
"enumValues": null,
16201687
"possibleTypes": null
16211688
},
1689+
{
1690+
"kind": "UNION",
1691+
"name": "PackageMapping",
1692+
"description": null,
1693+
"fields": null,
1694+
"inputFields": null,
1695+
"interfaces": null,
1696+
"enumValues": null,
1697+
"possibleTypes": [
1698+
{
1699+
"kind": "OBJECT",
1700+
"name": "All",
1701+
"ofType": null
1702+
},
1703+
{
1704+
"kind": "OBJECT",
1705+
"name": "Package",
1706+
"ofType": null
1707+
}
1708+
]
1709+
},
16221710
{
16231711
"kind": "INPUT_OBJECT",
16241712
"name": "PackagePredicate",
@@ -1960,6 +2048,63 @@ expression: query_output
19602048
"isDeprecated": false,
19612049
"deprecationReason": null
19622050
},
2051+
{
2052+
"name": "affectedFiles",
2053+
"description": "Get the files that have changed between the `base` and `head` commits.\n\n# Arguments\n\n* `base`: Defaults to `main` or `master`\n* `head`: Defaults to `HEAD`\n* `include_uncommitted`: Defaults to `true` if `head` is not provided\n* `allow_unknown_objects`: Defaults to `false`\n* `merge_base`: Defaults to `true`\n\nreturns: Result<Array<File>, Error>",
2054+
"args": [
2055+
{
2056+
"name": "base",
2057+
"description": null,
2058+
"type": {
2059+
"kind": "SCALAR",
2060+
"name": "String",
2061+
"ofType": null
2062+
},
2063+
"defaultValue": null
2064+
},
2065+
{
2066+
"name": "head",
2067+
"description": null,
2068+
"type": {
2069+
"kind": "SCALAR",
2070+
"name": "String",
2071+
"ofType": null
2072+
},
2073+
"defaultValue": null
2074+
},
2075+
{
2076+
"name": "includeUncommitted",
2077+
"description": null,
2078+
"type": {
2079+
"kind": "SCALAR",
2080+
"name": "Boolean",
2081+
"ofType": null
2082+
},
2083+
"defaultValue": null
2084+
},
2085+
{
2086+
"name": "mergeBase",
2087+
"description": null,
2088+
"type": {
2089+
"kind": "SCALAR",
2090+
"name": "Boolean",
2091+
"ofType": null
2092+
},
2093+
"defaultValue": null
2094+
}
2095+
],
2096+
"type": {
2097+
"kind": "NON_NULL",
2098+
"name": null,
2099+
"ofType": {
2100+
"kind": "OBJECT",
2101+
"name": "Files",
2102+
"ofType": null
2103+
}
2104+
},
2105+
"isDeprecated": false,
2106+
"deprecationReason": null
2107+
},
19632108
{
19642109
"name": "packages",
19652110
"description": "Gets a list of packages that match the given filter",

0 commit comments

Comments
 (0)