Newer versions of JS libraries?

Is there a way to do this on a project-by-project basis rather than having to update Products.CMFPlone, mockups or staticresources..?

I'm going to have a look at updating the packages, but for the moment I need a quick solution to updating the libraries. Is there a way to maybe, disable the entire bundle and add jQuery and requireJS in statically for now, within the project..?

@Netroxen yes, that should be possible.
For Plone 5.1 the resource registrations are done here: Products.CMFPlone/Products/CMFPlone/profiles/dependencies/registry.xml at 5.1.x · plone/Products.CMFPlone · GitHub
You can change the path to jQuery and provide your own version. Likewise with any other registered resource.
Then you need to change the path to the bundles, recompile them and ship them with your integration/addon product.

You can also go to @@resourceregistry-controlpanel in the Plone admin interface and do most of these stept through-the-web.

2 Likes

I like, totally forgot you could override the resource path, damn! Going to give that a go and report back, thanks for the quick responses @thet!

I made a PR to upgrade jQuery to latest in 1.x series. All tests pass and basic manual navigation, including modals, do not reveal any errors. It should be tested more intensively before releasing into 5.2.

  1. Use mr.developer to checkout upgrade_jquery branch of src/mockup development package.
  2. Start up instance and Enable JavaScript in Development Mode for plone-base bundle.
  3. Navigate around more advanced UI

@thet, why do we use releases from Github in our package.json? Is this a leftover requirement from Bower times? If it makes sense I'd like to make a PR to move all possible dependencies to equivalent Npm registry hosted releases.

This will also make it much faster to run yarn upgrade since it won't need to clone all repos at every run and instead just compare versions numbers and hashes.

@davilima6 exactly, it's a leftover from Bower times. Changing it probably involves changing paths too, so this was the least-effort method to migrate over to npm.
I'd love to review a npm package based PR.

1 Like