Skip to content

Commit

Permalink
breaking: re-setup due to repository transfer (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jan 22, 2020
1 parent 9e3fdd4 commit fd13ef3
Show file tree
Hide file tree
Showing 11 changed files with 2,796 additions and 1,823 deletions.
Empty file removed .github/.gitkeep
Empty file.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
- Add appropriate test coverage if applicable.

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

## Development Setup

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Release

on:
pull_request:
types:
- closed

jobs:
release:
name: Release
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release')
runs-on: Ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
registry-url: "https://registry.npmjs.org"
- run: git switch master
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
- run: npm run release:trigger
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
8 changes: 0 additions & 8 deletions .mergify.yml

This file was deleted.

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<h1 align="center">eslint-plugin-vue-i18n</h1>
<p align="center">
<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>
<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>
</p>

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

## :book: Documentation

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

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

## :exclamation: Issues

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.
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.

## :muscle: Contribution

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.
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.

## :copyright: License

Expand Down
2 changes: 1 addition & 1 deletion docs/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Use [npm](https://www.npmjs.com/) or a compatible tool.

```sh
npm install --save-dev eslint eslint-plugin-vue-i18n
npm install --save-dev eslint @intlify/eslint-plugin-vue-i18n
```

::: tip Requirements
Expand Down
38 changes: 25 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
{
"name": "eslint-plugin-vue-i18n",
"name": "@intlify/eslint-plugin-vue-i18n",
"description": "ESLint plugin for Vue I18n",
"version": "0.3.0",
"author": {
"name": "kazuya kawaguchi",
"email": "kawakazu80@gmail.com"
},
"bugs": {
"url": "https://github.com/kazupon/eslint-plugin-vue-i18n/issues"
"url": "https://github.com/intlify/eslint-plugin-vue-i18n/issues"
},
"changelog": {
"labels": {
"Type: Feature": ":star: Features",
"Type: Bug": ":bug: Bug Fixes",
"Type: Security": ":lock: Security Fixes",
"Type: Performance": ":chart_with_upwards_trend: Performance Fixes",
"Type: Improvement": ":zap: Improvement Features",
"Type: Breaking": ":boom: Breaking Change",
"Type: Deprecated": ":warning: Deprecated Features",
"Type: I18n": ":globe_with_meridians: Internationalization",
"Type: A11y": ":wheelchair: Accessibility",
"Type: Documentation": ":pencil: Documentation"
}
},
"dependencies": {
"flat": "^4.1.0",
Expand All @@ -20,28 +34,24 @@
"vue-eslint-parser": "^6.0.3"
},
"devDependencies": {
"conventional-changelog-cli": "^2.0.12",
"conventional-github-releaser": "^3.1.2",
"eslint": "^5.15.0 || ^6.0.0",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-vue-libs": "^3.0.0 || ^4.0.0",
"git-commit-message-convention": "git://github.com/kazupon/git-commit-message-convention.git",
"lerna-changelog": "^1.0.0",
"mocha": "^6.0.2",
"nyc": "^13.3.0",
"opener": "^1.5.1",
"rimraf": "^2.6.3",
"shipjs": "^0.14.0",
"vuepress": "^1.0.0-alpha.39"
},
"engines": {
"node": ">=10.13.0 || >=11.10.1"
},
"peerDependencies": {
"eslint": "^5.0.0 || ^6.0.0"
},
"files": [
"lib"
],
"homepage": "https://github.com/kazupon/eslint-plugin-vue-i18n#readme",
"homepage": "https://github.com/intlify/eslint-plugin-vue-i18n#readme",
"keywords": [
"eslint",
"eslint-plugin",
Expand All @@ -55,21 +65,23 @@
],
"license": "MIT",
"main": "lib/index.js",
"peerDependencies": {
"eslint": "^5.0.0 || ^6.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/kazupon/eslint-plugin-vue-i18n.git"
"url": "git+https://github.com/intlify/eslint-plugin-vue-i18n.git"
},
"scripts": {
"changelog": "conventional-changelog -i CHANGELOG.md -s -n ./node_modules/git-commit-message-convention/convention.js",
"clean": "rimraf .nyc_output coverage docs/.vuepress/dist",
"coverage": "nyc report --reporter lcov && opener coverage/lcov-report/index.html",
"docs": "vuepress dev docs",
"docs:deploy": "scripts/docs-deploy.sh",
"docs:build": "vuepress build docs",
"generate": "node scripts/update.js",
"lint": "eslint lib scripts tests docs/.vuepress --ignore-pattern \"!.*\"",
"lint:docs": "eslint --ext js,vue,md docs --ignore-pattern \"!.*\"",
"release": "conventional-github-releaser -n ./node_modules/git-commit-message-convention/convention.js",
"release:prepare": "shipjs prepare",
"release:trigger": "shipjs trigger",
"test": "mocha ./tests/**/*.js",
"test:coverage": "nyc mocha ./tests/**/*.js"
}
Expand Down
11 changes: 11 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": [
"config:base",
":preserveSemverRanges"
],
"labels": ["Type: Dependency"],
"automerge": true,
"major": {
"automerge": false
}
}
21 changes: 0 additions & 21 deletions scripts/docs-deploy.sh

This file was deleted.

70 changes: 70 additions & 0 deletions ship.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
const execa = require(require.resolve('execa'))
const { promisify } = require('util')
const fs = require('fs')
const path = require('path')
const read = promisify(fs.readFile)
const write = fs.writeFileSync

function extractSpecificChangelog (changelog, version) {
if (!changelog) {
return null
}
const escapedVersion = version.replace(/\./g, '\\.')
const regex = new RegExp(
`(#+?\\s\\[?v?${escapedVersion}\\]?[\\s\\S]*?)(#+?\\s\\[?v?\\d+?\\.\\d+?\\.\\d+?\\]?)`,
'g'
)
const matches = regex.exec(changelog)
return matches ? matches[1] : null
}

async function commitChangelog (current, next) {
const { stdout } = await execa('npx', ['lerna-changelog', '--next-version', `v${next}`])
const escapedVersion = next.replace(/\./g, '\\.')
const regex = new RegExp(
`(#+?\\s\\[?v?${escapedVersion}\\]?[\\s\\S]*?)(#+?\\s\\[?v?\\d\\.\\d\\.\\d\\]?)`,
'g'
)
const matches = regex.exec(stdout.toString())
const head = matches ? matches[1] : stdout
const changelog = await read('./CHANGELOG.md', 'utf8')
return write('./CHANGELOG.md', `${head}\n\n${changelog}`)
}

module.exports = {
mergeStrategy: { toSameBranch: ['master'] },
monorepo: undefined,
updateChangelog: false,
beforeCommitChanges: ({ nextVersion, exec, dir }) => {
return new Promise(resolve => {
const pkg = require('./package.json')
commitChangelog(pkg.version, nextVersion).then(resolve)
})
},
formatCommitMessage: ({
version,
releaseType,
mergeStrategy,
baseBranch
}) => `${releaseType} release v${version}`,
formatPullRequestTitle: ({
version,
releaseType
}) => `${releaseType} release v${version}`,
shouldRelease: () => true,
releases: {
extractChangelog: ({ version, dir }) => {
const changelogPath = path.resolve(dir, 'CHANGELOG.md')
try {
const changelogFile = fs.readFileSync(changelogPath, 'utf-8').toString()
const ret = extractSpecificChangelog(changelogFile, version)
return ret
} catch (err) {
if (err.code === 'ENOENT') {
return null
}
throw err
}
}
}
}
Loading

0 comments on commit fd13ef3

Please sign in to comment.