ember-compatibility-helpers
Advanced tools
Comparing version 1.1.1 to 1.1.2
70
index.js
@@ -24,3 +24,6 @@ 'use strict'; | ||
if (!emberBabelChecker.satisfies('^6.0.0-beta.1')) { | ||
this._usingBabel6 = emberBabelChecker.satisfies('^6.0.0-beta.1'); | ||
this._usingBabel7 = emberBabelChecker.satisfies('^7.0.0-beta.1'); | ||
if (!this._usingBabel6 && !this._usingBabel7) { | ||
host.project.ui.writeWarnLine( | ||
@@ -51,6 +54,6 @@ 'ember-compatibility-helpers: You are using an unsupported ember-cli-babel version, ' + | ||
const plugins = parentOptions.babel.plugins = parentOptions.babel.plugins || []; | ||
const comparisonPlugin = this._getComparisonPlugin(this.emberVersion); | ||
const debugPlugin = this._getDebugPlugin(this.emberVersion, this.parentChecker); | ||
const comparisonPlugin = this._getComparisonPlugin(this.emberVersion); | ||
plugins.push(debugPlugin, comparisonPlugin); | ||
plugins.push(comparisonPlugin, debugPlugin); | ||
@@ -69,42 +72,39 @@ this._registeredWithBabel = true; | ||
let options = { | ||
envFlags: { | ||
source: 'ember-compatibility-helpers', | ||
flags: { | ||
DEBUG: false | ||
} | ||
const options = { | ||
debugTools: { | ||
isDebug: process.env.EMBER_ENV !== 'production', | ||
source: 'ember-compatibility-helpers' | ||
}, | ||
features: { | ||
name: 'ember-compatibility-helpers', | ||
source: 'ember-compatibility-helpers', | ||
flags: { | ||
HAS_UNDERSCORE_ACTIONS: !gte(trueEmberVersion, '2.0.0'), | ||
HAS_MODERN_FACTORY_INJECTIONS: gte(trueEmberVersion, '2.13.0'), | ||
HAS_DESCRIPTOR_TRAP: satisfies(trueEmberVersion, '~3.0.0'), | ||
HAS_NATIVE_COMPUTED_GETTERS: gte(trueEmberVersion, '3.1.0-beta.1'), | ||
flags: [ | ||
{ | ||
name: 'ember-compatibility-helpers', | ||
source: 'ember-compatibility-helpers', | ||
flags: { | ||
HAS_UNDERSCORE_ACTIONS: !gte(trueEmberVersion, '2.0.0'), | ||
HAS_MODERN_FACTORY_INJECTIONS: gte(trueEmberVersion, '2.13.0'), | ||
HAS_DESCRIPTOR_TRAP: satisfies(trueEmberVersion, '~3.0.0'), | ||
HAS_NATIVE_COMPUTED_GETTERS: gte(trueEmberVersion, '3.1.0-beta.1'), | ||
IS_GLIMMER_2: gte(trueEmberVersion, '2.10.0'), | ||
IS_GLIMMER_2: gte(trueEmberVersion, '2.10.0'), | ||
SUPPORTS_FACTORY_FOR: gte(trueEmberVersion, '2.12.0') || parentChecker.for('ember-factory-for-polyfill', 'npm').gte('1.0.0'), | ||
SUPPORTS_GET_OWNER: gte(trueEmberVersion, '2.3.0') || parentChecker.for('ember-getowner-polyfill', 'npm').gte('1.1.0'), | ||
SUPPORTS_SET_OWNER: gte(trueEmberVersion, '2.3.0'), | ||
SUPPORTS_NEW_COMPUTED: gte(trueEmberVersion, '1.12.0-beta.1'), | ||
SUPPORTS_INVERSE_BLOCK: gte(trueEmberVersion, '1.13.0'), | ||
SUPPORTS_CLOSURE_ACTIONS: gte(trueEmberVersion, '1.13.0'), | ||
SUPPORTS_UNIQ_BY_COMPUTED: gte(trueEmberVersion, '2.7.0') | ||
SUPPORTS_FACTORY_FOR: gte(trueEmberVersion, '2.12.0') || parentChecker.for('ember-factory-for-polyfill', 'npm').gte('1.0.0'), | ||
SUPPORTS_GET_OWNER: gte(trueEmberVersion, '2.3.0') || parentChecker.for('ember-getowner-polyfill', 'npm').gte('1.1.0'), | ||
SUPPORTS_SET_OWNER: gte(trueEmberVersion, '2.3.0'), | ||
SUPPORTS_NEW_COMPUTED: gte(trueEmberVersion, '1.12.0-beta.1'), | ||
SUPPORTS_INVERSE_BLOCK: gte(trueEmberVersion, '1.13.0'), | ||
SUPPORTS_CLOSURE_ACTIONS: gte(trueEmberVersion, '1.13.0'), | ||
SUPPORTS_UNIQ_BY_COMPUTED: gte(trueEmberVersion, '2.7.0') | ||
} | ||
} | ||
}, | ||
] | ||
}; | ||
externalizeHelpers: { | ||
global: 'Ember' | ||
}, | ||
const plugin = [require.resolve('babel-plugin-debug-macros'), options]; | ||
debugTools: { | ||
source: 'ember-compatibility-helpers', | ||
assertPredicateIndex: 1 | ||
} | ||
}; | ||
if (this._usingBabel7) { | ||
plugin.push('ember-compatibility-helpers:debug-macros'); | ||
} | ||
return [require.resolve('babel-plugin-debug-macros'), options]; | ||
return plugin; | ||
}, | ||
@@ -111,0 +111,0 @@ |
{ | ||
"name": "ember-compatibility-helpers", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Zero-cost compatibility flags and helpers for Ember.js", | ||
@@ -19,6 +19,7 @@ "keywords": [ | ||
"start": "ember serve", | ||
"test": "mocha node-tests && ember test" | ||
"test": "mocha node-tests/babel-7", | ||
"test:all": "ember try:each" | ||
}, | ||
"dependencies": { | ||
"babel-plugin-debug-macros": "^0.1.11", | ||
"babel-plugin-debug-macros": "^0.2.0", | ||
"ember-cli-version-checker": "^2.1.1", | ||
@@ -35,3 +36,3 @@ "semver": "^5.4.1" | ||
"ember-cli": "~3.0.0", | ||
"ember-cli-babel": "^6.6.0", | ||
"ember-cli-babel": "^7.1.1", | ||
"ember-cli-dependency-checker": "^2.0.0", | ||
@@ -49,3 +50,3 @@ "ember-cli-eslint": "^4.2.1", | ||
"ember-source-channel-url": "^1.0.1", | ||
"ember-try": "^0.2.23", | ||
"ember-try": "^1.0.0", | ||
"eslint-plugin-ember": "^5.0.0", | ||
@@ -52,0 +53,0 @@ "eslint-plugin-node": "^5.2.1", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
266513
129
2
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.2(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.2(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.25.9(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbabel-plugin-debug-macros@0.2.0(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedcaniuse-lite@1.0.30001680(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedelectron-to-chromium@1.5.62(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.0.2(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedbabel-plugin-debug-macros@0.1.11(transitive)