diff --git a/addon/-private/modifier-classic.js b/addon/-private/modifier-classic.js index 0202944..fa0513d 100644 --- a/addon/-private/modifier-classic.js +++ b/addon/-private/modifier-classic.js @@ -1,7 +1,7 @@ -import Ember from 'ember'; import EmberObject from '@ember/object'; import createManager from './create-manager'; import { deprecate } from '@ember/application/deprecations'; +import { setModifierManager } from '@ember/modifier'; const Modifier = EmberObject.extend({ element: null, @@ -18,6 +18,6 @@ Modifier.reopenClass({ } }); -Ember._setModifierManager(createManager, Modifier); +setModifierManager(createManager, Modifier); export default Modifier; diff --git a/addon/-private/modifier-manager.js b/addon/-private/modifier-manager.js index 87fe90a..900043c 100644 --- a/addon/-private/modifier-manager.js +++ b/addon/-private/modifier-manager.js @@ -1,3 +1,5 @@ +import { capabilities } from '@ember/modifier'; + function triggerLifecycleHook(instance, hookName, args) { // Checking for undefined as a style choice came from // https://emberjs.github.io/rfcs/0373-Element-Modifier-Managers.html @@ -7,6 +9,8 @@ function triggerLifecycleHook(instance, hookName, args) { } export default class ModifierManager { + capabilities = capabilities('3.13'); + constructor(owner) { this.owner = owner; } diff --git a/addon/-private/modifier-native.js b/addon/-private/modifier-native.js index fcf019a..0a40f59 100644 --- a/addon/-private/modifier-native.js +++ b/addon/-private/modifier-native.js @@ -1,8 +1,8 @@ -import Ember from 'ember'; +import createManager from './create-manager'; import { setOwner } from '@ember/application'; import { setProperties } from '@ember/object'; -import createManager from './create-manager'; -import { deprecate } from '@ember/application/deprecations'; +import { deprecate } from '@ember/application/deprecations'; +import { setModifierManager } from '@ember/modifier'; import { assert } from '@ember/debug'; class Modifier { @@ -22,7 +22,7 @@ class Modifier { } } -Ember._setModifierManager(createManager, Modifier); +setModifierManager(createManager, Modifier); export function modifier(modifierFn) { assert( diff --git a/addon/.gitkeep b/addon/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/package.json b/package.json index 27d7be9..65fe0cf 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "release": "release-it" }, "dependencies": { - "ember-cli-babel": "^7.7.3", - "ember-modifier-manager-polyfill": "^1.0.3" + "ember-cli-babel": "^7.10.0", + "ember-modifier-manager-polyfill": "^1.1.0" }, "devDependencies": { "@ember/optional-features": "^0.6.3", diff --git a/yarn.lock b/yarn.lock index c3d26c4..74925f3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2070,6 +2070,13 @@ babel-plugin-debug-macros@^0.3.0: dependencies: semver "^5.3.0" +babel-plugin-ember-modules-api-polyfill@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.11.0.tgz#3a67bdeb05a929a96776b45fa784bd3798517acc" + integrity sha512-S3bw77LglkWIstoF+hBLyRPyyNAUsdzqK6zLxktuM6EniVt06st/ikhPDUttMWixS2LNA+jnBfGerYO1D/VvDw== + dependencies: + ember-rfc176-data "^0.3.11" + babel-plugin-ember-modules-api-polyfill@^2.6.0, babel-plugin-ember-modules-api-polyfill@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.7.0.tgz#dcd6a9999da0d47d8c9185362bda6244ca525f4a" @@ -2077,13 +2084,6 @@ babel-plugin-ember-modules-api-polyfill@^2.6.0, babel-plugin-ember-modules-api-p dependencies: ember-rfc176-data "^0.3.7" -babel-plugin-ember-modules-api-polyfill@^2.8.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/babel-plugin-ember-modules-api-polyfill/-/babel-plugin-ember-modules-api-polyfill-2.9.0.tgz#8503e7b4192aeb336b00265e6235258ff6b754aa" - integrity sha512-c03h50291phJ2gQxo/aIOvFQE2c6glql1A7uagE3XbPXpKVAJOUxtVDjvWG6UAB6BC5ynsJfMWvY0w4TPRKIHQ== - dependencies: - ember-rfc176-data "^0.3.9" - babel-plugin-feature-flags@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/babel-plugin-feature-flags/-/babel-plugin-feature-flags-0.3.1.tgz#9c827cf9a4eb9a19f725ccb239e85cab02036fc1" @@ -5140,7 +5140,7 @@ ember-cli-babel@^6.0.0-beta.4, ember-cli-babel@^6.0.0-beta.7, ember-cli-babel@^6 ember-cli-version-checker "^2.1.2" semver "^5.5.0" -ember-cli-babel@^7.1.0, ember-cli-babel@^7.1.2, ember-cli-babel@^7.1.3, ember-cli-babel@^7.1.4, ember-cli-babel@^7.2.0, ember-cli-babel@^7.4.2: +ember-cli-babel@^7.1.0, ember-cli-babel@^7.1.2, ember-cli-babel@^7.1.3, ember-cli-babel@^7.1.4, ember-cli-babel@^7.2.0: version "7.5.0" resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.5.0.tgz#af654dcef23630391d2efe85aaa3bdf8b6ca17b7" integrity sha512-wWXqPPQNRxCtEHvYaLBNiIVgCVCy8YqZ0tM8Dpql1D5nGnPDbaK073sS1vlOYBP7xe5Ab2nXhvQkFwUxFacJ2g== @@ -5164,10 +5164,10 @@ ember-cli-babel@^7.1.0, ember-cli-babel@^7.1.2, ember-cli-babel@^7.1.3, ember-cl ensure-posix-path "^1.0.2" semver "^5.5.0" -ember-cli-babel@^7.7.3: - version "7.7.3" - resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.7.3.tgz#f94709f6727583d18685ca6773a995877b87b8a0" - integrity sha512-/LWwyKIoSlZQ7k52P+6agC7AhcOBqPJ5C2u27qXHVVxKvCtg6ahNuRk/KmfZmV4zkuw4EjTZxfJE1PzpFyHkXg== +ember-cli-babel@^7.10.0: + version "7.10.0" + resolved "https://registry.yarnpkg.com/ember-cli-babel/-/ember-cli-babel-7.10.0.tgz#5505254b21f3c98400c91bf565dc1c0cf408b6b4" + integrity sha512-eNgPXobC+Pke5L3XzoJ0BXbb2+eYzZI+LljqbwXNuG4q63pF000aARFpTQ0p/NWkfGQxKi2L6tVIa1ZOYdQS+A== dependencies: "@babel/core" "^7.0.0" "@babel/plugin-proposal-class-properties" "^7.3.4" @@ -5179,7 +5179,7 @@ ember-cli-babel@^7.7.3: "@babel/runtime" "^7.2.0" amd-name-resolver "^1.2.1" babel-plugin-debug-macros "^0.3.0" - babel-plugin-ember-modules-api-polyfill "^2.8.0" + babel-plugin-ember-modules-api-polyfill "^2.11.0" babel-plugin-module-resolver "^3.1.1" broccoli-babel-transpiler "^7.1.2" broccoli-debug "^0.6.4" @@ -5850,12 +5850,12 @@ ember-modal-dialog@3.0.0-beta.3: ember-ignore-children-helper "^1.0.1" ember-wormhole "^0.5.5" -ember-modifier-manager-polyfill@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/ember-modifier-manager-polyfill/-/ember-modifier-manager-polyfill-1.0.3.tgz#6554b70d09a7d3b80d366b72ed482fb9a3e813c0" - integrity sha512-d8Uz0BhAZaqzttF4NXTwJ/A8uPrgd7fMho5jh89BfzJAHu5WZfGewX9cbjh3m6f512ZyxkIeeolw3Z5/Jyaujg== +ember-modifier-manager-polyfill@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ember-modifier-manager-polyfill/-/ember-modifier-manager-polyfill-1.1.0.tgz#06397b05a3f9a5868b05fca11fe10c7f6b78a328" + integrity sha512-fCEumUwdAnwk8rGSEww1/NkIHbmLOS8kRmEZyO9mxeIy+BtdYqdSIMrn3tSnt9QeacWQm2zdR8KXBqc2bc1G6A== dependencies: - ember-cli-babel "^7.4.2" + ember-cli-babel "^7.10.0" ember-cli-version-checker "^2.1.2" ember-compatibility-helpers "^1.2.0" @@ -5892,16 +5892,16 @@ ember-responsive@^3.0.0-beta.1: dependencies: ember-cli-babel "^6.6.0" +ember-rfc176-data@^0.3.11: + version "0.3.11" + resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.11.tgz#9042e96aa4e962bf5bd5433939c92a1cf3a63de8" + integrity sha512-c46uisicHswFHo0R515LPM0L/X/Ju+N7KonJPuHx9C6cWD3AWzkNG9ASv+Bc85mq/9l3LFFsFpljdM1m2YnQ6A== + ember-rfc176-data@^0.3.5, ember-rfc176-data@^0.3.7: version "0.3.7" resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.7.tgz#ecff7d74987d09296d3703343fed934515a4be33" integrity sha512-AbTlD+q7sfyrD4diZqE7r9Y9/Je+HntVn7TlpHAe+nP5BNXxUXJIfDs5w5e3MxPcMs6Dz/yY90YfW8h1oKEvGg== -ember-rfc176-data@^0.3.9: - version "0.3.9" - resolved "https://registry.yarnpkg.com/ember-rfc176-data/-/ember-rfc176-data-0.3.9.tgz#44b6e051ead6c044ea87bd551f402e2cf89a7e3d" - integrity sha512-EiTo5YQS0Duy0xp9gCP8ekzv9vxirNi7MnIB4zWs+thtWp/mEKgf5mkiiLU2+oo8C5DuavVHhoPQDmyxh8Io1Q== - ember-router-generator@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/ember-router-generator/-/ember-router-generator-1.2.3.tgz#8ed2ca86ff323363120fc14278191e9e8f1315ee"