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

ember-compatibility-helpers

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-compatibility-helpers - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

26

index.js

@@ -50,9 +50,19 @@ 'use strict';

parentOptions.babel = parentOptions.babel || {};
const plugins = parentOptions.babel.plugins = parentOptions.babel.plugins || [];
const plugins = parentOptions.babel.plugins = parentOptions.babel.plugins || [];
const comparisonPlugin = this._getComparisonPlugin(this.emberVersion);
const debugPlugin = this._getDebugPlugin(this.emberVersion, this.parentChecker);
plugins.push(comparisonPlugin, debugPlugin);
if (this._usingBabel7) {
if (!plugins.find(p => Array.isArray(p) && p[2] === comparisonPlugin[2])) {
plugins.push(comparisonPlugin);
}
if (!plugins.find(p => Array.isArray(p) && p[2] === debugPlugin[2])) {
plugins.push(debugPlugin);
}
} else {
plugins.push(comparisonPlugin, debugPlugin);
}
this._registeredWithBabel = true;

@@ -66,6 +76,14 @@ },

return [require.resolve('./comparision-plugin.js'), { emberVersion: trueEmberVersion, root: this.project.root, name: parentName }];
let plugin = [require.resolve('./comparision-plugin.js'), { emberVersion: trueEmberVersion, root: this.project.root, name: parentName }, ];
if (this._usingBabel7) {
plugin.push(`ember-compatibility-helpers:comparison-plugin:${parentName}`);
}
return plugin;
},
_getDebugPlugin(emberVersion, parentChecker) {
const parentName = typeof this.parent.name === 'function' ? this.parent.name() : this.parent.name;
const options = {

@@ -89,3 +107,3 @@ debugTools: {

if (this._usingBabel7) {
plugin.push('ember-compatibility-helpers:debug-macros');
plugin.push(`ember-compatibility-helpers:debug-macros:${parentName}`);
}

@@ -92,0 +110,0 @@

5

package.json
{
"name": "ember-compatibility-helpers",
"version": "1.2.0",
"version": "1.2.1",
"description": "Zero-cost compatibility flags and helpers for Ember.js",

@@ -56,2 +56,5 @@ "keywords": [

},
"resolutions": {
"testem": "~2.0.0"
},
"engines": {

@@ -58,0 +61,0 @@ "node": "^4.5 || 6.* || >= 7.*"

@@ -46,2 +46,15 @@ [![Build Status](https://travis-ci.org/pzuraq/ember-compatibility-helpers.svg?branch=master)](https://travis-ci.org/pzuraq/ember-compatibility-helpers) [![npm version](https://badge.fury.io/js/ember-compatibility-helpers.svg)](https://badge.fury.io/js/ember-compatibility-helpers)

## Version Identifiers
Version strings passed to version checker functions, such as `gte` or `lte`, must be fully qualified versions. Version ranges or shorthands are not supported.
```
// Do this:
lte('3.13.0-beta.1')
// Not this:
lte('3.12'); // won't work!
lte('^3.12.0'); // won't work!
```
## Example Usage

@@ -76,3 +89,3 @@

boo() {
if (gte('my-addon-name', '3.5')) {
if (gte('my-addon-name', '3.5.0-beta.3')) {
return {};

@@ -79,0 +92,0 @@ } else {

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