Skip to content

Commit

Permalink
chore: [DX-3280] Fix missing dependencies, flaky configs, tests and u…
Browse files Browse the repository at this point in the history
…pdate NX parallel count (#2220)
  • Loading branch information
zaidarain1 committed Sep 24, 2024
1 parent 4f52795 commit 8b1ceba
Show file tree
Hide file tree
Showing 65 changed files with 182 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: setup
uses: ./.github/actions/setup
- name: Build
run: yarn nx affected --target=build --parallel=5
run: yarn nx affected --target=build

typecheck-sdk:
name: Typecheck SDK
Expand Down
2 changes: 1 addition & 1 deletion build-dependents.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ try {

if (isDependent || changedProject === currentProject) {
// Rebuild the current project
const command = `nx run-many --target=d --projects=${currentProject} --parallel=5 --no-cloud`;
const command = `nx run-many --target=d --projects=${currentProject} --no-cloud`;

console.log(`Running command: ${command}`);
execSync(command, { stdio: 'inherit' });
Expand Down
2 changes: 1 addition & 1 deletion dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ fi

# Run nx commands with the selected or provided package name
echo "Running commands for package: $PACKAGE_NAME"
nx run $PACKAGE_NAME:d --parallel=5 --no-cloud
nx run $PACKAGE_NAME:d --no-cloud
nx watch --all -- node ./build-dependents.js \$NX_PROJECT_NAME $(echo $PACKAGE_NAME)
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export default defineConfig({
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
workers: "80%",
reporter: "html",

use: {
Expand All @@ -280,7 +280,7 @@ export default defineConfig({
],

webServer: {
command: "yarn dev",
command: "yarn start",
url: "http://localhost:3000",
reuseExistingServer: !process.env.CI,
},
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/next-connect-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^18.0.11",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/next-rainbow-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^18.0.11",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/next-wagmi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react-dom": "^18.0.11",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/next-web3-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@types/react-dom": "^18.0.11",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/vite-connect-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"vite": "^5.2.14",
"vite-plugin-node-polyfills": "^0.22.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/vite-rainbow-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"vite": "^5.2.14",
"vite-plugin-node-polyfills": "^0.22.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/vite-wagmi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"vite": "^5.2.14",
"vite-plugin-node-polyfills": "^0.22.0"
},
Expand Down
2 changes: 1 addition & 1 deletion examples/_deprecated/vite-web3-modal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "^5.5.4",
"typescript": "^5.6.2",
"vite": "^5.2.14",
"vite-plugin-node-polyfills": "^0.22.0"
},
Expand Down
1 change: 1 addition & 0 deletions examples/orderbook/create-listing-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
},
"dependencies": {
"@biom3/react": "^0.26.1",
"@ethersproject/providers": "^5.7.2",
"@imtbl/sdk": "latest",
"ethers": "^5.7.2",
"next": "14.2.7",
Expand Down
3 changes: 2 additions & 1 deletion examples/passport/identity-with-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "@examples/identity-with-nextjs",
"version": "0.1.0",
"dependencies": {
"@imtbl/sdk": "latest",
"ethers": "^5.7.2",
"next": "14.2.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@imtbl/sdk": "latest",
"@playwright/test": "^1.45.3",
"@types/node": "^20",
"@types/react": "^18.0.28",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"name": "@examples/wallets-transactions-with-nextjs",
"version": "0.1.0",
"dependencies": {
"@imtbl/sdk": "latest",
"ethers": "^5.7.2",
"next": "14.2.10",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@imtbl/sdk": "latest",
"@playwright/test": "^1.45.3",
"@types/node": "^20",
"@types/react": "^18.0.28",
Expand Down
2 changes: 1 addition & 1 deletion examples/primary-sales-backend-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"nodemon": "^3.1.4",
"prisma": "^5.18.0",
"ts-node": "^10.9.2",
"typescript": "^5.5.4"
"typescript": "^5.6.2"
},
"dependencies": {
"@fastify/autoload": "^5.10.0",
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
}
},
"defaultBase": "main",
"parallel": 5,
"parallel": 8,
"nxCloudAccessToken": "Mzg3ZGY1MWUtYmYyNy00ZmE4LTkyNDAtYjYxZmJmYmE4NWQ3fHJlYWQ="
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"dev": "./dev.sh",
"docs:build": "typedoc",
"docs:serve": "http-server ./docs --cors -p 8080 -c-1",
"lint": "nx affected -t lint --parallel=5 --no-error-on-unmatched-pattern",
"lint": "nx affected -t lint",
"lint:examples": "yarn workspaces foreach -Apt --include='@examples/**' run lint",
"nx": "nx",
"postinstall": "husky install",
Expand All @@ -62,10 +62,10 @@
"syncpack:check": "yarn syncpack list-mismatches",
"syncpack:fix": "yarn syncpack fix-mismatches",
"syncpack:format": "yarn syncpack format",
"test": "nx affected -t test --parallel=5",
"test": "nx affected -t test",
"test:examples": "yarn workspaces foreach -At --include='@examples/**' run test",
"test:vpn": "RUN_VPN_TESTS=1 wsrun --exclude-missing -e test",
"typecheck": "nx affected -t typecheck --parallel=5",
"typecheck": "nx affected -t typecheck",
"yalc:sdk:publish": "yarn workspace @imtbl/sdk exec yarn dlx yalc publish"
},
"workspaces": {
Expand Down
1 change: 1 addition & 0 deletions packages/blockchain-data/sdk/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const config: Config = {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
transformIgnorePatterns: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
2 changes: 1 addition & 1 deletion packages/blockchain-data/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"test": "jest",
"test:e2e": "jest --runInBand --testMatch \"**/?(*.)+(e2e).[jt]s?(x)\"",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit --jsx preserve"
"typecheck": "tsc --customConditions default --noEmit --jsx preserve"
},
"type": "module"
}
1 change: 1 addition & 0 deletions packages/checkout/sdk-sample-app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Config } from 'jest';
const config: Config = {
verbose: true,
testEnvironment: 'jsdom',
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
3 changes: 3 additions & 0 deletions packages/checkout/sdk-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
]
},
"dependencies": {
"@biom3/design-tokens": "^0.4.2",
"@biom3/react": "^0.25.0",
"@ethersproject/providers": "^5.7.2",
"@imtbl/checkout-sdk": "0.0.0",
"@imtbl/checkout-widgets": "0.0.0",
"@imtbl/config": "0.0.0",
Expand Down Expand Up @@ -42,6 +44,7 @@
"crypto-browserify": "^3.12.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"process": "^0.11.10",
"react-app-rewired": "^2.2.1",
"react-scripts": "5.0.1",
"stream-browserify": "^3.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/checkout/sdk/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config: Config = {
},
transformIgnorePatterns: [],
setupFiles: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
4 changes: 3 additions & 1 deletion packages/checkout/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@swc/core": "^1.3.36",
"@types/jest": "^29.4.3",
"@types/uuid": "^8.3.4",
"babel-jest": "^29.5.0",
"eslint": "^8.40.0",
"jest": "^29.4.3",
"jest-environment-jsdom": "^29.4.3",
"parcel": "^2.8.3",
"rollup": "^4.19.1",
"rollup-plugin-dts": "^6.1.1",
Expand Down Expand Up @@ -79,7 +81,7 @@
"start:local": "CHECKOUT_LOCAL_MODE=true yarn start",
"test": "jest test",
"test:watch": "jest test --watch",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --customConditions default --noEmit"
},
"source": "src/index.ts",
"type": "module"
Expand Down
1 change: 1 addition & 0 deletions packages/checkout/widgets-lib/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const config: Config = {
transformIgnorePatterns: [
"node_modules/(?!axios|@biom3/design-tokens)",
],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
4 changes: 4 additions & 0 deletions packages/checkout/widgets-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@0xsquid/sdk": "^2.8.24",
"@biom3/design-tokens": "^0.4.2",
"@biom3/react": "^0.25.0",
"@ethersproject/bignumber": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@imtbl/bridge-sdk": "0.0.0",
"@imtbl/checkout-sdk": "0.0.0",
Expand All @@ -29,9 +30,11 @@
"@walletconnect/ethereum-provider": "^2.11.1",
"@walletconnect/modal": "^2.6.2",
"assert": "^2.0.0",
"axios": "^1.6.5",
"buffer": "^6.0.3",
"crypto-browserify": "^3.12.0",
"ethers": "^5.7.2",
"framer-motion": "^11.0.6",
"https-browserify": "^1.0.0",
"i18next": "^23.7.6",
"i18next-browser-languagedetector": "^7.2.0",
Expand All @@ -45,6 +48,7 @@
},
"devDependencies": {
"@0xsquid/squid-types": "^0.1.104",
"@jest/globals": "^29.5.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
Expand Down
1 change: 1 addition & 0 deletions packages/checkout/widgets-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"dependencies": {
"@biom3/design-tokens": "^0.4.2",
"@biom3/react": "^0.25.0",
"@ethersproject/providers": "^5.7.2",
"@imtbl/checkout-sdk": "0.0.0",
"@imtbl/checkout-widgets": "0.0.0",
"@imtbl/config": "0.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/config/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const config: Config = {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
transformIgnorePatterns: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0",
"test": "jest",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit --jsx preserve"
"typecheck": "tsc --customConditions default --noEmit --jsx preserve"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion packages/internal/bridge/bridge-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"flowRateInfo": "node --loader ts-node/esm ./src/flowRateInfo.ts",
"getMapping": "node --loader ts-node/esm ./src/getMapping.ts",
"issueUSDC": "node --loader ts-node/esm ./src/issueUSDC.ts",
"lint": "eslint ./src --ext .ts --max-warnings=0",
"lint": "eslint ./src --ext .ts --max-warnings=0 --no-error-on-unmatched-pattern",
"mapToken": "node --loader ts-node/esm ./src/mapToken.ts",
"pending": "node --loader ts-node/esm ./src/pending.ts",
"setFlowRate": "node --loader ts-node/esm ./src/setFlowRate.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/internal/bridge/sdk/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config: Config = {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
transformIgnorePatterns: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
2 changes: 1 addition & 1 deletion packages/internal/bridge/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"lint:fix": "cd ../../../../ && yarn wsrun -p @imtbl/bridge-sdk -c lint --fix",
"test": "jest test -- --silent=false",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --customConditions default --noEmit"
},
"source": "src/index.ts",
"type": "module"
Expand Down
1 change: 1 addition & 0 deletions packages/internal/cryptofiat/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const config: Config = {
'^.+\\.(t|j)sx?$': '@swc/jest',
},
transformIgnorePatterns: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
2 changes: 1 addition & 1 deletion packages/internal/cryptofiat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"lint": "eslint ./src --ext .ts,.jsx,.tsx --max-warnings=0 --fix",
"test": "jest",
"test:watch": "jest --watch",
"typecheck": "tsc --noEmit --jsx preserve"
"typecheck": "tsc --customConditions default --noEmit --jsx preserve"
},
"type": "module"
}
2 changes: 1 addition & 1 deletion packages/internal/dex/sdk-sample-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"private": true,
"scripts": {
"dev": "concurrently 'next dev' 'yarn run --top-level dev @imtbl/dex-sdk'",
"lint": "eslint ./src --ext .ts --max-warnings=0",
"lint": "eslint ./src --ext .ts --max-warnings=0 --no-error-on-unmatched-pattern",
"start": "next start"
}
}
1 change: 1 addition & 0 deletions packages/internal/dex/sdk/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const config: Config = {
},
coveragePathIgnorePatterns:['node_modules', 'src/contracts/', 'src/test/'],
transformIgnorePatterns: [],
modulePathIgnorePatterns: ['<rootDir>/.yalc'],
};

export default config;
Loading

0 comments on commit 8b1ceba

Please sign in to comment.