Skip to content

Commit 3b5e1b1

Browse files
committed
docs: migrate from deno.json probitas alias to direct jsr imports
- Remove "probitas" import alias from deno.json imports - Remove "probitas" section from deno.json, create probitas.json instead - Update all documentation to use "jsr:@probitas/probitas" imports - Update sample scenario files in data/index/ and probitas/ - Fix File Naming Convention tree structure (src/probitas/ -> probitas/) - Update configuration docs to use probitas.json instead of deno.json
1 parent d9bdce0 commit 3b5e1b1

13 files changed

Lines changed: 50 additions & 71 deletions

.claude/content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Guidelines for writing and maintaining documentation content.
8080
Every concept should have a runnable code example:
8181

8282
```typescript
83-
import { client, expect, scenario } from "probitas";
83+
import { client, expect, scenario } from "jsr:@probitas/probitas";
8484

8585
export default scenario("Example")
8686
.resource("http", client.http.createHttpClient())

data/index/graphql_api.probitas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { client, expect, outdent, scenario } from "probitas";
1+
import { client, expect, outdent, scenario } from "jsr:@probitas/probitas";
22

33
export default scenario("GraphQL API Test", {
44
tags: ["integration", "graphql"],

data/index/grpc_service.probitas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { client, expect, scenario } from "probitas";
1+
import { client, expect, scenario } from "jsr:@probitas/probitas";
22

33
export default scenario("gRPC Service Test", {
44
tags: ["integration", "grpc"],

data/index/redis_cache.probitas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { client, expect, faker, scenario } from "probitas";
1+
import { client, expect, faker, scenario } from "jsr:@probitas/probitas";
22

33
export default scenario("Redis Cache Test", {
44
tags: ["integration", "redis"],

data/index/user_api.probitas.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { client, expect, faker, scenario } from "probitas";
1+
import { client, expect, faker, scenario } from "jsr:@probitas/probitas";
22

33
export default scenario("User API Integration Test", {
44
tags: ["integration", "http", "postgres"],

deno.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,22 @@
1616
"imports": {
1717
"@std/assert": "jsr:@std/assert@^1",
1818
"hono": "jsr:@hono/hono@^4",
19-
"marked": "npm:marked@^15",
20-
"probitas": "jsr:@probitas/probitas@^0"
19+
"marked": "npm:marked@^15"
2120
},
2221
"exclude": [
23-
"data/index/"
22+
"data/index/",
23+
"probitas/"
2424
],
2525
"lint": {
2626
"exclude": [
27-
"data/index/"
27+
"data/index/",
28+
"probitas/"
2829
]
2930
},
3031
"fmt": {
3132
"exclude": [
32-
"data/index/"
33-
]
34-
},
35-
"probitas": {
36-
"includes": [
37-
"probitas/**/*.probitas.ts"
33+
"data/index/",
34+
"probitas/"
3835
]
3936
}
4037
}

deno.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/client.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ scenario testing. All clients share common patterns:
1616
- **Built-in assertions**: Use `expect()` for response validation
1717

1818
```typescript
19-
import { client, expect, scenario } from "probitas";
19+
import { client, expect, scenario } from "jsr:@probitas/probitas";
2020

