Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update-notifier output contains template variable names instead of actual versions and update command #199

Closed
nina-py opened this issue Nov 21, 2020 · 2 comments

Comments

@nina-py
Copy link

nina-py commented Nov 21, 2020

Rather than display the current version, latest version and command to update, this package shows me the template of the notification message.

Reporting here as it appears to be an upstream bug for the Gatsby project: gatsbyjs/gatsby#28201.

I have run the https://github.com/yeoman/update-notifier/blob/master/example.js locally with one modification - I added dumping the object as well and this is what I get:

$ node example.js

UpdateNotifier {
  options: {
    pkg: { name: 'public-ip', version: '0.9.2' },
    updateCheckInterval: 0,
    distTag: 'latest'
  },
  packageName: 'public-ip',
  packageVersion: '0.9.2',
  updateCheckInterval: 0,
  disabled: false,
  shouldNotifyInNpmScript: undefined,
  config: Configstore {
    path: '/home/ninap/.config/configstore/update-notifier-public-ip.json'
  },
  update: {
    latest: '4.0.2',
    current: '0.9.2',
    type: 'major',
    name: 'public-ip'
  }
}

   ╭──────────────────────────────────────────────────────────╮
   │                                                          │
   │   Update available {currentVersion} → {latestVersion}    │
   │              Run {updateCommand} to update               │
   │                                                          │
   ╰──────────────────────────────────────────────────────────╯

Output of echo $PATH $NODE_PATH && node -e 'console.log(process.platform, process.versions)':

/home/ninap/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/ninap/.local/bin
linux {
  node: '14.15.0',
  v8: '8.4.371.19-node.17',
  uv: '1.40.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.16.1',
  modules: '83',
  nghttp2: '1.41.0',
  napi: '7',
  llhttp: '2.1.3',
  openssl: '1.1.1g',
  cldr: '37.0',
  icu: '67.1',
  tz: '2020a',
  unicode: '13.0'
}
@sindresorhus
Copy link
Member

This was fixed a while ago: https://github.com/yeoman/update-notifier/releases/tag/v5.0.1

@nina-py
Copy link
Author

nina-py commented Nov 22, 2020

Thank you @sindresorhus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants