-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add initial package boilerplate
- Loading branch information
0 parents
commit ea21982
Showing
20 changed files
with
8,274 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
coverage/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@aurora-is-near/eslint-config" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@aurora-is-near:registry=https://npm.pkg.github.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
jsxBracketSameLine: true, | ||
singleQuote: true, | ||
trailingComma: 'all', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@aurora-is-near/semantic-release-config" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodejs 20.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"davidanson.vscode-markdownlint" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Aurora Staking SDK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-typescript", | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": [ | ||
"@babel/plugin-transform-runtime" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { 'body-max-line-length': [0] }, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
reporters: ['default', 'github-actions'], | ||
clearMocks: true, | ||
preset: 'ts-jest/presets/js-with-babel', | ||
testPathIgnorePatterns: ['/dist/', '/node_modules/'], | ||
modulePathIgnorePatterns: ['/dist/'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "@aurora-is-near/staking", | ||
"version": "1.0.0", | ||
"description": "Contains logic for staking and unstaking Aurora", | ||
"main": "dist/index.js", | ||
"author": "Alex Mendes", | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"lint": "eslint . --ext .js,.ts", | ||
"test": "jest", | ||
"typecheck": "tsc --noEmit", | ||
"clean": "rimraf dist", | ||
"prebuild": "yarn clean", | ||
"build": "tsc" | ||
}, | ||
"engines": { | ||
"node": ">=20.9.0" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@aurora-is-near/eslint-config": "^1.0.0", | ||
"@aurora-is-near/semantic-release-config": "^1.1.1", | ||
"@babel/core": "^7.17.10", | ||
"@babel/plugin-transform-runtime": "^7.17.0", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@commitlint/config-conventional": "^19.2.2", | ||
"@types/jest": "^29.0.0", | ||
"@types/node": "^17.0.31", | ||
"eslint": "^8.57.0", | ||
"husky": "^9.0.11", | ||
"jest": "^29.0.0", | ||
"prettier": "^3.2.5", | ||
"rimraf": "^3.0.2", | ||
"semantic-release": "^24.0.0", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"include": ["src/*"], | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"outDir": "./dist", | ||
"target": "es2020", | ||
"module": "commonjs", | ||
"declaration": true, | ||
"strict": true, | ||
"moduleResolution": "node", | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"declarationMap": true, | ||
"allowJs": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"resolveJsonModule": true, | ||
"strictPropertyInitialization": false, | ||
"noUncheckedIndexedAccess": true | ||
} | ||
} |
Oops, something went wrong.