Skip to content

Commit

Permalink
chore: repo setup
Browse files Browse the repository at this point in the history
  • Loading branch information
vladfrangu committed Jun 23, 2022
1 parent eafbd2c commit 4c5c3d2
Show file tree
Hide file tree
Showing 26 changed files with 5,890 additions and 7,220 deletions.
4 changes: 2 additions & 2 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projectName": "template",
"projectOwner": "sapphiredev",
"projectName": "async_event_emitter",
"projectOwner": "vladfrangu",
"repoType": "github",
"repoHost": "https://github.com",
"files": ["README.md"],
Expand Down
6 changes: 6 additions & 0 deletions .cliff-jumperrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: async_event_emitter
packagePath: .
org: vladfrangu
monoRepo: false
commitMessageTemplate: 'chore(release): release {{new-version}}'
tagTemplate: v{{new-version}}
4 changes: 2 additions & 2 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Favna is the primary maintainer of this repository
* @favna
# Vlad is the primary maintainer of this repository
* @vladfrangu
4 changes: 2 additions & 2 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
repository:
description: The {owner}/{repository} that is being deployed.
required: false
default: sapphiredev/sapphire-template
default: vladfrangu/async_event_emitter
push:
branches:
- main
Expand All @@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
with:
fetch-depth: 0
repository: ${{ github.event.inputs.repository || 'sapphiredev/sapphire-template' }}
repository: ${{ github.event.inputs.repository || 'vladfrangu/async_event_emitter' }}
ref: ${{ github.event.inputs.ref || 'main' }}
- name: Add TypeScript problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ jobs:
Testing:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [14, 16, 18]
steps:
- name: Checkout Project
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Use Node.js v16
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3
with:
node-version: 16
node-version: ${{ matrix.node }}
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
Expand All @@ -44,6 +48,7 @@ jobs:
run: yarn test --coverage
- name: Store code coverage report
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3
if: matrix.node == 18
with:
name: coverage
path: coverage/
Expand All @@ -56,10 +61,10 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Add problem matcher
run: echo "::add-matcher::.github/problemMatchers/tsc.json"
- name: Use Node.js v16
- name: Use Node.js 18
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3
with:
node-version: 16
node-version: 18
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deprecate-on-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
steps:
- name: Checkout Project
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
- name: Use Node.js v16
- name: Use Node.js 18
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3
with:
node-version: 16
node-version: 18
cache: yarn
registry-url: https://registry.npmjs.org/
- name: Install Dependencies
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/release-crosspost.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .npm-deprecaterc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: '*next*'
package:
- '@sapphire/template'
- 'async_event_emitter'
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["bierner.github-markdown-preview", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

All notable changes to this project will be documented in this file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

Copyright © `2020` `The Sapphire Community and its contributors`
Copyright © `2022` `Vlad Frangu`

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<div align="center">

![Sapphire Logo](https://cdn.skyra.pw/gh-assets/sapphire-banner.png)
# async_event_emitter

# @sapphire/template
**Simple to use event emitter implementation with async support in mind.**

**Template for Sapphire Repositories.**

[![GitHub](https://img.shields.io/github/license/sapphiredev/sapphire-template)](https://github.com/sapphiredev/sapphire-template/blob/main/LICENSE.md)
[![codecov](https://codecov.io/gh/sapphiredev/sapphire-template/branch/main/graph/badge.svg?token=0MSAyoZNxz)](https://codecov.io/gh/sapphiredev/sapphire-template)
[![npm](https://img.shields.io/npm/v/@sapphire/template?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/template)
[![GitHub](https://img.shields.io/github/license/vladfrangu/async_event_emitter)](https://github.com/vladfrangu/async_event_emitter/blob/main/LICENSE.md)
[![codecov](https://codecov.io/gh/vladfrangu/async_event_emitter/branch/main/graph/badge.svg?token=0MSAyoZNxz)](https://codecov.io/gh/vladfrangu/async_event_emitter)
[![npm](https://img.shields.io/npm/v/async_event_emitter?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/async_event_emitter)

</div>

Expand Down
63 changes: 63 additions & 0 deletions cliff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[changelog]
header = """
# Changelog
All notable changes to this project will be documented in this file.\n
"""
body = """
{% if version %}\
# [{{ version | trim_start_matches(pat="v") }}]\
{% if previous %}\
{% if previous.version %}\
(https://github.com/vladfrangu/async_event_emitter/compare/{{ previous.version }}...{{ version }})\
{% else %}\
(https://github.com/vladfrangu/async_event_emitter/tree/{{ version }})\
{% endif %}\
{% endif %} \
- ({{ timestamp | date(format="%Y-%m-%d") }})
{% else %}\
# [unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
## {{ group | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}\
**{{commit.scope}}:** \
{% endif %}\
{{ commit.message | upper_first }} ([{{ commit.id | truncate(length=7, end="") }}](https://github.com/vladfrangu/async_event_emitter/commit/{{ commit.id }}))\
{% if commit.breaking %}\
\n\n {% raw %} {% endraw %} ### 💥 Breaking Changes:\n \
{% for breakingChange in commit.footers %}\
{% raw %} {% endraw %} - {{ breakingChange }}\n\
{% endfor %}\
{% endif %}\
{% endfor %}
{% endfor %}\n
"""
trim = true
footer = ""

[git]
conventional_commits = true
filter_unconventional = true
commit_parsers = [
{ message = "^feat", group = "🚀 Features" },
{ message = "^fix", group = "🐛 Bug Fixes" },
{ message = "^docs", group = "📝 Documentation" },
{ message = "^perf", group = "🏃 Performance" },
{ message = "^refactor", group = "🏠 Refactor" },
{ message = "^typings", group = "⌨️ Typings" },
{ message = "^types", group = "⌨️ Typings" },
{ message = ".*deprecated", body = ".*deprecated", group = "🚨 Deprecation" },
{ message = "^revert", skip = true },
{ message = "^style", group = "🪞 Styling" },
{ message = "^test", group = "🧪 Testing" },
{ message = "^chore", skip = true },
{ message = "^ci", skip = true },
{ message = "^build", skip = true },
{ body = ".*security", group = "🛡️ Security" },
]
filter_commits = true
tag_pattern = "v[0-9]*"
ignore_tags = ""
topo_order = false
sort_commits = "newest"
14 changes: 0 additions & 14 deletions jest.config.mjs

This file was deleted.

84 changes: 42 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,69 @@
{
"name": "@sapphire/template",
"version": "0.0.1",
"description": "template",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"author": "@sapphire",
"name": "async_event_emitter",
"version": "0.0.2",
"description": "An event emitter implementation with async support in mind",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"browser": "./dist/index.global.js",
"unpkg": "./dist/index.global.js",
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
}
},
"sideEffects": false,
"author": "Vlad Frangu <[email protected]>",
"license": "MIT",
"scripts": {
"lint": "eslint src tests --ext ts --fix",
"format": "prettier --write {src,tests}/**/*.ts",
"format": "prettier --write \"{src,tests}/**/*.ts\"",
"docs": "typedoc",
"test": "jest",
"test:watch": "jest --watch",
"test": "vitest run",
"test:watch": "vitest",
"update": "yarn upgrade-interactive",
"build": "tsc -b src",
"clean": "tsc -b src --clean",
"watch": "tsc -b src -w",
"sversion": "standard-version",
"commit": "git-cz",
"cz": "git-cz",
"build": "tsup && tsc -b src",
"clean": "node scripts/clean.mjs",
"typecheck": "tsc -p tsconfig.typecheck.json",
"bump": "cliff-jumper",
"check-update": "cliff-jumper --dry-run",
"postinstall": "husky install .github/husky",
"prepack": "yarn build && pinst --disable",
"prepack": "rollup-type-bundler && pinst --disable",
"postpack": "pinst --enable"
},
"dependencies": {
"tslib": "^2.4.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2",
"@favware/cliff-jumper": "^1.8.3",
"@favware/npm-deprecate": "^1.0.4",
"@favware/rollup-type-bundler": "^1.0.8",
"@sapphire/eslint-config": "^4.3.7",
"@sapphire/prettier-config": "^1.4.3",
"@sapphire/ts-config": "^3.3.4",
"@types/jest": "^28.1.2",
"@types/node": "^17.0.31",
"@typescript-eslint/eslint-plugin": "^5.28.0",
"@typescript-eslint/parser": "^5.28.0",
"@types/node": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"c8": "^7.11.3",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.18.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^8.0.1",
"jest": "^28.1.1",
"lint-staged": "^13.0.2",
"pinst": "^3.0.0",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"standard-version": "^9.3.2",
"ts-jest": "^28.0.5",
"tsup": "^6.1.2",
"typedoc": "^0.22.17",
"typedoc-plugin-mdn-links": "^1.0.6",
"typescript": "^4.7.4"
"typescript": "^4.7.4",
"vitest": "^0.15.2"
},
"repository": {
"type": "git",
"url": "git+https://github.com/sapphiredev/sapphire-template.git"
"url": "git+https://github.com/vladfrangu/async_event_emitter.git"
},
"files": [
"dist",
Expand All @@ -65,19 +74,14 @@
"npm": ">=7.0.0"
},
"keywords": [
"@sapphire/template",
"bot",
"typescript",
"ts",
"yarn",
"discord",
"sapphire",
"discordjs"
"event emitter",
"async",
"event",
"emitter"
],
"bugs": {
"url": "https://github.com/sapphiredev/sapphire-template/issues"
"url": "https://github.com/vladfrangu/async_event_emitter/issues"
},
"homepage": "https://www.sapphirejs.dev",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
Expand All @@ -94,10 +98,6 @@
"publishConfig": {
"access": "public"
},
"resolutions": {
"ansi-regex": "^5.0.1",
"minimist": "^1.2.6"
},
"prettier": "@sapphire/prettier-config",
"packageManager": "[email protected]"
}
5 changes: 5 additions & 0 deletions scripts/clean.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { rm } from 'node:fs/promises';

const distDir = new URL('../dist/', import.meta.url);

await rm(distDir, { recursive: true, force: true });
3 changes: 2 additions & 1 deletion src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"rootDir": "./",
"outDir": "../dist",
"composite": true,
"preserveConstEnums": true
"tsBuildInfoFile": "../dist/.tsbuildinfo",
"emitDeclarationOnly": true
},
"include": ["."]
}
File renamed without changes.
Loading

0 comments on commit 4c5c3d2

Please sign in to comment.