↩︎

edit-package

Read, write and reset package.json

const {
    read,
    write,
    reset,
} = require('edit-package')

const { version } = await read()

// Change a value
await write({publishConfig: {tag: 'next'}})

// Reset to original value

await reset()