As part of follow-up changes, we need a list of fields that could be
used in templates as part of a linting rule.
To avoid the `tools` directory importing from `lib`, we can make sure
that we generate the list of fields.
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
* ci(linter): add renovate/no-sync-io rule
Flags calls to a fixed list of Node.js sync I/O APIs (readFileSync,
writeFileSync, mkdirSync, rmSync, readdirSync, statSync, existsSync,
copyFileSync, execSync, spawnSync, execFileSync) in tools/** and
**/*.spec.ts only; production lib code is not targeted.
Set to "warn" instead of "error": the repo has 40 pre-existing
violations, exceeding the agreed fix threshold of 30, so violations
are left in place for follow-up rather than mass-fixed here.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(linter): enforce renovate/no-sync-io at error
Promote the rule from warn to error now that the codebase has been
migrated off synchronous I/O in tools/ and spec files.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor(tools): migrate synchronous fs calls to async equivalents
Replace *Sync fs calls with their async/promise-based counterparts in
tools/ scripts (generate-imports, check runner, utils, cwdchanged hook)
now that renovate/no-sync-io is enforced at error there.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test: migrate synchronous fs calls in specs to async equivalents
Replace *Sync fs calls (readdirSync, writeFileSync, existsSync, etc.)
with their async/promise-based counterparts across affected spec
files, making the enclosing it()/module-scope initializers async as
needed, to satisfy renovate/no-sync-io now enforced at error.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ci(linter): replace custom no-sync-io rule with built-in node/no-sync
The oxc built-in covers a superset of the custom fixed-name list.
Migrate the additionally flagged sites: async glob in test-shards,
async execa in prepare-deps, promisified gzip/generateKeyPair in
rpm/hex specs, and rename the misleading execSync mock alias
(it mocks the async rawExec).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
As part of future changes, we'll use this generated list to refactor
`GlobalConfig.get` to always return a configuration option's default
value.
We can add a generated set of defaults for these global options to make
this easier.
To avoid import cycles, we can make sure that we create a stub import
(which will then be overwritten).
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
distro-info refactor
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
styling
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
distro-info refactor
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
styling
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
use https://debian.pages.debian.net/distro-info-data/ubuntu.csv as distro info data
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
cr changes and migrated from mjs to ts
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
added a crude way to prevent writing corrupted data
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
lint fixes
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
cr changes and migrated from mjs to ts
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
cr changes
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
dynamically check if stable/released.
22.04 release for example
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
fixed JSON order
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
removed ts.ignore
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
cr changes
* refactor(tools/distro-info): for later use in ubuntu and debian versioning
cr changes
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>