Skip to content

Commit 58e529c

Browse files
authored
ci: migrate lerna to changesets (#414)
1 parent 52030ac commit 58e529c

File tree

12 files changed

+1304
-3140
lines changed

12 files changed

+1304
-3140
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
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/clean-berries-clap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"eslint-mdx": patch
3+
"eslint-plugin-mdx": patch
4+
---
5+
6+
fix: resolve circular imports in worker

.changeset/config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": [
4+
"@changesets/changelog-github",
5+
{
6+
"repo": "mdx-js/eslint-mdx"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "restricted",
12+
"baseBranch": "master",
13+
"updateInternalDependencies": "patch",
14+
"ignore": []
15+
}

.changeset/small-plums-add.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-mdx": patch
3+
---
4+
5+
chore(deps): upgrade `eslint-plugin-markdown` to `v3`

.changeset/tasty-dodos-sit.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-mdx": patch
3+
---
4+
5+
fix(deps): add missing dependencies for yarn@v2+ and pnpm

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v3
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js 16
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: 16
23+
cache: yarn
24+
25+
- name: Install Dependencies
26+
run: yarn --frozen-lockfile
27+
28+
- name: Create Release Pull Request
29+
id: changesets
30+
uses: changesets/action@v1
31+
with:
32+
commit: 'chore: release package(s)'
33+
title: 'chore: release package(s)'
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ Hi! 👋 We’re excited that you’re interested in contributing!
88

99
## Packages Releasing Difference
1010

11-
This project is a [lerna][] monorepo, so packages releasing is controlled by [lerna][].
11+
This project is managed by [changesets][], so packages releasing is controlled by [changesets][].
1212

13-
1. Make sure you have both GitHub repository and npm write permissions at the same time.
14-
2. You need a GitHub token with a `public_repo` scope as `GH_TOKEN` in the environment to publish
15-
3. Run `yarn release` simply, or `GH_TOKEN=xxx yarn release` to export `GH_TOKEN` at one time.
16-
17-
### Release a bete next version
18-
19-
Run `yarn build && yarn release-next`
13+
1. There will be a release PR generated by [changesets][]'s [action](https://github.com/changesets/action) automatically, when the release is ready, you should merge that PR firstly.
14+
2. Then you'll need to pull the latest codes from remote.
15+
3. Make sure you have both GitHub repository and npm write permissions at the same time.
16+
4. You need a GitHub token with a `public_repo` scope as `GITHUB_TOKEN` in the environment to publish
17+
5. Run `yarn release` simply, or `GITHUB_TOKEN=xxx yarn release` to export `GITHUB_TOKEN` at one time.
2018

19+
[changesets]: https://github.com/changesets/changesets
2120
[contributing]: https://mdxjs.com/contributing
22-
[lerna]: https://github.com/lerna/lerna

lerna.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

package.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"workspaces": [
1010
"packages/*"
1111
],
12+
"packageManager": "[email protected]",
1213
"scripts": {
1314
"build": "run-p build:*",
1415
"build:r": "r -f es2015",
@@ -20,24 +21,25 @@
2021
"prelint": "yarn build",
2122
"prepare": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
2223
"prerelease": "yarn build",
23-
"release": "lerna publish --conventional-commits --create-release github --yes",
24-
"release-next": "yarn build && lerna publish --conventional-prerelease --preid next --pre-dist-tag next --yes",
24+
"release": "changeset publish",
2525
"test": "jest",
2626
"typecov": "type-coverage"
2727
},
2828
"devDependencies": {
29-
"@1stg/lib-config": "^8.0.0",
29+
"@1stg/lib-config": "^9.0.1",
30+
"@changesets/changelog-github": "^0.4.6",
31+
"@changesets/cli": "^2.24.0",
3032
"@types/eslint": "^8.4.5",
3133
"@types/eslint-plugin-markdown": "^2.0.0",
32-
"@types/jest": "^28.1.4",
33-
"@types/node": "^18.0.3",
34+
"@types/jest": "^28.1.6",
35+
"@types/node": "^18.0.6",
3436
"@types/react": "^18.0.15",
3537
"@types/unist": "^2.0.6",
36-
"lerna": "^5.1.8",
38+
"jest": "^28.1.3",
3739
"patch-package": "^6.4.7",
3840
"react": "^18.2.0",
39-
"ts-jest": "^28.0.5",
40-
"ts-node": "^10.8.2",
41+
"ts-jest": "^28.0.7",
42+
"ts-node": "^10.9.1",
4143
"type-coverage": "^2.22.0",
4244
"typescript": "^4.7.4",
4345
"yarn-deduplicate": "^5.0.0"

packages/eslint-mdx/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,19 @@
6161
"eslint": ">=8.0.0"
6262
},
6363
"dependencies": {
64+
"acorn": "^8.8.0",
65+
"acorn-jsx": "^5.3.2",
6466
"cosmiconfig": "^7.0.1",
67+
"espree": "^9.3.2",
6568
"estree-util-visit": "^1.1.0",
6669
"remark-mdx": "^2.1.2",
6770
"remark-parse": "^10.0.1",
6871
"remark-stringify": "^10.0.2",
69-
"synckit": "^0.7.2",
72+
"synckit": "^0.8.1",
7073
"tslib": "^2.4.0",
7174
"unified": "^10.1.2",
7275
"unist-util-visit": "^4.1.0",
76+
"uvu": "^0.5.6",
7377
"vfile": "^5.3.4"
7478
}
7579
}

0 commit comments

Comments
 (0)