diff --git a/lib/logger/config-serializer.ts b/lib/logger/config-serializer.ts index cb44198a0f9bab..4e484b92ab6869 100644 --- a/lib/logger/config-serializer.ts +++ b/lib/logger/config-serializer.ts @@ -1,4 +1,4 @@ -import traverse from 'traverse'; +import traverse from 'neotraverse/legacy'; import type { RenovateConfig } from '../config/types'; export default function configSerializer( @@ -15,14 +15,15 @@ export default function configSerializer( return traverse(config).map(function scrub(val: string) { if (this.key && val) { - if (templateFields.includes(this.key)) { + const key = this.key.toString(); + if (templateFields.includes(key)) { this.update('[Template]'); } - if (contentFields.includes(this.key)) { + if (contentFields.includes(key)) { this.update('[content]'); } // istanbul ignore if - if (arrayFields.includes(this.key)) { + if (arrayFields.includes(key)) { this.update('[Array]'); } } diff --git a/package.json b/package.json index ed6da4bac1f0dc..9e9973ae813a70 100644 --- a/package.json +++ b/package.json @@ -216,6 +216,7 @@ "moo": "0.5.2", "ms": "2.1.3", "nanoid": "3.3.7", + "neotraverse": "0.6.15", "node-html-parser": "6.1.13", "p-all": "3.0.0", "p-map": "4.0.0", @@ -235,7 +236,6 @@ "slugify": "1.6.6", "source-map-support": "0.5.21", "toml-eslint-parser": "0.10.0", - "traverse": "0.6.9", "tslib": "2.6.3", "upath": "2.0.1", "url-join": "4.0.1", @@ -297,7 +297,6 @@ "@types/semver-utils": "1.1.3", "@types/tar": "6.1.13", "@types/tmp": "0.2.6", - "@types/traverse": "0.6.37", "@types/unist": "2.0.10", "@types/url-join": "4.0.3", "@types/validate-npm-package-name": "4.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 06bdc05633cc72..e47f6f9dd9c560 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,6 +246,9 @@ importers: nanoid: specifier: 3.3.7 version: 3.3.7 + neotraverse: + specifier: 0.6.15 + version: 0.6.15 node-html-parser: specifier: 6.1.13 version: 6.1.13 @@ -303,9 +306,6 @@ importers: toml-eslint-parser: specifier: 0.10.0 version: 0.10.0 - traverse: - specifier: 0.6.9 - version: 0.6.9 tslib: specifier: 2.6.3 version: 2.6.3 @@ -479,9 +479,6 @@ importers: '@types/tmp': specifier: 0.2.6 version: 0.2.6 - '@types/traverse': - specifier: 0.6.37 - version: 0.6.37 '@types/unist': specifier: 2.0.10 version: 2.0.10 @@ -1182,7 +1179,6 @@ packages: '@ls-lint/ls-lint@2.2.3': resolution: {integrity: sha512-ekM12jNm/7O2I/hsRv9HvYkRdfrHpiV1epVuI2NP+eTIcEgdIdKkKCs9KgQydu/8R5YXTov9aHdOgplmCHLupw==} - cpu: [x64, arm64, s390x] os: [darwin, linux, win32] hasBin: true @@ -2134,9 +2130,6 @@ packages: '@types/tmp@0.2.6': resolution: {integrity: sha512-chhaNf2oKHlRkDGt+tiKE2Z5aJ6qalm7Z9rlLdBwmOiAAf09YQvvoLXjWK4HWPF1xU/fqvMgfNfpVoBscA/tKA==} - '@types/traverse@0.6.37': - resolution: {integrity: sha512-c90MVeDiUI1FhOZ6rLQ3kDWr50YE8+paDpM+5zbHjbmsqEp2DlMYkqnZnwbK9oI+NvDe8yRajup4jFwnVX6xsA==} - '@types/treeify@1.0.3': resolution: {integrity: sha512-hx0o7zWEUU4R2Amn+pjCBQQt23Khy/Dk56gQU5xi5jtPL1h83ACJCeFaB2M/+WO1AntvWrSoVnnCAfI1AQH4Cg==} @@ -4621,6 +4614,10 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + neotraverse@0.6.15: + resolution: {integrity: sha512-HZpdkco+JeXq0G+WWpMJ4NsX3pqb5O7eR9uGz3FfoFt+LYzU8iRWp49nJtud6hsDoywM8tIrDo3gjgmOqJA8LA==} + engines: {node: '>= 10'} + nerf-dart@1.0.0: resolution: {integrity: sha512-EZSPZB70jiVsivaBLYDCyntd5eH8NTSMOn3rB+HxwdmKThGELLdYv8qVIMWvZEFy9w8ZZpW9h9OB32l1rGtj7g==} @@ -5697,10 +5694,6 @@ packages: resolution: {integrity: sha512-aXJDbk6SnumuaZSANd21XAo15ucCDE38H4fkqiGsc3MhCK+wOlZvLP9cB/TvpHT0mOyWgC4Z8EwRlzqYSUzdsA==} engines: {node: '>= 0.4'} - traverse@0.6.9: - resolution: {integrity: sha512-7bBrcF+/LQzSgFmT0X5YclVqQxtv7TDJ1f8Wj7ibBu/U6BMLeOpUxuZjV7rMc44UtKxlnMFigdhFAIszSX1DMg==} - engines: {node: '>= 0.4'} - tree-dump@1.0.2: resolution: {integrity: sha512-dpev9ABuLWdEubk+cIaI9cHwRNNDjkBBLXTwI4UCUFdQ5xXKqNXoK4FEciw/vxf+NQ7Cb7sGUyeUtORvHIdRXQ==} engines: {node: '>=10.0'} @@ -5871,10 +5864,6 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typedarray.prototype.slice@1.0.3: - resolution: {integrity: sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==} - engines: {node: '>= 0.4'} - typescript@5.5.4: resolution: {integrity: sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==} engines: {node: '>=14.17'} @@ -8610,8 +8599,6 @@ snapshots: '@types/tmp@0.2.6': {} - '@types/traverse@0.6.37': {} - '@types/treeify@1.0.3': {} '@types/unist@2.0.10': {} @@ -11584,6 +11571,8 @@ snapshots: neo-async@2.6.2: {} + neotraverse@0.6.15: {} + nerf-dart@1.0.0: {} nise@5.1.9: @@ -12732,12 +12721,6 @@ snapshots: traverse@0.6.8: {} - traverse@0.6.9: - dependencies: - gopd: 1.0.1 - typedarray.prototype.slice: 1.0.3 - which-typed-array: 1.1.15 - tree-dump@1.0.2(tslib@2.6.3): dependencies: tslib: 2.6.3 @@ -12901,15 +12884,6 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typedarray.prototype.slice@1.0.3: - dependencies: - call-bind: 1.0.7 - define-properties: 1.2.1 - es-abstract: 1.23.3 - es-errors: 1.3.0 - typed-array-buffer: 1.0.2 - typed-array-byte-offset: 1.0.2 - typescript@5.5.4: {} uc.micro@2.1.0: {} diff --git a/test/exec-util.ts b/test/exec-util.ts index 4fd8870092aa84..0fb5ca0de4ab33 100644 --- a/test/exec-util.ts +++ b/test/exec-util.ts @@ -1,5 +1,5 @@ import is from '@sindresorhus/is'; -import traverse from 'traverse'; +import traverse from 'neotraverse/legacy'; import upath from 'upath'; import { rawExec as _exec } from '../lib/util/exec/common'; import type { RawExecOptions } from '../lib/util/exec/types';