Commit 27983a7f authored by Andreas Fernandez's avatar Andreas Fernandez Committed by Anja Leichsenring
Browse files

[BUGFIX] Improve usage of 3rd party modules in TypeScript context

This changes the configuration of the TypeScript compiler to resolve
modules in "node" style, which allows using TypeScript declaration files
(*.d.ts) shipped with npm packages.

Additionally the option "esModuleInterop" is enabled which allows us to
use CommonJS modules in AMD modules without fiddling with incompatible
exports.

As a negative side-effect, all JavaScript have to get recompiled to
reflect these changes.

Resolves: #91954
Releases: master, 10.4
Change-Id: If6386f5062bfbe439615bb947e94cd728dfd5b2b
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/65225

Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent c64beea3
......@@ -16,7 +16,7 @@ import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import {SeverityEnum} from './Enum/Severity';
import MessageInterface from './AjaxDataHandler/MessageInterface';
import ResponseInterface from './AjaxDataHandler/ResponseInterface';
import * as $ from 'jquery';
import $ from 'jquery';
import Icons = require('./Icons');
import Modal = require('./Modal');
import Notification = require('./Notification');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import 'TYPO3/CMS/Core/Contrib/jquery.minicolors';
/**
......
......@@ -12,7 +12,7 @@
*/
import 'bootstrap';
import * as $ from 'jquery';
import $ from 'jquery';
import {AjaxResponse} from 'TYPO3/CMS/Core/Ajax/AjaxResponse';
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import Popover = require('./Popover');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import {AjaxResponse} from 'TYPO3/CMS/Core/Ajax/AjaxResponse';
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import ContextMenuActions = require('./ContextMenuActions');
......
......@@ -13,7 +13,7 @@
import {AjaxResponse} from 'TYPO3/CMS/Core/Ajax/AjaxResponse';
import {SeverityEnum} from './Enum/Severity';
import * as $ from 'jquery';
import $ from 'jquery';
import AjaxDataHandler = require('./AjaxDataHandler');
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import InfoWindow = require('./InfoWindow');
......
......@@ -11,8 +11,8 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import moment = require('moment');
import $ from 'jquery';
import moment from 'moment';
import PersistentStorage = require('./Storage/Persistent');
/**
......@@ -66,7 +66,7 @@ class DateTimePicker {
if (userLocale === 'ch') {
userLocale = 'zh-cn';
}
const setLocale = userLocale ? moment.locale(userLocale) : false;
const setLocale = userLocale ? moment.locale(userLocale) : '';
// initialize the datepicker on each selected element
$dateTimeFields.each((index: number, element: HTMLElement): void => {
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
/**
* Module: TYPO3/CMS/Backend/DebugConsole
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import DebounceEvent = require('TYPO3/CMS/Core/Event/DebounceEvent');
import ThrottleEvent = require('TYPO3/CMS/Core/Event/ThrottleEvent');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import Icons = require('./Icons');
class DocumentSaveActions {
......
......@@ -11,11 +11,11 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import moment from 'moment';
import {AjaxResponse} from 'TYPO3/CMS/Core/Ajax/AjaxResponse';
import {SeverityEnum} from './Enum/Severity';
import {MessageUtility} from './Utility/MessageUtility';
import moment = require('moment');
import NProgress = require('nprogress');
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import Modal = require('./Modal');
......@@ -359,7 +359,7 @@ class DragUploaderPlugin {
),
$('<td />').html(
this.askForOverride[i].original.name + ' (' + (DragUploader.fileSizeAsString(this.askForOverride[i].original.size)) + ')' +
'<br>' + moment.unix(this.askForOverride[i].original.mtime).format('YYYY-MM-DD HH:mm'),
'<br>' + moment(this.askForOverride[i].original.mtime).format('YYYY-MM-DD HH:mm'),
),
$('<td />').html(
this.askForOverride[i].uploaded.name + ' (' + (DragUploader.fileSizeAsString(this.askForOverride[i].uploaded.size)) + ')' +
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import Consumable = require('./Consumable');
import InteractionRequest = require('./InteractionRequest');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
import {MessageUtility} from '../../Utility/MessageUtility';
import {AjaxDispatcher} from './../InlineRelation/AjaxDispatcher';
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import FormEngine = require('TYPO3/CMS/Backend/FormEngine');
import FormEngineValidation = require('TYPO3/CMS/Backend/FormEngineValidation');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
enum Selectors {
fieldContainerSelector = '.t3js-formengine-field-group',
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import FormEngine = require('TYPO3/CMS/Backend/FormEngine');
class InputDateTimeElement {
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
enum Selectors {
toggleSelector = '.t3js-form-field-inputlink-explanation-toggle',
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import FormEngine = require('TYPO3/CMS/Backend/FormEngine');
enum Identifier {
......
......@@ -12,7 +12,7 @@
*/
import {AbstractSortableSelectItems} from './AbstractSortableSelectItems';
import * as $ from 'jquery';
import $ from 'jquery';
import FormEngine = require('TYPO3/CMS/Backend/FormEngine');
import SelectBoxFilter = require('./Extra/SelectBoxFilter');
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
interface SelectSingleElementOptions {
[key: string]: any;
......
......@@ -11,7 +11,7 @@
* The TYPO3 project - inspiring people to share!
*/
import * as $ from 'jquery';
import $ from 'jquery';
import {AjaxResponse} from 'TYPO3/CMS/Core/Ajax/AjaxResponse';
import AjaxRequest = require('TYPO3/CMS/Core/Ajax/AjaxRequest');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment