# ember-cli-app-version

> Adds App version number to Ember Inspector Info Tab

Latest version **7.0.0** (published 2024-06-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-app-version
pnpm add ember-cli-app-version
yarn add ember-cli-app-version
bun add ember-cli-app-version
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2024-06-10 |
| First published | 2014-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 18 |
| Dependencies | 2 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 55 |
| Author | Taras Mankovski |
| Maintainers | rwjblue, katiegengler, stefanpenner |
| Keywords | ember-addon |

## Links

- npm: https://www.npmjs.com/package/ember-cli-app-version
- Repository: https://github.com/ember-cli/ember-cli-app-version
- Homepage: https://github.com/ember-cli/ember-cli-app-version#readme
- Issues: https://github.com/ember-cli/ember-cli-app-version/issues
- npm.io page: https://npm.io/package/ember-cli-app-version

## Dependencies (2)

- [git-repo-info](https://npm.io/package/git-repo-info.md) ^2.1.1
- [ember-cli-babel](https://npm.io/package/ember-cli-babel.md) ^7.26.11

## Recent versions

- 7.0.0 (latest) — 2024-06-10
- 6.0.1 — 2023-06-15
- 6.0.0 — 2023-02-02
- 5.0.0 — 2021-03-08
- 4.0.0 — 2020-10-09
- 3.2.0 — 2018-04-26
- 3.1.3 — 2017-11-30
- 3.1.2 — 2017-11-29
- 3.1.1 — 2017-11-28
- 3.1.0 — 2017-08-16
- 2.1.0 — 2017-08-16
- 3.0.0 — 2017-03-25
- 2.0.2 — 2017-03-11
- 2.0.1 — 2016-10-25
- 2.0.0 — 2016-08-09
- … 16 more at https://npm.io/package/ember-cli-app-version/versions

## README

# ember-cli-app-version

[![CI](https://github.com/ember-cli/ember-cli-app-version/workflows/CI/badge.svg)](https://github.com/ember-cli/ember-cli-app-version/actions?query=workflow%3ACI)
[![NPM Version](https://badge.fury.io/js/ember-cli-app-version.svg)](https://badge.fury.io/js/ember-cli-app-version)
[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-app-version.svg)](https://emberobserver.com/addons/ember-cli-app-version)

Adds your Ember App's version to Info tab in Ember Inspector. The version is taken from your project's package.json#version.
If you add build metadata to the version, this addon will automatically append SHA to the end of the version.

## Compatibility

- Ember.js v3.28 or above
- Ember CLI v3.28 or above
- Node.js v18 or above

## Installation

```
ember install ember-cli-app-version
```

## Usage

![Ember Inspector Info Tab](https://www.evernote.com/shard/s51/sh/c2f52608-bc17-4d5c-ac76-dec044eeb2e2/2f08de0cfb77217502cfc3a9188d84bf/res/3fb1d3d9-d809-48f6-9d3b-6e9a4af29892/skitch.png?resizeSmall&width=832)

## {{app-version}} helper

This addon provides `{{app-version}}` helper that allows you to show your current app version in your app.

The addon has flags to display parts of the version:

- `{{app-version versionOnly=true}} // => 2.0.1`
- `{{app-version versionOnly=true showExtended=true}} // => 2.0.1-alpha.1`
- `{{app-version shaOnly=true}} // => <git SHA>`

Flags are `false` by default.

## Heroku

When running on Heroku the `.git` folder is not present, making it impossible to fetch the `git SHA`. A workaround for this is adding the below in your `config/environment.js`:

```js
// Heroku Git Hash support
if (process.env.SOURCE_VERSION) {
  const pkg = require('../package.json');
  const hash = process.env.SOURCE_VERSION.substr(0, 7);
  ENV['ember-cli-app-version'] = {
    version: `${pkg.version}+${hash}`,
  };
}
```

## Contributing

See the [Contributing](CONTRIBUTING.md) guide for details.

## License

This project is licensed under the [MIT License](LICENSE.md).

---
_Source: https://npm.io/package/ember-cli-app-version · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
