@jeromefitz/semantic 12.0.1 → 12.0.3-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import{parserOpts as e,releaseRules as t,writerOpts as n}from"@jeromefitz/conventional-gitmoji";const r=(e=[])=>[`@semantic-release/commit-analyzer`,{config:`@jeromefitz/conventional-gitmoji`,releaseRules:[...t,...e]}],i=e=>[`@semantic-release/git`,{assets:e.gitAssets===!1?!1:[`package.json`,...e.gitAssets??[]],message:e.message??"🔖️ `${nextRelease.gitTag}` [skip ci] \n\n${nextRelease.notes}"}],a=(e={})=>{let{githubAssets:t,...n}=e;return[`@semantic-release/github`,{addReleases:!1,assets:t,labels:!1,releasedLabels:!1,successComment:!1,...n}]},o=e=>!e||typeof e.pkgRoot!=`string`&&typeof e.npmPublish!=`boolean`&&e.tarballDir===void 0?`@semantic-release/npm`:[`@semantic-release/npm`,{...e}],s=t=>{let s={enableGit:!1,enableGithub:!0,enableNpm:!0,enableReleaseNotes:!1,enableReleaseNotesCustom:!0,pkgRoot:`./dist`,...t},c=[`@semantic-release/release-notes-generator`,{config:`@jeromefitz/conventional-gitmoji`,parserOpts:e,writerOpts:n}],{npmPublish:l,pkgRoot:u,tarballDir:d}=s,f=o({npmPublish:l,pkgRoot:u,tarballDir:d}),{addReleases:p,assignees:m,failComment:h,failTitle:g,githubApiPathPrefix:_,githubAssets:v,githubUrl:y,labels:b,proxy:x,releasedLabels:S}=s,C=a({addReleases:p,assignees:m,failComment:h,failTitle:g,githubApiPathPrefix:_,githubAssets:v,githubUrl:y,labels:b,proxy:x,releasedLabels:S}),w=i(s);return[r(s.releaseRules),...s.enableReleaseNotes?[c]:[],...s.enableReleaseNotesCustom?[`@jeromefitz/release-notes-generator`]:[],...s.enableNpm?[f]:[],...s.enableGithub?[C]:[],...s.enableGit?[w]:[]]},c=(e={})=>{let t=s(e);return{branches:[{name:`main`},{name:`canary`,prerelease:`canary`}],extends:[`semantic-release-commit-filter`],tagFormat:"v${version}",...e,plugins:t}};export{s as n,c as t};
2
+ //# sourceMappingURL=getConfig-BHi_Guex.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConfig-BHi_Guex.mjs","names":["releaseRules","releaseRulesDefault"],"sources":["../src/plugins/commitAnalyzer.ts","../src/plugins/git.ts","../src/plugins/github.ts","../src/plugins/npm.ts","../src/plugins/pluginOptions.ts","../src/getConfig.ts"],"sourcesContent":["import type { PluginSpec } from 'semantic-release'\n\nimport type { ReleaseRule } from './commitAnalyzer.types'\n\nimport { releaseRules as releaseRulesDefault } from '@jeromefitz/conventional-gitmoji'\n\nconst commitAnalyzer = (releaseRulesPassed: ReleaseRule[] = []): PluginSpec => {\n const releaseRules = [...releaseRulesDefault, ...releaseRulesPassed]\n\n return [\n '@semantic-release/commit-analyzer',\n {\n config: '@jeromefitz/conventional-gitmoji',\n releaseRules,\n },\n ]\n}\n\nexport { commitAnalyzer }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { GitPluginOptions } from './git.types'\n\n/**\n * @note\n *\n * This will modify `package.json` use with caution\n * Most times you will skip this package and only use NPM publishing\n *\n */\nconst git = (options: GitPluginOptions): PluginSpec => {\n return [\n '@semantic-release/git',\n {\n assets:\n options.gitAssets === false\n ? false\n : ['package.json', ...(options.gitAssets ?? [])],\n message:\n options.message ??\n // biome-ignore lint/suspicious/noTemplateCurlyInString: template processed by semantic-release at runtime\n '🔖️ `${nextRelease.gitTag}` [skip ci] \\n\\n${nextRelease.notes}',\n },\n ]\n}\n\nexport { git }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { GithubPluginOptions } from './github.types'\n\nconst github = (options: GithubPluginOptions = {}): PluginSpec => {\n const { githubAssets, ...config } = options\n return [\n '@semantic-release/github',\n {\n addReleases: false,\n assets: githubAssets,\n labels: false,\n releasedLabels: false,\n successComment: false,\n ...config,\n },\n ]\n}\n\nexport { github }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { NPMPluginOptions } from './npm.types'\n\nconst npm = (options?: NPMPluginOptions): PluginSpec => {\n if (\n !options ||\n (typeof options.pkgRoot !== 'string' &&\n typeof options.npmPublish !== 'boolean' &&\n typeof options.tarballDir === 'undefined')\n )\n return '@semantic-release/npm'\n\n return [\n '@semantic-release/npm',\n {\n // npmPublish: true,\n // tarballDir: 'release',\n // @note this may be oddly expensive\n // @ref https://prateeksurana.me/blog/why-using-object-spread-with-reduce-bad-idea/\n ...options,\n },\n ]\n}\n\nexport { npm }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { PluginOptions } from './pluginOptions.types'\n\nimport { parserOpts, writerOpts } from '@jeromefitz/conventional-gitmoji'\n\nimport { commitAnalyzer, git, github, npm } from './index'\n\nconst getPluginOptions = (optionsPassed?: PluginOptions): PluginSpec[] => {\n const options: PluginOptions = {\n enableGit: false,\n enableGithub: true,\n enableNpm: true,\n enableReleaseNotes: false,\n enableReleaseNotesCustom: true,\n pkgRoot: './dist',\n ...optionsPassed,\n }\n\n const releaseNotesConfig: PluginSpec = [\n '@semantic-release/release-notes-generator',\n {\n config: '@jeromefitz/conventional-gitmoji',\n parserOpts,\n writerOpts,\n },\n ]\n const releaseNotesCustomConfig: PluginSpec = '@jeromefitz/release-notes-generator'\n\n const { npmPublish, pkgRoot, tarballDir } = options\n const npmConfig = npm({ npmPublish, pkgRoot, tarballDir })\n\n const {\n addReleases,\n assignees,\n failComment,\n failTitle,\n githubApiPathPrefix,\n githubAssets,\n githubUrl,\n labels,\n proxy,\n releasedLabels,\n } = options\n const githubConfig = github({\n addReleases,\n assignees,\n failComment,\n failTitle,\n githubApiPathPrefix,\n githubAssets,\n githubUrl,\n labels,\n proxy,\n releasedLabels,\n })\n\n const gitConfig = git(options)\n\n return [\n commitAnalyzer(options.releaseRules),\n ...(options.enableReleaseNotes ? [releaseNotesConfig] : []),\n ...(options.enableReleaseNotesCustom ? [releaseNotesCustomConfig] : []),\n ...(options.enableNpm ? [npmConfig] : []),\n ...(options.enableGithub ? [githubConfig] : []),\n ...(options.enableGit ? [gitConfig] : []),\n ]\n}\n\nexport { getPluginOptions }\n","import type { Options as SemanticReleaseOptions } from 'semantic-release'\n\nimport type { PluginOptions } from './plugins/index'\n\nimport { getPluginOptions } from './plugins/index'\n\ntype GetConfigOptions = Partial<Omit<SemanticReleaseOptions, 'plugins'>> &\n PluginOptions\n\nconst getConfig = (configPassed: GetConfigOptions = {}): SemanticReleaseOptions => {\n const plugins = getPluginOptions(configPassed)\n\n return {\n branches: [{ name: 'main' }, { name: 'canary', prerelease: 'canary' }],\n extends: ['semantic-release-commit-filter'],\n tagFormat: `v\\${version}`,\n ...(configPassed as Partial<SemanticReleaseOptions>),\n plugins,\n }\n}\n\nexport type { GetConfigOptions }\nexport { getConfig }\n"],"mappings":"gGAMA,MAAM,GAAkB,EAAoC,CAAC,IAGpD,CACL,oCACA,CACE,OAAQ,mCACR,aAAA,CANkB,GAAGC,EAAqB,GAAG,CAM7C,CACF,CACF,ECJI,EAAO,GACJ,CACL,wBACA,CACE,OACE,EAAQ,YAAc,GAClB,GACA,CAAC,eAAgB,GAAI,EAAQ,WAAa,CAAC,CAAE,EACnD,QACE,EAAQ,SAER,gEACJ,CACF,ECpBI,GAAU,EAA+B,CAAC,IAAkB,CAChE,GAAM,CAAE,eAAc,GAAG,GAAW,EACpC,MAAO,CACL,2BACA,CACE,YAAa,GACb,OAAQ,EACR,OAAQ,GACR,eAAgB,GAChB,eAAgB,GAChB,GAAG,CACL,CACF,CACF,ECbM,EAAO,GAET,CAAC,GACA,OAAO,EAAQ,SAAY,UAC1B,OAAO,EAAQ,YAAe,WACvB,EAAQ,aAAe,OAEzB,wBAEF,CACL,wBACA,CAKE,GAAG,CACL,CACF,ECdI,EAAoB,GAAgD,CACxE,IAAM,EAAyB,CAC7B,UAAW,GACX,aAAc,GACd,UAAW,GACX,mBAAoB,GACpB,yBAA0B,GAC1B,QAAS,SACT,GAAG,CACL,EAEM,EAAiC,CACrC,4CACA,CACE,OAAQ,mCACR,aACA,YACF,CACF,EAGM,CAAE,aAAY,UAAS,cAAe,EACtC,EAAY,EAAI,CAAE,aAAY,UAAS,YAAW,CAAC,EAEnD,CACJ,cACA,YACA,cACA,YACA,sBACA,eACA,YACA,SACA,QACA,kBACE,EACE,EAAe,EAAO,CAC1B,cACA,YACA,cACA,YACA,sBACA,eACA,YACA,SACA,QACA,gBACF,CAAC,EAEK,EAAY,EAAI,CAAO,EAE7B,MAAO,CACL,EAAe,EAAQ,YAAY,EACnC,GAAI,EAAQ,mBAAqB,CAAC,CAAkB,EAAI,CAAC,EACzD,GAAI,EAAQ,yBAA2B,CAAC,qCAAwB,EAAI,CAAC,EACrE,GAAI,EAAQ,UAAY,CAAC,CAAS,EAAI,CAAC,EACvC,GAAI,EAAQ,aAAe,CAAC,CAAY,EAAI,CAAC,EAC7C,GAAI,EAAQ,UAAY,CAAC,CAAS,EAAI,CAAC,CACzC,CACF,EC1DM,GAAa,EAAiC,CAAC,IAA8B,CACjF,IAAM,EAAU,EAAiB,CAAY,EAE7C,MAAO,CACL,SAAU,CAAC,CAAE,KAAM,MAAO,EAAG,CAAE,KAAM,SAAU,WAAY,QAAS,CAAC,EACrE,QAAS,CAAC,gCAAgC,EAC1C,UAAW,cACX,GAAI,EACJ,SACF,CACF"}
@@ -0,0 +1,74 @@
1
+ import { ICommit } from "@jeromefitz/conventional-gitmoji";
2
+ import { Options, PluginSpec, Release } from "semantic-release";
3
+
4
+ //#region src/plugins/commitAnalyzer.types.d.ts
5
+ interface ReleaseRule {
6
+ release: Release['type'];
7
+ type: ICommit;
8
+ }
9
+ //#endregion
10
+ //#region src/plugins/git.types.d.ts
11
+ interface GitPluginOptions {
12
+ gitAssets?: false | string[];
13
+ message?: string;
14
+ }
15
+ //#endregion
16
+ //#region src/plugins/github.types.d.ts
17
+ interface GithubPluginOptions {
18
+ addReleases?: boolean;
19
+ assignees?: string[];
20
+ failComment?: string;
21
+ failTitle?: string;
22
+ githubApiPathPrefix?: string;
23
+ githubAssets?: string[];
24
+ githubUrl?: string;
25
+ labels?: string[];
26
+ proxy?: string;
27
+ releasedLabels?: string[];
28
+ }
29
+ //#endregion
30
+ //#region src/plugins/npm.types.d.ts
31
+ interface NPMPluginOptions {
32
+ npmPublish?: boolean;
33
+ pkgRoot?: string;
34
+ tarballDir?: false | string;
35
+ }
36
+ //#endregion
37
+ //#region src/plugins/pluginOptions.types.d.ts
38
+ interface PluginOptions extends GithubPluginOptions, GitPluginOptions, NPMPluginOptions {
39
+ enableGit?: boolean;
40
+ enableGithub?: boolean;
41
+ enableNpm?: boolean;
42
+ enableReleaseNotes?: boolean;
43
+ enableReleaseNotesCustom?: boolean;
44
+ releaseRules?: ReleaseRule[];
45
+ }
46
+ //#endregion
47
+ //#region src/plugins/commitAnalyzer.d.ts
48
+ declare const commitAnalyzer: (releaseRulesPassed?: ReleaseRule[]) => PluginSpec;
49
+ //#endregion
50
+ //#region src/plugins/git.d.ts
51
+ /**
52
+ * @note
53
+ *
54
+ * This will modify `package.json` use with caution
55
+ * Most times you will skip this package and only use NPM publishing
56
+ *
57
+ */
58
+ declare const git: (options: GitPluginOptions) => PluginSpec;
59
+ //#endregion
60
+ //#region src/plugins/github.d.ts
61
+ declare const github: (options?: GithubPluginOptions) => PluginSpec;
62
+ //#endregion
63
+ //#region src/plugins/npm.d.ts
64
+ declare const npm: (options?: NPMPluginOptions) => PluginSpec;
65
+ //#endregion
66
+ //#region src/plugins/pluginOptions.d.ts
67
+ declare const getPluginOptions: (optionsPassed?: PluginOptions) => PluginSpec[];
68
+ //#endregion
69
+ //#region src/getConfig.d.ts
70
+ type GetConfigOptions = Partial<Omit<Options, 'plugins'>> & PluginOptions;
71
+ declare const getConfig: (configPassed?: GetConfigOptions) => Options;
72
+ //#endregion
73
+ export { getConfig as n, getPluginOptions as r, GetConfigOptions as t };
74
+ //# sourceMappingURL=getConfig-CPiey691.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getConfig-CPiey691.d.mts","names":[],"sources":["../src/plugins/commitAnalyzer.types.ts","../src/plugins/git.types.ts","../src/plugins/github.types.ts","../src/plugins/npm.types.ts","../src/plugins/pluginOptions.types.ts","../src/plugins/commitAnalyzer.ts","../src/plugins/git.ts","../src/plugins/github.ts","../src/plugins/npm.ts","../src/plugins/pluginOptions.ts","../src/getConfig.ts"],"mappings":";;;;UAIU,WAAA;EACR,OAAA,EAAS,OAAA;EACT,IAAA,EAAM,OAAO;AAAA;;;UCNL,gBAAA;EACR,SAAA;EACA,OAAO;AAAA;;;UCFC,mBAAA;EACR,WAAA;EACA,SAAA;EACA,WAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,SAAA;EACA,MAAA;EACA,KAAA;EACA,cAAA;AAAA;;;UCVQ,gBAAA;EACR,UAAA;EACA,OAAA;EACA,UAAA;AAAA;;;UCIQ,aAAA,SACA,mBAAA,EACN,gBAAA,EACA,gBAAA;EACF,SAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,wBAAA;EACA,YAAA,GAAe,WAAA;AAAA;;;cCVX,cAAA,GAAkB,kBAAA,GAAoB,WAAA,OAAqB,UAUhE;;;;;ALd8C;;;;;cMSzC,GAAA,GAAO,OAAA,EAAS,gBAAA,KAAmB,UAcxC;;;cCrBK,MAAA,GAAU,OAAA,GAAS,mBAAA,KAA2B,UAanD;;;cCbK,GAAA,GAAO,OAAA,GAAU,gBAAA,KAAmB,UAmBzC;;;cCfK,gBAAA,GAAoB,aAAA,GAAgB,aAAA,KAAgB,UAAU;;;KCF/D,gBAAA,GAAmB,OAAA,CAAQ,IAAA,CAAK,OAAA,gBACnC,aAAA;AAAA,cAEI,SAAA,GAAa,YAAA,GAAc,gBAAA,KAAwB,OAUxD"}
package/getConfig.d.mts CHANGED
@@ -1,14 +1,2 @@
1
- import { Options } from "semantic-release";
2
-
3
- //#region src/getConfig.d.ts
4
- /**
5
- * @todo
6
- * - config type
7
- * - - merge = with defaults
8
- * - - override = takeover completely
9
- *
10
- */
11
- declare const getConfig: (configPassed?: {}) => Options;
12
- //#endregion
13
- export { getConfig };
14
- //# sourceMappingURL=getConfig.d.mts.map
1
+ import { n as getConfig, t as GetConfigOptions } from "./getConfig-CPiey691.mjs";
2
+ export { type GetConfigOptions, getConfig };
package/getConfig.mjs CHANGED
@@ -1 +1 @@
1
- import"./chunk-pm2C21R4.mjs";import{t as e}from"./getConfig-BPDDTk71.mjs";export{e as getConfig};
1
+ import{t as e}from"./getConfig-BHi_Guex.mjs";export{e as getConfig};
package/index.d.mts CHANGED
@@ -1,76 +1,9 @@
1
- import { getConfig } from "./getConfig.mjs";
2
- import { ICommit, IReleaseRule } from "@jeromefitz/conventional-gitmoji";
3
- import { Options, PluginSpec, Release } from "semantic-release";
1
+ import { n as getConfig, r as getPluginOptions, t as GetConfigOptions } from "./getConfig-CPiey691.mjs";
2
+ import { PluginSpec } from "semantic-release";
4
3
 
