Skip to content

Commit

Permalink
fix-ci (#3650)
Browse files Browse the repository at this point in the history
fix

gix

fix manager (hopefully)

remove command

update lock

typecheck

update workflow

fix import

fix tests

update turbo, update chakra version

Revert "update turbo, update chakra version"

This reverts commit 47f3f77.

update chakra

update pnpm

update node

expect error

update typescript

eslint updates

fix

fix

rm ts error
  • Loading branch information
thelostone-mc authored Oct 2, 2024
1 parent b6bfc0b commit eecef33
Show file tree
Hide file tree
Showing 22 changed files with 2,347 additions and 469 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'pnpm'

- name: Install Dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "pnpm"

- name: Install Dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/data-layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'pnpm'

- name: Install Dependencies
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/grant-explorer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'
cache: 'pnpm'

- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/round-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "pnpm"

- name: Install Dependencies
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/verify-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: pnpm/action-setup@v4
with:
version: 8

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
cache: "pnpm"

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "AGPL-3.0-only",
"engines": {
"npm": ">=8.5.5",
"node": ">=16.15.0"
"node": ">=20.1.0"
},
"scripts": {
"start": "pnpm --filter round-manager run start",
Expand Down
3 changes: 3 additions & 0 deletions packages/builder/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ module.exports = {
"@typescript-eslint/default-param-last": "off",
"import/no-cycle": "off",
"import/no-extraneous-dependencies": "off",
"@typescript-eslint/no-useless-constructor": "off",
"@typescript-eslint/no-implied-eval": "off",
"@typescript-eslint/no-throw-literal": "off",
"react/prop-types": "off",
"max-len": ["error", { code: 150 }],
"no-console": "off",
Expand Down
19 changes: 13 additions & 6 deletions packages/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
"name": "builder",
"version": "0.1.0",
"private": true,
"engines": {
"npm": ">=8.5.5",
"node": ">=20.1.0"
},
"dependencies": {
"@babel/core": "^7.20.12",
"@babel/plugin-syntax-flow": "^7.14.5",
"@babel/plugin-transform-react-jsx": "^7.14.9",
"@chakra-ui/react": "^2.1.2",
"@chakra-ui/react": "2.6.0",
"@craco/craco": "7.1.0",
"@datadog/browser-logs": "^4.21.2",
"@datadog/browser-rum": "^4.16.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@ethersproject/address": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@gitcoinco/passport-sdk-types": "^0.2.0",
Expand Down Expand Up @@ -64,7 +66,7 @@
"jszip": "^3.10.1",
"localforage": "^1.10.0",
"os-browserify": "^0.3.0",
"pnpm": "7",
"pnpm": "9",
"postcss": "^8.4.14",
"posthog-js": "^1.132.0",
"process": "^0.11.10",
Expand Down Expand Up @@ -134,10 +136,10 @@
"@types/dompurify": "^2.4.0",
"@types/jest-when": "^3.5.2",
"@types/react-gtm-module": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/eslint-plugin": "^6.7.0",
"@typescript-eslint/parser": "^5.23.0",
"dotenv": "^16.4.1",
"eslint": "^8.2.0",
"eslint": ">=8.1.0 <9.0.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
Expand All @@ -154,5 +156,10 @@
"msw": "^0.47.4",
"postcss-import": "^14.1.0",
"prettier": "2"
},
"resolutions": {
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "5.23.0",
"typescript": "5.1.6"
}
}
5 changes: 0 additions & 5 deletions packages/builder/src/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ interface State {
}

class ErrorBoundary extends React.Component<Props, State> {
constructor(props: Props) {
super(props);
this.state = { hasError: false };
}

static getDerivedStateFromError() {
return { hasError: true };
}
Expand Down
2 changes: 1 addition & 1 deletion packages/builder/tsconfig.tsbuildinfo

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
"tailwind-styled-components": "^2.2.0",
"tiny-emitter": "^2.1.0",
"ts-debounce": "^4.0.0",
"typescript": "latest",
"viem": "^2.13.10",
"wagmi": "2.10.2",
"zod": "^3.22.4"
Expand All @@ -55,6 +54,7 @@
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"dotenv-flow": "^3.3.0",
"typescript": "^5.6.2",
"vitest": "^0.34.6"
}
}
4 changes: 2 additions & 2 deletions packages/data-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"react": "^18.1.0",
"ts-unused-exports": "^10.0.1",
"tsx": "^3.12.10",
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"vitest": "^0.34.4"
},
"engines": {
"node": ">=18"
"node": ">=20.1.0"
},
"dependencies": {
"@gitcoinco/passport-sdk-types": "^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-gitcoin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"eslint": "^8.49.0",
"eslint-config-turbo": "^1.10.14",
"eslint-plugin-react": "^7.31.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/grant-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"stream-http": "^3.2.0",
"swr": "^2.0.0",
"ts-is-present": "^1.2.2",
"typescript": "^5.1.6",
"url": "^0.11.0",
"util": "^0.12.4",
"verify-env": "workspace:*",
Expand Down Expand Up @@ -147,12 +146,13 @@
"tailwind-styled-components": "^2.1.7",
"tailwindcss": "^3.0.24",
"ts-unused-exports": "^10.0.1",
"typescript": "^5.6.2",
"vite": "^4.4.9",
"vitest": "^0.34.2",
"vitest-fetch-mock": "^0.2.2"
},
"engines": {
"node": ">=18",
"node": ">=20.1.0",
"npm": ">=8.5.5"
},
"volta": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
renderWithContext,
} from "../../../test-utils";
import Navbar from "../Navbar";
import type wagmi from "wagmi";
import * as wagmi from "wagmi";
import type rrd from "react-router-dom";
const userAddress = faker.finance.ethereumAddress();

