MadMG / moment-jdateformatparser

Translates the `java.text.SimpleDateFormat` date format to the `moment.js` date format.
MIT License
58 stars 29 forks source link

After 1.2.0 update getting TypeError: moment(...).formatWithJDF is not a function breaking builds #28

Closed marcusmotill closed 6 years ago

marcusmotill commented 6 years ago

repl: https://repl.it/@marcusmotill/moment-jdateformatparser-bug

code:

let moment = require('moment');
let momentJdateformatparser = require('moment-jdateformatparser');

console.log(moment().formatWithJDF("dd.MM.yyyy"))

output:

+ moment@2.22.2
+ moment-jdateformatparser@1.2.0
added 3 packages in 1.998s

Repl.it: package installation success

TypeError: moment(...).formatWithJDF is not a function
    at evalmachine.<anonymous>:4:22
    at Script.runInContext (vm.js:74:29)
    at Object.runInContext (vm.js:182:6)
    at evaluate (/run_dir/repl.js:137:14)
    at Socket.<anonymous> (/run_dir/repl.js:120:5)
    at Socket.emit (events.js:180:13)
    at addChunk (_stream_readable.js:274:12)
    at readableAddChunk (_stream_readable.js:261:11)
    at Socket.Readable.push (_stream_readable.js:218:10)
    at Pipe.onread (net.js:581:20)
marcusmotill commented 6 years ago

I think this is due to the breaking change here: https://github.com/MadMG/moment-jdateformatparser/pull/27/files#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R37

Lets review semantic versioning shall we: https://docs.npmjs.com/getting-started/semantic-versioning

herom commented 6 years ago

Thanks a lot for bringing this issue to our attention - we'll take a look into this! 👍

...on the other side, the last sentence is not what I'd expect in such a context, as we all here are doing these things in our sparetime/at home, so I don't think that anybody "has the right" to be somewhat rude and condescending... at least, that's what I read from it. Do you really think this was needed?