Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI
on:
workflow_dispatch:
pull_request:
branches:
- main
push:
branches:
- main
Expand All @@ -21,7 +19,12 @@ jobs:
with:
node-version: 18
- run: npm install
- run: npm run check-format
- name: Check format in library
run: npm run check-format
- name: Check format in logger example
run: cd examples/logger && npm install && npm run check-format
- name: Check format in rpc-app-router example
run: cd examples/trpc-app-router && npm install && npm run check-format

build-and-test:
name: Build and Test
Expand All @@ -30,25 +33,33 @@ jobs:
matrix:
node:
- 18.x
- 19.x
- 20.x
- 21.x
- 22.x
- 23.x
- 24.x
- latest
install-cmd:
- npm install
- npm update
exclude:
- node: 18.x
install-cmd: npm update
- node: 19.x
install-cmd: npm update
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: ${{ matrix.install-cmd }}
- run: npm run build
- run: npm test
- run: cd examples/logger && npm install && npm run build
if: ${{ matrix.install-cmd == 'npm install' }} # because of linked local dependency @logtail/next: file:../..
- name: Building library
run: npm run build
- name: Running tests
run: npm test
- name: Building logger example
run: cd examples/logger && ${{ matrix.install-cmd }} && npm run build
- name: Building rpc-app-router example
run: cd examples/trpc-app-router && ${{ matrix.install-cmd }} && npm run build

publish:
name: Publish
Expand Down
3 changes: 2 additions & 1 deletion examples/logger/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
:root {
--max-width: 1100px;
--border-radius: 12px;
--font-mono: ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
--font-mono:
ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono',
'Roboto Mono', 'Oxygen Mono', 'Ubuntu Monospace', 'Source Code Pro',
'Fira Mono', 'Droid Sans Mono', 'Courier New', monospace;

Expand Down
2 changes: 1 addition & 1 deletion examples/logger/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';
import './globals.css';
import { BetterStackWebVitals } from '@logtail/next';
import { BetterStackWebVitals } from '@logtail/next/webVitals';

export default function RootLayout({
children,
Expand Down
2 changes: 1 addition & 1 deletion examples/logger/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import styles from './page.module.css';
import Link from 'next/link';
import { useLogger } from '@logtail/next';
import { useLogger } from '@logtail/next/hooks';

function Home() {
const logger = useLogger();
Expand Down
3 changes: 2 additions & 1 deletion examples/logger/error.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client';

import { useLogger, LogLevel } from '@logtail/next';
import { LogLevel } from '@logtail/next';
import { useLogger } from '@logtail/next/hooks';
import { usePathname } from 'next/navigation';

export default function ErrorPage({
Expand Down
Loading