Expand Down
2 changes: 1 addition & 1 deletion packages/round-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "AGPL-3.0-only",
"engines": {
"npm": ">=8.5.5",
"node": ">=18"
"node": ">=20.1.0"
},
"scripts": {
"start": "craco start",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { MemoryRouter } from "react-router-dom";
import { zeroAddress } from "viem";
import { errorModalDelayMs } from "../../../constants";
import CreateProgramPage from "../CreateProgramPage";
import wagmi, { Config, UseAccountReturnType } from "wagmi";
import * as wagmi from "wagmi";

jest.mock("../../api/ipfs");
jest.mock("../../common/Auth");
Expand All @@ -39,18 +39,21 @@ jest.mock("common", () => ({
}));

jest.mock("wagmi", () => ({
useAccount: () => ({
chainId: 10,
address: "0x0000000000000000000000000000000000000000",
chain: {
id: 10,
},
}),
useAccount: jest.fn(),
}));

describe("<CreateProgramPage />", () => {
beforeEach(() => {

jest.clearAllMocks();

(wagmi.useAccount as jest.Mock).mockReturnValue({
chainId: 10,
address: "0x0000000000000000000000000000000000000000",
chain: {
id: 10,
name: "Testimism",
},
} as unknown as ReturnType<typeof wagmi.useAccount>);
});

it("shows program chain tooltip", async () => {
Expand Down Expand Up @@ -150,16 +153,14 @@ describe("<CreateProgramPage />", () => {
});

it("displays wrong network when connected to unsupported network", async () => {
jest.spyOn(wagmi, "useAccount").mockImplementation(
() =>
({
chainId: 9999,
address: "0x0000000000000000000000000000000000000000",
chain: {
id: 9999,
},
}) as unknown as UseAccountReturnType<Config>
);
jest.spyOn(wagmi, "useAccount").mockReturnValue({
chainId: 9999,
address: "0x0000000000000000000000000000000000000000",
chain: {
id: 9999,
name: "Homer",
},
} as unknown as ReturnType<typeof wagmi.useAccount>);

renderWithContext(<CreateProgramPage />);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2087,8 +2087,7 @@ function Funding(props: {
?.matchingCap !== true
}
checked={
!props.editedRound?.roundMetadata?.quadraticFundingConfig
?.matchingCap ?? false
!props.editedRound?.roundMetadata?.quadraticFundingConfig?.matchingCap
}
onChange={(e) => {
props.resetField(
Expand Down
Loading

0 comments on commit eecef33

Please sign in to comment.