renovate 44.110.1 → 44.111.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.
- package/dist/data/mise-registry.js +40 -35
- package/dist/modules/manager/bun/extract.js.map +1 -1
- package/dist/modules/manager/bun/index.js +1 -0
- package/dist/modules/manager/bun/index.js.map +1 -1
- package/dist/modules/manager/fingerprint.generated.js +1 -1
- package/dist/modules/manager/fingerprint.generated.js.map +1 -1
- package/dist/modules/manager/npm/extract/index.js.map +1 -1
- package/dist/modules/manager/npm/extract/post/monorepo.js.map +1 -1
- package/dist/modules/manager/npm/index.js +1 -0
- package/dist/modules/manager/npm/index.js.map +1 -1
- package/dist/modules/manager/npm/npmrc.js +18 -13
- package/dist/modules/manager/npm/npmrc.js.map +1 -1
- package/dist/modules/manager/npm/post-update/index.js.map +1 -1
- package/dist/modules/manager/types.d.ts +22 -2
- package/package.json +1 -1
- package/renovate-schema.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region lib/data/mise-registry.json
|
|
2
2
|
var mise_registry_default = {
|
|
3
|
-
meta: { "version": "2026.9.
|
|
3
|
+
meta: { "version": "2026.9.12 linux-x64 (2026-09-20)" },
|
|
4
4
|
tools: {
|
|
5
5
|
"1password": {
|
|
6
6
|
"aqua": "1password/cli",
|
|
@@ -91,9 +91,9 @@ var mise_registry_default = {
|
|
|
91
91
|
},
|
|
92
92
|
"android-cli": { "http": "android-cli" },
|
|
93
93
|
"android-sdk": { "vfox": "mise-plugins/vfox-android-sdk" },
|
|
94
|
-
"ansible": { "
|
|
95
|
-
"ansible-base": { "
|
|
96
|
-
"ansible-core": { "
|
|
94
|
+
"ansible": { "pypi": "ansible" },
|
|
95
|
+
"ansible-base": { "pypi": "ansible-core" },
|
|
96
|
+
"ansible-core": { "pypi": "ansible-core" },
|
|
97
97
|
"ant": { "vfox": "mise-plugins/vfox-ant" },
|
|
98
98
|
"antigravity-cli": { "aqua": "google-antigravity/antigravity-cli" },
|
|
99
99
|
"apko": {
|
|
@@ -142,7 +142,7 @@ var mise_registry_default = {
|
|
|
142
142
|
"ast-grep": {
|
|
143
143
|
"aqua": "ast-grep/ast-grep",
|
|
144
144
|
"cargo": "ast-grep",
|
|
145
|
-
"
|
|
145
|
+
"pypi": "ast-grep-cli"
|
|
146
146
|
},
|
|
147
147
|
"astro": { "github": "astronomer/astro-cli" },
|
|
148
148
|
"atlas": {
|
|
@@ -196,12 +196,12 @@ var mise_registry_default = {
|
|
|
196
196
|
"aws-sam": {
|
|
197
197
|
"aqua": "aws/aws-sam-cli",
|
|
198
198
|
"asdf": "mise-plugins/mise-pyapp",
|
|
199
|
-
"
|
|
199
|
+
"pypi": "aws-sam-cli"
|
|
200
200
|
},
|
|
201
201
|
"aws-sam-cli": {
|
|
202
202
|
"aqua": "aws/aws-sam-cli",
|
|
203
203
|
"asdf": "mise-plugins/mise-pyapp",
|
|
204
|
-
"
|
|
204
|
+
"pypi": "aws-sam-cli"
|
|
205
205
|
},
|
|
206
206
|
"aws-sso": {
|
|
207
207
|
"aqua": "synfinatic/aws-sso-cli",
|
|
@@ -212,10 +212,10 @@ var mise_registry_default = {
|
|
|
212
212
|
"aqua": "aws/aws-cli",
|
|
213
213
|
"asdf": "MetricMike/asdf-awscli"
|
|
214
214
|
},
|
|
215
|
-
"awscli-local": { "
|
|
215
|
+
"awscli-local": { "pypi": "awscli-local" },
|
|
216
216
|
"awsebcli": {
|
|
217
217
|
"asdf": "mise-plugins/mise-pyapp",
|
|
218
|
-
"
|
|
218
|
+
"pypi": "awsebcli"
|
|
219
219
|
},
|
|
220
220
|
"awsls": {
|
|
221
221
|
"asdf": "chessmango/asdf-awsls",
|
|
@@ -230,8 +230,8 @@ var mise_registry_default = {
|
|
|
230
230
|
"github": "jckuester/awsweeper"
|
|
231
231
|
},
|
|
232
232
|
"azd": { "aqua": "Azure/azure-dev" },
|
|
233
|
-
"azure": { "
|
|
234
|
-
"azure-cli": { "
|
|
233
|
+
"azure": { "pypi": "azure-cli" },
|
|
234
|
+
"azure-cli": { "pypi": "azure-cli" },
|
|
235
235
|
"azure-functions-core-tools": {
|
|
236
236
|
"asdf": "mise-plugins/mise-azure-functions-core-tools",
|
|
237
237
|
"vfox": "mise-plugins/vfox-azure-functions-core-tools"
|
|
@@ -419,7 +419,7 @@ var mise_registry_default = {
|
|
|
419
419
|
"asdf": "mise-plugins/mise-cf",
|
|
420
420
|
"github": "cloudfoundry/cli"
|
|
421
421
|
},
|
|
422
|
-
"cfn-lint": { "
|
|
422
|
+
"cfn-lint": { "pypi": "cfn-lint" },
|
|
423
423
|
"cfssl": {
|
|
424
424
|
"aqua": "cloudflare/cfssl/cfssl",
|
|
425
425
|
"asdf": "mathew-fleisch/asdf-cfssl"
|
|
@@ -562,12 +562,13 @@ var mise_registry_default = {
|
|
|
562
562
|
"cocoapods": { "gem": "cocoapods" },
|
|
563
563
|
"cocogitto": { "aqua": "cocogitto/cocogitto" },
|
|
564
564
|
"code": { "aqua": "just-every/code" },
|
|
565
|
-
"code-review-graph": { "
|
|
565
|
+
"code-review-graph": { "pypi": "code-review-graph" },
|
|
566
566
|
"codebuff": { "npm": "codebuff" },
|
|
567
567
|
"codefresh": {
|
|
568
568
|
"asdf": "gurukulkarni/asdf-codefresh",
|
|
569
569
|
"github": "codefresh-io/cli"
|
|
570
570
|
},
|
|
571
|
+
"codegraph": { "aqua": "colbymchenry/codegraph" },
|
|
571
572
|
"codeql": {
|
|
572
573
|
"asdf": "mise-plugins/mise-codeql",
|
|
573
574
|
"github": "github/codeql-cli-binaries"
|
|
@@ -592,7 +593,7 @@ var mise_registry_default = {
|
|
|
592
593
|
},
|
|
593
594
|
"conan": {
|
|
594
595
|
"asdf": "mise-plugins/mise-pyapp",
|
|
595
|
-
"
|
|
596
|
+
"pypi": "conan"
|
|
596
597
|
},
|
|
597
598
|
"conform": {
|
|
598
599
|
"aqua": "siderolabs/conform",
|
|
@@ -614,11 +615,11 @@ var mise_registry_default = {
|
|
|
614
615
|
"container-use": { "aqua": "dagger/container-use" },
|
|
615
616
|
"cookiecutter": {
|
|
616
617
|
"asdf": "shawon-crosen/asdf-cookiecutter",
|
|
617
|
-
"
|
|
618
|
+
"pypi": "cookiecutter"
|
|
618
619
|
},
|
|
619
620
|
"copier": {
|
|
620
621
|
"asdf": "looztra/asdf-copier",
|
|
621
|
-
"
|
|
622
|
+
"pypi": "copier"
|
|
622
623
|
},
|
|
623
624
|
"copilot": {
|
|
624
625
|
"aqua": "github/copilot-cli",
|
|
@@ -838,7 +839,7 @@ var mise_registry_default = {
|
|
|
838
839
|
"asdf": "looztra/asdf-dust",
|
|
839
840
|
"cargo": "du-dust"
|
|
840
841
|
},
|
|
841
|
-
"dvc": { "
|
|
842
|
+
"dvc": { "pypi": "dvc" },
|
|
842
843
|
"dyff": {
|
|
843
844
|
"aqua": "homeport/dyff",
|
|
844
845
|
"asdf": "https"
|
|
@@ -1015,7 +1016,7 @@ var mise_registry_default = {
|
|
|
1015
1016
|
"aqua": "junegunn/fzf",
|
|
1016
1017
|
"asdf": "kompiro/asdf-fzf"
|
|
1017
1018
|
},
|
|
1018
|
-
"gallery-dl": { "
|
|
1019
|
+
"gallery-dl": { "pypi": "gallery-dl" },
|
|
1019
1020
|
"gam": {
|
|
1020
1021
|
"asdf": "offbyone/asdf-gam",
|
|
1021
1022
|
"github": "GAM-team/GAM"
|
|
@@ -1045,7 +1046,7 @@ var mise_registry_default = {
|
|
|
1045
1046
|
},
|
|
1046
1047
|
"ggshield": {
|
|
1047
1048
|
"aqua": "GitGuardian/ggshield",
|
|
1048
|
-
"
|
|
1049
|
+
"pypi": "ggshield"
|
|
1049
1050
|
},
|
|
1050
1051
|
"gh": {
|
|
1051
1052
|
"aqua": "cli/cli",
|
|
@@ -1085,7 +1086,7 @@ var mise_registry_default = {
|
|
|
1085
1086
|
"aqua": "orhun/git-cliff",
|
|
1086
1087
|
"asdf": "jylenhof/asdf-git-cliff"
|
|
1087
1088
|
},
|
|
1088
|
-
"git-filter-repo": { "
|
|
1089
|
+
"git-filter-repo": { "pypi": "git-filter-repo" },
|
|
1089
1090
|
"git-lfs": { "aqua": "git-lfs/git-lfs" },
|
|
1090
1091
|
"git-town": { "aqua": "git-town/git-town" },
|
|
1091
1092
|
"gitconfig": {
|
|
@@ -1284,7 +1285,7 @@ var mise_registry_default = {
|
|
|
1284
1285
|
"aqua": "hasura/graphql-engine",
|
|
1285
1286
|
"asdf": "gurukulkarni/asdf-hasura"
|
|
1286
1287
|
},
|
|
1287
|
-
"hatch": { "
|
|
1288
|
+
"hatch": { "pypi": "hatch" },
|
|
1288
1289
|
"haxe": {
|
|
1289
1290
|
"asdf": "mise-plugins/mise-haxe",
|
|
1290
1291
|
"github": "HaxeFoundation/haxe"
|
|
@@ -1456,7 +1457,7 @@ var mise_registry_default = {
|
|
|
1456
1457
|
},
|
|
1457
1458
|
"jc": {
|
|
1458
1459
|
"aqua": "kellyjonbrazil/jc",
|
|
1459
|
-
"
|
|
1460
|
+
"pypi": "jc"
|
|
1460
1461
|
},
|
|
1461
1462
|
"jd": {
|
|
1462
1463
|
"aqua": "josephburnett/jd",
|
|
@@ -1903,8 +1904,8 @@ var mise_registry_default = {
|
|
|
1903
1904
|
"vfox": "mise-plugins/vfox-maven"
|
|
1904
1905
|
},
|
|
1905
1906
|
"mc": {
|
|
1906
|
-
"
|
|
1907
|
-
"
|
|
1907
|
+
"aqua": "minio/mc",
|
|
1908
|
+
"asdf": "mise-plugins/mise-mc"
|
|
1908
1909
|
},
|
|
1909
1910
|
"mdbook": {
|
|
1910
1911
|
"aqua": "rust-lang/mdBook",
|
|
@@ -1926,7 +1927,7 @@ var mise_registry_default = {
|
|
|
1926
1927
|
},
|
|
1927
1928
|
"meson": {
|
|
1928
1929
|
"asdf": "mise-plugins/mise-meson",
|
|
1929
|
-
"
|
|
1930
|
+
"pypi": "meson"
|
|
1930
1931
|
},
|
|
1931
1932
|
"micro": { "aqua": "micro-editor/micro" },
|
|
1932
1933
|
"micromamba": { "github": "mamba-org/micromamba-releases" },
|
|
@@ -1968,7 +1969,7 @@ var mise_registry_default = {
|
|
|
1968
1969
|
},
|
|
1969
1970
|
"mitmproxy": {
|
|
1970
1971
|
"asdf": "mise-plugins/mise-mitmproxy",
|
|
1971
|
-
"
|
|
1972
|
+
"pypi": "mitmproxy"
|
|
1972
1973
|
},
|
|
1973
1974
|
"mkcert": {
|
|
1974
1975
|
"aqua": "FiloSottile/mkcert",
|
|
@@ -2020,6 +2021,7 @@ var mise_registry_default = {
|
|
|
2020
2021
|
"asdf": "iilyak/asdf-nancy"
|
|
2021
2022
|
},
|
|
2022
2023
|
"native-sdk": { "github": "vercel-labs/native" },
|
|
2024
|
+
"nats-server": { "github": "nats-io/nats-server" },
|
|
2023
2025
|
"navi": {
|
|
2024
2026
|
"aqua": "denisidoro/navi",
|
|
2025
2027
|
"cargo": "navi"
|
|
@@ -2084,6 +2086,7 @@ var mise_registry_default = {
|
|
|
2084
2086
|
},
|
|
2085
2087
|
"nu": { "aqua": "nushell/nushell" },
|
|
2086
2088
|
"nub": { "npm": "@nubjs/nub" },
|
|
2089
|
+
"nubr": { "npm": "@nubjs/runner" },
|
|
2087
2090
|
"numbat": {
|
|
2088
2091
|
"aqua": "sharkdp/numbat",
|
|
2089
2092
|
"cargo": "numbat-cli"
|
|
@@ -2236,7 +2239,7 @@ var mise_registry_default = {
|
|
|
2236
2239
|
},
|
|
2237
2240
|
"pdm": {
|
|
2238
2241
|
"asdf": "1oglop1/asdf-pdm",
|
|
2239
|
-
"
|
|
2242
|
+
"pypi": "pdm"
|
|
2240
2243
|
},
|
|
2241
2244
|
"peco": {
|
|
2242
2245
|
"aqua": "peco/peco",
|
|
@@ -2271,7 +2274,7 @@ var mise_registry_default = {
|
|
|
2271
2274
|
"asdf": "pipe-cd/asdf-pipectl"
|
|
2272
2275
|
},
|
|
2273
2276
|
"pipenv": {
|
|
2274
|
-
"
|
|
2277
|
+
"pypi": "pipenv",
|
|
2275
2278
|
"vfox": "mise-plugins/vfox-pipenv"
|
|
2276
2279
|
},
|
|
2277
2280
|
"pipx": {
|
|
@@ -2320,7 +2323,7 @@ var mise_registry_default = {
|
|
|
2320
2323
|
},
|
|
2321
2324
|
"podman-tui": { "github": "containers/podman-tui" },
|
|
2322
2325
|
"poetry": {
|
|
2323
|
-
"
|
|
2326
|
+
"pypi": "poetry",
|
|
2324
2327
|
"vfox": "mise-plugins/vfox-poetry"
|
|
2325
2328
|
},
|
|
2326
2329
|
"polaris": {
|
|
@@ -2331,6 +2334,7 @@ var mise_registry_default = {
|
|
|
2331
2334
|
"aqua": "derailed/popeye",
|
|
2332
2335
|
"asdf": "nlamirault/asdf-popeye"
|
|
2333
2336
|
},
|
|
2337
|
+
"poppler": { "conda": "poppler" },
|
|
2334
2338
|
"porter": {
|
|
2335
2339
|
"aqua": "getporter/porter/porter",
|
|
2336
2340
|
"github": "getporter/porter"
|
|
@@ -2360,7 +2364,7 @@ var mise_registry_default = {
|
|
|
2360
2364
|
"pre-commit": {
|
|
2361
2365
|
"aqua": "pre-commit/pre-commit",
|
|
2362
2366
|
"asdf": "jonathanmorley/asdf-pre-commit",
|
|
2363
|
-
"
|
|
2367
|
+
"pypi": "pre-commit"
|
|
2364
2368
|
},
|
|
2365
2369
|
"prek": { "aqua": "j178/prek" },
|
|
2366
2370
|
"prettier": { "npm": "prettier" },
|
|
@@ -2615,7 +2619,7 @@ var mise_registry_default = {
|
|
|
2615
2619
|
},
|
|
2616
2620
|
"semgrep": {
|
|
2617
2621
|
"asdf": "mise-plugins/mise-semgrep",
|
|
2618
|
-
"
|
|
2622
|
+
"pypi": "semgrep"
|
|
2619
2623
|
},
|
|
2620
2624
|
"semver": {
|
|
2621
2625
|
"aqua": "fsaintjacques/semver-tool",
|
|
@@ -2740,6 +2744,7 @@ var mise_registry_default = {
|
|
|
2740
2744
|
"aqua": "stoplightio/spectral",
|
|
2741
2745
|
"asdf": "vbyrd/asdf-spectral"
|
|
2742
2746
|
},
|
|
2747
|
+
"spicedb": { "github": "authzed/spicedb" },
|
|
2743
2748
|
"spin": {
|
|
2744
2749
|
"aqua": "spinnaker/spin",
|
|
2745
2750
|
"asdf": "pavloos/asdf-spin"
|
|
@@ -2767,7 +2772,7 @@ var mise_registry_default = {
|
|
|
2767
2772
|
"sshi": { "aqua": "aakso/ssh-inscribe/sshi" },
|
|
2768
2773
|
"sshuttle": {
|
|
2769
2774
|
"asdf": "mise-plugins/mise-sshuttle",
|
|
2770
|
-
"
|
|
2775
|
+
"pypi": "sshuttle"
|
|
2771
2776
|
},
|
|
2772
2777
|
"sst": { "github": "sst/sst" },
|
|
2773
2778
|
"stack": {
|
|
@@ -3164,7 +3169,7 @@ var mise_registry_default = {
|
|
|
3164
3169
|
"uv": {
|
|
3165
3170
|
"aqua": "astral-sh/uv",
|
|
3166
3171
|
"asdf": "asdf-community/asdf-uv",
|
|
3167
|
-
"
|
|
3172
|
+
"pypi": "uv"
|
|
3168
3173
|
},
|
|
3169
3174
|
"v": {
|
|
3170
3175
|
"asdf": "mise-plugins/mise-v",
|
|
@@ -3311,7 +3316,7 @@ var mise_registry_default = {
|
|
|
3311
3316
|
"asdf": "NeoHsu/asdf-xh",
|
|
3312
3317
|
"cargo": "xh"
|
|
3313
3318
|
},
|
|
3314
|
-
"xxh": { "
|
|
3319
|
+
"xxh": { "pypi": "xxh-xxh" },
|
|
3315
3320
|
"yamlfmt": {
|
|
3316
3321
|
"aqua": "google/yamlfmt",
|
|
3317
3322
|
"asdf": "mise-plugins/asdf-yamlfmt",
|
|
@@ -3319,7 +3324,7 @@ var mise_registry_default = {
|
|
|
3319
3324
|
},
|
|
3320
3325
|
"yamllint": {
|
|
3321
3326
|
"asdf": "ericcornelissen/asdf-yamllint",
|
|
3322
|
-
"
|
|
3327
|
+
"pypi": "yamllint"
|
|
3323
3328
|
},
|
|
3324
3329
|
"yamlscript": {
|
|
3325
3330
|
"aqua": "yaml/yamlscript",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/bun/extract.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport {\n getParentDir,\n getSiblingFileName,\n readLocalFile,\n} from '../../../util/fs/index.ts';\n\nimport { extractPackageJson } from '../npm/extract/common/package-file.ts';\nimport type { NpmPackage } from '../npm/extract/types.ts';\nimport { resolveNpmrc } from '../npm/npmrc.ts';\nimport type { NpmManagerData } from '../npm/types.ts';\nimport type { ExtractConfig,
|
|
1
|
+
{"version":3,"file":"extract.js","names":[],"sources":["../../../../lib/modules/manager/bun/extract.ts"],"sourcesContent":["import { isArray, isObject, isString } from '@sindresorhus/is';\nimport { logger } from '../../../logger/index.ts';\nimport {\n getParentDir,\n getSiblingFileName,\n readLocalFile,\n} from '../../../util/fs/index.ts';\n\nimport { extractPackageJson } from '../npm/extract/common/package-file.ts';\nimport type { NpmPackage } from '../npm/extract/types.ts';\nimport { resolveNpmrc } from '../npm/npmrc.ts';\nimport type { NpmManagerData } from '../npm/types.ts';\nimport type { ExtractConfig, NpmrcPackageFile } from '../types.ts';\nimport { filesMatchingWorkspaces } from './utils.ts';\n\nfunction matchesFileName(fileNameWithPath: string, fileName: string): boolean {\n return (\n fileNameWithPath === fileName || fileNameWithPath.endsWith(`/${fileName}`)\n );\n}\n\nexport async function processPackageFile(\n packageFile: string,\n config: ExtractConfig,\n): Promise<NpmrcPackageFile | null> {\n const fileContent = await readLocalFile(packageFile, 'utf8');\n if (!fileContent) {\n logger.warn({ fileName: packageFile }, 'Could not read file content');\n return null;\n }\n let packageJson: NpmPackage;\n try {\n packageJson = JSON.parse(fileContent);\n } catch (err) {\n logger.debug({ err }, 'Error parsing package.json');\n return null;\n }\n const result = extractPackageJson(packageJson, packageFile);\n if (!result) {\n logger.debug({ packageFile }, 'No dependencies found');\n return null;\n }\n\n const { npmrc } = await resolveNpmrc(packageFile, config);\n\n return {\n ...result,\n packageFile,\n npmrc,\n };\n}\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n matchedFiles: string[],\n): Promise<NpmrcPackageFile[]> {\n const packageFiles: NpmrcPackageFile<NpmManagerData>[] = [];\n const allLockFiles = matchedFiles.filter(\n (file) =>\n matchesFileName(file, 'bun.lock') || matchesFileName(file, 'bun.lockb'),\n );\n if (allLockFiles.length === 0) {\n logger.debug('No bun lockfiles found');\n return packageFiles;\n }\n const allPackageJson = matchedFiles.filter((file) =>\n matchesFileName(file, 'package.json'),\n );\n for (const lockFile of allLockFiles) {\n const packageFile = getSiblingFileName(lockFile, 'package.json');\n const res = await processPackageFile(packageFile, config);\n if (res) {\n packageFiles.push({ ...res, lockFiles: [lockFile] });\n }\n // Check if package.json contains workspaces\n let workspaces = res?.managerData?.workspaces;\n\n // Check for nested packages property https://bun.com/docs/pm/catalogs#1-define-catalogs-in-root-package-json\n if (isObject(workspaces) && 'packages' in workspaces) {\n workspaces = workspaces.packages;\n }\n\n if (!isArray(workspaces, isString)) {\n continue;\n }\n\n logger.debug(`Found bun workspaces in ${packageFile}`);\n const pwd = getParentDir(packageFile);\n const workspacePackageFiles = filesMatchingWorkspaces(\n pwd,\n allPackageJson,\n workspaces,\n );\n if (workspacePackageFiles.length) {\n logger.debug({ workspacePackageFiles }, 'Found bun workspace files');\n for (const workspaceFile of workspacePackageFiles) {\n const res = await processPackageFile(workspaceFile, config);\n if (res) {\n packageFiles.push({ ...res, lockFiles: [lockFile] });\n }\n }\n }\n }\n\n return packageFiles;\n}\n"],"mappings":";;;;;;;AAeA,SAAS,gBAAgB,kBAA0B,UAA2B;CAC5E,OACE,qBAAqB,YAAY,iBAAiB,SAAS,IAAI,UAAU;AAE7E;AAEA,eAAsB,mBACpB,aACA,QACkC;CAClC,MAAM,cAAc,MAAM,cAAc,aAAa,MAAM;CAC3D,IAAI,CAAC,aAAa;EAChB,OAAO,KAAK,EAAE,UAAU,YAAY,GAAG,6BAA6B;EACpE,OAAO;CACT;CACA,IAAI;CACJ,IAAI;EACF,cA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AAK,WAAW,CAAC,QAAQ;IAAE,CAAC;GAEvD;EACF;CACF;CAEA,OAAO;AACT"}
|
|
@@ -17,6 +17,7 @@ var bun_exports = /* @__PURE__ */ __exportAll({
|
|
|
17
17
|
supersedesManagers: () => supersedesManagers,
|
|
18
18
|
supportedDatasources: () => supportedDatasources,
|
|
19
19
|
supportsLockFileMaintenance: () => true,
|
|
20
|
+
supportsNpmrc: () => true,
|
|
20
21
|
updateArtifacts: () => updateArtifacts,
|
|
21
22
|
updateDependency: () => updateDependency,
|
|
22
23
|
url: () => url
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bun/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy, updateDependency } from '../npm/index.ts';\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n\nexport const url = 'https://bun.sh/docs/cli/install';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = ['bun.lockb', 'bun.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)bun\\\\.lockb?$/', '/(^|/)package\\\\.json$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [GithubTagsDatasource.id, NpmDatasource.id];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/bun/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { getRangeStrategy, updateDependency } from '../npm/index.ts';\nexport { updateArtifacts } from './artifacts.ts';\nexport { extractAllPackageFiles } from './extract.ts';\n\nexport const url = 'https://bun.sh/docs/cli/install';\nexport const categories: Category[] = ['js'];\n\nexport const supersedesManagers = ['npm'];\nexport const supportsLockFileMaintenance = true;\nexport const supportsNpmrc = true;\nexport const lockFileNames = ['bun.lockb', 'bun.lock'];\nexport const lockFileMaintenanceIsDelegatedToPackageManager = true;\n\nexport const defaultConfig = {\n managerFilePatterns: ['/(^|/)bun\\\\.lockb?$/', '/(^|/)package\\\\.json$/'],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [GithubTagsDatasource.id, NpmDatasource.id];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,IAAI;AAE3C,MAAa,qBAAqB,CAAC,KAAK;AAGxC,MAAa,gBAAgB,CAAC,aAAa,UAAU;AAGrD,MAAa,gBAAgB;CAC3B,qBAAqB,CAAC,wBAAwB,wBAAwB;CACtE,QAAQ,EACN,mBAAmB,EACjB,QACE,8KACJ,EACF;CACA,mBAAmB,EACjB,QACE,6SACJ;AACF;AAEA,MAAa,uBAAuB,CAAC,qBAAqB,IAAI,cAAc,EAAE"}
|
|
@@ -75,7 +75,7 @@ hashMap.set("mise", "519dca7c243595393f80c0f56312115bc41c90ad5bd9f80696c78faf95f
|
|
|
75
75
|
hashMap.set("mix", "0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872");
|
|
76
76
|
hashMap.set("nix", "0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e");
|
|
77
77
|
hashMap.set("nodenv", "ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8");
|
|
78
|
-
hashMap.set("npm", "
|
|
78
|
+
hashMap.set("npm", "65c79e7fc01ae9c0e2edb064011045d4f69f9368232101eb2b349048afc89cc5");
|
|
79
79
|
hashMap.set("nuget", "b81fb0ca6cfeb86b004592b38ce176673e056d6a2ed41a9807afb0eb7ad405d2");
|
|
80
80
|
hashMap.set("nvm", "3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322");
|
|
81
81
|
hashMap.set("ocb", "032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','a051fe5e7e4fef8208b5864131a2b52b4ae319936f1dd8ee5a4e1ef11359ec09');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','fe8136135c895dd08819f91a60cf105f8b951251b057092700101ace991ae1d7');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','f1294fb3866ff65a75d98fdef80b1df3d3a8856535b8c690d1799e1205e4b639');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','05e7ab60494a20a5e7477f06a9e723e443d37643b6e1d9ba8d3d87126a051175');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','995048a257692db3b48dccda029ef5230ebd2a17085e837fc4eb848aae9ba64f');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','7adddc8e590786084855ffe53292bff3098ac672f91c21cc39d45bcf0af2271f');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','6011c22e60814460fb4a40f834608a868776b91eff2cae2d3bfea1e73ccd8aeb');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','28572dd24b6746ca7065ee467aa13bbc8c3e8c0f88ae48e33bce88468c600100');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','40120cfbf43d213850afa212ab01e2b7e44c8c4de73e6388fb73749593b4c747');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','519dca7c243595393f80c0f56312115bc41c90ad5bd9f80696c78faf95ff6c98');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','30c78bc1c29eeecbdedb4eacc52bd93eedfb07279fd385f893193dcac6196466');\nhashMap.set('nuget','b81fb0ca6cfeb86b004592b38ce176673e056d6a2ed41a9807afb0eb7ad405d2');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,OAAM,kEAAkE;AACp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,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,IAAI,qBAAoB,kEAAkE;AAClG,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,sBAAqB,kEAAkE;AACnG,QAAQ,IAAI,iBAAgB,kEAAkE;AAC9F,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,cAAa,kEAAkE;AAC3F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,SAAQ,kEAAkE"}
|
|
1
|
+
{"version":3,"file":"fingerprint.generated.js","names":[],"sources":["../../../lib/modules/manager/fingerprint.generated.ts"],"sourcesContent":["export const hashMap = new Map<string, string>();\n\nhashMap.set('ansible','a52394a36ac5517f7330473c31d93aa05b2ce607c5e951b48f25a4693cd20a81');\nhashMap.set('ansible-galaxy','0a264d6be73953d801510fdeff271e4071c274339569c6dab4e2a128eaf4869f');\nhashMap.set('ant','2df5943cf0ed19a21b94df13729dbb925655548130caf37e3e22bebaed518e17');\nhashMap.set('apm','bdb6931cc03f4ac02ebfdb56c4b3483bb6c5250fa952545f1a25584d502bbffd');\nhashMap.set('argocd','cff9cd22257bc460ae4b9936570bf0ed5585f280a55d26629deaeeb0bfee8eb5');\nhashMap.set('asdf','430eb99b58171700c8a59c78b9e648575e9b176b781d90dd10a710f7b69015bb');\nhashMap.set('azure-pipelines','a051fe5e7e4fef8208b5864131a2b52b4ae319936f1dd8ee5a4e1ef11359ec09');\nhashMap.set('batect','375d39b432013bedb1330cf40a2199dd822751b28578214f219e7bab98594b8d');\nhashMap.set('batect-wrapper','d999355511ea7f4053325a18b8cfc8d2b586c61e6760c35e557d383a673e3939');\nhashMap.set('bazel','c31bc0a0e23d32726bcc09aa67533ebc5058124bf89c88e09c837419f550801a');\nhashMap.set('bazel-module','9fbba0339f9f7785d52ab85c5f0f6385003093c063483c13feccba13ae438bef');\nhashMap.set('bazelisk','770f75a746dc6ba90c518788d5987d7df4243ef9eee122d1bb0556a93d6e1b11');\nhashMap.set('bicep','7246e0bfc06e0e28cbb03ac088c5591f648956b086e106aeb251fe5d628329db');\nhashMap.set('bitbucket-pipelines','59c0503494ab1442b127914503c01b97ac17b6742b19c632292d5aa24de115cd');\nhashMap.set('bitrise','478dfd316221fad7c29e177c70d1018d832fb2626b53308a5d0f1f0380e69f42');\nhashMap.set('buildkite','b8b404f53cd5d61c39153fddf93945e621471c4ac6aa9960c881cd868922bb4c');\nhashMap.set('buildpacks','6bef3cb04d66b5cfbb195adb4829bcbccae6408518706744d291bacf0610421f');\nhashMap.set('bun','5820cfb6ebe018b8c336d481ea9ae319daaee6a2e368c45196fc8bc67cb3e755');\nhashMap.set('bun-version','df3ae8e4a5de1fa1b4544f3d7fc8117e80adb1e151c46d1ede54a4dbea6521e4');\nhashMap.set('bundler','6e4784dd98c1f86ef64cc8cbf3128df48aebf920032d7792b54fdedd3dd9d4d5');\nhashMap.set('cake','9ebd8b481220b30a8860121d26184540a1a2fcc05ef780df9295dea39b386fad');\nhashMap.set('cargo','fe8136135c895dd08819f91a60cf105f8b951251b057092700101ace991ae1d7');\nhashMap.set('cdnurl','9a81c8e3c6ad6c788498c99fc1067ffdfcd92a427c3afaf8c0130975d83131f2');\nhashMap.set('circleci','91cbeb33ea20f9838e2c81a1195eb806f0b38fa282bc3679f62552f20575ca85');\nhashMap.set('cloudbuild','f4e40388944652c8a19f8518771ac8d3f3c4ccf81ddef0e68b463aca833cb73c');\nhashMap.set('cocoapods','f832e2beef885bb3fd697ed9bb3e8cd742926bfec37ff41212edd2dbb4edb3ba');\nhashMap.set('composer','f1294fb3866ff65a75d98fdef80b1df3d3a8856535b8c690d1799e1205e4b639');\nhashMap.set('conan','8d46e9a30ae628e26118aea10a98d1b846f7c5d96d51ce24693437d555f6d125');\nhashMap.set('copier','10ae4d7f8ff35faf3a3f9f25bf4c969ea960e19aaf8c012aee11f93f4d10533e');\nhashMap.set('cpanfile','07813fec3f3c2197056500e9266a0553b9774c02f2c74d5ca2e213188c7c12d3');\nhashMap.set('crossplane','5c26b1201a1a51454ffb94d829e223a76a781569bf79cdb1e47087c30233ec40');\nhashMap.set('crow','eb9a5f9f95041855dded67bcce3dd54724f690995ed6268d272e8a666ff28fd0');\nhashMap.set('deno','05e7ab60494a20a5e7477f06a9e723e443d37643b6e1d9ba8d3d87126a051175');\nhashMap.set('deps-edn','06783dbc8b9c7bb84e162d1f75b7db56dfa021cc6f809dfd2314cee8b64af08d');\nhashMap.set('devbox','a40050cc61bd9b5d500ec111abb17bb15d5f82ab5b7699f66f628307ba8382c9');\nhashMap.set('devcontainer','24320ed1cb6191d04cb8b2707214d82c08c682597aed1d84f250aa00ad1632ec');\nhashMap.set('docker-compose','fba87b82cb0f2bfd66526631fbe928b8153e7ca701a5790d02b944df17417bb9');\nhashMap.set('dockerfile','995048a257692db3b48dccda029ef5230ebd2a17085e837fc4eb848aae9ba64f');\nhashMap.set('droneci','661d2a2d7295af8dd7a1234c7090c42a89306bd574c3adf1fc67782efaad3998');\nhashMap.set('fleet','ffa222820f72c4eb4cdc4c229ae8c50433bee96f3b974f0633d5a7d1f6427c97');\nhashMap.set('flux','842597c9083d82af99ef3d526101a3a53c4448414d2f53f7e969074757124811');\nhashMap.set('fvm','9b161df0f14bc6e536368952adf373e343630097121a913cea60ee284027fb90');\nhashMap.set('git-submodules','df8bb92b2906d8cddda2d4b302ee503f8002e3554d32d74cef2f584fe891f38f');\nhashMap.set('github-actions','7adddc8e590786084855ffe53292bff3098ac672f91c21cc39d45bcf0af2271f');\nhashMap.set('gitlabci','a5e1e66ef461e1c1e71062f85f35a212417e23627f4b002810f9a98295d6e672');\nhashMap.set('gitlabci-include','8860a15ab516fde00694f9bd9bf56fce4addafe5a55b5ddb9a4ec477d301d351');\nhashMap.set('glasskube','93e7b9000a17efa15a1abaaf320b5af9169b1ecd828fc0c881d98570ef9d9e30');\nhashMap.set('gleam','5e9b9f5f914afe5ed7b526c06c65111e3716d2dea9b0cbe7907bbc96db1064a3');\nhashMap.set('gomod','6011c22e60814460fb4a40f834608a868776b91eff2cae2d3bfea1e73ccd8aeb');\nhashMap.set('gradle','9e3ff52ce4ad2555929acdd4d32c417c4ef8714c23a92f2893ecc580fa4d6064');\nhashMap.set('gradle-wrapper','73ba30c34955fab7737454b5cff9aca6d1b5607d53c17c9e13d8ad96f6eaae87');\nhashMap.set('haskell-cabal','f158b7725e3143dfd2950e3de0bbccc2a61cd7eba87f7a54c5057e01252348e2');\nhashMap.set('helm-requirements','7ee9dace4c036dfe113c0c0e46369d8b83a739caa831660142ca98d3236a180a');\nhashMap.set('helm-values','0aa79bb0257d0d72e54dfd2653e59bfef63b97e46c035b7443593bdf6e6382aa');\nhashMap.set('helmfile','28572dd24b6746ca7065ee467aa13bbc8c3e8c0f88ae48e33bce88468c600100');\nhashMap.set('helmsman','951deeb3355da751ef39c9e932b26ea749450e32e75759e4b5fc29359e100b37');\nhashMap.set('helmv3','40120cfbf43d213850afa212ab01e2b7e44c8c4de73e6388fb73749593b4c747');\nhashMap.set('hermit','0fb25b7766c3a264fbb765ff75b1542b24136c4c9f933696d4a5aecfed637071');\nhashMap.set('homeassistant-manifest','05043c6db870cffbb6f8f3e351c025e3de227eaae0b24134b796aec46f84b65f');\nhashMap.set('homebrew','dffe954a4e18c2dc4bfdaa12222fe8ddc3395869afd5afa603fc2b6264747984');\nhashMap.set('html','81fa6c2bf2b868596584a48b949645207a2aa3081951ed99183ee50b70b77d5f');\nhashMap.set('jenkins','7fda0e7e0f3d5e18088ccb3594f727f4cfc48b064706bdaaf1a0a075b6a2cff5');\nhashMap.set('jsonnet-bundler','4cedeb0394e5c38361d1868ff45b4f34747ab8c492378b6e63dcaf1f4f3c024d');\nhashMap.set('kotlin-script','95ebc844c040ca047321b207d525220e29774a2a1fe06f9639e8353c66908564');\nhashMap.set('kubernetes','321e7d77fb3600dd4c00a86eaa1294927e7f92300b74fa2977d813dcaa3bb4de');\nhashMap.set('kustomize','706cc4776ad6ec4df5bed0ac84e8324ad7328457b6743b082e444d4770756604');\nhashMap.set('leiningen','c8397e376f1717c2f771ae9ea3ba6b720d2422b133cf937e762c44e42be146a2');\nhashMap.set('maven','c110b99291c2a5bc82cf7a69330275e9bbd7dc8ba3e9e987611dfcffbe002d8d');\nhashMap.set('maven-wrapper','6e53b6e4abf1d20b75094c7a70d66b4a5ac39954f009aa401f5e55dada8be4d0');\nhashMap.set('meteor','4636a47ba4dcfff19fe662572ef7a40d17146be3c966e00ef437e1fc8de92776');\nhashMap.set('mint','248fe4f1ea5c985921c286785792c97e06fc41f402b2d45df82f6aecd17f710e');\nhashMap.set('mise','519dca7c243595393f80c0f56312115bc41c90ad5bd9f80696c78faf95ff6c98');\nhashMap.set('mix','0f79163dc2a1c896599d152be635c23beaf16812ae3d8fbfffec98c7bd0de872');\nhashMap.set('nix','0f80f0b81f2197a7e588be5c115a32a826fc184593f4e879f7b60fafd97a977e');\nhashMap.set('nodenv','ac652c28481b001f7471f4183eac07b45d98ecbe83efc275830b0a1b2e0459b8');\nhashMap.set('npm','65c79e7fc01ae9c0e2edb064011045d4f69f9368232101eb2b349048afc89cc5');\nhashMap.set('nuget','b81fb0ca6cfeb86b004592b38ce176673e056d6a2ed41a9807afb0eb7ad405d2');\nhashMap.set('nvm','3eb77c7b0acf6d64753de78fad2499b352719853aa6872878c40675d14152322');\nhashMap.set('ocb','032b216684c14b0954e0bb019513a2aca3faaee5748587acb668d377d7c891ca');\nhashMap.set('osgi','d6567a733ef3983112b46fdccd7ceebfcd48411104e0c6b6e714d4310db48024');\nhashMap.set('pep621','52450676f8b0e05134b3e8947b832195ef40bcaec1ce43d71351a2f797b80d75');\nhashMap.set('pep723','77022a0eae6a3cbb74a1e6d596db1276e379768e40448192b3fa81edd14ca73f');\nhashMap.set('pip-compile','a98dc76a002e1dc21662237f009ff8fea36236bb4e24cb82ee30c6a78f57271f');\nhashMap.set('pip_requirements','bf3a407f72abf711230247bef94ba5dc84c08a35107b0f017912fad66afa716a');\nhashMap.set('pip_setup','df18fba2bdcf48f3ca12a8f7e5cd28df31e2368d5528127277038ef4206eca79');\nhashMap.set('pipenv','baf237cd77173c1a7a9c7fa2a8bfb214f3c488ba0cc27f0e8f334df192e3a398');\nhashMap.set('pixi','e31c397982ffa34222b061f23f3b3683f42523dd5dca45ecce2448b0ebc55ea2');\nhashMap.set('poetry','e9dea5d591c87956b9f018414cb3dab8f2e13580a13be00550fdce198fdf08e6');\nhashMap.set('pre-commit','760f2c291ae084db889f722390798a0e2d431ccdc3bc676e73b14901ebea19ac');\nhashMap.set('proto','412053d4550026b4ace490b46e970915b87ec1abf0b0a0c6c8c58ccf1fc16843');\nhashMap.set('pub','8e7c65dfd1999de4f7c44392e949a4d8f4701eb86df59d550e4657feb06b1872');\nhashMap.set('puppet','ba58ab689e44acc8f61c3569ab8b40fde01b8a9d3aad712708e2a419e57d8b45');\nhashMap.set('pyenv','9ede8becc97774f9040b40f4472d3e933534b596e04c360bfe0f3c6f95f25182');\nhashMap.set('quadlet','40927b98dd2bac45dba60e66b5fd0e6b84b61d02db8be536fda7b14546a4feb7');\nhashMap.set('renovate-config','dfaf3f03ddaf70c332f7916106648f36dbfa6a36dd76d15dd27fa116ab3c174c');\nhashMap.set('ruby-version','2db2140d9eee8c555e729a4de0396fa2d78846d3149890ee12fa515bd654be97');\nhashMap.set('runtime-version','b582b168c0cc595e39010feb10f4b97a82683eb269e9598216fbb11cc186e160');\nhashMap.set('rust-toolchain','6ace53db02874d73620d2d872291839820a512a9529c42d174358c692e5db720');\nhashMap.set('sbt','e1eb5c7f0171a9bb1b6bd4a36a91039a31b6c84e0983d91d930be31a69506d9e');\nhashMap.set('scalafmt','9d36159b56835e96498af026a1fb0543200db0581681ef95ec54988f411e180f');\nhashMap.set('setup-cfg','4a3a7c812d34739c07685691e7e64c7d3127f9d7d4aff99dc45a25df97ed9745');\nhashMap.set('smithy','9641b91d065ffb63be0dd888139a0402dba41e550f8b44c592db9daf52109100');\nhashMap.set('sveltos','60dd75bb53ace31217211100d622fdb65068c6162758b6ae7103a6ce8bdc9f90');\nhashMap.set('swift','cdf063debdbf36888523ff8cec6d2d1b0ec6f49b37b2fbcd80b0d4f6a31114e1');\nhashMap.set('tekton','33948f5bdf7553909fa63744adb26da97ddf366e9499bccab1250879570267c9');\nhashMap.set('terraform','6788a8569ba9c50c763ffa2bed952a4314ae8e696c29f93d3eb7c4a12d99ce20');\nhashMap.set('terraform-version','ec8f786b9731d47f2c2fe0307caf64d7ddd83046fe7ff1f7d8423239f8b0f2aa');\nhashMap.set('terragrunt','300f8fb3c09667654412d2f5dd8ab4882e0f5d1d7a8bc39794993d2e7e58d1b7');\nhashMap.set('terragrunt-version','eea6087b33717d22ede2fc68c2f64df8390b75abe82110ed831a180648feb51d');\nhashMap.set('tflint-plugin','f423bfa2b42a2bfc0e38a33ebd4f9d452473e7ed4e7ad6384a99eb9a35d97479');\nhashMap.set('travis','f3e2f38e699c390b00ff481be5e91dceaa81609e93caf9a4214933de759c84fc');\nhashMap.set('typst','d080a79fbd961c6e21fcc505d544b7e0ff2126142acb1dcabdf6abbcd9339248');\nhashMap.set('unity3d','f13e25e115e3443f4e16cf31578acffa78fb1a5e23339680a92d8d6de6052920');\nhashMap.set('velaci','fda00ddb7cc23e9a37e0a8a253151df0a6930b4276d3e4f78cc54b9ac09af7de');\nhashMap.set('vendir','7db907b3b77ef5f3465f3c4339fbab56bbcdfd1bf34b3d33e4c178d2e07e23e7');\nhashMap.set('woodpecker','6110d3bec33aaeb3511d4bbfa896cec3c8e02fb04a6cff50c9ba81061c851045');\nhashMap.set('xcodegen','dad511d88a9ce1dbdde8b9731f3da7f2bdaa4ca8a083294ee58d56da62ab1683');\nhashMap.set('jsonata','416bcf61144b276b3112814c6e6d261aa29608f46fbb0516c471d35c16f8f0d7');\nhashMap.set('regex','20be5247fdc164173871a051acb0527da017d0c155c653d7563601f55e7b3ff5');"],"mappings":";AAAA,MAAa,0BAAU,IAAI,IAAoB;AAE/C,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,OAAM,kEAAkE;AACpF,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,QAAO,kEAAkE;AACrF,QAAQ,IAAI,mBAAkB,kEAAkE;AAChG,QAAQ,IAAI,UAAS,kEAAkE;AACvF,QAAQ,IAAI,kBAAiB,kEAAkE;AAC/F,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,gBAAe,kEAAkE;AAC7F,QAAQ,IAAI,YAAW,kEAAkE;AACzF,QAAQ,IAAI,SAAQ,kEAAkE;AACtF,QAAQ,IAAI,uBAAsB,kEAAkE;AACpG,QAAQ,IAAI,WAAU,kEAAkE;AACxF,QAAQ,IAAI,aAAY,kEAAkE;AAC1F,QAAQ,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ndNotWhitespace,\n isString,\n} from '@sindresorhus/is';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport {\n findLocalSiblingOrParent,\n getSiblingFileName,\n readLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\n\nimport type {\n ExtractConfig,\n PackageFile,\n PackageFileContent,\n} from '../../types.ts';\nimport { resolveNpmrc } from '../npmrc.ts';\nimport { PnpmWorkspaceFile, type YarnConfig } from '../schema.ts';\nimport type { NpmLockFiles, NpmManagerData } from '../types.ts';\nimport { getExtractedConstraints } from './common/dependency.ts';\nimport {\n extractPackageJson,\n hasPackageManager,\n} from './common/package-file.ts';\nimport {\n applyPnpmWorkspaceRegistries,\n extractPnpmWorkspaceFile,\n} from './pnpm.ts';\nimport { postExtract } from './post/index.ts';\nimport type { NpmPackage } from './types.ts';\nimport { extractYarnCatalogs, isZeroInstall } from './yarn.ts';\nimport {\n loadConfigFromLegacyYarnrc,\n loadConfigFromYarnrcYml,\n resolveRegistryUrl,\n} from './yarnrc.ts';\n\nfunction hasMultipleLockFiles(lockFiles: NpmLockFiles): boolean {\n return Object.values(lockFiles).filter(isString).length > 1;\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<PackageFileContent<NpmManagerData> | null> {\n logger.trace(`npm.extractPackageFile(${packageFile})`);\n logger.trace({ content });\n let packageJson: NpmPackage;\n try {\n packageJson = JSON.parse(content);\n } catch {\n logger.debug({ packageFile }, `Invalid JSON`);\n return null;\n }\n\n const res = extractPackageJson(packageJson, packageFile);\n if (!res) {\n return null;\n }\n\n let workspacesPackages: string[] | undefined;\n if (isArray(packageJson.workspaces)) {\n workspacesPackages = packageJson.workspaces;\n } else {\n workspacesPackages = packageJson.workspaces?.packages;\n }\n\n const lockFiles: NpmLockFiles = {\n yarnLock: 'yarn.lock',\n packageLock: 'package-lock.json',\n shrinkwrapJson: 'npm-shrinkwrap.json',\n pnpmLockFile: 'pnpm-lock.yaml',\n };\n\n for (const [key, val] of Object.entries(lockFiles) as [\n 'yarnLock' | 'packageLock' | 'shrinkwrapJson' | 'pnpmLockFile',\n string,\n ][]) {\n const filePath = getSiblingFileName(packageFile, val);\n if (await readLocalFile(filePath, 'utf8')) {\n lockFiles[key] = filePath;\n } else {\n lockFiles[key] = undefined;\n }\n }\n lockFiles.npmLock = lockFiles.packageLock ?? lockFiles.shrinkwrapJson;\n delete lockFiles.packageLock;\n delete lockFiles.shrinkwrapJson;\n\n if (hasMultipleLockFiles(lockFiles)) {\n logger.warn(\n 'Updating multiple npm lock files is deprecated and support will be removed in future versions.',\n );\n }\n\n const { npmrc, npmrcFileName } = await resolveNpmrc(packageFile, config);\n\n const yarnrcYmlFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc.yml',\n );\n const yarnZeroInstall = yarnrcYmlFileName\n ? await isZeroInstall(yarnrcYmlFileName)\n : false;\n\n let yarnrcConfig: YarnConfig | null = null;\n const repoYarnrcYml = yarnrcYmlFileName\n ? await readLocalFile(yarnrcYmlFileName, 'utf8')\n : null;\n if (isString(repoYarnrcYml) && repoYarnrcYml.trim().length > 0) {\n yarnrcConfig = loadConfigFromYarnrcYml(repoYarnrcYml);\n }\n\n const legacyYarnrcFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc',\n );\n const repoLegacyYarnrc = legacyYarnrcFileName\n ? await readLocalFile(legacyYarnrcFileName, 'utf8')\n : null;\n if (isString(repoLegacyYarnrc) && repoLegacyYarnrc.trim().length > 0) {\n yarnrcConfig = loadConfigFromLegacyYarnrc(repoLegacyYarnrc);\n }\n\n let pnpmWorkspaceRegistry: string | undefined;\n let pnpmWorkspaceRegistries: Record<string, string> | undefined;\n const pnpmWorkspaceYamlFileName = await findLocalSiblingOrParent(\n packageFile,\n 'pnpm-workspace.yaml',\n );\n const repoPnpmWorkspaceYaml = pnpmWorkspaceYamlFileName\n ? await readLocalFile(pnpmWorkspaceYamlFileName, 'utf8')\n : null;\n if (isNonEmptyStringAndNotWhitespace(repoPnpmWorkspaceYaml)) {\n const parsed = await PnpmWorkspaceFile.safeParseAsync(\n repoPnpmWorkspaceYaml,\n );\n if (parsed.success) {\n pnpmWorkspaceRegistry = parsed.data.registry;\n pnpmWorkspaceRegistries = parsed.data.registries;\n } else {\n logger.debug(\n { packageFile: pnpmWorkspaceYamlFileName, err: parsed.error },\n 'Failed to parse pnpm-workspace.yaml',\n );\n }\n }\n\n if (res.deps.length === 0) {\n logger.debug('Package file has no deps');\n if (!(\n !!res.managerData?.packageJsonName ||\n !!res.packageFileVersion ||\n !!npmrc ||\n workspacesPackages\n )) {\n logger.debug('Skipping file');\n return null;\n }\n }\n let skipInstalls = config.skipInstalls;\n if (skipInstalls === null) {\n const hasFancyRefs = !!res.deps.some(\n (dep) =>\n !!dep.currentValue?.startsWith('file:') ||\n !!dep.currentValue?.startsWith('npm:'),\n );\n if ((hasFancyRefs && !!lockFiles.npmLock) || yarnZeroInstall) {\n // https://github.com/npm/cli/issues/1432\n // Explanation:\n // - npm install --package-lock-only is buggy for transitive deps in file: and npm: references\n // - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already\n // - Also, do not skip install if Yarn zero-install is used\n logger.debug('Automatically setting skipInstalls to false');\n skipInstalls = false;\n } else {\n skipInstalls = true;\n }\n }\n\n const extractedConstraints = getExtractedConstraints(res.deps);\n\n if (yarnrcConfig) {\n for (const dep of res.deps) {\n // v8 ignore else -- TODO: add tests #40625\n if (dep.depName) {\n const registryUrlFromYarnrcConfig = resolveRegistryUrl(\n dep.packageName ?? dep.depName,\n yarnrcConfig,\n );\n if (\n registryUrlFromYarnrcConfig &&\n dep.datasource === NpmDatasource.id\n ) {\n dep.registryUrls = [registryUrlFromYarnrcConfig];\n }\n }\n }\n }\n\n // Applied after the yarnrc resolution so pnpm-workspace.yaml wins in pnpm repos\n applyPnpmWorkspaceRegistries(\n res.deps,\n pnpmWorkspaceRegistries,\n pnpmWorkspaceRegistry,\n );\n\n return {\n ...res,\n npmrc,\n managerData: {\n ...res.managerData,\n ...lockFiles,\n yarnZeroInstall,\n hasPackageManager:\n isNonEmptyStringAndNotWhitespace(packageJson.packageManager) ||\n isNonEmptyObject(packageJson.devEngines?.packageManager),\n workspacesPackages,\n npmrcFileName, // store npmrc file name so we can later tell if it came from the workspace or not\n },\n skipInstalls,\n extractedConstraints,\n };\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<PackageFile<NpmManagerData>[]> {\n const npmFiles: PackageFile<NpmManagerData>[] = [];\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n if (content) {\n // pnpm workspace files are their own package file, defined via managerFilePatterns.\n if (packageFile.endsWith('pnpm-workspace.yaml')) {\n logger.trace(\n { packageFile },\n `Extracting as a pnpm-workspace.yaml file`,\n );\n const parsedPnpmWorkspaceYaml =\n await PnpmWorkspaceFile.safeParseAsync(content);\n if (parsedPnpmWorkspaceYaml.success) {\n logger.trace(\n { packageFile },\n `Extracting file as a pnpm workspace YAML file`,\n );\n const deps = await extractPnpmWorkspaceFile(\n parsedPnpmWorkspaceYaml.data,\n packageFile,\n );\n // v8 ignore else -- TODO: add test #40625\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.warn(\n { packageFile, err: parsedPnpmWorkspaceYaml.error },\n `Failed to parse pnpm-workspace.yaml file`,\n );\n }\n } else {\n if (packageFile.endsWith('json')) {\n logger.trace({ packageFile }, `Extracting as a package.json file`);\n\n const deps = await extractPackageFile(content, packageFile, config);\n // v8 ignore else -- TODO: add tests #40625\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.trace({ packageFile }, `Extracting as a .yarnrc.yml file`);\n\n const yarnConfig = loadConfigFromYarnrcYml(content);\n\n // v8 ignore else -- TODO: add tests #40625\n if (yarnConfig?.catalogs || yarnConfig?.catalog) {\n const hasPackageManagerResult = await hasPackageManager(\n upath.dirname(packageFile),\n );\n const catalogsDeps = await extractYarnCatalogs(\n { catalog: yarnConfig.catalog, catalogs: yarnConfig.catalogs },\n packageFile,\n hasPackageManagerResult,\n );\n // v8 ignore else -- TODO: add tests #40625\n if (catalogsDeps) {\n npmFiles.push({\n ...catalogsDeps,\n packageFile,\n });\n }\n }\n }\n }\n } else {\n logger.debug({ packageFile }, `No content found`);\n }\n }\n\n await postExtract(npmFiles);\n return npmFiles;\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,SAAS,qBAAqB,WAAkC;CAC9D,OAAO,OAAO,OAAO,SAAS,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,SAAS;AAC5D;AAEA,eAAsB,mBACpB,SACA,aACA,QACoD;CACpD,OAAO,MAAM,0BAA0B,YAAY,EAAE;CACrD,OAAO,MAAM,EAAE,QAAQ,CAAC;CACxB,IAAI;CACJ,IAAI;EACF,cAAc,KAAK,MAAM,OAAO;CAClC,QAAQ;EACN,OAAO,MAAM,EAAE,YAAY,GAAG,cAAc;EAC5C,OAAO;CACT;CAEA,MAAM,MAAM,mBAAmB,aAAa,WAAW;CACvD,IAAI,CAAC,KACH,OAAO;CAGT,IAAI;CACJ,IAAI,QAAQ,YAAY,UAAU,GAChC,qBAAqB,YAAY;MAEjC,qBAAqB,YAAY,YAAY;CAG/C,MAAM,YAA0B;EAC9B,UAAU;EACV,aAAa;EACb,gBAAgB;EAChB,cAAc;CAChB;CAEA,KAAK,MAAM,CAAC,KAAK,QAAQ,OAAO,QAAQ,SAAS,GAG5C;EACH,MAAM,WAAW,mBAAmB,aAAa,GAAG;EACpD,IAAI,MAAM,cAAc,UAAU,MAAM,GACtC,UAAU,OAAO;OAEjB,UAAU,OAAO,KAAA;CAErB;CACA,UAAU,UAAU,UAAU,eAAe,UAAU;CACvD,OAAO,UAAU;CACjB,OAAO,UAAU;CAEjB,IAAI,qBAAqB,SAAS,GAChC,OAAO,KACL,gGACF;CAGF,MAAM,EAAE,OA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AAI,MACF,SAAS,KAAK;KACZ,GAAG;KACH;IACF,CAAC;GAEL,OAAO;IACL,OAAO,MAAM,EAAE,YAAY,GAAG,kCAAkC;IAEhE,MAAM,aAAa,wBAAwB,OAAO;;IAGlD,IAAI,YAAY,YAAY,YAAY,SAAS;KAC/C,MAAM,0BAA0B,MAAM,kBACpC,MAAM,QAAQ,WAAW,CAC3B;KACA,MAAM,eAAe,MAAM,oBACzB;MAAE,SAAS,WAAW;MAAS,UAAU,WAAW;KAAS,GAC7D,aACA,uBACF;;KAEA,IAAI,cACF,SAAS,KAAK;MACZ,GAAG;MACH;KACF,CAAC;IAEL;GACF;EAEJ,OACE,OAAO,MAAM,EAAE,YAAY,GAAG,kBAAkB;CAEpD;CAEA,MAAM,YAAY,QAAQ;CAC1B,OAAO;AACT"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../lib/modules/manager/npm/extract/index.ts"],"sourcesContent":["import {\n isArray,\n isNonEmptyObject,\n isNonEmptyStringAndNotWhitespace,\n isString,\n} from '@sindresorhus/is';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport {\n findLocalSiblingOrParent,\n getSiblingFileName,\n readLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\n\nimport type {\n ExtractConfig,\n NpmrcPackageFile,\n NpmrcPackageFileContent,\n} from '../../types.ts';\nimport { resolveNpmrc } from '../npmrc.ts';\nimport { PnpmWorkspaceFile, type YarnConfig } from '../schema.ts';\nimport type { NpmLockFiles, NpmManagerData } from '../types.ts';\nimport { getExtractedConstraints } from './common/dependency.ts';\nimport {\n extractPackageJson,\n hasPackageManager,\n} from './common/package-file.ts';\nimport {\n applyPnpmWorkspaceRegistries,\n extractPnpmWorkspaceFile,\n} from './pnpm.ts';\nimport { postExtract } from './post/index.ts';\nimport type { NpmPackage } from './types.ts';\nimport { extractYarnCatalogs, isZeroInstall } from './yarn.ts';\nimport {\n loadConfigFromLegacyYarnrc,\n loadConfigFromYarnrcYml,\n resolveRegistryUrl,\n} from './yarnrc.ts';\n\nfunction hasMultipleLockFiles(lockFiles: NpmLockFiles): boolean {\n return Object.values(lockFiles).filter(isString).length > 1;\n}\n\nexport async function extractPackageFile(\n content: string,\n packageFile: string,\n config: ExtractConfig,\n): Promise<NpmrcPackageFileContent<NpmManagerData> | null> {\n logger.trace(`npm.extractPackageFile(${packageFile})`);\n logger.trace({ content });\n let packageJson: NpmPackage;\n try {\n packageJson = JSON.parse(content);\n } catch {\n logger.debug({ packageFile }, `Invalid JSON`);\n return null;\n }\n\n const res = extractPackageJson(packageJson, packageFile);\n if (!res) {\n return null;\n }\n\n let workspacesPackages: string[] | undefined;\n if (isArray(packageJson.workspaces)) {\n workspacesPackages = packageJson.workspaces;\n } else {\n workspacesPackages = packageJson.workspaces?.packages;\n }\n\n const lockFiles: NpmLockFiles = {\n yarnLock: 'yarn.lock',\n packageLock: 'package-lock.json',\n shrinkwrapJson: 'npm-shrinkwrap.json',\n pnpmLockFile: 'pnpm-lock.yaml',\n };\n\n for (const [key, val] of Object.entries(lockFiles) as [\n 'yarnLock' | 'packageLock' | 'shrinkwrapJson' | 'pnpmLockFile',\n string,\n ][]) {\n const filePath = getSiblingFileName(packageFile, val);\n if (await readLocalFile(filePath, 'utf8')) {\n lockFiles[key] = filePath;\n } else {\n lockFiles[key] = undefined;\n }\n }\n lockFiles.npmLock = lockFiles.packageLock ?? lockFiles.shrinkwrapJson;\n delete lockFiles.packageLock;\n delete lockFiles.shrinkwrapJson;\n\n if (hasMultipleLockFiles(lockFiles)) {\n logger.warn(\n 'Updating multiple npm lock files is deprecated and support will be removed in future versions.',\n );\n }\n\n const { npmrc, npmrcFileName } = await resolveNpmrc(packageFile, config);\n\n const yarnrcYmlFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc.yml',\n );\n const yarnZeroInstall = yarnrcYmlFileName\n ? await isZeroInstall(yarnrcYmlFileName)\n : false;\n\n let yarnrcConfig: YarnConfig | null = null;\n const repoYarnrcYml = yarnrcYmlFileName\n ? await readLocalFile(yarnrcYmlFileName, 'utf8')\n : null;\n if (isString(repoYarnrcYml) && repoYarnrcYml.trim().length > 0) {\n yarnrcConfig = loadConfigFromYarnrcYml(repoYarnrcYml);\n }\n\n const legacyYarnrcFileName = await findLocalSiblingOrParent(\n packageFile,\n '.yarnrc',\n );\n const repoLegacyYarnrc = legacyYarnrcFileName\n ? await readLocalFile(legacyYarnrcFileName, 'utf8')\n : null;\n if (isString(repoLegacyYarnrc) && repoLegacyYarnrc.trim().length > 0) {\n yarnrcConfig = loadConfigFromLegacyYarnrc(repoLegacyYarnrc);\n }\n\n let pnpmWorkspaceRegistry: string | undefined;\n let pnpmWorkspaceRegistries: Record<string, string> | undefined;\n const pnpmWorkspaceYamlFileName = await findLocalSiblingOrParent(\n packageFile,\n 'pnpm-workspace.yaml',\n );\n const repoPnpmWorkspaceYaml = pnpmWorkspaceYamlFileName\n ? await readLocalFile(pnpmWorkspaceYamlFileName, 'utf8')\n : null;\n if (isNonEmptyStringAndNotWhitespace(repoPnpmWorkspaceYaml)) {\n const parsed = await PnpmWorkspaceFile.safeParseAsync(\n repoPnpmWorkspaceYaml,\n );\n if (parsed.success) {\n pnpmWorkspaceRegistry = parsed.data.registry;\n pnpmWorkspaceRegistries = parsed.data.registries;\n } else {\n logger.debug(\n { packageFile: pnpmWorkspaceYamlFileName, err: parsed.error },\n 'Failed to parse pnpm-workspace.yaml',\n );\n }\n }\n\n if (res.deps.length === 0) {\n logger.debug('Package file has no deps');\n if (!(\n !!res.managerData?.packageJsonName ||\n !!res.packageFileVersion ||\n !!npmrc ||\n workspacesPackages\n )) {\n logger.debug('Skipping file');\n return null;\n }\n }\n let skipInstalls = config.skipInstalls;\n if (skipInstalls === null) {\n const hasFancyRefs = !!res.deps.some(\n (dep) =>\n !!dep.currentValue?.startsWith('file:') ||\n !!dep.currentValue?.startsWith('npm:'),\n );\n if ((hasFancyRefs && !!lockFiles.npmLock) || yarnZeroInstall) {\n // https://github.com/npm/cli/issues/1432\n // Explanation:\n // - npm install --package-lock-only is buggy for transitive deps in file: and npm: references\n // - So we set skipInstalls to false if file: or npm: refs are found *and* the user hasn't explicitly set the value already\n // - Also, do not skip install if Yarn zero-install is used\n logger.debug('Automatically setting skipInstalls to false');\n skipInstalls = false;\n } else {\n skipInstalls = true;\n }\n }\n\n const extractedConstraints = getExtractedConstraints(res.deps);\n\n if (yarnrcConfig) {\n for (const dep of res.deps) {\n // v8 ignore else -- TODO: add tests #40625\n if (dep.depName) {\n const registryUrlFromYarnrcConfig = resolveRegistryUrl(\n dep.packageName ?? dep.depName,\n yarnrcConfig,\n );\n if (\n registryUrlFromYarnrcConfig &&\n dep.datasource === NpmDatasource.id\n ) {\n dep.registryUrls = [registryUrlFromYarnrcConfig];\n }\n }\n }\n }\n\n // Applied after the yarnrc resolution so pnpm-workspace.yaml wins in pnpm repos\n applyPnpmWorkspaceRegistries(\n res.deps,\n pnpmWorkspaceRegistries,\n pnpmWorkspaceRegistry,\n );\n\n return {\n ...res,\n npmrc,\n managerData: {\n ...res.managerData,\n ...lockFiles,\n yarnZeroInstall,\n hasPackageManager:\n isNonEmptyStringAndNotWhitespace(packageJson.packageManager) ||\n isNonEmptyObject(packageJson.devEngines?.packageManager),\n workspacesPackages,\n npmrcFileName, // store npmrc file name so we can later tell if it came from the workspace or not\n },\n skipInstalls,\n extractedConstraints,\n };\n}\n\nexport async function extractAllPackageFiles(\n config: ExtractConfig,\n packageFiles: string[],\n): Promise<NpmrcPackageFile<NpmManagerData>[]> {\n const npmFiles: NpmrcPackageFile<NpmManagerData>[] = [];\n for (const packageFile of packageFiles) {\n const content = await readLocalFile(packageFile, 'utf8');\n if (content) {\n // pnpm workspace files are their own package file, defined via managerFilePatterns.\n if (packageFile.endsWith('pnpm-workspace.yaml')) {\n logger.trace(\n { packageFile },\n `Extracting as a pnpm-workspace.yaml file`,\n );\n const parsedPnpmWorkspaceYaml =\n await PnpmWorkspaceFile.safeParseAsync(content);\n if (parsedPnpmWorkspaceYaml.success) {\n logger.trace(\n { packageFile },\n `Extracting file as a pnpm workspace YAML file`,\n );\n const deps = await extractPnpmWorkspaceFile(\n parsedPnpmWorkspaceYaml.data,\n packageFile,\n );\n // v8 ignore else -- TODO: add test #40625\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.warn(\n { packageFile, err: parsedPnpmWorkspaceYaml.error },\n `Failed to parse pnpm-workspace.yaml file`,\n );\n }\n } else {\n if (packageFile.endsWith('json')) {\n logger.trace({ packageFile }, `Extracting as a package.json file`);\n\n const deps = await extractPackageFile(content, packageFile, config);\n // v8 ignore else -- TODO: add tests #40625\n if (deps) {\n npmFiles.push({\n ...deps,\n packageFile,\n });\n }\n } else {\n logger.trace({ packageFile }, `Extracting as a .yarnrc.yml file`);\n\n const yarnConfig = loadConfigFromYarnrcYml(content);\n\n // v8 ignore else -- TODO: add tests #40625\n if (yarnConfig?.catalogs || yarnConfig?.catalog) {\n const hasPackageManagerResult = await hasPackageManager(\n upath.dirname(packageFile),\n );\n const catalogsDeps = await extractYarnCatalogs(\n { catalog: yarnConfig.catalog, catalogs: yarnConfig.catalogs },\n packageFile,\n hasPackageManagerResult,\n );\n // v8 ignore else -- TODO: add tests #40625\n if (catalogsDeps) {\n npmFiles.push({\n ...catalogsDeps,\n packageFile,\n });\n }\n }\n }\n }\n } else {\n logger.debug({ packageFile }, `No content found`);\n }\n }\n\n await postExtract(npmFiles);\n return npmFiles;\n}\n"],"mappings":";;;;;;;;;;;;;;AAyCA,SAAS,qBAAqB,WAAkC;CAC9D,OAAO,OAAO,OAAO,SAAS,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,SAAS;AAC5D;AAEA,eAAsB,mBACpB,SACA,aACA,QACyD;CACzD,OAAO,MAAM,0BAA0B,YAAY,EAAE;CACrD,OAAO,MAAM,EAAE,QAAQ,CAAC;CACxB,IAAI;CACJ,IAAI;EACF,cAAc,KA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/manager/npm/extract/post/monorepo.ts"],"sourcesContent":["import { isArray, isString, isTruthy } from '@sindresorhus/is';\nimport { logger } from '../../../../../logger/index.ts';\nimport {\n getParentDir,\n getSiblingFileName,\n} from '../../../../../util/fs/index.ts';\nimport { coerceObject } from '../../../../../util/object.ts';\nimport type {
|
|
1
|
+
{"version":3,"file":"monorepo.js","names":[],"sources":["../../../../../../lib/modules/manager/npm/extract/post/monorepo.ts"],"sourcesContent":["import { isArray, isString, isTruthy } from '@sindresorhus/is';\nimport { logger } from '../../../../../logger/index.ts';\nimport {\n getParentDir,\n getSiblingFileName,\n} from '../../../../../util/fs/index.ts';\nimport { coerceObject } from '../../../../../util/object.ts';\nimport type { NpmrcPackageFile } from '../../../types.ts';\nimport type { NpmManagerData } from '../../types.ts';\nimport { detectPnpmWorkspaces } from '../pnpm.ts';\nimport { matchesAnyPattern } from '../utils.ts';\n\nexport async function detectMonorepos(\n packageFiles: Partial<NpmrcPackageFile<NpmManagerData>>[],\n): Promise<void> {\n await detectPnpmWorkspaces(packageFiles);\n logger.debug('Detecting workspaces');\n for (const p of packageFiles) {\n const { packageFile, npmrc, managerData = {}, skipInstalls } = p;\n const {\n npmLock,\n yarnZeroInstall,\n hasPackageManager,\n workspacesPackages,\n yarnLock,\n } = managerData;\n\n const packages = workspacesPackages as string[] | undefined;\n if (packages?.length) {\n const internalPackagePatterns = (\n isArray(packages) ? packages : [packages]\n ).map((pattern) => getSiblingFileName(packageFile!, pattern));\n const internalPackageFiles = packageFiles.filter((sp) =>\n matchesAnyPattern(\n getParentDir(sp.packageFile!),\n internalPackagePatterns,\n ),\n );\n const internalPackageNames = internalPackageFiles\n .map((sp) => sp.managerData?.packageJsonName)\n .filter(isTruthy);\n\n p.deps?.forEach((dep) => {\n if (\n isString(dep.depName) &&\n internalPackageNames.includes(dep.depName)\n ) {\n dep.isInternal = true;\n }\n });\n\n for (const subPackage of internalPackageFiles) {\n subPackage.managerData = coerceObject(subPackage.managerData);\n subPackage.managerData.yarnZeroInstall = yarnZeroInstall;\n subPackage.managerData.hasPackageManager = hasPackageManager;\n subPackage.managerData.yarnLock ??= yarnLock;\n subPackage.managerData.npmLock ??= npmLock;\n subPackage.skipInstalls = skipInstalls && subPackage.skipInstalls; // skip if both are true\n subPackage.managerData.workspacesPackages = workspacesPackages;\n subPackage.npmrc ??= npmrc;\n\n if (p.extractedConstraints) {\n subPackage.extractedConstraints = {\n ...p.extractedConstraints,\n ...subPackage.extractedConstraints,\n };\n }\n\n subPackage.deps?.forEach((dep) => {\n if (\n isString(dep.depName) &&\n internalPackageNames.includes(dep.depName)\n ) {\n dep.isInternal = true;\n }\n });\n }\n }\n }\n}\n"],"mappings":";;;;;;;AAYA,eAAsB,gBACpB,cACe;CACf,MAAM,qBAAqB,YAAY;CACvC,OAAO,MAAM,sBAAsB;CACnC,KAAK,MAAM,KAAK,cAAc;EAC5B,MAAM,EAAE,aAAa,OAAO,cAAc,CAAC,GAAG,iBAAiB;EAC/D,MAAM,EACJ,SACA,iBACA,mBACA,oBACA,aACE;EAEJ,MAAM,WAAW;EACjB,IAAI,UAAU,QAAQ;GACpB,MAAM,2BACJ,QAAQ,QAAQ,IAAI,WAAW,CAAC,QAAQ,EAAA,CACxC,KAAK,YAAY,mBAAmB,aAAc,OAAO,CAAC;GAC5D,MAAM,uBAAuB,aAAa,QAAQ,OAChD,kBACE,aAAa,GAAG,WAAY,GAC5B,uBACF,CACF;GACA,MAAM,uBAAuB,qBAC1B,KAAK,OAAO,GAAG,aAAa,eAAe,CAAC,CAC5C,OAAO,QAAQ;GAElB,EAAE,MAAM,SAAS,QAAQ;IACvB,IACE,SAAS,IAAI,OAAO,KACpB,qBAAqB,SAAS,IAAI,OAAO,GAEzC,IAAI,aAAa;GAErB,CAAC;GAED,KAAK,MAAM,cAAc,sBAAsB;IAC7C,WAAW,cAAc,aAAa,WAAW,WAAW;IAC5D,WAAW,YAAY,kBAAkB;IACzC,WAAW,YAAY,oBAAoB;IAC3C,WAAW,YAAY,aAAa;IACpC,WAAW,YAAY,YAAY;IACnC,WAAW,eAAe,gBAAgB,WAAW;IACrD,WAAW,YAAY,qBAAqB;IAC5C,WAAW,UAAU;IAErB,IAAI,EAAE,sBACJ,WAAW,uBAAuB;KAChC,GAAG,EAAE;KACL,GAAG,WAAW;IAChB;IAGF,WAAW,MAAM,SAAS,QAAQ;KAChC,IACE,SAAS,IAAI,OAAO,KACpB,qBAAqB,SAAS,IAAI,OAAO,GAEzC,IAAI,aAAa;IAErB,CAAC;GACH;EACF;CACF;AACF"}
|
|
@@ -26,6 +26,7 @@ var npm_exports = /* @__PURE__ */ __exportAll({
|
|
|
26
26
|
supportedDatasources: () => supportedDatasources,
|
|
27
27
|
supportsDynamicDepTypesNote: () => supportsDynamicDepTypesNote,
|
|
28
28
|
supportsLockFileMaintenance: () => true,
|
|
29
|
+
supportsNpmrc: () => true,
|
|
29
30
|
updateArtifacts: () => updateArtifacts,
|
|
30
31
|
updateDependency: () => updateDependency,
|
|
31
32
|
updateLockedDependency: () => updateLockedDependency,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/npm/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { detectGlobalConfig } from './detect.ts';\nexport { extractAllPackageFiles } from './extract/index.ts';\nexport { getRangeStrategy } from './range.ts';\nexport {\n bumpPackageVersion,\n updateDependency,\n updateLockedDependency,\n} from './update/index.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const lockFileNames = [\n 'package-lock.json',\n 'pnpm-lock.yaml',\n 'yarn.lock',\n];\nexport const lockFileMaintenanceIsDelegatedToPackageManager =\n 'Delegated to the underlying package manager CLI - `npm`, `pnpm`, or Yarn - depending on which lock file is present.';\n\nexport const displayName = 'npm';\nexport const url = 'https://docs.npmjs.com';\nexport const categories: Category[] = ['js'];\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '/(^|/)package\\\\.json$/',\n '/(^|/)pnpm-workspace\\\\.yaml$/',\n '/(^|/)\\\\.yarnrc\\\\.yml$/',\n ],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [\n GithubTagsDatasource.id,\n NpmDatasource.id,\n NodeVersionDatasource.id,\n];\n\nexport { knownDepTypes, supportsDynamicDepTypesNote } from './dep-types.ts';\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../lib/modules/manager/npm/index.ts"],"sourcesContent":["import type { Category } from '../../../constants/index.ts';\nimport { GithubTagsDatasource } from '../../datasource/github-tags/index.ts';\nimport { NodeVersionDatasource } from '../../datasource/node-version/index.ts';\nimport { NpmDatasource } from '../../datasource/npm/index.ts';\n\nexport { updateArtifacts } from './artifacts.ts';\nexport { detectGlobalConfig } from './detect.ts';\nexport { extractAllPackageFiles } from './extract/index.ts';\nexport { getRangeStrategy } from './range.ts';\nexport {\n bumpPackageVersion,\n updateDependency,\n updateLockedDependency,\n} from './update/index.ts';\n\nexport const supportsLockFileMaintenance = true;\nexport const supportsNpmrc = true;\nexport const lockFileNames = [\n 'package-lock.json',\n 'pnpm-lock.yaml',\n 'yarn.lock',\n];\nexport const lockFileMaintenanceIsDelegatedToPackageManager =\n 'Delegated to the underlying package manager CLI - `npm`, `pnpm`, or Yarn - depending on which lock file is present.';\n\nexport const displayName = 'npm';\nexport const url = 'https://docs.npmjs.com';\nexport const categories: Category[] = ['js'];\n\nexport const defaultConfig = {\n managerFilePatterns: [\n '/(^|/)package\\\\.json$/',\n '/(^|/)pnpm-workspace\\\\.yaml$/',\n '/(^|/)\\\\.yarnrc\\\\.yml$/',\n ],\n digest: {\n prBodyDefinitions: {\n Change:\n '{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}',\n },\n },\n prBodyDefinitions: {\n Change:\n \"[{{#if displayFrom}}`{{{displayFrom}}}` → {{else}}{{#if currentValue}}`{{{currentValue}}}` → {{/if}}{{/if}}{{#if displayTo}}`{{{displayTo}}}`{{else}}`{{{newValue}}}`{{/if}}]({{#if depName}}https://renovatebot.com/diffs/npm/{{replace '/' '%2f' depName}}/{{{currentVersion}}}/{{{newVersion}}}{{/if}})\",\n },\n};\n\nexport const supportedDatasources = [\n GithubTagsDatasource.id,\n NpmDatasource.id,\n NodeVersionDatasource.id,\n];\n\nexport { knownDepTypes, supportsDynamicDepTypesNote } from './dep-types.ts';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,MAAa,gBAAgB;CAC3B;CACA;CACA;AACF;AACA,MAAa,iDACX;AAGF,MAAa,MAAM;AACnB,MAAa,aAAyB,CAAC,IAAI;AAE3C,MAAa,gBAAgB;CAC3B,qBAAqB;EACnB;EACA;EACA;CACF;CACA,QAAQ,EACN,mBAAmB,EACjB,QACE,8KACJ,EACF;CACA,mBAAmB,EACjB,QACE,6SACJ;AACF;AAEA,MAAa,uBAAuB;CAClC,qBAAqB;CACrB,cAAc;CACd,sBAAsB;AACxB"}
|
|
@@ -60,31 +60,36 @@ function mergeNpmrcDocuments(configNpmrc, sanitizedRepoNpmrc) {
|
|
|
60
60
|
if (configDocument.trailingLineEnding) return `${configNpmrc}${sanitizedRepoNpmrc.content}`;
|
|
61
61
|
return `${configNpmrc}${configDocument.detectedLineEnding ?? sanitizedRepoNpmrc.detectedLineEnding ?? "\n"}${sanitizedRepoNpmrc.content}`;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Combines the configured `npmrc` with the sanitized repository `.npmrc`, honouring `npmrcMerge`.
|
|
65
|
+
*
|
|
66
|
+
* @returns the `npmrc` to use for the package file, or `undefined` when there is neither
|
|
67
|
+
*/
|
|
68
|
+
function applyConfigNpmrc(config, repoNpmrc, npmrcFileName) {
|
|
69
|
+
if (!repoNpmrc) return isString(config.npmrc) ? config.npmrc : void 0;
|
|
70
|
+
if (isString(config.npmrc) && !config.npmrcMerge) {
|
|
71
|
+
logger.info({ npmrcFileName }, "Repo .npmrc file is ignored due to config.npmrc with config.npmrcMerge=false");
|
|
72
|
+
return config.npmrc;
|
|
73
|
+
}
|
|
74
|
+
return mergeNpmrcDocuments(config.npmrc, repoNpmrc);
|
|
75
|
+
}
|
|
63
76
|
async function resolveNpmrc(packageFile, config) {
|
|
64
77
|
const npmrcFileName = await findLocalSiblingOrParent(packageFile, ".npmrc");
|
|
65
78
|
if (!npmrcFileName) return {
|
|
66
|
-
npmrc:
|
|
79
|
+
npmrc: applyConfigNpmrc(config, void 0),
|
|
67
80
|
npmrcFileName
|
|
68
81
|
};
|
|
69
|
-
const
|
|
70
|
-
if (!isString(
|
|
82
|
+
const repoNpmrcContent = await readLocalFile(npmrcFileName, "utf8");
|
|
83
|
+
if (!isString(repoNpmrcContent)) return {
|
|
71
84
|
npmrc: void 0,
|
|
72
85
|
npmrcFileName
|
|
73
86
|
};
|
|
74
|
-
if (isString(config.npmrc) && !config.npmrcMerge) {
|
|
75
|
-
logger.info({ npmrcFileName }, "Repo .npmrc file is ignored due to config.npmrc with config.npmrcMerge=false");
|
|
76
|
-
return {
|
|
77
|
-
npmrc: config.npmrc,
|
|
78
|
-
npmrcFileName
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
const sanitizedRepoNpmrc = sanitizeRepoNpmrc(repoNpmrc, npmrcFileName);
|
|
82
87
|
return {
|
|
83
|
-
npmrc:
|
|
88
|
+
npmrc: applyConfigNpmrc(config, sanitizeRepoNpmrc(repoNpmrcContent, npmrcFileName), npmrcFileName),
|
|
84
89
|
npmrcFileName
|
|
85
90
|
};
|
|
86
91
|
}
|
|
87
92
|
//#endregion
|
|
88
|
-
export { resolveNpmrc };
|
|
93
|
+
export { applyConfigNpmrc, resolveNpmrc };
|
|
89
94
|
|
|
90
95
|
//# sourceMappingURL=npmrc.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmrc.js","names":[],"sources":["../../../../lib/modules/manager/npm/npmrc.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport {\n findLocalSiblingOrParent,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseNpmrc, renderNpmrc } from './npmrc-parser.ts';\nimport type {\n
|
|
1
|
+
{"version":3,"file":"npmrc.js","names":[],"sources":["../../../../lib/modules/manager/npm/npmrc.ts"],"sourcesContent":["import { isString } from '@sindresorhus/is';\nimport { GlobalConfig } from '../../../config/global.ts';\nimport { logger } from '../../../logger/index.ts';\nimport {\n findLocalSiblingOrParent,\n readLocalFile,\n} from '../../../util/fs/index.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport { parseNpmrc, renderNpmrc } from './npmrc-parser.ts';\nimport type {\n NpmrcConfig,\n NpmrcLine,\n NpmrcLineEnding,\n NpmrcResult,\n NpmrcSettingLine,\n SanitizedRepoNpmrc,\n} from './types.ts';\n\n/**\n * Mirrors npm's environment-reference grammar. Escape handling remains\n * procedural because RE2 does not support lookbehind.\n */\nconst environmentVariableReferenceRegex = regEx(\n // oxlint-disable-next-line prefer-named-capture-group -- Only the full match and its position are used.\n /\\$\\{([^${}?]+)(\\?)?\\}/g,\n);\n\nfunction containsEnvironmentVariableReference(value: unknown): boolean {\n if (!isString(value)) {\n return false;\n }\n\n for (const match of value.matchAll(environmentVariableReferenceRegex)) {\n let escapeCount = 0;\n let escapeIndex = match.index - 1;\n while (value[escapeIndex] === '\\\\') {\n escapeCount += 1;\n escapeIndex -= 1;\n }\n\n if (escapeCount % 2 === 0) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction hasEnvironmentVariableReference(line: NpmrcSettingLine): boolean {\n return (\n containsEnvironmentVariableReference(line.key) ||\n containsEnvironmentVariableReference(line.value)\n );\n}\n\nfunction sanitizeRepoNpmrc(\n repoNpmrc: string,\n npmrcFileName: string,\n): SanitizedRepoNpmrc {\n const document = parseNpmrc(repoNpmrc);\n const retainedLines: NpmrcLine[] = [];\n const allowEnvironmentVariableReferences = GlobalConfig.get('exposeAllEnv');\n let removedEnvironmentVariableReferenceLine = false;\n let removedPackageLockSetting = false;\n\n for (const line of document.lines) {\n if (line.type !== 'setting' || line.section !== null) {\n retainedLines.push(line);\n continue;\n }\n\n if (line.key === 'package-lock') {\n removedPackageLockSetting = true;\n continue;\n }\n\n if (\n !allowEnvironmentVariableReferences &&\n hasEnvironmentVariableReference(line)\n ) {\n removedEnvironmentVariableReferenceLine = true;\n continue;\n }\n\n retainedLines.push(line);\n }\n\n if (removedPackageLockSetting) {\n logger.debug('Stripping package-lock setting from .npmrc');\n }\n\n if (removedEnvironmentVariableReferenceLine) {\n logger.debug(\n { npmrcFileName },\n 'Stripping .npmrc file of lines with variables',\n );\n }\n\n return {\n content: renderNpmrc(retainedLines),\n detectedLineEnding: document.detectedLineEnding,\n };\n}\n\nfunction mergeNpmrcDocuments(\n configNpmrc: string | undefined,\n sanitizedRepoNpmrc: SanitizedRepoNpmrc,\n): string {\n if (!configNpmrc) {\n return sanitizedRepoNpmrc.content;\n }\n\n const configDocument = parseNpmrc(configNpmrc);\n if (configDocument.trailingLineEnding) {\n return `${configNpmrc}${sanitizedRepoNpmrc.content}`;\n }\n\n const separator: Exclude<NpmrcLineEnding, ''> =\n configDocument.detectedLineEnding ??\n sanitizedRepoNpmrc.detectedLineEnding ??\n '\\n';\n\n return `${configNpmrc}${separator}${sanitizedRepoNpmrc.content}`;\n}\n\n/**\n * Combines the configured `npmrc` with the sanitized repository `.npmrc`, honouring `npmrcMerge`.\n *\n * @returns the `npmrc` to use for the package file, or `undefined` when there is neither\n */\nexport function applyConfigNpmrc(\n config: NpmrcConfig,\n repoNpmrc: SanitizedRepoNpmrc | undefined,\n npmrcFileName?: string | null,\n): string | undefined {\n if (!repoNpmrc) {\n return isString(config.npmrc) ? config.npmrc : undefined;\n }\n\n if (isString(config.npmrc) && !config.npmrcMerge) {\n logger.info(\n { npmrcFileName },\n 'Repo .npmrc file is ignored due to config.npmrc with config.npmrcMerge=false',\n );\n\n return config.npmrc;\n }\n\n return mergeNpmrcDocuments(config.npmrc, repoNpmrc);\n}\n\nexport async function resolveNpmrc(\n packageFile: string,\n config: NpmrcConfig,\n): Promise<NpmrcResult> {\n const npmrcFileName = await findLocalSiblingOrParent(packageFile, '.npmrc');\n if (!npmrcFileName) {\n return {\n npmrc: applyConfigNpmrc(config, undefined),\n npmrcFileName,\n };\n }\n\n const repoNpmrcContent = await readLocalFile(npmrcFileName, 'utf8');\n\n if (!isString(repoNpmrcContent)) {\n return { npmrc: undefined, npmrcFileName };\n }\n\n const repoNpmrc = sanitizeRepoNpmrc(repoNpmrcContent, npmrcFileName);\n return {\n npmrc: applyConfigNpmrc(config, repoNpmrc, npmrcFileName),\n npmrcFileName,\n };\n}\n"],"mappings":";;;;;;;;;;;AAsBA,MAAM,oCAAoC,MAExC,wBACF;AAEA,SAAS,qCAAqC,OAAyB;CACrE,IAAI,CAAC,SAAS,KAAK,GACjB,OAAO;CAGT,KAAK,M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OAAO,QAAQ,KAAA;CAGjD,IAAI,SAAS,OAAO,KAAK,KAAK,CAAC,OAAO,YAAY;EAChD,OAAO,KACL,EAAE,cAAc,GAChB,8EACF;EAEA,OAAO,OAAO;CAChB;CAEA,OAAO,oBAAoB,OAAO,OAAO,SAAS;AACpD;AAEA,eAAsB,aACpB,aACA,QACsB;CACtB,MAAM,gBAAgB,MAAM,yBAAyB,aAAa,QAAQ;CAC1E,IAAI,CAAC,eACH,OAAO;EACL,OAAO,iBAAiB,QAAQ,KAAA,CAAS;EACzC;CACF;CAGF,MAAM,mBAAmB,MAAM,cAAc,eAAe,MAAM;CAElE,IAAI,CAAC,SAAS,gBAAgB,GAC5B,OAAO;EAAE,OAAO,KAAA;EAAW;CAAc;CAI3C,OAAO;EACL,OAAO,iBAAiB,QAFR,kBAAkB,kBAAkB,aAEZ,GAAG,aAAa;EACxD;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["hostRules.find","npm.generateLockFile","deepmerge","yarn.fuzzyMatchAdditionalYarnrcYml","yarn.generateLockFile","yarn.isYarnUpdate","pnpm.generateLockFile"],"sources":["../../../../../lib/modules/manager/npm/post-update/index.ts"],"sourcesContent":["// TODO: types (#22198)\nimport { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport deepmerge from 'deepmerge';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error.ts';\nimport { getEnv } from '../../../../util/env.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { getFile, getRepoStatus } from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport * as hostRules from '../../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../../util/regex.ts';\nimport { ensureTrailingSlash } from '../../../../util/url.ts';\nimport { dump, parseSingleYaml } from '../../../../util/yaml.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\nimport { scm } from '../../../platform/scm.ts';\nimport type {\n ArtifactError,\n ArtifactNotice,\n PackageFile,\n PostUpdateConfig,\n Upgrade,\n} from '../../types.ts';\nimport { artifactErrorMessageFromExecError } from '../../util.ts';\nimport {\n NPM_CACHE_DIR,\n PNPM_CACHE_BASE_DIR,\n YARN_CACHE_DIR,\n YARN_GLOBAL_DIR,\n} from '../constants.ts';\nimport { getZeroInstallPaths } from '../extract/yarn.ts';\nimport type { NpmManagerData } from '../types.ts';\nimport {\n composeLockFile,\n parseLockFile,\n withNpmrcHostRules,\n} from '../utils.ts';\nimport * as npm from './npm.ts';\nimport * as pnpm from './pnpm.ts';\nimport { processHostRules } from './rules.ts';\nimport type {\n AdditionalPackageFiles,\n DetermineLockFileDirsResult,\n WriteExistingFilesResult,\n YarnRcYmlFile,\n} from './types.ts';\nimport * as yarn from './yarn.ts';\n\n// Strips empty values, deduplicates, and returns the directories from filenames\nfunction getDirs(arr: (string | null | undefined)[]): string[] {\n return Array.from(new Set(arr.filter(isString)));\n}\n\nexport function determineLockFileDirs(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): DetermineLockFileDirsResult {\n const npmLockDirs: (string | undefined)[] = [];\n const yarnLockDirs: (string | undefined)[] = [];\n const pnpmLockFileDirs: (string | undefined)[] = [];\n\n for (const upgrade of config.upgrades) {\n // v8 ignore else -- TODO: add test #40625\n if (\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isRemediation === true ||\n upgrade.isLockfileUpdate === true\n ) {\n yarnLockDirs.push(upgrade.managerData?.yarnLock);\n npmLockDirs.push(upgrade.managerData?.npmLock);\n pnpmLockFileDirs.push(upgrade.managerData?.pnpmLockFile);\n }\n }\n\n if (\n config.upgrades.every(\n (upgrade: Upgrade) =>\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isLockfileUpdate,\n )\n ) {\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n }\n\n function getPackageFile(\n fileName: string,\n ): Partial<PackageFile<NpmManagerData>> {\n logger.trace(`Looking for packageFile: ${fileName}`);\n\n for (const packageFile of packageFiles.npm!) {\n if (packageFile.packageFile === fileName) {\n logger.trace({ packageFile }, 'Found packageFile');\n return packageFile;\n }\n logger.trace('No match');\n }\n return {};\n }\n\n // TODO #22198\n for (const p of config.updatedPackageFiles!) {\n logger.trace(`Checking ${String(p.path)} for lock files`);\n const packageFile = getPackageFile(p.path);\n /* v8 ignore next -- needs test */\n if (!packageFile.managerData) {\n continue;\n }\n // push full lock file names and convert them later\n yarnLockDirs.push(packageFile.managerData.yarnLock);\n npmLockDirs.push(packageFile.managerData.npmLock);\n pnpmLockFileDirs.push(packageFile.managerData.pnpmLockFile);\n }\n\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n}\n\nexport async function writeExistingFiles(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n originalNpmrcFiles = new Map<string, string>(),\n): Promise<void> {\n if (!packageFiles.npm) {\n return;\n }\n const npmFiles = packageFiles.npm;\n logger.debug(\n { packageFiles: npmFiles.map((n) => n.packageFile) },\n 'Writing package.json files',\n );\n for (const packageFile of npmFiles) {\n /* v8 ignore if -- TODO: add test #40625 */\n if (!packageFile.managerData) {\n continue;\n }\n // TODO #22198\n const basedir = upath.dirname(packageFile.packageFile!);\n const npmrc = packageFile.npmrc;\n const npmrcFilename = upath.join(basedir, '.npmrc');\n // Write out the file unless the npmrc came from the workspace\n // npmrcFilename will be set whenever the file was read from disk during extract\n if (\n isString(npmrc) &&\n (npmrcFilename === packageFile.managerData.npmrcFileName ||\n !packageFile.managerData.npmrcFileName)\n ) {\n try {\n if (!originalNpmrcFiles.has(npmrcFilename)) {\n const originalNpmrc = await readLocalFile(npmrcFilename, 'utf8');\n if (isString(originalNpmrc)) {\n originalNpmrcFiles.set(npmrcFilename, originalNpmrc);\n }\n }\n await writeLocalFile(npmrcFilename, npmrc.replace(regEx(/\\n?$/), '\\n'));\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ npmrcFilename, err }, 'Error writing .npmrc');\n }\n }\n const npmLock = packageFile.managerData.npmLock;\n if (npmLock) {\n const npmLockPath = npmLock;\n logger.debug(`Writing ${npmLock}`);\n let existingNpmLock: string;\n try {\n existingNpmLock = (await getFile(npmLock)) ?? '';\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error reading npm lock file');\n existingNpmLock = '';\n }\n const { detectedIndent, lockFileParsed: npmLockParsed } =\n parseLockFile(existingNpmLock);\n if (npmLockParsed) {\n const packageNames =\n 'packages' in npmLockParsed\n ? Object.keys(npmLockParsed.packages)\n : [];\n const widens: string[] = [];\n let lockFileChanged = false;\n for (const upgrade of config.upgrades) {\n if (upgrade.lockFiles && !upgrade.lockFiles.includes(npmLock)) {\n continue;\n }\n if (!upgrade.managerData) {\n continue;\n }\n if (\n upgrade.rangeStrategy === 'widen' &&\n upgrade.managerData.npmLock === npmLock\n ) {\n // TODO #22198\n widens.push(upgrade.depName!);\n }\n const { depName } = upgrade;\n const oldVersion = upgrade.lockedVersion ?? upgrade.currentVersion;\n if ('packages' in npmLockParsed) {\n for (const packageName of packageNames) {\n if (\n packageName === `node_modules/${depName}` ||\n packageName.startsWith(`node_modules/${depName}/`)\n ) {\n logger.trace({ packageName }, 'Massaging out package name');\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n continue;\n }\n if (\n !depName ||\n !oldVersion ||\n // Workspace entries (e.g. `packages/app`) and the root entry\n // are link targets: `node_modules/<name>` points at them with\n // `link: true`, so deleting one breaks npm with EMISSINGTARGET.\n !packageName.startsWith('node_modules/')\n ) {\n continue;\n }\n // Lockstep monorepo siblings (e.g. vue -> @vue/server-renderer)\n // pin the updated dep to its exact old version. Left in the lock\n // they cannot resolve against the new version and npm fails with\n // ERESOLVE, so massage them out too and let npm re-resolve them.\n const entry = npmLockParsed.packages[packageName];\n const pinned =\n entry?.peerDependencies?.[depName] === oldVersion ||\n entry?.dependencies?.[depName] === oldVersion ||\n entry?.optionalDependencies?.[depName] === oldVersion;\n if (pinned) {\n logger.trace(\n { packageName, depName, oldVersion },\n 'Massaging out lockstep sibling',\n );\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n }\n }\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (widens.length) {\n logger.debug(\n `Removing ${String(widens)} from ${npmLock} to force an update`,\n );\n lockFileChanged = true;\n try {\n if ('dependencies' in npmLockParsed && npmLockParsed.dependencies) {\n widens.forEach((depName) => {\n // TODO #22198\n delete npmLockParsed.dependencies![depName];\n });\n }\n } catch /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn(\n { npmLock },\n 'Error massaging package-lock.json for widen',\n );\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (lockFileChanged) {\n logger.debug('Massaging npm lock file before writing to disk');\n existingNpmLock = composeLockFile(npmLockParsed, detectedIndent);\n }\n await writeLocalFile(npmLockPath, existingNpmLock);\n }\n }\n }\n}\n\nasync function restoreNpmrcFiles(\n originalNpmrcFiles: Map<string, string>,\n): Promise<void> {\n for (const [npmrcFilename, originalNpmrc] of originalNpmrcFiles) {\n try {\n await writeLocalFile(npmrcFilename, originalNpmrc);\n } catch (err) {\n logger.warn({ npmrcFilename, err }, 'Error restoring .npmrc');\n }\n }\n}\n\nexport async function writeUpdatedPackageFiles(\n config: PostUpdateConfig,\n): Promise<void> {\n logger.trace({ config }, 'writeUpdatedPackageFiles');\n logger.debug('Writing any updated package files');\n if (!config.updatedPackageFiles) {\n logger.debug('No files found');\n return;\n }\n // prefer artifact content when it updates the same file (e.g. pnpm-workspace.yaml)\n const artifactContents = new Map<string, string>();\n if (config.updatedArtifacts) {\n for (const artifact of config.updatedArtifacts) {\n if (artifact.type === 'addition' && artifact.contents) {\n artifactContents.set(artifact.path, artifact.contents.toString());\n }\n }\n }\n const supportedLockFiles = ['package-lock.json', 'yarn.lock'];\n for (const packageFile of config.updatedPackageFiles) {\n if (packageFile.type !== 'addition') {\n continue;\n }\n if (\n supportedLockFiles.some((fileName) => packageFile.path.endsWith(fileName))\n ) {\n logger.debug(`Writing lock file: ${packageFile.path}`);\n // TODO #22198\n\n await writeLocalFile(packageFile.path, packageFile.contents!);\n continue;\n }\n if (!(\n packageFile.path.endsWith('package.json') ||\n packageFile.path.endsWith('pnpm-workspace.yaml') ||\n packageFile.path.endsWith('.yarnrc.yml')\n )) {\n continue;\n }\n const contents =\n artifactContents.get(packageFile.path) ?? packageFile.contents!;\n logger.debug(`Writing ${packageFile.path}`);\n await writeLocalFile(packageFile.path, contents);\n }\n}\n\n/* v8 ignore next -- needs test */\nasync function updateYarnOffline(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n): Promise<void> {\n try {\n const resolvedPaths: string[] = [];\n const yarnrcYml = await getFile(upath.join(lockFileDir, '.yarnrc.yml'));\n const yarnrc = await getFile(upath.join(lockFileDir, '.yarnrc'));\n\n // As .yarnrc.yml overrides .yarnrc in Yarn 1 (https://git.io/JUcco)\n // both files may exist, so check for .yarnrc.yml first\n if (yarnrcYml) {\n // Yarn 2 (offline cache and zero-installs)\n const paths = getZeroInstallPaths(yarnrcYml);\n resolvedPaths.push(...paths.map((p) => upath.join(lockFileDir, p)));\n } else if (yarnrc) {\n // Yarn 1 (offline mirror)\n const mirrorLine = yarnrc\n .split(newlineRegex)\n .find((line) => line.startsWith('yarn-offline-mirror '));\n if (mirrorLine) {\n const mirrorPath = ensureTrailingSlash(\n mirrorLine.split(' ')[1].replace(regEx(/\"/g), ''),\n );\n resolvedPaths.push(upath.join(lockFileDir, mirrorPath));\n }\n }\n logger.debug({ resolvedPaths }, 'updateYarnOffline resolvedPaths');\n\n if (resolvedPaths.length) {\n const status = await getRepoStatus();\n for (const f of status.modified.concat(status.not_added)) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n });\n }\n }\n for (const f of status.deleted || []) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({ type: 'deletion', path: f });\n }\n }\n }\n } catch (err) {\n logger.error({ err }, 'Error updating yarn offline packages');\n }\n}\n\n// TODO: move to ./yarn.ts\n// exported for testing\nexport async function updateYarnBinary(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n existingYarnrcYmlContent: string | undefined | null,\n): Promise<string | undefined | null> {\n let yarnrcYml = existingYarnrcYmlContent;\n try {\n const yarnrcYmlFilename = upath.join(lockFileDir, '.yarnrc.yml');\n yarnrcYml ??= (await getFile(yarnrcYmlFilename)) ?? undefined;\n const newYarnrcYml = await readLocalFile(yarnrcYmlFilename, 'utf8');\n if (!isString(yarnrcYml) || !isString(newYarnrcYml)) {\n return existingYarnrcYmlContent;\n }\n\n // TODO: use schema (#9610)\n const oldYarnPath = parseSingleYaml<YarnRcYmlFile>(yarnrcYml)?.yarnPath;\n const newYarnPath = parseSingleYaml<YarnRcYmlFile>(newYarnrcYml)?.yarnPath;\n if (\n !isNonEmptyStringAndNotWhitespace(oldYarnPath) ||\n !isNonEmptyStringAndNotWhitespace(newYarnPath)\n ) {\n return existingYarnrcYmlContent;\n }\n\n const oldYarnFullPath = upath.join(lockFileDir, oldYarnPath);\n const newYarnFullPath = upath.join(lockFileDir, newYarnPath);\n logger.debug({ oldYarnPath, newYarnPath }, 'Found updated Yarn binary');\n\n yarnrcYml = yarnrcYml.replace(oldYarnPath, newYarnPath);\n updatedArtifacts.push(\n {\n type: 'addition',\n path: yarnrcYmlFilename,\n contents: yarnrcYml,\n },\n {\n type: 'deletion',\n path: oldYarnFullPath,\n },\n {\n type: 'addition',\n path: newYarnFullPath,\n contents: await readLocalFile(newYarnFullPath, 'utf8'),\n isExecutable: true,\n },\n );\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.error({ err }, 'Error updating Yarn binary');\n }\n return existingYarnrcYmlContent && yarnrcYml;\n}\n\nasync function getAdditionalFilesInner(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n originalNpmrcFiles: Map<string, string>,\n): Promise<WriteExistingFilesResult> {\n logger.trace({ config }, 'getAdditionalFiles');\n const artifactErrors: ArtifactError[] = [];\n const artifactNotices: ArtifactNotice[] = [];\n const updatedArtifacts: FileChange[] = [];\n if (!packageFiles.npm?.length) {\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n if (config.skipArtifactsUpdate) {\n logger.debug('Skipping lock file generation');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n logger.debug('Getting updated lock files');\n if (\n config.isLockFileMaintenance &&\n config.reuseExistingBranch &&\n (await scm.branchExists(config.branchName))\n ) {\n logger.debug('Skipping lockFileMaintenance update');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n const dirs = determineLockFileDirs(config, packageFiles);\n logger.trace({ dirs }, 'lock file dirs');\n await writeExistingFiles(config, packageFiles, originalNpmrcFiles);\n await writeUpdatedPackageFiles(config);\n\n const { additionalNpmrcContent, additionalYarnRcYml } = processHostRules();\n\n // This isn't passed directly to the child process, so no need to filter.\n // But pass custom env and user vars.\n const env = {\n ...getEnv(),\n NPM_CONFIG_CACHE: await ensureCacheDir(NPM_CACHE_DIR),\n YARN_CACHE_FOLDER: await ensureCacheDir(YARN_CACHE_DIR),\n YARN_GLOBAL_FOLDER: await ensureCacheDir(YARN_GLOBAL_DIR),\n npm_config_store: await ensureCacheDir(PNPM_CACHE_BASE_DIR),\n NODE_ENV: 'dev',\n };\n\n let token: string | undefined;\n try {\n ({ token } = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }));\n // v8 ignore next -- TODO: add test #40625\n token = token ? `${token}@` : token;\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error getting token for packageFile');\n }\n const tokenRe = regEx(`${token ?? ''}`, 'g', false);\n for (const npmLock of dirs.npmLockDirs) {\n const lockFileDir = upath.dirname(npmLock);\n await withNpmrcHostRules(\n lockFileDir,\n additionalNpmrcContent,\n async (npmrcContent) => {\n const fileName = upath.basename(npmLock);\n logger.debug(`Generating ${fileName} for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.npmLock === npmLock,\n );\n const res = await npm.generateLockFile(\n lockFileDir,\n env,\n fileName,\n config,\n upgrades,\n npmrcContent,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes('No matching version found for')) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `No matching version found for ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'npm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n const err = new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(err, NpmDatasource.id);\n }\n }\n }\n\n artifactErrors.push({\n fileName: npmLock,\n stderr: res.stderr,\n });\n } else if (res.lockFile) {\n if (res.beforeFallback) {\n const message =\n 'npm `--before` could not be enforced because existing locked packages were published after the `minimumReleaseAge` cutoff. This will resolve after the next lock file maintenance run.';\n logger.warn({ npmLock }, message);\n artifactNotices.push({ file: npmLock, message });\n }\n const existingContent = await getFile(\n npmLock,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(`${npmLock} hasn't changed`);\n } else {\n logger.debug(`${npmLock} needs updating`);\n updatedArtifacts.push({\n type: 'addition',\n path: npmLock,\n // TODO: can this be undefined? (#22198)\n\n contents: res.lockFile.replace(tokenRe, ''),\n });\n }\n }\n },\n );\n }\n\n for (const yarnLock of dirs.yarnLockDirs) {\n const lockFileDir = upath.dirname(yarnLock);\n let yarnRcYmlFilename: string | undefined;\n let existingYarnrcYmlContent: string | undefined | null;\n await withNpmrcHostRules(lockFileDir, additionalNpmrcContent, async () => {\n if (additionalYarnRcYml) {\n yarnRcYmlFilename = getSiblingFileName(yarnLock, '.yarnrc.yml');\n existingYarnrcYmlContent = await readLocalFile(\n yarnRcYmlFilename,\n 'utf8',\n );\n // v8 ignore else -- TODO: add test #40625\n if (existingYarnrcYmlContent) {\n try {\n // TODO: use schema (#9610)\n const existingYarnrRcYml = parseSingleYaml<Record<string, unknown>>(\n existingYarnrcYmlContent,\n );\n\n const updatedYarnYrcYml = deepmerge(\n existingYarnrRcYml,\n yarn.fuzzyMatchAdditionalYarnrcYml(\n additionalYarnRcYml,\n existingYarnrRcYml,\n ),\n );\n\n await writeLocalFile(yarnRcYmlFilename, dump(updatedYarnYrcYml));\n logger.debug('Added authentication to .yarnrc.yml');\n } catch (err) {\n logger.warn({ err }, 'Error appending .yarnrc.yml content');\n }\n }\n }\n logger.debug(`Generating yarn.lock for ${lockFileDir}`);\n const lockFileName = upath.join(lockFileDir, 'yarn.lock');\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.yarnLock === yarnLock,\n );\n const res = await yarn.generateLockFile(\n lockFileDir,\n env,\n config,\n upgrades,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes(`Couldn't find any versions for`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `Couldn't find any versions for \\\\\"${upgrade.depName}\\\\\"`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'yarn' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: yarnLock,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n lockFileName,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"yarn.lock hasn't changed\");\n } else {\n logger.debug('yarn.lock needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: lockFileName,\n // TODO #22198\n contents: res.lockFile!,\n });\n await updateYarnOffline(lockFileDir, updatedArtifacts);\n }\n\n /* v8 ignore next -- needs test */\n if (upgrades.some(yarn.isYarnUpdate)) {\n existingYarnrcYmlContent = await updateYarnBinary(\n lockFileDir,\n updatedArtifacts,\n existingYarnrcYmlContent,\n );\n }\n }\n });\n /* v8 ignore next -- needs test */\n if (existingYarnrcYmlContent) {\n // TODO #22198\n await writeLocalFile(yarnRcYmlFilename!, existingYarnrcYmlContent);\n }\n }\n\n for (const pnpmLockFile of dirs.pnpmLockFileDirs) {\n const lockFileDir = upath.dirname(pnpmLockFile);\n await withNpmrcHostRules(lockFileDir, additionalNpmrcContent, async () => {\n logger.debug(`Generating pnpm-lock.yaml for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.pnpmLockFile === pnpmLockFile,\n );\n const res = await pnpm.generateLockFile(\n lockFileDir,\n env,\n config,\n upgrades,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stdout?.includes(`No compatible version found:`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stdout.includes(\n `No compatible version found: ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'pnpm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: pnpmLockFile,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n pnpmLockFile,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"pnpm-lock.yaml hasn't changed\");\n } else {\n logger.debug('pnpm-lock.yaml needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: pnpmLockFile,\n // TODO: can be undefined? (#22198)\n contents: res.lockFile!,\n });\n }\n }\n });\n }\n\n return { artifactErrors, artifactNotices, updatedArtifacts };\n}\n\nexport async function getAdditionalFiles(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n): Promise<WriteExistingFilesResult> {\n const originalNpmrcFiles = new Map<string, string>();\n try {\n return await getAdditionalFilesInner(\n config,\n packageFiles,\n originalNpmrcFiles,\n );\n } finally {\n await restoreNpmrcFiles(originalNpmrcFiles);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAAS,QAAQ,KAA8C;CAC7D,OAAO,MAAM,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,CAAC,CAAC;AACjD;AAEA,SAAgB,sBACd,QACA,cAC6B;CAC7B,MAAM,cAAsC,CAAC;CAC7C,MAAM,eAAuC,CAAC;CAC9C,MAAM,mBAA2C,CAAC;CAElD,KAAK,MAAM,WAAW,OAAO;;CAE3B,IACE,QAAQ,eAAe,yBACvB,QAAQ,kBAAkB,QAC1B,QAAQ,qBAAqB,MAC7B;EACA,aAAa,KAAK,QAAQ,aAAa,QAAQ;EAC/C,YAAY,KAAK,QAAQ,aAAa,OAAO;EAC7C,iBAAiB,KAAK,QAAQ,aAAa,YAAY;CACzD;CAGF,IACE,OAAO,SAAS,OACb,YACC,QAAQ,eAAe,yBACvB,QAAQ,gBACZ,GAEA,OAAO;EACL,cAAc,QAAQ,YAAY;EAClC,aAAa,QAAQ,WAAW;EAChC,kBAAkB,QAAQ,gBAAgB;CAC5C;CAGF,SAAS,eACP,UACsC;EACtC,OAAO,MAAM,4BAA4B,UAAU;EAEnD,KAAK,MAAM,eAAe,aAAa,KAAM;GAC3C,IAAI,YAAY,gBAAgB,UAAU;IACxC,OAAO,MAAM,EAAE,YAAY,GAAG,mBAAmB;IACjD,OAAO;GACT;GACA,OAAO,MAAM,UAAU;EACzB;EACA,OAAO,CAAC;CACV;CA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AAa,iBAAiB,YACrD;GACA,MAAM,MAAM,MAAMC,mBAChB,aACA,KACA,QACA,QACF;GACA,IAAI,IAAI,OAAO;;IAEb,IAAI,IAAI,QAAQ,SAAS,8BAA8B,GAChD;UAAA,MAAM,WAAW,OAAO,UAC3B,IACE,IAAI,OAAO,SACT,gCAAgC,QAAQ,SAC1C,GACA;MACA,OAAO,MACL;OAAE,YAAY,QAAQ;OAAS,MAAM;MAAO,GAC5C,8EACF;MACA,MAAM,IAAI,kBACR,MACE,8EACF,GACA,cAAc,EAChB;KACF;;IAIJ,eAAe,KAAK;KAClB,UAAU;KACV,QAAQ,kCAAkC,KAAK,EAAE;IACnD,CAAC;GACH,OAAO;IACL,MAAM,kBAAkB,MAAM,QAC5B,cACA,OAAO,sBAAsB,OAAO,aAAa,OAAO,UAC1D;IACA,IAAI,IAAI,aAAa,iBACnB,OAAO,MAAM,+BAA+B;SACvC;KACL,OAAO,MAAM,+BAA+B;KAC5C,iBAAiB,KAAK;MACpB,MAAM;MACN,MAAM;MAEN,UAAU,IAAI;KAChB,CAAC;IACH;GACF;EACF,CAAC;CACH;CAEA,OAAO;EAAE;EAAgB;EAAiB;CAAiB;AAC7D;AAEA,eAAsB,mBACpB,QACA,cACmC;CACnC,MAAM,qCAAqB,IAAI,IAAoB;CACnD,IAAI;EACF,OAAO,MAAM,wBACX,QACA,cACA,kBACF;CACF,UAAU;EACR,MAAM,kBAAkB,kBAAkB;CAC5C;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["hostRules.find","npm.generateLockFile","deepmerge","yarn.fuzzyMatchAdditionalYarnrcYml","yarn.generateLockFile","yarn.isYarnUpdate","pnpm.generateLockFile"],"sources":["../../../../../lib/modules/manager/npm/post-update/index.ts"],"sourcesContent":["// TODO: types (#22198)\nimport { isNonEmptyStringAndNotWhitespace, isString } from '@sindresorhus/is';\nimport deepmerge from 'deepmerge';\nimport upath from 'upath';\nimport { logger } from '../../../../logger/index.ts';\nimport { ExternalHostError } from '../../../../types/errors/external-host-error.ts';\nimport { getEnv } from '../../../../util/env.ts';\nimport {\n ensureCacheDir,\n getSiblingFileName,\n readLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { getFile, getRepoStatus } from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport * as hostRules from '../../../../util/host-rules.ts';\nimport { newlineRegex, regEx } from '../../../../util/regex.ts';\nimport { ensureTrailingSlash } from '../../../../util/url.ts';\nimport { dump, parseSingleYaml } from '../../../../util/yaml.ts';\nimport { NpmDatasource } from '../../../datasource/npm/index.ts';\nimport { scm } from '../../../platform/scm.ts';\nimport type {\n ArtifactError,\n ArtifactNotice,\n NpmrcPackageFile,\n PostUpdateConfig,\n Upgrade,\n} from '../../types.ts';\nimport { artifactErrorMessageFromExecError } from '../../util.ts';\nimport {\n NPM_CACHE_DIR,\n PNPM_CACHE_BASE_DIR,\n YARN_CACHE_DIR,\n YARN_GLOBAL_DIR,\n} from '../constants.ts';\nimport { getZeroInstallPaths } from '../extract/yarn.ts';\nimport type { NpmManagerData } from '../types.ts';\nimport {\n composeLockFile,\n parseLockFile,\n withNpmrcHostRules,\n} from '../utils.ts';\nimport * as npm from './npm.ts';\nimport * as pnpm from './pnpm.ts';\nimport { processHostRules } from './rules.ts';\nimport type {\n AdditionalPackageFiles,\n DetermineLockFileDirsResult,\n WriteExistingFilesResult,\n YarnRcYmlFile,\n} from './types.ts';\nimport * as yarn from './yarn.ts';\n\n// Strips empty values, deduplicates, and returns the directories from filenames\nfunction getDirs(arr: (string | null | undefined)[]): string[] {\n return Array.from(new Set(arr.filter(isString)));\n}\n\nexport function determineLockFileDirs(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n): DetermineLockFileDirsResult {\n const npmLockDirs: (string | undefined)[] = [];\n const yarnLockDirs: (string | undefined)[] = [];\n const pnpmLockFileDirs: (string | undefined)[] = [];\n\n for (const upgrade of config.upgrades) {\n // v8 ignore else -- TODO: add test #40625\n if (\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isRemediation === true ||\n upgrade.isLockfileUpdate === true\n ) {\n yarnLockDirs.push(upgrade.managerData?.yarnLock);\n npmLockDirs.push(upgrade.managerData?.npmLock);\n pnpmLockFileDirs.push(upgrade.managerData?.pnpmLockFile);\n }\n }\n\n if (\n config.upgrades.every(\n (upgrade: Upgrade) =>\n upgrade.updateType === 'lockFileMaintenance' ||\n upgrade.isLockfileUpdate,\n )\n ) {\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n }\n\n function getPackageFile(\n fileName: string,\n ): Partial<NpmrcPackageFile<NpmManagerData>> {\n logger.trace(`Looking for packageFile: ${fileName}`);\n\n for (const packageFile of packageFiles.npm!) {\n if (packageFile.packageFile === fileName) {\n logger.trace({ packageFile }, 'Found packageFile');\n return packageFile;\n }\n logger.trace('No match');\n }\n return {};\n }\n\n // TODO #22198\n for (const p of config.updatedPackageFiles!) {\n logger.trace(`Checking ${String(p.path)} for lock files`);\n const packageFile = getPackageFile(p.path);\n /* v8 ignore next -- needs test */\n if (!packageFile.managerData) {\n continue;\n }\n // push full lock file names and convert them later\n yarnLockDirs.push(packageFile.managerData.yarnLock);\n npmLockDirs.push(packageFile.managerData.npmLock);\n pnpmLockFileDirs.push(packageFile.managerData.pnpmLockFile);\n }\n\n return {\n yarnLockDirs: getDirs(yarnLockDirs),\n npmLockDirs: getDirs(npmLockDirs),\n pnpmLockFileDirs: getDirs(pnpmLockFileDirs),\n };\n}\n\nexport async function writeExistingFiles(\n config: PostUpdateConfig,\n packageFiles: AdditionalPackageFiles,\n originalNpmrcFiles = new Map<string, string>(),\n): Promise<void> {\n if (!packageFiles.npm) {\n return;\n }\n const npmFiles = packageFiles.npm;\n logger.debug(\n { packageFiles: npmFiles.map((n) => n.packageFile) },\n 'Writing package.json files',\n );\n for (const packageFile of npmFiles) {\n /* v8 ignore if -- TODO: add test #40625 */\n if (!packageFile.managerData) {\n continue;\n }\n // TODO #22198\n const basedir = upath.dirname(packageFile.packageFile!);\n const npmrc = packageFile.npmrc;\n const npmrcFilename = upath.join(basedir, '.npmrc');\n // Write out the file unless the npmrc came from the workspace\n // npmrcFilename will be set whenever the file was read from disk during extract\n if (\n isString(npmrc) &&\n (npmrcFilename === packageFile.managerData.npmrcFileName ||\n !packageFile.managerData.npmrcFileName)\n ) {\n try {\n if (!originalNpmrcFiles.has(npmrcFilename)) {\n const originalNpmrc = await readLocalFile(npmrcFilename, 'utf8');\n if (isString(originalNpmrc)) {\n originalNpmrcFiles.set(npmrcFilename, originalNpmrc);\n }\n }\n await writeLocalFile(npmrcFilename, npmrc.replace(regEx(/\\n?$/), '\\n'));\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ npmrcFilename, err }, 'Error writing .npmrc');\n }\n }\n const npmLock = packageFile.managerData.npmLock;\n if (npmLock) {\n const npmLockPath = npmLock;\n logger.debug(`Writing ${npmLock}`);\n let existingNpmLock: string;\n try {\n existingNpmLock = (await getFile(npmLock)) ?? '';\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error reading npm lock file');\n existingNpmLock = '';\n }\n const { detectedIndent, lockFileParsed: npmLockParsed } =\n parseLockFile(existingNpmLock);\n if (npmLockParsed) {\n const packageNames =\n 'packages' in npmLockParsed\n ? Object.keys(npmLockParsed.packages)\n : [];\n const widens: string[] = [];\n let lockFileChanged = false;\n for (const upgrade of config.upgrades) {\n if (upgrade.lockFiles && !upgrade.lockFiles.includes(npmLock)) {\n continue;\n }\n if (!upgrade.managerData) {\n continue;\n }\n if (\n upgrade.rangeStrategy === 'widen' &&\n upgrade.managerData.npmLock === npmLock\n ) {\n // TODO #22198\n widens.push(upgrade.depName!);\n }\n const { depName } = upgrade;\n const oldVersion = upgrade.lockedVersion ?? upgrade.currentVersion;\n if ('packages' in npmLockParsed) {\n for (const packageName of packageNames) {\n if (\n packageName === `node_modules/${depName}` ||\n packageName.startsWith(`node_modules/${depName}/`)\n ) {\n logger.trace({ packageName }, 'Massaging out package name');\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n continue;\n }\n if (\n !depName ||\n !oldVersion ||\n // Workspace entries (e.g. `packages/app`) and the root entry\n // are link targets: `node_modules/<name>` points at them with\n // `link: true`, so deleting one breaks npm with EMISSINGTARGET.\n !packageName.startsWith('node_modules/')\n ) {\n continue;\n }\n // Lockstep monorepo siblings (e.g. vue -> @vue/server-renderer)\n // pin the updated dep to its exact old version. Left in the lock\n // they cannot resolve against the new version and npm fails with\n // ERESOLVE, so massage them out too and let npm re-resolve them.\n const entry = npmLockParsed.packages[packageName];\n const pinned =\n entry?.peerDependencies?.[depName] === oldVersion ||\n entry?.dependencies?.[depName] === oldVersion ||\n entry?.optionalDependencies?.[depName] === oldVersion;\n if (pinned) {\n logger.trace(\n { packageName, depName, oldVersion },\n 'Massaging out lockstep sibling',\n );\n lockFileChanged = true;\n delete npmLockParsed.packages[packageName];\n }\n }\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (widens.length) {\n logger.debug(\n `Removing ${String(widens)} from ${npmLock} to force an update`,\n );\n lockFileChanged = true;\n try {\n if ('dependencies' in npmLockParsed && npmLockParsed.dependencies) {\n widens.forEach((depName) => {\n // TODO #22198\n delete npmLockParsed.dependencies![depName];\n });\n }\n } catch /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn(\n { npmLock },\n 'Error massaging package-lock.json for widen',\n );\n }\n }\n // v8 ignore else -- TODO: add test #40625\n if (lockFileChanged) {\n logger.debug('Massaging npm lock file before writing to disk');\n existingNpmLock = composeLockFile(npmLockParsed, detectedIndent);\n }\n await writeLocalFile(npmLockPath, existingNpmLock);\n }\n }\n }\n}\n\nasync function restoreNpmrcFiles(\n originalNpmrcFiles: Map<string, string>,\n): Promise<void> {\n for (const [npmrcFilename, originalNpmrc] of originalNpmrcFiles) {\n try {\n await writeLocalFile(npmrcFilename, originalNpmrc);\n } catch (err) {\n logger.warn({ npmrcFilename, err }, 'Error restoring .npmrc');\n }\n }\n}\n\nexport async function writeUpdatedPackageFiles(\n config: PostUpdateConfig,\n): Promise<void> {\n logger.trace({ config }, 'writeUpdatedPackageFiles');\n logger.debug('Writing any updated package files');\n if (!config.updatedPackageFiles) {\n logger.debug('No files found');\n return;\n }\n // prefer artifact content when it updates the same file (e.g. pnpm-workspace.yaml)\n const artifactContents = new Map<string, string>();\n if (config.updatedArtifacts) {\n for (const artifact of config.updatedArtifacts) {\n if (artifact.type === 'addition' && artifact.contents) {\n artifactContents.set(artifact.path, artifact.contents.toString());\n }\n }\n }\n const supportedLockFiles = ['package-lock.json', 'yarn.lock'];\n for (const packageFile of config.updatedPackageFiles) {\n if (packageFile.type !== 'addition') {\n continue;\n }\n if (\n supportedLockFiles.some((fileName) => packageFile.path.endsWith(fileName))\n ) {\n logger.debug(`Writing lock file: ${packageFile.path}`);\n // TODO #22198\n\n await writeLocalFile(packageFile.path, packageFile.contents!);\n continue;\n }\n if (!(\n packageFile.path.endsWith('package.json') ||\n packageFile.path.endsWith('pnpm-workspace.yaml') ||\n packageFile.path.endsWith('.yarnrc.yml')\n )) {\n continue;\n }\n const contents =\n artifactContents.get(packageFile.path) ?? packageFile.contents!;\n logger.debug(`Writing ${packageFile.path}`);\n await writeLocalFile(packageFile.path, contents);\n }\n}\n\n/* v8 ignore next -- needs test */\nasync function updateYarnOffline(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n): Promise<void> {\n try {\n const resolvedPaths: string[] = [];\n const yarnrcYml = await getFile(upath.join(lockFileDir, '.yarnrc.yml'));\n const yarnrc = await getFile(upath.join(lockFileDir, '.yarnrc'));\n\n // As .yarnrc.yml overrides .yarnrc in Yarn 1 (https://git.io/JUcco)\n // both files may exist, so check for .yarnrc.yml first\n if (yarnrcYml) {\n // Yarn 2 (offline cache and zero-installs)\n const paths = getZeroInstallPaths(yarnrcYml);\n resolvedPaths.push(...paths.map((p) => upath.join(lockFileDir, p)));\n } else if (yarnrc) {\n // Yarn 1 (offline mirror)\n const mirrorLine = yarnrc\n .split(newlineRegex)\n .find((line) => line.startsWith('yarn-offline-mirror '));\n if (mirrorLine) {\n const mirrorPath = ensureTrailingSlash(\n mirrorLine.split(' ')[1].replace(regEx(/\"/g), ''),\n );\n resolvedPaths.push(upath.join(lockFileDir, mirrorPath));\n }\n }\n logger.debug({ resolvedPaths }, 'updateYarnOffline resolvedPaths');\n\n if (resolvedPaths.length) {\n const status = await getRepoStatus();\n for (const f of status.modified.concat(status.not_added)) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({\n type: 'addition',\n path: f,\n contents: await readLocalFile(f),\n });\n }\n }\n for (const f of status.deleted || []) {\n if (resolvedPaths.some((p) => f.startsWith(p))) {\n updatedArtifacts.push({ type: 'deletion', path: f });\n }\n }\n }\n } catch (err) {\n logger.error({ err }, 'Error updating yarn offline packages');\n }\n}\n\n// TODO: move to ./yarn.ts\n// exported for testing\nexport async function updateYarnBinary(\n lockFileDir: string,\n updatedArtifacts: FileChange[],\n existingYarnrcYmlContent: string | undefined | null,\n): Promise<string | undefined | null> {\n let yarnrcYml = existingYarnrcYmlContent;\n try {\n const yarnrcYmlFilename = upath.join(lockFileDir, '.yarnrc.yml');\n yarnrcYml ??= (await getFile(yarnrcYmlFilename)) ?? undefined;\n const newYarnrcYml = await readLocalFile(yarnrcYmlFilename, 'utf8');\n if (!isString(yarnrcYml) || !isString(newYarnrcYml)) {\n return existingYarnrcYmlContent;\n }\n\n // TODO: use schema (#9610)\n const oldYarnPath = parseSingleYaml<YarnRcYmlFile>(yarnrcYml)?.yarnPath;\n const newYarnPath = parseSingleYaml<YarnRcYmlFile>(newYarnrcYml)?.yarnPath;\n if (\n !isNonEmptyStringAndNotWhitespace(oldYarnPath) ||\n !isNonEmptyStringAndNotWhitespace(newYarnPath)\n ) {\n return existingYarnrcYmlContent;\n }\n\n const oldYarnFullPath = upath.join(lockFileDir, oldYarnPath);\n const newYarnFullPath = upath.join(lockFileDir, newYarnPath);\n logger.debug({ oldYarnPath, newYarnPath }, 'Found updated Yarn binary');\n\n yarnrcYml = yarnrcYml.replace(oldYarnPath, newYarnPath);\n updatedArtifacts.push(\n {\n type: 'addition',\n path: yarnrcYmlFilename,\n contents: yarnrcYml,\n },\n {\n type: 'deletion',\n path: oldYarnFullPath,\n },\n {\n type: 'addition',\n path: newYarnFullPath,\n contents: await readLocalFile(newYarnFullPath, 'utf8'),\n isExecutable: true,\n },\n );\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.error({ err }, 'Error updating Yarn binary');\n }\n return existingYarnrcYmlContent && yarnrcYml;\n}\n\nasync function getAdditionalFilesInner(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n originalNpmrcFiles: Map<string, string>,\n): Promise<WriteExistingFilesResult> {\n logger.trace({ config }, 'getAdditionalFiles');\n const artifactErrors: ArtifactError[] = [];\n const artifactNotices: ArtifactNotice[] = [];\n const updatedArtifacts: FileChange[] = [];\n if (!packageFiles.npm?.length) {\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n if (config.skipArtifactsUpdate) {\n logger.debug('Skipping lock file generation');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n logger.debug('Getting updated lock files');\n if (\n config.isLockFileMaintenance &&\n config.reuseExistingBranch &&\n (await scm.branchExists(config.branchName))\n ) {\n logger.debug('Skipping lockFileMaintenance update');\n return { artifactErrors, artifactNotices, updatedArtifacts };\n }\n const dirs = determineLockFileDirs(config, packageFiles);\n logger.trace({ dirs }, 'lock file dirs');\n await writeExistingFiles(config, packageFiles, originalNpmrcFiles);\n await writeUpdatedPackageFiles(config);\n\n const { additionalNpmrcContent, additionalYarnRcYml } = processHostRules();\n\n // This isn't passed directly to the child process, so no need to filter.\n // But pass custom env and user vars.\n const env = {\n ...getEnv(),\n NPM_CONFIG_CACHE: await ensureCacheDir(NPM_CACHE_DIR),\n YARN_CACHE_FOLDER: await ensureCacheDir(YARN_CACHE_DIR),\n YARN_GLOBAL_FOLDER: await ensureCacheDir(YARN_GLOBAL_DIR),\n npm_config_store: await ensureCacheDir(PNPM_CACHE_BASE_DIR),\n NODE_ENV: 'dev',\n };\n\n let token: string | undefined;\n try {\n ({ token } = hostRules.find({\n hostType: 'github',\n url: 'https://api.github.com/',\n }));\n // v8 ignore next -- TODO: add test #40625\n token = token ? `${token}@` : token;\n } catch (err) /* v8 ignore next -- TODO: add test #40625 */ {\n logger.warn({ err }, 'Error getting token for packageFile');\n }\n const tokenRe = regEx(`${token ?? ''}`, 'g', false);\n for (const npmLock of dirs.npmLockDirs) {\n const lockFileDir = upath.dirname(npmLock);\n await withNpmrcHostRules(\n lockFileDir,\n additionalNpmrcContent,\n async (npmrcContent) => {\n const fileName = upath.basename(npmLock);\n logger.debug(`Generating ${fileName} for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.npmLock === npmLock,\n );\n const res = await npm.generateLockFile(\n lockFileDir,\n env,\n fileName,\n config,\n upgrades,\n npmrcContent,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes('No matching version found for')) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `No matching version found for ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'npm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n const err = new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(err, NpmDatasource.id);\n }\n }\n }\n\n artifactErrors.push({\n fileName: npmLock,\n stderr: res.stderr,\n });\n } else if (res.lockFile) {\n if (res.beforeFallback) {\n const message =\n 'npm `--before` could not be enforced because existing locked packages were published after the `minimumReleaseAge` cutoff. This will resolve after the next lock file maintenance run.';\n logger.warn({ npmLock }, message);\n artifactNotices.push({ file: npmLock, message });\n }\n const existingContent = await getFile(\n npmLock,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(`${npmLock} hasn't changed`);\n } else {\n logger.debug(`${npmLock} needs updating`);\n updatedArtifacts.push({\n type: 'addition',\n path: npmLock,\n // TODO: can this be undefined? (#22198)\n\n contents: res.lockFile.replace(tokenRe, ''),\n });\n }\n }\n },\n );\n }\n\n for (const yarnLock of dirs.yarnLockDirs) {\n const lockFileDir = upath.dirname(yarnLock);\n let yarnRcYmlFilename: string | undefined;\n let existingYarnrcYmlContent: string | undefined | null;\n await withNpmrcHostRules(lockFileDir, additionalNpmrcContent, async () => {\n if (additionalYarnRcYml) {\n yarnRcYmlFilename = getSiblingFileName(yarnLock, '.yarnrc.yml');\n existingYarnrcYmlContent = await readLocalFile(\n yarnRcYmlFilename,\n 'utf8',\n );\n // v8 ignore else -- TODO: add test #40625\n if (existingYarnrcYmlContent) {\n try {\n // TODO: use schema (#9610)\n const existingYarnrRcYml = parseSingleYaml<Record<string, unknown>>(\n existingYarnrcYmlContent,\n );\n\n const updatedYarnYrcYml = deepmerge(\n existingYarnrRcYml,\n yarn.fuzzyMatchAdditionalYarnrcYml(\n additionalYarnRcYml,\n existingYarnrRcYml,\n ),\n );\n\n await writeLocalFile(yarnRcYmlFilename, dump(updatedYarnYrcYml));\n logger.debug('Added authentication to .yarnrc.yml');\n } catch (err) {\n logger.warn({ err }, 'Error appending .yarnrc.yml content');\n }\n }\n }\n logger.debug(`Generating yarn.lock for ${lockFileDir}`);\n const lockFileName = upath.join(lockFileDir, 'yarn.lock');\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.yarnLock === yarnLock,\n );\n const res = await yarn.generateLockFile(\n lockFileDir,\n env,\n config,\n upgrades,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stderr?.includes(`Couldn't find any versions for`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stderr.includes(\n `Couldn't find any versions for \\\\\"${upgrade.depName}\\\\\"`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'yarn' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n new Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: yarnLock,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n lockFileName,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"yarn.lock hasn't changed\");\n } else {\n logger.debug('yarn.lock needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: lockFileName,\n // TODO #22198\n contents: res.lockFile!,\n });\n await updateYarnOffline(lockFileDir, updatedArtifacts);\n }\n\n /* v8 ignore next -- needs test */\n if (upgrades.some(yarn.isYarnUpdate)) {\n existingYarnrcYmlContent = await updateYarnBinary(\n lockFileDir,\n updatedArtifacts,\n existingYarnrcYmlContent,\n );\n }\n }\n });\n /* v8 ignore next -- needs test */\n if (existingYarnrcYmlContent) {\n // TODO #22198\n await writeLocalFile(yarnRcYmlFilename!, existingYarnrcYmlContent);\n }\n }\n\n for (const pnpmLockFile of dirs.pnpmLockFileDirs) {\n const lockFileDir = upath.dirname(pnpmLockFile);\n await withNpmrcHostRules(lockFileDir, additionalNpmrcContent, async () => {\n logger.debug(`Generating pnpm-lock.yaml for ${lockFileDir}`);\n const upgrades = config.upgrades.filter(\n (upgrade) => upgrade.managerData?.pnpmLockFile === pnpmLockFile,\n );\n const res = await pnpm.generateLockFile(\n lockFileDir,\n env,\n config,\n upgrades,\n );\n if (res.error) {\n /* v8 ignore next -- needs test */\n if (res.stdout?.includes(`No compatible version found:`)) {\n for (const upgrade of config.upgrades) {\n if (\n res.stdout.includes(\n `No compatible version found: ${upgrade.depName}`,\n )\n ) {\n logger.debug(\n { dependency: upgrade.depName, type: 'pnpm' },\n 'lock file failed for the dependency being updated - skipping branch creation',\n );\n throw new ExternalHostError(\n Error(\n 'lock file failed for the dependency being updated - skipping branch creation',\n ),\n NpmDatasource.id,\n );\n }\n }\n }\n\n artifactErrors.push({\n fileName: pnpmLockFile,\n stderr: artifactErrorMessageFromExecError(res, ''),\n });\n } else {\n const existingContent = await getFile(\n pnpmLockFile,\n config.reuseExistingBranch ? config.branchName : config.baseBranch,\n );\n if (res.lockFile === existingContent) {\n logger.debug(\"pnpm-lock.yaml hasn't changed\");\n } else {\n logger.debug('pnpm-lock.yaml needs updating');\n updatedArtifacts.push({\n type: 'addition',\n path: pnpmLockFile,\n // TODO: can be undefined? (#22198)\n contents: res.lockFile!,\n });\n }\n }\n });\n }\n\n return { artifactErrors, artifactNotices, updatedArtifacts };\n}\n\nexport async function getAdditionalFiles(\n config: PostUpdateConfig<NpmManagerData>,\n packageFiles: AdditionalPackageFiles,\n): Promise<WriteExistingFilesResult> {\n const originalNpmrcFiles = new Map<string, string>();\n try {\n return await getAdditionalFilesInner(\n config,\n packageFiles,\n originalNpmrcFiles,\n );\n } finally {\n await restoreNpmrcFiles(originalNpmrcFiles);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAsDA,SAAS,QAAQ,KAA8C;CAC7D,OAAO,MAAM,KAAK,IAAI,IAAI,IAAI,OAAO,QAAQ,CAAC,CAAC;AACjD;AAEA,SAAgB,sBACd,QACA,cAC6B;CAC7B,MAAM,cAAsC,CAAC;CAC7C,MAAM,eAAuC,CAAC;CAC9C,MAAM,mBAA2C,CAAC;CAElD,KAAK,MAAM,WAAW,OAAO;;CAE3B,IACE,QAAQ,eAAe,yBACvB,QAAQ,kBAAkB,QAC1B,QAAQ,qBAAqB,MAC7B;EACA,aAAa,KAAK,QAAQ,aAAa,QAAQ;EAC/C,YAAY,KAAK,QAAQ,aAAa,OAAO;EAC7C,iBAAiB,KAAK,QAAQ,aAAa,YAAY;CACzD;CAGF,IACE,OAAO,SAAS,OACb,YACC,QAAQ,eAAe,yBACvB,QAAQ,gBACZ,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AC5C;AACF"}
|
|
@@ -92,7 +92,6 @@ interface PackageFileContent<T = Record<string, any>> extends ManagerData<T> {
|
|
|
92
92
|
additionalRegistryUrls?: string[];
|
|
93
93
|
deps: PackageDependency<T>[];
|
|
94
94
|
lockFiles?: string[];
|
|
95
|
-
npmrc?: string;
|
|
96
95
|
packageFileVersion?: string;
|
|
97
96
|
skipInstalls?: boolean | null;
|
|
98
97
|
matchStrings?: string[];
|
|
@@ -102,6 +101,13 @@ interface PackageFileContent<T = Record<string, any>> extends ManagerData<T> {
|
|
|
102
101
|
interface PackageFile<T = Record<string, any>> extends PackageFileContent<T> {
|
|
103
102
|
packageFile: string;
|
|
104
103
|
}
|
|
104
|
+
/** the package file content of a manager with `supportsNpmrc`, the only kind carrying an `npmrc` */
|
|
105
|
+
interface NpmrcPackageFileContent<T = Record<string, any>> extends PackageFileContent<T> {
|
|
106
|
+
npmrc?: string;
|
|
107
|
+
}
|
|
108
|
+
interface NpmrcPackageFile<T = Record<string, any>> extends NpmrcPackageFileContent<T> {
|
|
109
|
+
packageFile: string;
|
|
110
|
+
}
|
|
105
111
|
interface LookupUpdate {
|
|
106
112
|
bucket?: string;
|
|
107
113
|
branchName?: string;
|
|
@@ -363,6 +369,8 @@ interface ManagerApiBase extends ModuleApi {
|
|
|
363
369
|
/** Markdown note about dynamically generated depTypes not covered by `knownDepTypes` */
|
|
364
370
|
supportsDynamicDepTypesNote?: string;
|
|
365
371
|
supportsLockFileMaintenance?: boolean;
|
|
372
|
+
/** Whether the package files carry an `npmrc` resolved from the repository `.npmrc` and the config, see `NpmrcPackageFile` */
|
|
373
|
+
supportsNpmrc?: boolean;
|
|
366
374
|
/**
|
|
367
375
|
* Whether Renovate delegates to external command(s)/package manager to perform lockFileMaintenance.
|
|
368
376
|
* A `string` value is a Markdown note describing the nuance of the support, e.g. when it's partial
|
|
@@ -393,6 +401,18 @@ type ManagerApi = ManagerApiBase & ({
|
|
|
393
401
|
} | {
|
|
394
402
|
supportsLockFileMaintenance?: false;
|
|
395
403
|
lockFileMaintenanceIsDelegatedToPackageManager?: boolean | string;
|
|
404
|
+
}) & ({
|
|
405
|
+
supportsNpmrc: true;
|
|
406
|
+
extractAllPackageFiles?(config: ExtractConfig, files: string[]): MaybePromise<NpmrcPackageFile[] | null>;
|
|
407
|
+
extractPackageFile?(content: string, packageFile?: string, config?: ExtractConfig): MaybePromise<NpmrcPackageFileContent | null>;
|
|
408
|
+
} | {
|
|
409
|
+
supportsNpmrc?: false;
|
|
410
|
+
extractAllPackageFiles?(config: ExtractConfig, files: string[]): MaybePromise<(PackageFile & {
|
|
411
|
+
npmrc?: never;
|
|
412
|
+
})[] | null>;
|
|
413
|
+
extractPackageFile?(content: string, packageFile?: string, config?: ExtractConfig): MaybePromise<(PackageFileContent & {
|
|
414
|
+
npmrc?: never;
|
|
415
|
+
}) | null>;
|
|
396
416
|
});
|
|
397
417
|
interface PostUpdateConfig<T = Record<string, any>> extends Record<string, any>, ManagerData<T> {
|
|
398
418
|
constraints?: Partial<Record<ConstraintName, string>> | null;
|
|
@@ -412,5 +432,5 @@ interface PostUpdateConfig<T = Record<string, any>> extends Record<string, any>,
|
|
|
412
432
|
isLockFileMaintenance?: boolean;
|
|
413
433
|
}
|
|
414
434
|
//#endregion
|
|
415
|
-
export { ArtifactError, ArtifactNotice, BumpPackageVersionResult, DepTypeMetadata, ExtractConfig, GlobalManagerConfig, LookupUpdate, ManagerApi, ManagerData, PackageDependency, PackageFile, PackageFileContent, PostUpdateConfig, RangeConfig, ToolConstraintsConfig, UpdateArtifact, UpdateArtifactsConfig, UpdateArtifactsResult, UpdateDependencyConfig, UpdateLockFileConfig, UpdateLockedConfig, UpdateLockedResult, Upgrade };
|
|
435
|
+
export { ArtifactError, ArtifactNotice, BumpPackageVersionResult, DepTypeMetadata, ExtractConfig, GlobalManagerConfig, LookupUpdate, ManagerApi, ManagerData, NpmrcPackageFile, NpmrcPackageFileContent, PackageDependency, PackageFile, PackageFileContent, PostUpdateConfig, RangeConfig, ToolConstraintsConfig, UpdateArtifact, UpdateArtifactsConfig, UpdateArtifactsResult, UpdateDependencyConfig, UpdateLockFileConfig, UpdateLockedConfig, UpdateLockedResult, Upgrade };
|
|
416
436
|
//# sourceMappingURL=types.d.ts.map
|
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 44.
|
|
3
|
+
"title": "JSON schema for Renovate 44.111.1 config files (https://renovatebot.com/)",
|
|
4
4
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
5
|
-
"x-renovate-version": "44.
|
|
5
|
+
"x-renovate-version": "44.111.1",
|
|
6
6
|
"allowComments": true,
|
|
7
7
|
"type": "object",
|
|
8
8
|
"definitions": {
|