From 319061c92ae70b14422e4a003cd3956b390afa02 Mon Sep 17 00:00:00 2001 From: Thiemo Kreuz Date: Fri, 20 Nov 2020 08:46:57 +0100 Subject: [PATCH] =?UTF-8?q?Merge=20=E2=80=A6.Pointer=20ResourceLoader=20mo?= =?UTF-8?q?dule=20away?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's never used in another context but together with the ….Slider module. Motivated by the confusion about the two types of require() introduced in Idf1cc79. Bug: T233279 Change-Id: I7c98a41051e6d83ab3524cb14a709002feec2d78 --- extension.json | 18 ++++++------------ modules/ext.RevisionSlider.Pointer.js | 6 +----- modules/ext.RevisionSlider.Slider.js | 7 ++++++- modules/ext.RevisionSlider.SliderView.js | 2 +- tests/qunit/RevisionSlider.Pointer.test.js | 2 +- tests/qunit/RevisionSlider.PointerView.test.js | 2 +- 6 files changed, 16 insertions(+), 21 deletions(-) diff --git a/extension.json b/extension.json index 4e553fac..b237ce1c 100644 --- a/extension.json +++ b/extension.json @@ -42,7 +42,6 @@ "RevisionSlider.HelpDialog.test.js" ], "dependencies": [ - "ext.RevisionSlider.Pointer", "ext.RevisionSlider.Slider", "ext.RevisionSlider.RevisionList", "ext.RevisionSlider.HelpDialog", @@ -119,21 +118,17 @@ "mediawiki.cookie" ] }, - "ext.RevisionSlider.Pointer": { - "packageFiles": [ - "modules/ext.RevisionSlider.Pointer.js", - "modules/ext.RevisionSlider.PointerLine.js", - "modules/ext.RevisionSlider.PointerView.js" - ] - }, "ext.RevisionSlider.Slider": { "packageFiles": [ "modules/ext.RevisionSlider.Slider.js", "modules/ext.RevisionSlider.Api.js", "modules/ext.RevisionSlider.DiffPage.js", - "modules/ext.RevisionSlider.util.js", + "modules/ext.RevisionSlider.Pointer.js", + "modules/ext.RevisionSlider.PointerLine.js", + "modules/ext.RevisionSlider.PointerView.js", + "modules/ext.RevisionSlider.SliderArrowView.js", "modules/ext.RevisionSlider.SliderView.js", - "modules/ext.RevisionSlider.SliderArrowView.js" + "modules/ext.RevisionSlider.util.js" ], "dependencies": [ "jquery.ui", @@ -141,8 +136,7 @@ "mediawiki.util", "oojs-ui", "oojs-ui.styles.icons-movement", - "ext.RevisionSlider.HelpDialog", - "ext.RevisionSlider.Pointer" + "ext.RevisionSlider.HelpDialog" ], "messages": [ "revisionslider-arrow-tooltip-newer", diff --git a/modules/ext.RevisionSlider.Pointer.js b/modules/ext.RevisionSlider.Pointer.js index dcfa4edf..75a23d76 100644 --- a/modules/ext.RevisionSlider.Pointer.js +++ b/modules/ext.RevisionSlider.Pointer.js @@ -63,8 +63,4 @@ $.extend( Pointer.prototype, { } } ); -module.exports = { - Pointer: Pointer, - PointerLine: PointerLine, - PointerView: PointerView -}; +module.exports = Pointer; diff --git a/modules/ext.RevisionSlider.Slider.js b/modules/ext.RevisionSlider.Slider.js index 46804f6f..2784bf9d 100644 --- a/modules/ext.RevisionSlider.Slider.js +++ b/modules/ext.RevisionSlider.Slider.js @@ -127,5 +127,10 @@ module.exports = { DiffPage: require( './ext.RevisionSlider.DiffPage.js' ), Slider: Slider, SliderView: SliderView, - utils: require( './ext.RevisionSlider.util.js' ) + utils: require( './ext.RevisionSlider.util.js' ), + + private: { + Pointer: require( './ext.RevisionSlider.Pointer.js' ), + PointerView: require( './ext.RevisionSlider.PointerView.js' ) + } }; diff --git a/modules/ext.RevisionSlider.SliderView.js b/modules/ext.RevisionSlider.SliderView.js index e1a19747..7e0b901d 100644 --- a/modules/ext.RevisionSlider.SliderView.js +++ b/modules/ext.RevisionSlider.SliderView.js @@ -7,7 +7,7 @@ var DiffPage = require( './ext.RevisionSlider.DiffPage.js' ), HelpButtonView = require( 'ext.RevisionSlider.HelpDialog' ).HelpButtonView, makeRevisions = require( 'ext.RevisionSlider.RevisionList' ).makeRevisions, - Pointer = require( 'ext.RevisionSlider.Pointer' ).Pointer, + Pointer = require( './ext.RevisionSlider.Pointer.js' ), RevisionListView = require( 'ext.RevisionSlider.RevisionList' ).RevisionListView, RevisionSliderApi = require( './ext.RevisionSlider.Api.js' ), SliderArrowView = require( './ext.RevisionSlider.SliderArrowView.js' ), diff --git a/tests/qunit/RevisionSlider.Pointer.test.js b/tests/qunit/RevisionSlider.Pointer.test.js index f222a6a7..8c3a6b6f 100644 --- a/tests/qunit/RevisionSlider.Pointer.test.js +++ b/tests/qunit/RevisionSlider.Pointer.test.js @@ -1,4 +1,4 @@ -var Pointer = require( 'ext.RevisionSlider.Pointer' ).Pointer; +var Pointer = require( 'ext.RevisionSlider.Slider' ).private.Pointer; QUnit.module( 'ext.RevisionSlider.Pointer' ); diff --git a/tests/qunit/RevisionSlider.PointerView.test.js b/tests/qunit/RevisionSlider.PointerView.test.js index 7ce52a73..054be53b 100644 --- a/tests/qunit/RevisionSlider.PointerView.test.js +++ b/tests/qunit/RevisionSlider.PointerView.test.js @@ -1,4 +1,4 @@ -var PointerView = require( 'ext.RevisionSlider.Pointer' ).PointerView; +var PointerView = require( 'ext.RevisionSlider.Slider' ).private.PointerView; QUnit.module( 'ext.RevisionSlider.PointerView' );