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

Add notice on npmjs.com that the timeago is no longer a node-compatible wrapper #231

Closed
jslatts opened this issue Aug 27, 2015 · 5 comments

Comments

@jslatts
Copy link
Contributor

jslatts commented Aug 27, 2015

I was surprised to see that the timeago wrapper on npm I was using jumped from 0.2.X to 1.4.1 today when I went to update a project.

I have no problem with the official timeago module taking over the npmjs name, but you really need to put some sort of warning on npm to indicate what has happened. I was super confused when I couldn't find @ecto's wrapper. Luckily some googling led me to issue #197 and I figured out what happened.

It is especially important because without @ecto's wrapper, you can no longer require() and use it server side. Not sure if @ecto is going to re-publish the wrapper, but a link to that version (if published) would be helpful for those of us using it in node.

@rmm5t
Copy link
Owner

rmm5t commented Aug 27, 2015

A PR is welcome here to remedy.

@jslatts
Copy link
Contributor Author

jslatts commented Aug 28, 2015

To clarify for anyone else reading this, a PR should address making the module CommonJS compatible (http://blog.npmjs.org/post/112712169830/making-your-jquery-plugin-work-better-with-npm).

Not sure if/when I'll have time to do this. I have an acceptable work around in place for my current project at the moment.

@jslatts
Copy link
Contributor Author

jslatts commented Aug 28, 2015

Turns out I needed to load timeago via browserify for use on our front-end, so I went ahead and did the CommonJS change. This will let you load it correctly as part of a browserify or webpack build.

See PR #233.

You still cannot use timeago on the server due to a dependency on jquery.extend. One option would be to use a node module (underscore/lodash) for the extend call when loading server-side. Or just due the object merge manually since it just happens once.

@rmm5t
Copy link
Owner

rmm5t commented Aug 28, 2015

@jslatts Please close this issue out once you confirm all is well for you with (or you're happy with) the new v1.4.2 release.

@jslatts
Copy link
Contributor Author

jslatts commented Aug 28, 2015

Updated to 1.4.2. Works great. Thanks for the quick publish.

@jslatts jslatts closed this as completed Aug 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants