-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ✨ Migrate to TypeScript (#791)
- Loading branch information
1 parent
c1fbe04
commit 04c208d
Showing
84 changed files
with
111,187 additions
and
110,720 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -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" |
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 |
---|---|---|
|
@@ -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' |
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,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' |
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
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 |
---|---|---|
|
@@ -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) | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,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 | ||
} |
Oops, something went wrong.