Lighthouse-io / react-visjs-timeline

React component for the vis.js timeline module
MIT License
210 stars 91 forks source link

v1.6.0 published on npm, but git repo shows v1.5.0 last year #91

Open stahlmanDesign opened 5 years ago

stahlmanDesign commented 5 years ago

This is the first time I've ever seen a new npm version without the changes being reflected in the git repo. Does the npm url link to the wrong git repo? I want to review the changelog before updating.

npm (v1.6.0 updated 4 sept 2019): https://www.npmjs.com/package/react-visjs-timeline

Git repo (v1.5.0 updated "last year"): https://github.com/Lighthouse-io/react-visjs-timeline

ackwell commented 5 years ago

Looks like it's an update from depending on vis, to depending on vis-timeline - to coincide with the main vis package's EOL.

diff of the built index file from npm:

$ diff -u 1.5/node_modules/react-visjs-timeline/build/index.js 1.6/node_modules/react-visjs-timeline/build/index.js
--- 1.5/node_modules/react-visjs-timeline/build/index.js    2019-07-26 10:46:55.000000000 +1000
+++ 1.6/node_modules/react-visjs-timeline/build/index.js    2019-09-13 17:37:04.000000000 +1000
@@ -6,11 +6,11 @@

 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

-var _visTimelineGraph2d = require('vis/dist/vis-timeline-graph2d.min');
+require('vis-timeline/dist/vis-timeline-graph2d.min.css');

-var _visTimelineGraph2d2 = _interopRequireDefault(_visTimelineGraph2d);
+var _visTimelineGraph2d = require('vis-timeline/dist/vis-timeline-graph2d.min');

-require('vis/dist/vis-timeline-graph2d.min.css');
+var _visTimelineGraph2d2 = _interopRequireDefault(_visTimelineGraph2d);

 var _react = require('react');

which coincides with the new peer dependency warning for vis-timeline.

I'm going to guess the build was uploaded from the branch for PR #90 - not sure why it wasn't merged yet.

stahlmanDesign commented 5 years ago

I decided to upgrade to v1.6.0 and it shows and error:

./node_modules/react-visjs-timeline/build/index.js Module not found: Can't resolve 'vis-timeline/dist/vis-timeline-graph2d.min' in…

It's not clear what else needs to be updated or if vis-timeline should now be a peer dependency or something. EDIT, I just read your message that vis-timeline needs to be a peer dependency. I added vis-timeline to my package.json and removed vis. It works. Thank you.