Skip to content

Commit c4d163a

Browse files
committed
Merge pull request #61 from wmde/timejs
Removed time.js legacy
2 parents 979ce1a + 84b37c8 commit c4d163a

22 files changed

+298
-2466
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ On [Packagist](https://packagist.org/packages/data-values/javascript):
2020
#### Breaking changes
2121
* Renamed `dataValues.UnUnserializableValue` to `dataValues.UnDeserializableValue`.
2222
* Changed constructor parameter order of `dataValues.UnDeserializableValue` (formerly `dataValues.UnUnserializableValue`).
23+
* Removed `time.js` legacy code, including `time.Time` and `time.Parser`. Every "vital" functionality has been ported to `dataValues.TimeValue` which now may be interacted with directly instead of having to retrieve the encapsulated `time.Time` object first.
24+
* Removed obsolete `valueParsers.TimeParser`. Back-end parser is to be used via API.
25+
* Removed obsolete `mw.ext.dataValues` module as it was just overwriting the obsolete `time.js` settings. Dependencies should be updated to point directly to the `dataValues.values` module.
2326

2427
#### Enhancements
2528
* Consolidated code structure, updated and added code documentation to allow generating a proper documentation using JSDuck.

config.js

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ this.config = ( function() {
1818
'util': 'lib/util',
1919

2020
'globeCoordinate': 'lib/globeCoordinate',
21-
'time': 'lib/time',
2221

2322
'dataValues': 'src',
2423
'values': 'src/values',
@@ -58,18 +57,6 @@ this.config = ( function() {
5857
deps: ['globeCoordinate/globeCoordinate']
5958
},
6059

61-
'time/time': {
62-
exports: 'time'
63-
},
64-
'time/time.Parser': {
65-
exports: 'time.Parser',
66-
deps: ['time/time']
67-
},
68-
'time/time.Time': {
69-
exports: 'time.Time',
70-
deps: ['time/time', 'jquery', 'time/time.Parser']
71-
},
72-
7360
'dataValues/dataValues': {
7461
exports: 'dataValues'
7562
},
@@ -105,8 +92,7 @@ this.config = ( function() {
10592
'dataValues/dataValues',
10693
'jquery',
10794
'dataValues/DataValue',
108-
'util/util.inherit',
109-
'time/time.Parser', 'time/time.Time'
95+
'util/util.inherit'
11096
],
11197
'values/QuantityValue': [
11298
'dataValues/dataValues', 'jquery', 'dataValues/DataValue', 'util/util.inherit'
@@ -177,14 +163,6 @@ this.config = ( function() {
177163
'parsers/ValueParser',
178164
'values/StringValue'
179165
],
180-
'parsers/TimeParser': [
181-
'valueParsers/valueParsers',
182-
'dataValues/dataValues',
183-
'util/util.inherit',
184-
'jquery',
185-
'parsers/ValueParser',
186-
'values/TimeValue'
187-
],
188166
'parsers/ValueParser': ['valueParsers/valueParsers', 'util/util.inherit', 'jquery'],
189167

190168
// TODO: These tests should not require any specific DataValue constructor but rather
@@ -226,14 +204,6 @@ this.config = ( function() {
226204
'tests/lib/globeCoordinate/globeCoordinate.Formatter.tests',
227205
'tests/lib/globeCoordinate/globeCoordinate.GlobeCoordinate.tests',
228206

229-
'tests/lib/time/time.Parser.tests',
230-
'tests/lib/time/time.Time.knowsPrecision.tests',
231-
'tests/lib/time/time.Time.maxPrecision.tests',
232-
'tests/lib/time/time.Time.minPrecision.tests',
233-
'tests/lib/time/time.Time.newFromIso8601.tests',
234-
'tests/lib/time/time.Time.tests',
235-
'tests/lib/time/time.Time.validate.tests',
236-
237207
'tests/src/dataValues.tests',
238208

239209
'tests/src/values/BoolValue.tests',
@@ -258,8 +228,7 @@ this.config = ( function() {
258228
'tests/src/valueParsers/ValueParserStore.tests',
259229

260230
'tests/src/valueParsers/parsers/NullParser.tests',
261-
'tests/src/valueParsers/parsers/StringParser.tests',
262-
'tests/src/valueParsers/parsers/TimeParser.tests'
231+
'tests/src/valueParsers/parsers/StringParser.tests'
263232
]
264233
};
265234

lib/resources.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@
3434
),
3535
),
3636

37-
'time.js' => $moduleTemplate + array(
38-
'scripts' => array(
39-
'time/time.js',
40-
'time/time.Time.js',
41-
'time/time.Parser.js',
42-
),
43-
),
44-
45-
'time.js.validTimeDefinitions' => $moduleTemplate + array(
46-
'scripts' => array(
47-
'../tests/lib/time/time.validTimeDefinitions.js',
48-
),
49-
'dependencies' => array(
50-
'time.js',
51-
),
52-
),
53-
5437
'util.inherit' => $moduleTemplate + array(
5538
'scripts' => array(
5639
'util/util.inherit.js',

0 commit comments

Comments
 (0)