From f572ba9ae085967f19553fd41dd64dd120167a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 30 Aug 2024 11:06:20 +0200 Subject: [PATCH 1/3] fix: remove package manager in validation service --- govtool/frontend/junit-report.xml | 321 +++++++++++++++++++++++ govtool/frontend/package.json | 5 +- govtool/frontend/vite.config.ts | 28 +- govtool/metadata-validation/package.json | 3 +- 4 files changed, 339 insertions(+), 18 deletions(-) diff --git a/govtool/frontend/junit-report.xml b/govtool/frontend/junit-report.xml index e69de29bb..2f3434f92 100644 --- a/govtool/frontend/junit-report.xml +++ b/govtool/frontend/junit-report.xml @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index a63d98754..bce574efd 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -13,7 +13,7 @@ "postinstall": "patch-package", "preview": "vite preview", "storybook": "storybook dev -p 6006", - "test": "vitest", + "test": "NODE_OPTIONS=--max_old_space_size=8192 vitest", "test:coverage": "vitest --coverage", "test:make-badges": "npx istanbul-badges-readme --readmeDir='../../'", "test:verbose": "vitest --reporter=verbose", @@ -109,5 +109,6 @@ "typescript": "^5.0.2" }, "readme": "ERROR: No README data found!", - "_id": "govtool@1.0.6" + "_id": "govtool@1.0.6", + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/govtool/frontend/vite.config.ts b/govtool/frontend/vite.config.ts index bf6f93d42..5b9c7ed23 100644 --- a/govtool/frontend/vite.config.ts +++ b/govtool/frontend/vite.config.ts @@ -81,20 +81,20 @@ const vitestConfig = defineVitestConfig({ junit: "./junit-report.xml", json: "./json-report.json", }, - coverage: { - include: [ - "src/components/**/*", - "src/consts/**/*", - "src/context/**/*", - "src/hooks/**/*", - "src/services/**/*", - "src/utils/**/*", - ], - provider: "v8", - reporter: ["json-summary", "lcov"], - reportOnFailure: true, - enabled: true, - }, + // coverage: { + // include: [ + // "src/components/**/*", + // "src/consts/**/*", + // "src/context/**/*", + // "src/hooks/**/*", + // "src/services/**/*", + // "src/utils/**/*", + // ], + // provider: "v8", + // reporter: ["json-summary", "lcov"], + // reportOnFailure: true, + // enabled: true, + // }, }, }); diff --git a/govtool/metadata-validation/package.json b/govtool/metadata-validation/package.json index 22203da11..eb6285072 100644 --- a/govtool/metadata-validation/package.json +++ b/govtool/metadata-validation/package.json @@ -58,6 +58,5 @@ "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "typescript": "^5.1.3" - }, - "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" + } } From a93d58d4df414789fe53a22e7d28f9f5e3bfbf15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 30 Aug 2024 12:16:09 +0200 Subject: [PATCH 2/3] fix: remove json resolving causing unfinished validation service build --- govtool/metadata-validation/src/main.ts | 3 +-- govtool/metadata-validation/tsconfig.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/govtool/metadata-validation/src/main.ts b/govtool/metadata-validation/src/main.ts index bdedab481..7db8b8703 100644 --- a/govtool/metadata-validation/src/main.ts +++ b/govtool/metadata-validation/src/main.ts @@ -3,7 +3,6 @@ import { ValidationPipe } from '@nestjs/common'; import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; import { AppModule } from './app.module'; -import { version } from '../package.json'; async function bootstrap() { const app = await NestFactory.create(AppModule, { @@ -14,7 +13,7 @@ async function bootstrap() { const config = new DocumentBuilder() .setTitle('Metadata Validation Tool') .setDescription('The Metadata Validation Tool API description') - .setVersion(version) + .setVersion('1.0.14') .build(); const document = SwaggerModule.createDocument(app, config); diff --git a/govtool/metadata-validation/tsconfig.json b/govtool/metadata-validation/tsconfig.json index 46c6b800c..1044dc39f 100644 --- a/govtool/metadata-validation/tsconfig.json +++ b/govtool/metadata-validation/tsconfig.json @@ -17,7 +17,6 @@ "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false, - "resolveJsonModule": true, "paths": { "@/*": ["src/*"], "@dto": ["src/dto"], From fd039972318479e70d2c47c7cf45cb1e2ec0c45b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sza=C5=82owski?= Date: Fri, 30 Aug 2024 12:36:31 +0200 Subject: [PATCH 3/3] fix(#1876): fix voting on info actions in bootstrapping phase --- CHANGELOG.md | 1 + govtool/frontend/src/context/featureFlag.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ea9d37c9..e6ff77ca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ changes. - Fix modal content invisible on ios [Issue 1842](https://github.com/IntersectMBO/govtool/issues/1842) - Fix counting votes by CC committee members and SPOs [Issue 1838](https://github.com/IntersectMBO/govtool/issues/1838) - Fix displaying non relevant data in protocol parameter change Governance Action [Issue 1601](https://github.com/IntersectMBO/govtool/issues/1601) +- Fix voting on info actions in bootstrapping phase [Issue 1876](https://github.com/IntersectMBO/govtool/issues/1876) ### Changed diff --git a/govtool/frontend/src/context/featureFlag.tsx b/govtool/frontend/src/context/featureFlag.tsx index 13880a56a..8e972a356 100644 --- a/govtool/frontend/src/context/featureFlag.tsx +++ b/govtool/frontend/src/context/featureFlag.tsx @@ -50,7 +50,7 @@ const FeatureFlagProvider = ({ children }: PropsWithChildren) => { */ const isVotingOnGovernanceActionEnabled = useCallback( (governanceActionType: GovernanceActionType) => - (epochParams?.protocol_major || 0) > + (epochParams?.protocol_major || 0) >= govActionVotingEnabledSinceProtocolVersion[governanceActionType], [isAppInitializing], );