Skip to content

Commit

Permalink
v2: Typescript Rewrite (#15)
Browse files Browse the repository at this point in the history
* Typescript Rewrite

* Remove the changeset readme

* Add changeset file

* Final repository cleanup

* changelog typo
  • Loading branch information
thewilloftheshadow authored Feb 27, 2023
1 parent 46070db commit 0b3da13
Show file tree
Hide file tree
Showing 39 changed files with 4,020 additions and 2,892 deletions.
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
16 changes: 16 additions & 0 deletions .changeset/swift-sloths-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"amaribot.js": major
---

This major update is a **breaking change**!

# Major Changes
- Rewrote the library to Typescript
- Changed getGuildLeaderboard to getLeaderboard
- Changed getRawGuildLeaderboard to getRawLeaderboard
- Added a getCombinedLeaderboard method
- Changed getLevelExp to getNextLevelExp
- Updated the documentation website

[See the full changes here.](https://github.com/amaribot/amaribot.js/pull/15/files)

25 changes: 0 additions & 25 deletions .circleci/config.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
env: {
commonjs: true,
es2021: true,
node: true,
},
extends: ["plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: "latest",
},
plugins: ["@typescript-eslint", "import"],
rules: {
quotes: ["error", "double", { allowTemplateLiterals: true }],
semi: ["error", "never"],
indent: ["error", 4, { SwitchCase: 1 }],
"import/extensions": ["error", "never"],
"max-len": ["error", { code: 250 }],
"tsdoc/syntax": "off",
"lines-between-class-members": ["error", "always", { exceptAfterSingleLine: true }],
"class-methods-use-this": "off",
"no-underscore-dangle": "off",
"implicit-arrow-linebreak": "off",
"consistent-return": "off",
"@typescript-eslint/ban-ts-comment": "off",
"comma-dangle": "off",
"function-paren-newline": ["error", "consistent"],
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-empty-function": "off",
"no-plusplus": "off",
"no-continue": "off",
"no-restricted-syntax": "off",
"no-case-declarations": "off",
"import/prefer-default-export": "off",
},
ignorePatterns: ["dist/*"],
settings: {
"import/resolver": {
node: {
extensions: [".js", ".jsx", ".ts", ".tsx"],
},
typescript: {
alwaysTryTypes: true,
project: "./tsconfig.json",
},
},
},
}
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
# These are supported funding model platforms

github: thewilloftheshadow
ko_fi: theshadow
70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

54 changes: 33 additions & 21 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
name: Generate Docs

on:
push:
branches:
- master
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install deps
run: npm install

- name: Build
run: npm run docs
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
cname: amaribot.js.org
- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Generate Docs
run: pnpm run docs

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: docs
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
cname: amaribot.js.org
21 changes: 0 additions & 21 deletions .github/workflows/publish.yml

This file was deleted.

43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
types: [opened, synchronize]

jobs:
build:
name: Build and Test
timeout-minutes: 15
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- uses: pnpm/[email protected]
with:
version: 7

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Test
run: pnpm test
env:
TEST_API_KEY: ${{ secrets.TEST_API_KEY }}
83 changes: 5 additions & 78 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,78 +1,5 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Testing
test
.DS_STORE
.idea

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless
node_modules
**/dist
**/docs
.DS_Store
.env*
Loading

0 comments on commit 0b3da13

Please sign in to comment.