Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-new-version-detection

Package Overview
Dependencies
Maintainers
15
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-new-version-detection

Our snazzy add-on for checking if a new version of your app is available

  • 6.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
15
Created
Source

ember-new-version-detection

This is a highly opinionated add-on. It's incredibly specific to our needs at Precision Nutrition. We welcome pull requests to make this more flexible.

We needed a way to test if a new version of our Ember apps were being reported by our API. Our API does this by reporting back the SHA of the currently available release for the specific app in question.

Our Ember apps report back:

  • X-App-Name: the name of the app in question
  • X-App-Version: the version the app is (this comes from ember-cli-app-version)

And our API reports back:

  • X-Current-Version: the current version as understood by the API (we use ember-cli-deploy to manage this)

Compatibility

  • Ember.js v3.24 or above
  • Ember CLI v3.24 or above
  • Node.js v12 or above

Installation

ember install ember-new-version-detection

Configuring your application

In your config/environment.js file you'll need to add a block like this:

const ENV = {
  // snip

  'ember-new-version-detection': {
    appName: 'pickles' /* whatever your app is called by the API */,
  },

  // snip
};

Hooking up the detector

// app/adapters/application.js

import VersionDetectingJsonApiAdapter from 'ember-new-version-detection/adapter/json-api';

export default class MyAdapter extends VersionDetectingJsonApiAdapter {
  // snip
}

I want to ignore an upgrade

Not a problem. Example:

this.newVersionDetector.ignoreThisUpgrade();

Help! I Don't Use JSON:API!

The implementation of the adapter is pretty straightforward. Just copy and paste from our code.

Keywords

FAQs

Package last updated on 12 Aug 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc