Skip to content

Commit eeb5801

Browse files
petyosiclaude
andauthored
Upgrade repo automation (#87)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 4055932 commit eeb5801

83 files changed

Lines changed: 11185 additions & 23965 deletions

File tree

Some content is hidden

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

.changeset/otel-dependency-bump.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@pydantic/logfire-browser': patch
3+
'@pydantic/logfire-cf-workers': patch
4+
'@pydantic/logfire-node': patch
5+
---
6+
7+
Update OpenTelemetry dependencies to latest versions

.claude/settings.local.json

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,29 @@
1111
"Bash(git mv:*)",
1212
"Bash(npm install)",
1313
"Bash(npm run test:*)",
14-
"Bash(npm run ci:*)"
14+
"Bash(npm run ci:*)",
15+
"Bash(git show:*)",
16+
"Bash(pnpm install:*)",
17+
"Bash(npm view:*)",
18+
"Bash(pnpm info:*)",
19+
"Bash(curl:*)",
20+
"Bash(pnpm outdated:*)",
21+
"Bash(find:*)",
22+
"Bash(grep:*)",
23+
"Bash(pnpm update:*)",
24+
"Bash(pnpm run ci:*)",
25+
"Bash(pnpm exec tsc:*)",
26+
"Bash(pnpm exec prettier:*)",
27+
"Bash(pnpm run build:*)",
28+
"Bash(ls:*)",
29+
"Bash(pnpm exec next lint --help:*)",
30+
"Bash(pnpm run typecheck:*)",
31+
"Bash(pnpm run lint:*)",
32+
"Bash(pnpm run format-check:*)",
33+
"Bash(pnpm run format:*)",
34+
"Bash(git config:*)",
35+
"Bash(pnpm exec lefthook:*)",
36+
"Bash(done)"
1537
],
1638
"deny": [],
1739
"ask": []

.github/workflows/main.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,32 @@ jobs:
1414
- name: Begin CI...
1515
uses: actions/checkout@v4
1616

17-
- name: Use Node 22
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
20+
- name: Use Node 24
1821
uses: actions/setup-node@v4
1922
with:
20-
node-version: 22.x
23+
node-version: 24.x
24+
cache: 'pnpm'
2125

2226
- name: Install dependencies
23-
run: |
24-
npm install
25-
npm install --workspaces
27+
run: pnpm install --frozen-lockfile
28+
29+
- name: Build
30+
run: pnpm run build
31+
32+
- name: Type check
33+
run: pnpm run typecheck
2634

27-
- name: run CI checks
28-
run: |
29-
npm run ci
35+
- name: Lint
36+
run: pnpm run lint
37+
38+
- name: Format check
39+
run: pnpm run format-check
40+
41+
- name: Test
42+
run: pnpm run test
3043

3144
release:
3245
needs: [build]
@@ -42,22 +55,23 @@ jobs:
4255
- name: Checkout
4356
uses: actions/checkout@v4
4457

45-
- name: Setup Node 22
58+
- name: Install pnpm
59+
uses: pnpm/action-setup@v4
60+
61+
- name: Setup Node 24
4662
uses: actions/setup-node@v4
4763
with:
48-
node-version: 22.x
64+
node-version: 24.x
65+
cache: 'pnpm'
4966

5067
- name: Install dependencies
51-
run: |
52-
npm install -g npm@latest
53-
npm install
54-
npm install --workspaces
68+
run: pnpm install --frozen-lockfile
5569

5670
- name: Release
5771
id: changesets
5872
uses: changesets/action@v1
5973
with:
60-
publish: npm run release
74+
publish: pnpm run release
6175
env:
6276
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6377
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
node_modules
22
packages/*/*.tgz
3-
.turbo
43
.env
54
scratch/
5+
**/.turbo

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
strict-peer-dependencies=true
2+
auto-install-peers=false
3+
resolve-peers-from-workspace-root=false

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
dist
3+
.next
4+
pnpm-lock.yaml
5+
*.tgz
6+
**/.turbo
7+
CHANGELOG.md

CLAUDE.md

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is a monorepo for the **Pydantic Logfire JavaScript SDK** - an observabilit
88

99
## Repository Structure
1010

11-
This is an **npm workspace monorepo** managed with **Turborepo**:
11+
This is a **pnpm workspace monorepo**:
1212

