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 2.0.2 to 4.1.1

76

CHANGELOG.md

@@ -8,2 +8,78 @@ <!-- 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)
### Bug Fixes
- **deps:** update dependency semantic-release to v20.0.2 ([#48](https://github.com/sanity-io/semantic-release-preset/issues/48)) ([3a9554d](https://github.com/sanity-io/semantic-release-preset/commit/3a9554d71c9d32626b0457bd712d651d630ad1e6))
## [3.0.1](https://github.com/sanity-io/semantic-release-preset/compare/v3.0.0...v3.0.1) (2023-01-08)
### Bug Fixes
- **deps:** update dependency semantic-release to v20.0.1 ([#47](https://github.com/sanity-io/semantic-release-preset/issues/47)) ([c46e5a3](https://github.com/sanity-io/semantic-release-preset/commit/c46e5a388c0a34a2b37352ca8dc8ddfdfd836368))
## [3.0.0](https://github.com/sanity-io/semantic-release-preset/compare/v2.0.5...v3.0.0) (2023-01-07)
### ⚠ BREAKING CHANGES
- **deps:** Drops support for Node v16 and older
### Bug Fixes
- **deps:** update dependency semantic-release to v20 ([#40](https://github.com/sanity-io/semantic-release-preset/issues/40)) ([8dd50d9](https://github.com/sanity-io/semantic-release-preset/commit/8dd50d9a57b4c9f37e6e34305fb0bcf31eee2347))
## [2.0.5](https://github.com/sanity-io/semantic-release-preset/compare/v2.0.4...v2.0.5) (2023-01-01)
### Bug Fixes
- **deps:** lock file maintenance ([#39](https://github.com/sanity-io/semantic-release-preset/issues/39)) ([bcdd373](https://github.com/sanity-io/semantic-release-preset/commit/bcdd373d549e4a4dd3767e33fb3a7c6219a41e53))
## [2.0.4](https://github.com/sanity-io/semantic-release-preset/compare/v2.0.3...v2.0.4) (2022-12-16)
### Bug Fixes
- **deps:** lock file maintenance ([#36](https://github.com/sanity-io/semantic-release-preset/issues/36)) ([1a80d7d](https://github.com/sanity-io/semantic-release-preset/commit/1a80d7d7317a6abcac75f8ae127a213ffbdb8b3a))
## [2.0.3](https://github.com/sanity-io/semantic-release-preset/compare/v2.0.2...v2.0.3) (2022-12-06)
### Bug Fixes
- **deps:** update dependency @semantic-release/changelog to ^6.0.2 ([1d53742](https://github.com/sanity-io/semantic-release-preset/commit/1d537420680f39c79b10e157620cf51581c553c4))
## [2.0.2](https://github.com/sanity-io/semantic-release-preset/compare/v2.0.1...v2.0.2) (2022-10-06)

@@ -10,0 +86,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 @@ ]

27

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

@@ -51,17 +51,20 @@ "keywords": [

"dependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"conventional-changelog-conventionalcommits": "^5.0.0",
"semantic-release": "^19.0.5",
"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.7.0",
"prettier": "^2.7.1",
"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": {
"node": ">=16.0.0"
"node": ">=18"
},

@@ -68,0 +71,0 @@ "publishConfig": {

@@ -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

@@ -185,3 +120,3 @@ - run: npm test --if-present

[You need two secrets](https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication-for-plugins), `secrets.GITHUB_TOKEN` is always provided to GitHub actions, but if you try to `--dry-run` locally [you'll need to create a token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line).
[You need two secrets](https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication-for-plugins), `secrets.GITHUB_TOKEN` is always provided to GitHub actions, but if you try to `--dry-run` locally [you'll need to create a token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line).
It's easiest to just push commits and inspect the workflow output. You can add `--debug` to the `npx semantic-release` command to see more verbose logs if there's a tricky error.

@@ -217,4 +152,4 @@

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

@@ -221,0 +156,0 @@ - run: npm test --if-present

Sorry, the diff of this file is not supported yet

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