@@ -9,7 +9,7 @@ This directory contains a script for publishing the Discourse Graph Obsidian plu
99
1010## Prerequisites
1111
12- 1 . ** Node.js and npm ** - Ensure you have Node.js 18 + installed
12+ 1 . ** Node.js and pnpm ** - Ensure you have Node.js 20 + installed, with pnpm@10 installed globally ( ` npm install -g pnpm ` )
13132 . ** Git** - For repository operations
14143 . ** GitHub Token** - For authentication (see Authentication section)
1515
@@ -42,7 +42,7 @@ The script automatically determines release type based on version format and alw
4242### BRAT Version Priority
4343
4444BRAT uses alphabetical ordering for pre-release identifiers. This is why we enforce:
45- - ** Internal** : ` alpha-* ` (comes first alphabetically)
45+ - ** Internal** : ` alpha-* ` (comes first alphabetically)
4646- ** External** : ` beta-* ` (comes after alpha, gets higher priority)
4747
4848This ensures that external beta releases always take precedence over internal alpha releases for BRAT auto-updates.
@@ -53,7 +53,7 @@ The script automatically determines the release type based on version format:
5353
5454** 🧪 Pre-release** (automatic detection)
5555- ** Triggers** : Any version with ` alpha ` or ` beta ` suffixes
56- - ** GitHub** : Marked as "Pre-release"
56+ - ** GitHub** : Marked as "Pre-release"
5757- ** Main Branch** : Not updated (keeps stable code in main)
5858- ** Use Case** : Testing, beta versions, internal releases
5959
@@ -122,7 +122,7 @@ tsx scripts/publish.ts --version 0.1.0-alpha-canvas-feature --release-name "Canv
122122tsx scripts/publish.ts --version 0.1.0-canvas-feature
123123```
124124
125- ### Beta Release for Public Testing
125+ ### Beta Release for Public Testing
126126``` bash
127127# ✅ Correct format with beta prefix - creates pre-release automatically
128128tsx scripts/publish.ts --version 1.0.0-beta.1 --release-name " Beta: New Graph View"
@@ -137,18 +137,18 @@ tsx scripts/publish.ts --version 1.0.0-test.1
137137tsx scripts/publish.ts --version 1.0.0
138138```
139139
140- ### Using npm script from obsidian directory
140+ ### Using pnpm script from obsidian directory
141141``` bash
142142cd apps/obsidian
143- npm run publish -- --version 1.0.0-beta.1
143+ pnpm run publish -- --version 1.0.0-beta.1
144144```
145145
146146## What the Script Does
147147
148148### For All Releases:
1491491 . ** Validates input** - Checks version format and arguments
1501502 . ** Detects release type** - Internal vs External based on version format
151- 3 . ** Builds the plugin** - Runs ` npm run build` to create distribution files
151+ 3 . ** Builds the plugin** - Runs ` pnpm run build` to create distribution files
1521524 . ** Copies source files** - Copies plugin source (excluding build artifacts)
1531535 . ** Creates GitHub release** - Always creates a release with:
154154 - Custom or default release name
@@ -184,7 +184,7 @@ Publishes to: `DiscourseGraphs/discourse-graph-obsidian`
184184### Repository State by Release Type:
185185
186186** Internal Release** : Repository unchanged, GitHub pre-release created
187- ** External Pre-release** : Repository unchanged, GitHub pre-release created
187+ ** External Pre-release** : Repository unchanged, GitHub pre-release created
188188** External Stable** : Repository main branch updated + GitHub stable release created
189189
190190## Troubleshooting
@@ -195,16 +195,16 @@ Publishes to: `DiscourseGraphs/discourse-graph-obsidian`
195195 ``` bash
196196 # ❌ Wrong
197197 tsx scripts/publish.ts
198-
199- # ✅ Correct
198+
199+ # ✅ Correct
200200 tsx scripts/publish.ts --version 1.0.0
201201 ```
202202
2032032 . ** "Invalid version format"**
204204 ``` bash
205205 # ❌ Wrong
206206 tsx scripts/publish.ts --version " beta-1"
207-
207+
208208 # ✅ Correct
209209 tsx scripts/publish.ts --version 1.0.0-beta.1
210210 ```
@@ -219,7 +219,7 @@ Publishes to: `DiscourseGraphs/discourse-graph-obsidian`
219219 - Verify repository exists and is accessible
220220
2212215 . ** "Required build files missing"**
222- - Run ` npm run build` manually to check for build errors
222+ - Run ` pnpm run build` manually to check for build errors
223223 - Ensure TypeScript compiles without errors
224224
2252256 . ** BRAT picking wrong version**
@@ -247,10 +247,10 @@ This is why the naming convention is critical for ensuring the right version get
247247
248248### Key Functions:
249249- ` isExternalRelease() ` - Determines if version is external (stable/beta) or internal (alpha)
250- - ` updateMainBranch() ` - Uses GitHub API to create proper commits
250+ - ` updateMainBranch() ` - Uses GitHub API to create proper commits
251251- ` createGithubRelease() ` - Creates releases with assets and automatic pre-release detection
252252- ` updateManifest() ` - Updates version in manifest.json
253253
254254### Security:
255255- Uses GitHub API instead of git commands for better security
256- - Never commits tokens to repository
256+ - Never commits tokens to repository
0 commit comments