2121
export default scenario("API Test")
2222
.resource("http", () =>
@@ -351,7 +351,7 @@ See [Configuration](/docs/configuration#graphql-client) for all options.
351351
Fetch data with GraphQL queries:
352352

353353
```typescript
354-
import { outdent } from "probitas";
354+
import { outdent } from "jsr:@probitas/probitas";
355355

356356
const res = await graphql.query(
357357
outdent`

docs/configuration.md

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,27 @@ all available options and common configuration patterns.
55

66
## Project Configuration
77

8-
Configure Probitas CLI defaults in your `deno.json` or `deno.jsonc` file under
9-
the `probitas` section:
8+
Configure Probitas CLI defaults in a `probitas.json` file in your project root:
109

1110
```json
1211
{
13-
"imports": {
14-
"probitas": "jsr:@probitas/probitas@^0"
15-
},
16-
"probitas": {
17-
"reporter": "list",
18-
"includes": ["**/*.probitas.ts"],
19-
"excludes": [],
20-
"selectors": ["!tag:slow"],
21-
"maxConcurrency": 4,
22-
"maxFailures": 5
23-
}
12+
"includes": ["probitas/**/*.probitas.ts"],
13+
"excludes": ["**/*.skip.probitas.ts"],
14+
"reporter": "list",
15+
"maxConcurrency": 4,
16+
"timeout": "30s",
17+
"selectors": ["!tag:wip"]
2418
}
2519
```
2620

27-
| Option | Description | Default |
28-
| ---------------- | ----------------------------------------- | ---------------------- |
29-
| `reporter` | Output reporter: `list`, `json` | `"list"` |
30-
| `includes` | Glob patterns for scenario file discovery | `["**/*.probitas.ts"]` |
31-
| `excludes` | Glob patterns to exclude from discovery | `[]` |
32-
| `selectors` | Default selectors for filtering scenarios | `[]` |
33-
| `maxConcurrency` | Maximum parallel scenario execution | unlimited |
34-
| `maxFailures` | Stop after this many failures | unlimited |
21+
| Option | Description | Default |
22+
| ---------------- | ----------------------------------------- | ------------------------------- |
23+
| `includes` | Glob patterns for scenario file discovery | `["probitas/**/*.probitas.ts"]` |
24+
| `excludes` | Glob patterns to exclude from discovery | `[]` |
25+
| `reporter` | Output reporter: `list`, `json` | `"list"` |
26+
| `maxConcurrency` | Maximum parallel scenario execution | unlimited |
27+
| `timeout` | Default timeout for scenarios | `"30s"` |
28+
| `selectors` | Default selectors for filtering scenarios | `[]` |
3529

3630
### Selectors
3731

@@ -48,17 +42,15 @@ AND logic:
4842

4943
```json
5044
{
51-
"probitas": {
52-
"selectors": ["tag:api,!tag:slow"]
53-
}
45+
"selectors": ["tag:api,!tag:slow"]
5446
}
5547
```
5648

5749
This runs scenarios with `api` tag AND without `slow` tag.
5850

5951
### CLI Override
6052

61-
Command-line options override `deno.json` settings:
53+
Command-line options override `probitas.json` settings:
6254

6355
```bash
6456
# Override reporter
@@ -449,7 +441,7 @@ scenario("Test")
449441
### Conditional Resources
450442

451443
```typescript
452-
import { Skip } from "probitas";
444+
import { Skip } from "jsr:@probitas/probitas";
453445

454446
scenario("Conditional Features")
455447
.resource("http", () => createHttpClient(...))

docs/overview.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@ other backend services.
1616

1717
## Installation
1818

19-
### Add to deno.json
20-
21-
Add Probitas to your project's `deno.json`:
22-
23-
```json
24-
{
25-
"imports": {
26-
"probitas": "jsr:@probitas/probitas"
27-
}
28-
}
29-
```
30-
3119
### Install CLI
3220

3321
Install the CLI to run scenarios using the shell installer:
@@ -67,7 +55,7 @@ nix profile install github:jsr-probitas/cli
6755
## Quick Start
6856

6957
```typescript
70-
import { client, expect, scenario } from "probitas";
58+
import { client, expect, scenario } from "jsr:@probitas/probitas";
7159

7260
export default scenario("User API Test")
7361
.resource("http", () =>
@@ -88,14 +76,14 @@ export default scenario("User API Test")
8876

8977
## File Naming Convention
9078

91-
Scenario files should use the `.probitas.ts` extension:
79+
Scenario files should use the `.probitas.ts` extension and be placed in the
80+
`probitas/` directory:
9281

9382
```
94-
src/
95-
probitas/
96-
auth.probitas.ts
97-
user-crud.probitas.ts
98-
payment-flow.probitas.ts
83+
probitas/
84+
auth.probitas.ts
85+
user-crud.probitas.ts
86+
payment-flow.probitas.ts
9987
```
10088

10189
## Running Scenarios
@@ -210,7 +198,7 @@ import {
210198
spy,
211199
stub,
212200
tryOr,
213-
} from "probitas";
201+
} from "jsr:@probitas/probitas";
214202
```
215203

216204
## Next Steps

0 commit comments

Comments
 (0)