diff --git a/lib/modules/manager/bazel-module/extract.ts b/lib/modules/manager/bazel-module/extract.ts index ce16ba3c177b9bc0776d6f0a740040453ab9a5ee..d1a3b9ddcde628943fbbe5b5f2a32732cef8ca85 100644 --- a/lib/modules/manager/bazel-module/extract.ts +++ b/lib/modules/manager/bazel-module/extract.ts @@ -4,8 +4,8 @@ import { isNotNullOrUndefined } from '../../../util/array'; import { LooseArray } from '../../../util/schema-utils'; import type { PackageDependency, PackageFileContent } from '../types'; import * as bazelrc from './bazelrc'; -import type { ResultFragment } from './fragments'; import { parse } from './parser'; +import type { ResultFragment } from './parser/fragments'; import { RuleToMavenPackageDep, fillRegistryUrls } from './parser/maven'; import { RuleToDockerPackageDep } from './parser/oci'; import { diff --git a/lib/modules/manager/bazel-module/parser/common.ts b/lib/modules/manager/bazel-module/parser/common.ts index 5fe3ad77180d45e7f222aed1c1f425f2d243b09d..c35c084fdcf1058706419a3815ad082faddb552e 100644 --- a/lib/modules/manager/bazel-module/parser/common.ts +++ b/lib/modules/manager/bazel-module/parser/common.ts @@ -1,7 +1,7 @@ import { query as q } from 'good-enough-parser'; import { regEx } from '../../../../util/regex'; -import type { Ctx } from '../context'; -import * as starlark from '../starlark'; +import type { Ctx } from './context'; +import * as starlark from './starlark'; const booleanValuesRegex = regEx(`^${starlark.booleanStringValues.join('|')}$`); diff --git a/lib/modules/manager/bazel-module/context.spec.ts b/lib/modules/manager/bazel-module/parser/context.spec.ts similarity index 96% rename from lib/modules/manager/bazel-module/context.spec.ts rename to lib/modules/manager/bazel-module/parser/context.spec.ts index 68361cfef17c27b0d99e26e5504e80037a521c01..61af85178f8b05e8dc5ade310cec9e3a161cf7be 100644 --- a/lib/modules/manager/bazel-module/context.spec.ts +++ b/lib/modules/manager/bazel-module/parser/context.spec.ts @@ -1,7 +1,7 @@ import { Ctx, CtxProcessingError } from './context'; import * as fragments from './fragments'; -describe('modules/manager/bazel-module/context', () => { +describe('modules/manager/bazel-module/parser/context', () => { describe('Ctx (failures cases)', () => { describe('extension tag', () => { it('throws if there is no current', () => { diff --git a/lib/modules/manager/bazel-module/context.ts b/lib/modules/manager/bazel-module/parser/context.ts similarity index 100% rename from lib/modules/manager/bazel-module/context.ts rename to lib/modules/manager/bazel-module/parser/context.ts diff --git a/lib/modules/manager/bazel-module/parser/extension-tags.ts b/lib/modules/manager/bazel-module/parser/extension-tags.ts index 231112c091965df80afdb215804319e785fc4d35..a0a114d0c11788c909a42dc6792956c268103f27 100644 --- a/lib/modules/manager/bazel-module/parser/extension-tags.ts +++ b/lib/modules/manager/bazel-module/parser/extension-tags.ts @@ -1,7 +1,7 @@ import { query as q } from 'good-enough-parser'; import { regEx } from '../../../../util/regex'; -import type { Ctx } from '../context'; import { kvParams } from './common'; +import type { Ctx } from './context'; import { mavenExtensionPrefix, mavenExtensionTags } from './maven'; import { ociExtensionPrefix, ociExtensionTags } from './oci'; diff --git a/lib/modules/manager/bazel-module/fragments.spec.ts b/lib/modules/manager/bazel-module/parser/fragments.spec.ts similarity index 98% rename from lib/modules/manager/bazel-module/fragments.spec.ts rename to lib/modules/manager/bazel-module/parser/fragments.spec.ts index e352b35898d01a9fb7813a5ce9ae87128529b3fc..278fe212b1e2e53b91a606fe3d23915a016f82e2 100644 --- a/lib/modules/manager/bazel-module/fragments.spec.ts +++ b/lib/modules/manager/bazel-module/parser/fragments.spec.ts @@ -9,7 +9,7 @@ import { } from './fragments'; import * as fragments from './fragments'; -describe('modules/manager/bazel-module/fragments', () => { +describe('modules/manager/bazel-module/parser/fragments', () => { it('.string()', () => { const result = fragments.string('hello'); expect(() => StringFragmentSchema.parse(result)).not.toThrow(); diff --git a/lib/modules/manager/bazel-module/fragments.ts b/lib/modules/manager/bazel-module/parser/fragments.ts similarity index 98% rename from lib/modules/manager/bazel-module/fragments.ts rename to lib/modules/manager/bazel-module/parser/fragments.ts index 4d686d228898684a65961fa34053296ebd6c7a47..4a3d38d8ccb87467e813293515050a5ad30bfa86 100644 --- a/lib/modules/manager/bazel-module/fragments.ts +++ b/lib/modules/manager/bazel-module/parser/fragments.ts @@ -1,5 +1,5 @@ import { z } from 'zod'; -import { LooseArray, LooseRecord } from '../../../util/schema-utils'; +import { LooseArray, LooseRecord } from '../../../../util/schema-utils'; import * as starlark from './starlark'; export const StringFragmentSchema = z.object({ diff --git a/lib/modules/manager/bazel-module/parser/index.spec.ts b/lib/modules/manager/bazel-module/parser/index.spec.ts index cbb629ed0aeefff20b958935fca8a966138a7c33..d5c2a3817a1d826e3094e63238a7cb8b4c8c5de6 100644 --- a/lib/modules/manager/bazel-module/parser/index.spec.ts +++ b/lib/modules/manager/bazel-module/parser/index.spec.ts @@ -1,5 +1,5 @@ import { codeBlock } from 'common-tags'; -import * as fragments from '../fragments'; +import * as fragments from './fragments'; import { parse } from '.'; describe('modules/manager/bazel-module/parser/index', () => { diff --git a/lib/modules/manager/bazel-module/parser/index.ts b/lib/modules/manager/bazel-module/parser/index.ts index cd25ead1453b2d61014ce09fad14d285a6ef4433..f0f760eb30138027a9471e99ca40efb7e15cf423 100644 --- a/lib/modules/manager/bazel-module/parser/index.ts +++ b/lib/modules/manager/bazel-module/parser/index.ts @@ -1,7 +1,7 @@ import { lang, query as q } from 'good-enough-parser'; -import { Ctx } from '../context'; -import type { ResultFragment } from '../fragments'; +import { Ctx } from './context'; import { extensionTags } from './extension-tags'; +import type { ResultFragment } from './fragments'; import { rules } from './rules'; const rule = q.alt<Ctx>(rules, extensionTags); diff --git a/lib/modules/manager/bazel-module/parser/maven.ts b/lib/modules/manager/bazel-module/parser/maven.ts index 9b6bf797b7ebe8b6f36debcd7fc709a9a0b6d591..beee25129f0060738d846dce93406be905aea3ab 100644 --- a/lib/modules/manager/bazel-module/parser/maven.ts +++ b/lib/modules/manager/bazel-module/parser/maven.ts @@ -6,7 +6,7 @@ import { ExtensionTagFragmentSchema, StringArrayFragmentSchema, StringFragmentSchema, -} from '../fragments'; +} from './fragments'; const artifactTag = 'artifact'; const installTag = 'install'; diff --git a/lib/modules/manager/bazel-module/parser/oci.ts b/lib/modules/manager/bazel-module/parser/oci.ts index f295a987afd0be38641e68fcb29109542619e9ed..63d34ac73c813bb199b75b3f807fa48c0ab310a2 100644 --- a/lib/modules/manager/bazel-module/parser/oci.ts +++ b/lib/modules/manager/bazel-module/parser/oci.ts @@ -1,7 +1,7 @@ import { z } from 'zod'; import { DockerDatasource } from '../../../datasource/docker'; import type { PackageDependency } from '../../types'; -import { ExtensionTagFragmentSchema, StringFragmentSchema } from '../fragments'; +import { ExtensionTagFragmentSchema, StringFragmentSchema } from './fragments'; export const ociExtensionPrefix = 'oci'; diff --git a/lib/modules/manager/bazel-module/parser/rules.ts b/lib/modules/manager/bazel-module/parser/rules.ts index dfcadaf5db30b642e280b357799a0c75550106d1..016b0270f710657ae69a40c6cdfb17ad0a249be1 100644 --- a/lib/modules/manager/bazel-module/parser/rules.ts +++ b/lib/modules/manager/bazel-module/parser/rules.ts @@ -1,7 +1,7 @@ import { query as q } from 'good-enough-parser'; import { regEx } from '../../../../util/regex'; -import type { Ctx } from '../context'; import { kvParams } from './common'; +import type { Ctx } from './context'; // For the purpose of parsing bazel module files in Renovate, we consider a rule // to be any "direct function application". For example: diff --git a/lib/modules/manager/bazel-module/starlark.spec.ts b/lib/modules/manager/bazel-module/parser/starlark.spec.ts similarity index 85% rename from lib/modules/manager/bazel-module/starlark.spec.ts rename to lib/modules/manager/bazel-module/parser/starlark.spec.ts index f98cce37a12474e9fdef8c81cbb936cc3f537b9c..5f183ef1fcf342d6185f46b16348e3c399dc620f 100644 --- a/lib/modules/manager/bazel-module/starlark.spec.ts +++ b/lib/modules/manager/bazel-module/parser/starlark.spec.ts @@ -1,6 +1,6 @@ import * as starlark from './starlark'; -describe('modules/manager/bazel-module/starlark', () => { +describe('modules/manager/bazel-module/parser/starlark', () => { it.each` a | exp ${'True'} | ${true} diff --git a/lib/modules/manager/bazel-module/starlark.ts b/lib/modules/manager/bazel-module/parser/starlark.ts similarity index 100% rename from lib/modules/manager/bazel-module/starlark.ts rename to lib/modules/manager/bazel-module/parser/starlark.ts diff --git a/lib/modules/manager/bazel-module/rules.spec.ts b/lib/modules/manager/bazel-module/rules.spec.ts index 53d67a7f5e5427581c228eb715cdb5956bbdeecb..cb595b9952c4d53c21c2eb356098350079b90cf1 100644 --- a/lib/modules/manager/bazel-module/rules.spec.ts +++ b/lib/modules/manager/bazel-module/rules.spec.ts @@ -2,7 +2,7 @@ import deepmerge from 'deepmerge'; import { BazelDatasource } from '../../datasource/bazel'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import type { PackageDependency } from '../types'; -import * as fragments from './fragments'; +import * as fragments from './parser/fragments'; import type { BasePackageDep, BazelModulePackageDep, diff --git a/lib/modules/manager/bazel-module/rules.ts b/lib/modules/manager/bazel-module/rules.ts index 5c2b133ebb300ac63a95e4ab8c5ba6a5776a9914..342498f2c5188d63ff2b47d2714817268a82e15a 100644 --- a/lib/modules/manager/bazel-module/rules.ts +++ b/lib/modules/manager/bazel-module/rules.ts @@ -8,7 +8,7 @@ import { regEx } from '../../../util/regex'; import { BazelDatasource } from '../../datasource/bazel'; import { GithubTagsDatasource } from '../../datasource/github-tags'; import type { PackageDependency } from '../types'; -import { RuleFragmentSchema, StringFragmentSchema } from './fragments'; +import { RuleFragmentSchema, StringFragmentSchema } from './parser/fragments'; // Rule Schemas