Skip to content

Commit

Permalink
feat: add initial package boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandermendes committed Nov 6, 2024
0 parents commit 875f044
Show file tree
Hide file tree
Showing 20 changed files with 8,753 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
coverage/
dist/
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@aurora-is-near/eslint-config"
}
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
registries:
npm-npmjs:
type: npm-registry
url: https://registry.npmjs.org
token: ${{ secrets.NPM_TOKEN }}
updates:
- package-ecosystem: npm
directory: /
schedule:
interval: monthly
allow:
- dependency-type: direct

- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches:
- main
- canary/*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
uses: ./.github/workflows/test.yml
secrets: inherit

release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
issues: write
pull-requests: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: package.json
- name: Setup NPM token
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Install
run: yarn install --frozen-lockfile --non-interactive
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on: workflow_call

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: package.json
- name: Setup NPM token
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> .npmrc
- name: Install
run: yarn install --frozen-lockfile --non-interactive
- name: Lint
run: yarn lint
- name: Check types
run: yarn typecheck
- name: Test
run: yarn test
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Packages
.yalc
yalc.lock
node_modules/

# Build
dist/
*.tsbuildinfo

# Logs
*.log

# OS
.DS_Store

# IDE
.idea/

# Tests
coverage/
.jest/
spec.json

# Vi
*.swp
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@aurora-is-near:registry=https://npm.pkg.github.com
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
3 changes: 3 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@aurora-is-near/semantic-release-config"
}
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 20.9.0
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"davidanson.vscode-markdownlint"
]
}
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"typescript.preferences.importModuleSpecifier": "relative",
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.markdownlint": "explicit"
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma",
"editor.formatOnSave": true
},
"editor.rulers": [80],
"eslint.validate": [
"javascript",
"typescript"
],
"typescript.tsdk": "node_modules/typescript/lib",
}
Loading

0 comments on commit 875f044

Please sign in to comment.