[wp-trac] [WordPress Trac] #45187: Dependencies from NPM packages do not have version passed when registered

WordPress Trac noreply at wordpress.org
Thu Nov 15 08:31:50 UTC 2018


#45187: Dependencies from NPM packages do not have version passed when registered
---------------------------+---------------------
 Reporter:  dimadin        |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.0
Component:  Script Loader  |     Version:  5.0
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+---------------------

Comment (by dd32):

 I've started to go down the rabbit-hole of adding individual versions to
 these, and although it's not that hard to pragmatically update these, I'm
 not entirely sure it's actually going to be needed.

 Currently `$wp_version` will be used as the version string, which for
 WordPress-sourced scripts is enough.
 External libraries (ie. not the `@wordpress/*` npm packages) could do with
 the version number to be standardised with the rest of the external
 libraries and It's also a great way to find out which version is actually
 committed to core at any given time.

 I've uploaded [attachment:45187.diff] which converts it to individual
 `$script->add()` calls with their versions, and a very rough proof-of-
 concept PHP which updates the `script-loader.php` versions with that from
 `package.json`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45187#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list