Skip to content

Commit 62a81b9

Browse files
committed
[INTERNAL] TaskRepository: Remove #addTask API
Custom tasks shall now be provided as extensions in the ProjectGraph
1 parent 81130d7 commit 62a81b9

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

lib/tasks/taskRepository.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,30 +36,18 @@ function getTask(taskName) {
3636
try {
3737
const task = require(taskInfo.path);
3838
return {
39-
task,
40-
specVersion: taskInfo.specVersion
39+
task
4140
};
4241
} catch (err) {
4342
throw new Error(`taskRepository: Failed to require task module for ${taskName}: ${err.message}`);
4443
}
4544
}
4645

47-
function addTask({name, specVersion, taskPath}) {
48-
if (taskInfos[name]) {
49-
throw new Error(`taskRepository: A task with the name ${name} has already been registered`);
50-
}
51-
taskInfos[name] = {
52-
path: taskPath,
53-
specVersion
54-
};
55-
}
56-
5746
function getAllTaskNames() {
5847
return Object.keys(taskInfos);
5948
}
6049

6150
module.exports = {
6251
getTask,
63-
addTask,
6452
getAllTaskNames
6553
};

0 commit comments

Comments
 (0)