diff --git a/core/api/Makefile b/core/api/Makefile index 6ff263c638..c7aef74100 100644 --- a/core/api/Makefile +++ b/core/api/Makefile @@ -10,23 +10,23 @@ update-price-history: docker compose run price-history node servers/history/cron.js start-main: - . ./.env && yarn tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ - src/servers/graphql-main-server.ts | yarn pino-pretty -c -l + . ./.env && pnpm tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ + src/servers/graphql-main-server.ts | pnpm pino-pretty -c -l start-main-fast: - yarn run watch-main | yarn pino-pretty -c -l + pnpm run watch-main | pnpm pino-pretty -c -l start-trigger: - . ./.env && yarn tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ - src/servers/trigger.ts | yarn pino-pretty -c -l + . ./.env && pnpm tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ + src/servers/trigger.ts | pnpm pino-pretty -c -l start-cron: start-deps - . ./.env && yarn tsnd --files -r tsconfig-paths/register -r src/services/tracing.ts \ - src/servers/cron.ts | yarn pino-pretty -c -l + . ./.env && pnpm tsnd --files -r tsconfig-paths/register -r src/services/tracing.ts \ + src/servers/cron.ts | pnpm pino-pretty -c -l start-ws: - . ./.env && yarn tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ - src/servers/ws-server.ts | yarn pino-pretty -c -l + . ./.env && pnpm tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ + src/servers/ws-server.ts | pnpm pino-pretty -c -l start-loopd: ./dev/bin/start-loopd.sh @@ -44,11 +44,11 @@ start-ws-ci: node dist/servers/ws-server.js exporter: start-deps - . ./.env && yarn tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ - src/servers/exporter.ts | yarn pino-pretty -c -l + . ./.env && pnpm tsnd --respawn --files -r tsconfig-paths/register -r src/services/tracing.ts \ + src/servers/exporter.ts | pnpm pino-pretty -c -l watch: - yarn nodemon -V -e ts,graphql -w ./src -x make start + pnpm nodemon -V -e ts,graphql -w ./src -x make start clean-deps: docker compose down -t 3 @@ -64,7 +64,7 @@ test-migrate: docker compose -f docker-compose.yml up mongodb-migrate --exit-code-from mongodb-migrate unit: - yarn test:unit + pnpm run test:unit watch-unit: $(BIN_DIR)/jest --config ./test/unit/jest.config.js --clearCache @@ -77,27 +77,27 @@ del-containers: docker compose rm -sfv legacy-integration: - yarn build && \ - yarn test:legacy-integration + pnpm run build && \ + pnpm run test:legacy-integration reset-legacy-integration: reset-deps-integration legacy-integration integration: - yarn build && \ - yarn test:integration + pnpm run build && \ + pnpm run test:integration reset-integration: reset-deps-integration integration bats: - yarn build && \ + pnpm run build && \ bats -t test/bats reset-bats: reset-deps bats execute-bats-from-within-container: git config --global --add safe.directory /repo # otherwise bats complains - yarn install && \ - yarn build && \ + pnpm install --frozen-lockfile && \ + pnpm run build && \ bats -t test/bats integration-in-ci: @@ -107,7 +107,7 @@ integration-in-ci: # NODE_OPTIONS line should be removed whenever we upgrade yarn.lock to see if # heap allocation issue has been resolved in dependencies (fails at 2048). execute-integration-from-within-container: - yarn install && \ + pnpm run install --frozen-lockfile && \ SVIX_ENDPOINT= \ SVIX_SECRET= \ NODE_OPTIONS="--max-old-space-size=6144" \ @@ -120,7 +120,7 @@ unit-in-ci: LOGLEVEL=warn $(BIN_DIR)/jest --config ./test/unit/jest.config.js --ci --bail --maxWorkers=50% check-implicit: - yarn tsc-check-noimplicitany + pnpm run tsc-check-noimplicitany check-code: check-implicit pnpm run tsc-check @@ -159,7 +159,7 @@ redis-flush: docker-compose exec redis redis-cli FLUSHDB codegen: - yarn write-sdl + pnpm run write-sdl gen-test-jwt: - yarn gen-test-jwt + pnpm run gen-test-jwt diff --git a/core/api/dev/apollo-federation/README.md b/core/api/dev/apollo-federation/README.md index 692b4d1a41..13d043b1fd 100644 --- a/core/api/dev/apollo-federation/README.md +++ b/core/api/dev/apollo-federation/README.md @@ -2,7 +2,7 @@ To generate the supergraph you need to run: ``` -$ yarn write-sdl +$ pnpm run write-sdl ``` which executes: diff --git a/core/api/package.json b/core/api/package.json index 9bf133e791..e4b88ee7cb 100644 --- a/core/api/package.json +++ b/core/api/package.json @@ -8,25 +8,25 @@ "eslint-check": "eslint src test --ext .ts", "eslint-fix": "eslint src test --ext .ts --fix", "build": "tsc -p tsconfig-build.json && cp -R src/services/price/protos dist/services/price/ && cp -R src/services/dealer-price/proto dist/services/dealer-price/ && cp -R src/services/loopd/protos dist/services/loopd/ && cp -R src/services/bria/proto dist/services/bria/ && tscpaths --silent -p tsconfig.json -s ./src -o ./dist", - "trigger": "yarn build && node dist/servers/trigger.js | pino-pretty -c -l", + "trigger": "pnpm run build && node dist/servers/trigger.js | pino-pretty -c -l", "check:sdl": ". ../../.env && pnpm run write-sdl && if git diff --name-only | grep -q 'core/api/src/graphql/admin/schema.graphql'; then echo 'Error: core/api/src/graphql/admin/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi && if git diff --name-only | grep -q 'core/api/src/graphql/public/schema.graphql'; then echo 'Error: core/api/src/graphql/public/schema.graphql has changes, run `make codegen` and re-recommit' >&2; exit 1; fi", "write-sdl": "pnpm run build && node dist/servers/write-sdl.js write-sdl.yaml && rover supergraph compose --config dev/apollo-federation/supergraph-config.yaml --elv2-license accept > dev/apollo-federation/supergraph.graphql", - "ws": "yarn build && node dist/servers/ws-server.js | pino-pretty -c -l", - "watch": "nodemon -V -e ts,graphql -w ./src -x yarn run start", - "watch-trigger": "nodemon -V -e ts,graphql -w ./src -x yarn trigger", + "ws": "pnpm run build && node dist/servers/ws-server.js | pino-pretty -c -l", + "watch": "nodemon -V -e ts,graphql -w ./src -x pnpm run start", + "watch-trigger": "nodemon -V -e ts,graphql -w ./src -x pnpm run trigger", "graphql-check": "curl -fsS https://raw.githubusercontent.com/GaloyMoney/galoy-mobile/main/app/graphql/generated.gql -o generated.gql && npx @graphql-inspector/cli validate ./generated.gql src/graphql/public/schema.graphql --apollo --noStrictFragments", - "cron": ". ../../.env && yarn build && node dist/servers/cron.js", - "exporter": "yarn build && node dist/servers/exporter.js", - "daily-notif": "yarn build && node dist/servers/daily-balance-notification.js", + "cron": ". ../../.env && pnpm run build && node dist/servers/cron.js", + "exporter": "pnpm run build && node dist/servers/exporter.js", + "daily-notif": "pnpm run build && node dist/servers/daily-balance-notification.js", "test": "export JEST_JUNIT_OUTPUT_DIR=\"./artifacts\" && jest --ci --reporters=default --reporters=jest-junit", - "test:unit": ". ../../.env && LOGLEVEL=warn jest --config ./test/unit/jest.config.js --bail --verbose $TEST | yarn pino-pretty -c -l", - "test:legacy-integration": ". ../../.env && LOGLEVEL=warn jest --config ./test/legacy-integration/jest.config.js --bail --runInBand --verbose $TEST | yarn pino-pretty -c -l", - "test:integration": ". ../../.env && LOGLEVEL=warn jest --config ./test/integration/jest.config.js --bail --runInBand --verbose $TEST | yarn pino-pretty -c -l", + "test:unit": ". ../../.env && LOGLEVEL=warn jest --config ./test/unit/jest.config.js --bail --verbose $TEST | pnpm pino-pretty -c -l", + "test:legacy-integration": ". ../../.env && LOGLEVEL=warn jest --config ./test/legacy-integration/jest.config.js --bail --runInBand --verbose $TEST | pnpm pino-pretty -c -l", + "test:integration": ". ../../.env && LOGLEVEL=warn jest --config ./test/integration/jest.config.js --bail --runInBand --verbose $TEST | pnpm pino-pretty -c -l", "build-docs": "npx spectaql spectaql-config.yml -1", "fix-yaml": "prettier --write '**/*.(yaml|yml)'", "check-yaml": "prettier --check '**/*.(yaml|yml)'", - "watch-main": ". ../../.env && nodemon -V -e ts,graphql -w ./src --exec yarn run start-main", - "start-main": ". ../../.env && yarn run build && node --inspect -r ./dist/services/tracing.js ./dist/servers/graphql-main-server.js", + "watch-main": ". ../../.env && nodemon -V -e ts,graphql -w ./src --exec pnpm run start-main", + "start-main": ". ../../.env && pnpm run build && node --inspect -r ./dist/services/tracing.js ./dist/servers/graphql-main-server.js", "migrate-mongo-up": "migrate-mongo up -f './src/migrations/migrate-mongo-config.js'", "gen-test-jwt": "ts-node dev/bin/gen-test-jwt.ts" }, diff --git a/flake.nix b/flake.nix index 7ba50c6fbf..0f670e5bc1 100644 --- a/flake.nix +++ b/flake.nix @@ -25,9 +25,6 @@ (self: super: { nodejs = super.nodejs_20; pnpm = super.nodePackages.pnpm; - yarn = super.yarn.override { - nodejs = super.nodejs_20; - }; }) ]; pkgs = import nixpkgs {inherit overlays system;}; @@ -47,7 +44,6 @@ envsubst nodejs tilt-pin.tilt - yarn typescript bats postgresql