10000 [FSSDK-11090] use path alias for log message imports (#987) · optimizely/javascript-sdk@9adc544 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9adc544

Browse files
authored
[FSSDK-11090] use path alias for log message imports (#987)
1 parent 3d2523d commit 9adc544

Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { sprintf } from '../../utils/fns';
2020
import AudienceEvaluator, { createAudienceEvaluator } from './index';
2121
import * as conditionTreeEvaluator from '../condition_tree_evaluator';
2222
import * as customAttributeConditionEvaluator from '../custom_attribute_condition_evaluator';
23-
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE } from '../../log_messages';
23+
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE } from 'log_message';
2424

2525
var buildLogMessageFromArgs = args => sprintf(args[1], ...args.splice(2));
2626
var mockLogger = {
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import * as conditionTreeEvaluator from '../condition_tree_evaluator';
1717
import * as customAttributeConditionEvaluator from '../custom_attribute_condition_evaluator';
1818
import * as odpSegmentsConditionEvaluator from './odp_segment_condition_evaluator';
1919
import { Audience, Condition, OptimizelyUserContext } from '../../shared_types';
20-
import { CONDITION_EVALUATOR_ERROR, UNKNOWN_CONDITION_TYPE } from '../../error_messages';
21-
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE} from '../../log_messages';
20+
import { CONDITION_EVALUATOR_ERROR, UNKNOWN_CONDITION_TYPE } from 'error_message';
21+
import { AUDIENCE_EVALUATION_RESULT, EVALUATING_AUDIENCE} from 'log_message';
2222
import { LoggerFacade } from '../../logging/logger';
2323

2424
export class AudienceEvaluator {
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { sprintf } from '../../../utils/fns';
1919

2020
import { LOG_LEVEL } from '../../../utils/enums';
2121
import * as odpSegmentEvalutor from './';
22-
import { UNKNOWN_MATCH_TYPE } from '../../../error_messages';
22+
import { UNKNOWN_MATCH_TYPE } from 'error_message';
2323

2424
var odpSegment1Condition = {
2525
"value": "odp-segment-1",
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and *
1414
* limitations under the License. *
1515
***************************************************************************/
16-
import { UNKNOWN_MATCH_TYPE } from '../../../error_messages';
16+
import { UNKNOWN_MATCH_TYPE } from 'error_message';
1717
import { LoggerFacade } from '../../../logging/logger';
1818
import { Condition, OptimizelyUserContext } from '../../../shared_types';
1919

Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import * as bucketer from './';
2222
import { LOG_LEVEL } from '../../utils/enums';
2323
import projectConfig from '../../project_config/project_config';
2424
import { getTestProjectConfig } from '../../tests/test_data';
25-
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from '../../error_messages';
25+
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from 'error_message';
2626
import {
2727
USER_BUCKETED_INTO_EXPERIMENT_IN_GROUP,
2828
USER_NOT_BUCKETED_INTO_EXPERIMENT_IN_GROUP,
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import {
2626
Group,
2727
} from '../../shared_types';
2828

29-
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from '../../error_messages';
29+
import { INVALID_BUCKETING_ID, INVALID_GROUP_ID } from 'error_message';
3030
import { OptimizelyError } from '../../error/optimizly_error';
3131

3232
export const USER_NOT_IN_ANY_EXPERIMENT = 'User %s is not in any experiment of group %s.';
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,17 @@ import sinon from 'sinon';
1717
import { assert } from 'chai';
1818
import { sprintf } from '../../utils/fns';
1919

20-
import {
21-
LOG_LEVEL,
22-
} from '../../utils/enums';
2320
import * as customAttributeEvaluator from './';
2421
import {
2522
MISSING_ATTRIBUTE_VALUE,
2623
UNEXPECTED_TYPE_NULL,
27-
} from '../../log_messages';
24+
} from 'log_message';
2825
import {
2926
UNKNOWN_MATCH_TYPE,
3027
UNEXPECTED_TYPE,
3128
OUT_OF_BOUNDS,
3229
UNEXPECTED_CONDITION_VALUE,
33-
} from '../../error_messages';
30+
} from 'error_message';
3431

3532
var browserConditionSafari = {
3633
name: 'browser_type',
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ import { compareVersion } from '../../utils/semantic_version';
2020
import {
2121
MISSING_ATTRIBUTE_VALUE,
2222
UNEXPECTED_TYPE_NULL,
23-
} from '../../log_messages';
23+
} from 'log_message';
2424
import {
2525
OUT_OF_BOUNDS,
2626
UNEXPECTED_TYPE,
2727
UNEXPECTED_CONDITION_VALUE,
2828
UNKNOWN_MATCH_TYPE
29-
} from '../../error_messages';
29+
} from 'error_message';
3030
import { LoggerFacade } from '../../logging/logger';
3131

3232
const EXACT_MATCH_TYPE = 'exact';
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
VALID_BUCKETING_ID,
4646
SAVED_USER_VARIATION,
4747
SAVED_VARIATION_NOT_FOUND,
48-
} from '../../log_messages';
48+
} from 'log_message';
4949

5050
import {
5151
EXPERIMENT_NOT_RUNNING,
@@ -64,7 +64,7 @@ import {
6464
USER_MEETS_CONDITIONS_FOR_TARGETING_RULE,
6565
} from '../decision_service/index';
6666

67-
import { BUCKETING_ID_NOT_STRING, USER_PROFILE_LOOKUP_ERROR, USER_PROFILE_SAVE_ERROR } from '../../error_messages';
67+
import { BUCKETING_ID_NOT_STRING, USER_PROFILE_LOOKUP_ERROR, USER_PROFILE_SAVE_ERROR } from 'error_message';
6868

6969
var testData = getTestProjectConfig();
7070
var testDataWithFeatures = getTestProjectConfigWithFeatures();
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ import {
5656
USER_PROFILE_LOOKUP_ERROR,
5757
USER_PROFILE_SAVE_ERROR,
5858
BUCKETING_ID_NOT_STRING,
59-
} from '../../error_messages';
59+
} from 'error_message';
6060

6161
import {
6262
SAVED_USER_VARIATION,
@@ -70,7 +70,7 @@ import {
7070
USER_HAS_NO_FORCED_VARIATION_FOR_EXPERIMENT,
7171
VALID_BUCKETING_ID,
7272
VARIATION_REMOVED_FOR_USER,
73-
} from '../../log_messages';
73+
} from 'log_message';
7474
import { OptimizelyError } from '../../error/optimizly_error';
7575

7676
export const EXPERIMENT_NOT_RUNNING = 'Experiment %s is not running.';