Skip to content

Commit

Permalink
Replace deprecated repository setting in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Sep 24, 2023
1 parent ff91777 commit 1fe913b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 4 additions & 1 deletion hello-world/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"license": "MIT",
"type": "module",
"main": "server.js",
"repository": "github:center-key/hello-world",
"repository": {
"type": "git",
"url": "git+https://github.com/center-key/hello-world.git"
},
"jshintConfig": {
"esversion": 11,
"strict": "implied",
Expand Down
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
},
"./": "./dist/"
},
"repository": "github:center-key/server-listening",
"repository": {
"type": "git",
"url": "git+https://github.com/center-key/server-listening.git"
},
"homepage": "https://github.com/center-key/server-listening",
"bugs": "https://github.com/center-key/server-listening/issues",
"docs": "https://github.com/center-key/server-listening#readme",
Expand Down Expand Up @@ -98,7 +101,7 @@
"assert-deep-strict-equal": "~1.1",
"copy-file-util": "~1.1",
"copy-folder-util": "~1.1",
"eslint": "~8.49",
"eslint": "~8.50",
"fetch-json": "~3.2",
"jshint": "~2.13",
"mocha": "~10.2",
Expand Down
7 changes: 4 additions & 3 deletions task-runner.sh.command
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,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
Expand Down

0 comments on commit 1fe913b

Please sign in to comment.