{"id":17803388,"url":"https://github.com/sethwebster/ember-cli-new-version","last_synced_at":"2025-04-05T07:04:09.091Z","repository":{"id":3121620,"uuid":"48504852","full_name":"sethwebster/ember-cli-new-version","owner":"sethwebster","description":"A convention based update notification for Ember. With this addon, you can detect a new version and notify the user to refresh the page","archived":false,"fork":false,"pushed_at":"2024-12-10T16:15:47.000Z","size":3133,"stargazers_count":26,"open_issues_count":20,"forks_count":27,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T06:04:40.338Z","etag":null,"topics":["ember","ember-cli","module","notifications","npm"],"latest_commit_sha":null,"homepage":"http://sethwebster.github.io/ember-cli-new-version/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sethwebster.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-23T18:19:32.000Z","updated_at":"2024-10-04T22:08:09.000Z","dependencies_parsed_at":"2024-06-18T19:45:56.567Z","dependency_job_id":"811be340-53a9-4d73-9f16-04525678bb10","html_url":"https://github.com/sethwebster/ember-cli-new-version","commit_stats":{"total_commits":168,"total_committers":25,"mean_commits":6.72,"dds":0.5476190476190477,"last_synced_commit":"ec2b0e0298971bc5f72e1567d0588b570f187cd0"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2Fember-cli-new-version","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2Fember-cli-new-version/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2Fember-cli-new-version/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2Fember-cli-new-version/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethwebster","download_url":"https://codeload.github.com/sethwebster/ember-cli-new-version/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ember","ember-cli","module","notifications","npm"],"created_at":"2024-10-27T12:46:39.527Z","updated_at":"2025-04-05T07:04:09.057Z","avatar_url":"https://github.com/sethwebster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-cli-new-version\n\nA convention-based version update notifier. Use it to notify users already on the page that a new version has been deployed.\n\n## Compatibility\n\n- Ember.js v3.20 or above\n- Ember CLI v3.20 or above\n- Node.js v20 or above (should still work with older versions)\n\n## Usage\n\n1. Add this add-on as you would any other:\n\n```bash\n\u003e ember install ember-cli-new-version\n```\n\n2. Add a version file to your app, eg:\n   _./public/VERSION.txt_\n\n```bash\n1.0.0\n```\n\n3. Include the component in your view:\n\n```handlebars\n\u003cNewVersionNotifier /\u003e\n```\n\n**voila**!\n\n## Configuration\n\nTo setup, you should first configure the service through `config/environment`:\n\n```javascript\nmodule.exports = function (environment) {\n  var ENV = {\n    newVersion: {\n      currentVersion: null,\n      versionFileName: 'VERSION.txt',\n      updateInterval: 60000,\n      firstCheckInterval: 0,\n      enableInTests: false,\n      enableInDev: false,\n      maxCountInTesting: 10,\n    },\n  };\n};\n```\n\n---\n\n- `currentVersion` - The current version of the app if not using [Automatic VERSION file creation][#automatic version file creation] **default: null**\n- `versionFileName` - the name of the file on the server to check **default: /VERSION.txt**\n- `updateInterval` - the amount of time, in milliseconds, to wait between version checks **default: 60000**\n- `firstCheckInterval` - the amount of time, in milliseconds, to wait before the first version check is run after booting the application **default: 0**\n- `enableInTests` - Should the version checking run in test environments? **default: false**\n- `enableInDev` - Should the version checking run in the dev environments? **default: false**\n- `maxCountInTesting` - How many times to check for a new version in tests. **default: 10**\n\n## Automatic Version File Creation\n\nIf no `VERSION.txt` file exists it will be automatically generated during the build process\nwith the value of `currentVersion` or the `version` from `package.json`.\n\n### Supports `ember-cli-app-version`\n\nSince version 4.0.0 this addons will use the version string provided by [ember-cli-app-version](https://github.com/ember-cli/ember-cli-app-version) if no `currentVersion` is configured.\n\nAll you have to do is install `ember-cli-app-version`.\n\nThen an update is triggered based on full version strings with build metadata such as `1.0.0-beta-2-e1dffe1`.\n\n### Notifier Configuration and Interface\n\n---\n\n- `updateMessage` - the message to show to users when update has been detected. There are two tokens allowed in this string: `{newVersion}` and `{oldVersion}` which will replaced with their respective values.\n  eg. (and **default**). \"This application has been updated from version {oldVersion} to {newVersion}. Please save any work, then refresh browser to see changes.\"\n- `showReload` - _true_ shows a reload button the user can click to refresh. _false_ hides the button. **default: true**\n- `reloadButtonText` - Sets the text for the default reload button. **default: \"Reload\"**\n\n```handlebars\n\u003cNewVersionNotifier\n  @updateMessage='A new version was released: {newVersion}'\n  @showReload={{true}}\n/\u003e\n```\n\n### Custom Notification\n\nBy default the notification is styled as a Bootstrap Alert. If you want custom layouts or\nto use a different framework, then you can define your own markup for the notification.\n\n```hbs\n\u003cNewVersionNotifier as |version lastVersion reload close|\u003e\n  \u003cdiv class='custom-notification'\u003e\n    Reload to update to the new version ({{version}}) of this application\n    \u003cbutton type='button' {{on 'click' reload}}\u003eReload\u003c/button\u003e\n    \u003cbutton type='button' {{on 'click' close}}\u003eClose\u003c/button\u003e\n  \u003c/div\u003e\n\u003c/NewVersionNotifier\u003e\n```\n\n## Contributing\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethwebster%2Fember-cli-new-version","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethwebster%2Fember-cli-new-version","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethwebster%2Fember-cli-new-version/lists"}