renovate 43.237.0 → 43.238.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/modules/datasource/dart/index.js +12 -4
- package/dist/modules/datasource/dart/index.js.map +1 -1
- package/dist/modules/datasource/dart/schema.js +5 -1
- package/dist/modules/datasource/dart/schema.js.map +1 -1
- package/dist/modules/datasource/npm/schema.d.ts +85 -0
- package/dist/modules/datasource/npm/schema.js +1 -1
- package/dist/modules/manager/mix/artifacts.js +1 -1
- package/dist/modules/manager/mix/artifacts.js.map +1 -1
- package/dist/modules/platform/github/schema.d.ts +4 -4
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
- package/dist/modules/datasource/npm/types.d.ts +0 -11
- package/dist/modules/datasource/npm/types.js +0 -1
|
@@ -3,6 +3,7 @@ import "../../versioning/npm/index.js";
|
|
|
3
3
|
import { asTimestamp } from "../../../util/timestamp.js";
|
|
4
4
|
import { Datasource } from "../datasource.js";
|
|
5
5
|
import { DartResult } from "./schema.js";
|
|
6
|
+
import { isEmptyObject, isNonEmptyString } from "@sindresorhus/is";
|
|
6
7
|
//#region lib/modules/datasource/dart/index.ts
|
|
7
8
|
var DartDatasource = class DartDatasource extends Datasource {
|
|
8
9
|
static id = "dart";
|
|
@@ -29,10 +30,17 @@ var DartDatasource = class DartDatasource extends Datasource {
|
|
|
29
30
|
}
|
|
30
31
|
if (body) {
|
|
31
32
|
const { versions, latest } = body;
|
|
32
|
-
const releases = versions?.filter(({ retracted }) => !retracted)?.map(({ version, published }) =>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
const releases = versions?.filter(({ retracted }) => !retracted)?.map(({ version, published, pubspec }) => {
|
|
34
|
+
const release = {
|
|
35
|
+
version,
|
|
36
|
+
releaseTimestamp: asTimestamp(published)
|
|
37
|
+
};
|
|
38
|
+
const constraints = {};
|
|
39
|
+
if (isNonEmptyString(pubspec?.environment?.sdk)) constraints.dart = [pubspec.environment.sdk];
|
|
40
|
+
if (isNonEmptyString(pubspec?.environment?.flutter)) constraints.flutter = [pubspec.environment.flutter];
|
|
41
|
+
if (!isEmptyObject(constraints)) release.constraints = constraints;
|
|
42
|
+
return release;
|
|
43
|
+
});
|
|
36
44
|
if (releases && latest) {
|
|
37
45
|
result = { releases };
|
|
38
46
|
const pubspec = latest.pubspec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/dart/index.ts"],"sourcesContent":["import { asTimestamp } from '../../../util/timestamp.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport { id as npmId } from '../../versioning/npm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, ReleaseResult } from '../types.ts';\nimport { DartResult } from './schema.ts';\n\nexport class DartDatasource extends Datasource {\n static readonly id = 'dart';\n\n constructor() {\n super(DartDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://pub.dartlang.org/'];\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `published` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `repository` field of the latest release object in the results.';\n override readonly defaultVersioning = npmId;\n\n async getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n let result: ReleaseResult | null = null;\n const pkgUrl = `${ensureTrailingSlash(\n registryUrl,\n )}api/packages/${packageName}`;\n\n let body: DartResult | null = null;\n try {\n const raw = await this.http.getJson(pkgUrl, DartResult);\n body = raw.body;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n\n if (body) {\n const { versions, latest } = body;\n const releases = versions\n ?.filter(({ retracted }) => !retracted)\n ?.map(({ version, published }) =>
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/datasource/dart/index.ts"],"sourcesContent":["import { isEmptyObject, isNonEmptyString } from '@sindresorhus/is';\nimport type { ConstraintName } from '../../../util/exec/types.ts';\nimport { asTimestamp } from '../../../util/timestamp.ts';\nimport { ensureTrailingSlash } from '../../../util/url.ts';\nimport { id as npmId } from '../../versioning/npm/index.ts';\nimport { Datasource } from '../datasource.ts';\nimport type { GetReleasesConfig, Release, ReleaseResult } from '../types.ts';\nimport { DartResult } from './schema.ts';\n\nexport class DartDatasource extends Datasource {\n static readonly id = 'dart';\n\n constructor() {\n super(DartDatasource.id);\n }\n\n override readonly customRegistrySupport = true;\n\n override readonly defaultRegistryUrls = ['https://pub.dartlang.org/'];\n\n override readonly releaseTimestampSupport = true;\n override readonly releaseTimestampNote =\n 'The release timestamp is determined from the `published` field in the results.';\n override readonly sourceUrlSupport = 'package';\n override readonly sourceUrlNote =\n 'The source URL is determined from the `repository` field of the latest release object in the results.';\n override readonly defaultVersioning = npmId;\n\n async getReleases({\n packageName,\n registryUrl,\n }: GetReleasesConfig): Promise<ReleaseResult | null> {\n /* v8 ignore next 3 -- should never happen */\n if (!registryUrl) {\n return null;\n }\n let result: ReleaseResult | null = null;\n const pkgUrl = `${ensureTrailingSlash(\n registryUrl,\n )}api/packages/${packageName}`;\n\n let body: DartResult | null = null;\n try {\n const raw = await this.http.getJson(pkgUrl, DartResult);\n body = raw.body;\n } catch (err) {\n this.handleGenericErrors(err);\n }\n\n if (body) {\n const { versions, latest } = body;\n const releases = versions\n ?.filter(({ retracted }) => !retracted)\n ?.map(({ version, published, pubspec }) => {\n const release: Release = {\n version,\n releaseTimestamp: asTimestamp(published),\n };\n\n const constraints: Partial<Record<ConstraintName, string[]>> = {};\n if (isNonEmptyString(pubspec?.environment?.sdk)) {\n constraints.dart = [pubspec.environment.sdk];\n }\n if (isNonEmptyString(pubspec?.environment?.flutter)) {\n constraints.flutter = [pubspec.environment.flutter];\n }\n if (!isEmptyObject(constraints)) {\n release.constraints = constraints;\n }\n\n return release;\n });\n if (releases && latest) {\n result = { releases };\n\n const pubspec = latest.pubspec;\n if (pubspec) {\n if (pubspec.homepage) {\n result.homepage = pubspec.homepage;\n }\n\n if (pubspec.repository) {\n result.sourceUrl = pubspec.repository;\n }\n }\n }\n }\n return result;\n }\n}\n"],"mappings":";;;;;;;AASA,IAAa,iBAAb,MAAa,uBAAuB,WAAW;CAC7C,OAAgB,KAAK;CAErB,cAAc;EACZ,MAAM,eAAe,EAAE;CACzB;CAEA,wBAA0C;CAE1C,sBAAwC,CAAC,2BAA2B;CAEpE,0BAA4C;CAC5C,uBACE;CACF,mBAAqC;CACrC,gBACE;CACF,oBAAkB;CAElB,MAAM,YAAY,EAChB,aACA,eACmD;;EAEnD,IAAI,CAAC,aACH,OAAO;EAET,IAAI,SAA+B;EACnC,MAAM,SAAS,GAAG,oBAChB,WACF,EAAE,eAAe;EAEjB,IAAI,OAA0B;EAC9B,IAAI;GAEF,QAAO,MADW,KAAK,KAAK,QAAQ,QAAQ,UAAU,EAAA,CAC3C;EACb,SAAS,KAAK;GACZ,KAAK,oBAAoB,GAAG;EAC9B;EAEA,IAAI,MAAM;GACR,MAAM,EAAE,UAAU,WAAW;GAC7B,MAAM,WAAW,UACb,QAAQ,EAAE,gBAAgB,CAAC,SAAS,CAAC,EACrC,KAAK,EAAE,SAAS,WAAW,cAAc;IACzC,MAAM,UAAmB;KACvB;KACA,kBAAkB,YAAY,SAAS;IACzC;IAEA,MAAM,cAAyD,CAAC;IAChE,IAAI,iBAAiB,SAAS,aAAa,GAAG,GAC5C,YAAY,OAAO,CAAC,QAAQ,YAAY,GAAG;IAE7C,IAAI,iBAAiB,SAAS,aAAa,OAAO,GAChD,YAAY,UAAU,CAAC,QAAQ,YAAY,OAAO;IAEpD,IAAI,CAAC,cAAc,WAAW,GAC5B,QAAQ,cAAc;IAGxB,OAAO;GACT,CAAC;GACH,IAAI,YAAY,QAAQ;IACtB,SAAS,EAAE,SAAS;IAEpB,MAAM,UAAU,OAAO;IACvB,IAAI,SAAS;KACX,IAAI,QAAQ,UACV,OAAO,WAAW,QAAQ;KAG5B,IAAI,QAAQ,YACV,OAAO,YAAY,QAAQ;IAE/B;GACF;EACF;EACA,OAAO;CACT;AACF"}
|
|
@@ -4,7 +4,11 @@ import { z } from "zod/v4";
|
|
|
4
4
|
const DartVersionEntry = z.object({
|
|
5
5
|
version: z.string(),
|
|
6
6
|
published: z.string().optional(),
|
|
7
|
-
retracted: z.boolean().optional()
|
|
7
|
+
retracted: z.boolean().optional(),
|
|
8
|
+
pubspec: z.object({ environment: z.object({
|
|
9
|
+
sdk: z.string().optional(),
|
|
10
|
+
flutter: z.string().optional()
|
|
11
|
+
}).optional() }).optional()
|
|
8
12
|
});
|
|
9
13
|
const DartLatest = z.object({ pubspec: z.object({
|
|
10
14
|
homepage: z.string().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/dart/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\nconst DartVersionEntry = z.object({\n version: z.string(),\n published: z.string().optional(),\n retracted: z.boolean().optional(),\n});\n\nconst DartLatest = z.object({\n pubspec: z\n .object({\n homepage: z.string().optional(),\n repository: z.string().optional(),\n })\n .optional(),\n});\n\nexport const DartResult = z.object({\n versions: LooseArray(DartVersionEntry).optional(),\n latest: DartLatest.optional(),\n});\n\nexport type DartResult = z.infer<typeof DartResult>;\n"],"mappings":";;;AAGA,MAAM,mBAAmB,EAAE,OAAO;CAChC,SAAS,EAAE,OAAO;CAClB,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;
|
|
1
|
+
{"version":3,"file":"schema.js","names":[],"sources":["../../../../lib/modules/datasource/dart/schema.ts"],"sourcesContent":["import { z } from 'zod/v4';\nimport { LooseArray } from '../../../util/schema-utils/index.ts';\n\nconst DartVersionEntry = z.object({\n version: z.string(),\n published: z.string().optional(),\n retracted: z.boolean().optional(),\n pubspec: z\n .object({\n environment: z\n .object({\n sdk: z.string().optional(),\n flutter: z.string().optional(),\n })\n .optional(),\n })\n .optional(),\n});\n\nconst DartLatest = z.object({\n pubspec: z\n .object({\n homepage: z.string().optional(),\n repository: z.string().optional(),\n })\n .optional(),\n});\n\nexport const DartResult = z.object({\n versions: LooseArray(DartVersionEntry).optional(),\n latest: DartLatest.optional(),\n});\n\nexport type DartResult = z.infer<typeof DartResult>;\n"],"mappings":";;;AAGA,MAAM,mBAAmB,EAAE,OAAO;CAChC,SAAS,EAAE,OAAO;CAClB,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS;CAChC,SAAS,EACN,OAAO,EACN,aAAa,EACV,OAAO;EACN,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS;EACzB,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,CAAC,CAAC,CACD,SAAS,EACd,CAAC,CAAC,CACD,SAAS;AACd,CAAC;AAED,MAAM,aAAa,EAAE,OAAO,EAC1B,SAAS,EACN,OAAO;CACN,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS;AAClC,CAAC,CAAC,CACD,SAAS,EACd,CAAC;AAED,MAAa,aAAa,EAAE,OAAO;CACjC,UAAU,WAAW,gBAAgB,CAAC,CAAC,SAAS;CAChD,QAAQ,WAAW,SAAS;AAC9B,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { z } from "zod/v4";
|
|
2
|
+
|
|
3
|
+
//#region lib/modules/datasource/npm/schema.d.ts
|
|
4
|
+
declare const NpmResponseVersion: z.ZodObject<{
|
|
5
|
+
repository: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<any, unknown>>, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
6
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
+
}, z.core.$strip>]>>>;
|
|
9
|
+
homepage: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
10
|
+
deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
11
|
+
gitHead: z.ZodOptional<z.ZodString>;
|
|
12
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
13
|
+
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
|
+
engines: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
15
|
+
node: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>>>;
|
|
17
|
+
dist: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
attestations: z.ZodOptional<z.ZodObject<{
|
|
19
|
+
url: z.ZodOptional<z.ZodString>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strip>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
type NpmResponseVersion = z.infer<typeof NpmResponseVersion>;
|
|
24
|
+
declare const CachedPackument: z.ZodObject<{
|
|
25
|
+
versions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
26
|
+
repository: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<any, unknown>>, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
27
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
28
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
29
|
+
}, z.core.$strip>]>>>;
|
|
30
|
+
homepage: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
31
|
+
deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
32
|
+
gitHead: z.ZodOptional<z.ZodString>;
|
|
33
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
34
|
+
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
35
|
+
engines: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
36
|
+
node: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strip>>>;
|
|
38
|
+
dist: z.ZodOptional<z.ZodObject<{
|
|
39
|
+
attestations: z.ZodOptional<z.ZodObject<{
|
|
40
|
+
url: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, z.core.$strip>>;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
repository: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
45
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
}, z.core.$strip>]>>;
|
|
48
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
49
|
+
time: z.ZodOptional<z.ZodType<Record<string, string>, any, z.core.$ZodTypeInternals<Record<string, string>, any>>>;
|
|
50
|
+
'dist-tags': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
declare const NpmResponse: z.ZodObject<{
|
|
53
|
+
_id: z.ZodOptional<z.ZodString>;
|
|
54
|
+
name: z.ZodOptional<z.ZodString>;
|
|
55
|
+
versions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
56
|
+
repository: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<any, unknown>>, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
57
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
58
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
59
|
+
}, z.core.$strip>]>>>;
|
|
60
|
+
homepage: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
61
|
+
deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodBoolean]>>;
|
|
62
|
+
gitHead: z.ZodOptional<z.ZodString>;
|
|
63
|
+
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
64
|
+
devDependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
65
|
+
engines: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
66
|
+
node: z.ZodOptional<z.ZodString>;
|
|
67
|
+
}, z.core.$strip>>>;
|
|
68
|
+
dist: z.ZodOptional<z.ZodObject<{
|
|
69
|
+
attestations: z.ZodOptional<z.ZodObject<{
|
|
70
|
+
url: z.ZodOptional<z.ZodString>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>>;
|
|
73
|
+
}, z.core.$loose>>>;
|
|
74
|
+
repository: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnknown, z.ZodTransform<any, unknown>>, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
75
|
+
url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
directory: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
77
|
+
}, z.core.$strip>]>>>;
|
|
78
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
79
|
+
time: z.ZodOptional<z.ZodType<Record<string, string>, any, z.core.$ZodTypeInternals<Record<string, string>, any>>>;
|
|
80
|
+
'dist-tags': z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
type NpmResponse = z.infer<typeof NpmResponse>;
|
|
83
|
+
//#endregion
|
|
84
|
+
export { CachedPackument, NpmResponse, NpmResponseVersion };
|
|
85
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -83,7 +83,7 @@ async function updateArtifacts({ packageFileName, updatedDeps, newPackageFileCon
|
|
|
83
83
|
docker: {},
|
|
84
84
|
toolConstraints: [{
|
|
85
85
|
toolName: "erlang",
|
|
86
|
-
constraint: config.constraints?.erlang ??
|
|
86
|
+
constraint: config.constraints?.erlang ?? `^26`
|
|
87
87
|
}, {
|
|
88
88
|
toolName: "elixir",
|
|
89
89
|
constraint: config.constraints?.elixir
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","names":["hostRules\n .getAll","hostRules.find"],"sources":["../../../../lib/modules/manager/mix/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n findLocalSiblingOrParent,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\n\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\n\nconst hexRepoUrl = 'https://hex.pm/';\nconst hexRepoOrgUrlRegex = regEx(\n `^https://hex\\\\.pm/api/repos/(?<organization>[a-z0-9_]+)/$`,\n);\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`mix.getArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (isEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated mix deps');\n return null;\n }\n\n let lockFileName = getSiblingFileName(packageFileName, 'mix.lock');\n let isUmbrella = false;\n\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n const lockFileError = await checkLockFileReadError(lockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n\n const parentLockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'mix.lock',\n );\n existingLockFileContent =\n parentLockFileName && (await readLocalFile(parentLockFileName, 'utf8'));\n\n if (parentLockFileName && existingLockFileContent) {\n lockFileName = parentLockFileName;\n isUmbrella = true;\n } else if (parentLockFileName) {\n const lockFileError = await checkLockFileReadError(parentLockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n }\n }\n\n if (isLockFileMaintenance && isUmbrella) {\n logger.debug(\n `Cannot use lockFileMaintenance in an umbrella project, see ${GlobalConfig.get('productLinks').documentation}modules/manager/mix/#lockFileMaintenance`,\n );\n return null;\n }\n\n if (isLockFileMaintenance && !existingLockFileContent) {\n logger.debug(\n 'Cannot use lockFileMaintenance when no mix.lock file is present',\n );\n return null;\n }\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n } catch (err) {\n logger.warn({ err }, 'mix.exs could not be written');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n if (!existingLockFileContent) {\n logger.debug('No mix.lock found');\n return null;\n }\n\n const organizations = new Set<string>();\n\n const hexHostRulesWithMatchHost = hostRules\n .getAll()\n .filter(\n (hostRule) =>\n !!hostRule.matchHost && hexRepoOrgUrlRegex.test(hostRule.matchHost),\n );\n\n for (const { matchHost } of hexHostRulesWithMatchHost) {\n if (matchHost) {\n const result = hexRepoOrgUrlRegex.exec(matchHost);\n\n if (result?.groups) {\n const { organization } = result.groups;\n organizations.add(organization);\n }\n }\n }\n\n for (const { packageName } of updatedDeps) {\n if (packageName) {\n const [, organization] = packageName.split(':');\n\n if (organization) {\n organizations.add(organization);\n }\n }\n }\n\n const preCommands = Array.from(organizations).reduce((acc, organization) => {\n const url = `${hexRepoUrl}api/repos/${organization}/`;\n const { token } = hostRules.find({ url });\n\n if (token) {\n logger.debug(`Authenticating to hex organization ${organization}`);\n const authCommand = `mix hex.organization auth ${organization} --key ${token}`;\n return [...acc, authCommand];\n }\n\n return acc;\n }, [] as string[]);\n\n const execOptions: ExecOptions = {\n extraEnv: {\n // https://hexdocs.pm/mix/1.15.0/Mix.Tasks.Archive.html\n // TODO: should include a version constraint\n MIX_ARCHIVES: await ensureCacheDir('mix_archives'),\n },\n cwdFile: packageFileName,\n docker: {},\n toolConstraints: [\n {\n toolName: 'erlang',\n // https://hexdocs.pm/elixir/1.14.5/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp\n constraint: config.constraints?.erlang ??
|
|
1
|
+
{"version":3,"file":"artifacts.js","names":["hostRules\n .getAll","hostRules.find"],"sources":["../../../../lib/modules/manager/mix/artifacts.ts"],"sourcesContent":["import { isEmptyArray, isString } from '@sindresorhus/is';\nimport { quote } from 'shlex';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { TEMPORARY_ERROR } from '../../../constants/error-messages.ts';\nimport { logger } from '../../../logger/index.ts';\nimport { exec } from '../../../util/exec/index.ts';\nimport type { ExecOptions } from '../../../util/exec/types.ts';\nimport {\n deleteLocalFile,\n ensureCacheDir,\n findLocalSiblingOrParent,\n getSiblingFileName,\n localPathExists,\n readLocalFile,\n writeLocalFile,\n} from '../../../util/fs/index.ts';\nimport * as hostRules from '../../../util/host-rules.ts';\nimport { regEx } from '../../../util/regex.ts';\n\nimport type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';\n\nconst hexRepoUrl = 'https://hex.pm/';\nconst hexRepoOrgUrlRegex = regEx(\n `^https://hex\\\\.pm/api/repos/(?<organization>[a-z0-9_]+)/$`,\n);\n\nexport async function updateArtifacts({\n packageFileName,\n updatedDeps,\n newPackageFileContent,\n config,\n}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {\n logger.debug(`mix.getArtifacts(${packageFileName})`);\n const { isLockFileMaintenance } = config;\n\n if (isEmptyArray(updatedDeps) && !isLockFileMaintenance) {\n logger.debug('No updated mix deps');\n return null;\n }\n\n let lockFileName = getSiblingFileName(packageFileName, 'mix.lock');\n let isUmbrella = false;\n\n let existingLockFileContent = await readLocalFile(lockFileName, 'utf8');\n if (!existingLockFileContent) {\n const lockFileError = await checkLockFileReadError(lockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n\n const parentLockFileName = await findLocalSiblingOrParent(\n packageFileName,\n 'mix.lock',\n );\n existingLockFileContent =\n parentLockFileName && (await readLocalFile(parentLockFileName, 'utf8'));\n\n if (parentLockFileName && existingLockFileContent) {\n lockFileName = parentLockFileName;\n isUmbrella = true;\n } else if (parentLockFileName) {\n const lockFileError = await checkLockFileReadError(parentLockFileName);\n if (lockFileError) {\n return lockFileError;\n }\n }\n }\n\n if (isLockFileMaintenance && isUmbrella) {\n logger.debug(\n `Cannot use lockFileMaintenance in an umbrella project, see ${GlobalConfig.get('productLinks').documentation}modules/manager/mix/#lockFileMaintenance`,\n );\n return null;\n }\n\n if (isLockFileMaintenance && !existingLockFileContent) {\n logger.debug(\n 'Cannot use lockFileMaintenance when no mix.lock file is present',\n );\n return null;\n }\n\n try {\n await writeLocalFile(packageFileName, newPackageFileContent);\n if (isLockFileMaintenance) {\n await deleteLocalFile(lockFileName);\n }\n } catch (err) {\n logger.warn({ err }, 'mix.exs could not be written');\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n if (!existingLockFileContent) {\n logger.debug('No mix.lock found');\n return null;\n }\n\n const organizations = new Set<string>();\n\n const hexHostRulesWithMatchHost = hostRules\n .getAll()\n .filter(\n (hostRule) =>\n !!hostRule.matchHost && hexRepoOrgUrlRegex.test(hostRule.matchHost),\n );\n\n for (const { matchHost } of hexHostRulesWithMatchHost) {\n if (matchHost) {\n const result = hexRepoOrgUrlRegex.exec(matchHost);\n\n if (result?.groups) {\n const { organization } = result.groups;\n organizations.add(organization);\n }\n }\n }\n\n for (const { packageName } of updatedDeps) {\n if (packageName) {\n const [, organization] = packageName.split(':');\n\n if (organization) {\n organizations.add(organization);\n }\n }\n }\n\n const preCommands = Array.from(organizations).reduce((acc, organization) => {\n const url = `${hexRepoUrl}api/repos/${organization}/`;\n const { token } = hostRules.find({ url });\n\n if (token) {\n logger.debug(`Authenticating to hex organization ${organization}`);\n const authCommand = `mix hex.organization auth ${organization} --key ${token}`;\n return [...acc, authCommand];\n }\n\n return acc;\n }, [] as string[]);\n\n // renovate: will update this\n const erlangVersion = '26';\n\n const execOptions: ExecOptions = {\n extraEnv: {\n // https://hexdocs.pm/mix/1.15.0/Mix.Tasks.Archive.html\n // TODO: should include a version constraint\n MIX_ARCHIVES: await ensureCacheDir('mix_archives'),\n },\n cwdFile: packageFileName,\n docker: {},\n toolConstraints: [\n {\n toolName: 'erlang',\n // https://hexdocs.pm/elixir/1.14.5/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp\n constraint: config.constraints?.erlang ?? `^${erlangVersion}`,\n },\n {\n toolName: 'elixir',\n constraint: config.constraints?.elixir,\n },\n ],\n preCommands,\n };\n\n let command: string;\n if (isLockFileMaintenance) {\n command = 'mix deps.get';\n } else {\n command = [\n 'mix',\n 'deps.update',\n ...updatedDeps\n .map((dep) => dep.depName)\n .filter(isString)\n .map((dep) => quote(dep)),\n ].join(' ');\n }\n\n try {\n await exec(command, execOptions);\n } catch (err) {\n /* v8 ignore next 3 */\n if (err.message === TEMPORARY_ERROR) {\n throw err;\n }\n\n logger.debug(\n { err, message: err.message, command },\n 'Failed to update Mix lock file',\n );\n\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: err.message,\n },\n },\n ];\n }\n\n const newMixLockContent = await readLocalFile(lockFileName, 'utf8');\n if (existingLockFileContent === newMixLockContent) {\n logger.debug('mix.lock is unchanged');\n return null;\n }\n logger.debug('Returning updated mix.lock');\n return [\n {\n file: {\n type: 'addition',\n path: lockFileName,\n contents: newMixLockContent,\n },\n },\n ];\n}\n\nasync function checkLockFileReadError(\n lockFileName: string,\n): Promise<UpdateArtifactsResult[] | null> {\n if (await localPathExists(lockFileName)) {\n return [\n {\n artifactError: {\n fileName: lockFileName,\n stderr: `Error reading ${lockFileName}`,\n },\n },\n ];\n }\n return null;\n}\n"],"mappings":"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"}
|
|
@@ -27,7 +27,7 @@ declare const GithubVulnerabilityAlerts: z.ZodPipe<z.ZodType<{
|
|
|
27
27
|
};
|
|
28
28
|
security_vulnerability: {
|
|
29
29
|
package: {
|
|
30
|
-
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "
|
|
30
|
+
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "nuget" | "actions" | "pip";
|
|
31
31
|
name: string;
|
|
32
32
|
};
|
|
33
33
|
severity: "low" | "medium" | "high" | "critical";
|
|
@@ -66,7 +66,7 @@ declare const GithubVulnerabilityAlerts: z.ZodPipe<z.ZodType<{
|
|
|
66
66
|
};
|
|
67
67
|
security_vulnerability: {
|
|
68
68
|
package: {
|
|
69
|
-
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "
|
|
69
|
+
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "nuget" | "actions" | "pip";
|
|
70
70
|
name: string;
|
|
71
71
|
};
|
|
72
72
|
severity: "low" | "medium" | "high" | "critical";
|
|
@@ -105,7 +105,7 @@ declare const GithubVulnerabilityAlerts: z.ZodPipe<z.ZodType<{
|
|
|
105
105
|
};
|
|
106
106
|
security_vulnerability: {
|
|
107
107
|
package: {
|
|
108
|
-
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "
|
|
108
|
+
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "nuget" | "actions" | "pip";
|
|
109
109
|
name: string;
|
|
110
110
|
};
|
|
111
111
|
severity: "low" | "medium" | "high" | "critical";
|
|
@@ -144,7 +144,7 @@ declare const GithubVulnerabilityAlerts: z.ZodPipe<z.ZodType<{
|
|
|
144
144
|
};
|
|
145
145
|
security_vulnerability: {
|
|
146
146
|
package: {
|
|
147
|
-
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "
|
|
147
|
+
ecosystem: "composer" | "maven" | "npm" | "rust" | "go" | "rubygems" | "nuget" | "actions" | "pip";
|
|
148
148
|
name: string;
|
|
149
149
|
};
|
|
150
150
|
severity: "low" | "medium" | "high" | "critical";
|
package/package.json
CHANGED
package/renovate-schema.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$id": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
-
"title": "JSON schema for Renovate 43.
|
|
3
|
+
"title": "JSON schema for Renovate 43.238.0 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "43.
|
|
5
|
+
"x-renovate-version": "43.238.0",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HostRule } from "../../../types/host-rules.js";
|
|
2
|
-
import { PackageRule } from "../../../config/types.js";
|
|
3
|
-
|
|
4
|
-
//#region lib/modules/datasource/npm/types.d.ts
|
|
5
|
-
interface NpmrcRules {
|
|
6
|
-
hostRules: HostRule[];
|
|
7
|
-
packageRules: PackageRule[];
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { NpmrcRules };
|
|
11
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|