Skip to content

Commit

Permalink
fix!: require semantic-release v24 (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Jun 10, 2024
1 parent 935324a commit c9feea2
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 34 deletions.
5 changes: 1 addition & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>sanity-io/renovate-config",
"github>sanity-io/renovate-config:automerge"
],
"extends": ["github>sanity-io/renovate-config", "github>sanity-io/renovate-config:automerge"],
"packageRules": [
{
"matchPackageNames": ["semantic-release-license"],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ on:
workflow_dispatch:
inputs:
test:
description: 'Run tests'
description: "Run tests"
required: true
default: true
type: boolean
release:
description: 'Publish new release'
description: "Publish new release"
required: true
default: false
type: boolean
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
author: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
body: I ran `npm run prettier` 🧑‍💻
branch: actions/prettier-if-needed
commit-message: 'chore(prettier): 🤖 ✨'
commit-message: "chore(prettier): 🤖 ✨"
labels: 🤖 bot
title: 'chore(prettier): 🤖 ✨'
title: "chore(prettier): 🤖 ✨"
token: ${{ steps.generate-token.outputs.token }}
2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./index.js",
"branches": ["main", { "name": "canary", "prerelease": true }],
"branches": ["main", {"name": "canary", "prerelease": true}],
"tagFormat": "@sanity/semantic-release-preset@${version}"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Then use this config:
```json
{
"extends": "@sanity/semantic-release-preset",
"branches": ["main", { "name": "beta", "prerelease": true }]
"branches": ["main", {"name": "beta", "prerelease": true}]
}
```

Expand Down
30 changes: 15 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const preset = 'conventionalcommits'
**/
const options = {
plugins: [
['@semantic-release/commit-analyzer', { preset }],
['@semantic-release/release-notes-generator', { preset }],
['@semantic-release/commit-analyzer', {preset}],
['@semantic-release/release-notes-generator', {preset}],
[
'@semantic-release/changelog',
{
Expand All @@ -18,20 +18,20 @@ const options = {
# 📓 Changelog
All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.`
}
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.`,
},
],
[
'@semantic-release/exec',
{
prepareCmd: 'npx -y prettier --write CHANGELOG.md'
}
prepareCmd: 'npx -y prettier --write CHANGELOG.md',
},
],
[
'@semantic-release/npm',
{
tarballDir: '.semantic-release'
}
tarballDir: '.semantic-release',
},
],
'semantic-release-license',
[
Expand All @@ -43,10 +43,10 @@ All notable changes to this project will be documented in this file. See
'package-lock.json',
'package.json',
'pnpm-lock.yaml',
'yarn.lock'
'yarn.lock',
],
message: 'chore(release): ${nextRelease.version} [skip ci]'
}
message: 'chore(release): ${nextRelease.version} [skip ci]',
},
],
[
'@semantic-release/github',
Expand All @@ -56,10 +56,10 @@ All notable changes to this project will be documented in this file. See
// These features currently frequently leads to GitHub API rate limit errors, so we disable them for now.
releasedLabels: false,
// @TODO remove this before releasing on main
successComment: false
}
]
]
successComment: false,
},
],
],
}

module.exports = options
16 changes: 14 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@
"prettier": "npx prettier --ignore-path .gitignore",
"test": "npx ls-engines"
},
"prettier": {
"semi": false,
"singleQuote": true,
"trailingComma": "none"
},
"prettier": "@sanity/prettier-config",
"dependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/exec": "^6.0.3",
Expand All @@ -55,13 +51,13 @@
"semantic-release-license": "^1.0.3"
},
"devDependencies": {
"@sanity/prettier-config": "^1.0.2",
"ls-engines": "0.9.1",
"prettier": "^3.3.1",
"prettier-plugin-packagejson": "^2.5.0",
"semantic-release": "^24.0.0"
},
"peerDependencies": {
"semantic-release": "^22.0.12 || ^23.0.2 || ^24.0.0"
"semantic-release": "^24"
},
"engines": {
"node": ">= 20.8"
Expand Down

0 comments on commit c9feea2

Please sign in to comment.