Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to Changesets #8

Merged
merged 8 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/cli/changelog",
{ "repo": "benjervis/eslint-plugin-redundant-stack" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
9 changes: 7 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,10 @@ jobs:
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Release
run: pnpm semantic-release
- name: Create release PR or publish to npm
uses: changesets/action@c2918239208f2162b9d27a87f491375c51592434
with:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Snapshot

on: workflow_dispatch

jobs:
publish:
name: Publish snapshot version
runs-on: ubuntu-latest
env:
CI: true
steps:
- name: Checkout Repo
uses: actions/checkout@main
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}

- uses: pnpm/[email protected]

- name: Set up Node.js
uses: actions/setup-node@main
with:
node-version-file: '.nvmrc'
cache: 'pnpm'

- name: Install Dependencies
run: pnpm i

- name: Publish
uses: seek-oss/changesets-snapshot@v0
with:
pre-publish: pnpm prepare-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,35 @@
{
"name": "@bjervis/eslint-plugin-redundant-stack",
"version": "0.0.0-development",
"version": "0.0.8",
"description": "Warn on <Stack> elements that only have a single child",
"main": "lib/check-stack-children.js",
"author": "Ben Jervis",
"license": "MIT",
"scripts": {
"build": "babel src -d lib",
"test": "tsm test/check-stack-children.test.ts",
"semantic-release": "semantic-release",
"tsc": "tsc",
"lint:prettier": "prettier --cache --list-different .",
"format:prettier": "prettier --cache --write .",
"lint:eslint": "eslint --cache .",
"format:eslint": "eslint --cache --fix .",
"format": "pnpm run format:prettier && pnpm run format:eslint",
"lint": "pnpm run lint:prettier && pnpm run lint:eslint && pnpm run tsc"
"lint": "pnpm run lint:prettier && pnpm run lint:eslint && pnpm run tsc",
"prepare-release": "pnpm build",
"release": "pnpm prepare-release && changeset publish"
},
"devDependencies": {
"@babel/cli": "7.23.0",
"@babel/core": "7.23.2",
"@babel/preset-env": "7.23.2",
"@changesets/cli": "^2.26.2",
"@types/eslint": "^8.44.6",
"@types/estree": "^1.0.3",
"eslint": "8.52.0",
"eslint-config-seek": "^12.0.0",
"eslint-plugin-import": "^2.29.0",
"jest": "^29.7.0",
"prettier": "^3.0.3",
"semantic-release": "^17.4.4",
"tsm": "^2.3.0",
"typescript": "^5.2.2"
},
Expand Down
Loading