5
- //#region src/plugins/commitAnalyzer.types.d.ts
6
- interface ReleaseRule {
7
- release: Release['type'];
8
- type: ICommit;
9
- }
10
- //#endregion
11
- //#region src/plugins/git.types.d.ts
12
- interface GitPluginOptions {
13
- gitAssets?: false | string[];
14
- message?: string;
15
- }
16
- //#endregion
17
- //#region src/plugins/github.types.d.ts
18
- interface GithubPluginOptions {
19
- addReleases?: boolean;
20
- assignees?: string[];
21
- failComment?: string;
22
- failTitle?: string;
23
- githubApiPathPrefix?: string;
24
- githubAssets?: string[];
25
- githubUrl?: string;
26
- labels?: string[];
27
- proxy?: string;
28
- releasedLabels?: string[];
29
- successComment?: string;
30
- }
31
- //#endregion
32
- //#region src/plugins/npm.types.d.ts
33
- interface NPMPluginOptions {
34
- npmPublish?: boolean;
35
- pkgRoot?: string;
36
- tarballDir?: false | string;
37
- }
38
- //#endregion
39
- //#region src/plugins/pluginOptions.types.d.ts
40
- interface PluginOptions extends GithubPluginOptions, GitPluginOptions, NPMPluginOptions {
41
- enableGit?: boolean;
42
- enableGithub?: boolean;
43
- enableNpm?: boolean;
44
- enableReleaseNotes?: boolean;
45
- enableReleaseNotesCustom?: boolean;
46
- releaseRules?: any;
47
- }
48
- //#endregion
49
- //#region src/plugins/commitAnalyzer.d.ts
50
- declare const commitAnalyzer: (releaseRulesPassed?: IReleaseRule[]) => PluginSpec;
51
- //#endregion
52
- //#region src/plugins/git.d.ts
53
- /**
54
- * @note
55
- *
56
- * This will modify `package.json` use with caution
57
- * Most times you will skip this package and only use NPM publishing
58
- *
59
- */
60
- declare const git: (options: GitPluginOptions) => PluginSpec;
61
- //#endregion
62
- //#region src/plugins/github.d.ts
63
- declare const github: (options?: GithubPluginOptions) => PluginSpec;
64
- //#endregion
65
- //#region src/plugins/npm.d.ts
66
- declare const npm: (options?: NPMPluginOptions) => PluginSpec;
67
- //#endregion
68
- //#region src/plugins/pluginOptions.d.ts
69
- declare const getPluginOptions: (optionsPassed?: PluginOptions) => PluginSpec[];
70
- //#endregion
71
4
  //#region src/index.d.ts
