An experimental TypeSpec syntax for Lexicon

refactor: switch to pnpm workspaces

- Add pnpm-workspace.yaml
- Add .npmrc for pnpm settings
- Update all package.json to use pnpm commands
- Use workspace:* protocol for internal deps
- Move example TypeSpec files to typlex/ folder
- Update example to generate lexicons/ (alongside where schemas/ would go)

Structure:
- packages/emitter - @typlex/emitter
- packages/cli - @typlex/cli
- packages/example - @typlex/example
- typlex/ - TypeSpec source
- lexicons/ - Generated JSON (from typlex)
- schemas/ - Would be from @atproto/lexicon CLI

All tests passing (22/22)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+25 -13
+2
.npmrc
···
··· 1 + # Use pnpm for this monorepo 2 + shamefully-hoist=true
+9 -9
package.json
··· 3 "version": "0.1.0", 4 "private": true, 5 "description": "TypeSpec-based IDL for ATProto Lexicons", 6 - "workspaces": [ 7 - "packages/*" 8 - ], 9 "scripts": { 10 - "build": "npm run build -w @typlex/emitter && npm run build -w @typlex/cli", 11 - "test": "npm run test:ci -w @typlex/emitter", 12 - "test:watch": "npm test -w @typlex/emitter", 13 - "example": "npm run build -w @typlex/example", 14 - "validate": "npm run build && npm run test && npm run example" 15 }, 16 "repository": { 17 "type": "git", ··· 25 "idl" 26 ], 27 "author": "", 28 - "license": "MIT" 29 }
··· 3 "version": "0.1.0", 4 "private": true, 5 "description": "TypeSpec-based IDL for ATProto Lexicons", 6 "scripts": { 7 + "build": "pnpm -r build", 8 + "test": "pnpm --filter @typlex/emitter test", 9 + "test:watch": "pnpm --filter @typlex/emitter test:watch", 10 + "example": "pnpm --filter @typlex/example build", 11 + "validate": "pnpm build && pnpm test" 12 }, 13 "repository": { 14 "type": "git", ··· 22 "idl" 23 ], 24 "author": "", 25 + "license": "MIT", 26 + "devDependencies": { 27 + "typescript": "^5.0.0" 28 + } 29 }
+3 -4
packages/example/package.json
··· 4 "private": true, 5 "type": "module", 6 "scripts": { 7 - "typlex": "typlex main.tsp", 8 - "build": "npm run typlex" 9 }, 10 "dependencies": { 11 "@typespec/compiler": "^0.64.0", 12 - "@typlex/emitter": "*", 13 - "@typlex/cli": "*" 14 }, 15 "devDependencies": { 16 "typescript": "^5.0.0"
··· 4 "private": true, 5 "type": "module", 6 "scripts": { 7 + "build": "typlex typlex/main.tsp" 8 }, 9 "dependencies": { 10 "@typespec/compiler": "^0.64.0", 11 + "@typlex/emitter": "workspace:*", 12 + "@typlex/cli": "workspace:*" 13 }, 14 "devDependencies": { 15 "typescript": "^5.0.0"
+9
pnpm-lock.yaml
···
··· 1 + lockfileVersion: '9.0' 2 + 3 + settings: 4 + autoInstallPeers: true 5 + excludeLinksFromLockfile: false 6 + 7 + importers: 8 + 9 + .: {}
+2
pnpm-workspace.yaml
···
··· 1 + packages: 2 + - 'packages/*'