From 60961df56ab1993157097ba95e8386cc06ed1f88 Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Fri, 18 Oct 2024 22:58:32 -0400 Subject: [PATCH 1/2] fix(ui): use configured outDir for replace version plugin (#313) This updates the `replaceVersionPlugin` to use the configured output directory for version.json, fixing build issues when a custom `outDir` is specified. - Add `configResolved` hook to capture `outDir` from Vite config - Replace hardcoded 'dist' with `outDir` when writing `version.json` - Ensure `version.json` is created in the correct output directory during build --- ui/vite.config.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/vite.config.mjs b/ui/vite.config.mjs index 726c7991..e4d7f2a8 100644 --- a/ui/vite.config.mjs +++ b/ui/vite.config.mjs @@ -11,15 +11,19 @@ import { version } from './package.json' * This plugin replaces the `__APP_VERSION__` placeholder in the `public/version.json` file */ const replaceVersionPlugin = () => { + let outDir return { name: 'replace-version-in-json', apply: 'build', enforce: 'pre', + configResolved(config) { + outDir = config.build.outDir + }, generateBundle() { const filePath = path.resolve(__dirname, 'public/version.json') const content = fs.readFileSync(filePath, 'utf-8') const updatedContent = content.replace('__APP_VERSION__', version) - const newFilePath = path.resolve(__dirname, 'dist/version.json') + const newFilePath = path.resolve(outDir, 'version.json') fs.writeFileSync(newFilePath, updatedContent, 'utf-8') }, } From 30ac891c1c56d3c36bea707db71711d77e568b3c Mon Sep 17 00:00:00 2001 From: Doug Richar Date: Fri, 18 Oct 2024 23:42:00 -0400 Subject: [PATCH 2/2] chore(renovate): update package rules and simplify config - Simplify and reorganize package rules - Adjust grouping and matching criteria for dependencies - Add weekly schedule to recommended config - Remove npm-specific configurations --- renovate.json | 86 ++++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 53 deletions(-) diff --git a/renovate.json b/renovate.json index b2ea7eb6..5d636d55 100644 --- a/renovate.json +++ b/renovate.json @@ -1,70 +1,50 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:recommended"], + "extends": ["config:recommended", "schedule:weekly"], "dependencyDashboard": true, "configMigration": true, "timezone": "America/New_York", "assignees": ["pbennett"], "baseBranches": ["dev"], "separateMultipleMajor": true, - "separateMajorMinor": true, - "separateMinorPatch": false, + "minimumReleaseAge": "3 days", "ignorePaths": ["ui/.copier-answers.yml"], + "lockFileMaintenance": { + "enabled": true, + "schedule": "before 4am on Tuesday" + }, "packageRules": [ + { + "groupName": "non-major dependencies", + "matchDepTypes": ["dependencies", "devDependencies"], + "matchUpdateTypes": ["patch", "minor"], + "matchPackageNames": ["!vitest", "!@vitest/**"] + }, + { + "groupName": "Node Manager", + "matchFileNames": ["nodemgr/go.mod", "Dockerfile-nodemgr"], + "semanticCommitScope": "nodemgr" + }, + { + "groupName": "UI", + "matchFileNames": ["ui/package.json"], + "matchDepTypes": ["dependencies", "devDependencies"], + "matchPackageNames": ["!vitest", "!@vitest/**"], + "assignees": ["drichar"], + "semanticCommitScope": "ui", + "rangeStrategy": "pin" + }, + { + "groupName": "Vitest", + "matchPackageNames": ["vitest", "@vitest/**"] + }, { "matchCategories": ["node"], "enabled": false }, { - "matchFileNames": ["nodemgr/go.mod", "Dockerfile-nodemgr"], - "groupName": "Node Manager", - "semanticCommitScope": "nodemgr", - "schedule": "before 4am on Monday" + "matchDepTypes": ["optionalDependencies", "peerDependencies", "engines"], + "enabled": false } - ], - "npm": { - "additionalBranchPrefix": "{{{parentDir}}}-", - "minimumReleaseAge": "3 days", - "lockFileMaintenance": { - "enabled": true, - "schedule": "on the 1st day of the month", - "semanticCommitScope": "deps", - "additionalBranchPrefix": "" - }, - "packageRules": [ - { - "matchDepTypes": ["dependencies", "devDependencies"], - "matchUpdateTypes": ["patch", "minor"], - "groupName": "non-major dependencies" - }, - { - "matchDepTypes": ["devDependencies"], - "groupName": "ESLint/Prettier", - "matchPackageNames": ["/lint/", "/prettier/"] - }, - { - "matchFileNames": ["contracts/bootstrap/package.json"], - "semanticCommitScope": "bootstrap" - }, - { - "matchFileNames": ["ui/package.json"], - "assignees": ["drichar"], - "schedule": "on the 1st day of the month", - "semanticCommitScope": "ui", - "rangeStrategy": "pin" - }, - { - "matchPackageNames": ["vitest", "@vitest/**"], - "groupName": "Vitest" - }, - { - "matchDepTypes": [ - "optionalDependencies", - "peerDependencies", - "engines" - ], - "enabled": false - } - ] - } + ] }