NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar C-Lodder
C-Lodder
22 Feb 2020

Pull Request for Issue # .

Summary of Changes

com_media has it's own package.json and build scripts. This PR merges them into core. They're now in a single location without any version mismatches.

Some of the dependencies needs to be bumped up

Testing Instructions

  1. Run npm i and ensure there are no errors
  2. Look at the Media Manager in the backend. Ensure there are no console errors and the page displays properly.
avatar C-Lodder C-Lodder - open - 22 Feb 2020
avatar C-Lodder C-Lodder - change - 22 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2020
Category Administration com_media NPM Change JavaScript
avatar dgrammatiko
dgrammatiko - comment - 22 Feb 2020

@wilsonge this is a good starting point, merge it

avatar brianteeman
brianteeman - comment - 23 Feb 2020

26% building 135/136 modules 1 active ...joomla-cms\node_modules\sass-loader\lib\loader.js!C:\htdocs\joomla-cms\administrator\components\com_media\resources\styles\mediamanager.scss (node:50588) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.

Did not get this message before

Seems to work ok though as its just a warning

avatar C-Lodder
C-Lodder - comment - 23 Feb 2020

@brianteeman dependencies need updating.

avatar brianteeman
brianteeman - comment - 23 Feb 2020

I ran npm update and then npm i again - same issue

or did I misunderstand

avatar C-Lodder
C-Lodder - comment - 23 Feb 2020

No sorry. I mean the dependencies need a proper update in the package.json. I've updated the bare minimum to get this merge working.

avatar C-Lodder C-Lodder - change - 24 Feb 2020
Labels Added: NPM Resource Changed ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Feb 2020
Category Administration com_media NPM Change JavaScript Administration com_media NPM Change JavaScript Repository
avatar C-Lodder
C-Lodder - comment - 24 Feb 2020

@wilsonge development mode added in. Remove Terser plugin as webpack has it's own minification process without the need for plugins.

avatar wilsonge
wilsonge - comment - 24 Feb 2020

You added Terser mate. https://github.com/joomla/joomla-cms/pull/28024/files#diff-11e9f7f953edc64ba14b0cc350ae7b9dL73 we were using the built in webpack uglify to minimize before your change

avatar C-Lodder
C-Lodder - comment - 24 Feb 2020

@wilsonge I know I added it. Was just specifying that I've removed it completely. Wepack minifies files differently now. It doesn't use Uglify. The script is now using webpack 4, not 3

Please just run the two tasks:

$ npm run dev:com_media
$ npm run build:com_media

and you'll see the difference in the generated files.

avatar C-Lodder
C-Lodder - comment - 24 Feb 2020

FYI this also fixes the ability to run npm i on Node 13.x
With the current separation, node-sass 4.12.x won't work on NodeJS 12.x

avatar wilsonge
wilsonge - comment - 24 Feb 2020

C-Lodder#7 merge this and we're good to go i think. Still not quite happy with the quality of the builds (i think babel-loader is minifying each file??) but the webpack itself is/isn't minified correctly in dev/prod builds. But that part can be improved later

avatar C-Lodder
C-Lodder - comment - 24 Feb 2020

Will merge once you've confirmed you've tested both build scripts

avatar C-Lodder
C-Lodder - comment - 26 Feb 2020

@wilsonge It has been merged already

avatar infograf768
infograf768 - comment - 27 Feb 2020

I have tested this item successfully on b3d2f38

Media loads OK, no console error.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/28024.

avatar infograf768 infograf768 - test_item - 27 Feb 2020 - Tested successfully
avatar HLeithner HLeithner - change - 27 Feb 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-02-27 09:29:35
Closed_By HLeithner
avatar HLeithner HLeithner - close - 27 Feb 2020
avatar HLeithner HLeithner - merge - 27 Feb 2020
avatar HLeithner
HLeithner - comment - 27 Feb 2020

Thanks

Add a Comment

Login with GitHub to post a comment