Skip to content

Commit c2fe49a

Browse files
runspiredigorT
authored andcommitted
[BUGFIX] only allow feature flag alterations in canary (#6738)
1 parent e44f652 commit c2fe49a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/-build-infra/src/features.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
'use strict';
22

3+
function isCanary() {
4+
const version = require('../package.json').version;
5+
return version.indexOf('alpha') !== -1;
6+
}
7+
38
const requireEsm = require('esm')(module);
49
function getFeatures() {
510
const { default: features } = requireEsm('@ember-data/canary-features/addon/default-features.js');
611

12+
if (!isCanary) {
13+
return features;
14+
}
15+
716
const FEATURE_OVERRIDES = process.env.EMBER_DATA_FEATURE_OVERRIDE;
817
if (FEATURE_OVERRIDES === 'ENABLE_ALL_OPTIONAL') {
918
// enable all features with a current value of `null`

0 commit comments

Comments
 (0)