mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-10 08:05:14 +02:00
chore: upgrade dependencies and tooling
This commit is contained in:
parent
fa7377ddd3
commit
44898d7c04
4 changed files with 295 additions and 169 deletions
|
|
@ -7,6 +7,7 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|||
import { promisify } from 'node:util';
|
||||
|
||||
const execFileAsync = promisify(execFileCallback);
|
||||
const npmCheckUpdatesRejectArgs = ['--reject', 'fumadocs-core,fumadocs-ui'];
|
||||
|
||||
function ktxRootDir() {
|
||||
return resolve(dirname(fileURLToPath(import.meta.url)), '..');
|
||||
|
|
@ -61,8 +62,15 @@ export async function runDependencyUpgrade(options = {}) {
|
|||
{
|
||||
name: 'TypeScript dependency constraints',
|
||||
command: 'pnpm',
|
||||
args: ['dlx', 'npm-check-updates', '-u', '--deep', ...npmCheckUpdatesCooldownArgs],
|
||||
retry: commandText('pnpm', ['dlx', 'npm-check-updates', '-u', '--deep', ...npmCheckUpdatesCooldownArgs]),
|
||||
args: ['dlx', 'npm-check-updates', '-u', '--deep', ...npmCheckUpdatesRejectArgs, ...npmCheckUpdatesCooldownArgs],
|
||||
retry: commandText('pnpm', [
|
||||
'dlx',
|
||||
'npm-check-updates',
|
||||
'-u',
|
||||
'--deep',
|
||||
...npmCheckUpdatesRejectArgs,
|
||||
...npmCheckUpdatesCooldownArgs,
|
||||
]),
|
||||
},
|
||||
...pythonDependencyUpdatePhases(),
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,7 +24,19 @@ test('runDependencyUpgrade updates TypeScript and Python manifests before regene
|
|||
assert.deepEqual(
|
||||
calls.map((call) => [call.command, call.args]),
|
||||
[
|
||||
['pnpm', ['dlx', 'npm-check-updates', '-u', '--deep', '--cooldown', '10080m']],
|
||||
[
|
||||
'pnpm',
|
||||
[
|
||||
'dlx',
|
||||
'npm-check-updates',
|
||||
'-u',
|
||||
'--deep',
|
||||
'--reject',
|
||||
'fumadocs-core,fumadocs-ui',
|
||||
'--cooldown',
|
||||
'10080m',
|
||||
],
|
||||
],
|
||||
['uvx', ['dependency-check-updates', '--manifest', 'pyproject.toml', '-u']],
|
||||
['uvx', ['dependency-check-updates', '--manifest', 'python/ktx-sl/pyproject.toml', '-u']],
|
||||
['uvx', ['dependency-check-updates', '--manifest', 'python/ktx-daemon/pyproject.toml', '-u']],
|
||||
|
|
@ -62,7 +74,7 @@ test('runDependencyUpgrade stops at the failed phase and prints a retry command'
|
|||
assert.deepEqual(
|
||||
calls.map((call) => [call.command, call.args]),
|
||||
[
|
||||
['pnpm', ['dlx', 'npm-check-updates', '-u', '--deep']],
|
||||
['pnpm', ['dlx', 'npm-check-updates', '-u', '--deep', '--reject', 'fumadocs-core,fumadocs-ui']],
|
||||
['uvx', ['dependency-check-updates', '--manifest', 'pyproject.toml', '-u']],
|
||||
['uvx', ['dependency-check-updates', '--manifest', 'python/ktx-sl/pyproject.toml', '-u']],
|
||||
],
|
||||
|
|
@ -94,7 +106,7 @@ test('runDependencyUpgrade ignores missing pnpm minimum release age config', asy
|
|||
assert.equal(result.ok, true);
|
||||
assert.deepEqual(calls[0], {
|
||||
command: 'pnpm',
|
||||
args: ['dlx', 'npm-check-updates', '-u', '--deep'],
|
||||
args: ['dlx', 'npm-check-updates', '-u', '--deep', '--reject', 'fumadocs-core,fumadocs-ui'],
|
||||
});
|
||||
assert.equal(
|
||||
calls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue