From 4fe1bc8ac82c855d09fd19a9a1bb9516a9602941 Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Wed, 4 Dec 2024 14:43:35 +0100 Subject: [PATCH 1/6] Follow root level naming convention as proposed in #977 --- package.json | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1c49c957f..9b8a4d945 100644 --- a/package.json +++ b/package.json @@ -9,22 +9,29 @@ ] }, "scripts": { - "account": "yarn workspace @se-2/hardhat account", - "account:import": "yarn workspace @se-2/hardhat account:import", - "account:generate": "yarn workspace @se-2/hardhat account:generate", - "chain": "yarn workspace @se-2/hardhat chain", - "fork": "yarn workspace @se-2/hardhat fork", - "deploy": "yarn workspace @se-2/hardhat deploy", - "verify": "yarn workspace @se-2/hardhat verify", - "hardhat-verify": "yarn workspace @se-2/hardhat hardhat-verify", - "compile": "yarn workspace @se-2/hardhat compile", - "generate": "yarn account:generate", - "flatten": "yarn workspace @se-2/hardhat flatten", + "account": "echo 'DEPRECATED: use yarn hardhat:account instead' && yarn hardhat:account", + "chain": "yarn hardhat:chain", + "fork": "echo 'DEPRECATED: use yarn hardhat:fork instead' && yarn hardhat:fork", + "deploy": "yarn hardhat:deploy", + "verify": "echo 'DEPRECATED: use yarn hardhat:verify instead' && yarn hardhat:verify", + "hardhat-verify": "echo 'DEPRECATED: use yarn hardhat:hardhat-verify instead' && yarn hardhat:hardhat-verify", + "compile": "echo 'DEPRECATED: use yarn hardhat:compile instead' && yarn hardhat:compile", + "generate": "echo 'DEPRECATED: use yarn hardhat:generate instead' && yarn hardhat:generate", + "flatten": "echo 'DEPRECATED: use yarn hardhat:flatten instead' && yarn hardhat:flatten", + "hardhat:account": "yarn workspace @se-2/hardhat account", + "hardhat:chain": "yarn workspace @se-2/hardhat chain", + "hardhat:compile": "yarn workspace @se-2/hardhat compile", + "hardhat:deploy": "yarn workspace @se-2/hardhat deploy", + "hardhat:fork": "yarn workspace @se-2/hardhat fork", + "hardhat:generate": "yarn workspace @se-2/hardhat generate", + "hardhat:flatten": "yarn workspace @se-2/hardhat flatten", + "hardhat:hardhat-verify": "yarn workspace @se-2/hardhat hardhat-verify", "hardhat:lint": "yarn workspace @se-2/hardhat lint", "hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged", "hardhat:format": "yarn workspace @se-2/hardhat format", "hardhat:check-types": "yarn workspace @se-2/hardhat check-types", "hardhat:test": "yarn workspace @se-2/hardhat test", + "hardhat:verify": "yarn workspace @se-2/hardhat verify", "test": "yarn hardhat:test", "format": "yarn next:format && yarn hardhat:format", "start": "yarn workspace @se-2/nextjs dev", From d9d8e3478457e2c58531273cd0b0f2a642e3eb00 Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Wed, 4 Dec 2024 15:12:19 +0100 Subject: [PATCH 2/6] Sort lines ascending in package.json --- package.json | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 9b8a4d945..78334bdb2 100644 --- a/package.json +++ b/package.json @@ -11,39 +11,39 @@ "scripts": { "account": "echo 'DEPRECATED: use yarn hardhat:account instead' && yarn hardhat:account", "chain": "yarn hardhat:chain", - "fork": "echo 'DEPRECATED: use yarn hardhat:fork instead' && yarn hardhat:fork", - "deploy": "yarn hardhat:deploy", - "verify": "echo 'DEPRECATED: use yarn hardhat:verify instead' && yarn hardhat:verify", - "hardhat-verify": "echo 'DEPRECATED: use yarn hardhat:hardhat-verify instead' && yarn hardhat:hardhat-verify", "compile": "echo 'DEPRECATED: use yarn hardhat:compile instead' && yarn hardhat:compile", - "generate": "echo 'DEPRECATED: use yarn hardhat:generate instead' && yarn hardhat:generate", + "deploy": "yarn hardhat:deploy", "flatten": "echo 'DEPRECATED: use yarn hardhat:flatten instead' && yarn hardhat:flatten", + "fork": "echo 'DEPRECATED: use yarn hardhat:fork instead' && yarn hardhat:fork", + "format": "yarn next:format && yarn hardhat:format", + "generate": "echo 'DEPRECATED: use yarn hardhat:generate instead' && yarn hardhat:generate", + "hardhat-verify": "echo 'DEPRECATED: use yarn hardhat:hardhat-verify instead' && yarn hardhat:hardhat-verify", "hardhat:account": "yarn workspace @se-2/hardhat account", "hardhat:chain": "yarn workspace @se-2/hardhat chain", + "hardhat:check-types": "yarn workspace @se-2/hardhat check-types", "hardhat:compile": "yarn workspace @se-2/hardhat compile", "hardhat:deploy": "yarn workspace @se-2/hardhat deploy", + "hardhat:flatten": "yarn workspace @se-2/hardhat flatten", "hardhat:fork": "yarn workspace @se-2/hardhat fork", + "hardhat:format": "yarn workspace @se-2/hardhat format", "hardhat:generate": "yarn workspace @se-2/hardhat generate", - "hardhat:flatten": "yarn workspace @se-2/hardhat flatten", "hardhat:hardhat-verify": "yarn workspace @se-2/hardhat hardhat-verify", - "hardhat:lint": "yarn workspace @se-2/hardhat lint", "hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged", - "hardhat:format": "yarn workspace @se-2/hardhat format", - "hardhat:check-types": "yarn workspace @se-2/hardhat check-types", + "hardhat:lint": "yarn workspace @se-2/hardhat lint", "hardhat:test": "yarn workspace @se-2/hardhat test", "hardhat:verify": "yarn workspace @se-2/hardhat verify", - "test": "yarn hardhat:test", - "format": "yarn next:format && yarn hardhat:format", - "start": "yarn workspace @se-2/nextjs dev", - "next:lint": "yarn workspace @se-2/nextjs lint", - "next:format": "yarn workspace @se-2/nextjs format", - "next:check-types": "yarn workspace @se-2/nextjs check-types", "next:build": "yarn workspace @se-2/nextjs build", + "next:check-types": "yarn workspace @se-2/nextjs check-types", + "next:format": "yarn workspace @se-2/nextjs format", + "next:lint": "yarn workspace @se-2/nextjs lint", "next:serve": "yarn workspace @se-2/nextjs serve", "postinstall": "husky", "precommit": "lint-staged", + "start": "yarn workspace @se-2/nextjs dev", + "test": "yarn hardhat:test", + "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", "vercel": "yarn workspace @se-2/nextjs vercel", - "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo" + "verify": "echo 'DEPRECATED: use yarn hardhat:verify instead' && yarn hardhat:verify" }, "packageManager": "yarn@3.2.3", "devDependencies": { From 44d8250d97e91cbb3c4c95e75674474bf822192c Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Thu, 5 Dec 2024 16:39:44 +0100 Subject: [PATCH 3/6] Remove messagaes and add more commands to happy path --- package.json | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 78334bdb2..b9a8b0b25 100644 --- a/package.json +++ b/package.json @@ -9,15 +9,12 @@ ] }, "scripts": { - "account": "echo 'DEPRECATED: use yarn hardhat:account instead' && yarn hardhat:account", + "account": "yarn hardhat:account", "chain": "yarn hardhat:chain", - "compile": "echo 'DEPRECATED: use yarn hardhat:compile instead' && yarn hardhat:compile", "deploy": "yarn hardhat:deploy", - "flatten": "echo 'DEPRECATED: use yarn hardhat:flatten instead' && yarn hardhat:flatten", - "fork": "echo 'DEPRECATED: use yarn hardhat:fork instead' && yarn hardhat:fork", + "fork": "yarn hardhat:fork", "format": "yarn next:format && yarn hardhat:format", - "generate": "echo 'DEPRECATED: use yarn hardhat:generate instead' && yarn hardhat:generate", - "hardhat-verify": "echo 'DEPRECATED: use yarn hardhat:hardhat-verify instead' && yarn hardhat:hardhat-verify", + "generate": "yarn hardhat:generate", "hardhat:account": "yarn workspace @se-2/hardhat account", "hardhat:chain": "yarn workspace @se-2/hardhat chain", "hardhat:check-types": "yarn workspace @se-2/hardhat check-types", @@ -43,7 +40,7 @@ "test": "yarn hardhat:test", "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", "vercel": "yarn workspace @se-2/nextjs vercel", - "verify": "echo 'DEPRECATED: use yarn hardhat:verify instead' && yarn hardhat:verify" + "verify": "yarn hardhat:verify" }, "packageManager": "yarn@3.2.3", "devDependencies": { From c2a216d6e0c308998fe7207e9d16ca0389379421 Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Thu, 5 Dec 2024 19:42:38 +0100 Subject: [PATCH 4/6] Add global lint command & happy path compile --- package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9a8b0b25..8ad90f1dc 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "scripts": { "account": "yarn hardhat:account", "chain": "yarn hardhat:chain", + "compile": "yarn hardhat:compile", "deploy": "yarn hardhat:deploy", "fork": "yarn hardhat:fork", "format": "yarn next:format && yarn hardhat:format", @@ -25,10 +26,11 @@ "hardhat:format": "yarn workspace @se-2/hardhat format", "hardhat:generate": "yarn workspace @se-2/hardhat generate", "hardhat:hardhat-verify": "yarn workspace @se-2/hardhat hardhat-verify", - "hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged", "hardhat:lint": "yarn workspace @se-2/hardhat lint", + "hardhat:lint-staged": "yarn workspace @se-2/hardhat lint-staged", "hardhat:test": "yarn workspace @se-2/hardhat test", "hardhat:verify": "yarn workspace @se-2/hardhat verify", + "lint": "yarn nextjs:lint && yarn hardhat:lint", "next:build": "yarn workspace @se-2/nextjs build", "next:check-types": "yarn workspace @se-2/nextjs check-types", "next:format": "yarn workspace @se-2/nextjs format", @@ -38,8 +40,8 @@ "precommit": "lint-staged", "start": "yarn workspace @se-2/nextjs dev", "test": "yarn hardhat:test", - "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", "vercel": "yarn workspace @se-2/nextjs vercel", + "vercel:yolo": "yarn workspace @se-2/nextjs vercel:yolo", "verify": "yarn hardhat:verify" }, "packageManager": "yarn@3.2.3", From 1b5a4814711ab49c00f9f3207b7ba7911c729927 Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Wed, 11 Dec 2024 14:47:16 +0100 Subject: [PATCH 5/6] Sort lines also in packages/**/package.json --- packages/hardhat/package.json | 14 ++++++++++---- packages/nextjs/package.json | 10 +++++----- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index 22184d753..8e75e1b73 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -8,16 +8,22 @@ "chain": "hardhat node --network hardhat --no-deploy", "check-types": "tsc --noEmit --incremental", "compile": "hardhat compile", - "deploy": "ts-node scripts/runHardhatDeployWithPK.ts", +<<<<<<< HEAD + "fork": "MAINNET_FORKING_ENABLED=true hardhat node --network hardhat --no-deploy", "generate": "yarn account:generate", +======= + "deploy": "ts-node scripts/runHardhatDeployWithPK.ts", +>>>>>>> 5a7efa7 (Sort lines also in packages/**/package.json) "flatten": "hardhat flatten", + "fork": "MAINNET_FORKING_ENABLED=true hardhat node --network hardhat --no-deploy", + "format": "prettier --write './**/*.(ts|sol)'", + "generate": "hardhat run scripts/generateAccount.ts", + "hardhat-verify": "hardhat verify", "lint": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts", "lint-staged": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore", - "format": "prettier --write './**/*.(ts|sol)'", "test": "REPORT_GAS=true hardhat test --network hardhat", - "verify": "hardhat etherscan-verify", - "hardhat-verify": "hardhat verify" + "verify": "hardhat etherscan-verify" }, "devDependencies": { "@ethersproject/abi": "^5.7.0", diff --git a/packages/nextjs/package.json b/packages/nextjs/package.json index 8bb2576e2..523431a93 100644 --- a/packages/nextjs/package.json +++ b/packages/nextjs/package.json @@ -3,13 +3,13 @@ "private": true, "version": "0.1.0", "scripts": { - "dev": "next dev", - "start": "next dev", "build": "next build", - "serve": "next start", - "lint": "next lint", - "format": "prettier --write . '!(node_modules|.next|contracts)/**/*'", "check-types": "tsc --noEmit --incremental", + "dev": "next dev", + "format": "prettier --write . '!(node_modules|.next|contracts)/**/*'", + "lint": "next lint", + "serve": "next start", + "start": "next dev", "vercel": "vercel --build-env YARN_ENABLE_IMMUTABLE_INSTALLS=false --build-env ENABLE_EXPERIMENTAL_COREPACK=1", "vercel:yolo": "vercel --build-env YARN_ENABLE_IMMUTABLE_INSTALLS=false --build-env ENABLE_EXPERIMENTAL_COREPACK=1 --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true" }, From 2c16b7efdf9af85aec691896d683f428a00af2e7 Mon Sep 17 00:00:00 2001 From: Simon Emanuel Schmid Date: Wed, 11 Dec 2024 14:56:01 +0100 Subject: [PATCH 6/6] Backport command changes from 8c65441 --- package.json | 4 +++- packages/hardhat/package.json | 10 ++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 8ad90f1dc..e0021a6d5 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,14 @@ }, "scripts": { "account": "yarn hardhat:account", + "account:import": "yarn workspace @se-2/hardhat account:import", + "account:generate": "yarn workspace @se-2/hardhat account:generate", "chain": "yarn hardhat:chain", "compile": "yarn hardhat:compile", "deploy": "yarn hardhat:deploy", "fork": "yarn hardhat:fork", "format": "yarn next:format && yarn hardhat:format", - "generate": "yarn hardhat:generate", + "generate": "yarn account:generate", "hardhat:account": "yarn workspace @se-2/hardhat account", "hardhat:chain": "yarn workspace @se-2/hardhat chain", "hardhat:check-types": "yarn workspace @se-2/hardhat check-types", diff --git a/packages/hardhat/package.json b/packages/hardhat/package.json index 8e75e1b73..94e824092 100644 --- a/packages/hardhat/package.json +++ b/packages/hardhat/package.json @@ -3,22 +3,16 @@ "version": "0.0.1", "scripts": { "account": "hardhat run scripts/listAccount.ts", - "account:import": "hardhat run scripts/importAccount.ts", "account:generate": "hardhat run scripts/generateAccount.ts", + "account:import": "hardhat run scripts/importAccount.ts", "chain": "hardhat node --network hardhat --no-deploy", "check-types": "tsc --noEmit --incremental", "compile": "hardhat compile", -<<<<<<< HEAD - - "fork": "MAINNET_FORKING_ENABLED=true hardhat node --network hardhat --no-deploy", - "generate": "yarn account:generate", -======= "deploy": "ts-node scripts/runHardhatDeployWithPK.ts", ->>>>>>> 5a7efa7 (Sort lines also in packages/**/package.json) "flatten": "hardhat flatten", "fork": "MAINNET_FORKING_ENABLED=true hardhat node --network hardhat --no-deploy", "format": "prettier --write './**/*.(ts|sol)'", - "generate": "hardhat run scripts/generateAccount.ts", + "generate": "yarn account:generate", "hardhat-verify": "hardhat verify", "lint": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore ./*.ts ./deploy/**/*.ts ./scripts/**/*.ts ./test/**/*.ts", "lint-staged": "eslint --config ./.eslintrc.json --ignore-path ./.eslintignore",