diff --git a/services/web/frontend/js/analytics/AbTestingManager.js b/services/web/frontend/js/analytics/AbTestingManager.js index 693a04b103..a9401a5858 100644 --- a/services/web/frontend/js/analytics/AbTestingManager.js +++ b/services/web/frontend/js/analytics/AbTestingManager.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'crypto-js/md5'], function(App, CryptoJS) { +define(['../base', 'crypto-js/md5'], function(App, CryptoJS) { const oldKeys = [ 'sl_abt_multi_currency_editor_eu-eu', 'sl_abt_multi_currency_eu-eu', diff --git a/services/web/frontend/js/base.js b/services/web/frontend/js/base.js index ac0ecacc80..103b983d81 100644 --- a/services/web/frontend/js/base.js +++ b/services/web/frontend/js/base.js @@ -20,13 +20,13 @@ __webpack_public_path__ = window.baseAssetPath define([ - 'utils/sentry', - 'libraries', - 'modules/recursionHelper', - 'modules/errorCatcher', - 'modules/localStorage', - 'modules/sessionStorage', - 'utils/underscore' + './utils/sentry', + './libraries', + './modules/recursionHelper', + './modules/errorCatcher', + './modules/localStorage', + './modules/sessionStorage', + './utils/underscore' ], function() { const App = angular .module('SharelatexApp', [ diff --git a/services/web/frontend/js/components/inputSuggestions.js b/services/web/frontend/js/components/inputSuggestions.js index 7bacdbd3be..0806b4ab00 100644 --- a/services/web/frontend/js/components/inputSuggestions.js +++ b/services/web/frontend/js/components/inputSuggestions.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { const inputSuggestionsController = function($scope, $element, $attrs, Keys) { const ctrl = this ctrl.showHint = false diff --git a/services/web/frontend/js/directives/asyncForm.js b/services/web/frontend/js/directives/asyncForm.js index 3f0e1ac41d..0ef96b5499 100644 --- a/services/web/frontend/js/directives/asyncForm.js +++ b/services/web/frontend/js/directives/asyncForm.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'libs/passfield'], function(App) { +define(['../base', 'libs/passfield'], function(App) { App.directive('asyncForm', ($http, validateCaptcha, validateCaptchaV3) => ({ controller: [ '$scope', diff --git a/services/web/frontend/js/directives/autoSubmitForm.js b/services/web/frontend/js/directives/autoSubmitForm.js index 52dc550608..16bb7f3452 100644 --- a/services/web/frontend/js/directives/autoSubmitForm.js +++ b/services/web/frontend/js/directives/autoSubmitForm.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../base'], function(App) { App.directive('autoSubmitForm', function() { return { link(scope, element) { diff --git a/services/web/frontend/js/directives/bookmarkableTabset.js b/services/web/frontend/js/directives/bookmarkableTabset.js index abfac461ff..525996196a 100644 --- a/services/web/frontend/js/directives/bookmarkableTabset.js +++ b/services/web/frontend/js/directives/bookmarkableTabset.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../base'], function(App) { App.directive('bookmarkableTabset', ($location, _) => ({ restrict: 'A', require: 'tabset', diff --git a/services/web/frontend/js/directives/complexPassword.js b/services/web/frontend/js/directives/complexPassword.js index ff6fe6e4f2..a722dfb8f3 100644 --- a/services/web/frontend/js/directives/complexPassword.js +++ b/services/web/frontend/js/directives/complexPassword.js @@ -2,7 +2,7 @@ no-undef, max-len */ -define(['base', 'libs/passfield'], function(App) { +define(['../base', 'libs/passfield'], function(App) { App.directive('complexPassword', () => ({ require: ['^asyncForm', 'ngModel'], diff --git a/services/web/frontend/js/directives/creditCards.js b/services/web/frontend/js/directives/creditCards.js index 39e1bdc3ac..2eb068c928 100644 --- a/services/web/frontend/js/directives/creditCards.js +++ b/services/web/frontend/js/directives/creditCards.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { App.factory('ccUtils', function() { const defaultFormat = /(\d{1,4})/g const defaultInputFormat = /(?:^|\s)(\d{4})$/ diff --git a/services/web/frontend/js/directives/equals.js b/services/web/frontend/js/directives/equals.js index dfe8ec92c5..6ddb63e1e4 100644 --- a/services/web/frontend/js/directives/equals.js +++ b/services/web/frontend/js/directives/equals.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('equals', () => ({ require: 'ngModel', link(scope, elem, attrs, ctrl) { diff --git a/services/web/frontend/js/directives/eventTracking.js b/services/web/frontend/js/directives/eventTracking.js index 77f5049c88..ab5d260d19 100644 --- a/services/web/frontend/js/directives/eventTracking.js +++ b/services/web/frontend/js/directives/eventTracking.js @@ -34,7 +34,7 @@ const isInViewport = function(element) { return elBtm > viewportTop && elTop < viewportBtm } -define(['base'], App => +define(['../base'], App => App.directive('eventTracking', eventTracking => ({ scope: { eventTracking: '@', diff --git a/services/web/frontend/js/directives/expandableTextArea.js b/services/web/frontend/js/directives/expandableTextArea.js index 05d23b03f6..353fd74a54 100644 --- a/services/web/frontend/js/directives/expandableTextArea.js +++ b/services/web/frontend/js/directives/expandableTextArea.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('expandableTextArea', () => ({ restrict: 'A', link(scope, el) { diff --git a/services/web/frontend/js/directives/fineUpload.js b/services/web/frontend/js/directives/fineUpload.js index 41b4d7adc4..c19673a49d 100644 --- a/services/web/frontend/js/directives/fineUpload.js +++ b/services/web/frontend/js/directives/fineUpload.js @@ -9,7 +9,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'fineuploader'], (App, qq) => +define(['../base', 'fineuploader'], (App, qq) => App.directive('fineUpload', $timeout => ({ scope: { multiple: '=', diff --git a/services/web/frontend/js/directives/focus.js b/services/web/frontend/js/directives/focus.js index 0d8c7400b4..b0e5570799 100644 --- a/services/web/frontend/js/directives/focus.js +++ b/services/web/frontend/js/directives/focus.js @@ -10,7 +10,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { let selectName App.directive('focusWhen', $timeout => ({ restrict: 'A', diff --git a/services/web/frontend/js/directives/mathjax.js b/services/web/frontend/js/directives/mathjax.js index dadfc22f98..a93074a3ea 100644 --- a/services/web/frontend/js/directives/mathjax.js +++ b/services/web/frontend/js/directives/mathjax.js @@ -1,6 +1,6 @@ /* global MathJax */ -define(['base'], function(App) { +define(['../base'], function(App) { return App.directive('mathjax', function($compile, $parse) { return { link(scope, element, attrs) { diff --git a/services/web/frontend/js/directives/maxHeight.js b/services/web/frontend/js/directives/maxHeight.js index c6bfa136a9..cfc90f1cc9 100644 --- a/services/web/frontend/js/directives/maxHeight.js +++ b/services/web/frontend/js/directives/maxHeight.js @@ -9,7 +9,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('maxHeight', () => ({ restrict: 'A', link(scope, element, attrs) { diff --git a/services/web/frontend/js/directives/onEnter.js b/services/web/frontend/js/directives/onEnter.js index 2b32b6e2b0..d928b1ee09 100644 --- a/services/web/frontend/js/directives/onEnter.js +++ b/services/web/frontend/js/directives/onEnter.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('onEnter', () => (scope, element, attrs) => element.bind('keydown keypress', function(event) { if (event.which === 13) { diff --git a/services/web/frontend/js/directives/rightClick.js b/services/web/frontend/js/directives/rightClick.js index a738514856..b6f92d7390 100644 --- a/services/web/frontend/js/directives/rightClick.js +++ b/services/web/frontend/js/directives/rightClick.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('rightClick', () => ({ restrict: 'A', link(scope, element, attrs) { diff --git a/services/web/frontend/js/directives/scroll.js b/services/web/frontend/js/directives/scroll.js index 2d27a2d38e..196b15a33e 100644 --- a/services/web/frontend/js/directives/scroll.js +++ b/services/web/frontend/js/directives/scroll.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('updateScrollBottomOn', $timeout => ({ restrict: 'A', link(scope, element, attrs, ctrls) { diff --git a/services/web/frontend/js/directives/selectAll.js b/services/web/frontend/js/directives/selectAll.js index 2b3f4ccb7a..abc3ee3977 100644 --- a/services/web/frontend/js/directives/selectAll.js +++ b/services/web/frontend/js/directives/selectAll.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { App.directive('selectAllList', () => ({ controller: [ '$scope', diff --git a/services/web/frontend/js/directives/stopPropagation.js b/services/web/frontend/js/directives/stopPropagation.js index e09ca15afe..1b5a1a16f7 100644 --- a/services/web/frontend/js/directives/stopPropagation.js +++ b/services/web/frontend/js/directives/stopPropagation.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { App.directive('stopPropagation', $http => ({ restrict: 'A', link(scope, element, attrs) { diff --git a/services/web/frontend/js/directives/videoPlayState.js b/services/web/frontend/js/directives/videoPlayState.js index b577650ebb..c940c7c813 100644 --- a/services/web/frontend/js/directives/videoPlayState.js +++ b/services/web/frontend/js/directives/videoPlayState.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.directive('videoPlayState', $parse => ({ restrict: 'A', link(scope, element, attrs) { diff --git a/services/web/frontend/js/filters/formatDate.js b/services/web/frontend/js/filters/formatDate.js index e6f3413d8e..d759831c83 100644 --- a/services/web/frontend/js/filters/formatDate.js +++ b/services/web/frontend/js/filters/formatDate.js @@ -9,7 +9,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'moment'], function(App, moment) { +define(['../base', 'moment'], function(App, moment) { moment.updateLocale('en', { calendar: { lastDay: '[Yesterday]', diff --git a/services/web/frontend/js/filters/wrapLongWords.js b/services/web/frontend/js/filters/wrapLongWords.js index 6f428e78f4..51043c26c5 100644 --- a/services/web/frontend/js/filters/wrapLongWords.js +++ b/services/web/frontend/js/filters/wrapLongWords.js @@ -13,7 +13,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { const DEF_MIN_LENGTH = 20 const _decodeHTMLEntities = str => diff --git a/services/web/frontend/js/ide.js b/services/web/frontend/js/ide.js index f508db6f77..75315517dd 100644 --- a/services/web/frontend/js/ide.js +++ b/services/web/frontend/js/ide.js @@ -18,48 +18,48 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'ide/file-tree/FileTreeManager', - 'ide/connection/ConnectionManager', - 'ide/editor/EditorManager', - 'ide/online-users/OnlineUsersManager', - 'ide/history/HistoryManager', - 'ide/history/HistoryV2Manager', - 'ide/permissions/PermissionsManager', - 'ide/pdf/PdfManager', - 'ide/binary-files/BinaryFilesManager', - 'ide/references/ReferencesManager', - 'ide/metadata/MetadataManager', - 'ide/review-panel/ReviewPanelManager', - 'ide/SafariScrollPatcher', - 'ide/cobranding/CobrandingDataService', - 'ide/settings/index', - 'ide/share/index', - 'ide/chat/index', - 'ide/clone/index', - 'ide/hotkeys/index', - 'ide/wordcount/index', - 'ide/directives/layout', - 'ide/directives/validFile', - 'ide/services/ide', - 'analytics/AbTestingManager', - 'directives/focus', - 'directives/fineUpload', - 'directives/scroll', - 'directives/onEnter', - 'directives/stopPropagation', - 'directives/rightClick', - 'directives/expandableTextArea', - 'directives/videoPlayState', - 'services/queued-http', - 'services/validateCaptcha', - 'services/validateCaptchaV3', - 'services/wait-for', - 'filters/formatDate', - 'main/event', - 'main/account-upgrade', - 'main/exposed-settings', - 'main/system-messages', + './base', + './ide/file-tree/FileTreeManager', + './ide/connection/ConnectionManager', + './ide/editor/EditorManager', + './ide/online-users/OnlineUsersManager', + './ide/history/HistoryManager', + './ide/history/HistoryV2Manager', + './ide/permissions/PermissionsManager', + './ide/pdf/PdfManager', + './ide/binary-files/BinaryFilesManager', + './ide/references/ReferencesManager', + './ide/metadata/MetadataManager', + './ide/review-panel/ReviewPanelManager', + './ide/SafariScrollPatcher', + './ide/cobranding/CobrandingDataService', + './ide/settings/index', + './ide/share/index', + './ide/chat/index', + './ide/clone/index', + './ide/hotkeys/index', + './ide/wordcount/index', + './ide/directives/layout', + './ide/directives/validFile', + './ide/services/ide', + './analytics/AbTestingManager', + './directives/focus', + './directives/fineUpload', + './directives/scroll', + './directives/onEnter', + './directives/stopPropagation', + './directives/rightClick', + './directives/expandableTextArea', + './directives/videoPlayState', + './services/queued-http', + './services/validateCaptcha', + './services/validateCaptchaV3', + './services/wait-for', + './filters/formatDate', + './main/event', + './main/account-upgrade', + './main/exposed-settings', + './main/system-messages', '../../modules/modules-ide.js' ], function( App, diff --git a/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js b/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js index c77a075309..bfc72e95eb 100644 --- a/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js +++ b/services/web/frontend/js/ide/binary-files/BinaryFilesManager.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['ide/binary-files/controllers/BinaryFileController'], function() { +define(['./controllers/BinaryFileController'], function() { let BinaryFilesManager return (BinaryFilesManager = class BinaryFilesManager { constructor(ide, $scope) { diff --git a/services/web/frontend/js/ide/binary-files/controllers/BinaryFileController.js b/services/web/frontend/js/ide/binary-files/controllers/BinaryFileController.js index 5d231c32bf..8ae2d93484 100644 --- a/services/web/frontend/js/ide/binary-files/controllers/BinaryFileController.js +++ b/services/web/frontend/js/ide/binary-files/controllers/BinaryFileController.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.controller('BinaryFileController', function( $scope, $rootScope, diff --git a/services/web/frontend/js/ide/chat/controllers/ChatButtonController.js b/services/web/frontend/js/ide/chat/controllers/ChatButtonController.js index 9a239ebf07..cdec1b9eee 100644 --- a/services/web/frontend/js/ide/chat/controllers/ChatButtonController.js +++ b/services/web/frontend/js/ide/chat/controllers/ChatButtonController.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('ChatButtonController', function($scope, ide) { let clearNewMessageNotification $scope.toggleChat = function() { diff --git a/services/web/frontend/js/ide/chat/controllers/ChatController.js b/services/web/frontend/js/ide/chat/controllers/ChatController.js index 42b909f5d1..29c79acf40 100644 --- a/services/web/frontend/js/ide/chat/controllers/ChatController.js +++ b/services/web/frontend/js/ide/chat/controllers/ChatController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/chat/services/chatMessages'], App => +define(['../../../base', '../services/chatMessages'], App => App.controller('ChatController', function( $scope, chatMessages, diff --git a/services/web/frontend/js/ide/chat/controllers/ChatMessageController.js b/services/web/frontend/js/ide/chat/controllers/ChatMessageController.js index d85ed9fbdd..662304204d 100644 --- a/services/web/frontend/js/ide/chat/controllers/ChatMessageController.js +++ b/services/web/frontend/js/ide/chat/controllers/ChatMessageController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/colors/ColorManager'], (App, ColorManager) => +define(['../../../base', '../../colors/ColorManager'], (App, ColorManager) => App.controller('ChatMessageController', function($scope, ide) { const hslColorConfigs = { borderSaturation: diff --git a/services/web/frontend/js/ide/chat/index.js b/services/web/frontend/js/ide/chat/index.js index 8791936ebe..16452716f0 100644 --- a/services/web/frontend/js/ide/chat/index.js +++ b/services/web/frontend/js/ide/chat/index.js @@ -4,9 +4,9 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/chat/controllers/ChatButtonController', - 'ide/chat/controllers/ChatController', - 'ide/chat/controllers/ChatMessageController', - 'directives/mathjax', - 'filters/wrapLongWords' + './controllers/ChatButtonController', + './controllers/ChatController', + './controllers/ChatMessageController', + '../../directives/mathjax', + '../../filters/wrapLongWords' ], function() {}) diff --git a/services/web/frontend/js/ide/chat/services/chatMessages.js b/services/web/frontend/js/ide/chat/services/chatMessages.js index e043a703d0..583f9eccb2 100644 --- a/services/web/frontend/js/ide/chat/services/chatMessages.js +++ b/services/web/frontend/js/ide/chat/services/chatMessages.js @@ -14,7 +14,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'crypto-js/md5'], (App, CryptoJS) => +define(['../../../base', 'crypto-js/md5'], (App, CryptoJS) => App.factory('chatMessages', function($http, ide) { const MESSAGES_URL = `/project/${ide.project_id}/messages` const MESSAGE_LIMIT = 50 diff --git a/services/web/frontend/js/ide/clone/controllers/CloneProjectController.js b/services/web/frontend/js/ide/clone/controllers/CloneProjectController.js index 3592f59e20..4b3699a2ee 100644 --- a/services/web/frontend/js/ide/clone/controllers/CloneProjectController.js +++ b/services/web/frontend/js/ide/clone/controllers/CloneProjectController.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller( 'CloneProjectController', ($scope, $modal) => diff --git a/services/web/frontend/js/ide/clone/controllers/CloneProjectModalController.js b/services/web/frontend/js/ide/clone/controllers/CloneProjectModalController.js index 3eb5405f4e..a7dea9e04d 100644 --- a/services/web/frontend/js/ide/clone/controllers/CloneProjectModalController.js +++ b/services/web/frontend/js/ide/clone/controllers/CloneProjectModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('CloneProjectModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/clone/index.js b/services/web/frontend/js/ide/clone/index.js index 1df0258fce..ea5a356b90 100644 --- a/services/web/frontend/js/ide/clone/index.js +++ b/services/web/frontend/js/ide/clone/index.js @@ -4,6 +4,6 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/clone/controllers/CloneProjectController', - 'ide/clone/controllers/CloneProjectModalController' + './controllers/CloneProjectController', + './controllers/CloneProjectModalController' ], function() {}) diff --git a/services/web/frontend/js/ide/cobranding/CobrandingDataService.js b/services/web/frontend/js/ide/cobranding/CobrandingDataService.js index 10a275460a..38943277d8 100644 --- a/services/web/frontend/js/ide/cobranding/CobrandingDataService.js +++ b/services/web/frontend/js/ide/cobranding/CobrandingDataService.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../base'], function(App) { const _cobrandingData = window.brandVariation return App.factory('CobrandingDataService', function() { diff --git a/services/web/frontend/js/ide/directives/layout.js b/services/web/frontend/js/ide/directives/layout.js index 4f615d08e3..f30f9cf763 100644 --- a/services/web/frontend/js/ide/directives/layout.js +++ b/services/web/frontend/js/ide/directives/layout.js @@ -13,7 +13,11 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'libs/jquery-layout', 'libs/jquery.ui.touch-punch'], App => +define([ + '../../base', + 'libs/jquery-layout', + 'libs/jquery.ui.touch-punch' +], App => App.directive('layout', ($parse, $compile, ide) => ({ compile() { return { diff --git a/services/web/frontend/js/ide/directives/validFile.js b/services/web/frontend/js/ide/directives/validFile.js index 44a045a0a1..b876086831 100644 --- a/services/web/frontend/js/ide/directives/validFile.js +++ b/services/web/frontend/js/ide/directives/validFile.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/directives/SafePath'], (App, SafePath) => +define(['../../base', './SafePath'], (App, SafePath) => App.directive('validFile', () => ({ require: 'ngModel', link(scope, element, attrs, ngModelCtrl) { diff --git a/services/web/frontend/js/ide/editor/Document.js b/services/web/frontend/js/ide/editor/Document.js index 741bead848..ac39fd4b2e 100644 --- a/services/web/frontend/js/ide/editor/Document.js +++ b/services/web/frontend/js/ide/editor/Document.js @@ -18,9 +18,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'utils/EventEmitter', - 'ide/editor/ShareJsDoc', - 'ide/review-panel/RangesTracker' + '../../utils/EventEmitter', + './ShareJsDoc', + '../review-panel/RangesTracker' ], function(EventEmitter, ShareJsDoc, RangesTracker) { let Document return (Document = (function() { diff --git a/services/web/frontend/js/ide/editor/EditorManager.js b/services/web/frontend/js/ide/editor/EditorManager.js index 508846a175..eccc19b957 100644 --- a/services/web/frontend/js/ide/editor/EditorManager.js +++ b/services/web/frontend/js/ide/editor/EditorManager.js @@ -15,11 +15,11 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'ide/editor/Document', - 'ide/editor/components/spellMenu', - 'ide/editor/directives/aceEditor', - 'ide/editor/directives/toggleSwitch', - 'ide/editor/controllers/SavingNotificationController' + './Document', + './components/spellMenu', + './directives/aceEditor', + './directives/toggleSwitch', + './controllers/SavingNotificationController' ], function(Document) { let EditorManager return (EditorManager = (function() { diff --git a/services/web/frontend/js/ide/editor/ShareJsDoc.js b/services/web/frontend/js/ide/editor/ShareJsDoc.js index e9df8c7433..2bda12c77c 100644 --- a/services/web/frontend/js/ide/editor/ShareJsDoc.js +++ b/services/web/frontend/js/ide/editor/ShareJsDoc.js @@ -17,7 +17,10 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['utils/EventEmitter', 'libs/sharejs'], function(EventEmitter, ShareJs) { +define(['../../utils/EventEmitter', 'libs/sharejs'], function( + EventEmitter, + ShareJs +) { let ShareJsDoc const SINGLE_USER_FLUSH_DELAY = 1000 // ms diff --git a/services/web/frontend/js/ide/editor/components/spellMenu.js b/services/web/frontend/js/ide/editor/components/spellMenu.js index 06d3f370ec..12ae482a56 100644 --- a/services/web/frontend/js/ide/editor/components/spellMenu.js +++ b/services/web/frontend/js/ide/editor/components/spellMenu.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.component('spellMenu', { bindings: { open: '<', diff --git a/services/web/frontend/js/ide/editor/controllers/SavingNotificationController.js b/services/web/frontend/js/ide/editor/controllers/SavingNotificationController.js index 0efe601146..fcb0d339dd 100644 --- a/services/web/frontend/js/ide/editor/controllers/SavingNotificationController.js +++ b/services/web/frontend/js/ide/editor/controllers/SavingNotificationController.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/editor/Document'], (App, Document) => +define(['../../../base', '../Document'], (App, Document) => App.controller('SavingNotificationController', function( $scope, $interval, diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor.js b/services/web/frontend/js/ide/editor/directives/aceEditor.js index abe5153584..1da5e66ea6 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor.js @@ -3,25 +3,25 @@ max-len */ define([ - 'base', + '../../../base', 'ace/ace', 'ace/ext-searchbox', 'ace/ext-modelist', 'ace/keybinding-vim', - 'ide/editor/directives/aceEditor/undo/UndoManager', - 'ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager', - 'ide/editor/directives/aceEditor/spell-check/SpellCheckManager', - 'ide/editor/directives/aceEditor/spell-check/SpellCheckAdapter', - 'ide/editor/directives/aceEditor/highlights/HighlightsManager', - 'ide/editor/directives/aceEditor/cursor-position/CursorPositionManager', - 'ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter', - 'ide/editor/directives/aceEditor/track-changes/TrackChangesManager', - 'ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter', - 'ide/editor/directives/aceEditor/metadata/MetadataManager', - 'ide/metadata/services/metadata', - 'ide/graphics/services/graphics', - 'ide/preamble/services/preamble', - 'ide/files/services/files' + './aceEditor/undo/UndoManager', + './aceEditor/auto-complete/AutoCompleteManager', + './aceEditor/spell-check/SpellCheckManager', + './aceEditor/spell-check/SpellCheckAdapter', + './aceEditor/highlights/HighlightsManager', + './aceEditor/cursor-position/CursorPositionManager', + './aceEditor/cursor-position/CursorPositionAdapter', + './aceEditor/track-changes/TrackChangesManager', + './aceEditor/track-changes/TrackChangesAdapter', + './aceEditor/metadata/MetadataManager', + '../../metadata/services/metadata', + '../../graphics/services/graphics', + '../../preamble/services/preamble', + '../../files/services/files' ], function( App, Ace, diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js index cbc7fa7983..0d6181f539 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/AutoCompleteManager.js @@ -1,8 +1,8 @@ define([ - 'ide/editor/directives/aceEditor/auto-complete/CommandManager', - 'ide/editor/directives/aceEditor/auto-complete/EnvironmentManager', - 'ide/editor/directives/aceEditor/auto-complete/PackageManager', - 'ide/editor/directives/aceEditor/auto-complete/Helpers', + './CommandManager', + './EnvironmentManager', + './PackageManager', + './Helpers', 'ace/ace', 'ace/ext-language_tools' ], function(CommandManager, EnvironmentManager, PackageManager, Helpers) { diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/EnvironmentManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/EnvironmentManager.js index 088c7a24f0..230b871efe 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/EnvironmentManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/auto-complete/EnvironmentManager.js @@ -10,9 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define([ - 'ide/editor/directives/aceEditor/auto-complete/snippets/Environments' -], function(Environments) { +define(['./snippets/Environments'], function(Environments) { let staticSnippets = Array.from(Environments.withoutSnippets).map(env => ({ caption: `\\begin{${env}}...`, snippet: `\ diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js index 68764b84a1..d862f5dab3 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/cursor-position/CursorPositionAdapter.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['ide/editor/EditorShareJsCodec'], function(EditorShareJsCodec) { +define(['../../../EditorShareJsCodec'], function(EditorShareJsCodec) { let CursorPositionAdapter return (CursorPositionAdapter = class CursorPositionAdapter { constructor(editor) { diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/highlights/HighlightsManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/highlights/HighlightsManager.js index a29da58897..a952fd944f 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/highlights/HighlightsManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/highlights/HighlightsManager.js @@ -16,7 +16,10 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['ace/ace', 'ide/colors/ColorManager'], function(_, ColorManager) { +define(['ace/ace', '../../../../colors/ColorManager'], function( + _, + ColorManager +) { let HighlightsManager const { Range } = ace.require('ace/range') diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/spell-check/SpellCheckAdapter.js b/services/web/frontend/js/ide/editor/directives/aceEditor/spell-check/SpellCheckAdapter.js index 2ced40a816..35e6e8b165 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/spell-check/SpellCheckAdapter.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/spell-check/SpellCheckAdapter.js @@ -1,7 +1,7 @@ -define([ - 'ace/ace', - 'ide/editor/directives/aceEditor/spell-check/HighlightedWordManager' -], function(Ace, HighlightedWordManager) { +define(['ace/ace', './HighlightedWordManager'], function( + Ace, + HighlightedWordManager +) { const { Range } = ace.require('ace/range') class SpellCheckAdapter { diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js b/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js index 07c1328a02..de74d54c02 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesAdapter.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -define(['ace/ace', 'ide/editor/EditorShareJsCodec'], function( +define(['ace/ace', '../../../EditorShareJsCodec'], function( _ignore, EditorShareJsCodec ) { diff --git a/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js b/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js index 4806ad32f6..9d5ae0b5b3 100644 --- a/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js +++ b/services/web/frontend/js/ide/editor/directives/aceEditor/track-changes/TrackChangesManager.js @@ -4,9 +4,9 @@ */ define([ 'ace/ace', - 'utils/EventEmitter', - 'ide/colors/ColorManager', - 'ide/editor/EditorShareJsCodec' + '../../../../../utils/EventEmitter', + '../../../../colors/ColorManager', + '../../../EditorShareJsCodec' ], function(_ignore, EventEmitter, ColorManager, EditorShareJsCodec) { const { Range } = ace.require('ace/range') class TrackChangesManager { diff --git a/services/web/frontend/js/ide/editor/directives/toggleSwitch.js b/services/web/frontend/js/ide/editor/directives/toggleSwitch.js index 56122bf667..093ad21d1b 100644 --- a/services/web/frontend/js/ide/editor/directives/toggleSwitch.js +++ b/services/web/frontend/js/ide/editor/directives/toggleSwitch.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('toggleSwitch', () => ({ restrict: 'E', scope: { diff --git a/services/web/frontend/js/ide/file-tree/FileTreeManager.js b/services/web/frontend/js/ide/file-tree/FileTreeManager.js index e98d902799..635f49bab1 100644 --- a/services/web/frontend/js/ide/file-tree/FileTreeManager.js +++ b/services/web/frontend/js/ide/file-tree/FileTreeManager.js @@ -20,13 +20,13 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'ide/file-tree/directives/fileEntity', - 'ide/file-tree/directives/draggable', - 'ide/file-tree/directives/droppable', - 'ide/file-tree/controllers/FileTreeController', - 'ide/file-tree/controllers/FileTreeEntityController', - 'ide/file-tree/controllers/FileTreeFolderController', - 'ide/file-tree/controllers/FileTreeRootFolderController' + './directives/fileEntity', + './directives/draggable', + './directives/droppable', + './controllers/FileTreeController', + './controllers/FileTreeEntityController', + './controllers/FileTreeFolderController', + './controllers/FileTreeRootFolderController' ], function() { let FileTreeManager return (FileTreeManager = class FileTreeManager { diff --git a/services/web/frontend/js/ide/file-tree/controllers/FileTreeController.js b/services/web/frontend/js/ide/file-tree/controllers/FileTreeController.js index ea5a99834d..4ca0a577a3 100644 --- a/services/web/frontend/js/ide/file-tree/controllers/FileTreeController.js +++ b/services/web/frontend/js/ide/file-tree/controllers/FileTreeController.js @@ -15,7 +15,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { App.controller('FileTreeController', function( $scope, $modal, diff --git a/services/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js b/services/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js index c0d2357226..7f6007c64c 100644 --- a/services/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js +++ b/services/web/frontend/js/ide/file-tree/controllers/FileTreeEntityController.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/file-tree/util/iconTypeFromName'], function( +define(['../../../base', '../util/iconTypeFromName'], function( App, iconTypeFromName ) { diff --git a/services/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js b/services/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js index bb408426a1..fd7696862a 100644 --- a/services/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js +++ b/services/web/frontend/js/ide/file-tree/controllers/FileTreeFolderController.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('FileTreeFolderController', function( $scope, ide, diff --git a/services/web/frontend/js/ide/file-tree/controllers/FileTreeRootFolderController.js b/services/web/frontend/js/ide/file-tree/controllers/FileTreeRootFolderController.js index ffc8c4ff86..080c527002 100644 --- a/services/web/frontend/js/ide/file-tree/controllers/FileTreeRootFolderController.js +++ b/services/web/frontend/js/ide/file-tree/controllers/FileTreeRootFolderController.js @@ -12,7 +12,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('FileTreeRootFolderController', function($scope, $modal, ide) { const { rootFolder } = $scope return ($scope.onDrop = function(events, ui) { diff --git a/services/web/frontend/js/ide/file-tree/directives/draggable.js b/services/web/frontend/js/ide/file-tree/directives/draggable.js index c4bb1704b8..dda3e6bcac 100644 --- a/services/web/frontend/js/ide/file-tree/directives/draggable.js +++ b/services/web/frontend/js/ide/file-tree/directives/draggable.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('draggable', () => ({ link(scope, element, attrs) { return scope.$watch(attrs.draggable, function(draggable) { diff --git a/services/web/frontend/js/ide/file-tree/directives/droppable.js b/services/web/frontend/js/ide/file-tree/directives/droppable.js index 1edb85e8e7..df3848b2b0 100644 --- a/services/web/frontend/js/ide/file-tree/directives/droppable.js +++ b/services/web/frontend/js/ide/file-tree/directives/droppable.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('droppable', () => ({ link(scope, element, attrs) { return scope.$watch(attrs.droppable, function(droppable) { diff --git a/services/web/frontend/js/ide/file-tree/directives/fileEntity.js b/services/web/frontend/js/ide/file-tree/directives/fileEntity.js index bdbec95a99..963676dd9d 100644 --- a/services/web/frontend/js/ide/file-tree/directives/fileEntity.js +++ b/services/web/frontend/js/ide/file-tree/directives/fileEntity.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('fileEntity', RecursionHelper => ({ restrict: 'E', scope: { diff --git a/services/web/frontend/js/ide/files/services/files.js b/services/web/frontend/js/ide/files/services/files.js index dbc2573b7a..24a5ff3643 100644 --- a/services/web/frontend/js/ide/files/services/files.js +++ b/services/web/frontend/js/ide/files/services/files.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.factory('files', function(ide) { const Files = { getTeXFiles() { diff --git a/services/web/frontend/js/ide/graphics/services/graphics.js b/services/web/frontend/js/ide/graphics/services/graphics.js index c8988fb7b4..e0da0c91dc 100644 --- a/services/web/frontend/js/ide/graphics/services/graphics.js +++ b/services/web/frontend/js/ide/graphics/services/graphics.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.factory('graphics', function(ide) { const Graphics = { getGraphicsFiles() { diff --git a/services/web/frontend/js/ide/history/HistoryManager.js b/services/web/frontend/js/ide/history/HistoryManager.js index 03f84216c7..bca43ef445 100644 --- a/services/web/frontend/js/ide/history/HistoryManager.js +++ b/services/web/frontend/js/ide/history/HistoryManager.js @@ -17,11 +17,11 @@ */ define([ 'moment', - 'ide/colors/ColorManager', - 'ide/history/util/displayNameForUser', - 'ide/history/controllers/HistoryListController', - 'ide/history/controllers/HistoryDiffController', - 'ide/history/directives/infiniteScroll' + '../colors/ColorManager', + './util/displayNameForUser', + './controllers/HistoryListController', + './controllers/HistoryDiffController', + './directives/infiniteScroll' ], function(moment, ColorManager, displayNameForUser) { let HistoryManager return (HistoryManager = (function() { diff --git a/services/web/frontend/js/ide/history/HistoryV2Manager.js b/services/web/frontend/js/ide/history/HistoryV2Manager.js index 268b0bf426..9ee7c4392d 100644 --- a/services/web/frontend/js/ide/history/HistoryV2Manager.js +++ b/services/web/frontend/js/ide/history/HistoryV2Manager.js @@ -19,23 +19,23 @@ */ define([ 'moment', - 'ide/colors/ColorManager', - 'ide/history/util/displayNameForUser', - 'ide/history/util/HistoryViewModes', - 'ide/history/controllers/HistoryV2ListController', - 'ide/history/controllers/HistoryV2FileTreeController', - 'ide/history/controllers/HistoryV2ToolbarController', - 'ide/history/controllers/HistoryV2AddLabelModalController', - 'ide/history/controllers/HistoryV2DeleteLabelModalController', - 'ide/history/directives/infiniteScroll', - 'ide/history/directives/historyDraggableBoundary', - 'ide/history/directives/historyDroppableArea', - 'ide/history/components/historyEntriesList', - 'ide/history/components/historyEntry', - 'ide/history/components/historyLabelsList', - 'ide/history/components/historyLabel', - 'ide/history/components/historyFileTree', - 'ide/history/components/historyFileEntity' + '../colors/ColorManager', + './util/displayNameForUser', + './util/HistoryViewModes', + './controllers/HistoryV2ListController', + './controllers/HistoryV2FileTreeController', + './controllers/HistoryV2ToolbarController', + './controllers/HistoryV2AddLabelModalController', + './controllers/HistoryV2DeleteLabelModalController', + './directives/infiniteScroll', + './directives/historyDraggableBoundary', + './directives/historyDroppableArea', + './components/historyEntriesList', + './components/historyEntry', + './components/historyLabelsList', + './components/historyLabel', + './components/historyFileTree', + './components/historyFileEntity' ], function(moment, ColorManager, displayNameForUser, HistoryViewModes) { let HistoryManager return (HistoryManager = (function() { diff --git a/services/web/frontend/js/ide/history/components/historyEntriesList.js b/services/web/frontend/js/ide/history/components/historyEntriesList.js index fcd8ca451a..a90495a3e1 100644 --- a/services/web/frontend/js/ide/history/components/historyEntriesList.js +++ b/services/web/frontend/js/ide/history/components/historyEntriesList.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { const historyEntriesListController = function($scope, $element, $attrs, _) { const ctrl = this ctrl.$entryListViewportEl = null diff --git a/services/web/frontend/js/ide/history/components/historyEntry.js b/services/web/frontend/js/ide/history/components/historyEntry.js index 50c157023f..e04c2022d0 100644 --- a/services/web/frontend/js/ide/history/components/historyEntry.js +++ b/services/web/frontend/js/ide/history/components/historyEntry.js @@ -11,9 +11,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'ide/colors/ColorManager', - 'ide/history/util/displayNameForUser' + '../../../base', + '../../colors/ColorManager', + '../util/displayNameForUser' ], function(App, ColorManager, displayNameForUser) { const historyEntryController = function($scope, $element, $attrs, _) { const ctrl = this diff --git a/services/web/frontend/js/ide/history/components/historyFileEntity.js b/services/web/frontend/js/ide/history/components/historyFileEntity.js index b4a8062d1a..f41e2613c8 100644 --- a/services/web/frontend/js/ide/history/components/historyFileEntity.js +++ b/services/web/frontend/js/ide/history/components/historyFileEntity.js @@ -11,9 +11,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'ide/file-tree/util/iconTypeFromName', - 'ide/file-tree/util/fileOperationI18nNames' + '../../../base', + '../../file-tree/util/iconTypeFromName', + '../../file-tree/util/fileOperationI18nNames' ], function(App, iconTypeFromName, fileOperationI18nNames) { const historyFileEntityController = function($scope, $element, $attrs) { const ctrl = this diff --git a/services/web/frontend/js/ide/history/components/historyFileTree.js b/services/web/frontend/js/ide/history/components/historyFileTree.js index d76d976e33..39200b51f2 100644 --- a/services/web/frontend/js/ide/history/components/historyFileTree.js +++ b/services/web/frontend/js/ide/history/components/historyFileTree.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { const historyFileTreeController = function($scope, $element, $attrs, _) { const ctrl = this ctrl.handleEntityClick = file => ctrl.onSelectedFileChange({ file }) diff --git a/services/web/frontend/js/ide/history/components/historyLabel.js b/services/web/frontend/js/ide/history/components/historyLabel.js index e3ebc9fb60..835cce59e3 100644 --- a/services/web/frontend/js/ide/history/components/historyLabel.js +++ b/services/web/frontend/js/ide/history/components/historyLabel.js @@ -10,7 +10,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { const historyLabelController = function( $scope, $element, diff --git a/services/web/frontend/js/ide/history/components/historyLabelsList.js b/services/web/frontend/js/ide/history/components/historyLabelsList.js index cdcf0c0485..5fe527ad12 100644 --- a/services/web/frontend/js/ide/history/components/historyLabelsList.js +++ b/services/web/frontend/js/ide/history/components/historyLabelsList.js @@ -11,9 +11,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'ide/colors/ColorManager', - 'ide/history/util/displayNameForUser' + '../../../base', + '../../colors/ColorManager', + '../util/displayNameForUser' ], function(App, ColorManager, displayNameForUser) { const historyLabelsListController = function($scope, $element, $attrs, _) { const ctrl = this diff --git a/services/web/frontend/js/ide/history/controllers/HistoryDiffController.js b/services/web/frontend/js/ide/history/controllers/HistoryDiffController.js index f670faa3b9..d7b28115bf 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryDiffController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryDiffController.js @@ -11,7 +11,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { App.controller('HistoryDiffController', function( $scope, $modal, diff --git a/services/web/frontend/js/ide/history/controllers/HistoryListController.js b/services/web/frontend/js/ide/history/controllers/HistoryListController.js index 153d9ed6e7..e82318629d 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryListController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryListController.js @@ -14,7 +14,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/history/util/displayNameForUser'], function( +define(['../../../base', '../util/displayNameForUser'], function( App, displayNameForUser ) { diff --git a/services/web/frontend/js/ide/history/controllers/HistoryV2AddLabelModalController.js b/services/web/frontend/js/ide/history/controllers/HistoryV2AddLabelModalController.js index 2b5b69fc6a..eaeee18dd5 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryV2AddLabelModalController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryV2AddLabelModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('HistoryV2AddLabelModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/history/controllers/HistoryV2DeleteLabelModalController.js b/services/web/frontend/js/ide/history/controllers/HistoryV2DeleteLabelModalController.js index 730416413d..c31061f608 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryV2DeleteLabelModalController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryV2DeleteLabelModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('HistoryV2DeleteLabelModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js b/services/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js index 25c99c51c1..882030e17c 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryV2FileTreeController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('HistoryV2FileTreeController', function($scope, ide) { $scope.handleFileSelection = file => { ide.historyManager.selectFile(file) diff --git a/services/web/frontend/js/ide/history/controllers/HistoryV2ListController.js b/services/web/frontend/js/ide/history/controllers/HistoryV2ListController.js index 5621816477..2e1e72abd6 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryV2ListController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryV2ListController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/history/util/displayNameForUser'], ( +define(['../../../base', '../util/displayNameForUser'], ( App, displayNameForUser ) => diff --git a/services/web/frontend/js/ide/history/controllers/HistoryV2ToolbarController.js b/services/web/frontend/js/ide/history/controllers/HistoryV2ToolbarController.js index 709c5f7521..8f58499ac1 100644 --- a/services/web/frontend/js/ide/history/controllers/HistoryV2ToolbarController.js +++ b/services/web/frontend/js/ide/history/controllers/HistoryV2ToolbarController.js @@ -11,7 +11,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller( 'HistoryV2ToolbarController', ($scope, $modal, ide, eventTracking, waitFor) => { diff --git a/services/web/frontend/js/ide/history/directives/historyDraggableBoundary.js b/services/web/frontend/js/ide/history/directives/historyDraggableBoundary.js index edc4c99fe0..783d00c37b 100644 --- a/services/web/frontend/js/ide/history/directives/historyDraggableBoundary.js +++ b/services/web/frontend/js/ide/history/directives/historyDraggableBoundary.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.directive('historyDraggableBoundary', () => ({ scope: { historyDraggableBoundary: '@', diff --git a/services/web/frontend/js/ide/history/directives/historyDroppableArea.js b/services/web/frontend/js/ide/history/directives/historyDroppableArea.js index 40ce290bbd..23ebb51093 100644 --- a/services/web/frontend/js/ide/history/directives/historyDroppableArea.js +++ b/services/web/frontend/js/ide/history/directives/historyDroppableArea.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.directive('historyDroppableArea', () => ({ scope: { historyDroppableAreaOnDrop: '&', diff --git a/services/web/frontend/js/ide/history/directives/infiniteScroll.js b/services/web/frontend/js/ide/history/directives/infiniteScroll.js index 7ecb15b7aa..2785df3d3c 100644 --- a/services/web/frontend/js/ide/history/directives/infiniteScroll.js +++ b/services/web/frontend/js/ide/history/directives/infiniteScroll.js @@ -10,7 +10,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('infiniteScroll', () => ({ link(scope, element, attrs, ctrl) { const innerElement = element.find('.infinite-scroll-inner') diff --git a/services/web/frontend/js/ide/hotkeys/controllers/HotkeysController.js b/services/web/frontend/js/ide/hotkeys/controllers/HotkeysController.js index 31b12ed339..05e497c44b 100644 --- a/services/web/frontend/js/ide/hotkeys/controllers/HotkeysController.js +++ b/services/web/frontend/js/ide/hotkeys/controllers/HotkeysController.js @@ -11,7 +11,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ace/ace'], function(App) { +define(['../../../base', 'ace/ace'], function(App) { App.controller( 'HotkeysController', ($scope, $modal, eventTracking) => diff --git a/services/web/frontend/js/ide/hotkeys/index.js b/services/web/frontend/js/ide/hotkeys/index.js index 73a53390b8..923e6e99b8 100644 --- a/services/web/frontend/js/ide/hotkeys/index.js +++ b/services/web/frontend/js/ide/hotkeys/index.js @@ -4,6 +4,6 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/hotkeys/BackspaceHighjack', - 'ide/hotkeys/controllers/HotkeysController' + './BackspaceHighjack', + './controllers/HotkeysController' ], function() {}) diff --git a/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogs.js b/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogs.js index f2356b8be7..ff1d84d1a1 100644 --- a/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogs.js +++ b/services/web/frontend/js/ide/human-readable-logs/HumanReadableLogs.js @@ -11,10 +11,10 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define([ - 'libs/latex-log-parser', - 'ide/human-readable-logs/HumanReadableLogsRules' -], (LogParser, ruleset) => ({ +define(['libs/latex-log-parser', './HumanReadableLogsRules'], ( + LogParser, + ruleset +) => ({ parse(rawLog, options) { let parsedLogEntries if (typeof rawLog === 'string') { diff --git a/services/web/frontend/js/ide/metadata/services/metadata.js b/services/web/frontend/js/ide/metadata/services/metadata.js index 7f229b4232..9249c51348 100644 --- a/services/web/frontend/js/ide/metadata/services/metadata.js +++ b/services/web/frontend/js/ide/metadata/services/metadata.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.factory('metadata', function($http, ide) { const debouncer = {} // DocId => Timeout diff --git a/services/web/frontend/js/ide/online-users/OnlineUsersManager.js b/services/web/frontend/js/ide/online-users/OnlineUsersManager.js index f541fd6693..8debd07a7c 100644 --- a/services/web/frontend/js/ide/online-users/OnlineUsersManager.js +++ b/services/web/frontend/js/ide/online-users/OnlineUsersManager.js @@ -16,9 +16,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'ide/colors/ColorManager', + '../colors/ColorManager', 'crypto-js/md5', - 'ide/online-users/controllers/OnlineUsersController' + './controllers/OnlineUsersController' ], function(ColorManager) { let OnlineUsersManager return (OnlineUsersManager = (function() { diff --git a/services/web/frontend/js/ide/online-users/controllers/OnlineUsersController.js b/services/web/frontend/js/ide/online-users/controllers/OnlineUsersController.js index cda51df7b4..6c75cd1c7f 100644 --- a/services/web/frontend/js/ide/online-users/controllers/OnlineUsersController.js +++ b/services/web/frontend/js/ide/online-users/controllers/OnlineUsersController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('OnlineUsersController', function($scope, ide) { $scope.gotoUser = function(user) { if (user.doc != null && user.row != null) { diff --git a/services/web/frontend/js/ide/pdf/PdfManager.js b/services/web/frontend/js/ide/pdf/PdfManager.js index d3302c217a..4ea13ad009 100644 --- a/services/web/frontend/js/ide/pdf/PdfManager.js +++ b/services/web/frontend/js/ide/pdf/PdfManager.js @@ -10,9 +10,9 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'ide/pdf/controllers/PdfController', - 'ide/pdf/controllers/PdfViewToggleController', - 'ide/pdfng/directives/pdfJs' + './controllers/PdfController', + './controllers/PdfViewToggleController', + '../pdfng/directives/pdfJs' ], function() { let PdfManager return (PdfManager = class PdfManager { diff --git a/services/web/frontend/js/ide/pdf/controllers/PdfController.js b/services/web/frontend/js/ide/pdf/controllers/PdfController.js index 24fb6048c6..93ba77e9dc 100644 --- a/services/web/frontend/js/ide/pdf/controllers/PdfController.js +++ b/services/web/frontend/js/ide/pdf/controllers/PdfController.js @@ -1,7 +1,7 @@ define([ - 'base', + '../../../base', 'ace/ace', - 'ide/human-readable-logs/HumanReadableLogs', + '../../human-readable-logs/HumanReadableLogs', 'libs/bib-log-parser' ], function(App, Ace, HumanReadableLogs, BibLogParser) { const AUTO_COMPILE_MAX_WAIT = 5000 diff --git a/services/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js b/services/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js index a0721845e7..d5bd552bba 100644 --- a/services/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js +++ b/services/web/frontend/js/ide/pdf/controllers/PdfViewToggleController.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('PdfViewToggleController', function($scope) { $scope.togglePdfView = function() { if ($scope.ui.view === 'pdf') { diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfAnnotations.js b/services/web/frontend/js/ide/pdfng/directives/pdfAnnotations.js index 2dfbcf8715..c736f18922 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfAnnotations.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfAnnotations.js @@ -1,4 +1,4 @@ -define(['base', './pdfJsLoader'], (App, PDFJS) => { +define(['../../../base', './pdfJsLoader'], (App, PDFJS) => { const EXTERNAL_LINK_TARGET = '_blank' const REL_NOOPENER = 'noreferrer noopener' diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfHighlights.js b/services/web/frontend/js/ide/pdfng/directives/pdfHighlights.js index 712801652e..a27038d4d5 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfHighlights.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfHighlights.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', './pdfJsLoader'], (App, PDFJS) => +define(['../../../base', './pdfJsLoader'], (App, PDFJS) => // app = angular.module 'pdfHighlights', [] App.factory('pdfHighlights', function() { diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfJs.js b/services/web/frontend/js/ide/pdfng/directives/pdfJs.js index 561ae2a814..ddaf77b1d7 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfJs.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfJs.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'ide/pdfng/directives/pdfViewer'], (App, pdfViewer) => +define(['../../../base', './pdfViewer'], (App, pdfViewer) => App.directive('pdfng', ($timeout, localStorage) => ({ scope: { pdfSrc: '=', diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfPage.js b/services/web/frontend/js/ide/pdfng/directives/pdfPage.js index ad5ccf48e7..b106793135 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfPage.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfPage.js @@ -14,7 +14,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => // App = angular.module 'pdfPage', ['pdfHighlights'] App.directive('pdfPage', ($timeout, pdfHighlights, pdfSpinner) => ({ diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfRenderer.js b/services/web/frontend/js/ide/pdfng/directives/pdfRenderer.js index 221b837cbf..8330f0b9f2 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfRenderer.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfRenderer.js @@ -18,7 +18,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', './pdfJsLoader'], (App, PDFJS) => +define(['../../../base', './pdfJsLoader'], (App, PDFJS) => // App = angular.module 'PDFRenderer', ['pdfAnnotations', 'pdfTextLayer'] App.factory('PDFRenderer', function( diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfSpinner.js b/services/web/frontend/js/ide/pdfng/directives/pdfSpinner.js index b8272a8117..12eedbb478 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfSpinner.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfSpinner.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.factory('pdfSpinner', function() { let pdfSpinner return (pdfSpinner = class pdfSpinner { diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfTextLayer.js b/services/web/frontend/js/ide/pdfng/directives/pdfTextLayer.js index b48ccf63a7..c2d7705f53 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfTextLayer.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfTextLayer.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => // uses the PDFJS text layer renderer to provide invisible overlayed // text for searching diff --git a/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js b/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js index 1c7e14b429..bb3f717090 100644 --- a/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js +++ b/services/web/frontend/js/ide/pdfng/directives/pdfViewer.js @@ -19,13 +19,13 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'ide/pdfng/directives/pdfTextLayer', - 'ide/pdfng/directives/pdfAnnotations', - 'ide/pdfng/directives/pdfHighlights', - 'ide/pdfng/directives/pdfRenderer', - 'ide/pdfng/directives/pdfPage', - 'ide/pdfng/directives/pdfSpinner' + '../../../base', + './pdfTextLayer', + './pdfAnnotations', + './pdfHighlights', + './pdfRenderer', + './pdfPage', + './pdfSpinner' ], function( App, pdfTextLayer, diff --git a/services/web/frontend/js/ide/preamble/services/preamble.js b/services/web/frontend/js/ide/preamble/services/preamble.js index eacec526ae..3b2b0ee706 100644 --- a/services/web/frontend/js/ide/preamble/services/preamble.js +++ b/services/web/frontend/js/ide/preamble/services/preamble.js @@ -10,7 +10,7 @@ * DS103: Rewrite code to no longer use __guard__ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.factory('preamble', function(ide) { var Preamble = { getPreambleText() { diff --git a/services/web/frontend/js/ide/review-panel/ReviewPanelManager.js b/services/web/frontend/js/ide/review-panel/ReviewPanelManager.js index 67ef083e98..02434f503d 100644 --- a/services/web/frontend/js/ide/review-panel/ReviewPanelManager.js +++ b/services/web/frontend/js/ide/review-panel/ReviewPanelManager.js @@ -4,20 +4,20 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/review-panel/controllers/ReviewPanelController', - 'ide/review-panel/controllers/TrackChangesUpgradeModalController', - 'ide/review-panel/controllers/BulkActionsModalController', - 'ide/review-panel/directives/reviewPanelSorted', - 'ide/review-panel/directives/reviewPanelToggle', - 'ide/review-panel/directives/changeEntry', - 'ide/review-panel/directives/aggregateChangeEntry', - 'ide/review-panel/directives/commentEntry', - 'ide/review-panel/directives/addCommentEntry', - 'ide/review-panel/directives/bulkActionsEntry', - 'ide/review-panel/directives/resolvedCommentEntry', - 'ide/review-panel/directives/resolvedCommentsDropdown', - 'ide/review-panel/directives/reviewPanelCollapseHeight', - 'ide/review-panel/filters/notEmpty', - 'ide/review-panel/filters/numKeys', - 'ide/review-panel/filters/orderOverviewEntries' + './controllers/ReviewPanelController', + './controllers/TrackChangesUpgradeModalController', + './controllers/BulkActionsModalController', + './directives/reviewPanelSorted', + './directives/reviewPanelToggle', + './directives/changeEntry', + './directives/aggregateChangeEntry', + './directives/commentEntry', + './directives/addCommentEntry', + './directives/bulkActionsEntry', + './directives/resolvedCommentEntry', + './directives/resolvedCommentsDropdown', + './directives/reviewPanelCollapseHeight', + './filters/notEmpty', + './filters/numKeys', + './filters/orderOverviewEntries' ], function() {}) diff --git a/services/web/frontend/js/ide/review-panel/controllers/BulkActionsModalController.js b/services/web/frontend/js/ide/review-panel/controllers/BulkActionsModalController.js index 25393ef1f3..8a4d7a96f8 100644 --- a/services/web/frontend/js/ide/review-panel/controllers/BulkActionsModalController.js +++ b/services/web/frontend/js/ide/review-panel/controllers/BulkActionsModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('BulkActionsModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js b/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js index 85016fd00a..e6094521af 100644 --- a/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js +++ b/services/web/frontend/js/ide/review-panel/controllers/ReviewPanelController.js @@ -16,10 +16,10 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'base', - 'utils/EventEmitter', - 'ide/colors/ColorManager', - 'ide/review-panel/RangesTracker' + '../../../base', + '../../../utils/EventEmitter', + '../../colors/ColorManager', + '../RangesTracker' ], (App, EventEmitter, ColorManager, RangesTracker) => App.controller('ReviewPanelController', function( $scope, diff --git a/services/web/frontend/js/ide/review-panel/controllers/TrackChangesUpgradeModalController.js b/services/web/frontend/js/ide/review-panel/controllers/TrackChangesUpgradeModalController.js index 9ecca5ada8..c4efbc9247 100644 --- a/services/web/frontend/js/ide/review-panel/controllers/TrackChangesUpgradeModalController.js +++ b/services/web/frontend/js/ide/review-panel/controllers/TrackChangesUpgradeModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller( 'TrackChangesUpgradeModalController', ($scope, $modalInstance) => ($scope.cancel = () => $modalInstance.dismiss()) diff --git a/services/web/frontend/js/ide/review-panel/directives/addCommentEntry.js b/services/web/frontend/js/ide/review-panel/directives/addCommentEntry.js index 198af8c50d..c5937290f4 100644 --- a/services/web/frontend/js/ide/review-panel/directives/addCommentEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/addCommentEntry.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { let content = '' App.directive('addCommentEntry', () => ({ restrict: 'E', diff --git a/services/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js b/services/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js index ca37c5bf9d..cf8e595ccd 100644 --- a/services/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/aggregateChangeEntry.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('aggregateChangeEntry', $timeout => ({ restrict: 'E', templateUrl: 'aggregateChangeEntryTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/bulkActionsEntry.js b/services/web/frontend/js/ide/review-panel/directives/bulkActionsEntry.js index 23d149e601..9772fc3fe1 100644 --- a/services/web/frontend/js/ide/review-panel/directives/bulkActionsEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/bulkActionsEntry.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('bulkActionsEntry', () => ({ restrict: 'E', templateUrl: 'bulkActionsEntryTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/changeEntry.js b/services/web/frontend/js/ide/review-panel/directives/changeEntry.js index f2f0383a11..722be7f359 100644 --- a/services/web/frontend/js/ide/review-panel/directives/changeEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/changeEntry.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('changeEntry', $timeout => ({ restrict: 'E', templateUrl: 'changeEntryTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/commentEntry.js b/services/web/frontend/js/ide/review-panel/directives/commentEntry.js index c7d473fbbf..fdc692fba8 100644 --- a/services/web/frontend/js/ide/review-panel/directives/commentEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/commentEntry.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('commentEntry', $timeout => ({ restrict: 'E', templateUrl: 'commentEntryTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/resolvedCommentEntry.js b/services/web/frontend/js/ide/review-panel/directives/resolvedCommentEntry.js index 9fde3caf77..3f7e1ca16a 100644 --- a/services/web/frontend/js/ide/review-panel/directives/resolvedCommentEntry.js +++ b/services/web/frontend/js/ide/review-panel/directives/resolvedCommentEntry.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('resolvedCommentEntry', () => ({ restrict: 'E', templateUrl: 'resolvedCommentEntryTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js b/services/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js index caced46682..16b9e19a93 100644 --- a/services/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js +++ b/services/web/frontend/js/ide/review-panel/directives/resolvedCommentsDropdown.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('resolvedCommentsDropdown', _ => ({ restrict: 'E', templateUrl: 'resolvedCommentsDropdownTemplate', diff --git a/services/web/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js b/services/web/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js index f9a5412df5..2308bac11e 100644 --- a/services/web/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js +++ b/services/web/frontend/js/ide/review-panel/directives/reviewPanelCollapseHeight.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('reviewPanelCollapseHeight', $parse => ({ restrict: 'A', link(scope, element, attrs) { diff --git a/services/web/frontend/js/ide/review-panel/directives/reviewPanelSorted.js b/services/web/frontend/js/ide/review-panel/directives/reviewPanelSorted.js index f40c6c8b9f..be4f7ff090 100644 --- a/services/web/frontend/js/ide/review-panel/directives/reviewPanelSorted.js +++ b/services/web/frontend/js/ide/review-panel/directives/reviewPanelSorted.js @@ -14,7 +14,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('reviewPanelSorted', $timeout => ({ link(scope, element, attrs) { let previous_focused_entry_index = 0 diff --git a/services/web/frontend/js/ide/review-panel/directives/reviewPanelToggle.js b/services/web/frontend/js/ide/review-panel/directives/reviewPanelToggle.js index b1161a74c3..9b1711bfa0 100644 --- a/services/web/frontend/js/ide/review-panel/directives/reviewPanelToggle.js +++ b/services/web/frontend/js/ide/review-panel/directives/reviewPanelToggle.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.directive('reviewPanelToggle', () => ({ restrict: 'E', scope: { diff --git a/services/web/frontend/js/ide/review-panel/filters/notEmpty.js b/services/web/frontend/js/ide/review-panel/filters/notEmpty.js index c2abe8f8ca..d8185461ec 100644 --- a/services/web/frontend/js/ide/review-panel/filters/notEmpty.js +++ b/services/web/frontend/js/ide/review-panel/filters/notEmpty.js @@ -8,5 +8,5 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.filter('notEmpty', () => object => !angular.equals({}, object))) diff --git a/services/web/frontend/js/ide/review-panel/filters/numKeys.js b/services/web/frontend/js/ide/review-panel/filters/numKeys.js index cd721e00e2..1084178f86 100644 --- a/services/web/frontend/js/ide/review-panel/filters/numKeys.js +++ b/services/web/frontend/js/ide/review-panel/filters/numKeys.js @@ -9,7 +9,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.filter( 'numKeys', () => diff --git a/services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js b/services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js index 71fddaa90c..c683ed65ea 100644 --- a/services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js +++ b/services/web/frontend/js/ide/review-panel/filters/orderOverviewEntries.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.filter( 'orderOverviewEntries', () => diff --git a/services/web/frontend/js/ide/services/ide.js b/services/web/frontend/js/ide/services/ide.js index f605fd34ce..9508798d8f 100644 --- a/services/web/frontend/js/ide/services/ide.js +++ b/services/web/frontend/js/ide/services/ide.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../base'], function(App) { // We create and provide this as service so that we can access the global ide // from within other parts of the angular app. App.factory('ide', function( diff --git a/services/web/frontend/js/ide/settings/controllers/ProjectNameController.js b/services/web/frontend/js/ide/settings/controllers/ProjectNameController.js index c14651b4b3..3d284de5c8 100644 --- a/services/web/frontend/js/ide/settings/controllers/ProjectNameController.js +++ b/services/web/frontend/js/ide/settings/controllers/ProjectNameController.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { const MAX_PROJECT_NAME_LENGTH = 150 return App.controller('ProjectNameController', function( $scope, diff --git a/services/web/frontend/js/ide/settings/controllers/SettingsController.js b/services/web/frontend/js/ide/settings/controllers/SettingsController.js index d910e70f77..76c8f8cb56 100644 --- a/services/web/frontend/js/ide/settings/controllers/SettingsController.js +++ b/services/web/frontend/js/ide/settings/controllers/SettingsController.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('SettingsController', function( $scope, ExposedSettings, diff --git a/services/web/frontend/js/ide/settings/index.js b/services/web/frontend/js/ide/settings/index.js index 2d6f1870cb..14114e1e44 100644 --- a/services/web/frontend/js/ide/settings/index.js +++ b/services/web/frontend/js/ide/settings/index.js @@ -4,7 +4,7 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/settings/services/settings', - 'ide/settings/controllers/SettingsController', - 'ide/settings/controllers/ProjectNameController' + './services/settings', + './controllers/SettingsController', + './controllers/ProjectNameController' ], function() {}) diff --git a/services/web/frontend/js/ide/settings/services/settings.js b/services/web/frontend/js/ide/settings/services/settings.js index 9b7956fe84..b26d799e2c 100644 --- a/services/web/frontend/js/ide/settings/services/settings.js +++ b/services/web/frontend/js/ide/settings/services/settings.js @@ -11,7 +11,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.factory('settings', (ide, eventTracking) => ({ saveSettings(data) { // Tracking code. diff --git a/services/web/frontend/js/ide/share/controllers/OwnershipTransferConfirmModalController.js b/services/web/frontend/js/ide/share/controllers/OwnershipTransferConfirmModalController.js index 64bd64fff3..b718121e05 100644 --- a/services/web/frontend/js/ide/share/controllers/OwnershipTransferConfirmModalController.js +++ b/services/web/frontend/js/ide/share/controllers/OwnershipTransferConfirmModalController.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { App.controller('OwnershipTransferConfirmModalController', function( $scope, $window, diff --git a/services/web/frontend/js/ide/share/controllers/ShareController.js b/services/web/frontend/js/ide/share/controllers/ShareController.js index 190abe5ac7..eae8fba5d0 100644 --- a/services/web/frontend/js/ide/share/controllers/ShareController.js +++ b/services/web/frontend/js/ide/share/controllers/ShareController.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { App.controller('ShareController', function( $scope, $modal, diff --git a/services/web/frontend/js/ide/share/controllers/ShareProjectModalController.js b/services/web/frontend/js/ide/share/controllers/ShareProjectModalController.js index 0e14b1b485..1fdcdbbf1e 100644 --- a/services/web/frontend/js/ide/share/controllers/ShareProjectModalController.js +++ b/services/web/frontend/js/ide/share/controllers/ShareProjectModalController.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { App.controller('ShareProjectModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/share/controllers/ShareProjectModalMemberRowController.js b/services/web/frontend/js/ide/share/controllers/ShareProjectModalMemberRowController.js index 89d3177a0e..680ac89064 100644 --- a/services/web/frontend/js/ide/share/controllers/ShareProjectModalMemberRowController.js +++ b/services/web/frontend/js/ide/share/controllers/ShareProjectModalMemberRowController.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { App.controller('ShareProjectModalMemberRowController', function( $scope, $modal, diff --git a/services/web/frontend/js/ide/share/index.js b/services/web/frontend/js/ide/share/index.js index cbc5859690..777f8b68fa 100644 --- a/services/web/frontend/js/ide/share/index.js +++ b/services/web/frontend/js/ide/share/index.js @@ -1,8 +1,8 @@ define([ - 'ide/share/controllers/ShareController', - 'ide/share/controllers/ShareProjectModalController', - 'ide/share/controllers/ShareProjectModalMemberRowController', - 'ide/share/controllers/OwnershipTransferConfirmModalController', - 'ide/share/services/projectMembers', - 'ide/share/services/projectInvites' + './controllers/ShareController', + './controllers/ShareProjectModalController', + './controllers/ShareProjectModalMemberRowController', + './controllers/OwnershipTransferConfirmModalController', + './services/projectMembers', + './services/projectInvites' ], function() {}) diff --git a/services/web/frontend/js/ide/share/services/projectInvites.js b/services/web/frontend/js/ide/share/services/projectInvites.js index 0e654c4f3d..188e73986e 100644 --- a/services/web/frontend/js/ide/share/services/projectInvites.js +++ b/services/web/frontend/js/ide/share/services/projectInvites.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.factory('projectInvites', (ide, $http) => ({ sendInvite(email, privileges, grecaptchaResponse) { return $http.post(`/project/${ide.project_id}/invite`, { diff --git a/services/web/frontend/js/ide/share/services/projectMembers.js b/services/web/frontend/js/ide/share/services/projectMembers.js index b5b4b7bf97..b5c9cbd66a 100644 --- a/services/web/frontend/js/ide/share/services/projectMembers.js +++ b/services/web/frontend/js/ide/share/services/projectMembers.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../../../base'], App => { App.factory('projectMembers', (ide, $http) => ({ removeMember(member) { return $http({ diff --git a/services/web/frontend/js/ide/wordcount/controllers/WordCountController.js b/services/web/frontend/js/ide/wordcount/controllers/WordCountController.js index a6c5353d18..2046be404d 100644 --- a/services/web/frontend/js/ide/wordcount/controllers/WordCountController.js +++ b/services/web/frontend/js/ide/wordcount/controllers/WordCountController.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller( 'WordCountController', ($scope, $modal) => diff --git a/services/web/frontend/js/ide/wordcount/controllers/WordCountModalController.js b/services/web/frontend/js/ide/wordcount/controllers/WordCountModalController.js index 4e54fe95d9..8e0b18551e 100644 --- a/services/web/frontend/js/ide/wordcount/controllers/WordCountModalController.js +++ b/services/web/frontend/js/ide/wordcount/controllers/WordCountModalController.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../base'], App => App.controller('WordCountModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/ide/wordcount/index.js b/services/web/frontend/js/ide/wordcount/index.js index 23c3938503..9c47c2b918 100644 --- a/services/web/frontend/js/ide/wordcount/index.js +++ b/services/web/frontend/js/ide/wordcount/index.js @@ -4,6 +4,6 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'ide/wordcount/controllers/WordCountController', - 'ide/wordcount/controllers/WordCountModalController' + './controllers/WordCountController', + './controllers/WordCountModalController' ], function() {}) diff --git a/services/web/frontend/js/main.js b/services/web/frontend/js/main.js index 97dbb4b434..b915aca731 100644 --- a/services/web/frontend/js/main.js +++ b/services/web/frontend/js/main.js @@ -10,53 +10,53 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'main/token-access', - 'main/project-list/index', - 'main/account-settings', - 'main/clear-sessions', - 'main/account-upgrade', - 'main/plans', - 'main/post-gateway', - 'main/user-membership', - 'main/scribtex-popup', - 'main/event', - 'main/bonus', - 'main/system-messages', - 'main/translations', - 'main/subscription-dashboard', - 'main/new-subscription', - 'main/annual-upgrade', - 'main/register-users', - 'main/subscription/team-invite-controller', - 'main/subscription/upgrade-subscription', - 'main/contact-us', - 'main/learn', - 'main/exposed-settings', - 'main/affiliations/components/affiliationForm', - 'main/affiliations/controllers/UserAffiliationsController', - 'main/affiliations/factories/UserAffiliationsDataService', - 'main/oauth/controllers/UserOauthController', - 'main/keys', - 'main/importing', - 'analytics/AbTestingManager', - 'directives/autoSubmitForm', - 'directives/asyncForm', - 'directives/complexPassword', - 'directives/stopPropagation', - 'directives/focus', - 'directives/equals', - 'directives/eventTracking', - 'directives/fineUpload', - 'directives/onEnter', - 'directives/selectAll', - 'directives/maxHeight', - 'directives/creditCards', - 'directives/bookmarkableTabset', - 'services/queued-http', - 'services/validateCaptcha', - 'services/validateCaptchaV3', - 'filters/formatDate', - 'components/inputSuggestions', + './main/token-access', + './main/project-list/index', + './main/account-settings', + './main/clear-sessions', + './main/account-upgrade', + './main/plans', + './main/post-gateway', + './main/user-membership', + './main/scribtex-popup', + './main/event', + './main/bonus', + './main/system-messages', + './main/translations', + './main/subscription-dashboard', + './main/new-subscription', + './main/annual-upgrade', + './main/register-users', + './main/subscription/team-invite-controller', + './main/subscription/upgrade-subscription', + './main/contact-us', + './main/learn', + './main/exposed-settings', + './main/affiliations/components/affiliationForm', + './main/affiliations/controllers/UserAffiliationsController', + './main/affiliations/factories/UserAffiliationsDataService', + './main/oauth/controllers/UserOauthController', + './main/keys', + './main/importing', + './analytics/AbTestingManager', + './directives/autoSubmitForm', + './directives/asyncForm', + './directives/complexPassword', + './directives/stopPropagation', + './directives/focus', + './directives/equals', + './directives/eventTracking', + './directives/fineUpload', + './directives/onEnter', + './directives/selectAll', + './directives/maxHeight', + './directives/creditCards', + './directives/bookmarkableTabset', + './services/queued-http', + './services/validateCaptcha', + './services/validateCaptchaV3', + './filters/formatDate', + './components/inputSuggestions', '../../modules/modules-main.js' ], function() { angular.module('SharelatexApp').config(function($locationProvider) { diff --git a/services/web/frontend/js/main/account-settings.js b/services/web/frontend/js/main/account-settings.js index b156f78023..68c19f0289 100644 --- a/services/web/frontend/js/main/account-settings.js +++ b/services/web/frontend/js/main/account-settings.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../base'], function(App) { App.controller('AccountSettingsController', function( $scope, $http, diff --git a/services/web/frontend/js/main/account-upgrade.js b/services/web/frontend/js/main/account-upgrade.js index db076e8cac..e8b852c580 100644 --- a/services/web/frontend/js/main/account-upgrade.js +++ b/services/web/frontend/js/main/account-upgrade.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../base'], App => App.controller('FreeTrialModalController', function($scope, eventTracking) { $scope.buttonClass = 'btn-primary' diff --git a/services/web/frontend/js/main/affiliations/components/affiliationForm.js b/services/web/frontend/js/main/affiliations/components/affiliationForm.js index b03d89211f..82d0d0f9b4 100644 --- a/services/web/frontend/js/main/affiliations/components/affiliationForm.js +++ b/services/web/frontend/js/main/affiliations/components/affiliationForm.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../../base'], function(App) { const affiliationFormController = function( $scope, $element, diff --git a/services/web/frontend/js/main/affiliations/controllers/UserAffiliationsController.js b/services/web/frontend/js/main/affiliations/controllers/UserAffiliationsController.js index e3a2f3b15b..86c6740106 100644 --- a/services/web/frontend/js/main/affiliations/controllers/UserAffiliationsController.js +++ b/services/web/frontend/js/main/affiliations/controllers/UserAffiliationsController.js @@ -5,7 +5,7 @@ no-useless-escape, */ -define(['base'], App => +define(['../../../base'], App => App.controller('UserAffiliationsController', function( $scope, UserAffiliationsDataService, diff --git a/services/web/frontend/js/main/affiliations/factories/UserAffiliationsDataService.js b/services/web/frontend/js/main/affiliations/factories/UserAffiliationsDataService.js index 9cc795dfb0..e2cc56c4e1 100644 --- a/services/web/frontend/js/main/affiliations/factories/UserAffiliationsDataService.js +++ b/services/web/frontend/js/main/affiliations/factories/UserAffiliationsDataService.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../../../base'], function(App) { const countriesList = [ { code: 'af', name: 'Afghanistan' }, { code: 'ax', name: 'Ă…land Islands' }, diff --git a/services/web/frontend/js/main/annual-upgrade.js b/services/web/frontend/js/main/annual-upgrade.js index 032c6b9807..69e247646e 100644 --- a/services/web/frontend/js/main/annual-upgrade.js +++ b/services/web/frontend/js/main/annual-upgrade.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('AnnualUpgradeController', function($scope, $http, $modal) { const MESSAGES_URL = '/user/subscription/upgrade-annual' diff --git a/services/web/frontend/js/main/bonus.js b/services/web/frontend/js/main/bonus.js index 06fdc17528..5d0adf4429 100644 --- a/services/web/frontend/js/main/bonus.js +++ b/services/web/frontend/js/main/bonus.js @@ -9,7 +9,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { App.controller( 'BonusLinksController', ($scope, $modal) => diff --git a/services/web/frontend/js/main/clear-sessions.js b/services/web/frontend/js/main/clear-sessions.js index 256d8c8bbc..d69a3bc827 100644 --- a/services/web/frontend/js/main/clear-sessions.js +++ b/services/web/frontend/js/main/clear-sessions.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('ClearSessionsController', function($scope, $http) { $scope.state = { otherSessions: window.otherSessions, diff --git a/services/web/frontend/js/main/contact-us.js b/services/web/frontend/js/main/contact-us.js index 5bf9ab0f22..b3d767fa78 100644 --- a/services/web/frontend/js/main/contact-us.js +++ b/services/web/frontend/js/main/contact-us.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('GroupPlanContactController', function($scope, $modal, $http) { $scope.form = {} $scope.sent = false diff --git a/services/web/frontend/js/main/event.js b/services/web/frontend/js/main/event.js index 0391fd67af..fa0b98fb21 100644 --- a/services/web/frontend/js/main/event.js +++ b/services/web/frontend/js/main/event.js @@ -13,7 +13,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['moment', 'base', 'modules/localStorage'], function(moment, App) { +define(['moment', '../base', '../modules/localStorage'], function(moment, App) { const CACHE_KEY = 'mbEvents' // keep track of how many heartbeats we've sent so we can calculate how diff --git a/services/web/frontend/js/main/exposed-settings.js b/services/web/frontend/js/main/exposed-settings.js index 4a563a0c2a..98223a7627 100644 --- a/services/web/frontend/js/main/exposed-settings.js +++ b/services/web/frontend/js/main/exposed-settings.js @@ -1,3 +1,3 @@ -define(['base'], function(App) { +define(['../base'], function(App) { App.constant('ExposedSettings', window.ExposedSettings) }) diff --git a/services/web/frontend/js/main/importing.js b/services/web/frontend/js/main/importing.js index 9ce3c8f893..41a7492416 100644 --- a/services/web/frontend/js/main/importing.js +++ b/services/web/frontend/js/main/importing.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../base'], function(App) { App.controller('ImportingController', function( $interval, $scope, diff --git a/services/web/frontend/js/main/keys.js b/services/web/frontend/js/main/keys.js index 71b34d4389..7ee949183c 100644 --- a/services/web/frontend/js/main/keys.js +++ b/services/web/frontend/js/main/keys.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.constant('Keys', { ENTER: 13, TAB: 9, diff --git a/services/web/frontend/js/main/learn.js b/services/web/frontend/js/main/learn.js index a9e78ddcc2..af838ac458 100644 --- a/services/web/frontend/js/main/learn.js +++ b/services/web/frontend/js/main/learn.js @@ -14,9 +14,11 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'directives/mathjax', 'services/algolia-search'], function( - App -) { +define([ + '../base', + '../directives/mathjax', + '../services/algolia-search' +], function(App) { App.controller('SearchWikiController', function( $scope, algoliaSearch, diff --git a/services/web/frontend/js/main/new-subscription.js b/services/web/frontend/js/main/new-subscription.js index c2d6c7c333..8997d25501 100644 --- a/services/web/frontend/js/main/new-subscription.js +++ b/services/web/frontend/js/main/new-subscription.js @@ -4,7 +4,7 @@ no-return-assign */ /* global recurly */ -define(['base', 'directives/creditCards'], App => +define(['../base', '../directives/creditCards'], App => App.controller('NewSubscriptionController', function( $scope, MultiCurrencyPricing, diff --git a/services/web/frontend/js/main/oauth/controllers/UserOauthController.js b/services/web/frontend/js/main/oauth/controllers/UserOauthController.js index 4c5a6ee9b3..e5e0b99fc1 100644 --- a/services/web/frontend/js/main/oauth/controllers/UserOauthController.js +++ b/services/web/frontend/js/main/oauth/controllers/UserOauthController.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../../base'], App => App.controller('UserOauthController', function($http, $scope, $q) { const _reset = function() { $scope.ui = { diff --git a/services/web/frontend/js/main/plans.js b/services/web/frontend/js/main/plans.js index c10ec13df2..dcbbf581f2 100644 --- a/services/web/frontend/js/main/plans.js +++ b/services/web/frontend/js/main/plans.js @@ -2,7 +2,7 @@ camelcase, max-len */ -define(['base'], function(App) { +define(['../base'], function(App) { App.factory('MultiCurrencyPricing', function() { const currencyCode = window.recomendedCurrency diff --git a/services/web/frontend/js/main/post-gateway.js b/services/web/frontend/js/main/post-gateway.js index 3b95e27745..2cf1a8d347 100644 --- a/services/web/frontend/js/main/post-gateway.js +++ b/services/web/frontend/js/main/post-gateway.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../base'], App => App.controller('PostGatewayController', function($scope) { $scope.handleGateway = function() { const { params } = JSON.parse($('#gateway-data').text()) diff --git a/services/web/frontend/js/main/project-list/index.js b/services/web/frontend/js/main/project-list/index.js index 87ce0d9136..49ee59db8f 100644 --- a/services/web/frontend/js/main/project-list/index.js +++ b/services/web/frontend/js/main/project-list/index.js @@ -4,10 +4,10 @@ // TODO: This file was created by bulk-decaffeinate. // Fix any style issues and re-enable lint. define([ - 'main/project-list/project-list', - 'main/project-list/modal-controllers', - 'main/project-list/tag-controllers', - 'main/project-list/notifications-controller', - 'main/project-list/left-hand-menu-promo-controller', - 'services/queued-http' + './project-list', + './modal-controllers', + './tag-controllers', + './notifications-controller', + './left-hand-menu-promo-controller', + '../../services/queued-http' ], function() {}) diff --git a/services/web/frontend/js/main/project-list/left-hand-menu-promo-controller.js b/services/web/frontend/js/main/project-list/left-hand-menu-promo-controller.js index 9fa322819b..0bf8f82f3c 100644 --- a/services/web/frontend/js/main/project-list/left-hand-menu-promo-controller.js +++ b/services/web/frontend/js/main/project-list/left-hand-menu-promo-controller.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../base'], App => App.controller('LeftHandMenuPromoController', function( $scope, UserAffiliationsDataService, diff --git a/services/web/frontend/js/main/project-list/modal-controllers.js b/services/web/frontend/js/main/project-list/modal-controllers.js index 40186df928..337c959070 100644 --- a/services/web/frontend/js/main/project-list/modal-controllers.js +++ b/services/web/frontend/js/main/project-list/modal-controllers.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../../base'], function(App) { App.controller('RenameProjectModalController', function( $scope, $modalInstance, diff --git a/services/web/frontend/js/main/project-list/notifications-controller.js b/services/web/frontend/js/main/project-list/notifications-controller.js index 0dc117b3dd..83e3ac8d07 100644 --- a/services/web/frontend/js/main/project-list/notifications-controller.js +++ b/services/web/frontend/js/main/project-list/notifications-controller.js @@ -1,6 +1,6 @@ const ExposedSettings = window.ExposedSettings -define(['base'], function(App) { +define(['../../base'], function(App) { App.controller('NotificationsController', function($scope, $http) { for (let notification of $scope.notifications || []) { notification.hide = false diff --git a/services/web/frontend/js/main/project-list/project-list.js b/services/web/frontend/js/main/project-list/project-list.js index 8089da615a..40287a8a73 100644 --- a/services/web/frontend/js/main/project-list/project-list.js +++ b/services/web/frontend/js/main/project-list/project-list.js @@ -1,4 +1,4 @@ -define(['base', 'main/project-list/services/project-list'], function(App) { +define(['../../base', './services/project-list'], function(App) { App.controller('ProjectPageController', function( $scope, $modal, diff --git a/services/web/frontend/js/main/project-list/services/project-list.js b/services/web/frontend/js/main/project-list/services/project-list.js index c840d4a26a..7d6d834726 100644 --- a/services/web/frontend/js/main/project-list/services/project-list.js +++ b/services/web/frontend/js/main/project-list/services/project-list.js @@ -1,7 +1,7 @@ /* eslint-disable camelcase */ -define(['base'], App => +define(['../../../base'], App => App.service('ProjectListService', () => ({ getOwnerName(project) { if (project.accessLevel === 'owner') { diff --git a/services/web/frontend/js/main/project-list/tag-controllers.js b/services/web/frontend/js/main/project-list/tag-controllers.js index 4e666bd571..20e0922029 100644 --- a/services/web/frontend/js/main/project-list/tag-controllers.js +++ b/services/web/frontend/js/main/project-list/tag-controllers.js @@ -1,4 +1,7 @@ -define(['base', 'ide/colors/ColorManager'], function(App, ColorManager) { +define(['../../base', '../../ide/colors/ColorManager'], function( + App, + ColorManager +) { App.controller('TagListController', function($scope, $modal) { $scope.filterProjects = function(filter = 'all') { $scope._clearTags() diff --git a/services/web/frontend/js/main/register-users.js b/services/web/frontend/js/main/register-users.js index e50ca7881c..d268a7a650 100644 --- a/services/web/frontend/js/main/register-users.js +++ b/services/web/frontend/js/main/register-users.js @@ -11,7 +11,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('RegisterUsersController', function($scope, queuedHttp) { $scope.users = [] diff --git a/services/web/frontend/js/main/scribtex-popup.js b/services/web/frontend/js/main/scribtex-popup.js index 39c3793eb1..8d8b7aff75 100644 --- a/services/web/frontend/js/main/scribtex-popup.js +++ b/services/web/frontend/js/main/scribtex-popup.js @@ -8,7 +8,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('ScribtexPopupController', ($scope, $modal) => $modal.open({ templateUrl: 'scribtexModalTemplate' diff --git a/services/web/frontend/js/main/subscription-dashboard.js b/services/web/frontend/js/main/subscription-dashboard.js index 8997c93219..3b1bed2891 100644 --- a/services/web/frontend/js/main/subscription-dashboard.js +++ b/services/web/frontend/js/main/subscription-dashboard.js @@ -15,7 +15,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { const SUBSCRIPTION_URL = '/user/subscription/update' const ensureRecurlyIsSetup = _.once(() => { diff --git a/services/web/frontend/js/main/subscription/team-invite-controller.js b/services/web/frontend/js/main/subscription/team-invite-controller.js index ce609cc05b..27289c259c 100644 --- a/services/web/frontend/js/main/subscription/team-invite-controller.js +++ b/services/web/frontend/js/main/subscription/team-invite-controller.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../base'], App => App.controller('TeamInviteController', function($scope, $http) { $scope.inflight = false diff --git a/services/web/frontend/js/main/subscription/upgrade-subscription.js b/services/web/frontend/js/main/subscription/upgrade-subscription.js index ea2f261a7c..664dad7d82 100644 --- a/services/web/frontend/js/main/subscription/upgrade-subscription.js +++ b/services/web/frontend/js/main/subscription/upgrade-subscription.js @@ -1,4 +1,4 @@ -define(['base'], App => +define(['../../base'], App => App.controller('UpgradeSubscriptionController', function( $scope, eventTracking diff --git a/services/web/frontend/js/main/system-messages.js b/services/web/frontend/js/main/system-messages.js index 9007636485..2b80282042 100644 --- a/services/web/frontend/js/main/system-messages.js +++ b/services/web/frontend/js/main/system-messages.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { const MESSAGE_POLL_INTERVAL = 15 * 60 * 1000 // Controller for messages (array) App.controller('SystemMessagesController', ($http, $scope) => { diff --git a/services/web/frontend/js/main/token-access.js b/services/web/frontend/js/main/token-access.js index 9598c7609c..197e357597 100644 --- a/services/web/frontend/js/main/token-access.js +++ b/services/web/frontend/js/main/token-access.js @@ -1,4 +1,4 @@ -define(['base'], App => { +define(['../base'], App => { App.controller( 'TokenAccessPageController', ($scope, $http, $location, localStorage) => { diff --git a/services/web/frontend/js/main/translations.js b/services/web/frontend/js/main/translations.js index 5c83c787a5..089a60225e 100644 --- a/services/web/frontend/js/main/translations.js +++ b/services/web/frontend/js/main/translations.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.controller('TranslationsPopupController', function($scope, ipCookie) { $scope.hidei18nNotification = ipCookie('hidei18nNotification') diff --git a/services/web/frontend/js/main/user-membership.js b/services/web/frontend/js/main/user-membership.js index 70e0eef3b8..94518b0584 100644 --- a/services/web/frontend/js/main/user-membership.js +++ b/services/web/frontend/js/main/user-membership.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], function(App) { +define(['../base'], function(App) { App.controller('UserMembershipController', function($scope, queuedHttp) { $scope.users = window.users $scope.groupSize = window.groupSize diff --git a/services/web/frontend/js/services/algolia-search.js b/services/web/frontend/js/services/algolia-search.js index 2844761290..35c0d8fc4d 100644 --- a/services/web/frontend/js/services/algolia-search.js +++ b/services/web/frontend/js/services/algolia-search.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base', 'algoliasearch'], (App, AlgoliaSearch) => +define(['../base', 'algoliasearch'], (App, AlgoliaSearch) => App.factory('algoliaSearch', function() { let kbIdx, wikiIdx if ( diff --git a/services/web/frontend/js/services/queued-http.js b/services/web/frontend/js/services/queued-http.js index a03eef5142..562e14629f 100644 --- a/services/web/frontend/js/services/queued-http.js +++ b/services/web/frontend/js/services/queued-http.js @@ -12,7 +12,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.factory('queuedHttp', function($http, $q) { const pendingRequests = [] let inflight = false diff --git a/services/web/frontend/js/services/validateCaptcha.js b/services/web/frontend/js/services/validateCaptcha.js index 8b8a9d2a26..cc979f7612 100644 --- a/services/web/frontend/js/services/validateCaptcha.js +++ b/services/web/frontend/js/services/validateCaptcha.js @@ -8,7 +8,7 @@ * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns */ -define(['base'], App => +define(['../base'], App => App.factory('validateCaptcha', function() { let _recaptchaCallbacks = [] const onRecaptchaSubmit = function(token) { diff --git a/services/web/frontend/js/services/validateCaptchaV3.js b/services/web/frontend/js/services/validateCaptchaV3.js index 3917ef7726..2b6e1e921e 100644 --- a/services/web/frontend/js/services/validateCaptchaV3.js +++ b/services/web/frontend/js/services/validateCaptchaV3.js @@ -1,4 +1,4 @@ -define(['base'], function(App) { +define(['../base'], function(App) { return App.factory('validateCaptchaV3', function() { const grecaptcha = window.grecaptcha const ExposedSettings = window.ExposedSettings diff --git a/services/web/frontend/js/services/wait-for.js b/services/web/frontend/js/services/wait-for.js index 6656b8950b..34e3f12740 100644 --- a/services/web/frontend/js/services/wait-for.js +++ b/services/web/frontend/js/services/wait-for.js @@ -10,7 +10,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../base'], App => App.factory('waitFor', function($q) { const waitFor = function(testFunction, timeout, pollInterval) { if (pollInterval == null) { diff --git a/services/web/frontend/js/utils/underscore.js b/services/web/frontend/js/utils/underscore.js index c24ea40e9c..7f3e679274 100644 --- a/services/web/frontend/js/utils/underscore.js +++ b/services/web/frontend/js/utils/underscore.js @@ -8,5 +8,5 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['libraries'], () => +define(['../libraries'], () => angular.module('underscore', []).factory('_', () => window._)) diff --git a/services/web/modules/launchpad/frontend/js/main/controllers/LaunchpadController.js b/services/web/modules/launchpad/frontend/js/main/controllers/LaunchpadController.js index 1032bbb170..3c62f1543b 100644 --- a/services/web/modules/launchpad/frontend/js/main/controllers/LaunchpadController.js +++ b/services/web/modules/launchpad/frontend/js/main/controllers/LaunchpadController.js @@ -11,7 +11,7 @@ * DS207: Consider shorter variations of null checks * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['base'], App => +define(['../../../../../../frontend/js/base'], App => App.controller('LaunchpadController', function($scope, $http, $timeout) { $scope.adminUserExists = window.data.adminUserExists $scope.ideJsPath = window.data.ideJsPath diff --git a/services/web/test/frontend/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js b/services/web/test/frontend/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js index 20c3958794..8bb9211090 100644 --- a/services/web/test/frontend/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js +++ b/services/web/test/frontend/ide/editor/aceEditor/spell-check/SpellCheckManagerTests.js @@ -10,7 +10,7 @@ * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ define([ - 'ide/editor/directives/aceEditor/spell-check/SpellCheckManager' + '../../../../../../frontend/js/ide/editor/directives/aceEditor/spell-check/SpellCheckManager' ], SpellCheckManager => describe('SpellCheckManager', function() { beforeEach(function(done) { diff --git a/services/web/test/frontend/ide/history/HistoryV2ManagerTests.js b/services/web/test/frontend/ide/history/HistoryV2ManagerTests.js index 18cf0e36f1..21b4903b75 100644 --- a/services/web/test/frontend/ide/history/HistoryV2ManagerTests.js +++ b/services/web/test/frontend/ide/history/HistoryV2ManagerTests.js @@ -10,7 +10,9 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['ide/history/HistoryV2Manager'], HistoryV2Manager => +define([ + '../../../../frontend/js/ide/history/HistoryV2Manager' +], HistoryV2Manager => describe('HistoryV2Manager', function() { beforeEach(function(done) { this.defaultHistoryScope = { diff --git a/services/web/test/frontend/ide/history/util/displayNameForUserTests.js b/services/web/test/frontend/ide/history/util/displayNameForUserTests.js index 3d2a97baf1..8194a2222b 100644 --- a/services/web/test/frontend/ide/history/util/displayNameForUserTests.js +++ b/services/web/test/frontend/ide/history/util/displayNameForUserTests.js @@ -9,7 +9,9 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['ide/history/util/displayNameForUser'], displayNameForUser => +define([ + '../../../../../frontend/js/ide/history/util/displayNameForUser' +], displayNameForUser => describe('displayNameForUser', function() { beforeEach(function() { return (window.user = { id: 42 }) diff --git a/services/web/test/frontend/utils/EventEmitterTests.js b/services/web/test/frontend/utils/EventEmitterTests.js index 3307019b51..a72766c1ac 100644 --- a/services/web/test/frontend/utils/EventEmitterTests.js +++ b/services/web/test/frontend/utils/EventEmitterTests.js @@ -10,7 +10,7 @@ * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ -define(['utils/EventEmitter'], EventEmitter => +define(['../../../frontend/js/utils/EventEmitter'], EventEmitter => describe('EventEmitter', function() { beforeEach(function() { return (this.eventEmitter = new EventEmitter()) diff --git a/services/web/transform-absolute-paths.sh b/services/web/transform-absolute-paths.sh new file mode 100755 index 0000000000..068afe93b1 --- /dev/null +++ b/services/web/transform-absolute-paths.sh @@ -0,0 +1,37 @@ +npx jscodeshift \ + -t transform.js \ + --ignore-pattern=frontend/js/libraries.js \ + --ignore-pattern=frontend/js/vendor \ + frontend/js + +npx jscodeshift \ + -t transform.js \ + --ignore-pattern=test/frontend/import_tests.js \ + test/frontend + +for MODULE in admin-panel cms dropbox git-bridge github-sync launchpad metrics open-in-overleaf overleaf-integration portals references-search support templates tpr-webmodule v2-templates +do + npx jscodeshift \ + -t transform.js \ + modules/$MODULE/frontend/js +done + +npx jscodeshift \ + -t transform.js \ + --ignore-pattern=modules/rich-text/frontend/js/ide/controllers/editor_loader_controller.js \ + modules/rich-text/frontend/js + +npx jscodeshift \ + -t transform.js \ + modules/rich-text/test/frontend + +npx jscodeshift \ + -t transform.js \ + --ignore-pattern=modules/publish-modal/frontend/js/ide/controllers/PublishController.js \ + modules/publish-modal/frontend/js + +npx jscodeshift \ + -t transform.js \ + modules/publish-modal/test/frontend + +make format_fix \ No newline at end of file diff --git a/services/web/transform.js b/services/web/transform.js new file mode 100644 index 0000000000..4467ee3a3e --- /dev/null +++ b/services/web/transform.js @@ -0,0 +1,65 @@ +const path = require('path') + +const BASE_PATH = 'frontend/js/' + +function getRelativePath(importPath, filePath) { + // Ignore existing relative paths + if (importPath.startsWith('.')) { + return importPath + } + // Ignore npm deps (should be absolute) + if ( + importPath.startsWith('crypto-js') || + importPath.startsWith('moment') || + importPath.startsWith('algoliasearch') + ) { + return importPath + } + // Ignore aliased paths (handled specially by webpack) + if ( + importPath.startsWith('libs/') || + importPath.startsWith('ace/') || + importPath.startsWith('fineuploader') + ) { + return importPath + } + + const relativePath = path.relative(filePath, `${BASE_PATH}/${importPath}/`) + // Strip leading dots if importing at same level, because path.relative + // likes to use ../my-file.js instead of ./my-file.js + if (/^\.{2}\/\w/.test(relativePath)) { + return relativePath.substring(1) + } else { + return relativePath.substring(3) + } +} + +export default function(file, api) { + const j = api.jscodeshift + const filePath = file.path + + return j(file.source) + .find(j.CallExpression, { + callee: { name: 'define' } + }) + .replaceWith(node => { + const defineArgs = node.get('arguments', 0) + + const deps = defineArgs.get('elements') + + // Ignore files with no deps + if (!deps.value) { + return node.value + } + + const elems = deps.map(e => { + return j.literal(getRelativePath(e.node.value, filePath)) + }) + const newDeps = j.arrayExpression(elems) + + const callee = node.get('callee').value + const cb = node.get('arguments', 1).value + return j.callExpression(callee, [newDeps, cb]) + }) + .toSource() +} diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index c4e66a35ed..8ed1c0733a 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -210,12 +210,7 @@ module.exports = { __dirname, `frontend/js/vendor/libs/${PackageVersions.lib('fineuploader')}` ) - }, - // Define what can be imported with out an absolute or relative path. This - // is because we need to override the default (which is just node_modules) - // to get AMD modules in public/src to work as they do not use relative/ - // absolute paths for dependencies - modules: ['frontend/js', 'node_modules'] + } }, // Split out vendored dependencies that are shared between 2 or more "real