@sudobility/sudojo_types 1.1.10 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CLAUDE.md +33 -14
  2. package/package.json +7 -7
package/CLAUDE.md CHANGED
@@ -4,26 +4,31 @@ This file provides context for AI assistants working on this codebase.
4
4
 
5
5
  ## Project Overview
6
6
 
7
- `@sudobility/sudojo-types` is a TypeScript types package for the Sudojo API (a Sudoku learning platform). It contains:
7
+ `@sudobility/sudojo_types` is a TypeScript types package for the Sudojo API (a Sudoku learning platform). It contains:
8
8
  - Entity types (database models)
9
9
  - Request/response types for API endpoints
10
10
  - Query parameter types
11
11
  - Helper functions for creating responses
12
12
 
13
- ## Commands
13
+ Published to npm under `@sudobility` scope with public access.
14
+
15
+ ## Runtime & Package Manager
16
+
17
+ **This project uses Bun.** Do not use npm, yarn, or pnpm.
14
18
 
15
19
  ```bash
16
- npm run verify # Run all checks (typecheck, lint, test, build)
17
- npm run typecheck # Type-check without emitting
18
- npm run lint # Run ESLint
19
- npm run lint:fix # Run ESLint with auto-fix
20
- npm run format # Format code with Prettier
21
- npm run format:check # Check formatting without changes
22
- npm run build # Build ESM and CJS outputs to dist/
23
- npm run clean # Remove dist/
24
- npm run dev # Watch mode for development
25
- npm test # Run tests once
26
- npm run test:watch # Run tests in watch mode
20
+ bun install # Install dependencies
21
+ bun run verify # Run all checks (typecheck, lint, test, build)
22
+ bun run typecheck # Type-check without emitting
23
+ bun run lint # Run ESLint
24
+ bun run lint:fix # Run ESLint with auto-fix
25
+ bun run format # Format code with Prettier
26
+ bun run format:check # Check formatting without changes
27
+ bun run build # Build ESM and CJS outputs to dist/
28
+ bun run clean # Remove dist/
29
+ bun run dev # Watch mode for development
30
+ bun run test # Run tests once
31
+ bun run test:watch # Run tests in watch mode
27
32
  ```
28
33
 
29
34
  ## Code Conventions
@@ -71,7 +76,7 @@ Types in `src/index.ts` are organized into sections:
71
76
 
72
77
  - Single quotes, semicolons, trailing commas (es5)
73
78
  - 80 character line width, 2 space indentation
74
- - Run `npm run format` before committing
79
+ - Run `bun run format` before committing
75
80
 
76
81
  ## Testing
77
82
 
@@ -115,3 +120,17 @@ Package is published to npm under `@sudobility` scope with public access.
115
120
  **Manual**: Run `npm publish` (triggers `prepublishOnly` to verify and build)
116
121
 
117
122
  **Automatic**: Bump version in `package.json` and push to `main` - CI/CD will publish automatically.
123
+
124
+ ## Common Tasks
125
+
126
+ ### Add New Type
127
+ 1. Define the type in `src/index.ts` in the appropriate section
128
+ 2. Export it from the file
129
+ 3. Add type tests in `src/index.test.ts`
130
+ 4. Run `bun run verify` to ensure everything passes
131
+
132
+ ### Update Existing Type
133
+ 1. Modify the type definition
134
+ 2. Update any dependent types
135
+ 3. Update tests to reflect changes
136
+ 4. Run `bun run verify`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/sudojo_types",
3
- "version": "1.1.10",
3
+ "version": "1.1.15",
4
4
  "description": "TypeScript types for Sudojo API - Sudoku learning platform",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -13,9 +13,9 @@
13
13
  }
14
14
  },
15
15
  "scripts": {
16
- "build": "npm run build:esm && npm run build:cjs",
16
+ "build": "bun run build:esm && bun run build:cjs",
17
17
  "build:esm": "tsc -p tsconfig.esm.json",
18
- "build:cjs": "tsc -p tsconfig.cjs.json && npm run build:cjs-rename",
18
+ "build:cjs": "tsc -p tsconfig.cjs.json && bun run build:cjs-rename",
19
19
  "build:cjs-rename": "find dist -name '*.js' -not -name '*.cjs' -exec sh -c 'cp \"$1\" \"${1%.js}.cjs\"' _ {} \\;",
20
20
  "clean": "rimraf dist",
21
21
  "dev": "tsc --watch",
@@ -27,8 +27,8 @@
27
27
  "format": "prettier --write \"src/**/*.{ts,js,json,md}\"",
28
28
  "format:check": "prettier --check \"src/**/*.{ts,js,json,md}\"",
29
29
  "typecheck": "tsc --noEmit",
30
- "verify": "npm run typecheck && npm run lint && npm run test && npm run build",
31
- "prepublishOnly": "npm run clean && npm run verify"
30
+ "verify": "bun run typecheck && bun run lint && bun run test && bun run build",
31
+ "prepublishOnly": "bun run clean && bun run verify"
32
32
  },
33
33
  "files": [
34
34
  "dist/**/*",
@@ -44,11 +44,11 @@
44
44
  "author": "Sudobility",
45
45
  "license": "MIT",
46
46
  "peerDependencies": {
47
- "@sudobility/types": "^1.9.41"
47
+ "@sudobility/types": "^1.9.44"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@eslint/js": "^9.38.0",
51
- "@sudobility/types": "^1.9.41",
51
+ "@sudobility/types": "^1.9.44",
52
52
  "@typescript-eslint/eslint-plugin": "^8.46.2",
53
53
  "@typescript-eslint/parser": "^8.46.2",
54
54
  "eslint": "^9.38.0",