Skip to content

Commit 5abcbf5

Browse files
committed
Add changesets configuration to handle versioning and publishing
1 parent 0b627f9 commit 5abcbf5

File tree

8 files changed

+807
-23
lines changed

8 files changed

+807
-23
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

CONTRIBUTING.md

+6
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ As minimal requirements, your commit message should:
103103

104104
We don't follow any other convention, but if you want to use one, we recommend [this one](https://chris.beams.io/posts/git-commit/).
105105

106+
### Changesets <!-- omit in TOC -->
107+
108+
We use [changesets](https://github.com/Noviny/changesets) to do versioning. What that means is that you need to add a changeset by running `yarn changeset` which contains what packages should be bumped, their associated semver bump types and some markdown which will be inserted into changelogs.
109+
106110
### GitHub Pull Requests <!-- omit in TOC -->
107111

108112
Some notes on GitHub PRs:
@@ -113,6 +117,8 @@ Some notes on GitHub PRs:
113117
- All PRs must be reviewed and approved by at least one maintainer.
114118
- The PR title should be accurate and descriptive of the changes. The title of the PR will be indeed automatically added to the next [release changelogs](https://github.com/meilisearch/instant-meilisearch/releases/).
115119

120+
121+
116122
## Release Process (for the internal team only)
117123

118124
Meilisearch tools follow the [Semantic Versioning Convention](https://semver.org/).

packages/instant-meilisearch/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"dev": "rollup -c rollup.config.js --watch",
2424
"lint": "eslint --ext .js,.ts,.tsx .",
2525
"lint:fix": "eslint --ext .js,.ts,.tsx",
26-
"test:types": "yarn tsc"
26+
"test:types": "yarn tsc",
27+
"version": "node scripts/update_version.js"
2728
},
2829
"main": "./dist/instant-meilisearch.umd.js",
2930
"module": "./dist/instant-meilisearch.esm.js",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const pkg = require('../package.json')
2+
const fs = require('fs')
3+
const path = require('path')
4+
5+
const version = pkg.version
6+
7+
const pckVersion = `export const PACKAGE_VERSION = '${version}'
8+
`
9+
10+
const p = path.resolve(__dirname, '../src/package-version.ts')
11+
12+
console.log(p)
13+
fs.writeFileSync(p, pckVersion)

playgrounds/local-react/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@meilisearch/local-react-playground",
33
"version": "0.1.0",
4+
"private": true,
45
"description": "React playground for instant-meilisearch",
56
"main": "src/index.jsx",
67
"scripts": {

turbo.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"test:types": {
1717
"dependsOn": ["^build"],
1818
"outputs": ["dist/**", "build/**"]
19-
}
19+
},
20+
"version": {}
2021
}
2122
}

0 commit comments

Comments
 (0)