diff --git a/RELEASE.md b/RELEASE.md
index 4b830fac4fa..1fb7d2457b1 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -132,7 +132,7 @@ end
1. Any feature that has been GOed gets changed to true
1. Run `ember s -prod`
1. Run tests at `http://localhost:4200/tests/index.html`
-1. Run production tests `http://localhost:4200/tests/index.htmlskipPackage=container,ember-testing,ember-debug&dist=prod&prod=true`
+1. Run production tests `http://localhost:4200/tests/index.htmlskipPackage=container,ember-testing,@ember/debug&dist=prod&prod=true`
1. In `.travis.yml`, remove `branches:` section e.g. [this commit](https://github.com/emberjs/ember.js/commit/e38ec5d910721a9e02a819b4105a4875723f4b1b).
1. Now we have to look at the commit just prior to branching 2.4.0.beta-1. Then find the commit after that to start the new branch at.
diff --git a/bin/run-tests.js b/bin/run-tests.js
index 3dd40dc187b..135ca224603 100755
--- a/bin/run-tests.js
+++ b/bin/run-tests.js
@@ -233,8 +233,8 @@ function generateEachPackageTests() {
function generateBuiltTests() {
// Container isn't publicly available.
- // ember-testing/ember-debug are stripped from prod/min.
- var common = 'skipPackage=container,ember-testing,ember-debug';
+ // ember-testing and @ember/debug are stripped from prod/min.
+ var common = 'skipPackage=container,ember-testing,@ember/debug';
testFunctions.push(function() {
return run(common + '&nolint=true');
});
diff --git a/broccoli/to-es5.js b/broccoli/to-es5.js
index b92f745ea82..a8e44e99ea3 100644
--- a/broccoli/to-es5.js
+++ b/broccoli/to-es5.js
@@ -24,7 +24,7 @@ module.exports = function toES5(tree, _options) {
'debug-macros',
{
debugTools: {
- source: 'ember-debug',
+ source: '@ember/debug',
assertPredicateIndex: 1,
},
envFlags: {
diff --git a/ember-cli-build.js b/ember-cli-build.js
index 23f3a788ae6..68b0147e3a4 100644
--- a/ember-cli-build.js
+++ b/ember-cli-build.js
@@ -155,7 +155,13 @@ module.exports = function() {
let emberTestingBundle = new MergeTrees([
new Funnel(packagesES5, {
- include: ['ember-debug/**', 'ember-testing/**', 'license.js'],
+ include: [
+ '@ember/debug/lib/**',
+ '@ember/debug/index.js',
+ 'ember-testing/index.js',
+ 'ember-testing/lib/**',
+ 'license.js',
+ ],
}),
loader,
license,
@@ -181,10 +187,10 @@ module.exports = function() {
include: [
'@ember/error/index.js',
'@ember/debug/index.js',
+ '@ember/debug/lib/**',
'@ember/polyfills/index.js',
'@ember/polyfills/lib/**',
'ember/version.js',
- 'ember-debug/**',
'ember-environment.js',
'ember-browser-environment.js',
'ember-template-compiler/**',
diff --git a/packages/@ember/application/globals-resolver.js b/packages/@ember/application/globals-resolver.js
index 17a9fc21d79..6b6423081bb 100644
--- a/packages/@ember/application/globals-resolver.js
+++ b/packages/@ember/application/globals-resolver.js
@@ -4,7 +4,7 @@
import { dictionary } from 'ember-utils';
import { get, findNamespace } from 'ember-metal';
-import { assert, info } from 'ember-debug';
+import { assert, info } from '@ember/debug';
import { capitalize, classify, dasherize, decamelize } from '@ember/string';
import { Object as EmberObject } from 'ember-runtime';
import validateType from './lib/validate-type';
diff --git a/packages/@ember/application/lib/application.js b/packages/@ember/application/lib/application.js
index d68b9c0d655..00f5984446b 100644
--- a/packages/@ember/application/lib/application.js
+++ b/packages/@ember/application/lib/application.js
@@ -5,7 +5,7 @@
import { dictionary } from 'ember-utils';
import { ENV } from 'ember-environment';
import { hasDOM } from 'ember-browser-environment';
-import { assert, isTesting } from 'ember-debug';
+import { assert, isTesting } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { bind, join, once, run, schedule } from '@ember/runloop';
import { libraries, processAllNamespaces, setNamespaceSearchDisabled } from 'ember-metal';
diff --git a/packages/@ember/application/lib/validate-type.js b/packages/@ember/application/lib/validate-type.js
index 91de65df221..196141d08dc 100644
--- a/packages/@ember/application/lib/validate-type.js
+++ b/packages/@ember/application/lib/validate-type.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
const VALIDATED_TYPES = {
route: ['assert', 'isRouteFactory', 'Ember.Route'],
diff --git a/packages/@ember/application/tests/application_instance_test.js b/packages/@ember/application/tests/application_instance_test.js
index 41ff4d6959a..1956559d90b 100644
--- a/packages/@ember/application/tests/application_instance_test.js
+++ b/packages/@ember/application/tests/application_instance_test.js
@@ -6,7 +6,7 @@ import { privatize as P } from 'container';
import { factory } from 'internal-test-helpers';
import { Object as EmberObject } from 'ember-runtime';
import { moduleFor, AbstractTestCase as TestCase } from 'internal-test-helpers';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/@ember/application/tests/application_test.js b/packages/@ember/application/tests/application_test.js
index e9f34e8a24a..a32db930f78 100644
--- a/packages/@ember/application/tests/application_test.js
+++ b/packages/@ember/application/tests/application_test.js
@@ -2,7 +2,7 @@
import VERSION from 'ember/version';
import { ENV, context } from 'ember-environment';
import { libraries, setNamespaceSearchDisabled } from 'ember-metal';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
import Application from '..';
import { Router, NoneLocation, Route as EmberRoute } from 'ember-routing';
import { jQuery } from 'ember-views';
diff --git a/packages/@ember/application/tests/dependency_injection/default_resolver_test.js b/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
index 043bdcd3c17..a20a95042e7 100644
--- a/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
+++ b/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
@@ -7,7 +7,7 @@ import Service from '@ember/service';
import { Object as EmberObject, Namespace } from 'ember-runtime';
import { Route } from 'ember-routing';
import { Component, Helper, helper as makeHelper } from 'ember-glimmer';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
moduleFor(
'Application Dependency Injection - Integration - default resolver',
diff --git a/packages/@ember/engine/index.js b/packages/@ember/engine/index.js
index 3e21924ee87..d1403a9e253 100644
--- a/packages/@ember/engine/index.js
+++ b/packages/@ember/engine/index.js
@@ -6,7 +6,7 @@ import Controller from '@ember/controller';
import { Namespace, RegistryProxyMixin } from 'ember-runtime';
import { Registry, privatize as P } from 'container';
import DAG from 'dag-map';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { get, set } from 'ember-metal';
import DefaultResolver from '@ember/application/globals-resolver';
import EngineInstance from '@ember/engine/instance';
diff --git a/packages/@ember/engine/instance.js b/packages/@ember/engine/instance.js
index eadeb76a7bd..7c97cf34297 100644
--- a/packages/@ember/engine/instance.js
+++ b/packages/@ember/engine/instance.js
@@ -9,7 +9,7 @@ import {
RegistryProxyMixin,
RSVP,
} from 'ember-runtime';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import EmberError from '@ember/error';
import { Registry, privatize as P } from 'container';
import { getEngineParent, setEngineParent } from '@ember/engine';
diff --git a/packages/@ember/map/index.js b/packages/@ember/map/index.js
index cd8fa8e83e8..d1d1092ae85 100644
--- a/packages/@ember/map/index.js
+++ b/packages/@ember/map/index.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { guidFor } from 'ember-utils';
import OrderedSet from './lib/ordered-set';
import { copyMap } from './lib/utils';
diff --git a/packages/@ember/map/lib/ordered-set.js b/packages/@ember/map/lib/ordered-set.js
index 0463f115989..bda83ffae24 100644
--- a/packages/@ember/map/lib/ordered-set.js
+++ b/packages/@ember/map/lib/ordered-set.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { guidFor } from 'ember-utils';
import { copyNull } from './utils';
diff --git a/packages/@ember/runloop/index.js b/packages/@ember/runloop/index.js
index 27ab9a5ad15..317d4d801fa 100644
--- a/packages/@ember/runloop/index.js
+++ b/packages/@ember/runloop/index.js
@@ -1,4 +1,4 @@
-import { assert, deprecate, isTesting } from 'ember-debug';
+import { assert, deprecate, isTesting } from '@ember/debug';
import { onErrorTarget } from 'ember-error-handling';
import { beginPropertyChanges, endPropertyChanges } from 'ember-metal';
import Backburner from 'backburner';
diff --git a/packages/@ember/runloop/tests/onerror_test.js b/packages/@ember/runloop/tests/onerror_test.js
index 84697df788b..bc03e2902d5 100644
--- a/packages/@ember/runloop/tests/onerror_test.js
+++ b/packages/@ember/runloop/tests/onerror_test.js
@@ -5,7 +5,7 @@ import {
setDispatchOverride,
setOnerror,
} from 'ember-error-handling';
-import { isTesting, setTesting } from 'ember-debug';
+import { isTesting, setTesting } from '@ember/debug';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
moduleFor(
diff --git a/packages/container/lib/container.js b/packages/container/lib/container.js
index 763c8ecefec..9d7cdbd5e09 100644
--- a/packages/container/lib/container.js
+++ b/packages/container/lib/container.js
@@ -1,5 +1,5 @@
/* globals Proxy */
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { EMBER_MODULE_UNIFICATION } from 'ember/features';
import { DEBUG } from '@glimmer/env';
import { OWNER, setOwner } from 'ember-owner';
diff --git a/packages/container/lib/registry.js b/packages/container/lib/registry.js
index 108d96d4f6c..efe7f414bd0 100644
--- a/packages/container/lib/registry.js
+++ b/packages/container/lib/registry.js
@@ -1,6 +1,6 @@
import { assign } from '@ember/polyfills';
import { dictionary, intern } from 'ember-utils';
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
import Container from './container';
import { DEBUG } from '@glimmer/env';
import { ENV } from 'ember-environment';
diff --git a/packages/ember-console/index.js b/packages/ember-console/index.js
index f8a6c2441a9..5dadfed3e8d 100644
--- a/packages/ember-console/index.js
+++ b/packages/ember-console/index.js
@@ -1,4 +1,4 @@
-import { deprecate } from 'ember-debug';
+import { deprecate } from '@ember/debug';
// Deliver message that the function is deprecated
diff --git a/packages/ember-debug/index.d.ts b/packages/ember-debug/index.d.ts
deleted file mode 100644
index 844e29805a4..00000000000
--- a/packages/ember-debug/index.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export function assert(message: string, test?: boolean): void;
-
-export function warn(message: string, test: boolean, options?: any): void;
-
-export function deprecate(message: string, test: boolean, options?: any): void;
\ No newline at end of file
diff --git a/packages/ember-debug/index.js b/packages/ember-debug/index.js
deleted file mode 100644
index 44db8ddfeb0..00000000000
--- a/packages/ember-debug/index.js
+++ /dev/null
@@ -1,356 +0,0 @@
-import { DEBUG } from '@glimmer/env';
-import { ENV } from 'ember-environment';
-import { isChrome, isFirefox } from 'ember-browser-environment';
-import { isTesting } from './lib/testing';
-import EmberError from '@ember/error';
-import { default as isFeatureEnabled } from './lib/features';
-import * as FLAGS from 'ember/features';
-let { DEFAULT_FEATURES, FEATURES } = FLAGS;
-import _deprecate from './lib/deprecate';
-import _warn from './lib/warn';
-
-export { registerHandler as registerWarnHandler } from './lib/warn';
-export { registerHandler as registerDeprecationHandler } from './lib/deprecate';
-export { default as isFeatureEnabled } from './lib/features';
-export { isTesting, setTesting } from './lib/testing';
-
-// These are the default production build versions:
-const noop = () => {};
-
-let assert = noop;
-let info = noop;
-let warn = noop;
-let debug = noop;
-let deprecate = noop;
-let debugSeal = noop;
-let debugFreeze = noop;
-let runInDebug = noop;
-let setDebugFunction = noop;
-let getDebugFunction = noop;
-
-let deprecateFunc = function() {
- return arguments[arguments.length - 1];
-};
-
-if (DEBUG) {
- setDebugFunction = function(type, callback) {
- switch (type) {
- case 'assert':
- return (assert = callback);
- case 'info':
- return (info = callback);
- case 'warn':
- return (warn = callback);
- case 'debug':
- return (debug = callback);
- case 'deprecate':
- return (deprecate = callback);
- case 'debugSeal':
- return (debugSeal = callback);
- case 'debugFreeze':
- return (debugFreeze = callback);
- case 'runInDebug':
- return (runInDebug = callback);
- case 'deprecateFunc':
- return (deprecateFunc = callback);
- }
- };
-
- getDebugFunction = function(type) {
- switch (type) {
- case 'assert':
- return assert;
- case 'info':
- return info;
- case 'warn':
- return warn;
- case 'debug':
- return debug;
- case 'deprecate':
- return deprecate;
- case 'debugSeal':
- return debugSeal;
- case 'debugFreeze':
- return debugFreeze;
- case 'runInDebug':
- return runInDebug;
- case 'deprecateFunc':
- return deprecateFunc;
- }
- };
-}
-
-/**
-@module @ember/debug
-*/
-
-if (DEBUG) {
- /**
- Verify that a certain expectation is met, or throw a exception otherwise.
-
- This is useful for communicating assumptions in the code to other human
- readers as well as catching bugs that accidentally violates these
- expectations.
-
- Assertions are removed from production builds, so they can be freely added
- for documentation and debugging purposes without worries of incuring any
- performance penalty. However, because of that, they should not be used for
- checks that could reasonably fail during normal usage. Furthermore, care
- should be taken to avoid accidentally relying on side-effects produced from
- evaluating the condition itself, since the code will not run in production.
-
- ```javascript
- import { assert } from '@ember/debug';
-
- // Test for truthiness
- assert('Must pass a string', typeof str === 'string');
-
- // Fail unconditionally
- assert('This code path should never be run');
- ```
-
- @method assert
- @static
- @for @ember/debug
- @param {String} description Describes the expectation. This will become the
- text of the Error thrown if the assertion fails.
- @param {Boolean} condition Must be truthy for the assertion to pass. If
- falsy, an exception will be thrown.
- @public
- @since 1.0.0
- */
- setDebugFunction('assert', function assert(desc, test) {
- if (!test) {
- throw new EmberError(`Assertion Failed: ${desc}`);
- }
- });
-
- /**
- Display a debug notice.
-
- Calls to this function are removed from production builds, so they can be
- freely added for documentation and debugging purposes without worries of
- incuring any performance penalty.
-
- ```javascript
- import { debug } from '@ember/debug';
-
- debug('I\'m a debug notice!');
- ```
-
- @method debug
- @for @ember/debug
- @static
- @param {String} message A debug message to display.
- @public
- */
- setDebugFunction('debug', function debug(message) {
- /* eslint-disable no-console */
- if (console.debug) {
- console.debug(`DEBUG: ${message}`);
- } else {
- console.log(`DEBUG: ${message}`);
- }
- /* eslint-ensable no-console */
- });
-
- /**
- Display an info notice.
-
- Calls to this function are removed from production builds, so they can be
- freely added for documentation and debugging purposes without worries of
- incuring any performance penalty.
-
- @method info
- @private
- */
- setDebugFunction('info', function info() {
- console.info(...arguments); /* eslint-disable-line no-console */
- });
-
- /**
- @module @ember/application
- @public
- */
-
- /**
- Alias an old, deprecated method with its new counterpart.
-
- Display a deprecation warning with the provided message and a stack trace
- (Chrome and Firefox only) when the assigned method is called.
-
- Calls to this function are removed from production builds, so they can be
- freely added for documentation and debugging purposes without worries of
- incuring any performance penalty.
-
- ```javascript
- import { deprecateFunc } from '@ember/application/deprecations';
-
- Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);
- ```
-
- @method deprecateFunc
- @static
- @for @ember/application/deprecations
- @param {String} message A description of the deprecation.
- @param {Object} [options] The options object for `deprecate`.
- @param {Function} func The new function called to replace its deprecated counterpart.
- @return {Function} A new function that wraps the original function with a deprecation warning
- @private
- */
- setDebugFunction('deprecateFunc', function deprecateFunc(...args) {
- if (args.length === 3) {
- let [message, options, func] = args;
- return function() {
- deprecate(message, false, options);
- return func.apply(this, arguments);
- };
- } else {
- let [message, func] = args;
- return function() {
- deprecate(message);
- return func.apply(this, arguments);
- };
- }
- });
-
- /**
- @module @ember/debug
- @public
- */
- /**
- Run a function meant for debugging.
-
- Calls to this function are removed from production builds, so they can be
- freely added for documentation and debugging purposes without worries of
- incuring any performance penalty.
-
- ```javascript
- import Component from '@ember/component';
- import { runInDebug } from '@ember/debug';
-
- runInDebug(() => {
- Component.reopen({
- didInsertElement() {
- console.log("I'm happy");
- }
- });
- });
- ```
-
- @method runInDebug
- @for @ember/debug
- @static
- @param {Function} func The function to be executed.
- @since 1.5.0
- @public
- */
- setDebugFunction('runInDebug', function runInDebug(func) {
- func();
- });
-
- setDebugFunction('debugSeal', function debugSeal(obj) {
- Object.seal(obj);
- });
-
- setDebugFunction('debugFreeze', function debugFreeze(obj) {
- Object.freeze(obj);
- });
-
- setDebugFunction('deprecate', _deprecate);
-
- setDebugFunction('warn', _warn);
-}
-
-let _warnIfUsingStrippedFeatureFlags;
-
-if (DEBUG && !isTesting()) {
- /**
- Will call `warn()` if ENABLE_OPTIONAL_FEATURES or
- any specific FEATURES flag is truthy.
-
- This method is called automatically in debug canary builds.
-
- @private
- @method _warnIfUsingStrippedFeatureFlags
- @return {void}
- */
- _warnIfUsingStrippedFeatureFlags = function _warnIfUsingStrippedFeatureFlags(
- FEATURES,
- knownFeatures,
- featuresWereStripped
- ) {
- if (featuresWereStripped) {
- warn(
- 'Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.',
- !ENV.ENABLE_OPTIONAL_FEATURES,
- { id: 'ember-debug.feature-flag-with-features-stripped' }
- );
-
- let keys = Object.keys(FEATURES || {});
- for (let i = 0; i < keys.length; i++) {
- let key = keys[i];
- if (key === 'isEnabled' || !(key in knownFeatures)) {
- continue;
- }
-
- warn(
- `FEATURE["${key}"] is set as enabled, but FEATURE flags are only available in canary builds.`,
- !FEATURES[key],
- { id: 'ember-debug.feature-flag-with-features-stripped' }
- );
- }
- }
- };
-
- // Complain if they're using FEATURE flags in builds other than canary
- FEATURES['features-stripped-test'] = true;
- let featuresWereStripped = true;
-
- if (isFeatureEnabled('features-stripped-test')) {
- featuresWereStripped = false;
- }
-
- delete FEATURES['features-stripped-test'];
- _warnIfUsingStrippedFeatureFlags(ENV.FEATURES, DEFAULT_FEATURES, featuresWereStripped);
-
- if (typeof window !== 'undefined' && (isFirefox || isChrome) && window.addEventListener) {
- window.addEventListener(
- 'load',
- () => {
- if (
- document.documentElement &&
- document.documentElement.dataset &&
- !document.documentElement.dataset.emberExtension
- ) {
- let downloadURL;
-
- if (isChrome) {
- downloadURL =
- 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';
- } else if (isFirefox) {
- downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';
- }
-
- debug(`For more advanced debugging, install the Ember Inspector from ${downloadURL}`);
- }
- },
- false
- );
- }
-}
-
-export {
- assert,
- info,
- warn,
- debug,
- deprecate,
- debugSeal,
- debugFreeze,
- runInDebug,
- deprecateFunc,
- setDebugFunction,
- getDebugFunction,
- _warnIfUsingStrippedFeatureFlags,
-};
diff --git a/packages/ember-debug/lib/deprecate.js b/packages/ember-debug/lib/deprecate.js
deleted file mode 100644
index 403e9b4f83a..00000000000
--- a/packages/ember-debug/lib/deprecate.js
+++ /dev/null
@@ -1,215 +0,0 @@
-import { DEBUG } from '@glimmer/env';
-import { ENV } from 'ember-environment';
-
-import { assert } from '../index';
-import { registerHandler as genericRegisterHandler, invoke } from './handlers';
-/**
- @module @ember/debug
- @public
-*/
-/**
- Allows for runtime registration of handler functions that override the default deprecation behavior.
- Deprecations are invoked by calls to [@ember/application/deprecations/deprecate](https://emberjs.com/api/ember/release/classes/@ember%2Fapplication%2Fdeprecations/methods/deprecate?anchor=deprecate).
- The following example demonstrates its usage by registering a handler that throws an error if the
- message contains the word "should", otherwise defers to the default handler.
-
- ```javascript
- import { registerDeprecationHandler } from '@ember/debug';
-
- registerDeprecationHandler((message, options, next) => {
- if (message.indexOf('should') !== -1) {
- throw new Error(`Deprecation message with should: ${message}`);
- } else {
- // defer to whatever handler was registered before this one
- next(message, options);
- }
- });
- ```
-
- The handler function takes the following arguments:
-
-
- -
message
- The message received from the deprecation call.
- -
options
- An object passed in with the deprecation call containing additional information including:
-
- -
id
- An id of the deprecation in the form of package-name.specific-deprecation
.
- -
until
- The Ember version number the feature and deprecation will be removed in.
-
- -
next
- A function that calls into the previously registered handler.
-
-
- @public
- @static
- @method registerDeprecationHandler
- @for @ember/debug
- @param handler {Function} A function to handle deprecation calls.
- @since 2.1.0
-*/
-let registerHandler = () => {};
-let missingOptionsDeprecation,
- missingOptionsIdDeprecation,
- missingOptionsUntilDeprecation,
- deprecate;
-
-if (DEBUG) {
- registerHandler = function registerHandler(handler) {
- genericRegisterHandler('deprecate', handler);
- };
-
- let formatMessage = function formatMessage(_message, options) {
- let message = _message;
-
- if (options && options.id) {
- message = message + ` [deprecation id: ${options.id}]`;
- }
-
- if (options && options.url) {
- message += ` See ${options.url} for more details.`;
- }
-
- return message;
- };
-
- registerHandler(function logDeprecationToConsole(message, options) {
- let updatedMessage = formatMessage(message, options);
- console.warn(`DEPRECATION: ${updatedMessage}`); // eslint-disable-line no-console
- });
-
- let captureErrorForStack;
-
- if (new Error().stack) {
- captureErrorForStack = () => new Error();
- } else {
- captureErrorForStack = () => {
- try {
- __fail__.fail(); // eslint-disable-line
- } catch (e) {
- return e;
- }
- };
- }
-
- registerHandler(function logDeprecationStackTrace(message, options, next) {
- if (ENV.LOG_STACKTRACE_ON_DEPRECATION) {
- let stackStr = '';
- let error = captureErrorForStack();
- let stack;
-
- if (error.stack) {
- if (error['arguments']) {
- // Chrome
- stack = error.stack
- .replace(/^\s+at\s+/gm, '')
- .replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2')
- .replace(/^Object.\s*\(([^\)]+)\)/gm, '{anonymous}($1)')
- .split('\n');
- stack.shift();
- } else {
- // Firefox
- stack = error.stack
- .replace(/(?:\n@:0)?\s+$/m, '')
- .replace(/^\(/gm, '{anonymous}(')
- .split('\n');
- }
-
- stackStr = `\n ${stack.slice(2).join('\n ')}`;
- }
-
- let updatedMessage = formatMessage(message, options);
-
- console.warn(`DEPRECATION: ${updatedMessage}${stackStr}`); // eslint-disable-line no-console
- } else {
- next(...arguments);
- }
- });
-
- registerHandler(function raiseOnDeprecation(message, options, next) {
- if (ENV.RAISE_ON_DEPRECATION) {
- let updatedMessage = formatMessage(message);
-
- throw new Error(updatedMessage);
- } else {
- next(...arguments);
- }
- });
-
- missingOptionsDeprecation =
- 'When calling `deprecate` you ' +
- 'must provide an `options` hash as the third parameter. ' +
- '`options` should include `id` and `until` properties.';
- missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.';
- missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.';
- /**
- @module @ember/application
- @public
- */
- /**
- Display a deprecation warning with the provided message and a stack trace
- (Chrome and Firefox only).
-
- * In a production build, this method is defined as an empty function (NOP).
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- @method deprecate
- @for @ember/application/deprecations
- @param {String} message A description of the deprecation.
- @param {Boolean} test A boolean. If falsy, the deprecation will be displayed.
- @param {Object} options
- @param {String} options.id A unique id for this deprecation. The id can be
- used by Ember debugging tools to change the behavior (raise, log or silence)
- for that specific deprecation. The id should be namespaced by dots, e.g.
- "view.helper.select".
- @param {string} options.until The version of Ember when this deprecation
- warning will be removed.
- @param {String} [options.url] An optional url to the transition guide on the
- emberjs.com website.
- @static
- @public
- @since 1.0.0
- */
- deprecate = function deprecate(message, test, options) {
- if (ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT !== true) {
- assert(missingOptionsDeprecation, options && (options.id || options.until));
- assert(missingOptionsIdDeprecation, options.id);
- assert(missingOptionsUntilDeprecation, options.until);
- }
-
- if (
- (!options || (!options.id && !options.until)) &&
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true
- ) {
- deprecate(missingOptionsDeprecation, false, {
- id: 'ember-debug.deprecate-options-missing',
- until: '3.0.0',
- url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options',
- });
- }
-
- if (options && !options.id && ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {
- deprecate(missingOptionsIdDeprecation, false, {
- id: 'ember-debug.deprecate-id-missing',
- until: '3.0.0',
- url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options',
- });
- }
-
- if (options && !options.until && ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT === true) {
- deprecate(missingOptionsUntilDeprecation, options && options.until, {
- id: 'ember-debug.deprecate-until-missing',
- until: '3.0.0',
- url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options',
- });
- }
-
- invoke('deprecate', ...arguments);
- };
-}
-
-export default deprecate;
-
-export {
- registerHandler,
- missingOptionsDeprecation,
- missingOptionsIdDeprecation,
- missingOptionsUntilDeprecation,
-};
diff --git a/packages/ember-debug/lib/features.js b/packages/ember-debug/lib/features.js
deleted file mode 100644
index 771d82f3058..00000000000
--- a/packages/ember-debug/lib/features.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import { ENV } from 'ember-environment';
-import * as FLAGS from 'ember/features';
-let { FEATURES } = FLAGS;
-
-/**
- @module ember
-*/
-
-/**
- The hash of enabled Canary features. Add to this, any canary features
- before creating your application.
-
- Alternatively (and recommended), you can also define `EmberENV.FEATURES`
- if you need to enable features flagged at runtime.
-
- @class FEATURES
- @namespace Ember
- @static
- @since 1.1.0
- @public
-*/
-
-// Auto-generated
-
-/**
- Determine whether the specified `feature` is enabled. Used by Ember's
- build tools to exclude experimental features from beta/stable builds.
-
- You can define the following configuration options:
-
- * `EmberENV.ENABLE_OPTIONAL_FEATURES` - enable any features that have not been explicitly
- enabled/disabled.
-
- @method isEnabled
- @param {String} feature The feature to check
- @return {Boolean}
- @for Ember.FEATURES
- @since 1.1.0
- @public
-*/
-export default function isEnabled(feature) {
- let featureValue = FEATURES[feature];
-
- if (featureValue === true || featureValue === false || featureValue === undefined) {
- return featureValue;
- } else if (ENV.ENABLE_OPTIONAL_FEATURES) {
- return true;
- } else {
- return false;
- }
-}
diff --git a/packages/ember-debug/lib/handlers.js b/packages/ember-debug/lib/handlers.js
deleted file mode 100644
index 277409488a1..00000000000
--- a/packages/ember-debug/lib/handlers.js
+++ /dev/null
@@ -1,30 +0,0 @@
-import { DEBUG } from '@glimmer/env';
-
-export let HANDLERS = {};
-
-let registerHandler = () => {};
-let invoke = () => {};
-
-if (DEBUG) {
- registerHandler = function registerHandler(type, callback) {
- let nextHandler = HANDLERS[type] || (() => {});
-
- HANDLERS[type] = (message, options) => {
- callback(message, options, nextHandler);
- };
- };
-
- invoke = function invoke(type, message, test, options) {
- if (test) {
- return;
- }
-
- let handlerForType = HANDLERS[type];
-
- if (handlerForType) {
- handlerForType(message, options);
- }
- };
-}
-
-export { registerHandler, invoke };
diff --git a/packages/ember-debug/lib/testing.js b/packages/ember-debug/lib/testing.js
deleted file mode 100644
index 0e5c6e036ad..00000000000
--- a/packages/ember-debug/lib/testing.js
+++ /dev/null
@@ -1,9 +0,0 @@
-let testing = false;
-
-export function isTesting() {
- return testing;
-}
-
-export function setTesting(value) {
- testing = !!value;
-}
diff --git a/packages/ember-debug/lib/warn.js b/packages/ember-debug/lib/warn.js
deleted file mode 100644
index 627179c4611..00000000000
--- a/packages/ember-debug/lib/warn.js
+++ /dev/null
@@ -1,118 +0,0 @@
-import { DEBUG } from '@glimmer/env';
-import { ENV } from 'ember-environment';
-
-import deprecate from './deprecate';
-import { assert } from '../index';
-import { registerHandler as genericRegisterHandler, invoke } from './handlers';
-
-let registerHandler = () => {};
-let warn = () => {};
-let missingOptionsDeprecation, missingOptionsIdDeprecation;
-
-/**
-@module @ember/debug
-*/
-
-if (DEBUG) {
- /**
- Allows for runtime registration of handler functions that override the default warning behavior.
- Warnings are invoked by calls made to [@ember/debug/warn](https://emberjs.com/api/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn).
- The following example demonstrates its usage by registering a handler that does nothing overriding Ember's
- default warning behavior.
-
- ```javascript
- import { registerWarnHandler } from '@ember/debug';
-
- // next is not called, so no warnings get the default behavior
- registerWarnHandler(() => {});
- ```
-
- The handler function takes the following arguments:
-
-
- -
message
- The message received from the warn call.
- -
options
- An object passed in with the warn call containing additional information including:
-
- -
id
- An id of the warning in the form of package-name.specific-warning
.
-
- -
next
- A function that calls into the previously registered handler.
-
-
- @public
- @static
- @method registerWarnHandler
- @for @ember/debug
- @param handler {Function} A function to handle warnings.
- @since 2.1.0
- */
- registerHandler = function registerHandler(handler) {
- genericRegisterHandler('warn', handler);
- };
-
- registerHandler(function logWarning(message) {
- /* eslint-disable no-console */
- console.warn(`WARNING: ${message}`);
- if (console.trace) {
- console.trace();
- }
- /* eslint-enable no-console */
- });
-
- missingOptionsDeprecation =
- 'When calling `warn` you ' +
- 'must provide an `options` hash as the third parameter. ' +
- '`options` should include an `id` property.';
- missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.';
-
- /**
- Display a warning with the provided message.
-
- * In a production build, this method is defined as an empty function (NOP).
- Uses of this method in Ember itself are stripped from the ember.prod.js build.
-
- @method warn
- @for @ember/debug
- @static
- @param {String} message A warning to display.
- @param {Boolean} test An optional boolean. If falsy, the warning
- will be displayed.
- @param {Object} options An object that can be used to pass a unique
- `id` for this warning. The `id` can be used by Ember debugging tools
- to change the behavior (raise, log, or silence) for that specific warning.
- The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped"
- @public
- @since 1.0.0
- */
- warn = function warn(message, test, options) {
- if (arguments.length === 2 && typeof test === 'object') {
- options = test;
- test = false;
- }
-
- if (ENV._ENABLE_WARN_OPTIONS_SUPPORT !== true) {
- assert(missingOptionsDeprecation, options);
- assert(missingOptionsIdDeprecation, options && options.id);
- }
-
- if (!options && ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {
- deprecate(missingOptionsDeprecation, false, {
- id: 'ember-debug.warn-options-missing',
- until: '3.0.0',
- url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options',
- });
- }
-
- if (options && !options.id && ENV._ENABLE_WARN_OPTIONS_SUPPORT === true) {
- deprecate(missingOptionsIdDeprecation, false, {
- id: 'ember-debug.warn-id-missing',
- until: '3.0.0',
- url: 'https://emberjs.com/deprecations/v2.x/#toc_ember-debug-function-options',
- });
- }
-
- invoke('warn', message, test, options);
- };
-}
-
-export default warn;
-export { registerHandler, missingOptionsIdDeprecation, missingOptionsDeprecation };
diff --git a/packages/ember-debug/tests/.gitkeep b/packages/ember-debug/tests/.gitkeep
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/packages/ember-debug/tests/handlers-test.js b/packages/ember-debug/tests/handlers-test.js
deleted file mode 100644
index e02a98ec4d9..00000000000
--- a/packages/ember-debug/tests/handlers-test.js
+++ /dev/null
@@ -1,144 +0,0 @@
-import { HANDLERS, registerHandler, invoke } from '../lib/handlers';
-import { moduleFor, AbstractTestCase as TestCase } from 'internal-test-helpers';
-
-moduleFor(
- 'ember-debug: registerHandler',
- class extends TestCase {
- teardown() {
- delete HANDLERS.blarz;
- }
-
- ['@test calls handler on `invoke` when `falsey`'](assert) {
- assert.expect(2);
-
- function handler(message) {
- assert.ok(true, 'called handler');
- assert.equal(message, 'Foo bar');
- }
-
- registerHandler('blarz', handler);
-
- invoke('blarz', 'Foo bar', false);
- }
-
- ['@test does not call handler on `invoke` when `truthy`'](assert) {
- assert.expect(0);
-
- function handler() {
- assert.ok(false, 'called handler');
- }
-
- registerHandler('blarz', handler);
-
- invoke('blarz', 'Foo bar', true);
- }
-
- ['@test calling `invoke` without handlers does not throw an error'](assert) {
- assert.expect(0);
-
- invoke('blarz', 'Foo bar', false);
- }
-
- ['@test invoking `next` argument calls the next handler'](assert) {
- assert.expect(2);
-
- function handler1() {
- assert.ok(true, 'called handler1');
- }
-
- function handler2(message, options, next) {
- assert.ok(true, 'called handler2');
- next(message, options);
- }
-
- registerHandler('blarz', handler1);
- registerHandler('blarz', handler2);
-
- invoke('blarz', 'Foo', false);
- }
-
- ['@test invoking `next` when no other handlers exists does not error'](assert) {
- assert.expect(1);
-
- function handler(message, options, next) {
- assert.ok(true, 'called handler1');
-
- next(message, options);
- }
-
- registerHandler('blarz', handler);
-
- invoke('blarz', 'Foo', false);
- }
-
- ['@test handlers are called in the proper order'](assert) {
- assert.expect(11);
-
- let expectedMessage = 'This is the message';
- let expectedOptions = { id: 'foo-bar' };
- let expected = ['first', 'second', 'third', 'fourth', 'fifth'];
- let actualCalls = [];
-
- function generateHandler(item) {
- return function(message, options, next) {
- assert.equal(message, expectedMessage, `message supplied to ${item} handler is correct`);
- assert.equal(options, expectedOptions, `options supplied to ${item} handler is correct`);
-
- actualCalls.push(item);
-
- next(message, options);
- };
- }
-
- expected.forEach(item => registerHandler('blarz', generateHandler(item)));
-
- invoke('blarz', expectedMessage, false, expectedOptions);
-
- assert.deepEqual(actualCalls, expected.reverse(), 'handlers were called in proper order');
- }
-
- ['@test not invoking `next` prevents further handlers from being called'](assert) {
- assert.expect(1);
-
- function handler1() {
- assert.ok(false, 'called handler1');
- }
-
- function handler2() {
- assert.ok(true, 'called handler2');
- }
-
- registerHandler('blarz', handler1);
- registerHandler('blarz', handler2);
-
- invoke('blarz', 'Foo', false);
- }
-
- ['@test handlers can call `next` with custom message and/or options'](assert) {
- assert.expect(4);
-
- let initialMessage = 'initial message';
- let initialOptions = { id: 'initial-options' };
-
- let handler2Message = 'Handler2 Message';
- let handler2Options = { id: 'handler-2' };
-
- function handler1(message, options) {
- assert.equal(message, handler2Message, 'handler2 message provided to handler1');
- assert.equal(options, handler2Options, 'handler2 options provided to handler1');
- }
-
- function handler2(message, options, next) {
- assert.equal(message, initialMessage, 'initial message provided to handler2');
- assert.equal(options, initialOptions, 'initial options proivided to handler2');
-
- next(handler2Message, handler2Options);
- }
-
- registerHandler('blarz', handler1);
- registerHandler('blarz', handler2);
-
- invoke('blarz', initialMessage, false, initialOptions);
- }
- }
-);
diff --git a/packages/ember-debug/tests/main_test.js b/packages/ember-debug/tests/main_test.js
deleted file mode 100644
index dd4220313b6..00000000000
--- a/packages/ember-debug/tests/main_test.js
+++ /dev/null
@@ -1,444 +0,0 @@
-import { ENV } from 'ember-environment';
-import { Object as EmberObject } from 'ember-runtime';
-import { HANDLERS } from '../lib/handlers';
-import {
- registerHandler,
- missingOptionsDeprecation,
- missingOptionsIdDeprecation,
- missingOptionsUntilDeprecation,
-} from '../lib/deprecate';
-
-import {
- missingOptionsIdDeprecation as missingWarnOptionsIdDeprecation,
- missingOptionsDeprecation as missingWarnOptionsDeprecation,
- registerHandler as registerWarnHandler,
-} from '../lib/warn';
-
-import { deprecate, warn, assert as emberAssert } from '../index';
-
-import { moduleFor, AbstractTestCase as TestCase } from 'internal-test-helpers';
-
-let originalEnvValue;
-let originalDeprecateHandler;
-let originalWarnHandler;
-let originalWarnOptions;
-let originalDeprecationOptions;
-const originalConsoleWarn = console.warn; // eslint-disable-line no-console
-const noop = function() {};
-
-moduleFor(
- 'ember-debug',
- class extends TestCase {
- constructor() {
- super();
-
- originalEnvValue = ENV.RAISE_ON_DEPRECATION;
- originalDeprecateHandler = HANDLERS.deprecate;
- originalWarnHandler = HANDLERS.warn;
- originalWarnOptions = ENV._ENABLE_WARN_OPTIONS_SUPPORT;
- originalDeprecationOptions = ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT;
-
- ENV.RAISE_ON_DEPRECATION = true;
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT = true;
- }
-
- teardown() {
- HANDLERS.deprecate = originalDeprecateHandler;
- HANDLERS.warn = originalWarnHandler;
-
- ENV.RAISE_ON_DEPRECATION = originalEnvValue;
- ENV._ENABLE_WARN_OPTIONS_SUPPORT = originalWarnOptions;
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT = originalDeprecationOptions;
- }
-
- afterEach() {
- console.warn = originalConsoleWarn; // eslint-disable-line no-console
- }
-
- ['@test deprecate does not throw if RAISE_ON_DEPRECATION is false'](assert) {
- assert.expect(1);
- console.warn = noop; // eslint-disable-line no-console
-
- ENV.RAISE_ON_DEPRECATION = false;
-
- try {
- deprecate('Should not throw', false, { id: 'test', until: 'forever' });
- assert.ok(true, 'deprecate did not throw');
- } catch (e) {
- assert.ok(false, `Expected deprecate not to throw but it did: ${e.message}`);
- }
- }
-
- ['@test deprecate resets deprecation level to RAISE if ENV.RAISE_ON_DEPRECATION is set'](
- assert
- ) {
- assert.expect(2);
- console.warn = noop; // eslint-disable-line no-console
-
- ENV.RAISE_ON_DEPRECATION = false;
-
- try {
- deprecate('Should not throw', false, { id: 'test', until: 'forever' });
- assert.ok(true, 'deprecate did not throw');
- } catch (e) {
- assert.ok(false, `Expected deprecate not to throw but it did: ${e.message}`);
- }
-
- ENV.RAISE_ON_DEPRECATION = true;
-
- assert.throws(() => {
- deprecate('Should throw', false, { id: 'test', until: 'forever' });
- }, /Should throw/);
- }
-
- ['@test When ENV.RAISE_ON_DEPRECATION is true, it is still possible to silence a deprecation by id'](
- assert
- ) {
- assert.expect(3);
-
- ENV.RAISE_ON_DEPRECATION = true;
- registerHandler(function(message, options, next) {
- if (!options || options.id !== 'my-deprecation') {
- next(...arguments);
- }
- });
-
- try {
- deprecate('should be silenced with matching id', false, {
- id: 'my-deprecation',
- until: 'forever',
- });
- assert.ok(true, 'Did not throw when level is set by id');
- } catch (e) {
- assert.ok(false, `Expected deprecate not to throw but it did: ${e.message}`);
- }
-
- assert.throws(() => {
- deprecate('Should throw with no matching id', false, {
- id: 'test',
- until: 'forever',
- });
- }, /Should throw with no matching id/);
-
- assert.throws(() => {
- deprecate('Should throw with non-matching id', false, {
- id: 'other-id',
- until: 'forever',
- });
- }, /Should throw with non-matching id/);
- }
-
- ['@test deprecate throws deprecation if second argument is falsy'](assert) {
- assert.expect(3);
-
- assert.throws(() =>
- deprecate('Deprecation is thrown', false, {
- id: 'test',
- until: 'forever',
- })
- );
- assert.throws(() => deprecate('Deprecation is thrown', '', { id: 'test', until: 'forever' }));
- assert.throws(() => deprecate('Deprecation is thrown', 0, { id: 'test', until: 'forever' }));
- }
-
- ['@test deprecate does not invoke a function as the second argument'](assert) {
- assert.expect(1);
-
- deprecate(
- 'Deprecation is thrown',
- function() {
- assert.ok(false, 'this function should not be invoked');
- },
- { id: 'test', until: 'forever' }
- );
-
- assert.ok(true, 'deprecations were not thrown');
- }
-
- ['@test deprecate does not throw deprecations if second argument is truthy'](assert) {
- assert.expect(1);
-
- deprecate('Deprecation is thrown', true, {
- id: 'test',
- until: 'forever',
- });
- deprecate('Deprecation is thrown', '1', { id: 'test', until: 'forever' });
- deprecate('Deprecation is thrown', 1, { id: 'test', until: 'forever' });
-
- assert.ok(true, 'deprecations were not thrown');
- }
-
- ['@test assert throws if second argument is falsy'](assert) {
- assert.expect(3);
-
- assert.throws(() => emberAssert('Assertion is thrown', false));
- assert.throws(() => emberAssert('Assertion is thrown', ''));
- assert.throws(() => emberAssert('Assertion is thrown', 0));
- }
-
- ['@test assert does not throw if second argument is a function'](assert) {
- assert.expect(1);
-
- emberAssert('Assertion is thrown', () => true);
-
- assert.ok(true, 'assertions were not thrown');
- }
-
- ['@test assert does not throw if second argument is falsy'](assert) {
- assert.expect(1);
-
- emberAssert('Assertion is thrown', true);
- emberAssert('Assertion is thrown', '1');
- emberAssert('Assertion is thrown', 1);
-
- assert.ok(true, 'assertions were not thrown');
- }
-
- ['@test assert does not throw if second argument is an object'](assert) {
- assert.expect(1);
- let Igor = EmberObject.extend();
-
- emberAssert('is truthy', Igor);
- emberAssert('is truthy', Igor.create());
-
- assert.ok(true, 'assertions were not thrown');
- }
-
- ['@test deprecate does not throw a deprecation at log and silence'](assert) {
- assert.expect(4);
- let id = 'ABC';
- let until = 'forever';
- let shouldThrow = false;
-
- registerHandler(function(message, options) {
- if (options && options.id === id) {
- if (shouldThrow) {
- throw new Error(message);
- }
- }
- });
-
- try {
- deprecate('Deprecation for testing purposes', false, { id, until });
- assert.ok(true, 'Deprecation did not throw');
- } catch (e) {
- assert.ok(false, 'Deprecation was thrown despite being added to blacklist');
- }
-
- try {
- deprecate('Deprecation for testing purposes', false, { id, until });
- assert.ok(true, 'Deprecation did not throw');
- } catch (e) {
- assert.ok(false, 'Deprecation was thrown despite being added to blacklist');
- }
-
- shouldThrow = true;
-
- assert.throws(function() {
- deprecate('Deprecation is thrown', false, { id, until });
- });
-
- assert.throws(function() {
- deprecate('Deprecation is thrown', false, { id, until });
- });
- }
-
- ['@test deprecate without options triggers a deprecation'](assert) {
- assert.expect(4);
-
- registerHandler(function(message) {
- if (message === missingOptionsDeprecation) {
- assert.ok(true, 'proper deprecation is triggered when options is missing');
- } else if (message === 'foo') {
- assert.ok(true, 'original deprecation is still triggered');
- }
- });
-
- deprecate('foo');
- deprecate('foo', false, {});
- }
-
- ['@test deprecate without options triggers an assertion'](assert) {
- assert.expect(2);
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT = false;
-
- assert.throws(
- () => deprecate('foo'),
- new RegExp(missingOptionsDeprecation),
- 'proper assertion is triggered when options is missing'
- );
-
- assert.throws(
- () => deprecate('foo', false, {}),
- new RegExp(missingOptionsDeprecation),
- 'proper assertion is triggered when options is missing'
- );
- }
-
- ['@test deprecate without options.id triggers a deprecation'](assert) {
- assert.expect(2);
-
- registerHandler(function(message) {
- if (message === missingOptionsIdDeprecation) {
- assert.ok(true, 'proper deprecation is triggered when options.id is missing');
- } else if (message === 'foo') {
- assert.ok(true, 'original deprecation is still triggered');
- }
- });
-
- deprecate('foo', false, { until: 'forever' });
- }
-
- ['@test deprecate without options.id triggers an assertion'](assert) {
- assert.expect(1);
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT = false;
-
- assert.throws(
- () => deprecate('foo', false, { until: 'forever' }),
- new RegExp(missingOptionsIdDeprecation),
- 'proper assertion is triggered when options.id is missing'
- );
- }
-
- ['@test deprecate without options.until triggers a deprecation'](assert) {
- assert.expect(2);
-
- registerHandler(function(message) {
- if (message === missingOptionsUntilDeprecation) {
- assert.ok(true, 'proper deprecation is triggered when options.until is missing');
- } else if (message === 'foo') {
- assert.ok(true, 'original deprecation is still triggered');
- }
- });
-
- deprecate('foo', false, { id: 'test' });
- }
-
- ['@test deprecate without options.until triggers an assertion'](assert) {
- assert.expect(1);
- ENV._ENABLE_DEPRECATION_OPTIONS_SUPPORT = false;
-
- assert.throws(
- () => deprecate('foo', false, { id: 'test' }),
- new RegExp(missingOptionsUntilDeprecation),
- 'proper assertion is triggered when options.until is missing'
- );
- }
-
- ['@test warn without options triggers a deprecation'](assert) {
- assert.expect(2);
-
- ENV._ENABLE_WARN_OPTIONS_SUPPORT = true;
-
- registerHandler(function(message) {
- assert.equal(
- message,
- missingWarnOptionsDeprecation,
- 'deprecation is triggered when options is missing'
- );
- });
-
- registerWarnHandler(function(message) {
- assert.equal(message, 'foo', 'original warning is triggered');
- });
-
- warn('foo');
- }
-
- ['@test warn without options triggers an assert'](assert) {
- assert.expect(1);
-
- assert.throws(
- () => warn('foo'),
- new RegExp(missingWarnOptionsDeprecation),
- 'deprecation is triggered when options is missing'
- );
- }
-
- ['@test warn without options.id triggers a deprecation'](assert) {
- assert.expect(2);
-
- ENV._ENABLE_WARN_OPTIONS_SUPPORT = true;
-
- registerHandler(function(message) {
- assert.equal(
- message,
- missingWarnOptionsIdDeprecation,
- 'deprecation is triggered when options is missing'
- );
- });
-
- registerWarnHandler(function(message) {
- assert.equal(message, 'foo', 'original warning is triggered');
- });
-
- warn('foo', false, {});
- }
-
- ['@test warn without options.id triggers an assertion'](assert) {
- assert.expect(1);
-
- assert.throws(
- () => warn('foo', false, {}),
- new RegExp(missingWarnOptionsIdDeprecation),
- 'deprecation is triggered when options is missing'
- );
- }
-
- ['@test warn without options.id nor test triggers a deprecation'](assert) {
- assert.expect(2);
-
- ENV._ENABLE_WARN_OPTIONS_SUPPORT = true;
-
- registerHandler(function(message) {
- assert.equal(
- message,
- missingWarnOptionsIdDeprecation,
- 'deprecation is triggered when options is missing'
- );
- });
-
- registerWarnHandler(function(message) {
- assert.equal(message, 'foo', 'original warning is triggered');
- });
-
- warn('foo', {});
- }
-
- ['@test warn without options.id nor test triggers an assertion'](assert) {
- assert.expect(1);
-
- assert.throws(
- () => warn('foo', {}),
- new RegExp(missingWarnOptionsIdDeprecation),
- 'deprecation is triggered when options is missing'
- );
- }
-
- ['@test warn without test but with options does not trigger a deprecation'](assert) {
- assert.expect(1);
-
- ENV._ENABLE_WARN_OPTIONS_SUPPORT = true;
-
- registerHandler(function(message) {
- assert.ok(false, `there should be no deprecation ${message}`);
- });
-
- registerWarnHandler(function(message) {
- assert.equal(message, 'foo', 'warning was triggered');
- });
-
- warn('foo', { id: 'ember-debug.do-not-raise' });
- }
-
- ['@test warn without test but with options does not trigger an assertion'](assert) {
- assert.expect(1);
-
- registerWarnHandler(function(message) {
- assert.equal(message, 'foo', 'warning was triggered');
- });
-
- warn('foo', { id: 'ember-debug.do-not-raise' });
- }
- }
-);
diff --git a/packages/ember-debug/tests/warn_if_using_stripped_feature_flags_test.js b/packages/ember-debug/tests/warn_if_using_stripped_feature_flags_test.js
deleted file mode 100644
index 19a819d834f..00000000000
--- a/packages/ember-debug/tests/warn_if_using_stripped_feature_flags_test.js
+++ /dev/null
@@ -1,109 +0,0 @@
-import { ENV } from 'ember-environment';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
-import { _warnIfUsingStrippedFeatureFlags } from '../index';
-import { moduleFor, AbstractTestCase as TestCase } from 'internal-test-helpers';
-
-let oldWarn, oldRunInDebug, origEnvFeatures, origEnableOptional, features, knownFeatures;
-
-function confirmWarns(assert, expectedMsg) {
- let featuresWereStripped = true;
-
- setDebugFunction('warn', function(msg, test) {
- if (!test) {
- assert.equal(msg, expectedMsg);
- }
- });
-
- setDebugFunction('runInDebug', function(func) {
- func();
- });
-
- // Should trigger our 1 warning
- _warnIfUsingStrippedFeatureFlags(features, knownFeatures, featuresWereStripped);
-
- // Shouldn't trigger any warnings now that we're "in canary"
- featuresWereStripped = false;
- _warnIfUsingStrippedFeatureFlags(features, knownFeatures, featuresWereStripped);
-}
-
-moduleFor(
- 'ember-debug - _warnIfUsingStrippedFeatureFlags',
- class extends TestCase {
- constructor() {
- super();
-
- oldWarn = getDebugFunction('warn');
- oldRunInDebug = getDebugFunction('runInDebug');
- origEnvFeatures = ENV.FEATURES;
- origEnableOptional = ENV.ENABLE_OPTIONAL_FEATURES;
-
- knownFeatures = {
- fred: null,
- barney: null,
- wilma: null,
- };
- }
-
- teardown() {
- setDebugFunction('warn', oldWarn);
- setDebugFunction('runInDebug', oldRunInDebug);
- ENV.FEATURES = origEnvFeatures;
- ENV.ENABLE_OPTIONAL_FEATURES = origEnableOptional;
- }
-
- ['@test Setting Ember.ENV.ENABLE_OPTIONAL_FEATURES truthy in non-canary, debug build causes a warning'](
- assert
- ) {
- assert.expect(1);
-
- ENV.ENABLE_OPTIONAL_FEATURES = true;
- features = {};
-
- confirmWarns(
- assert,
- 'Ember.ENV.ENABLE_OPTIONAL_FEATURES is only available in canary builds.'
- );
- }
-
- ['@test Enabling a known FEATURE flag in non-canary, debug build causes a warning'](assert) {
- assert.expect(1);
-
- ENV.ENABLE_OPTIONAL_FEATURES = false;
- features = {
- fred: true,
- barney: false,
- wilma: null,
- };
-
- confirmWarns(
- assert,
- 'FEATURE["fred"] is set as enabled, but FEATURE flags are only available in canary builds.'
- );
- }
-
- ['@test Enabling an unknown FEATURE flag in non-canary debug build does not cause a warning'](
- assert
- ) {
- assert.expect(0);
-
- ENV.ENABLE_OPTIONAL_FEATURES = false;
- features = {
- 'some-ember-data-feature-flag': true,
- };
-
- confirmWarns(
- assert,
- 'FEATURE["fred"] is set as enabled, but FEATURE flags are only available in canary builds.'
- );
- }
-
- ['@test `ENV.FEATURES` being undefined does not cause an error'](assert) {
- assert.expect(0);
-
- ENV.ENABLE_OPTIONAL_FEATURES = false;
- features = undefined;
-
- confirmWarns(assert);
- }
- }
-);
diff --git a/packages/ember-extension-support/tests/container_debug_adapter_test.js b/packages/ember-extension-support/tests/container_debug_adapter_test.js
index 256e41b2c63..9b4c6dab5de 100644
--- a/packages/ember-extension-support/tests/container_debug_adapter_test.js
+++ b/packages/ember-extension-support/tests/container_debug_adapter_test.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { run } from '@ember/runloop';
import EmberController from '@ember/controller';
import '../index'; // Must be required to export Ember.ContainerDebugAdapter.
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember-glimmer/lib/component-managers/curly.ts b/packages/ember-glimmer/lib/component-managers/curly.ts
index df47a9b7284..4a8cc1daa5c 100644
--- a/packages/ember-glimmer/lib/component-managers/curly.ts
+++ b/packages/ember-glimmer/lib/component-managers/curly.ts
@@ -1,3 +1,4 @@
+import { assert, deprecate } from '@ember/debug';
import { _instrumentStart } from '@ember/instrumentation';
import { assign } from '@ember/polyfills';
import { dasherize } from '@ember/string';
@@ -25,7 +26,6 @@ import {
} from '@glimmer/runtime';
import { Destroyable, EMPTY_ARRAY } from '@glimmer/util';
import { privatize as P } from 'container';
-import { assert, deprecate } from 'ember-debug';
import { ENV } from 'ember-environment';
import { get } from 'ember-metal';
import { getOwner } from 'ember-owner';
diff --git a/packages/ember-glimmer/lib/component.ts b/packages/ember-glimmer/lib/component.ts
index fc44503be27..4231a8c2f8b 100644
--- a/packages/ember-glimmer/lib/component.ts
+++ b/packages/ember-glimmer/lib/component.ts
@@ -1,6 +1,6 @@
+import { assert } from '@ember/debug';
import { DirtyableTag } from '@glimmer/reference';
import { normalizeProperty, SVG_NAMESPACE } from '@glimmer/runtime';
-import { assert } from 'ember-debug';
import { get, PROPERTY_DID_CHANGE } from 'ember-metal';
import { getOwner } from 'ember-owner';
import { TargetActionSupport } from 'ember-runtime';
diff --git a/packages/ember-glimmer/lib/components/link-to.ts b/packages/ember-glimmer/lib/components/link-to.ts
index 0b7b24eb45e..6b3a2c3dc99 100644
--- a/packages/ember-glimmer/lib/components/link-to.ts
+++ b/packages/ember-glimmer/lib/components/link-to.ts
@@ -296,10 +296,10 @@
@public
*/
+import { assert, warn } from '@ember/debug';
import { flaggedInstrument } from '@ember/instrumentation';
import { inject as injectService } from '@ember/service';
import { DEBUG } from '@glimmer/env';
-import { assert, warn } from 'ember-debug';
import { computed, get } from 'ember-metal';
import { isSimpleClick } from 'ember-views';
import EmberComponent, { HAS_BLOCK } from '../component';
diff --git a/packages/ember-glimmer/lib/environment.ts b/packages/ember-glimmer/lib/environment.ts
index be2964f63d8..e5c6abcf8ac 100644
--- a/packages/ember-glimmer/lib/environment.ts
+++ b/packages/ember-glimmer/lib/environment.ts
@@ -1,3 +1,4 @@
+import { warn } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { OpaqueIterable, VersionedReference } from '@glimmer/reference';
import {
@@ -6,7 +7,6 @@ import {
SimpleDynamicAttribute,
} from '@glimmer/runtime';
import { Destroyable, Opaque } from '@glimmer/util';
-import { warn } from 'ember-debug';
import { OWNER, Owner } from 'ember-owner';
import { constructStyleDeprecationMessage, lookupComponent } from 'ember-views';
import DebugStack from './utils/debug-stack';
diff --git a/packages/ember-glimmer/lib/helpers/action.ts b/packages/ember-glimmer/lib/helpers/action.ts
index ceb82b7adc1..5cb0768cc6e 100644
--- a/packages/ember-glimmer/lib/helpers/action.ts
+++ b/packages/ember-glimmer/lib/helpers/action.ts
@@ -1,13 +1,13 @@
/**
@module ember
*/
+import { assert } from '@ember/debug';
import { flaggedInstrument } from '@ember/instrumentation';
import { join } from '@ember/runloop';
import { DEBUG } from '@glimmer/env';
import { isConst, VersionedPathReference } from '@glimmer/reference';
import { Arguments, VM } from '@glimmer/runtime';
import { Opaque } from '@glimmer/util';
-import { assert } from 'ember-debug';
import { get, isNone } from 'ember-metal';
import { ACTION, INVOKE, UnboundReference } from '../utils/references';
diff --git a/packages/ember-glimmer/lib/helpers/if-unless.ts b/packages/ember-glimmer/lib/helpers/if-unless.ts
index 200e4e4aad4..fa4fb8fc96a 100644
--- a/packages/ember-glimmer/lib/helpers/if-unless.ts
+++ b/packages/ember-glimmer/lib/helpers/if-unless.ts
@@ -2,9 +2,9 @@
@module ember
*/
+import { assert } from '@ember/debug';
import { combine, CONSTANT_TAG, isConst, TagWrapper, UpdatableTag } from '@glimmer/reference';
import { Arguments, PrimitiveReference, VM } from '@glimmer/runtime';
-import { assert } from 'ember-debug';
import { CachedReference, ConditionalReference } from '../utils/references';
class ConditionalHelperReference extends CachedReference {
diff --git a/packages/ember-glimmer/lib/helpers/mut.ts b/packages/ember-glimmer/lib/helpers/mut.ts
index 05bfccff62b..7cf2c6481df 100644
--- a/packages/ember-glimmer/lib/helpers/mut.ts
+++ b/packages/ember-glimmer/lib/helpers/mut.ts
@@ -1,8 +1,8 @@
/**
@module ember
*/
+import { assert } from '@ember/debug';
import { Arguments, VM } from '@glimmer/runtime';
-import { assert } from 'ember-debug';
import { symbol } from 'ember-utils';
import { INVOKE, UPDATE } from '../utils/references';
diff --git a/packages/ember-glimmer/lib/helpers/query-param.ts b/packages/ember-glimmer/lib/helpers/query-param.ts
index 4aa72cbff23..0056c32ba45 100644
--- a/packages/ember-glimmer/lib/helpers/query-param.ts
+++ b/packages/ember-glimmer/lib/helpers/query-param.ts
@@ -1,9 +1,9 @@
/**
@module ember
*/
+import { assert } from '@ember/debug';
import { assign } from '@ember/polyfills';
import { Arguments, CapturedArguments, VM } from '@glimmer/runtime';
-import { assert } from 'ember-debug';
import { QueryParams } from 'ember-routing';
import { InternalHelperReference } from '../utils/references';
diff --git a/packages/ember-glimmer/lib/helpers/unbound.ts b/packages/ember-glimmer/lib/helpers/unbound.ts
index 479bc759afd..19ccfbdf240 100644
--- a/packages/ember-glimmer/lib/helpers/unbound.ts
+++ b/packages/ember-glimmer/lib/helpers/unbound.ts
@@ -2,8 +2,8 @@
@module ember
*/
+import { assert } from '@ember/debug';
import { Arguments, VM } from '@glimmer/runtime';
-import { assert } from 'ember-debug';
import { UnboundReference } from '../utils/references';
/**
diff --git a/packages/ember-glimmer/lib/modifiers/action.ts b/packages/ember-glimmer/lib/modifiers/action.ts
index b65bafc09a5..3f3a592c212 100644
--- a/packages/ember-glimmer/lib/modifiers/action.ts
+++ b/packages/ember-glimmer/lib/modifiers/action.ts
@@ -1,3 +1,4 @@
+import { assert } from '@ember/debug';
import { flaggedInstrument } from '@ember/instrumentation';
import { join } from '@ember/runloop';
import { Simple } from '@glimmer/interfaces';
@@ -10,7 +11,6 @@ import {
ModifierManager,
} from '@glimmer/runtime';
import { Destroyable } from '@glimmer/util';
-import { assert } from 'ember-debug';
import { uuid } from 'ember-utils';
import { ActionManager, isSimpleClick } from 'ember-views';
import { INVOKE } from '../utils/references';
diff --git a/packages/ember-glimmer/lib/renderer.ts b/packages/ember-glimmer/lib/renderer.ts
index 121343df626..bdae0c52c00 100644
--- a/packages/ember-glimmer/lib/renderer.ts
+++ b/packages/ember-glimmer/lib/renderer.ts
@@ -1,3 +1,4 @@
+import { assert } from '@ember/debug';
import { backburner, getCurrentRunLoop } from '@ember/runloop';
import { Simple } from '@glimmer/interfaces';
import { CURRENT_TAG, VersionedPathReference } from '@glimmer/reference';
@@ -14,7 +15,6 @@ import {
UNDEFINED_REFERENCE,
} from '@glimmer/runtime';
import { Opaque } from '@glimmer/util';
-import { assert } from 'ember-debug';
import { runInTransaction, setHasViews } from 'ember-metal';
import { fallbackViewRegistry, getViewElement, getViewId, setViewElement } from 'ember-views';
import RSVP from 'rsvp';
diff --git a/packages/ember-glimmer/lib/resolver.ts b/packages/ember-glimmer/lib/resolver.ts
index fc84930abbc..8476a33c5e2 100644
--- a/packages/ember-glimmer/lib/resolver.ts
+++ b/packages/ember-glimmer/lib/resolver.ts
@@ -1,3 +1,4 @@
+import { assert } from '@ember/debug';
import { _instrumentStart } from '@ember/instrumentation';
import {
ComponentDefinition,
@@ -8,7 +9,6 @@ import {
import { LazyCompiler, Macros, PartialDefinition } from '@glimmer/opcode-compiler';
import { ComponentManager, getDynamicVar, Helper, ModifierManager } from '@glimmer/runtime';
import { privatize as P } from 'container';
-import { assert } from 'ember-debug';
import { ENV } from 'ember-environment';
import { LookupOptions, Owner, setOwner } from 'ember-owner';
import { lookupComponent, lookupPartial, OwnedTemplateMeta } from 'ember-views';
diff --git a/packages/ember-glimmer/lib/syntax.ts b/packages/ember-glimmer/lib/syntax.ts
index cf1ebb38e27..863b5e9041f 100644
--- a/packages/ember-glimmer/lib/syntax.ts
+++ b/packages/ember-glimmer/lib/syntax.ts
@@ -1,8 +1,8 @@
+import { assert } from '@ember/debug';
import { CompilableBlock } from '@glimmer/interfaces';
import { Macros, OpcodeBuilder } from '@glimmer/opcode-compiler';
import { Option } from '@glimmer/util';
import { Core } from '@glimmer/wire-format';
-import { assert } from 'ember-debug';
import { OwnedTemplateMeta } from 'ember-views';
import { EMBER_TEMPLATE_BLOCK_LET_HELPER } from 'ember/features';
import CompileTimeLookup from './compile-time-lookup';
diff --git a/packages/ember-glimmer/lib/syntax/input.ts b/packages/ember-glimmer/lib/syntax/input.ts
index 2ccfef06871..f7a2bda78b4 100644
--- a/packages/ember-glimmer/lib/syntax/input.ts
+++ b/packages/ember-glimmer/lib/syntax/input.ts
@@ -1,10 +1,10 @@
/**
@module ember
*/
+import { assert } from '@ember/debug';
import { Option } from '@glimmer/interfaces';
import { OpcodeBuilder } from '@glimmer/opcode-compiler';
import * as WireFormat from '@glimmer/wire-format';
-import { assert } from 'ember-debug';
import { OwnedTemplateMeta } from 'ember-views';
import { wrapComponentClassAttribute } from '../utils/bindings';
import { hashToArgs } from './utils';
diff --git a/packages/ember-glimmer/lib/syntax/mount.ts b/packages/ember-glimmer/lib/syntax/mount.ts
index 05d26c004f3..e225f536a24 100644
--- a/packages/ember-glimmer/lib/syntax/mount.ts
+++ b/packages/ember-glimmer/lib/syntax/mount.ts
@@ -1,6 +1,7 @@
/**
@module ember
*/
+import { assert } from '@ember/debug';
import { Opaque, Option } from '@glimmer/interfaces';
import { OpcodeBuilder } from '@glimmer/opcode-compiler';
import { Tag, VersionedPathReference } from '@glimmer/reference';
@@ -12,7 +13,6 @@ import {
VM,
} from '@glimmer/runtime';
import * as WireFormat from '@glimmer/wire-format';
-import { assert } from 'ember-debug';
import { OwnedTemplateMeta } from 'ember-views';
import { EMBER_ENGINES_MOUNT_PARAMS } from 'ember/features';
import { MountDefinition } from '../component-managers/mount';
diff --git a/packages/ember-glimmer/lib/syntax/render.ts b/packages/ember-glimmer/lib/syntax/render.ts
index bede619358e..cb116b9cb2a 100644
--- a/packages/ember-glimmer/lib/syntax/render.ts
+++ b/packages/ember-glimmer/lib/syntax/render.ts
@@ -4,12 +4,12 @@
// Remove after 3.4 once _ENABLE_RENDER_SUPPORT flag is no longer needed.
+import { assert } from '@ember/debug';
import { Option } from '@glimmer/interfaces';
import { OpcodeBuilder } from '@glimmer/opcode-compiler';
import { isConst, VersionedPathReference } from '@glimmer/reference';
import { Arguments, CurriedComponentDefinition, curry, VM } from '@glimmer/runtime';
import * as WireFormat from '@glimmer/wire-format';
-import { assert } from 'ember-debug';
import { ENV } from 'ember-environment';
import { OwnedTemplateMeta } from 'ember-views';
import {
diff --git a/packages/ember-glimmer/lib/utils/bindings.ts b/packages/ember-glimmer/lib/utils/bindings.ts
index 929c15462a9..98647911374 100644
--- a/packages/ember-glimmer/lib/utils/bindings.ts
+++ b/packages/ember-glimmer/lib/utils/bindings.ts
@@ -1,9 +1,9 @@
+import { assert } from '@ember/debug';
import { dasherize } from '@ember/string';
import { Opaque, Option, Simple } from '@glimmer/interfaces';
import { CachedReference, combine, map, Reference, Tag } from '@glimmer/reference';
import { ElementOperations, PrimitiveReference } from '@glimmer/runtime';
import { Core, Ops } from '@glimmer/wire-format';
-import { assert } from 'ember-debug';
import { get } from 'ember-metal';
import { ROOT_REF } from '../component';
import { Component } from './curly-component-state-bucket';
diff --git a/packages/ember-glimmer/lib/utils/custom-component-manager.ts b/packages/ember-glimmer/lib/utils/custom-component-manager.ts
index df0428d8c2c..26ccb5068ec 100644
--- a/packages/ember-glimmer/lib/utils/custom-component-manager.ts
+++ b/packages/ember-glimmer/lib/utils/custom-component-manager.ts
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { Owner } from 'ember-owner';
import { symbol } from 'ember-utils';
diff --git a/packages/ember-glimmer/lib/utils/iterable.ts b/packages/ember-glimmer/lib/utils/iterable.ts
index 67fc9e4b185..5f9de4d801d 100644
--- a/packages/ember-glimmer/lib/utils/iterable.ts
+++ b/packages/ember-glimmer/lib/utils/iterable.ts
@@ -1,3 +1,4 @@
+import { assert } from '@ember/debug';
import {
AbstractIterable,
combine,
@@ -9,7 +10,6 @@ import {
VersionedReference,
} from '@glimmer/reference';
import { Opaque, Option } from '@glimmer/util';
-import { assert } from 'ember-debug';
import { get, objectAt, tagFor, tagForProperty } from 'ember-metal';
import { _contentFor, isEmberArray } from 'ember-runtime';
import { guidFor, HAS_NATIVE_SYMBOL, isProxy } from 'ember-utils';
diff --git a/packages/ember-glimmer/tests/integration/application/actions-test.js b/packages/ember-glimmer/tests/integration/application/actions-test.js
index 9b942ae62b8..2b274114616 100644
--- a/packages/ember-glimmer/tests/integration/application/actions-test.js
+++ b/packages/ember-glimmer/tests/integration/application/actions-test.js
@@ -1,7 +1,7 @@
import Controller from '@ember/controller';
import { moduleFor, ApplicationTest, RenderingTest } from '../../utils/test-case';
import { Component } from '../../utils/helpers';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember-glimmer/tests/integration/content-test.js b/packages/ember-glimmer/tests/integration/content-test.js
index 7aedd6313b4..5f5ca52f66a 100644
--- a/packages/ember-glimmer/tests/integration/content-test.js
+++ b/packages/ember-glimmer/tests/integration/content-test.js
@@ -2,7 +2,7 @@
import { RenderingTest, moduleFor } from '../utils/test-case';
import { applyMixins } from '../utils/abstract-test-case';
import { set, computed } from 'ember-metal';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
import { Object as EmberObject, ObjectProxy, readOnly } from 'ember-runtime';
import { classes } from '../utils/test-helpers';
import { constructStyleDeprecationMessage } from 'ember-views';
diff --git a/packages/ember-metal/lib/alias.js b/packages/ember-metal/lib/alias.js
index bc4cd6ee54c..dcf0d81bcfe 100644
--- a/packages/ember-metal/lib/alias.js
+++ b/packages/ember-metal/lib/alias.js
@@ -1,5 +1,5 @@
import { inspect } from 'ember-utils';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import EmberError from '@ember/error';
import { get } from './property_get';
import { set } from './property_set';
diff --git a/packages/ember-metal/lib/computed.js b/packages/ember-metal/lib/computed.js
index f224f228748..0402a6af77c 100644
--- a/packages/ember-metal/lib/computed.js
+++ b/packages/ember-metal/lib/computed.js
@@ -1,5 +1,5 @@
import { inspect } from 'ember-utils';
-import { assert, warn } from 'ember-debug';
+import { assert, warn } from '@ember/debug';
import EmberError from '@ember/error';
import { set } from './property_set';
import { meta as metaFor, peekMeta } from './meta';
diff --git a/packages/ember-metal/lib/deprecate_property.js b/packages/ember-metal/lib/deprecate_property.js
index b9fd1ae0245..c8967091163 100644
--- a/packages/ember-metal/lib/deprecate_property.js
+++ b/packages/ember-metal/lib/deprecate_property.js
@@ -2,7 +2,7 @@
@module ember
*/
-import { deprecate } from 'ember-debug';
+import { deprecate } from '@ember/debug';
import { get } from './property_get';
import { set } from './property_set';
diff --git a/packages/ember-metal/lib/each_proxy.js b/packages/ember-metal/lib/each_proxy.js
index 1f5fddbd360..f4aa3d194b1 100644
--- a/packages/ember-metal/lib/each_proxy.js
+++ b/packages/ember-metal/lib/each_proxy.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { get } from './property_get';
import { notifyPropertyChange } from './property_events';
import { addObserver, removeObserver } from './observer';
diff --git a/packages/ember-metal/lib/events.js b/packages/ember-metal/lib/events.js
index ecd5ee4730c..a620ac51ada 100644
--- a/packages/ember-metal/lib/events.js
+++ b/packages/ember-metal/lib/events.js
@@ -2,7 +2,7 @@
@module @ember/object
*/
import { ENV } from 'ember-environment';
-import { deprecate, assert } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
import { meta as metaFor, peekMeta } from './meta';
/*
diff --git a/packages/ember-metal/lib/expand_properties.js b/packages/ember-metal/lib/expand_properties.js
index ec9d5b9c2c5..3c8b697876b 100644
--- a/packages/ember-metal/lib/expand_properties.js
+++ b/packages/ember-metal/lib/expand_properties.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
/**
@module @ember/object
diff --git a/packages/ember-metal/lib/injected_property.js b/packages/ember-metal/lib/injected_property.js
index 2d1242ab9f5..81e6314c61a 100644
--- a/packages/ember-metal/lib/injected_property.js
+++ b/packages/ember-metal/lib/injected_property.js
@@ -1,5 +1,5 @@
import { getOwner } from 'ember-owner';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { ComputedProperty } from './computed';
import { descriptorFor } from './meta';
import { EMBER_MODULE_UNIFICATION } from 'ember/features';
diff --git a/packages/ember-metal/lib/libraries.js b/packages/ember-metal/lib/libraries.js
index f2994f378f5..a8eb473662d 100644
--- a/packages/ember-metal/lib/libraries.js
+++ b/packages/ember-metal/lib/libraries.js
@@ -1,4 +1,4 @@
-import { warn, debug } from 'ember-debug';
+import { debug, warn } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { get } from './property_get';
import { EMBER_LIBRARIES_ISREGISTERED } from 'ember/features';
diff --git a/packages/ember-metal/lib/meta.js b/packages/ember-metal/lib/meta.js
index 3fa5d5448a9..a94f3170a8e 100644
--- a/packages/ember-metal/lib/meta.js
+++ b/packages/ember-metal/lib/meta.js
@@ -1,6 +1,6 @@
import { lookupDescriptor, symbol, toString } from 'ember-utils';
import { protoMethods as listenerMethods } from './meta_listeners';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { removeChainWatcher } from './chains';
import { ENV } from 'ember-environment';
diff --git a/packages/ember-metal/lib/mixin.js b/packages/ember-metal/lib/mixin.js
index 9e24942a468..02a279b2f6b 100644
--- a/packages/ember-metal/lib/mixin.js
+++ b/packages/ember-metal/lib/mixin.js
@@ -3,7 +3,7 @@
*/
import { assign } from '@ember/polyfills';
import { guidFor, ROOT, wrap, makeArray, NAME_KEY } from 'ember-utils';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { ENV } from 'ember-environment';
import { descriptorFor, meta as metaFor, peekMeta } from './meta';
diff --git a/packages/ember-metal/lib/properties.js b/packages/ember-metal/lib/properties.js
index 5ae4c7d7d71..e806d80a629 100644
--- a/packages/ember-metal/lib/properties.js
+++ b/packages/ember-metal/lib/properties.js
@@ -2,7 +2,7 @@
@module @ember/object
*/
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { descriptorFor, meta as metaFor, peekMeta, UNDEFINED } from './meta';
import { overrideChains } from './property_events';
diff --git a/packages/ember-metal/lib/property_events.js b/packages/ember-metal/lib/property_events.js
index f9bb27f45f0..1aff00701d1 100644
--- a/packages/ember-metal/lib/property_events.js
+++ b/packages/ember-metal/lib/property_events.js
@@ -4,7 +4,7 @@ import { sendEvent } from './events';
import { markObjectAsDirty } from './tags';
import ObserverSet from './observer_set';
import { EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER } from 'ember/features';
-import { deprecate } from 'ember-debug';
+import { deprecate } from '@ember/debug';
import { assertNotRendered } from './transaction';
import { changeEvent } from './observer';
diff --git a/packages/ember-metal/lib/property_get.js b/packages/ember-metal/lib/property_get.js
index 51f19b85936..b29fd58a43f 100644
--- a/packages/ember-metal/lib/property_get.js
+++ b/packages/ember-metal/lib/property_get.js
@@ -2,7 +2,7 @@
@module @ember/object
*/
import { DEBUG } from '@glimmer/env';
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
import { HAS_NATIVE_PROXY, symbol } from 'ember-utils';
import { EMBER_METAL_TRACKED_PROPERTIES } from 'ember/features';
import { isPath } from './path_cache';
diff --git a/packages/ember-metal/lib/property_set.js b/packages/ember-metal/lib/property_set.js
index 9e68e57d53e..24cbc9b9dc4 100644
--- a/packages/ember-metal/lib/property_set.js
+++ b/packages/ember-metal/lib/property_set.js
@@ -1,7 +1,7 @@
import { HAS_NATIVE_PROXY, toString } from 'ember-utils';
import EmberError from '@ember/error';
import { DEBUG } from '@glimmer/env';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { getPossibleMandatoryProxyValue, _getPath as getPath } from './property_get';
import { notifyPropertyChange } from './property_events';
diff --git a/packages/ember-metal/lib/transaction.js b/packages/ember-metal/lib/transaction.js
index 28b21edf040..206dcadfe0a 100644
--- a/packages/ember-metal/lib/transaction.js
+++ b/packages/ember-metal/lib/transaction.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { EMBER_GLIMMER_DETECT_BACKTRACKING_RERENDER } from 'ember/features';
diff --git a/packages/ember-metal/tests/libraries_test.js b/packages/ember-metal/tests/libraries_test.js
index 8285c86c1c7..90b71eef80c 100644
--- a/packages/ember-metal/tests/libraries_test.js
+++ b/packages/ember-metal/tests/libraries_test.js
@@ -1,5 +1,5 @@
/* globals EmberDev */
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
import { Libraries } from '..';
import { EMBER_LIBRARIES_ISREGISTERED } from 'ember/features';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
diff --git a/packages/ember-routing/lib/location/api.js b/packages/ember-routing/lib/location/api.js
index 836bb25cfc4..adf8c589458 100644
--- a/packages/ember-routing/lib/location/api.js
+++ b/packages/ember-routing/lib/location/api.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { location } from 'ember-browser-environment';
import { getHash } from './util';
diff --git a/packages/ember-routing/lib/location/auto_location.js b/packages/ember-routing/lib/location/auto_location.js
index 4e15d9db0c8..a0178ae6967 100644
--- a/packages/ember-routing/lib/location/auto_location.js
+++ b/packages/ember-routing/lib/location/auto_location.js
@@ -1,7 +1,7 @@
import { getOwner } from 'ember-owner';
import { tryInvoke } from 'ember-utils';
import { get, set } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { Object as EmberObject } from 'ember-runtime';
import { location, history, window, userAgent } from 'ember-browser-environment';
diff --git a/packages/ember-routing/lib/location/none_location.js b/packages/ember-routing/lib/location/none_location.js
index 0027c4f86ca..0d9321f98db 100644
--- a/packages/ember-routing/lib/location/none_location.js
+++ b/packages/ember-routing/lib/location/none_location.js
@@ -1,5 +1,5 @@
import { get, set } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { Object as EmberObject } from 'ember-runtime';
/**
diff --git a/packages/ember-routing/lib/system/dsl.js b/packages/ember-routing/lib/system/dsl.js
index e42c8e0d3d0..d408a51130e 100644
--- a/packages/ember-routing/lib/system/dsl.js
+++ b/packages/ember-routing/lib/system/dsl.js
@@ -1,5 +1,5 @@
import { assign } from '@ember/polyfills';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
let uuid = 0;
diff --git a/packages/ember-routing/lib/system/generate_controller.js b/packages/ember-routing/lib/system/generate_controller.js
index bd4e246af6b..f0fe2444ee4 100644
--- a/packages/ember-routing/lib/system/generate_controller.js
+++ b/packages/ember-routing/lib/system/generate_controller.js
@@ -1,5 +1,5 @@
import { get } from 'ember-metal';
-import { info } from 'ember-debug';
+import { info } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
/**
@module ember
diff --git a/packages/ember-routing/lib/system/route.js b/packages/ember-routing/lib/system/route.js
index 61a7f6ebc98..d934cd11bd7 100644
--- a/packages/ember-routing/lib/system/route.js
+++ b/packages/ember-routing/lib/system/route.js
@@ -2,7 +2,7 @@ import { getOwner } from 'ember-owner';
import { assign } from '@ember/polyfills';
import { once } from '@ember/runloop';
import { get, set, getProperties, setProperties, computed, isEmpty } from 'ember-metal';
-import { assert, info, isTesting, deprecate } from 'ember-debug';
+import { assert, deprecate, info, isTesting } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { classify } from '@ember/string';
import {
diff --git a/packages/ember-routing/lib/system/router.js b/packages/ember-routing/lib/system/router.js
index b9d87e4a90c..5b617e51280 100644
--- a/packages/ember-routing/lib/system/router.js
+++ b/packages/ember-routing/lib/system/router.js
@@ -3,7 +3,7 @@ import { assign } from '@ember/polyfills';
import { cancel, once, run, scheduleOnce, schedule } from '@ember/runloop';
import { get, set, defineProperty, computed } from 'ember-metal';
import EmberError from '@ember/error';
-import { deprecate, assert, info } from 'ember-debug';
+import { assert, deprecate, info } from '@ember/debug';
import { Object as EmberObject, Evented, typeOf, A as emberA } from 'ember-runtime';
import { defaultSerialize, hasDefaultSerialize } from './route';
import EmberRouterDSL from './dsl';
diff --git a/packages/ember-routing/tests/system/controller_for_test.js b/packages/ember-routing/tests/system/controller_for_test.js
index a53720dd296..7954739e223 100644
--- a/packages/ember-routing/tests/system/controller_for_test.js
+++ b/packages/ember-routing/tests/system/controller_for_test.js
@@ -2,7 +2,7 @@ import Controller from '@ember/controller';
import controllerFor from '../../lib/system/controller_for';
import generateController from '../../lib/system/generate_controller';
import { moduleFor, ApplicationTestCase } from 'internal-test-helpers';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember-runtime/lib/computed/computed_macros.js b/packages/ember-runtime/lib/computed/computed_macros.js
index 329bb875eca..e7a26d56c7a 100644
--- a/packages/ember-runtime/lib/computed/computed_macros.js
+++ b/packages/ember-runtime/lib/computed/computed_macros.js
@@ -8,7 +8,7 @@ import {
alias,
expandProperties,
} from 'ember-metal';
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
/**
@module @ember/object
diff --git a/packages/ember-runtime/lib/computed/reduce_computed_macros.js b/packages/ember-runtime/lib/computed/reduce_computed_macros.js
index 618c4191e41..fdfb9b5b077 100644
--- a/packages/ember-runtime/lib/computed/reduce_computed_macros.js
+++ b/packages/ember-runtime/lib/computed/reduce_computed_macros.js
@@ -1,7 +1,7 @@
/**
@module @ember/object
*/
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { get, ComputedProperty, addObserver, removeObserver, getProperties } from 'ember-metal';
import compare from '../compare';
import { isArray } from '../utils';
diff --git a/packages/ember-runtime/lib/copy.js b/packages/ember-runtime/lib/copy.js
index 1d1b1b29834..8d82c20dc91 100644
--- a/packages/ember-runtime/lib/copy.js
+++ b/packages/ember-runtime/lib/copy.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import EmberObject from './system/object';
import Copyable from './mixins/copyable';
/**
diff --git a/packages/ember-runtime/lib/ext/function.js b/packages/ember-runtime/lib/ext/function.js
index 7c2279b7966..9e58593f294 100644
--- a/packages/ember-runtime/lib/ext/function.js
+++ b/packages/ember-runtime/lib/ext/function.js
@@ -4,7 +4,7 @@
import { ENV } from 'ember-environment';
import { on, computed, observer } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
const FunctionPrototype = Function.prototype;
diff --git a/packages/ember-runtime/lib/ext/rsvp.js b/packages/ember-runtime/lib/ext/rsvp.js
index f2e53c92f41..9aa9068c7fa 100644
--- a/packages/ember-runtime/lib/ext/rsvp.js
+++ b/packages/ember-runtime/lib/ext/rsvp.js
@@ -1,7 +1,7 @@
import * as RSVP from 'rsvp';
import { backburner, _rsvpErrorQueue } from '@ember/runloop';
import { getDispatchOverride } from 'ember-error-handling';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
RSVP.configure('async', (callback, promise) => {
backburner.schedule('actions', null, callback, promise);
diff --git a/packages/ember-runtime/lib/mixins/-proxy.js b/packages/ember-runtime/lib/mixins/-proxy.js
index 0df88e07068..862df48cb57 100644
--- a/packages/ember-runtime/lib/mixins/-proxy.js
+++ b/packages/ember-runtime/lib/mixins/-proxy.js
@@ -15,7 +15,7 @@ import {
tagFor,
} from 'ember-metal';
import { setProxy } from 'ember-utils';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { bool } from '../computed/computed_macros';
function contentPropertyDidChange(content, contentKey) {
diff --git a/packages/ember-runtime/lib/mixins/action_handler.js b/packages/ember-runtime/lib/mixins/action_handler.js
index eb5f1fed45e..4b0a1e4bdb3 100644
--- a/packages/ember-runtime/lib/mixins/action_handler.js
+++ b/packages/ember-runtime/lib/mixins/action_handler.js
@@ -3,7 +3,7 @@
*/
import { Mixin, get } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
/**
`Ember.ActionHandler` is available on some familiar classes including
diff --git a/packages/ember-runtime/lib/mixins/array.js b/packages/ember-runtime/lib/mixins/array.js
index c10a15f3d99..12fea18d11c 100644
--- a/packages/ember-runtime/lib/mixins/array.js
+++ b/packages/ember-runtime/lib/mixins/array.js
@@ -21,7 +21,7 @@ import {
arrayContentWillChange,
arrayContentDidChange,
} from 'ember-metal';
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
import Enumerable from './enumerable';
import compare from '../compare';
import { ENV } from 'ember-environment';
diff --git a/packages/ember-runtime/lib/mixins/observable.js b/packages/ember-runtime/lib/mixins/observable.js
index c530d71ba7b..2e2d754fdae 100644
--- a/packages/ember-runtime/lib/mixins/observable.js
+++ b/packages/ember-runtime/lib/mixins/observable.js
@@ -20,7 +20,7 @@ import {
getCachedValueFor,
isNone,
} from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
/**
## Overview
diff --git a/packages/ember-runtime/lib/mixins/registry_proxy.js b/packages/ember-runtime/lib/mixins/registry_proxy.js
index 8afed96a6ae..2c01e468abd 100644
--- a/packages/ember-runtime/lib/mixins/registry_proxy.js
+++ b/packages/ember-runtime/lib/mixins/registry_proxy.js
@@ -2,7 +2,7 @@
@module ember
*/
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { Mixin } from 'ember-metal';
/**
diff --git a/packages/ember-runtime/lib/mixins/target_action_support.js b/packages/ember-runtime/lib/mixins/target_action_support.js
index 259a84b4dd2..32d77c2ee53 100644
--- a/packages/ember-runtime/lib/mixins/target_action_support.js
+++ b/packages/ember-runtime/lib/mixins/target_action_support.js
@@ -4,7 +4,7 @@
import { context } from 'ember-environment';
import { get, Mixin, computed, descriptor } from 'ember-metal';
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
/**
`Ember.TargetActionSupport` is a mixin that can be included in a class
to add a `triggerAction` method with semantics similar to the Handlebars
diff --git a/packages/ember-runtime/lib/system/array_proxy.js b/packages/ember-runtime/lib/system/array_proxy.js
index 87191ffa09b..9d50187e708 100644
--- a/packages/ember-runtime/lib/system/array_proxy.js
+++ b/packages/ember-runtime/lib/system/array_proxy.js
@@ -14,7 +14,7 @@ import {
import { isArray } from '../utils';
import EmberObject from './object';
import { MutableArray } from '../mixins/array';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
const ARRAY_OBSERVER_MAPPING = {
willChange: '_arrangedContentArrayWillChange',
diff --git a/packages/ember-runtime/lib/system/core_object.js b/packages/ember-runtime/lib/system/core_object.js
index c5f479b5ab3..8e8911dacea 100644
--- a/packages/ember-runtime/lib/system/core_object.js
+++ b/packages/ember-runtime/lib/system/core_object.js
@@ -2,8 +2,6 @@
@module @ember/object
*/
-// using ember-metal/lib/main here to ensure that ember-debug is setup
-// if present
import { FACTORY_FOR } from 'container';
import { assign } from '@ember/polyfills';
import {
@@ -31,7 +29,7 @@ import {
classToString,
} from 'ember-metal';
import ActionHandler from '../mixins/action_handler';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
import { ENV } from 'ember-environment';
diff --git a/packages/ember-runtime/lib/system/object.js b/packages/ember-runtime/lib/system/object.js
index 8b2ccc13345..c391d247f9e 100644
--- a/packages/ember-runtime/lib/system/object.js
+++ b/packages/ember-runtime/lib/system/object.js
@@ -8,7 +8,7 @@ import { symbol, setName } from 'ember-utils';
import { on, descriptor } from 'ember-metal';
import CoreObject from './core_object';
import Observable from '../mixins/observable';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { DEBUG } from '@glimmer/env';
let OVERRIDE_OWNER = symbol('OVERRIDE_OWNER');
diff --git a/packages/ember-runtime/tests/ext/rsvp_test.js b/packages/ember-runtime/tests/ext/rsvp_test.js
index 03084bd6f72..eb85ab912c3 100644
--- a/packages/ember-runtime/tests/ext/rsvp_test.js
+++ b/packages/ember-runtime/tests/ext/rsvp_test.js
@@ -1,7 +1,7 @@
import { next, run, schedule } from '@ember/runloop';
import { getOnerror, setOnerror } from 'ember-error-handling';
import RSVP from '../../lib/ext/rsvp';
-import { isTesting, setTesting } from 'ember-debug';
+import { isTesting, setTesting } from '@ember/debug';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
const ORIGINAL_ONERROR = getOnerror();
diff --git a/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.js b/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.js
index 5fde9337c43..372ccecbc6c 100644
--- a/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.js
+++ b/packages/ember-template-compiler/lib/plugins/assert-if-helper-without-arguments.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
export default function assertIfHelperWithoutArguments(env) {
diff --git a/packages/ember-template-compiler/lib/plugins/assert-input-helper-without-block.js b/packages/ember-template-compiler/lib/plugins/assert-input-helper-without-block.js
index 0f5d28d9aa0..4b485ee6e5c 100644
--- a/packages/ember-template-compiler/lib/plugins/assert-input-helper-without-block.js
+++ b/packages/ember-template-compiler/lib/plugins/assert-input-helper-without-block.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
export default function errorOnInputWithContent(env) {
diff --git a/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js b/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js
index dd45f48b01a..c67aa0a8415 100644
--- a/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js
+++ b/packages/ember-template-compiler/lib/plugins/assert-reserved-named-arguments.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { EMBER_GLIMMER_NAMED_ARGUMENTS } from 'ember/features';
import calculateLocationDisplay from '../system/calculate-location-display';
diff --git a/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js b/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js
index cf3761f8b64..998a9929f56 100644
--- a/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js
+++ b/packages/ember-template-compiler/lib/plugins/deprecate-render-model.js
@@ -1,4 +1,4 @@
-import { deprecate } from 'ember-debug';
+import { deprecate } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
// Remove after 3.4 once _ENABLE_RENDER_SUPPORT flag is no longer needed.
diff --git a/packages/ember-template-compiler/lib/plugins/deprecate-render.js b/packages/ember-template-compiler/lib/plugins/deprecate-render.js
index babd3869594..2175425727a 100644
--- a/packages/ember-template-compiler/lib/plugins/deprecate-render.js
+++ b/packages/ember-template-compiler/lib/plugins/deprecate-render.js
@@ -1,4 +1,4 @@
-import { deprecate } from 'ember-debug';
+import { deprecate } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
// Remove after 3.4 once _ENABLE_RENDER_SUPPORT flag is no longer needed.
diff --git a/packages/ember-template-compiler/lib/plugins/transform-in-element.js b/packages/ember-template-compiler/lib/plugins/transform-in-element.js
index 4183bc6f253..19e75400491 100644
--- a/packages/ember-template-compiler/lib/plugins/transform-in-element.js
+++ b/packages/ember-template-compiler/lib/plugins/transform-in-element.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
/**
diff --git a/packages/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js b/packages/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js
index afa03331659..0925463be14 100644
--- a/packages/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js
+++ b/packages/ember-template-compiler/lib/plugins/transform-old-binding-syntax.js
@@ -1,4 +1,4 @@
-import { assert, deprecate } from 'ember-debug';
+import { assert, deprecate } from '@ember/debug';
import calculateLocationDisplay from '../system/calculate-location-display';
export default function transformOldBindingSyntax(env) {
diff --git a/packages/ember-testing/lib/ext/rsvp.js b/packages/ember-testing/lib/ext/rsvp.js
index 03e6bfdecd4..a6737f2b56d 100644
--- a/packages/ember-testing/lib/ext/rsvp.js
+++ b/packages/ember-testing/lib/ext/rsvp.js
@@ -1,6 +1,6 @@
import { RSVP } from 'ember-runtime';
import { backburner } from '@ember/runloop';
-import { isTesting } from 'ember-debug';
+import { isTesting } from '@ember/debug';
import { asyncStart, asyncEnd } from '../test/adapter';
RSVP.configure('async', function(callback, promise) {
diff --git a/packages/ember-testing/lib/helpers/find.js b/packages/ember-testing/lib/helpers/find.js
index f32d7d2f694..383e28e50d4 100644
--- a/packages/ember-testing/lib/helpers/find.js
+++ b/packages/ember-testing/lib/helpers/find.js
@@ -2,7 +2,7 @@
@module ember
*/
import { get } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { jQueryDisabled } from 'ember-views';
/**
diff --git a/packages/ember-testing/lib/helpers/pause_test.js b/packages/ember-testing/lib/helpers/pause_test.js
index ffa6375f531..175312a66a0 100644
--- a/packages/ember-testing/lib/helpers/pause_test.js
+++ b/packages/ember-testing/lib/helpers/pause_test.js
@@ -2,7 +2,7 @@
@module ember
*/
import { RSVP } from 'ember-runtime';
-import { assert, info } from 'ember-debug';
+import { assert, info } from '@ember/debug';
let resume;
diff --git a/packages/ember-testing/lib/setup_for_testing.js b/packages/ember-testing/lib/setup_for_testing.js
index 5361ecd696b..d14f666b837 100644
--- a/packages/ember-testing/lib/setup_for_testing.js
+++ b/packages/ember-testing/lib/setup_for_testing.js
@@ -1,6 +1,6 @@
/* global self */
-import { setTesting } from 'ember-debug';
+import { setTesting } from '@ember/debug';
import { jQuery } from 'ember-views';
import { getAdapter, setAdapter } from './test/adapter';
import {
diff --git a/packages/ember-testing/lib/support.js b/packages/ember-testing/lib/support.js
index 88c1a300682..900a7c66a88 100644
--- a/packages/ember-testing/lib/support.js
+++ b/packages/ember-testing/lib/support.js
@@ -1,4 +1,4 @@
-import { warn } from 'ember-debug';
+import { warn } from '@ember/debug';
import { jQuery, jQueryDisabled } from 'ember-views';
import { hasDOM } from 'ember-browser-environment';
diff --git a/packages/ember-testing/tests/acceptance_test.js b/packages/ember-testing/tests/acceptance_test.js
index bffceec2b74..4badf8744f4 100644
--- a/packages/ember-testing/tests/acceptance_test.js
+++ b/packages/ember-testing/tests/acceptance_test.js
@@ -6,7 +6,7 @@ import QUnitAdapter from '../lib/adapters/qunit';
import { Route } from 'ember-routing';
import { RSVP } from 'ember-runtime';
import { jQueryDisabled } from 'ember-views';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember-testing/tests/adapters_test.js b/packages/ember-testing/tests/adapters_test.js
index 2ec661b5142..a76738361b2 100644
--- a/packages/ember-testing/tests/adapters_test.js
+++ b/packages/ember-testing/tests/adapters_test.js
@@ -6,7 +6,7 @@ import QUnitAdapter from '../lib/adapters/qunit';
import EmberApplication from '@ember/application';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
import { RSVP } from 'ember-runtime';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember-testing/tests/ext/rsvp_test.js b/packages/ember-testing/tests/ext/rsvp_test.js
index 89ad06987b0..d014403ac06 100644
--- a/packages/ember-testing/tests/ext/rsvp_test.js
+++ b/packages/ember-testing/tests/ext/rsvp_test.js
@@ -2,7 +2,7 @@ import RSVP from '../../lib/ext/rsvp';
import { getAdapter, setAdapter } from '../../lib/test/adapter';
import TestPromise, { getLastPromise } from '../../lib/test/promise';
import { getCurrentRunLoop } from '@ember/runloop';
-import { isTesting, setTesting } from 'ember-debug';
+import { isTesting, setTesting } from '@ember/debug';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
const originalTestAdapter = getAdapter();
diff --git a/packages/ember-testing/tests/helpers_test.js b/packages/ember-testing/tests/helpers_test.js
index 810098cad64..fb6227abac0 100644
--- a/packages/ember-testing/tests/helpers_test.js
+++ b/packages/ember-testing/tests/helpers_test.js
@@ -18,7 +18,7 @@ import {
} from '../lib/test/pending_requests';
import { setAdapter, getAdapter } from '../lib/test/adapter';
import { registerWaiter, unregisterWaiter } from '../lib/test/waiters';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
var originalInfo = getDebugFunction('info');
var noop = function() {};
diff --git a/packages/ember-views/lib/component_lookup.js b/packages/ember-views/lib/component_lookup.js
index 096879275ca..ed6277c1c2f 100644
--- a/packages/ember-views/lib/component_lookup.js
+++ b/packages/ember-views/lib/component_lookup.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { Object as EmberObject } from 'ember-runtime';
export default EmberObject.extend({
diff --git a/packages/ember-views/lib/mixins/action_support.js b/packages/ember-views/lib/mixins/action_support.js
index dd97f48e056..b6c5b7428c8 100644
--- a/packages/ember-views/lib/mixins/action_support.js
+++ b/packages/ember-views/lib/mixins/action_support.js
@@ -3,7 +3,7 @@
*/
import { inspect } from 'ember-utils';
import { Mixin, get, isNone } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { MUTABLE_CELL } from '../compat/attrs';
function validateAction(component, actionName) {
diff --git a/packages/ember-views/lib/mixins/class_names_support.js b/packages/ember-views/lib/mixins/class_names_support.js
index 011ee28949c..8562377a2d8 100644
--- a/packages/ember-views/lib/mixins/class_names_support.js
+++ b/packages/ember-views/lib/mixins/class_names_support.js
@@ -3,7 +3,7 @@
*/
import { Mixin, descriptorFor } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
const EMPTY_ARRAY = Object.freeze([]);
diff --git a/packages/ember-views/lib/mixins/view_support.js b/packages/ember-views/lib/mixins/view_support.js
index cb509c470e1..5f05e7d19fd 100644
--- a/packages/ember-views/lib/mixins/view_support.js
+++ b/packages/ember-views/lib/mixins/view_support.js
@@ -1,6 +1,6 @@
import { guidFor } from 'ember-utils';
import { descriptor, descriptorFor, Mixin } from 'ember-metal';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { hasDOM } from 'ember-browser-environment';
import { matches } from '../system/utils';
import { default as jQuery, jQueryDisabled } from '../system/jquery';
diff --git a/packages/ember-views/lib/system/event_dispatcher.js b/packages/ember-views/lib/system/event_dispatcher.js
index 0313cd71786..64dcae49a60 100644
--- a/packages/ember-views/lib/system/event_dispatcher.js
+++ b/packages/ember-views/lib/system/event_dispatcher.js
@@ -4,7 +4,7 @@ import { getOwner } from 'ember-owner';
*/
import { assign } from '@ember/polyfills';
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { get, set, isNone } from 'ember-metal';
import { Object as EmberObject } from 'ember-runtime';
import jQuery from './jquery';
diff --git a/packages/ember-views/lib/system/lookup_partial.js b/packages/ember-views/lib/system/lookup_partial.js
index 3ab932a648e..9e489f73b29 100644
--- a/packages/ember-views/lib/system/lookup_partial.js
+++ b/packages/ember-views/lib/system/lookup_partial.js
@@ -1,4 +1,4 @@
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import EmberError from '@ember/error';
function parseUnderscoredName(templateName) {
diff --git a/packages/ember/index.js b/packages/ember/index.js
index 3271e704a50..fae93967ed1 100644
--- a/packages/ember/index.js
+++ b/packages/ember/index.js
@@ -7,8 +7,8 @@ import { Registry, Container } from 'container';
import * as instrumentation from '@ember/instrumentation';
import * as metal from 'ember-metal';
import * as FLAGS from 'ember/features';
-import * as EmberDebug from 'ember-debug';
-import { assert, deprecate } from 'ember-debug';
+import * as EmberDebug from '@ember/debug';
+import { assert, deprecate } from '@ember/debug';
import Backburner from 'backburner';
import Logger from 'ember-console';
import Controller, { inject as injectController } from '@ember/controller';
@@ -194,7 +194,7 @@ Ember.NAME_KEY = utils.NAME_KEY;
Ember.Container = Container;
Ember.Registry = Registry;
-// ****ember-debug****
+// ****@ember/debug****
Ember.assert = EmberDebug.assert;
Ember.warn = EmberDebug.warn;
Ember.debug = EmberDebug.debug;
diff --git a/packages/ember/tests/application_lifecycle_test.js b/packages/ember/tests/application_lifecycle_test.js
index 647e7cb549f..ff672589942 100644
--- a/packages/ember/tests/application_lifecycle_test.js
+++ b/packages/ember/tests/application_lifecycle_test.js
@@ -2,7 +2,7 @@ import { moduleFor, AutobootApplicationTestCase } from 'internal-test-helpers';
import Application from '@ember/application';
import { Route, Router } from 'ember-routing';
import { Component } from 'ember-glimmer';
-import { getDebugFunction, setDebugFunction } from 'ember-debug';
+import { getDebugFunction, setDebugFunction } from '@ember/debug';
const originalDebug = getDebugFunction('debug');
const noop = function() {};
diff --git a/packages/ember/tests/error_handler_test.js b/packages/ember/tests/error_handler_test.js
index b97b969c421..31e6bc075c8 100644
--- a/packages/ember/tests/error_handler_test.js
+++ b/packages/ember/tests/error_handler_test.js
@@ -1,4 +1,4 @@
-import { isTesting, setTesting } from 'ember-debug';
+import { isTesting, setTesting } from '@ember/debug';
import { later, run } from '@ember/runloop';
import { getOnerror, setOnerror } from 'ember-error-handling';
import RSVP from 'rsvp';
diff --git a/packages/ember/tests/production_build_test.js b/packages/ember/tests/production_build_test.js
index a46908ac9b5..bd96c36af4a 100644
--- a/packages/ember/tests/production_build_test.js
+++ b/packages/ember/tests/production_build_test.js
@@ -1,5 +1,5 @@
import { DEBUG } from '@glimmer/env';
-import { assert as emberAssert, runInDebug } from 'ember-debug';
+import { assert as emberAssert, runInDebug } from '@ember/debug';
import { moduleFor, AbstractTestCase } from 'internal-test-helpers';
moduleFor(
diff --git a/packages/ember/tests/reexports_test.js b/packages/ember/tests/reexports_test.js
index 6e90e112d83..15c6d3c8575 100644
--- a/packages/ember/tests/reexports_test.js
+++ b/packages/ember/tests/reexports_test.js
@@ -58,15 +58,15 @@ let allExports = [
['Registry', 'container', 'Registry'],
['Container', 'container', 'Container'],
- // ember-debug
- ['deprecateFunc', 'ember-debug'],
- ['deprecate', 'ember-debug'],
- ['assert', 'ember-debug'],
- ['warn', 'ember-debug'],
- ['debug', 'ember-debug'],
- ['runInDebug', 'ember-debug'],
- ['Debug.registerDeprecationHandler', 'ember-debug', 'registerDeprecationHandler'],
- ['Debug.registerWarnHandler', 'ember-debug', 'registerWarnHandler'],
+ // @ember/debug
+ ['deprecateFunc', '@ember/debug'],
+ ['deprecate', '@ember/debug'],
+ ['assert', '@ember/debug'],
+ ['warn', '@ember/debug'],
+ ['debug', '@ember/debug'],
+ ['runInDebug', '@ember/debug'],
+ ['Debug.registerDeprecationHandler', '@ember/debug', 'registerDeprecationHandler'],
+ ['Debug.registerWarnHandler', '@ember/debug', 'registerWarnHandler'],
['Error', '@ember/error', 'default'],
// ember-metal
@@ -81,10 +81,10 @@ let allExports = [
['Instrumentation.subscribe', '@ember/instrumentation', 'subscribe'],
['Instrumentation.unsubscribe', '@ember/instrumentation', 'unsubscribe'],
['Instrumentation.reset', '@ember/instrumentation', 'reset'],
- ['testing', 'ember-debug', { get: 'isTesting', set: 'setTesting' }],
+ ['testing', '@ember/debug', { get: 'isTesting', set: 'setTesting' }],
['onerror', 'ember-error-handling', { get: 'getOnerror', set: 'setOnerror' }],
- ['FEATURES', 'ember/features'],
- ['FEATURES.isEnabled', 'ember-debug', 'isFeatureEnabled'],
+ ['FEATURES', '@ember/features'],
+ ['FEATURES.isEnabled', '@ember/debug', 'isFeatureEnabled'],
['meta', 'ember-metal'],
['get', 'ember-metal'],
['set', 'ember-metal'],
diff --git a/packages/internal-test-helpers/lib/module-for.js b/packages/internal-test-helpers/lib/module-for.js
index 75679e0ef45..b3ec6ef95df 100644
--- a/packages/internal-test-helpers/lib/module-for.js
+++ b/packages/internal-test-helpers/lib/module-for.js
@@ -1,4 +1,4 @@
-import { isFeatureEnabled } from 'ember-debug';
+import { isFeatureEnabled } from '@ember/debug';
import applyMixins from './apply-mixins';
import getAllPropertyNames from './get-all-property-names';
import { all } from 'rsvp';
diff --git a/packages/internal-test-helpers/lib/test-cases/node-query.js b/packages/internal-test-helpers/lib/test-cases/node-query.js
index 2ac42629469..d2efa59107b 100644
--- a/packages/internal-test-helpers/lib/test-cases/node-query.js
+++ b/packages/internal-test-helpers/lib/test-cases/node-query.js
@@ -1,6 +1,6 @@
/* global Node */
-import { assert } from 'ember-debug';
+import { assert } from '@ember/debug';
import { fireEvent, focus, matches } from '../system/synthetic-events';
export default class NodeQuery {
diff --git a/tests/index.html b/tests/index.html
index c1bfdb61560..77af4d38995 100644
--- a/tests/index.html
+++ b/tests/index.html
@@ -95,7 +95,7 @@
@@ -142,7 +142,7 @@
var EmberDevTestHelperAssert = window.Ember.__loader.require('internal-test-helpers/lib/ember-dev/index')['default'];
var setupQUnit = window.Ember.__loader.require('internal-test-helpers/lib/ember-dev/setup-qunit')['default'];
- var debugModule = window.Ember.__loader.require('ember-debug');
+ var debugModule = window.Ember.__loader.require('@ember/debug');
var testHelpers = new EmberDevTestHelperAssert({
Ember: window.Ember,
runningProdBuild: EmberDev.runningProdBuild,