Skip to content

Commit

Permalink
Merge pull request #887 from recurly/add-types-package
Browse files Browse the repository at this point in the history
Adding types/package.json
  • Loading branch information
chrissrogers authored Jul 11, 2024
2 parents 5eede60 + 5c61a5f commit 8dce434
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
19 changes: 12 additions & 7 deletions scripts/prepare-release
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ LIB_ARTIFACT=./build/recurly.min.js
VERSION_FILE=./lib/recurly/version.js

# Bump version
old_version=$(cat package.json | jq -r '.version')
npm --no-git-tag-version version ${part}
new_version=$(cat package.json | jq -r '.version')
echo "$(sed "s/$old_version/$new_version/" $VERSION_FILE)" > $VERSION_FILE
old_version=$(jq -r '.version' < package.json)
npm --no-git-tag-version version "${part}"
new_version=$(jq -r '.version' < package.json)
sed -i "s/$old_version/$new_version/" "$VERSION_FILE"

# Update types version
old_types_version=$(jq -r '.version' < types/package.json)
new_types_version=$(jq '.version' -r < package.json | sed -ne 's/^\([0-9]*\.[0-9]*\).*/\1.9999/p')
sed -i "s/$old_types_version/$new_types_version/" types/package.json

# Generate Changelog
changelogly --future-release "v$new_version"
Expand All @@ -46,7 +51,7 @@ while [[ "$#" -gt 0 ]]; do
-n|--notes-out)
echo "$new_version
$(cat CHANGELOG.md | sed -n "/^## \[v$new_version\]/,/^##/p" | sed '$d;1d')
$(sed -n "/^## \[v$new_version\]/,/^##/p" < CHANGELOG.md | sed '$d;1d')
##### Minified MD5 Checksum
\`\`\`
Expand All @@ -55,13 +60,13 @@ while [[ "$#" -gt 0 ]]; do
##### [SRI Hash](https://www.srihash.org/)
\`\`\`
${sri_hash}
\`\`\`" | awk '{$1=$1};1' > $2
\`\`\`" | awk '{$1=$1};1' > "$2"
shift
;;

# Create release notes artifact
-t|--tag-out)
echo "v$new_version" > $2
echo "v$new_version" > "$2"
;;
esac
shift
Expand Down
23 changes: 23 additions & 0 deletions types/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"private": true,
"name": "@types/recurly__recurly-js",
"version": "4.29.9999",
"nonNpm": true,
"nonNpmDescription": "@recurly/recurly-js",
"projects": [
"https://github.com/recurly/recurly-js"
],
"devDependencies": {
"@types/recurly__recurly-js": "workspace:."
},
"owners": [
{
"name": "Christopher Rogers",
"githubUsername": "chrissrogers"
},
{
"name": "Douglas Miller",
"githubUsername": "douglasmiller"
}
]
}

0 comments on commit 8dce434

Please sign in to comment.