@astral/pack 1.4.0 → 1.4.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.
|
@@ -8,7 +8,7 @@ const sendTelegramFailRelease = async ({ chatId, botToken, packageName, ciJobId
|
|
|
8
8
|
}
|
|
9
9
|
const { repositoryUrl } = config.semanticRelease;
|
|
10
10
|
const telegram = (0, services_1.createTelegram)({ chatId, botToken });
|
|
11
|
-
const { name } = config.parseOriginPackageJson();
|
|
11
|
+
const { name } = config.parseOriginPackageJson({ ignoreMain: true });
|
|
12
12
|
await telegram.sendMessage(`‼️ Ошибка релиза ${packageName || name}:\n ${repositoryUrl}/-/jobs/${ciJobId}`);
|
|
13
13
|
};
|
|
14
14
|
exports.sendTelegramFailRelease = sendTelegramFailRelease;
|
|
@@ -29,7 +29,9 @@ export declare class ConfigService {
|
|
|
29
29
|
};
|
|
30
30
|
get packageExports(): import("../types").PackageExports | undefined;
|
|
31
31
|
get omitPackageJsonProps(): string[] | undefined;
|
|
32
|
-
parseOriginPackageJson: (
|
|
32
|
+
parseOriginPackageJson: ({ ignoreMain, }?: {
|
|
33
|
+
ignoreMain?: boolean;
|
|
34
|
+
}) => PackageJson;
|
|
33
35
|
private parseConfig;
|
|
34
36
|
private checkLanguage;
|
|
35
37
|
}
|
|
@@ -95,9 +95,9 @@ class ConfigService {
|
|
|
95
95
|
get omitPackageJsonProps() {
|
|
96
96
|
return this.config.omitPackageJsonProps;
|
|
97
97
|
}
|
|
98
|
-
parseOriginPackageJson = () => {
|
|
98
|
+
parseOriginPackageJson = ({ ignoreMain, } = {}) => {
|
|
99
99
|
const packageJson = JSON.parse(fs_1.default.readFileSync(path_1.default.join(this.projectPath, 'package.json'), 'utf8'));
|
|
100
|
-
if (!packageJson.main) {
|
|
100
|
+
if (!ignoreMain && !packageJson.main) {
|
|
101
101
|
throw new Error('В package.json не определен main');
|
|
102
102
|
}
|
|
103
103
|
if (!packageJson.name) {
|