Skip to content

Commit a43823a

Browse files
committed
docs(version): ✨ Pulling version number from helia.
1 parent 43932a5 commit a43823a

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
"release": "run-s build docs:no-publish npm:release docs",
3434
"npm:release": "aegir exec --bail false npm -- publish",
3535
"release:rc": "aegir release-rc",
36-
"docs": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude packages/interop --excludeExternals",
37-
"docs:no-publish": "NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
36+
"update:version": "node scripts/update-version.js",
37+
"docs": "npm run update:version && NODE_OPTIONS=--max_old_space_size=8192 aegir docs -- --exclude packages/interop --excludeExternals",
38+
"docs:no-publish": "npm run update:version && NODE_OPTIONS=--max_old_space_size=8192 aegir docs --publish false -- --exclude packages/interop"
3839
},
3940
"devDependencies": {
4041
"aegir": "^41.0.0",

scripts/update-version.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import heliaPkg from '../packages/helia/package.json' assert { type: 'json'}
2+
import rootPkg from '../package.json' assert { type: 'json'}
3+
import { writeFile } from 'fs/promises'
4+
5+
rootPkg.version = heliaPkg.version
6+
await writeFile(new URL('../package.json', import.meta.url), `${JSON.stringify(rootPkg, null, 2)}\n`)

0 commit comments

Comments
 (0)