From 3032e94cea8c2c3d19e643dfc071e63357277d4b Mon Sep 17 00:00:00 2001 From: Chris Thoburn Date: Thu, 14 Nov 2019 01:33:35 -0800 Subject: [PATCH] [BUGFIX] only allow feature flag alterations in canary (#6738) --- packages/-build-infra/src/features.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/-build-infra/src/features.js b/packages/-build-infra/src/features.js index a0294389571..c3b3529ae31 100644 --- a/packages/-build-infra/src/features.js +++ b/packages/-build-infra/src/features.js @@ -1,9 +1,18 @@ 'use strict'; +function isCanary() { + const version = require('../package.json').version; + return version.indexOf('alpha') !== -1; +} + const requireEsm = require('esm')(module); function getFeatures() { const { default: features } = requireEsm('@ember-data/canary-features/addon/default-features.js'); + if (!isCanary) { + return features; + } + const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE; if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') { // enable all features with a current value of `null`