Skip to content

Commit f15d677

Browse files
committed
✨ feat: add npm config
1 parent 3c459bf commit f15d677

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

packages/release-config/src/createConfig.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Options as SemRelOptions, PluginSpec } from 'semantic-release';
33
import type { Options } from './type';
44
import commitAnalyzer from './commitAnalyzer';
55
import git from './git';
6+
import npm from './npm';
67

78
export const createConfig = (options?: Options): SemRelOptions => {
89
const opts = {
@@ -31,7 +32,7 @@ export const createConfig = (options?: Options): SemRelOptions => {
3132
},
3233
],
3334
/* 自动更新版本号 如果没有 private ,会作为 npm 模块进行发布 */
34-
opts.enableNPM ? '@semantic-release/npm' : '',
35+
opts.enableNPM ? npm(options) : '',
3536
/* 将生成结果发布到 Github */
3637
opts.enableGithub ? '@semantic-release/github' : '',
3738
/* 推送代码回到 Git */

packages/release-config/src/npm.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2+
const npm = (options?) => {
3+
return '@semantic-release/npm';
4+
};
5+
6+
export default npm;

0 commit comments

Comments
 (0)