Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.5.18 #628

Merged
merged 7 commits into from Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
@@ -1,6 +1,9 @@
language: node_js
node_js:
- 0.10
- "node"
- "8"
- "6"
- "4"
install:
- npm install
- npm install -g grunt-cli
Expand Down
23 changes: 15 additions & 8 deletions builds/moment-timezone-with-data-2012-2022.js
@@ -1,5 +1,5 @@
//! moment-timezone.js
//! version : 0.5.17
//! version : 0.5.18
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
Expand All @@ -8,11 +8,10 @@
"use strict";

/*global define*/
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof module === 'object' && module.exports) {
if (typeof module === 'object' && module.exports) {
module.exports = factory(require('moment')); // Node
} else {
} else if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD} else {
factory(root.moment); // Browser
}
}(this, function (moment) {
Expand All @@ -24,14 +23,18 @@
// return moment;
// }

var VERSION = "0.5.17",
var VERSION = "0.5.18",
zones = {},
links = {},
names = {},
guesses = {},
cachedGuess,
cachedGuess;

momentVersion = moment.version.split('.'),
if (!moment || typeof moment.version !== 'string') {
logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');
}

var momentVersion = moment.version.split('.'),
major = +momentVersion[0],
minor = +momentVersion[1];

Expand Down Expand Up @@ -393,6 +396,10 @@
}

function getZone (name, caller) {
if (typeof name !== 'string') {
throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');
}

name = normalizeName(name);

var zone = zones[name];
Expand Down
2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data-2012-2022.min.js

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions builds/moment-timezone-with-data.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion builds/moment-timezone-with-data.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion builds/moment-timezone.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions changelog.md
@@ -1,3 +1,8 @@
### `0.5.18` _2018-06-18_
* Return error when timezone name is not a string. #616
* Moved moment to peerDependencies #628
* Prefer nodejs to amd declaration #573

### `0.5.17` _2018-05-12_
* Updated data to IANA TZDB `2018d`. #616

Expand Down
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "moment/moment-timezone",
"description": "Parse and display dates in any timezone",
"version": "0.5.17",
"version": "0.5.18",
"keywords": [
"moment",
"date",
Expand Down
8 changes: 4 additions & 4 deletions moment-timezone-utils.js
@@ -1,5 +1,5 @@
//! moment-timezone-utils.js
//! version : 0.5.17
//! version : 0.5.18
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
Expand All @@ -8,10 +8,10 @@
"use strict";

/*global define*/
if (typeof define === 'function' && define.amd) {
if (typeof module === 'object' && module.exports) {
module.exports = factory(require('./')); // Node
} else if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof module === 'object' && module.exports) {
module.exports = factory(require('./')); // Node
} else {
factory(root.moment); // Browser
}
Expand Down
23 changes: 15 additions & 8 deletions moment-timezone.js
@@ -1,5 +1,5 @@
//! moment-timezone.js
//! version : 0.5.17
//! version : 0.5.18
//! Copyright (c) JS Foundation and other contributors
//! license : MIT
//! github.com/moment/moment-timezone
Expand All @@ -8,11 +8,10 @@
"use strict";

/*global define*/
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof module === 'object' && module.exports) {
if (typeof module === 'object' && module.exports) {
module.exports = factory(require('moment')); // Node
} else {
} else if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD} else {
factory(root.moment); // Browser
}
}(this, function (moment) {
Expand All @@ -24,14 +23,18 @@
// return moment;
// }

var VERSION = "0.5.17",
var VERSION = "0.5.18",
zones = {},
links = {},
names = {},
guesses = {},
cachedGuess,
cachedGuess;

momentVersion = moment.version.split('.'),
if (!moment || typeof moment.version !== 'string') {
logError('Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/');
}

var momentVersion = moment.version.split('.'),
major = +momentVersion[0],
minor = +momentVersion[1];

Expand Down Expand Up @@ -393,6 +396,10 @@
}

function getZone (name, caller) {
if (typeof name !== 'string') {
throw new Error('Time zone name must be a string, got ' + name + ' [' + typeof name + ']');
}

name = normalizeName(name);

var zone = zones[name];
Expand Down
13 changes: 8 additions & 5 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "moment-timezone",
"version": "0.5.17",
"version": "0.5.18",
"description": "Parse and display moments in any timezone.",
"homepage": "http://momentjs.com/timezone/",
"author": "Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)",
Expand All @@ -26,21 +26,24 @@
"url": "https://github.com/moment/moment-timezone/issues"
},
"license": "MIT",
"dependencies": {
"peerDependencies": {
"moment": ">= 2.9.0"
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt": "1.0.2",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-nodeunit": "^1.0.0",
"grunt-contrib-uglify": "^3.1.0"
"grunt-contrib-uglify": "^3.1.0",
"moment": ">= 2.9.0"
},
"jspm": {
"main": "builds/moment-timezone-with-data",
"shim": {
"moment-timezone": {
"deps": ["moment"]
"deps": [
"moment"
]
}
}
},
Expand Down