-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix warnings by removing useless methods, fix method names
- Loading branch information
Showing
3 changed files
with
36 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,51 @@ | ||
import { Context } from "semantic-release"; | ||
import { Config, Context } from "semantic-release"; | ||
import { PluginConfig } from "./plugin-config"; | ||
|
||
interface Plugin { | ||
verify(pluginConfig: PluginConfig, context: Context): void; | ||
verifyConditions(pluginConfig: PluginConfig, context: Context): void; | ||
analyzeCommits(pluginConfig: PluginConfig, context: Context): void; | ||
prepare(pluginConfig: PluginConfig, context: Context): void; | ||
publish(pluginConfig: PluginConfig, context: Context): void; | ||
success(pluginConfig: PluginConfig, context: Context): void; | ||
fail(pluginConfig: PluginConfig, context: Context): void; | ||
} | ||
|
||
export function createOldVersionDeprecier(): Plugin { | ||
function verify(pluginConfig: PluginConfig, context: Context): void { | ||
console.log("verify", context); | ||
function verifyConditions( | ||
pluginConfig: PluginConfig, | ||
context: Context & Config | ||
): void { | ||
const { logger } = context; | ||
logger.log("using default configuration"); | ||
console.log(context); | ||
} | ||
|
||
function prepare(pluginConfig: PluginConfig, context: Context): void {} | ||
|
||
function publish(pluginConfig: PluginConfig, context: Context): void { | ||
console.log("PUBLISH", context); | ||
function analyzeCommits( | ||
pluginConfig: PluginConfig, | ||
context: Context & Config | ||
): void { | ||
const { logger } = context; | ||
logger.log("analyzeCommits"); | ||
} | ||
|
||
function success(pluginConfig: PluginConfig, context: Context): void {} | ||
function prepare( | ||
pluginConfig: PluginConfig, | ||
context: Context & Config | ||
): void { | ||
const { logger } = context; | ||
logger.log("prepare"); | ||
} | ||
|
||
function fail(pluginConfig: PluginConfig, context: Context): void {} | ||
function publish( | ||
pluginConfig: PluginConfig, | ||
context: Context & Config | ||
): void { | ||
const { logger } = context; | ||
logger.log("publish"); | ||
} | ||
|
||
return { | ||
verify, | ||
verifyConditions, | ||
analyzeCommits, | ||
prepare, | ||
publish, | ||
success, | ||
fail, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters