Skip to content

Commit

Permalink
Merge pull request #1 from binden-js/binden
Browse files Browse the repository at this point in the history
Fork from `@kauai/[email protected]`
  • Loading branch information
vansergen authored Sep 4, 2022
2 parents 2dd9e46 + 0b79640 commit 64de526
Show file tree
Hide file tree
Showing 45 changed files with 5,531 additions and 11,428 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "extends": "b2broker" }
{ "extends": "@binden/commitlint-config" }
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Typescript compiled files
build/
dist/

# Documentation
docs/
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "extends": ["b2broker-ts"], "parserOptions": { "project": "tsconfig.json" } }
{ "extends": ["binden-ts"], "parserOptions": { "project": "tsconfig.json" } }
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A clear and concise description of what the bug is.
Steps to reproduce the behavior (add some code):

```typescript
import Compression from "@kauai/compression";
import Compression from "@binden/compression";
// more code to reproduce the problem
```

Expand All @@ -21,9 +21,9 @@ A clear and concise description of what you expected to happen.

**Please complete the following information:**

- Node.js version: [e.g. v16.5.0]
- NPM version: [e.g. 7.19.1]
- `kauai` version [e.g. 1.0.0]
- Node.js version: [e.g. v18.8.0]
- NPM version: [e.g. 8.18.0]
- `binden` version [e.g. 1.0.0]

**Additional context**
Add any other context about the problem here.
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2

updates:
- package-ecosystem: npm
directory: /
schedule:
interval: daily
allow:
- dependency-type: direct
assignees:
- vansergen
versioning-strategy: increase
labels:
- dependabot
- dependencies
commit-message:
prefix: dependencies
prefix-development: devDependencies

- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
assignees:
- vansergen
labels:
- dependabot
- ci
commit-message:
prefix: ci
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://commerce.coinbase.com/checkout/eddfb0f7-20e7-4e0d-8e04-232bbdf0b397
Binary file removed .github/pgp/key.asc.gpg
Binary file not shown.
4 changes: 0 additions & 4 deletions .github/scripts/cleanup.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .github/scripts/decrypt.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .github/scripts/encrypt.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .github/scripts/git.sh

This file was deleted.

4 changes: 0 additions & 4 deletions .github/scripts/gpg.sh

This file was deleted.

91 changes: 38 additions & 53 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,100 +7,85 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@main
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true

- name: Node.js version
run: node --version

- name: npm version
run: npm --version

- name: Install dependencies
run: npm ci

- name: Commitlint
run: npm run commitlint:all

- name: Prettier
run: npm run prettier

- name: ESLint
run: npm run lint
run: npm run eslint

- name: commitlint
run: npm run commitlint

- name: Tests
run: npm run test:ci
run: npm test

- name: Publish (test)
run: npm run publish:test
run: npm publish --dry-run

- name: Docs
run: npm run docs:build

- name: Coverage
run: npm run coverage:ci
run: npm run coverage

- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main

- uses: actions/setup-node@main
with:
node-version: 16
check-latest: true

- name: Install dependencies
run: npm ci

- name: Docs
run: npm run docs:build

release:
needs: [test, docs]
if: ${{ github.ref == 'refs/heads/main' }}

needs: [test]

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
with:
fetch-depth: 0
- uses: actions/checkout@v3

- uses: actions/setup-node@main
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
check-latest: true

- name: Install dependencies
run: npm ci

- name: Decrypt PGP key
run: ./.github/scripts/decrypt.sh
- name: Import GPG key
run: echo $GPG_KEY | base64 --decode | gpg --batch --import
env:
PRIVATE_KEY_PASSPHRASE: ${{ secrets.PRIVATE_KEY_PASSPHRASE }}
GPG_KEY: ${{ secrets.GPG_KEY }}

- name: Add the custom gpg executable
run: |
rm -rf /tmp/gpg.sh
echo 'gpg --batch --pinentry-mode=loopback --passphrase $GPG_KEY_PASSPHRASE $@' >> /tmp/gpg.sh
chmod +x /tmp/gpg.sh
- name: Setup git
run: ./.github/scripts/git.sh
run: |
git config commit.gpgsign true
git config user.signingkey $GPG_KEY_ID
git config gpg.program /tmp/gpg.sh
env:
PGP_KEY_ID: ${{ secrets.PGP_KEY_ID }}
GPG_KEY_ID: ${{ secrets.GPG_KEY_ID }}

- name: Install dependencies
run: npm ci

- name: Release
run: npm run release
run: npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Cleanup
run: ./.github/scripts/cleanup.sh
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,3 @@ dist

# TernJS port file
.tern-port

# TypeScript compiled files
build/

# PGP key
.github/pgp/key.asc
5 changes: 4 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{ "*": "npm run prettier:write", "*.ts": "npm run lint:fix" }
{
"*.{js,cjs,mjs,ts,json,md,yaml,yml,html,css}": "prettier -w",
"*.ts": "eslint --fix"
}
7 changes: 7 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"bail": true,
"extension": "ts",
"full-trace": true,
"node-option": "loader=ts-node/esm",
"ui": "tdd"
}
11 changes: 5 additions & 6 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# nyc test coverage
.nyc_output

# Coverage directory used by nyc
# Coverage directory used by c8
coverage

# GitHub folder
.github

# Tests
test
build/test
dist/test

# Documentation
docs
Expand All @@ -29,9 +26,11 @@ docs
# lint-staged config - https://github.com/okonet/lint-staged
.lintstagedrc.json

# mocha config - https://github.com/mochajs/mocha
.mocharc.json

# Prettier ignore
.prettierignore
.prettierignore_docs

# semantic-release config - https://semantic-release.gitbook.io/semantic-release/
.releaserc.json
Expand Down
10 changes: 2 additions & 8 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# Coverage directory used by nyc
coverage

# nyc test coverage
.nyc_output

# Documentation
docs
# Coverage directory used by c8
coverage
5 changes: 0 additions & 5 deletions .prettierignore_docs

This file was deleted.

51 changes: 1 addition & 50 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,50 +1 @@
{
"branches": "main",
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "perf", "section": "Performance Improvements" },
{ "type": "revert", "section": "Reverts" },
{ "type": "build", "section": "Build System" },
{ "type": "initial", "section": "Initial" },
{ "type": "dependencies", "section": "Dependencies" },
{ "type": "peerDependencies", "section": "Peer dependencies" },
{ "type": "devDependencies", "section": "Dev dependencies" },
{ "type": "metadata", "section": "Metadata" },
{ "type": "docs", "section": "Documentation", "hidden": true },
{ "type": "style", "section": "Styles", "hidden": true },
{ "type": "chore", "section": "Miscellaneous Chores", "hidden": true },
{ "type": "refactor", "section": "Code Refactoring", "hidden": true },
{ "type": "test", "section": "Tests", "hidden": true },
{ "type": "ci", "section": "Continuous Integration", "hidden": true }
]
},
"releaseRules": [
{ "breaking": true, "release": "major" },
{ "type": "feat", "release": "minor" },
{ "type": "fix", "release": "patch" },
{ "type": "perf", "release": "patch" },
{ "type": "build", "release": "patch" },
{ "type": "initial", "release": "minor" },
{ "type": "dependencies", "release": "patch" },
{ "type": "peerDependencies", "release": "patch" },
{ "type": "metadata", "release": "patch" }
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "changelogTitle": "# Changelog" }],
"@semantic-release/npm",
["@semantic-release/exec", { "prepareCmd": "npm run docs:build" }],
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": ["CHANGELOG.md", "package.json", "package-lock.json", "docs"],
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
]
]
}
{ "extends": "@binden/semantic-release-config" }
13 changes: 0 additions & 13 deletions CHANGELOG.md

This file was deleted.

Loading

0 comments on commit 64de526

Please sign in to comment.