Socket
Socket
Sign inDemoInstall

@sanity/semantic-release-preset

Package Overview
Dependencies
6
Maintainers
36
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.2 to 4.1.1

36

CHANGELOG.md

@@ -8,2 +8,38 @@ <!-- markdownlint-disable --><!-- textlint-disable -->

## [4.1.1](https://github.com/sanity-io/semantic-release-preset/compare/v4.1.0...v4.1.1) (2023-04-12)
### Bug Fixes
- reduce GitHub rate limit errors ([#81](https://github.com/sanity-io/semantic-release-preset/issues/81)) ([b24eb19](https://github.com/sanity-io/semantic-release-preset/commit/b24eb1941eb19a0cf327c949b802b93b495ee690))
## [4.1.0](https://github.com/sanity-io/semantic-release-preset/compare/v4.0.2...v4.1.0) (2023-03-26)
### Features
- **deps:** update dependency semantic-release to v21 ([#74](https://github.com/sanity-io/semantic-release-preset/issues/74)) ([35024d4](https://github.com/sanity-io/semantic-release-preset/commit/35024d4d34d31bac73eadbc1c7bc0dad8cc52d42))
## [4.0.2](https://github.com/sanity-io/semantic-release-preset/compare/v4.0.1...v4.0.2) (2023-03-20)
### Bug Fixes
- update semver range ([a671b7b](https://github.com/sanity-io/semantic-release-preset/commit/a671b7b246b1725bbc1f52c12cf999ea1a6a041b))
## [4.0.1](https://github.com/sanity-io/semantic-release-preset/compare/v4.0.0...v4.0.1) (2023-03-20)
### Bug Fixes
- **deps:** update dependency semantic-release-license to ^1.0.3 ([#71](https://github.com/sanity-io/semantic-release-preset/issues/71)) ([286960d](https://github.com/sanity-io/semantic-release-preset/commit/286960de2de0bfd4e876687485ab05dbf3ce8d8b))
- **deps:** update semantic-release monorepo ([6f2956e](https://github.com/sanity-io/semantic-release-preset/commit/6f2956e942ba2b3565a4020c1d1071c4c897d531))
- make prettier PRs ([fe45bd9](https://github.com/sanity-io/semantic-release-preset/commit/fe45bd93f849776fc26dbf676c199af902e46f3d))
## [4.0.0](https://github.com/sanity-io/semantic-release-preset/compare/v3.0.2...v4.0.0) (2023-01-20)
### ⚠ BREAKING CHANGES
- if your package manager don't auto install peers add `semantic-release` manually: `npm install --save-dev semantic-release`
### Code Refactoring
- `semantic-release` is now a peer dep ([bcc84e7](https://github.com/sanity-io/semantic-release-preset/commit/bcc84e7a5d75cda1f50cc236778b716e1b792276))
## [3.0.2](https://github.com/sanity-io/semantic-release-preset/compare/v3.0.1...v3.0.2) (2023-01-08)

@@ -10,0 +46,0 @@

5

index.js

@@ -55,3 +55,6 @@ // @ts-check

addReleases: 'bottom',
assets: '.semantic-release/*.tgz'
assets: '.semantic-release/*.tgz',
// These features currently frequently leads to GitHub API rate limit errors, so we disable them for now.
successComment: false,
releasedLabels: false
}

@@ -58,0 +61,0 @@ ]

25

package.json
{
"name": "@sanity/semantic-release-preset",
"version": "3.0.2",
"version": "4.1.1",
"description": "Recommended setup for releasing semantically using GitHub Actions workflows",

@@ -51,15 +51,18 @@ "keywords": [

"dependencies": {
"@semantic-release/changelog": "6.0.2",
"@semantic-release/exec": "6.0.3",
"@semantic-release/git": "10.0.1",
"conventional-changelog-conventionalcommits": "5.0.0",
"semantic-release": "20.0.2",
"semantic-release-license": "1.0.3"
"@semantic-release/changelog": "6",
"@semantic-release/exec": "6",
"@semantic-release/git": "10",
"conventional-changelog-conventionalcommits": "5",
"semantic-release-license": "1"
},
"devDependencies": {
"@types/semantic-release": "^17.2.4",
"ls-engines": "^0.8.0",
"prettier": "^2.8.2",
"prettier-plugin-packagejson": "^2.3.0"
"@types/semantic-release": "20.0.1",
"ls-engines": "0.9.0",
"prettier": "^2.8.5",
"prettier-plugin-packagejson": "^2.4.3",
"semantic-release": "21.0.1"
},
"peerDependencies": {
"semantic-release": "20 || 21"
},
"engines": {

@@ -66,0 +69,0 @@ "node": ">=18"

@@ -23,6 +23,4 @@ <!-- markdownlint-disable-file MD025 -->

- [Optional: Configure prerelease branches](#optional-configure-prerelease-branches)
- [Optional: Advanced prerelease branches](#optional-advanced-prerelease-branches)
- [Why not use `"prerelease": true`?](#why-not-use-prerelease-true)
- [Minimal GitHub Release workflow](#minimal-github-release-workflow)
- [If you're unable to make it work chances are your issue is documented in the `semantic-release` troubleshooting docs.](#if-youre-unable-to-make-it-work-chances-are-your-issue-is-documented-in-the-semantic-release-troubleshooting-docs)
- [If you're unable to make it work chances are your issue is documented in the `semantic-release` troubleshooting docs](#if-youre-unable-to-make-it-work-chances-are-your-issue-is-documented-in-the-semantic-release-troubleshooting-docs)
- [Opinionated GitHub Release workflow](#opinionated-github-release-workflow)

@@ -38,18 +36,8 @@ - [TODO more docs are coming, we're actively exploring the optimal setup](#todo-more-docs-are-coming-were-actively-exploring-the-optimal-setup)

<details>
<summary>Why isn't <code>semantic-release</code> a peer dependency?</summary>
If your package manager don't auto install peer dependencies make sure to install `semantic-release`:
There's a [convention](https://github.com/semantic-release/gitlab-config#install) in `semantic-release` presets to have it as a peer, which would make the install setup look like this:
```bash
npm install --save-dev semantic-release @sanity/semantic-release-preset
npm i -D semantic-release
```
This leaves it to you to keep both dependencies up to date. This package is primarily designed to ease our own internal `@sanity` npm packages, and thus we prefer for it to be a single dependency.
That way we avoid mismatch bugs where bots might make a PR that updates `semantic-release` to a new, breaking, major version. But fail to also update `@sanity/semantic-release-preset` causing it to fail.
By declaring it as a normal `dependency` we avoid these issues, and reduce churn and PR noise.
</details>
## Setup the release config

@@ -70,6 +58,6 @@

If you have stable releases going out from the git branch `main`, and want commits on the branch `v3` to result in only being installable with the npm dist-tag `dev-preview`:
If you have stable releases going out from the git branch `main`, and want commits on the branch `beta` to result in only being installable with the npm dist-tag `beta`:
```bash
npm i package-name@dev-preview
npm i package-name@beta
```

@@ -88,59 +76,6 @@

"extends": "@sanity/semantic-release-preset",
"branches": [
"main",
{ "name": "v3", "channel": "dev-preview", "prerelease": true }
]
"branches": ["main", { "name": "beta", "prerelease": true }]
}
```
### Optional: Advanced prerelease branches
On many studio v3 plugins we're using the `main` git branch to push prereleases that are installable as:
```bash
npm i package-name@studio-v3
```
And that's saved to the `package.json` as:
```json
{
"dependencies": {
"package-name": "^1.0.0-v3-studio.1"
}
}
```
To run that setup use:
```json
{
"extends": "@sanity/semantic-release-preset",
"branches": [
{ "name": "studio-v2", "channel": "latest" },
{ "name": "main", "channel": "studio-v3", "prerelease": "v3-studio" }
]
}
```
### Why not use `"prerelease": true`?
If `prerelease` is `true` instead of `v3-studio` this is what happens when it's installed:
```json
{
"dependencies": {
"package-name": "^1.0.0-studio-v3.1"
}
}
```
Since we use the name `studio-v3` as the `channel`, the prerelease increment makes it look like the studio version is `v3.1`, which is confusing. Alternatively, you could set `channel` to `v3-studio` but then the install command would change to this:
```bash
npm i package-name@v3-studio
```
And since we always say "Studio v3" and never "v3 Studio" when talking about the new version it's better to use both `channel` and `prerelease` to set the optimal ordering individually.
## Minimal GitHub Release workflow

@@ -168,4 +103,4 @@

with:
cache: npm
node-version: lts/*
cache: 'npm'
- run: npm ci

@@ -216,4 +151,4 @@ - run: npm test --if-present

with:
cache: npm
node-version: lts/*
cache: 'npm'
- run: npm ci

@@ -220,0 +155,0 @@ - run: npm test --if-present

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc