The jenkinsfile creates a new branch, changes the values in package.json and publish the version to NPM registry.
For authentication, create a Git UsernameAndPassword with Auth token and set to Jenkins credential, likewise generate a classic token on npmjs.com/access-token and string credentaial for the same in Jenkins credential.
Credential kind for Github auth with Access Token- Username with password Credential kind for NPM Registry auth with Access Token- Secret text.
Here, you might also want to change the "name": "dibae101", in package.json.