HackMyResume icon indicating copy to clipboard operation
HackMyResume copied to clipboard

Avoid Moment.js deprecation warning

Open hacksalot opened this issue 8 years ago • 3 comments

Adjust code paths to avoid triggering the Moment.js deprecation warning cited here.

Hat tip @EpicNuts.

hacksalot avatar Mar 01 '16 13:03 hacksalot

@hacksalot I'm getting the deprecation error but I'm not sure what you mean by adjusting the code paths?

dave@Dave-MacBookAir:~/Downloads$ hackmyresume build "resume (3).json" to katie.html

*** HackMyResume v1.8.0 ***
Reading JRS resume: resume (3).json
Converting resume (3).json to FRESH format.
Applying MODERN theme (8 formats)
Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.
Arguments: [object Object]
Error
    at Function.createFromInputFallback (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:244:105)
    at configFromString (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1057:32)
    at configFromInput (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1560:13)
    at prepareConfig (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1543:13)
    at createFromConfig (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1510:44)
    at createLocalOrUTC (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1592:16)
    at local__createLocal (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:1596:16)
    at utils_hooks__hooks (/usr/local/lib/node_modules/hackmyresume/node_modules/moment/moment.js:16:29)
    at FluentDate.fmt (/usr/local/lib/node_modules/hackmyresume/dist/core/fluent-date.js:83:14)
    at /usr/local/lib/node_modules/hackmyresume/dist/core/fresh-resume.js:490:29

DaveTacker avatar Apr 04 '16 05:04 DaveTacker

Hi @kneeki what date format are you using in your .json? Anything unusual?

hacksalot avatar Apr 04 '16 18:04 hacksalot

My plan was just to use the year. "2015" for example.

On Mon, Apr 4, 2016, 11:09 AM hacksalot [email protected] wrote:

Hi @kneeki https://github.com/kneeki what date format are you using in your .json? Anything unusual?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/hacksalot/HackMyResume/issues/149#issuecomment-205425699

Sent from my iPhone. Forgive the brevity, the typos and the lack of nuance.

DaveTacker avatar Apr 05 '16 04:04 DaveTacker