Skip to content

Commit

Permalink
feat: ✨ Migrate to TypeScript (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek authored Feb 3, 2024
1 parent c1fbe04 commit 04c208d
Show file tree
Hide file tree
Showing 84 changed files with 111,187 additions and 110,720 deletions.
5 changes: 0 additions & 5 deletions .bettercodehub.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .deepsource.toml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
version: 2
updates:
- package-ecosystem: npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: weekly
day: thursday
time: "04:00"
timezone: Europe/Amsterdam
open-pull-requests-limit: 10
commit-message:
prefix: "build"
43 changes: 1 addition & 42 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,10 @@ jobs:
- name: 'Install dependencies'
run: yarn install
- name: 'Build distribution'
run: yarn dist
run: yarn action:dist
- name: 'Run unit-tests'
run: yarn test
- name: 'Run linter'
run: yarn run lint
- name: 'Run code coverage'
run: yarn run coverage
- name: 'Upload code coverage report'
run: bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_SECRET_TOKEN }}
release:
runs-on: ubuntu-latest
needs: tests
if: ${{ github.event_name == 'push' }}
steps:
- name: 'Checkout sources'
uses: actions/checkout@v3
- name: 'Setup NodeJS'
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: 'Install dependencies'
run: yarn install
- name: 'Build distribution'
run: yarn dist
- name: 'Semantic Release'
id: semantic
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'GitHub release'
if: steps.semantic.outputs.new_release_published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semantic.outputs.new_release_version }}
- name: 'Commit GitHub Action distribution'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add dist/index.js
git commit -m "Build by GitHub Actions" || true
if: job.status == 'success'
- name: 'Push changes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true
if: job.status == 'success'
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'release'
concurrency: release_environment
on:
push:
branches: main
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
steps:
- name: 'Checkout sources'
uses: actions/checkout@v3
- name: 'Setup NodeJS'
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: 'Install dependencies'
run: yarn install
- name: 'Run unit-tests'
run: yarn test
- name: 'Build distribution'
run: yarn dist
- name: 'Semantic Release'
id: semantic
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: 'GitHub release'
if: steps.semantic.outputs.new_release_published == 'true'
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.semantic.outputs.new_release_version }}
- name: 'Commit GitHub Action distribution'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add dist/index.js
git commit -m "Build by GitHub Actions" || true
if: job.status == 'success'
- name: 'Push changes'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true
if: job.status == 'success'
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ node_modules/
coverage/
dist/static/
dist/views/
src/version.js

# Local Netlify folder
.netlify
.vercel
src/version.ts
.vercel/
.next/
build/
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -827,3 +827,4 @@ For more, check out the [Contributing Guide](docs/CONTRIBUTING.md).
[ISC](LICENSE) © 2019 Rob van der Leek <[email protected]>
(https://twitter.com/robvanderleek)
21 changes: 0 additions & 21 deletions api/plans.js

This file was deleted.

24 changes: 0 additions & 24 deletions api/webhook.js

This file was deleted.

139 changes: 0 additions & 139 deletions app.yml

This file was deleted.

12 changes: 12 additions & 0 deletions dist/file.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

const pino = require('./pino')
const { once } = require('events')

module.exports = async function (opts = {}) {
const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false })
delete destOpts.destination
const destination = pino.destination(destOpts)
await once(destination, 'ready')
return destination
}
Loading

0 comments on commit 04c208d

Please sign in to comment.