Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate support for "production like" values in EMBER_ENV #5239

Merged
merged 1 commit into from
Oct 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ function isProductionEnv() {
module.exports = {
name: 'ember-data',

_prodLikeWarning() {
let emberEnv = process.env.EMBER_ENV
if(emberEnv !== 'production' && /production/.test(emberEnv)) {
this._warn(`Production-like values for EMBER_ENV are deprecated (your EMBER_ENV is "${emberEnv}") and support will be removed in Ember Data 4.0.0. If using ember-cli-deploy, please configure your build using 'production'. Otherwise please set your EMBER_ENV to 'production' for production builds.`);
}
},

_warn(message) {
let chalk = require('chalk');
let warning = chalk.yellow('WARNING: ' + message);
Expand All @@ -53,7 +60,7 @@ module.exports = {

init() {
this._super.init && this._super.init.apply(this, arguments);

this._prodLikeWarning();
this.debugTree = BroccoliDebug.buildDebugCallback('ember-data');

let bowerDeps = this.project.bowerDependencies();
Expand Down