Skip to content

Commit ff51f6b

Browse files
committed
chore: source docs version from package.json, not npm view
bump-docs.cjs read the version from `npm view fuse.js version` (the latest published version). The release flow runs `npm run docs:bump` before `npm publish`, so it saw the previous version and bumped the docs one release behind (hit on 7.4.1). Read from the local package.json, which standard-version bumps before the docs step, so it reflects the version being cut. Also drops the network call and child_process use.
1 parent 08b77d9 commit ff51f6b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

scripts/bump-docs.cjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
//Load the library and specify options
2-
const { execSync } = require('child_process')
32
const replace = require('replace-in-file')
4-
const VERSION = process.env.VERSION || execSync('npm view fuse.js version').toString().trim()
3+
// Use the version in package.json (the one being released) rather than the
4+
// latest published version from `npm view` -- otherwise running this before
5+
// `npm publish` (as the release flow does) bumps the docs to the previous
6+
// version and lags one release behind.
7+
const VERSION = process.env.VERSION || require('../package.json').version
58

69
const options = {
710
files: './docs/getting-started.md',

0 commit comments

Comments
 (0)