From b3ecd1b6b75e5344bbf5016e5c857fd12b393652 Mon Sep 17 00:00:00 2001 From: urnotsam Date: Sun, 29 Dec 2024 09:19:26 -0500 Subject: [PATCH 1/8] add release commands --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f7d225e..af9a2a9 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,13 @@ "description": "The Shardus command line tool.", "main": "index.js", "scripts": { - "release": "np --no-cleanup --no-tests --no-yarn", "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint", - "format-check": "prettier --check '**.js'" + "format-check": "prettier --check '**.js'", + "release:prerelease": "npm version prerelease --preid=prerelease && git push --follow-tags && npm publish --tag prerelease", + "release:patch": "npm version patch && git push --follow-tags && npm publish", + "release:minor": "npm version minor && git push --follow-tags && npm publish", + "release:major": "npm version major && git push --follow-tags && npm publish" }, "repository": { "type": "git", From 2c0899e1fee9149417d1812c4220c974fe0aa7d6 Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Sat, 4 Jan 2025 22:39:01 -0500 Subject: [PATCH 2/8] Fix packages and errors --- .gitignore | 2 +- index.js | 8 ++--- package-lock.json | 90 ++++++++++++++++++++++++++++++++++------------- package.json | 10 ++++-- tsconfig.json | 19 ++++++++++ 5 files changed, 96 insertions(+), 33 deletions(-) create mode 100644 tsconfig.json diff --git a/.gitignore b/.gitignore index a5f87c7..dd87e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ node_modules -result +build diff --git a/index.js b/index.js index c0f05d3..f7c30e6 100644 --- a/index.js +++ b/index.js @@ -3,11 +3,11 @@ const shardusDebug = require('@shardus/debug-tool') module.exports = { register: { - network: ...shardusNetwork.register, - debug: ...shardusDebug.register + network: shardusNetwork.register, + debug: shardusDebug.register }, lib: { - network: ...shardusNetwork.lib, - debug: ...shardusDebug.lib + network: shardusNetwork.lib, + debug: shardusDebug.lib } } diff --git a/package-lock.json b/package-lock.json index 9d372af..c0c3bb6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { - "name": "shardus", + "name": "@shardeum-foundation/tools-shardus-cli", "version": "4.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "shardus", + "name": "@shardeum-foundation/tools-shardus-cli", "version": "4.3.0", "license": "ISC", "dependencies": { - "@shardus/debug-tool": "git+https://github.com/shardeum/tools-shardus-cli-debugger#v1.0.2", - "@shardus/network-tool": "git+https://github.com/shardeum/tools-cli-shardus-network#v4.4.0", + "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", + "@shardeum-foundation/tools-shardus-cli-network": "4.4.0", "caporal": "1.4.0", "eslint": "8.43.0", "shelljs": "0.8.5" @@ -19,11 +19,13 @@ "shardus": "bin/index.js" }, "devDependencies": { + "@types/node": "18.19.1", "eslint-config-prettier": "8.8.0", "eslint-plugin-security": "1.7.1", "np": "8.0.4", "prettier": "2.7.1", - "standard": "13.1.0" + "standard": "13.1.0", + "typescript": "5.7.2" }, "engines": { "node": "18.19.1" @@ -497,13 +499,13 @@ } } }, - "node_modules/@shardus/debug-tool": { + "node_modules/@shardeum-foundation/tools-shardus-cli-debugger": { "version": "1.0.2", - "resolved": "git+ssh://git@github.com/shardeum/tools-shardus-cli-debugger.git#1a5c8fd69dea94a9b678fb33e81fde85eb7f71e5", - "license": "ISC", + "resolved": "https://registry.npmjs.org/@shardeum-foundation/tools-shardus-cli-debugger/-/tools-shardus-cli-debugger-1.0.2.tgz", + "integrity": "sha512-Vzd8wlHRiFEc7Yp4taHOzftVSex/db6jeLQfMEeUtlqiVWtwtxoFAVz5oKLCDKcdAFAenC0DgmEBF5HZtatG0g==", "dependencies": { - "caporal": "^1.3.0", - "eslint": "^8.43.0", + "caporal": "1.3.0", + "eslint": "8.43.0", "got": "11.8.5", "tar": "4.4.18" }, @@ -511,23 +513,40 @@ "shardus-debug": "bin/index.js" } }, - "node_modules/@shardus/network-tool": { + "node_modules/@shardeum-foundation/tools-shardus-cli-debugger/node_modules/caporal": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/caporal/-/caporal-1.3.0.tgz", + "integrity": "sha512-4bj21UXbEu5cF+1gVjhwwRqMhY3lR7CUTlBr6YX3uzftL4l/sbu8EoHfOLZWHr+HeiosW9fTWkQCS2UZMAk5lw==", + "hasInstallScript": true, + "dependencies": { + "bluebird": "^3.4.7", + "cli-table3": "^0.5.0", + "colorette": "^1.0.1", + "fast-levenshtein": "^2.0.6", + "lodash": "^4.17.14", + "micromist": "1.1.0", + "prettyjson": "^1.2.1", + "tabtab": "^2.2.2", + "winston": "^2.3.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@shardeum-foundation/tools-shardus-cli-network": { "version": "4.4.0", - "resolved": "git+ssh://git@github.com/shardeum/tools-cli-shardus-network.git#74c80475e601f574edce72c842c80df50067caed", - "license": "MIT", + "resolved": "https://registry.npmjs.org/@shardeum-foundation/tools-shardus-cli-network/-/tools-shardus-cli-network-4.4.0.tgz", + "integrity": "sha512-oqoQvSh3uf8Y7nGUlSrQFKULRDSkeskjdfNoocpQ6R1+Acfvt+YoZt2fEaubaz4FwuxvrINPEs3FMay8cTUwKw==", "dependencies": { - "caporal": "^1.3.0", - "execa": "^3.2.0", - "inquirer": "^6.3.1", - "lodash": "^4.17.15", - "pm2": "git+https://github.com/theDigg/pm2#count-exit-errors", - "shelljs": "^0.8.3" + "caporal": "1.4.0", + "execa": "3.4.0", + "inquirer": "6.5.2", + "lodash": "4.17.21", + "pm2": "git+https://github.com/theDigg/pm2.git#count-exit-errors", + "shelljs": "0.8.5" }, "bin": { "shardus-network": "bin/index.js" - }, - "engines": { - "node": ">=18.16.1 <19.0.0" } }, "node_modules/@sindresorhus/is": { @@ -588,9 +607,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.4.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.5.tgz", - "integrity": "sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==" + "version": "18.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.1.tgz", + "integrity": "sha512-mZJ9V11gG5Vp0Ox2oERpeFDl+JvCwK24PGy76vVY/UgBtjwJWc5rYBThFxmbnYOm9UPZNm6wEl/sxHt2SU7x9A==", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/normalize-package-data": { "version": "2.4.1", @@ -10085,6 +10107,19 @@ "types-json": "^1.2.2" } }, + "node_modules/typescript": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", + "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", @@ -10100,6 +10135,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, "node_modules/uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", diff --git a/package.json b/package.json index af9a2a9..8e62b67 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "shardus", + "name": "@shardeum-foundation/tools-shardus-cli", "version": "4.3.0", "description": "The Shardus command line tool.", "main": "index.js", @@ -7,6 +7,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "lint": "eslint", "format-check": "prettier --check '**.js'", + "compile": "tsc -p .", + "prepare": "npm run compile", "release:prerelease": "npm version prerelease --preid=prerelease && git push --follow-tags && npm publish --tag prerelease", "release:patch": "npm version patch && git push --follow-tags && npm publish", "release:minor": "npm version minor && git push --follow-tags && npm publish", @@ -25,14 +27,16 @@ "author": "Shardus", "license": "ISC", "dependencies": { - "@shardus/debug-tool": "git+https://github.com/shardeum/tools-shardus-cli-debugger#v1.0.2", - "@shardus/network-tool": "git+https://github.com/shardeum/tools-cli-shardus-network#v4.4.0", + "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", + "@shardeum-foundation/tools-shardus-cli-network": "4.4.0", "caporal": "1.4.0", "shelljs": "0.8.5", "eslint": "8.43.0" }, "devDependencies": { "standard": "13.1.0", + "@types/node": "18.19.1", + "typescript": "5.7.2", "eslint-config-prettier": "8.8.0", "eslint-plugin-security": "1.7.1", "prettier": "2.7.1", diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..56a14b9 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "lib": ["ES2021"], + "module": "commonjs", + "target": "ES2021", + "allowJs": true, + "strict": false, + "noImplicitAny": false, + "strictNullChecks": false, + "noImplicitReturns": false, + "noImplicitThis": false, + "esModuleInterop": true + }, + "exclude": ["build", "node_modules"], + "include": ["*.ts", "*.js"], + "allowSyntheticDefaultImports": true +} From e6870b34ca70428ba6e4b883ce2e95fe62516e54 Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Sun, 5 Jan 2025 20:16:58 -0500 Subject: [PATCH 3/8] publishconfig --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 8e62b67..f9338f3 100644 --- a/package.json +++ b/package.json @@ -41,5 +41,8 @@ "eslint-plugin-security": "1.7.1", "prettier": "2.7.1", "np": "8.0.4" + }, + "publishConfig": { + "access": "public" } } From 6fd5670e42c219a9c68423c4bcb533775e2d898b Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Mon, 6 Jan 2025 02:11:43 -0500 Subject: [PATCH 4/8] Update old shardus refs --- bin/index.js | 4 ++-- index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/index.js b/bin/index.js index 51a3482..f8744b4 100755 --- a/bin/index.js +++ b/bin/index.js @@ -1,8 +1,8 @@ #!/usr/bin/env node const prog = require('caporal') -const shardusNetwork = require('@shardus/network-tool') -const shardusDebug = require('@shardus/debug-tool') +const shardusNetwork = require('@shardeum-foundation/tools-shardus-cli-network') +const shardusDebug = require('@shardeum-foundation/tools-shardus-cli-debugger') const packageJson = require('../package.json') prog diff --git a/index.js b/index.js index f7c30e6..e1e17b5 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ -const shardusNetwork = require('@shardus/network-tool') -const shardusDebug = require('@shardus/debug-tool') +const shardusNetwork = require('@shardeum-foundation/tools-shardus-cli-network') +const shardusDebug = require('@shardeum-foundation/tools-shardus-cli-debugger') module.exports = { register: { From 30c4f10e9f04d8fe174943b83edd3ba695f5e259 Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:33:49 -0500 Subject: [PATCH 5/8] 4.3.1-prerelease.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0c3bb6..8c55f30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.0", + "version": "4.3.1-prerelease.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.0", + "version": "4.3.1-prerelease.0", "license": "ISC", "dependencies": { "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", diff --git a/package.json b/package.json index f9338f3..edca58f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.0", + "version": "4.3.1-prerelease.0", "description": "The Shardus command line tool.", "main": "index.js", "scripts": { From 55e6dee5f3d74552b1a9c413162cd3e57cfcdd2f Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:56:18 -0500 Subject: [PATCH 6/8] Update packages --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8c55f30..51ae82a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", - "@shardeum-foundation/tools-shardus-cli-network": "4.4.0", + "@shardeum-foundation/tools-shardus-cli-network": "4.4.1-prerelease.0", "caporal": "1.4.0", "eslint": "8.43.0", "shelljs": "0.8.5" @@ -534,9 +534,9 @@ } }, "node_modules/@shardeum-foundation/tools-shardus-cli-network": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@shardeum-foundation/tools-shardus-cli-network/-/tools-shardus-cli-network-4.4.0.tgz", - "integrity": "sha512-oqoQvSh3uf8Y7nGUlSrQFKULRDSkeskjdfNoocpQ6R1+Acfvt+YoZt2fEaubaz4FwuxvrINPEs3FMay8cTUwKw==", + "version": "4.4.1-prerelease.0", + "resolved": "https://registry.npmjs.org/@shardeum-foundation/tools-shardus-cli-network/-/tools-shardus-cli-network-4.4.1-prerelease.0.tgz", + "integrity": "sha512-mcuGVvQrQ+J6E3nx3S7J+8WpTaTwRwR17xmEMifT19kzv8/rHoGzyyUBGR59tPEnwwEhEfY1dP7t9B+f8TYjUg==", "dependencies": { "caporal": "1.4.0", "execa": "3.4.0", diff --git a/package.json b/package.json index edca58f..ebf824d 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "license": "ISC", "dependencies": { "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", - "@shardeum-foundation/tools-shardus-cli-network": "4.4.0", + "@shardeum-foundation/tools-shardus-cli-network": "4.4.1-prerelease.0", "caporal": "1.4.0", "shelljs": "0.8.5", "eslint": "8.43.0" From 659d4a7700b390b43b1fd0c8e691a852a51a9114 Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Mon, 6 Jan 2025 13:56:37 -0500 Subject: [PATCH 7/8] 4.3.1-prerelease.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 51ae82a..3055330 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.0", + "version": "4.3.1-prerelease.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.0", + "version": "4.3.1-prerelease.1", "license": "ISC", "dependencies": { "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", diff --git a/package.json b/package.json index ebf824d..95aabcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.0", + "version": "4.3.1-prerelease.1", "description": "The Shardus command line tool.", "main": "index.js", "scripts": { From f4dd0ed6f011ea56e58c37fd4316f75ecc820dbc Mon Sep 17 00:00:00 2001 From: mhanson <3117293+mhanson-github@users.noreply.github.com> Date: Mon, 6 Jan 2025 21:36:22 -0500 Subject: [PATCH 8/8] 4.3.1-prerelease.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3055330..c19d327 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.1", + "version": "4.3.1-prerelease.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.1", + "version": "4.3.1-prerelease.2", "license": "ISC", "dependencies": { "@shardeum-foundation/tools-shardus-cli-debugger": "1.0.2", diff --git a/package.json b/package.json index 95aabcb..553218b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shardeum-foundation/tools-shardus-cli", - "version": "4.3.1-prerelease.1", + "version": "4.3.1-prerelease.2", "description": "The Shardus command line tool.", "main": "index.js", "scripts": {