Skip to content

Commit

Permalink
[BUGFIX] only allow feature flag alterations in canary (#6738)
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired authored and igorT committed Dec 18, 2019
1 parent e44f652 commit c2fe49a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/-build-infra/src/features.js
Original file line number Diff line number Diff line change
@@ -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`
Expand Down

0 comments on commit c2fe49a

Please sign in to comment.