From e8ab386161e63a21ffd9de1582e95a48f0dee584 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Sat, 23 Sep 2023 21:47:33 -0700 Subject: [PATCH] Replace deprecated repository url setting --- package.json | 12 +++++++----- task-runner.sh.command | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ed5946b..42a523a 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,10 @@ "files": [ "dist" ], - "repository": "github:center-key/hamburger-menu", + "repository": { + "type": "git", + "url": "git+https://github.com/center-key/hamburger-menu.git" + }, "homepage": "https://github.com/center-key/hamburger-menu", "bugs": "https://github.com/center-key/hamburger-menu/issues", "docs": "https://github.com/center-key/hamburger-menu#readme", @@ -62,11 +65,10 @@ "test": "mocha spec/*.spec.js", "interactive": "browser-sync . --startPath docs --files docs" }, - "dependencies": { - }, + "dependencies": {}, "devDependencies": { "@fortawesome/fontawesome-free": "~6.4", - "add-dist-header": "~1.2", + "add-dist-header": "~1.3", "assert-deep-strict-equal": "~1.1", "browser-sync": "~2.29", "copy-file-util": "~1.1", @@ -79,7 +81,7 @@ "rimraf": "~5.0", "run-scripts-util": "~1.2", "uglify-js": "~3.17", - "w3c-html-validator": "~1.4", + "w3c-html-validator": "~1.5", "web-ignition": "~2.0" } } diff --git a/task-runner.sh.command b/task-runner.sh.command index da0a526..e5f1f0f 100755 --- a/task-runner.sh.command +++ b/task-runner.sh.command @@ -30,13 +30,14 @@ setupTools() { releaseInstructions() { cd $projectHome - repository=$(grep repository package.json | awk -F'"' '{print $4}' | sed s/github://) - package=https://raw.githubusercontent.com/$repository/main/package.json + org=$(grep git+https package.json | awk -F'/' '{print $4}') + name=$(grep '"name":' package.json | awk -F'"' '{print $4}') + package=https://raw.githubusercontent.com/$org/$name/main/package.json version=v$(grep '"version"' package.json | awk -F'"' '{print $4}') pushed=v$(curl --silent $package | grep '"version":' | awk -F'"' '{print $4}') minorVersion=$(echo ${pushed:1} | awk -F"." '{ print $1 "." $2 }') released=$(git tag | tail -1) - published=v$(npm view $repository version) + published=v$(npm view $name version) test $? -ne 0 && echo "NOTE: Ignore error if package is not yet published." echo "Local changes:" git status --short