Skip to content

Commit

Permalink
fix(all): Convert requires to imports
Browse files Browse the repository at this point in the history
  • Loading branch information
vigneshm committed Jul 16, 2021
1 parent b9cb82c commit abf4c75
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import (reference) '~coreImports';
@import (reference) 'coreImports';

.score.label {
font-size: 110%;
Expand Down
4 changes: 3 additions & 1 deletion packages/core/src/config/VersionChecker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ import React from 'react';
import { IScheduler, SchedulerFactory } from '../scheduler/SchedulerFactory';
import { timestamp } from '../utils/timeFormatters';
import { NotifierService } from '../widgets/notifier/notifier.service';
// @ts-ignore
import version from 'root/version.json';

export interface IDeckVersion {
version: string;
created: number;
}

export class VersionChecker {
private static currentVersion: IDeckVersion = require('root/version.json');
private static currentVersion: IDeckVersion = version;
private static newVersionSeenCount = 0;
private static scheduler: IScheduler;

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/modal/modalPage.directive.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

import { module } from 'angular';
const $ = require('jquery');
import $ from 'jquery';

export const CORE_MODAL_MODALPAGE_DIRECTIVE = 'spinnaker.core.modal.modalPage.directive';
export const name = CORE_MODAL_MODALPAGE_DIRECTIVE; // for backwards compatibility
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

import UIROUTER_ANGULARJS from '@uirouter/angularjs';
import angular from 'angular';
import _ from 'lodash';
import { Duration } from 'luxon';

Expand All @@ -12,8 +13,6 @@ import { UrlBuilder } from '../../../../navigation';
import { ServerGroupReader } from '../../../../serverGroup/serverGroupReader.service';
import { ClusterState } from '../../../../state';

const angular = require('angular');

export const CORE_PIPELINE_CONFIG_STAGES_DEPLOY_DEPLOYEXECUTIONDETAILS_CONTROLLER =
'spinnaker.core.pipeline.stage.deploy.details.controller';
export const name = CORE_PIPELINE_CONFIG_STAGES_DEPLOY_DEPLOYEXECUTIONDETAILS_CONTROLLER; // for backwards compatibility
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/utils/json/JsonUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { isArray, isNumber, isPlainObject, isString } from 'lodash';

const DiffMatchPatch = require('expose-loader?diff_match_patch!diff-match-patch');
// @ts-ignore
import DiffMatchPatch from 'diff-match-patch';

export interface IDiffDetails {
type: string;
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/widgets/spelText/spelText.decorator.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
'use strict';

import { module } from 'angular';
import 'jquery-textcomplete';

import { CORE_WIDGETS_SPELTEXT_SPELAUTOCOMPLETE_SERVICE } from './spelAutocomplete.service';

import './spel.less';

require('jquery-textcomplete');

decorateFn.$inject = ['$delegate', 'spelAutocomplete'];
function decorateFn($delegate, spelAutocomplete) {
const directive = $delegate[0];
Expand Down
2 changes: 1 addition & 1 deletion packages/dcos/src/search/resultFormatter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const angular = require('angular');
import angular from 'angular';

export const DCOS_SEARCH_RESULTFORMATTER = 'spinnaker.dcos.search.formatter';
export const name = DCOS_SEARCH_RESULTFORMATTER; // for backwards compatibility
Expand Down
2 changes: 1 addition & 1 deletion packages/oracle/src/pipeline/disableAsg/disableAsgStage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const angular = require('angular');
import angular from 'angular';

import { AccountService, Registry, StageConstants } from '@spinnaker/core';

Expand Down

0 comments on commit abf4c75

Please sign in to comment.