72
- declare const plugins: Options;
73
- declare const config: Options;
5
+ declare const plugins: PluginSpec[];
6
+ declare const config: import("semantic-release").Options;
74
7
  //#endregion
75
- export { config, getConfig, getPluginOptions, plugins };
8
+ export { type GetConfigOptions, config, getConfig, getPluginOptions, plugins };
76
9
  //# sourceMappingURL=index.d.mts.map
package/index.d.mts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/plugins/commitAnalyzer.types.ts","../src/plugins/git.types.ts","../src/plugins/github.types.ts","../src/plugins/npm.types.ts","../src/plugins/pluginOptions.types.ts","../src/plugins/commitAnalyzer.ts","../src/plugins/git.ts","../src/plugins/github.ts","../src/plugins/npm.ts","../src/plugins/pluginOptions.ts","../src/index.ts"],"mappings":";;;;;UAIU,WAAA;EACR,OAAA,EAAS,OAAA;EACT,IAAA,EAAM,OAAA;AAAA;;;UCNE,gBAAA;EACR,SAAA;EACA,OAAA;AAAA;;;UCFQ,mBAAA;EACR,WAAA;EACA,SAAA;EACA,WAAA;EACA,SAAA;EACA,mBAAA;EACA,YAAA;EACA,SAAA;EACA,MAAA;EACA,KAAA;EACA,cAAA;EACA,cAAA;AAAA;;;UCXQ,gBAAA;EACR,UAAA;EACA,OAAA;EACA,UAAA;AAAA;;;UCIQ,aAAA,SACA,mBAAA,EACN,gBAAA,EACA,gBAAA;EACF,SAAA;EACA,YAAA;EACA,SAAA;EACA,kBAAA;EACA,wBAAA;EAEA,YAAA;AAAA;;;cCXI,cAAA,GAAkB,kBAAA,GAAoB,YAAA,OAAsB,UAAA;;;;;;;ALJnB;;;cMSzC,GAAA,GAAO,OAAA,EAAS,gBAAA,KAAmB,UAAA;;;cCPnC,MAAA,GAAU,OAAA,GAAS,mBAAA,KAA2B,UAAA;;;cCA9C,GAAA,GAAO,OAAA,GAAU,gBAAA,KAAmB,UAAA;;;cCIpC,gBAAA,GAAoB,aAAA,GAAgB,aAAA,KAAgB,UAAA;;;cCHpD,OAAA,EAAS,OAAA;AAAA,cACT,MAAA,EAAM,OAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;cAKM,OAAA,EAAS,UAAU;AAAA,cACnB,MAAA,6BAAM,OAAc"}
package/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-pm2C21R4.mjs";import{n as e,t}from"./getConfig-BPDDTk71.mjs";const n=e(),r=t();export{r as config,t as getConfig,e as getPluginOptions,n as plugins};
1
+ import{n as e,t}from"./getConfig-BHi_Guex.mjs";const n=e(),r=t();export{r as config,t as getConfig,e as getPluginOptions,n as plugins};
2
2
  //# sourceMappingURL=index.mjs.map
