relizy 1.0.0-beta.2 → 1.0.0
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.
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/shared/{relizy.H6UfHwti.mjs → relizy.DDnOGyKL.mjs} +64 -46
- package/package.json +11 -11
package/dist/cli.mjs
CHANGED
|
@@ -5,7 +5,7 @@ import process from 'node:process';
|
|
|
5
5
|
import { fileURLToPath } from 'node:url';
|
|
6
6
|
import { printBanner, logger } from '@maz-ui/node';
|
|
7
7
|
import { Command } from 'commander';
|
|
8
|
-
import { a7 as isInCI, a8 as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, f as social, r as release } from './shared/relizy.
|
|
8
|
+
import { a7 as isInCI, a8 as getCIName, b as bump, c as changelog, e as publish, a as providerRelease, f as social, r as release } from './shared/relizy.DDnOGyKL.mjs';
|
|
9
9
|
import 'changelogen';
|
|
10
10
|
import 'fast-glob';
|
|
11
11
|
import '@inquirer/prompts';
|
package/dist/index.d.mts
CHANGED
|
@@ -1389,7 +1389,7 @@ declare function release(options?: Partial<ReleaseOptions>): Promise<void>;
|
|
|
1389
1389
|
|
|
1390
1390
|
declare function socialSafetyCheck({ config }: {
|
|
1391
1391
|
config: ResolvedRelizyConfig;
|
|
1392
|
-
}): void
|
|
1392
|
+
}): Promise<void>;
|
|
1393
1393
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
1394
1394
|
|
|
1395
1395
|
export { bump, changelog, checkGitStatusIfDirty, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, formatChangelogForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getSlackToken, getTwitterCredentials, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, parseGitRemoteUrl, postReleaseToSlack, postReleaseToTwitter, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
package/dist/index.d.ts
CHANGED
|
@@ -1389,7 +1389,7 @@ declare function release(options?: Partial<ReleaseOptions>): Promise<void>;
|
|
|
1389
1389
|
|
|
1390
1390
|
declare function socialSafetyCheck({ config }: {
|
|
1391
1391
|
config: ResolvedRelizyConfig;
|
|
1392
|
-
}): void
|
|
1392
|
+
}): Promise<void>;
|
|
1393
1393
|
declare function social(options?: Partial<SocialOptions>): Promise<SocialResult>;
|
|
1394
1394
|
|
|
1395
1395
|
export { bump, changelog, checkGitStatusIfDirty, confirmBump, createCommitAndTags, createGitlabRelease, defineConfig, detectGitProvider, detectPackageManager, determinePublishTag, determineReleaseType, determineSemverChange, executeBuildCmd, executeFormatCmd, executeHook, expandPackagesToBumpWithDependents, extractChangelogSummary, extractVersionFromPackageTag, extractVersionFromTag, fetchGitTags, formatChangelogForSlack, formatSlackMessage, formatTweetMessage, generateChangelog, getAuthCommand, getBumpedIndependentPackages, getBumpedPackageIndependently, getCIName, getCurrentGitBranch, getCurrentGitRef, getDefaultConfig, getDependentsOf, getFirstCommit, getGitStatus, getIndependentTag, getLastPackageTag, getLastRepoTag, getLastStableTag, getLastTag, getModifiedReleaseFilePatterns, getPackageCommits, getPackageDependencies, getPackageNewVersion, getPackages, getPackagesOrBumpedPackages, getPackagesToPublishInIndependentMode, getPackagesToPublishInSelectiveMode, getPreid, getReleaseUrl, getRootPackage, getSlackToken, getTwitterCredentials, github, gitlab, hasLernaJson, isBumpedPackage, isChangedPreid, isGraduating, isGraduatingToStableBetweenVersion, isInCI, isPrerelease, isPrereleaseReleaseType, isStableReleaseType, isTagVersionCompatibleWithCurrent, loadRelizyConfig, parseGitRemoteUrl, postReleaseToSlack, postReleaseToTwitter, providerRelease, providerReleaseSafetyCheck, publish, publishPackage, publishSafetyCheck, pushCommitAndTags, readPackageJson, readPackages, release, resolveTags, rollbackModifiedFiles, shouldFilterPrereleaseTags, social, socialSafetyCheck, topologicalSort, updateLernaVersion, writeChangelogToFile, writeVersion };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as bump, c as changelog, o as checkGitStatusIfDirty, ar as confirmBump, y as createCommitAndTags, F as createGitlabRelease, i as defineConfig, u as detectGitProvider, H as detectPackageManager, I as determinePublishTag, af as determineReleaseType, ae as determineSemverChange, aa as executeBuildCmd, a9 as executeFormatCmd, a6 as executeHook, m as expandPackagesToBumpWithDependents, X as extractChangelogSummary, aj as extractVersionFromPackageTag, au as extractVersionFromTag, q as fetchGitTags, U as formatChangelogForSlack, V as formatSlackMessage, a4 as formatTweetMessage, g as generateChangelog, L as getAuthCommand, as as getBumpedIndependentPackages, aq as getBumpedPackageIndependently, a8 as getCIName, C as getCurrentGitBranch, D as getCurrentGitRef, h as getDefaultConfig, k as getDependentsOf, B as getFirstCommit, n as getGitStatus, Z as getIndependentTag, a1 as getLastPackageTag, a0 as getLastRepoTag, _ as getLastStableTag, $ as getLastTag, x as getModifiedReleaseFilePatterns, R as getPackageCommits, j as getPackageDependencies, ah as getPackageNewVersion, Q as getPackages, ac as getPackagesOrBumpedPackages, K as getPackagesToPublishInIndependentMode, J as getPackagesToPublishInSelectiveMode, ao as getPreid, Y as getReleaseUrl, O as getRootPackage, T as getSlackToken, a3 as getTwitterCredentials, E as github, G as gitlab, S as hasLernaJson, ab as isBumpedPackage, ap as isChangedPreid, an as isGraduating, ad as isGraduatingToStableBetweenVersion, a7 as isInCI, ak as isPrerelease, am as isPrereleaseReleaseType, al as isStableReleaseType, av as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, v as parseGitRemoteUrl, W as postReleaseToSlack, a5 as postReleaseToTwitter, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, M as publishPackage, d as publishSafetyCheck, z as pushCommitAndTags, N as readPackageJson, P as readPackages, r as release, a2 as resolveTags, A as rollbackModifiedFiles, at as shouldFilterPrereleaseTags, f as social, s as socialSafetyCheck, t as topologicalSort, ai as updateLernaVersion, w as writeChangelogToFile, ag as writeVersion } from './shared/relizy.
|
|
1
|
+
export { b as bump, c as changelog, o as checkGitStatusIfDirty, ar as confirmBump, y as createCommitAndTags, F as createGitlabRelease, i as defineConfig, u as detectGitProvider, H as detectPackageManager, I as determinePublishTag, af as determineReleaseType, ae as determineSemverChange, aa as executeBuildCmd, a9 as executeFormatCmd, a6 as executeHook, m as expandPackagesToBumpWithDependents, X as extractChangelogSummary, aj as extractVersionFromPackageTag, au as extractVersionFromTag, q as fetchGitTags, U as formatChangelogForSlack, V as formatSlackMessage, a4 as formatTweetMessage, g as generateChangelog, L as getAuthCommand, as as getBumpedIndependentPackages, aq as getBumpedPackageIndependently, a8 as getCIName, C as getCurrentGitBranch, D as getCurrentGitRef, h as getDefaultConfig, k as getDependentsOf, B as getFirstCommit, n as getGitStatus, Z as getIndependentTag, a1 as getLastPackageTag, a0 as getLastRepoTag, _ as getLastStableTag, $ as getLastTag, x as getModifiedReleaseFilePatterns, R as getPackageCommits, j as getPackageDependencies, ah as getPackageNewVersion, Q as getPackages, ac as getPackagesOrBumpedPackages, K as getPackagesToPublishInIndependentMode, J as getPackagesToPublishInSelectiveMode, ao as getPreid, Y as getReleaseUrl, O as getRootPackage, T as getSlackToken, a3 as getTwitterCredentials, E as github, G as gitlab, S as hasLernaJson, ab as isBumpedPackage, ap as isChangedPreid, an as isGraduating, ad as isGraduatingToStableBetweenVersion, a7 as isInCI, ak as isPrerelease, am as isPrereleaseReleaseType, al as isStableReleaseType, av as isTagVersionCompatibleWithCurrent, l as loadRelizyConfig, v as parseGitRemoteUrl, W as postReleaseToSlack, a5 as postReleaseToTwitter, a as providerRelease, p as providerReleaseSafetyCheck, e as publish, M as publishPackage, d as publishSafetyCheck, z as pushCommitAndTags, N as readPackageJson, P as readPackages, r as release, a2 as resolveTags, A as rollbackModifiedFiles, at as shouldFilterPrereleaseTags, f as social, s as socialSafetyCheck, t as topologicalSort, ai as updateLernaVersion, w as writeChangelogToFile, ag as writeVersion } from './shared/relizy.DDnOGyKL.mjs';
|
|
2
2
|
import '@maz-ui/node';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'node:fs';
|
|
@@ -3055,12 +3055,16 @@ function getTwitterCredentials({ socialCredentials, tokenCredentials }) {
|
|
|
3055
3055
|
const accessToken = socialCredentials?.accessToken || tokenCredentials?.accessToken;
|
|
3056
3056
|
const accessTokenSecret = socialCredentials?.accessTokenSecret || tokenCredentials?.accessTokenSecret;
|
|
3057
3057
|
if (!apiKey || !apiKeySecret || !accessToken || !accessTokenSecret) {
|
|
3058
|
-
logger.
|
|
3058
|
+
logger.error("Twitter is enabled but credentials are missing.");
|
|
3059
3059
|
logger.log("Set the following environment variables or configure them in social.twitter.credentials or tokens.twitter:");
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3060
|
+
if (!apiKey)
|
|
3061
|
+
logger.log(" - TWITTER_API_KEY or RELIZY_TWITTER_API_KEY");
|
|
3062
|
+
if (!apiKeySecret)
|
|
3063
|
+
logger.log(" - TWITTER_API_KEY_SECRET or RELIZY_TWITTER_API_KEY_SECRET");
|
|
3064
|
+
if (!accessToken)
|
|
3065
|
+
logger.log(" - TWITTER_ACCESS_TOKEN or RELIZY_TWITTER_ACCESS_TOKEN");
|
|
3066
|
+
if (!accessTokenSecret)
|
|
3067
|
+
logger.log(" - TWITTER_ACCESS_TOKEN_SECRET or RELIZY_TWITTER_ACCESS_TOKEN_SECRET");
|
|
3064
3068
|
logger.info("Skipping Twitter post");
|
|
3065
3069
|
return null;
|
|
3066
3070
|
}
|
|
@@ -3662,7 +3666,7 @@ function providerReleaseSafetyCheck({ config, provider }) {
|
|
|
3662
3666
|
throw new Error(`Unsupported Git provider: ${internalProvider || "unknown"}`);
|
|
3663
3667
|
}
|
|
3664
3668
|
if (!token) {
|
|
3665
|
-
throw new Error(`No token provided for ${internalProvider
|
|
3669
|
+
throw new Error(`No token provided for ${internalProvider} - The release will not be published - Please refer to the documentation: https://louismazel.github.io/relizy/guide/installation#environment-setup`);
|
|
3666
3670
|
}
|
|
3667
3671
|
logger.info("provider release config checked successfully");
|
|
3668
3672
|
}
|
|
@@ -3775,6 +3779,8 @@ async function publishSafetyCheck({ config }) {
|
|
|
3775
3779
|
} catch (error) {
|
|
3776
3780
|
throw new Error("Failed to authenticate to package registry", { cause: error });
|
|
3777
3781
|
}
|
|
3782
|
+
} else {
|
|
3783
|
+
logger.debug(`Skipping authentication to package registry because "${packageManager}" is not supported`);
|
|
3778
3784
|
}
|
|
3779
3785
|
}
|
|
3780
3786
|
async function publish(options = {}) {
|
|
@@ -3873,49 +3879,61 @@ async function publish(options = {}) {
|
|
|
3873
3879
|
}
|
|
3874
3880
|
}
|
|
3875
3881
|
|
|
3876
|
-
function socialSafetyCheck({ config }) {
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
logger.debug("Start checking social config");
|
|
3883
|
-
const errors = {
|
|
3884
|
-
twitter: false,
|
|
3885
|
-
slack: false
|
|
3886
|
-
};
|
|
3887
|
-
const twitterConfig = config.social?.twitter;
|
|
3888
|
-
if (twitterConfig?.enabled) {
|
|
3889
|
-
const credentials = getTwitterCredentials({
|
|
3890
|
-
socialCredentials: twitterConfig.credentials,
|
|
3891
|
-
tokenCredentials: config.tokens?.twitter
|
|
3892
|
-
});
|
|
3893
|
-
if (!credentials) {
|
|
3894
|
-
errors.twitter = true;
|
|
3882
|
+
async function socialSafetyCheck({ config }) {
|
|
3883
|
+
try {
|
|
3884
|
+
const socialMediaDisabled = !config.release.social && !config.social.twitter.enabled && !config.social.slack.enabled;
|
|
3885
|
+
if (!config.safetyCheck || socialMediaDisabled) {
|
|
3886
|
+
logger.debug("Safety check disabled or social disabled");
|
|
3887
|
+
return;
|
|
3895
3888
|
}
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3889
|
+
logger.debug("Start checking social config");
|
|
3890
|
+
const twitterConfig = config.social?.twitter;
|
|
3891
|
+
if (twitterConfig?.enabled) {
|
|
3892
|
+
const credentials = getTwitterCredentials({
|
|
3893
|
+
socialCredentials: twitterConfig.credentials,
|
|
3894
|
+
tokenCredentials: config.tokens?.twitter
|
|
3895
|
+
});
|
|
3896
|
+
if (!credentials) {
|
|
3897
|
+
logger.fail("Twitter credentials not found");
|
|
3898
|
+
throw new Error("Twitter credentials not found");
|
|
3899
|
+
}
|
|
3900
|
+
try {
|
|
3901
|
+
await import('twitter-api-v2');
|
|
3902
|
+
} catch {
|
|
3903
|
+
logger.fail("twitter-api-v2 is not installed, please install it");
|
|
3904
|
+
throw new Error("twitter-api-v2 is not installed");
|
|
3905
|
+
}
|
|
3908
3906
|
}
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3907
|
+
const slackConfig = config.social?.slack;
|
|
3908
|
+
if (slackConfig?.enabled) {
|
|
3909
|
+
const token = getSlackToken({
|
|
3910
|
+
socialCredentials: slackConfig.credentials,
|
|
3911
|
+
tokenCredential: config.tokens?.slack
|
|
3912
|
+
});
|
|
3913
|
+
try {
|
|
3914
|
+
await import('@slack/web-api');
|
|
3915
|
+
} catch {
|
|
3916
|
+
logger.fail("@slack/web-api is not installed, please install it");
|
|
3917
|
+
throw new Error("@slack/web-api is not installed");
|
|
3918
|
+
}
|
|
3919
|
+
if (!token) {
|
|
3920
|
+
logger.fail("Slack is enabled but credentials are missing.");
|
|
3921
|
+
logger.log("Set the following environment variables or configure them in social.slack.credentials or tokens.slack:");
|
|
3922
|
+
logger.log(" - SLACK_TOKEN or RELIZY_SLACK_TOKEN");
|
|
3923
|
+
throw new Error("Slack credentials not found");
|
|
3924
|
+
}
|
|
3925
|
+
if (!slackConfig.channel) {
|
|
3926
|
+
logger.fail("Slack is enabled but no channel is configured.");
|
|
3927
|
+
logger.log('Set the channel in social.slack.channel (e.g., "#releases" or "C1234567890")');
|
|
3928
|
+
throw new Error("Slack channel not found");
|
|
3929
|
+
}
|
|
3913
3930
|
}
|
|
3931
|
+
logger.info("Social config checked successfully");
|
|
3932
|
+
} catch (error) {
|
|
3933
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
3934
|
+
logger.error("Error during social safety check:", errorMessage);
|
|
3935
|
+
throw new Error(`Error during social safety check: ${errorMessage}`);
|
|
3914
3936
|
}
|
|
3915
|
-
if (errors.twitter || errors.slack) {
|
|
3916
|
-
throw new Error("Social config checked with errors");
|
|
3917
|
-
}
|
|
3918
|
-
logger.info("Social config checked successfully");
|
|
3919
3937
|
}
|
|
3920
3938
|
async function handleTwitterPost({
|
|
3921
3939
|
config,
|
|
@@ -4070,7 +4088,7 @@ async function social(options = {}) {
|
|
|
4070
4088
|
}
|
|
4071
4089
|
});
|
|
4072
4090
|
logger.debug(`Version mode: ${config.monorepo?.versionMode || "standalone"}`);
|
|
4073
|
-
socialSafetyCheck({ config });
|
|
4091
|
+
await socialSafetyCheck({ config });
|
|
4074
4092
|
if (!config.release.social && !config.social?.twitter?.enabled && !config.social?.slack?.enabled) {
|
|
4075
4093
|
logger.warn("Social media posting is disabled in configuration.");
|
|
4076
4094
|
logger.info("Enable it with release.social: true or social.twitter.enabled: true or social.slack.enabled: true");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "relizy",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"description": "Changelogen adapter for monorepo management with unified and independent versioning",
|
|
6
6
|
"author": "Louis Mazel <me@loicmazuel.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
}
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@inquirer/prompts": "^8.
|
|
70
|
+
"@inquirer/prompts": "^8.2.0",
|
|
71
71
|
"@maz-ui/node": "4.3.4-beta.0",
|
|
72
72
|
"@maz-ui/utils": "^4.3.0",
|
|
73
73
|
"c12": "^3.3.3",
|
|
@@ -80,25 +80,25 @@
|
|
|
80
80
|
"semver": "^7.7.2"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"@commitlint/cli": "^20.
|
|
84
|
-
"@commitlint/config-conventional": "^20.
|
|
85
|
-
"@commitlint/cz-commitlint": "^20.
|
|
86
|
-
"@commitlint/types": "^20.
|
|
83
|
+
"@commitlint/cli": "^20.3.1",
|
|
84
|
+
"@commitlint/config-conventional": "^20.3.1",
|
|
85
|
+
"@commitlint/cz-commitlint": "^20.3.1",
|
|
86
|
+
"@commitlint/types": "^20.3.1",
|
|
87
87
|
"@maz-ui/eslint-config": "4.3.2",
|
|
88
88
|
"@slack/web-api": "^7.12.0",
|
|
89
|
-
"@types/node": "^25.0.
|
|
89
|
+
"@types/node": "^25.0.9",
|
|
90
90
|
"@types/semver": "^7.7.1",
|
|
91
|
-
"@vitest/coverage-v8": "^4.0.
|
|
91
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
92
92
|
"cross-env": "^10.1.0",
|
|
93
93
|
"eslint": "^9.39.2",
|
|
94
94
|
"husky": "^9.1.7",
|
|
95
95
|
"jiti": "^2.6.1",
|
|
96
96
|
"lint-staged": "^16.2.7",
|
|
97
|
-
"memfs": "^4.
|
|
98
|
-
"twitter-api-v2": "^1.
|
|
97
|
+
"memfs": "^4.56.2",
|
|
98
|
+
"twitter-api-v2": "^1.29.0",
|
|
99
99
|
"typescript": "^5.9.3",
|
|
100
100
|
"unbuild": "^3.6.1",
|
|
101
|
-
"vitest": "^4.0.
|
|
101
|
+
"vitest": "^4.0.17"
|
|
102
102
|
},
|
|
103
103
|
"lint-staged": {
|
|
104
104
|
"*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [
|