1313
- `packages/logfire-node` - Node.js SDK with automatic OpenTelemetry instrumentation
1414
- `packages/logfire-api` - Core API package (published as `logfire`) that can be used standalone for manual tracing (no auto-instrumentation)
@@ -59,40 +59,40 @@ This is an **npm workspace monorepo** managed with **Turborepo**:
5959
### Development Setup
6060

6161
```bash
62-
npm install
62+
pnpm install
6363
```
6464

6565
### Building
6666

6767
```bash
6868
# Build all packages
69-
npm run build
69+
pnpm run build
7070

7171
# Build in watch mode (for development)
72-
npm run dev
72+
pnpm run dev
7373
```
7474

7575
### Testing
7676

7777
```bash
7878
# Run all tests
79-
npm run test
79+
pnpm run test
8080

8181
# Run tests for a specific package
82-
cd packages/logfire-node && npm test
82+
cd packages/logfire-node && pnpm test
8383
```
8484

85-
### Linting and Type Checking
85+
### Linting, Type Checking, and Formatting
8686

8787
```bash
88-
# Run both typecheck and lint across all packages
89-
npm run ci
90-
91-
# Just linting
92-
turbo lint
93-
94-
# Just type checking
95-
turbo typecheck
88+
# Run all checks (build, typecheck, lint, format-check, test)
89+
pnpm run check
90+
91+
# Individual commands
92+
pnpm run typecheck # Type checking
93+
pnpm run lint # Linting
94+
pnpm run format-check # Check formatting
95+
pnpm run format # Fix formatting
9696
```
9797

9898
### Working with Examples
@@ -104,10 +104,10 @@ Start an example to test changes:
104104
cd examples/node # or express, nextjs, cf-worker, etc.
105105

106106
# Install dependencies (if needed)
107-
npm install
107+
pnpm install
108108

109109
# Run the example (check the example's package.json for scripts)
110-
npm start # or npm run dev
110+
pnpm start # or pnpm run dev
111111
```
112112

113113
### Changesets (Version Management)
@@ -116,10 +116,10 @@ This project uses Changesets for version management:
116116

117117
```bash
118118
# Add a changeset when making changes
119-
npm run changeset-add
119+
pnpm run changeset-add
120120

121121
# Publish packages (maintainers only)
122-
npm run release
122+
pnpm run release
123123
```
124124

125125
### Running a Single Test
@@ -129,16 +129,16 @@ npm run release
129129
cd packages/logfire-api # or packages/logfire-node
130130

131131
# Run vitest with a filter
132-
npm test -- -t "test name pattern"
132+
pnpm test -- -t "test name pattern"
133133
```
134134

135135
## Development Workflow
136136

137137
1. Make changes in `packages/` source code
138-
2. Run `npm run build` to rebuild packages (or `npm run dev` for watch mode)
138+
2. Run `pnpm run build` to rebuild packages (or `pnpm run dev` for watch mode)
139139
3. Test changes using examples in `examples/` directory
140-
4. Run `npm run ci` to ensure linting and type checking pass
141-
5. Add a changeset if the changes warrant a version bump: `npm run changeset-add`
140+
4. Run `pnpm run check` to ensure all checks pass (build, typecheck, lint, format, test)
141+
5. Add a changeset if the changes warrant a version bump: `pnpm run changeset-add`
142142

143143
## Important Implementation Details
144144

@@ -182,4 +182,4 @@ The project requires **Node.js 22** (see `engines` in root package.json).
182182

183183
## Package Manager
184184

185-
Uses **npm 10.9.2** (enforced via `packageManager` field).
185+
Uses **pnpm 10.28.0** (enforced via `packageManager` field).

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Contributing to the Pydantic Logfire JavaScript SDK - instructions
22

3-
1. Fork and clone the repository.
4-
2. Run `npm install`.
3+
1. Fork and clone the repository.
4+
2. Run `pnpm install`.
55
3. Start the relevant example from `examples` and modify it accordingly to illustrate the change/feature you're working on.
6-
4. Modify the package(s) source code located in `packages`, run `npm run build` to rebuild.
6+
4. Modify the package(s) source code located in `packages`, run `pnpm run build` to rebuild.
77
5. Commit your changes and push to your fork.
88
6. Submit a pull request.
99

0 commit comments

Comments
 (0)