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

Update javascript to current versions #424

Merged
merged 13 commits into from
Sep 24, 2024

Conversation

rkent
Copy link

@rkent rkent commented Sep 19, 2024

Fixes #422

As I discussed in #415, I'm considering changes to rosindex that would involve more javascript-driven data search and filtering. Prior to doing that, I want to update the existing javascript to current versions. Hence this PR. I did not squash the branch because it might be useful to see changes in smaller increments. However, some of the earlier commits are incomplete, so they should not be landed without the full branch.

There were a few minor changes to overcome regressions caused by the updates. However, the use of venn.js (and the related d3.js) required more extensive changes, as the previous version we were using was copied from a commit immediately prior to a major, breaking API change.

As part of this, I want to have a clear pattern for access and managing externally-written js files. To that end, the changes include:

  • a standardized way to reference js

There were many existing patterns within rosindex for this. I standardized on a variation of the method currently used for jquery. That is, original file is stored in js/package_name/package_name-x.x.x.js, link to file in html is js/package_name.js where that is an ln -s softlink to the versioned file in js/package_name. I also included a reference comment, written by me, at the top of downloaded files to show their source.

Also, by using a standard pattern like this for externally-written files, it is clearer the distinction between them and the locally-developed files.

As mentioned in #422, using symbolic links like this has its issues with updates. I included code to work around this looking forward, but if you build with this PR, and then try to rebuild with the existing ros2 branch, you will experience failures. The workaround is to delete _site prior to building.

  • licenses

The MIT license that is used by most of these files has the clause: "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." I located the licenses and included them to meet this requirement.

The changes in this PR (along with others) are incorporated into my development build at index.rosdabbler.com

Copy link
Member

@tfoote tfoote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've read through the sequence of commits as well as testing locally and I didn't see any issues. Thanks for pushing all of this forward!

@tfoote tfoote merged commit df61dad into ros-infrastructure:ros2 Sep 24, 2024
1 check passed
@rkent rkent deleted the pr-update-javascript branch September 25, 2024 04:08
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

Successfully merging this pull request may close these issues.

build fails when updating js symbolic links with Errno::EEXIST
2 participants