Skip to content

Commit

Permalink
chore: add skipLibCheck to tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelvesavuori committed Nov 14, 2024
1 parent 42d5baf commit 55e602a
Show file tree
Hide file tree
Showing 16 changed files with 1,728 additions and 1,637 deletions.
21 changes: 0 additions & 21 deletions .eslintrc

This file was deleted.

17 changes: 8 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ on:

jobs:
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
node-version: [18.x]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22

- name: Install dependencies
run: |
npm ci --ignore-scripts
npm audit fix
- name: Compile
run: npx tsc

- name: Test
run: npm test
29 changes: 15 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,34 @@ on:

jobs:
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
node-version: [18.x]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22

- name: Install dependencies
run: |
npm ci --ignore-scripts
npm audit fix
- name: Compile
run: npx tsc

- name: Test
run: npm test

- name: Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Send coverage report with Code Climate
uses: paambaati/codeclimate-action@v3.0.0
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
coverageLocations: ${{ github.workspace }}/coverage/lcov.info:lcov
Expand All @@ -42,10 +43,10 @@ jobs:
needs: ['build-unix']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
registry-url: https://registry.npmjs.org/
- run: |
npm ci --ignore-scripts
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.dccache
.DS_Store
.env
.webpack/
lib/
Expand Down
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

7 changes: 3 additions & 4 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build
npx tsc
npm test
npm run lint
git add .
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Loggers have become too opinionated, bloated and complicated. MikroLog provides
- Familiar syntax using `log()`, `info()`, `debug()`, `warn()` and `error()`
- Zero config and opinionated enough to still be awesome without any magic tricks
- Cuts out all the stuff you won't need in cloud/serverless like storing logs or creating file output
- None of the `pid` and other garbage fields you get from many other solutions
- None of the `pid` and other garbage fields you get from many other solutions
- Flexible for most needs by loading your own static metadata that gets used in all logs
- Outside of AWS itself, logs carry across perfectly to observability solutions like Datadog, New Relic, Honeycomb...
- Easy to redact or mask sensitive data
Expand Down Expand Up @@ -141,7 +141,9 @@ export async function handler(event: any, context: any) {
}
```

Further, you can also set the correlation ID manually as part of the `enrich()` call:
By default, unless you manually provide a correlation ID, if there is a value stored at `process.env.CORRELATION_ID`, then MikroLog will automatically use it.

You can set the correlation ID _manually_ as part of the `enrich()` call:

```typescript
MikroLog.enrich({ correlationId: 'abc123' });
Expand Down
72 changes: 72 additions & 0 deletions biome.jsonc
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"vcs": { "enabled": false, "clientKind": "git", "useIgnoreFile": false },
"files": { "ignoreUnknown": false, "ignore": [] },
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"organizeImports": { "enabled": true },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"complexity": {
"noUselessThisAlias": "error",
"noUselessTypeConstraint": "error",
"useArrowFunction": "off"
},
"correctness": {
"noUnusedVariables": "error",
"useArrayLiterals": "off"
},
"style": {
"noNamespace": "error",
"useAsConstAssertion": "error",
"useBlockStatements": "off"
},
"suspicious": {
"noExplicitAny": "off",
"noExtraNonNullAssertion": "error",
"noMisleadingInstantiator": "error",
"noUnsafeDeclarationMerging": "error",
"useNamespaceKeyword": "error"
}
},
"ignore": ["node_modules/**"]
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "none",
"semicolons": "always"
}
},
"json": {
"formatter": {
"trailingCommas": "none"
}
},
"overrides": [
{
"include": ["*.ts", "*.tsx", "*.mts", "*.cts", "*.mjs"],
"linter": {
"rules": {
"performance": {
"noDelete": "off"
},
"complexity": {
"noForEach": "off",
"noThisInStatic": "off"
},
"suspicious": {
"noAssignInExpressions": "off",
"noPrototypeBuiltins": "off"
}
}
}
}
]
}
Loading

0 comments on commit 55e602a

Please sign in to comment.