Skip to content

Commit b2ff4c7

Browse files
committed
feat: Init commit
1 parent 1b390fb commit b2ff4c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+12993
-2818
lines changed

.eslintrc.js renamed to .eslintrc.cjs

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ module.exports = {
55
sourceType: 'module',
66
},
77
plugins: ['@typescript-eslint/eslint-plugin'],
8-
extends: ['plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended'],
8+
extends: [
9+
'plugin:@typescript-eslint/recommended',
10+
'plugin:prettier/recommended',
11+
],
912
root: true,
1013
env: {
1114
node: true,
1215
jest: true,
1316
},
14-
ignorePatterns: ['.eslintrc.js'],
17+
ignorePatterns: ['.eslintrc.cjs'],
1518
rules: {
1619
'@typescript-eslint/interface-name-prefix': 'off',
1720
'@typescript-eslint/explicit-function-return-type': 'off',

.github/CODEOWNERS

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* @oblakbot
2+
* @seebeen

.github/workflows/release.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 16
19+
cache: 'npm'
20+
- name: Install dependencies
21+
run: npm install
22+
- name: Lint
23+
run: npm run lint
24+
- name: Test
25+
run: npm run test
26+
- name: Build
27+
run: 'npm run build:production'
28+
- name: Release
29+
env:
30+
GIT_AUTHOR_NAME: 'oblakbot'
31+
GIT_AUTHOR_EMAIL: '[email protected]'
32+
GIT_COMMITTER_NAME: 'oblakbot'
33+
GIT_COMMITTER_EMAIL: '[email protected]'
34+
GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
36+
run: npm run semantic-release

.npmignore

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ lib
55
.editorconfig
66
.eslintrc.js
77
.prettierrc
8+
jest.config.json
89
LICENSE
10+
README.md
11+
CHANGELOG.md
912
tsconfig.json
1013
tsconfig.build.json
14+
tsconfig.buildinfo

.releaserc

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"branches": [
3+
"master",
4+
"next"
5+
],
6+
"plugins": [
7+
[
8+
"@semantic-release/changelog",
9+
{
10+
"changelogFile": "CHANGELOG.md"
11+
}
12+
],
13+
"@semantic-release/commit-analyzer",
14+
"@semantic-release/release-notes-generator",
15+
[
16+
"@semantic-release/exec",
17+
{
18+
"prepareCmd": "zip -r /tmp/release.zip dist package.json"
19+
}
20+
],
21+
[
22+
"@semantic-release/git",
23+
{
24+
"assets": [
25+
"CHANGELOG.md"
26+
],
27+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
28+
}
29+
],
30+
[
31+
"@semantic-release/github",
32+
{
33+
"assets": [
34+
{
35+
"path": "/tmp/release.zip",
36+
"name": "sr-wp-plugin-${nextRelease.version}.zip",
37+
"label": "Semantic Release WP plugin v${nextRelease.version}"
38+
}
39+
]
40+
}
41+
],
42+
"@semantic-release/npm"
43+
],
44+
"publishConfig": {
45+
"registry": "https://registry.npmjs.org/",
46+
"tag": "latest"
47+
}
48+
}

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ansible.python.interpreterPath": "/bin/python3"
3+
}

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Semantic Release WP package plugin

jest.config.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"preset": "ts-jest/presets/js-with-ts-esm",
3+
"moduleFileExtensions": ["js", "json", "ts"],
4+
"moduleNameMapper": {
5+
"^(\\.{1,2}/.*)\\.js$": "$1"
6+
},
7+
"extensionsToTreatAsEsm": [".ts"],
8+
"transform": {
9+
"^.+\\.(mt|t|cj|j)s$": [
10+
"ts-jest",
11+
{
12+
"useESM": true
13+
}
14+
]
15+
},
16+
"coveragePathIgnorePatterns": [
17+
"/node_modules/",
18+
"/test/",
19+
"/dist/",
20+
"/lib/@types",
21+
"/lib/index.ts",
22+
"/(.*)/index.ts"
23+
],
24+
"collectCoverageFrom": ["**/*.(t|j)s"],
25+
"coverageProvider": "v8",
26+
"coverageDirectory": "../coverage",
27+
"testEnvironment": "node"
28+
}

0 commit comments

Comments
 (0)