Skip to content

Commit bfaf436

Browse files
authored
chore: use changesets (#408)
* chore: use changesets * fix
1 parent 956d293 commit bfaf436

12 files changed

+1142
-1286
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

+15
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": "intlify/eslint-plugin-vue-i18n"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"baseBranch": "main",
12+
"updateInternalDependencies": "patch",
13+
"bumpVersionsWithWorkspaceProtocolOnly": true,
14+
"ignore": []
15+
}

.changeset/pre.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mode": "pre",
3+
"tag": "next",
4+
"initialVersions": {
5+
"@intlify/eslint-plugin-vue-i18n": "3.0.0-beta.1"
6+
},
7+
"changesets": []
8+
}

.env-cmdrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version-ci": {
3+
"IN_VERSION_CI_SCRIPT": "true"
4+
}
5+
}

.github/workflows/Release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
24+
- name: Install Dependencies
25+
run: pnpm install
26+
- name: Build
27+
run: pnpm run build
28+
29+
- name: Create Release Pull Request or Publish to npm
30+
id: changesets
31+
uses: changesets/action@v1
32+
with:
33+
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
34+
version: pnpm run version:ci
35+
# This expects you to have a script called release which does a build for your packages and calls changeset publish
36+
publish: pnpm run release
37+
commit: 'chore: release `@intlify/eslint-plugin-vue-i18n`'
38+
title: 'chore: release `@intlify/eslint-plugin-vue-i18n`'
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
],
3737
"main": "dist/lib/index.js",
3838
"scripts": {
39-
"build": "tsc",
40-
"build:prod": "tsc --project ./tsconfig.build.json",
39+
"build": "tsc --project ./tsconfig.build.json",
4140
"clean": "rimraf .nyc_output coverage dist docs/.vitepress/dist",
4241
"coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
4342
"docs": "vitepress dev docs",
@@ -47,13 +46,15 @@
4746
"lint-fix": "eslint . --ext js,ts,vue,md --ignore-pattern \"/tests/fixtures\" --fix",
4847
"lint:docs": "prettier docs --check",
4948
"format": "prettier . --write",
50-
"release:prepare": "node shipjs-cli.cjs prepare",
51-
"release:trigger": "node shipjs-cli.cjs trigger",
49+
"prerelease": "pnpm run test && pnpm run build",
50+
"release": "changeset publish",
5251
"test": "mocha --require ts-node/register/transpile-only \"./tests/**/*.ts\"",
5352
"test:debug": "mocha --require ts-node/register/transpile-only \"./tests/**/*.ts\"",
5453
"test:coverage": "nyc mocha --require ts-node/register/transpile-only \"./tests/**/*.ts\" --timeout 60000",
5554
"test:integrations": "mocha ./tests-integrations/*.cjs --timeout 60000",
56-
"new": "ts-node ./scripts/new-rule.ts"
55+
"new": "ts-node ./scripts/new-rule.ts",
56+
"version:ci": "env-cmd -e version-ci pnpm run generate && changeset version",
57+
"changeset": "changeset"
5758
},
5859
"dependencies": {
5960
"@eslint/eslintrc": "^2.1.0",
@@ -73,6 +74,8 @@
7374
"yaml-eslint-parser": "^1.2.2"
7475
},
7576
"devDependencies": {
77+
"@changesets/changelog-github": "^0.4.6",
78+
"@changesets/cli": "^2.24.2",
7679
"@types/debug": "^4.1.8",
7780
"@types/eslint": "^8.44.0",
7881
"@types/eslint-scope": "^3.7.4",
@@ -87,7 +90,7 @@
8790
"@typescript-eslint/eslint-plugin": "^6.0.0",
8891
"@typescript-eslint/parser": "^6.0.0",
8992
"entities": "^4.5.0",
90-
"esbuild-register": "^3.4.2",
93+
"env-cmd": "^10.1.0",
9194
"eslint": "^8.44.0",
9295
"eslint-config-prettier": "^8.8.0",
9396
"eslint-plugin-markdown": "^3.0.0",
@@ -105,7 +108,6 @@
105108
"path-scurry": "^1.10.1",
106109
"prettier": "^2.8.8",
107110
"rimraf": "^5.0.1",
108-
"shipjs": "^0.26.3",
109111
"ts-node": "^10.9.1",
110112
"typescript": "^5.1.6",
111113
"vitepress": "1.0.0-beta.5",
@@ -130,7 +132,6 @@
130132
}
131133
},
132134
"publishConfig": {
133-
"access": "public",
134-
"tag": "next"
135+
"access": "public"
135136
}
136137
}

0 commit comments

Comments
 (0)