Skip to content

Commit 04c208d

Browse files
feat: ✨ Migrate to TypeScript (#791)
1 parent c1fbe04 commit 04c208d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+111187
-110720
lines changed

.bettercodehub.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

.deepsource.toml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
3+
- package-ecosystem: "npm"
44
directory: "/"
55
schedule:
66
interval: weekly
7+
day: thursday
78
time: "04:00"
9+
timezone: Europe/Amsterdam
810
open-pull-requests-limit: 10
911
commit-message:
1012
prefix: "build"

.github/workflows/main.yml

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,10 @@ jobs:
2020
- name: 'Install dependencies'
2121
run: yarn install
2222
- name: 'Build distribution'
23-
run: yarn dist
23+
run: yarn action:dist
2424
- name: 'Run unit-tests'
2525
run: yarn test
26-
- name: 'Run linter'
27-
run: yarn run lint
2826
- name: 'Run code coverage'
2927
run: yarn run coverage
3028
- name: 'Upload code coverage report'
3129
run: bash <(curl -s https://codecov.io/bash) -t ${{secrets.CODECOV_SECRET_TOKEN }}
32-
release:
33-
runs-on: ubuntu-latest
34-
needs: tests
35-
if: ${{ github.event_name == 'push' }}
36-
steps:
37-
- name: 'Checkout sources'
38-
uses: actions/checkout@v3
39-
- name: 'Setup NodeJS'
40-
uses: actions/setup-node@v3
41-
with:
42-
node-version: '20.x'
43-
- name: 'Install dependencies'
44-
run: yarn install
45-
- name: 'Build distribution'
46-
run: yarn dist
47-
- name: 'Semantic Release'
48-
id: semantic
49-
uses: cycjimmy/semantic-release-action@v3
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
- name: 'GitHub release'
53-
if: steps.semantic.outputs.new_release_published == 'true'
54-
uses: softprops/action-gh-release@v1
55-
with:
56-
tag_name: ${{ steps.semantic.outputs.new_release_version }}
57-
- name: 'Commit GitHub Action distribution'
58-
run: |
59-
git config --local user.email "[email protected]"
60-
git config --local user.name "GitHub Action"
61-
git add dist/index.js
62-
git commit -m "Build by GitHub Actions" || true
63-
if: job.status == 'success'
64-
- name: 'Push changes'
65-
uses: ad-m/github-push-action@master
66-
with:
67-
github_token: ${{ secrets.GITHUB_TOKEN }}
68-
branch: ${{ github.ref }}
69-
force: true
70-
if: job.status == 'success'

.github/workflows/release.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: 'release'
2+
concurrency: release_environment
3+
on:
4+
push:
5+
branches: main
6+
jobs:
7+
release:
8+
name: Semantic Release
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: 'Checkout sources'
12+
uses: actions/checkout@v3
13+
- name: 'Setup NodeJS'
14+
uses: actions/setup-node@v3
15+
with:
16+
node-version: '20.x'
17+
- name: 'Install dependencies'
18+
run: yarn install
19+
- name: 'Run unit-tests'
20+
run: yarn test
21+
- name: 'Build distribution'
22+
run: yarn dist
23+
- name: 'Semantic Release'
24+
id: semantic
25+
uses: cycjimmy/semantic-release-action@v3
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
- name: 'GitHub release'
29+
if: steps.semantic.outputs.new_release_published == 'true'
30+
uses: softprops/action-gh-release@v1
31+
with:
32+
tag_name: ${{ steps.semantic.outputs.new_release_version }}
33+
- name: 'Commit GitHub Action distribution'
34+
run: |
35+
git config --local user.email "[email protected]"
36+
git config --local user.name "GitHub Action"
37+
git add dist/index.js
38+
git commit -m "Build by GitHub Actions" || true
39+
if: job.status == 'success'
40+
- name: 'Push changes'
41+
uses: ad-m/github-push-action@master
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
branch: ${{ github.ref }}
45+
force: true
46+
if: job.status == 'success'

.gitignore

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ node_modules/
1111
coverage/
1212
dist/static/
1313
dist/views/
14-
src/version.js
15-
16-
# Local Netlify folder
17-
.netlify
18-
.vercel
14+
src/version.ts
15+
.vercel/
16+
.next/
17+
build/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,3 +827,4 @@ For more, check out the [Contributing Guide](docs/CONTRIBUTING.md).
827827
828828
[ISC](LICENSE) © 2019 Rob van der Leek <[email protected]>
829829
(https://twitter.com/robvanderleek)
830+

api/plans.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

api/webhook.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

app.yml

Lines changed: 0 additions & 139 deletions
This file was deleted.

dist/file.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict'
2+
3+
const pino = require('./pino')
4+
const { once } = require('events')
5+
6+
module.exports = async function (opts = {}) {
7+
const destOpts = Object.assign({}, opts, { dest: opts.destination || 1, sync: false })
8+
delete destOpts.destination
9+
const destination = pino.destination(destOpts)
10+
await once(destination, 'ready')
11+
return destination
12+
}

0 commit comments

Comments
 (0)