From 8c2cb7c77a2a96ef3f4880fb43b51bf7f8bb7d5c Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Tue, 22 Oct 2024 14:52:13 +0300 Subject: [PATCH 1/2] remove packages/scripts (cherry picked from commit 2c32e686eac0a5bcb92ba733b9733513916ba78d) --- packages/commonwealth/package.json | 1 + .../scripts/generate-stakeholder-groups.ts} | 0 .../scripts/sitemap-runner.ts} | 0 packages/commonwealth/tsconfig.build.json | 3 +- packages/commonwealth/tsconfig.json | 3 +- packages/scripts/package.json | 29 ------------------- packages/scripts/test/index.spec.ts | 8 ----- packages/scripts/tsconfig.build.json | 14 --------- packages/scripts/tsconfig.json | 12 -------- pnpm-lock.yaml | 27 ++--------------- pnpm-workspace.yaml | 1 - tsconfig.json | 1 - 12 files changed, 8 insertions(+), 91 deletions(-) rename packages/{scripts/src/generate-stakeholder-groups/index.ts => commonwealth/scripts/generate-stakeholder-groups.ts} (100%) rename packages/{scripts/src/sitemaps/runner.ts => commonwealth/scripts/sitemap-runner.ts} (100%) delete mode 100644 packages/scripts/package.json delete mode 100644 packages/scripts/test/index.spec.ts delete mode 100644 packages/scripts/tsconfig.build.json delete mode 100644 packages/scripts/tsconfig.json diff --git a/packages/commonwealth/package.json b/packages/commonwealth/package.json index d52237f654c..64501bf77df 100644 --- a/packages/commonwealth/package.json +++ b/packages/commonwealth/package.json @@ -111,6 +111,7 @@ "@hicommonwealth/model": "workspace:*", "@hicommonwealth/schemas": "workspace:*", "@hicommonwealth/shared": "workspace:*", + "@hicommonwealth/sitemaps": "workspace:*", "@hookform/resolvers": "^3.3.1", "@ipld/dag-json": "^10.2.0", "@keplr-wallet/types": "^0.12.23", diff --git a/packages/scripts/src/generate-stakeholder-groups/index.ts b/packages/commonwealth/scripts/generate-stakeholder-groups.ts similarity index 100% rename from packages/scripts/src/generate-stakeholder-groups/index.ts rename to packages/commonwealth/scripts/generate-stakeholder-groups.ts diff --git a/packages/scripts/src/sitemaps/runner.ts b/packages/commonwealth/scripts/sitemap-runner.ts similarity index 100% rename from packages/scripts/src/sitemaps/runner.ts rename to packages/commonwealth/scripts/sitemap-runner.ts diff --git a/packages/commonwealth/tsconfig.build.json b/packages/commonwealth/tsconfig.build.json index b17e29434d5..3fb1164b543 100644 --- a/packages/commonwealth/tsconfig.build.json +++ b/packages/commonwealth/tsconfig.build.json @@ -8,6 +8,7 @@ { "path": "../../libs/model/tsconfig.build.json" }, { "path": "../../libs/schemas/tsconfig.build.json" }, { "path": "../../libs/shared/tsconfig.build.json" }, - { "path": "../../libs/evm-testing/tsconfig.build.json" } + { "path": "../../libs/evm-testing/tsconfig.build.json" }, + { "path": "../../libs/sitemaps/tsconfig.build.json" } ] } diff --git a/packages/commonwealth/tsconfig.json b/packages/commonwealth/tsconfig.json index 3e88b28ce2c..1ba4cc23005 100644 --- a/packages/commonwealth/tsconfig.json +++ b/packages/commonwealth/tsconfig.json @@ -30,6 +30,7 @@ { "path": "../../libs/model/tsconfig.build.json" }, { "path": "../../libs/schemas/tsconfig.build.json" }, { "path": "../../libs/shared/tsconfig.build.json" }, - { "path": "../../libs/evm-testing/tsconfig.build.json" } + { "path": "../../libs/evm-testing/tsconfig.build.json" }, + { "path": "../../libs/sitemaps/tsconfig.build.json" } ] } diff --git a/packages/scripts/package.json b/packages/scripts/package.json deleted file mode 100644 index b7e77426145..00000000000 --- a/packages/scripts/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "scripts", - "private": "true", - "version": "0.1.0", - "type": "module", - "files": [ - "build" - ], - "main": "build/index.js", - "scripts": { - "build": "tsc -b ./tsconfig.build.json", - "clean": "rm -rf build && rm -rf coverage", - "check-types": "tsc --noEmit", - "test": "NODE_ENV=test vitest --config ../../vite.config.ts --coverage run test", - "test-dev": "NODE_ENV=test vitest --config ../../vite.config.ts test", - "generate-stakeholder-groups": "tsx src/generate-stakeholder-groups", - "lint": "NODE_OPTIONS=\"--max-old-space-size=4096\" eslint -c ../../.eslintrc.cjs './src/**/*.{ts,tsx}'", - "lint-diff": "NODE_OPTIONS=\"--max-old-space-size=4096\" eslint -c ../../.eslintrc-diff.cjs './src/**/*.{ts,tsx}'" - }, - "dependencies": { - "@hicommonwealth/core": "workspace:*", - "@hicommonwealth/model": "workspace:*", - "@hicommonwealth/sitemaps": "workspace:*", - "@hicommonwealth/adapters": "workspace:*", - "moment": "^2.23.0", - "sequelize": "^6.32.1", - "tsx": "^4.7.2" - } -} diff --git a/packages/scripts/test/index.spec.ts b/packages/scripts/test/index.spec.ts deleted file mode 100644 index 6f976544276..00000000000 --- a/packages/scripts/test/index.spec.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { expect } from 'chai'; -import { describe, test } from 'vitest'; - -describe('scripts test', () => { - test('should test', () => { - expect(true).to.be.true; - }); -}); diff --git a/packages/scripts/tsconfig.build.json b/packages/scripts/tsconfig.build.json deleted file mode 100644 index 70ffc127588..00000000000 --- a/packages/scripts/tsconfig.build.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "build" - }, - "include": ["src"], - "references": [ - { "path": "../../libs/core/tsconfig.build.json" }, - { "path": "../../libs/model/tsconfig.build.json" }, - { "path": "../../libs/sitemaps/tsconfig.build.json" }, - { "path": "../../libs/adapters/tsconfig.build.json" } - ] -} diff --git a/packages/scripts/tsconfig.json b/packages/scripts/tsconfig.json deleted file mode 100644 index 91b9b5c33ff..00000000000 --- a/packages/scripts/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "strict": true - }, - "include": ["src"], - "references": [ - { "path": "../../libs/core/tsconfig.build.json" }, - { "path": "../../libs/model/tsconfig.build.json" }, - { "path": "../../libs/sitemaps/tsconfig.build.json" } - ] -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 090f97253f7..934225ad6f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -971,6 +971,9 @@ importers: '@hicommonwealth/shared': specifier: workspace:* version: link:../../libs/shared + '@hicommonwealth/sitemaps': + specifier: workspace:* + version: link:../../libs/sitemaps '@hookform/resolvers': specifier: ^3.3.1 version: 3.3.4(react-hook-form@7.51.4(react@18.3.1)) @@ -1490,30 +1493,6 @@ importers: specifier: ^0.52.0 version: 0.52.0 - packages/scripts: - dependencies: - '@hicommonwealth/adapters': - specifier: workspace:* - version: link:../../libs/adapters - '@hicommonwealth/core': - specifier: workspace:* - version: link:../../libs/core - '@hicommonwealth/model': - specifier: workspace:* - version: link:../../libs/model - '@hicommonwealth/sitemaps': - specifier: workspace:* - version: link:../../libs/sitemaps - moment: - specifier: ^2.23.0 - version: 2.30.1 - sequelize: - specifier: ^6.32.1 - version: 6.37.3(pg@8.11.5) - tsx: - specifier: ^4.7.2 - version: 4.9.3 - packages: '@aave/aave-token@1.0.4': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 0b1064aa1c0..590251206b9 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,4 @@ packages: - 'libs/**' - 'packages/commonwealth' - - 'packages/scripts' - 'packages/load-testing' diff --git a/tsconfig.json b/tsconfig.json index 980385b2e85..94a42fd711c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,6 @@ { "path": "libs/schemas/tsconfig.build.json" }, { "path": "libs/shared/tsconfig.build.json" }, { "path": "packages/commonwealth/tsconfig.build.json" }, - { "path": "packages/scripts/tsconfig.json" }, { "path": "packages/load-testing/tsconfig.json" } ] } From e9efd908fb09d7d879cd632d8655a29fcc51703e Mon Sep 17 00:00:00 2001 From: Timothee Legros Date: Tue, 22 Oct 2024 20:16:16 +0300 Subject: [PATCH 2/2] remove coverage for scripts --- .github/workflows/CI.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3d3cb1f365d..dada61629b4 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -346,14 +346,13 @@ jobs: chmod -R 755 ./libs/model/coverage/lcov.info chmod -R 755 ./libs/sitemaps/coverage/lcov.info chmod -R 755 ./packages/commonwealth/coverage/lcov.info - chmod -R 755 ./packages/scripts/coverage/lcov.info - name: Coveralls parallel uses: coverallsapp/github-action@v2 with: flag-name: unit-test-coverage parallel: true - files: libs/adapters/coverage/lcov.info libs/core/coverage/lcov.info libs/model/coverage/lcov.info libs/sitemaps/coverage/lcov.info packages/commonwealth/coverage/lcov.info packages/scripts/coverage/lcov.info + files: libs/adapters/coverage/lcov.info libs/core/coverage/lcov.info libs/model/coverage/lcov.info libs/sitemaps/coverage/lcov.info packages/commonwealth/coverage/lcov.info - name: Run integration tests run: pnpm -F commonwealth test-integration --allowOnly=false