Skip to content

Commit fd13ef3

Browse files
authored
breaking: re-setup due to repository transfer (#39)
1 parent 9e3fdd4 commit fd13ef3

File tree

11 files changed

+2796
-1823
lines changed

11 files changed

+2796
-1823
lines changed

.github/.gitkeep

Whitespace-only changes.

CONTRIBUTING.md renamed to .github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@
4141
- Add appropriate test coverage if applicable.
4242

4343
### Work Step Example
44-
- Fork the repository from [kazupon/eslint-plugin-vue-i18n](https://github.com/kazupon/eslint-plugin-vue-i18n) !
44+
- Fork the repository from [@intlify/eslint-plugin-vue-i18n](https://github.com/intlify/eslint-plugin-vue-i18n) !
4545
- Create your topic branch from `master`: `git branch my-new-topic origin/master`
4646
- Add codes and pass tests !
4747
- Commit your changes: `git commit -am 'Add some topic'`
4848
- Push to the branch: `git push origin my-new-topic`
49-
- Submit a pull request to `dev` branch of `kazupon/eslint-plugin-vue-i18n` repository !
49+
- Submit a pull request to `dev` branch of `@intlify/eslint-plugin-vue-i18n` repository !
5050

5151
## Development Setup
5252

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
8+
jobs:
9+
release:
10+
name: Release
11+
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
12+
runs-on: Ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v1
15+
- uses: actions/setup-node@v1
16+
with:
17+
registry-url: "https://registry.npmjs.org"
18+
- run: git switch master
19+
- run: |
20+
if [ -f "yarn.lock" ]; then
21+
yarn install
22+
else
23+
npm install
24+
fi
25+
- run: npm run release:trigger
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
29+
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

.mergify.yml

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

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<h1 align="center">eslint-plugin-vue-i18n</h1>
44
<p align="center">
5-
<a href="https://circleci.com/gh/kazupon/eslint-plugin-vue-i18n/tree/master"><img src="https://circleci.com/gh/kazupon/eslint-plugin-vue-i18n/tree/master.svg?style=svg" alt="Build Status"></a>
5+
<a href="https://circleci.com/gh/intlify/eslint-plugin-vue-i18n/tree/master"><img src="https://circleci.com/gh/intlify/eslint-plugin-vue-i18n/tree/master.svg?style=svg" alt="Build Status"></a>
66
</p>
77

88
<p align="center">ESLint plugin for Vue I18n</p>
@@ -22,18 +22,18 @@ Intlify is a new i18n project kickoff by @kazupon. 😉
2222

2323
## :book: Documentation
2424

25-
See [here](https://kazupon.github.io/eslint-plugin-vue-i18n/)
25+
See [here](https://eslint-plugin-vue-i18n.intlify.dev)
2626

2727
## :scroll: Changelog
28-
Details changes for each release are documented in the [CHANGELOG.md](https://github.com/kazupon/eslint-plugin-vue-i18n/blob/master/CHANGELOG.md).
28+
Details changes for each release are documented in the [CHANGELOG.md](https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/CHANGELOG.md).
2929

3030
## :exclamation: Issues
3131

32-
Please make sure to read the [Issue Reporting Checklist](https://github.com/kazupon/eslint-plugin-vue-i18n/blob/master/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
32+
Please make sure to read the [Issue Reporting Checklist](https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/CONTRIBUTING.md#issue-reporting-guidelines) before opening an issue. Issues not conforming to the guidelines may be closed immediately.
3333

3434
## :muscle: Contribution
3535

36-
Please make sure to read the [Contributing Guide](https://github.com/kazupon/eslint-plugin-vue-i18n/blob/master/CONTRIBUTING.md) before making a pull request.
36+
Please make sure to read the [Contributing Guide](https://github.com/intlify/eslint-plugin-vue-i18n/blob/master/CONTRIBUTING.md) before making a pull request.
3737

3838
## :copyright: License
3939

docs/started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Use [npm](https://www.npmjs.com/) or a compatible tool.
66

77
```sh
8-
npm install --save-dev eslint eslint-plugin-vue-i18n
8+
npm install --save-dev eslint @intlify/eslint-plugin-vue-i18n
99
```
1010

1111
::: tip Requirements

package.json

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,27 @@
11
{
2-
"name": "eslint-plugin-vue-i18n",
2+
"name": "@intlify/eslint-plugin-vue-i18n",
33
"description": "ESLint plugin for Vue I18n",
44
"version": "0.3.0",
55
"author": {
66
"name": "kazuya kawaguchi",
77
"email": "[email protected]"
88
},
99
"bugs": {
10-
"url": "https://github.com/kazupon/eslint-plugin-vue-i18n/issues"
10+
"url": "https://github.com/intlify/eslint-plugin-vue-i18n/issues"
11+
},
12+
"changelog": {
13+
"labels": {
14+
"Type: Feature": ":star: Features",
15+
"Type: Bug": ":bug: Bug Fixes",
16+
"Type: Security": ":lock: Security Fixes",
17+
"Type: Performance": ":chart_with_upwards_trend: Performance Fixes",
18+
"Type: Improvement": ":zap: Improvement Features",
19+
"Type: Breaking": ":boom: Breaking Change",
20+
"Type: Deprecated": ":warning: Deprecated Features",
21+
"Type: I18n": ":globe_with_meridians: Internationalization",
22+
"Type: A11y": ":wheelchair: Accessibility",
23+
"Type: Documentation": ":pencil: Documentation"
24+
}
1125
},
1226
"dependencies": {
1327
"flat": "^4.1.0",
@@ -20,28 +34,24 @@
2034
"vue-eslint-parser": "^6.0.3"
2135
},
2236
"devDependencies": {
23-
"conventional-changelog-cli": "^2.0.12",
24-
"conventional-github-releaser": "^3.1.2",
2537
"eslint": "^5.15.0 || ^6.0.0",
2638
"eslint-plugin-markdown": "^1.0.0",
2739
"eslint-plugin-vue-libs": "^3.0.0 || ^4.0.0",
28-
"git-commit-message-convention": "git://github.com/kazupon/git-commit-message-convention.git",
40+
"lerna-changelog": "^1.0.0",
2941
"mocha": "^6.0.2",
3042
"nyc": "^13.3.0",
3143
"opener": "^1.5.1",
3244
"rimraf": "^2.6.3",
45+
"shipjs": "^0.14.0",
3346
"vuepress": "^1.0.0-alpha.39"
3447
},
3548
"engines": {
3649
"node": ">=10.13.0 || >=11.10.1"
3750
},
38-
"peerDependencies": {
39-
"eslint": "^5.0.0 || ^6.0.0"
40-
},
4151
"files": [
4252
"lib"
4353
],
44-
"homepage": "https://github.com/kazupon/eslint-plugin-vue-i18n#readme",
54+
"homepage": "https://github.com/intlify/eslint-plugin-vue-i18n#readme",
4555
"keywords": [
4656
"eslint",
4757
"eslint-plugin",
@@ -55,21 +65,23 @@
5565
],
5666
"license": "MIT",
5767
"main": "lib/index.js",
68+
"peerDependencies": {
69+
"eslint": "^5.0.0 || ^6.0.0"
70+
},
5871
"repository": {
5972
"type": "git",
60-
"url": "git+https://github.com/kazupon/eslint-plugin-vue-i18n.git"
73+
"url": "git+https://github.com/intlify/eslint-plugin-vue-i18n.git"
6174
},
6275
"scripts": {
63-
"changelog": "conventional-changelog -i CHANGELOG.md -s -n ./node_modules/git-commit-message-convention/convention.js",
6476
"clean": "rimraf .nyc_output coverage docs/.vuepress/dist",
6577
"coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
6678
"docs": "vuepress dev docs",
67-
"docs:deploy": "scripts/docs-deploy.sh",
6879
"docs:build": "vuepress build docs",
6980
"generate": "node scripts/update.js",
7081
"lint": "eslint lib scripts tests docs/.vuepress --ignore-pattern \"!.*\"",
7182
"lint:docs": "eslint --ext js,vue,md docs --ignore-pattern \"!.*\"",
72-
"release": "conventional-github-releaser -n ./node_modules/git-commit-message-convention/convention.js",
83+
"release:prepare": "shipjs prepare",
84+
"release:trigger": "shipjs trigger",
7385
"test": "mocha ./tests/**/*.js",
7486
"test:coverage": "nyc mocha ./tests/**/*.js"
7587
}

renovate.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"config:base",
4+
":preserveSemverRanges"
5+
],
6+
"labels": ["Type: Dependency"],
7+
"automerge": true,
8+
"major": {
9+
"automerge": false
10+
}
11+
}

scripts/docs-deploy.sh

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

ship.config.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
const execa = require(require.resolve('execa'))
2+
const { promisify } = require('util')
3+
const fs = require('fs')
4+
const path = require('path')
5+
const read = promisify(fs.readFile)
6+
const write = fs.writeFileSync
7+
8+
function extractSpecificChangelog (changelog, version) {
9+
if (!changelog) {
10+
return null
11+
}
12+
const escapedVersion = version.replace(/\./g, '\\.')
13+
const regex = new RegExp(
14+
`(#+?\\s\\[?v?${escapedVersion}\\]?[\\s\\S]*?)(#+?\\s\\[?v?\\d+?\\.\\d+?\\.\\d+?\\]?)`,
15+
'g'
16+
)
17+
const matches = regex.exec(changelog)
18+
return matches ? matches[1] : null
19+
}
20+
21+
async function commitChangelog (current, next) {
22+
const { stdout } = await execa('npx', ['lerna-changelog', '--next-version', `v${next}`])
23+
const escapedVersion = next.replace(/\./g, '\\.')
24+
const regex = new RegExp(
25+
`(#+?\\s\\[?v?${escapedVersion}\\]?[\\s\\S]*?)(#+?\\s\\[?v?\\d\\.\\d\\.\\d\\]?)`,
26+
'g'
27+
)
28+
const matches = regex.exec(stdout.toString())
29+
const head = matches ? matches[1] : stdout
30+
const changelog = await read('./CHANGELOG.md', 'utf8')
31+
return write('./CHANGELOG.md', `${head}\n\n${changelog}`)
32+
}
33+
34+
module.exports = {
35+
mergeStrategy: { toSameBranch: ['master'] },
36+
monorepo: undefined,
37+
updateChangelog: false,
38+
beforeCommitChanges: ({ nextVersion, exec, dir }) => {
39+
return new Promise(resolve => {
40+
const pkg = require('./package.json')
41+
commitChangelog(pkg.version, nextVersion).then(resolve)
42+
})
43+
},
44+
formatCommitMessage: ({
45+
version,
46+
releaseType,
47+
mergeStrategy,
48+
baseBranch
49+
}) => `${releaseType} release v${version}`,
50+
formatPullRequestTitle: ({
51+
version,
52+
releaseType
53+
}) => `${releaseType} release v${version}`,
54+
shouldRelease: () => true,
55+
releases: {
56+
extractChangelog: ({ version, dir }) => {
57+
const changelogPath = path.resolve(dir, 'CHANGELOG.md')
58+
try {
59+
const changelogFile = fs.readFileSync(changelogPath, 'utf-8').toString()
60+
const ret = extractSpecificChangelog(changelogFile, version)
61+
return ret
62+
} catch (err) {
63+
if (err.code === 'ENOENT') {
64+
return null
65+
}
66+
throw err
67+
}
68+
}
69+
}
70+
}

0 commit comments

Comments
 (0)