package/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Options } from 'semantic-release'\n\nimport { getConfig } from './getConfig'\nimport { getPluginOptions } from './plugins/index'\n\nconst plugins: Options = getPluginOptions()\nconst config = getConfig()\n\nexport { config, getConfig, getPluginOptions, plugins }\n"],"mappings":"4EAKA,MAAM,EAAmB,GAAkB,CACrC,EAAS,GAAW"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { PluginSpec } from 'semantic-release'\n\nimport { getConfig } from './getConfig'\nimport { getPluginOptions } from './plugins/index'\n\nconst plugins: PluginSpec[] = getPluginOptions()\nconst config = getConfig()\n\nexport type { GetConfigOptions } from './getConfig'\n\nexport { config, getConfig, getPluginOptions, plugins }\n"],"mappings":"+CAKA,MAAM,EAAwB,EAAiB,EACzC,EAAS,EAAU"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeromefitz/semantic",
3
- "version": "12.0.1",
3
+ "version": "12.0.3-canary.1",
4
4
  "type": "module",
5
5
  "description": "Semantic Versioning, Conventional Commits with CI/CD for GitHub Actions.",
6
6
  "repository": {
@@ -33,7 +33,8 @@
33
33
  "lint": "pnpm run lint:typescript",
34
34
  "lint:typescript": "tsc --noEmit --declaration",
35
35
  "semantic-release": "semantic-release",
36
- "semantic-release:dry": "semantic-release --dry-run"
36
+ "semantic-release:dry": "semantic-release --dry-run",
37
+ "test": "vitest run"
37
38
  },
