Commit Graph

3 Commits

Author SHA1 Message Date
Sebastian Poxhofer 58771bb183 refactor(linters): enabled oxlints func-style (#44691)
* refactor(oxlint): enable func-style

Enable the built-in func-style rule as ["warn", "declaration"] so that
named functions are written as function declarations instead of arrow or
function expressions assigned to variables, matching the convention in
docs/development/best-practices.md (Functions section). Inline arrow
callbacks are unaffected; prefer-arrow-callback continues to cover the
callback direction.

Severity is "warn" instead of "error" as a fallback: a repo-wide run
found 196 pre-existing violations (70 in spec files, 126 in production
code), exceeding the 80-violation fix threshold for this change, so no
violations were fixed here. Follow-up work can convert the offenders
(largest clusters: lib/modules/versioning/ruby, lib/util/cache/package,
lib/modules/versioning/maven, lib/modules/versioning/gradle) and then
raise the rule to "error". Note oxlint 1.72 also supports an
allowTypeAnnotation option if typed consts should remain arrows.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): enforce func-style at error

* refactor(func-style): convert const-arrow functions to declarations in with-cache spec and ruby versioning

* refactor(func-style): convert const-arrow functions to declarations in maven/gradle modules

* refactor(func-style): convert const-arrow functions to declarations in remaining versioning modules

* refactor(func-style): convert const-arrow functions to declarations in platform modules

Discriminated-union closures (ensureCommentRemoval byTopic/byContent
helpers in github, gitlab, bitbucket, bitbucket-server) needed the
narrowed field passed explicitly as a parameter, since function
declarations are hoisted and lose the outer if-narrowing that inline
arrow-function closures previously relied on.

* refactor(func-style): convert const-arrow functions to declarations across util/manager/datasource modules

One case (logger/renovate-logger.ts logOnceFn) is kept as an arrow
function with a documented oxlint-disable: it is stored on
this.logger.once[level] and relies on lexically-bound this, which a
hoisted function declaration would not preserve.

* refactor(func-style): convert remaining const-arrow test helpers to declarations

get-updated.spec.ts: hoisted expectPipCompilePackageAndLockFile to
module scope (it only closes over the module-level pipCompile mock)
and added a documented oxlint-disable for vitest/expect-expect on its
caller test, since oxlint's expect-expect check does not trace
assertions through an externally-defined helper function.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 11:14:22 +00:00
Sebastian Poxhofer ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +00:00
Hajime-san 0004fcf69b feat(managers): add Deno manager support (#37828)
* works

* fix ci

Base branch is: main
Base branch ref for this PR is: c3a9360ecd
❌ Error: Snapshots have been added in this PR. Use toMatch instead.

* fix ci

Base branch is: main
Base branch ref for this PR is: c3a9360ecd
✅ Snapshot code check passed.
Added files in '__fixtures__':
lib/modules/manager/deno/__fixtures__/.gitignore
lib/modules/manager/deno/__fixtures__/npm-compat-workspace/deno.lock
lib/modules/manager/deno/__fixtures__/npm-compat-workspace/package.json
lib/modules/manager/deno/__fixtures__/npm-compat-workspace/sub/package.json
lib/modules/manager/deno/__fixtures__/workspace-01/deno.json
lib/modules/manager/deno/__fixtures__/workspace-01/deno.lock
lib/modules/manager/deno/__fixtures__/workspace-01/docs/deno.json
lib/modules/manager/deno/__fixtures__/workspace-01/docs/deno.lock
lib/modules/manager/deno/__fixtures__/workspace-01/packages/pkg1/deno.jsonc
lib/modules/manager/deno/__fixtures__/workspace-01/packages/pkg1/deno.lock
lib/modules/manager/deno/__fixtures__/workspace-02/deno.json
lib/modules/manager/deno/__fixtures__/workspace-02/deno.lock
lib/modules/manager/deno/__fixtures__/workspace-02/docs/deno.json
lib/modules/manager/deno/__fixtures__/workspace-02/import_map.json
lib/modules/manager/deno/__fixtures__/workspace-03/deno.json
lib/modules/manager/deno/__fixtures__/workspace-03/deno.lock
lib/modules/manager/deno/__fixtures__/workspace-03/node/package.json
Total number of added files in '__fixtures__': 17
Deleted files in '__fixtures__':

Total number of deleted files in '__fixtures__': 0

Updated total number of added files in '__fixtures__': 17
Updated total number of deleted files in '__fixtures__': 0
❌ Error: More files have been added to '__fixtures__' directories than deleted.
Error: Process completed with exit code 1.

* nit fix

* fix import map

* remove unnecessary mock

* nested workspace is invalid

* cleanup to postExtract

* revert JSR datasource files

* move to schema

* move

* cleanup lock

* importMapReferrer

* cleanup artifact test

* comment

* remove support deno-cli detailed behaviour due to complexity

* cleanup

* fix schema

* cleanup

* schema for updateDependency

* nit

* lint

* update doc

* tmp-promise

* no need filter deno

* returns an error

* remove delete lockfile

* store the importMapReferrer result

* constraints

* use parseJson

* remove processDenoCompatiblePackageJson

* move to types.ts

* Update lib/modules/manager/deno/post.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Revert "Update lib/modules/manager/deno/post.ts"

This reverts commit 64bd57649c.

* Revert "remove delete lockfile"

This reverts commit e701333519.

* Reapply "remove delete lockfile"

This reverts commit 89c3d79a43.

* remove comment

* bump ci

* fix eslint

* Apply suggestion from @RahulGautamSingh

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Update lib/modules/manager/deno/compat.spec.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Update lib/modules/manager/deno/post.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* Update lib/modules/manager/deno/compat.spec.ts

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>

* prettier

* Revert "Reapply "remove delete lockfile""

This reverts commit 85af6a506e.

* falling back for lockFileMaintenance

* mock statically

* use mockExecAll

* avoid cloning

* avoid cloning

* add `.ts` extension

* fix versioning

* fix `.ts` extension

* c8

* c8 update

* c8 post

* c8 extract

* c8 versiong

* c8 schema

* c8 compat

* revert deno versioning

* pnpm lint-fix

* lockFileNames

* zod/v3

* comment

* Apply suggestions from code review

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* Apply suggestions from code review

review batch lib/modules/manager/deno/compat.ts

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* fix import

* fix

* Apply suggestions from code review

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* isObject

* Apply suggestions from code review

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* named import @sindresorhus/is

* Apply suggestions from code review

* review

* rm test

* Apply suggestions from code review

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* Redundant radix parameter.

* review

* review

* c8 lib/modules/manager/deno/update.ts

* fix

* named import

* clean up

* rm unnecessary

* named import

* Missing radix parameter.

* better

* move to beforeAll

* `lockFile` to `fileName`

https://github.com/renovatebot/renovate/pull/41631

* `lockFile` to `fileName`

https://github.com/renovatebot/renovate/pull/41631

* Update lib/modules/manager/deno/schema.ts

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* update containerbase

* oxlint

* refactor for

https://github.com/renovatebot/renovate/pull/42253

* Apply suggestions from code review

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* use `Record`

* use type `Upgrade`

* update README.md

---------

Co-authored-by: RahulGautamSingh <rahultesnik@gmail.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-04-29 14:36:41 +00:00