Skip to content

Commit

Permalink
chore(core): wip
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Jul 27, 2023
1 parent 4a2985f commit 5240483
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 64 deletions.
124 changes: 80 additions & 44 deletions packages/nx/src/hasher/__snapshots__/task-hasher.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ exports[`TaskHasher dependentTasksOutputFiles should depend on dependent tasks o
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"ProjectConfiguration": "12802727827024321009",
"TsConfig": "8767608672024750088",
"dist/libs/child/index.d.ts": "3244421341483603138",
"dist/libs/grandchild/index.d.ts": "3244421341483603138",
"parent:!{projectRoot}/**/*.spec.ts": "5565329748974231692",
"parent:!{projectRoot}/**/*.spec.ts": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "13050024388944273054",
"value": "4890307762440688977",
}
`;

Expand All @@ -26,17 +28,19 @@ exports[`TaskHasher dependentTasksOutputFiles should work with dependent tasks w
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"ProjectConfiguration": "12802727827024321009",
"TsConfig": "8767608672024750088",
"dist/libs/child/index.d.ts": "3244421341483603138",
"dist/libs/grandchild/index.d.ts": "3244421341483603138",
"parent:!{projectRoot}/**/*.spec.ts": "5565329748974231692",
"parent:!{projectRoot}/**/*.spec.ts": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "13050024388944273054",
"value": "4890307762440688977",
}
`;

Expand All @@ -46,15 +50,17 @@ exports[`TaskHasher hashTarget should hash entire subtree of dependencies 1`] =
"command": "14389236043839781668",
"implicitDeps": {},
"nodes": {
"app:{projectRoot}/**/*": "3487729839153061713",
"ProjectConfiguration": "12026883044296863450",
"TsConfig": "8767608672024750088",
"app:{projectRoot}/**/*": "3244421341483603138",
"target": "@nx/webpack:webpack",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "10939456376142768975",
"value": "11829832011053499600",
}
`;

Expand All @@ -64,15 +70,17 @@ exports[`TaskHasher hashTarget should hash executor dependencies of @nx packages
"command": "14389236043839781668",
"implicitDeps": {},
"nodes": {
"app:{projectRoot}/**/*": "3487729839153061713",
"ProjectConfiguration": "12026883044296863450",
"TsConfig": "8767608672024750088",
"app:{projectRoot}/**/*": "3244421341483603138",
"target": "@nx/webpack:webpack",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "16749739796062259876",
"value": "15096054768893599383",
}
`;

Expand All @@ -82,7 +90,9 @@ exports[`TaskHasher hashTarget should use externalDependencies to override nx:ru
"command": "14389236043839781668",
"implicitDeps": {},
"nodes": {
"app:{projectRoot}/**/*": "6954787296030520675",
"ProjectConfiguration": "17956886683554891195",
"TsConfig": "8767608672024750088",
"app:{projectRoot}/**/*": "3244421341483603138",
"env:undefined": "3244421341483603138",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
Expand All @@ -91,7 +101,7 @@ exports[`TaskHasher hashTarget should use externalDependencies to override nx:ru
},
"runtime": {},
},
"value": "10722281392353641974",
"value": "18142315317355318287",
}
`;

Expand All @@ -101,7 +111,9 @@ exports[`TaskHasher hashTarget should use externalDependencies with empty array
"command": "14389236043839781668",
"implicitDeps": {},
"nodes": {
"app:{projectRoot}/**/*": "10888929985620786238",
"ProjectConfiguration": "9179552940021403596",
"TsConfig": "8767608672024750088",
"app:{projectRoot}/**/*": "3244421341483603138",
"env:undefined": "3244421341483603138",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
Expand All @@ -110,7 +122,7 @@ exports[`TaskHasher hashTarget should use externalDependencies with empty array
},
"runtime": {},
},
"value": "9711139740831088556",
"value": "13520777692097937224",
}
`;

Expand All @@ -120,9 +132,11 @@ exports[`TaskHasher should be able to handle multiple filesets per project 1`] =
"command": "13785966310271077209",
"implicitDeps": {},
"nodes": {
"child:!{projectRoot}/**/*.spec.ts": "13192523093445129776",
"ProjectConfiguration": "17211930887387929067",
"TsConfig": "8767608672024750088",
"child:!{projectRoot}/**/*.spec.ts": "3813950410560353800",
"env:MY_TEST_HASH_ENV": "17357374746554314488",
"parent:{projectRoot}/**/*": "1629399803746755886",
"parent:{projectRoot}/**/*": "569698369810108388",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
Expand All @@ -132,7 +146,7 @@ exports[`TaskHasher should be able to handle multiple filesets per project 1`] =
},
"runtime": {},
},
"value": "12260754209046637944",
"value": "16758346080716434148",
}
`;

Expand All @@ -142,7 +156,9 @@ exports[`TaskHasher should be able to include only a part of the base tsconfig 1
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"parent:{projectRoot}/**/*": "16516751231904189589",
"ProjectConfiguration": "18166168584521190546",
"TsConfig": "4035819825874039301",
"parent:{projectRoot}/**/*": "13399504445655626779",
"runtime:echo runtime123": "runtime123",
"runtime:echo runtime456": "runtime456",
"target": "nx:run-commands",
Expand All @@ -152,7 +168,7 @@ exports[`TaskHasher should be able to include only a part of the base tsconfig 1
},
"runtime": {},
},
"value": "2948361542445522019",
"value": "15548183238662542860",
}
`;

Expand All @@ -162,21 +178,23 @@ exports[`TaskHasher should create task hash 1`] = `
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"ProjectConfiguration": "4875698716044094030",
"TsConfig": "8767608672024750088",
"env:NONEXISTENTENV": "3244421341483603138",
"env:TESTENV": "6544740722075256274",
"parent:{projectRoot}/**/*": "631071291822994098",
"parent:{projectRoot}/**/*": "13399504445655626779",
"runtime:echo runtime123": "runtime123",
"runtime:echo runtime456": "runtime456",
"tagged:{projectRoot}/**/*": "17111161286736679711",
"tagged:{projectRoot}/**/*": "3244421341483603138",
"target": "nx:run-commands",
"unrelated:{projectRoot}/**/*": "8969690012466582257",
"unrelated:{projectRoot}/**/*": "6381484071003365310",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "3344547189263615580",
"value": "4410180159531877582",
}
`;

Expand All @@ -186,15 +204,17 @@ exports[`TaskHasher should hash multiple filesets of a project 1`] = `
"command": "13785966310271077209",
"implicitDeps": {},
"nodes": {
"parent:{projectRoot}/**/*": "17414698243987989547",
"ProjectConfiguration": "10499856664466672714",
"TsConfig": "8767608672024750088",
"parent:{projectRoot}/**/*": "569698369810108388",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "16502280644049848992",
"value": "10465768507566328025",
}
`;

Expand All @@ -204,15 +224,17 @@ exports[`TaskHasher should hash multiple filesets of a project 2`] = `
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"parent:!{projectRoot}/**/*.spec.ts": "7424658468918726082",
"ProjectConfiguration": "10499856664466672714",
"TsConfig": "8767608672024750088",
"parent:!{projectRoot}/**/*.spec.ts": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "6969083987792918940",
"value": "1827051188758904427",
}
`;

Expand All @@ -222,16 +244,18 @@ exports[`TaskHasher should hash non-default filesets 1`] = `
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"child:{projectRoot}/**/*": "10025338539010063012",
"parent:!{projectRoot}/**/*.spec.ts": "5593646567034593596",
"ProjectConfiguration": "8196293273405506196",
"TsConfig": "8767608672024750088",
"child:{projectRoot}/**/*": "8855829734474504311",
"parent:!{projectRoot}/**/*.spec.ts": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "10748517083069163130",
"value": "10605127955587019522",
}
`;

Expand All @@ -241,7 +265,9 @@ exports[`TaskHasher should hash npm project versions 1`] = `
"command": "14389236043839781668",
"implicitDeps": {},
"nodes": {
"app:{projectRoot}/**/*": "6028445962839227139",
"ProjectConfiguration": "8128657069648957137",
"TsConfig": "8767608672024750088",
"app:{projectRoot}/**/*": "6315169844688361091",
"npm:react": "4468841026152585217",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
Expand All @@ -250,7 +276,7 @@ exports[`TaskHasher should hash npm project versions 1`] = `
},
"runtime": {},
},
"value": "4145517376831960669",
"value": "1622429608959939486",
}
`;

Expand All @@ -260,16 +286,18 @@ exports[`TaskHasher should hash task where the project has dependencies 1`] = `
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"child:{projectRoot}/**/*": "17112515743513902619",
"parent:{projectRoot}/**/*": "8668996094612916300",
"ProjectConfiguration": "8876282510060012181",
"TsConfig": "8767608672024750088",
"child:{projectRoot}/**/*": "8855829734474504311",
"parent:{projectRoot}/**/*": "569698369810108388",
"target": "unknown",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "9463228934259887792",
"value": "5509132994213117874",
}
`;

Expand All @@ -279,16 +307,18 @@ exports[`TaskHasher should hash tasks where the project graph has circular depen
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"child:{projectRoot}/**/*": "13387017594662756393",
"parent:{projectRoot}/**/*": "3042098164316823883",
"ProjectConfiguration": "9892649345820140726",
"TsConfig": "8767608672024750088",
"child:{projectRoot}/**/*": "3813950410560353800",
"parent:{projectRoot}/**/*": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "17851309464404299797",
"value": "17952311369570541637",
}
`;

Expand All @@ -298,16 +328,18 @@ exports[`TaskHasher should hash tasks where the project graph has circular depen
"command": "7833005669885463868",
"implicitDeps": {},
"nodes": {
"child:{projectRoot}/**/*": "13387017594662756393",
"parent:{projectRoot}/**/*": "3042098164316823883",
"ProjectConfiguration": "18166168584521190546",
"TsConfig": "8767608672024750088",
"child:{projectRoot}/**/*": "3813950410560353800",
"parent:{projectRoot}/**/*": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "4621307928388816676",
"value": "13350861148724171097",
}
`;

Expand All @@ -317,7 +349,9 @@ exports[`TaskHasher should use targetDefaults from nx.json 1`] = `
"command": "6958627266354933907",
"implicitDeps": {},
"nodes": {
"child:{projectRoot}/**/*": "9791796197297932260",
"ProjectConfiguration": "17211930887387929067",
"TsConfig": "8767608672024750088",
"child:{projectRoot}/**/*": "8855829734474504311",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
Expand All @@ -326,7 +360,7 @@ exports[`TaskHasher should use targetDefaults from nx.json 1`] = `
},
"runtime": {},
},
"value": "1795731262495053190",
"value": "10504970031670895802",
}
`;

Expand All @@ -336,15 +370,17 @@ exports[`TaskHasher should use targetDefaults from nx.json 2`] = `
"command": "4062279404379299270",
"implicitDeps": {},
"nodes": {
"child:!{projectRoot}/**/*.spec.ts": "6347155939449237455",
"parent:!{projectRoot}/**/*.spec.ts": "8912386769891259211",
"ProjectConfiguration": "9892649345820140726",
"TsConfig": "8767608672024750088",
"child:!{projectRoot}/**/*.spec.ts": "3813950410560353800",
"parent:!{projectRoot}/**/*.spec.ts": "6315169844688361091",
"target": "nx:run-commands",
"{workspaceRoot}/.gitignore": "3244421341483603138",
"{workspaceRoot}/.nxignore": "3244421341483603138",
"{workspaceRoot}/nx.json": "8942239360311677987",
},
"runtime": {},
},
"value": "16490883615640042532",
"value": "17952311369570541637",
}
`;
Loading

0 comments on commit 5240483

Please sign in to comment.