38
39
  "peerDependencies": {
39
40
  "@jeromefitz/conventional-gitmoji": "^5.0.0"
@@ -41,7 +42,7 @@
41
42
  "dependencies": {
42
43
  "@semantic-release/commit-analyzer": "13.0.1",
43
44
  "@semantic-release/git": "10.0.1",
44
- "semantic-release": "25.0.3",
45
+ "semantic-release": "25.0.5",
45
46
  "semantic-release-commit-filter": "1.0.2",
46
47
  "title": "4.0.1"
47
48
  },
@@ -1,7 +1,5 @@
1
- import * as semantic_release0 from "semantic-release";
2
-
3
1
  //#region src/release.config.d.ts
4
- declare const config: semantic_release0.Options;
2
+ declare const config: import("semantic-release").Options;
5
3
  //#endregion
6
4
  export { config as default };
7
5
  //# sourceMappingURL=release.config.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"release.config.d.mts","names":[],"sources":["../src/release.config.ts"],"mappings":";;;cAEM,MAAA,EAAoB,iBAAA,CAAd,OAAA"}
1
+ {"version":3,"file":"release.config.d.mts","names":[],"sources":["../src/release.config.ts"],"mappings":";cAEM,MAAA,6BAAM,OAAc"}
@@ -1,2 +1,2 @@
1
- import"./chunk-pm2C21R4.mjs";import{t as e}from"./getConfig-BPDDTk71.mjs";const t=e();export{t as default};
1
+ import{t as e}from"./getConfig-BHi_Guex.mjs";const t=e();export{t as default};
2
2
  //# sourceMappingURL=release.config.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"release.config.mjs","names":[],"sources":["../src/release.config.ts"],"sourcesContent":["import { getConfig } from './getConfig'\n\nconst config = getConfig()\n\nexport default config\n"],"mappings":"0EAEA,MAAM,EAAS,GAAW"}
1
+ {"version":3,"file":"release.config.mjs","names":[],"sources":["../src/release.config.ts"],"sourcesContent":["import { getConfig } from './getConfig'\n\nconst config = getConfig()\n\nexport default config\n"],"mappings":"6CAEA,MAAM,EAAS,EAAU"}
@@ -1 +0,0 @@
1
- import"node:module";Object.create,Object.defineProperty,Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.getPrototypeOf,Object.prototype.hasOwnProperty;export{};
@@ -1,2 +0,0 @@
1
- import{parserOpts as e,releaseRules as t,writerOpts as n}from"@jeromefitz/conventional-gitmoji";const r=(e=[])=>[`@semantic-release/commit-analyzer`,{config:`@jeromefitz/conventional-gitmoji`,releaseRules:[...t,...e]}],i=e=>[`@semantic-release/git`,{assets:typeof e.gitAssets==`boolean`?!1:[`package.json`].concat(e.gitAssets?e.gitAssets:[]).filter(e=>e),message:e.message?e.message:"🔖️ `${nextRelease.gitTag}` [skip ci] \n\n${nextRelease.notes}"}],a=(e={})=>{let t=e&&Object.values(e).filter(e=>e!==void 0).length===0;if(!e||t)return[`@semantic-release/github`,{addReleases:!1,labels:!1,releasedLabels:!1,successComment:!1}];let{githubAssets:n,...r}=e;return[`@semantic-release/github`,{addReleases:!1,assets:n,labels:!1,releasedLabels:!1,successComment:!1,...r}]},o=e=>!e||typeof e.pkgRoot!=`string`&&typeof e.npmPublish!=`boolean`&&e.tarballDir===void 0?`@semantic-release/npm`:[`@semantic-release/npm`,{...e}],s=t=>{let s={enableGit:!1,enableGithub:!0,enableNpm:!0,enableReleaseNotes:!1,enableReleaseNotesCustom:!0,pkgRoot:`./dist`,...t},c=[`@semantic-release/release-notes-generator`,{config:`@jeromefitz/conventional-gitmoji`,parserOpts:e,writerOpts:n}],l=[`@jeromefitz/release-notes-generator`,{config:`@jeromefitz/conventional-gitmoji`}],{npmPublish:u,pkgRoot:d,tarballDir:f}=s,p=o({npmPublish:u,pkgRoot:d,tarballDir:f}),{addReleases:m,assignees:h,failComment:g,failTitle:_,githubApiPathPrefix:v,githubAssets:y,githubUrl:b,labels:x,proxy:S,releasedLabels:C}=s,w=a({addReleases:m,assignees:h,failComment:g,failTitle:_,githubApiPathPrefix:v,githubAssets:y,githubUrl:b,labels:x,proxy:S,releasedLabels:C}),T=i(s);return[r(s.releaseRules),s.enableReleaseNotes?c:``,s.enableReleaseNotesCustom?l:``,s.enableNpm?p:``,s.enableGithub?w:``,s.enableGit?T:``].filter(e=>!!e)},c=(e={})=>({branches:[{name:`main`},{name:`canary`,prerelease:`canary`}],extends:[`semantic-release-commit-filter`],plugins:s(e),tagFormat:"v${version}",...e});export{s as n,c as t};
2
- //# sourceMappingURL=getConfig-BPDDTk71.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getConfig-BPDDTk71.mjs","names":["releaseRules","releaseRulesDefault"],"sources":["../src/plugins/commitAnalyzer.ts","../src/plugins/git.ts","../src/plugins/github.ts","../src/plugins/npm.ts","../src/plugins/pluginOptions.ts","../src/getConfig.ts"],"sourcesContent":["import type { IReleaseRule } from '@jeromefitz/conventional-gitmoji'\n\nimport type { PluginSpec } from 'semantic-release'\n\nimport { releaseRules as releaseRulesDefault } from '@jeromefitz/conventional-gitmoji'\n\nconst commitAnalyzer = (releaseRulesPassed: IReleaseRule[] = []): PluginSpec => {\n const releaseRules = [...releaseRulesDefault, ...releaseRulesPassed]\n\n return [\n '@semantic-release/commit-analyzer',\n {\n config: '@jeromefitz/conventional-gitmoji',\n releaseRules,\n },\n ]\n}\n\nexport { commitAnalyzer }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { GitPluginOptions } from './git.types'\n\n/**\n * @note\n *\n * This will modify `package.json` use with caution\n * Most times you will skip this package and only use NPM publishing\n *\n */\nconst git = (options: GitPluginOptions): PluginSpec => {\n return [\n '@semantic-release/git',\n {\n assets:\n typeof options.gitAssets === 'boolean'\n ? false\n : ['package.json']\n // biome-ignore lint/complexity/noExtraBooleanCast: migrate\n .concat(!!options.gitAssets ? options.gitAssets : [])\n .filter((a) => a),\n message: options.message\n ? options.message\n : // biome-ignore lint/suspicious/noTemplateCurlyInString: migrate\n '🔖️ `${nextRelease.gitTag}` [skip ci] \\n\\n${nextRelease.notes}',\n },\n ]\n}\n\nexport { git }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { GithubPluginOptions } from './github.types'\n\nconst github = (options: GithubPluginOptions = {}): PluginSpec => {\n const optionsEmpty =\n options &&\n Object.values(options).filter((i) => typeof i !== 'undefined').length === 0\n\n if (!options || optionsEmpty)\n return [\n '@semantic-release/github',\n {\n // @note(github) ensure someone has to override to put these on, haha\n addReleases: false,\n labels: false,\n releasedLabels: false,\n successComment: false,\n },\n ]\n\n const { githubAssets, ...config } = options\n return [\n '@semantic-release/github',\n {\n // @note(github) ensure someone has to override to put these on, haha\n addReleases: false,\n assets: githubAssets,\n labels: false,\n releasedLabels: false,\n successComment: false,\n ...config,\n },\n ]\n}\n\nexport { github }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { NPMPluginOptions } from './npm.types'\n\nconst npm = (options?: NPMPluginOptions): PluginSpec => {\n if (\n !options ||\n (typeof options.pkgRoot !== 'string' &&\n typeof options.npmPublish !== 'boolean' &&\n typeof options.tarballDir === 'undefined')\n )\n return '@semantic-release/npm'\n\n return [\n '@semantic-release/npm',\n {\n // npmPublish: true,\n // tarballDir: 'release',\n // @note this may be oddly expensive\n // @ref https://prateeksurana.me/blog/why-using-object-spread-with-reduce-bad-idea/\n ...options,\n },\n ]\n}\n\nexport { npm }\n","import type { PluginSpec } from 'semantic-release'\n\nimport type { PluginOptions } from './pluginOptions.types'\n\nimport { parserOpts, writerOpts } from '@jeromefitz/conventional-gitmoji'\n\nimport { commitAnalyzer, git, github, npm } from './index'\n\nconst getPluginOptions = (optionsPassed?: PluginOptions): PluginSpec[] => {\n const optionsDefault = {\n /**\n * @note Will only load the plugin if set to true\n */\n enableGit: false,\n enableGithub: true,\n enableNpm: true,\n enableReleaseNotes: false,\n enableReleaseNotesCustom: true,\n /**\n * @note Customized defaults\n */\n pkgRoot: './dist',\n // tarballDir: 'release',\n }\n\n /**\n * @todo(types) any\n */\n const options: any | PluginOptions = {\n ...optionsDefault,\n ...optionsPassed,\n }\n\n const releaseNotesConfig = [\n '@semantic-release/release-notes-generator',\n {\n config: '@jeromefitz/conventional-gitmoji',\n parserOpts,\n writerOpts,\n },\n ]\n const releaseNotesCustomConfig = [\n '@jeromefitz/release-notes-generator',\n {\n config: '@jeromefitz/conventional-gitmoji',\n },\n ]\n\n const { npmPublish, pkgRoot, tarballDir } = options\n const npmConfig = npm({ npmPublish, pkgRoot, tarballDir })\n\n const {\n addReleases,\n assignees,\n failComment,\n failTitle,\n githubApiPathPrefix,\n githubAssets,\n githubUrl,\n labels,\n proxy,\n releasedLabels,\n } = options\n const githubConfig = github({\n addReleases,\n assignees,\n failComment,\n failTitle,\n githubApiPathPrefix,\n githubAssets,\n githubUrl,\n labels,\n proxy,\n releasedLabels,\n })\n\n const gitConfig = git(options)\n\n const _plugins: any = [\n commitAnalyzer(options.releaseRules),\n options.enableReleaseNotes ? releaseNotesConfig : '',\n options.enableReleaseNotesCustom ? releaseNotesCustomConfig : '',\n options.enableNpm ? npmConfig : '',\n options.enableGithub ? githubConfig : '',\n options.enableGit ? gitConfig : '',\n ]\n\n const plugins: PluginSpec[] = _plugins.filter((plugin) => !!plugin)\n\n return plugins\n}\n\nexport { getPluginOptions }\n","import type { Options as SemanticReleaseOptions } from 'semantic-release'\n\nimport { getPluginOptions } from './plugins/index'\n\n/**\n * @todo\n * - config type\n * - - merge = with defaults\n * - - override = takeover completely\n *\n */\nconst getConfig = (configPassed = {}): SemanticReleaseOptions => {\n const plugins = getPluginOptions(configPassed)\n // const configInit: SemanticReleaseOptions = {\n const configInit: any = {\n branches: [{ name: 'main' }, { name: 'canary', prerelease: 'canary' }],\n extends: ['semantic-release-commit-filter'],\n plugins,\n tagFormat: `v\\${version}`,\n }\n\n const config: SemanticReleaseOptions = {\n ...configInit,\n ...configPassed,\n }\n\n return config\n}\n\nexport { getConfig }\n"],"mappings":"gGAMA,MAAM,GAAkB,EAAqC,EAAE,GAGtD,CACL,oCACA,CACE,OAAQ,mCACR,aANiB,CAAC,GAAGC,EAAqB,GAAG,EAAmB,CAOjE,CACF,CCJG,EAAO,GACJ,CACL,wBACA,CACE,OACE,OAAO,EAAQ,WAAc,UACzB,GACA,CAAC,eAAe,CAEb,OAAS,EAAQ,UAAY,EAAQ,UAAY,EAAE,CAAC,CACpD,OAAQ,GAAM,EAAE,CACzB,QAAS,EAAQ,QACb,EAAQ,QAER,iEACL,CACF,CCvBG,GAAU,EAA+B,EAAE,GAAiB,CAChE,IAAM,EACJ,GACA,OAAO,OAAO,EAAQ,CAAC,OAAQ,GAAa,IAAM,OAAY,CAAC,SAAW,EAE5E,GAAI,CAAC,GAAW,EACd,MAAO,CACL,2BACA,CAEE,YAAa,GACb,OAAQ,GACR,eAAgB,GAChB,eAAgB,GACjB,CACF,CAEH,GAAM,CAAE,eAAc,GAAG,GAAW,EACpC,MAAO,CACL,2BACA,CAEE,YAAa,GACb,OAAQ,EACR,OAAQ,GACR,eAAgB,GAChB,eAAgB,GAChB,GAAG,EACJ,CACF,EC7BG,EAAO,GAET,CAAC,GACA,OAAO,EAAQ,SAAY,UAC1B,OAAO,EAAQ,YAAe,WACvB,EAAQ,aAAe,OAEzB,wBAEF,CACL,wBACA,CAKE,GAAG,EACJ,CACF,CCdG,EAAoB,GAAgD,CAoBxE,IAAM,EAA+B,CAfnC,UAAW,GACX,aAAc,GACd,UAAW,GACX,mBAAoB,GACpB,yBAA0B,GAI1B,QAAS,SAST,GAAG,EACJ,CAEK,EAAqB,CACzB,4CACA,CACE,OAAQ,mCACR,aACA,aACD,CACF,CACK,EAA2B,CAC/B,sCACA,CACE,OAAQ,mCACT,CACF,CAEK,CAAE,aAAY,UAAS,cAAe,EACtC,EAAY,EAAI,CAAE,aAAY,UAAS,aAAY,CAAC,CAEpD,CACJ,cACA,YACA,cACA,YACA,sBACA,eACA,YACA,SACA,QACA,kBACE,EACE,EAAe,EAAO,CAC1B,cACA,YACA,cACA,YACA,sBACA,eACA,YACA,SACA,QACA,iBACD,CAAC,CAEI,EAAY,EAAI,EAAQ,CAa9B,MAXsB,CACpB,EAAe,EAAQ,aAAa,CACpC,EAAQ,mBAAqB,EAAqB,GAClD,EAAQ,yBAA2B,EAA2B,GAC9D,EAAQ,UAAY,EAAY,GAChC,EAAQ,aAAe,EAAe,GACtC,EAAQ,UAAY,EAAY,GACjC,CAEsC,OAAQ,GAAW,CAAC,CAAC,EAAO,EC5E/D,GAAa,EAAe,EAAE,IAUK,CANrC,SAAU,CAAC,CAAE,KAAM,OAAQ,CAAE,CAAE,KAAM,SAAU,WAAY,SAAU,CAAC,CACtE,QAAS,CAAC,iCAAiC,CAC3C,QALc,EAAiB,EAAa,CAM5C,UAAW,cAKX,GAAG,EACJ"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getConfig.d.mts","names":[],"sources":["../src/getConfig.ts"],"mappings":";;;;;;AAAyE;;;;cAWnE,SAAA,GAAa,YAAA,UAAoB,OAAA"}