? Pending

User tests: Successful: Unsuccessful:

avatar N6REJ
N6REJ
18 Feb 2020

Pull Request for Issue # .

Summary of Changes

Testing Instructions

run npm ci
you'll see package-lock.json is created for com_media
add patch
run npm ci
file is no longer created.

Expected result

doesn't create a new package-lock.json for com_media after each npm ci

Actual result

creates package-lock.json in com_media each time.

Documentation Changes Required

avatar N6REJ N6REJ - open - 18 Feb 2020
avatar N6REJ N6REJ - change - 18 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 Feb 2020
Category NPM Change
avatar N6REJ N6REJ - change - 18 Feb 2020
Title
changes npm to use the cache instead of clean install
[4.0] changes npm to use the cache instead of clean install
avatar N6REJ N6REJ - edited - 18 Feb 2020
avatar brianteeman
brianteeman - comment - 18 Feb 2020

This forces com media to be built using npm ci

avatar richard67
richard67 - comment - 19 Feb 2020

@N6REJ What Brian means is that npm ci is only available in npm version 6 or later but not yet in version 5, so you force peopel to have npm version 6 or later with this change.

avatar brianteeman
brianteeman - comment - 19 Feb 2020

No thats not what I mean. I meant exactly what I said

avatar C-Lodder
C-Lodder - comment - 19 Feb 2020

@richard67 It was added in npm 5.7.0 and the package.json dictates the user should be using this version: https://github.com/joomla/joomla-cms/blob/4.0-dev/package.json#L12

There's nothing wrong with this change, but you'll just need to make sure that dependency updates are done via npm i rather than npm ci, else the package-lock.json won't be updated.

Using ci will improve build times both locally and in the CI environment.

avatar richard67
richard67 - comment - 19 Feb 2020

@C-Lodder I see ... thanks.

P.S.: And sorry @brianteeman .

avatar richard67
richard67 - comment - 22 Feb 2020

There's nothing wrong with this change, but you'll just need to make sure that dependency updates are done via npm i rather than npm ci, else the package-lock.json won't be updated.

@brianteeman @C-Lodder Do you know if we have some developer docs which describe how to rebuild com_media and which would have to be updated with this change? If we don't have, do you think we should create some?

avatar C-Lodder
C-Lodder - comment - 22 Feb 2020

@richard67 the com_media build scripts should be merged with the cores ones. There's no reason to have them separate

avatar richard67
richard67 - comment - 22 Feb 2020

@richard67 the com_media build scripts should be merged with the cores ones. There's no reason to have them separate

@wilsonge Is this already on someone's task list? I don't think I am the right one to reorganise our build scripts ... am not deep enough into that.

avatar richard67
richard67 - comment - 22 Feb 2020

I have tested this item successfully on 3ff969c

Hint for other testers: Without the PR, file administrator/components/com_media/package-lock.json has not been re-created because there haven't been any changes in this file. So I have added an empty line to have a different checksum. Then I could reproduce that without this PR, the file is recreated, and with this PR it isn't.


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

avatar richard67 richard67 - test_item - 22 Feb 2020 - Tested successfully
avatar jwaisner
jwaisner - comment - 22 Feb 2020

I have tested this item successfully on 3ff969c


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

avatar jwaisner jwaisner - test_item - 22 Feb 2020 - Tested successfully
avatar jwaisner jwaisner - change - 22 Feb 2020
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 22 Feb 2020

RTC


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

avatar C-Lodder
C-Lodder - comment - 22 Feb 2020

@N6REJ Can you commit against this please? #28024

or I can do it myself, up to you.

avatar N6REJ
N6REJ - comment - 23 Feb 2020

how?

avatar richard67
richard67 - comment - 23 Feb 2020

@N6REJ Similar to making a PR for the CMS: Compare your branch for this PR with the target branch, but this is this time not the cms 4.0-dev branch but @C-Lodder 's branch for his PR. Then you can make PR.

To make it easier for you, here the link to the comparison of both branches: C-Lodder/joomla-cms@merge-config...N6REJ:npm.

Click the above link, check that it shows only the same changes as you do here with your PR and then use the green button to make a pull request. This will then make a PR in @C-Lodder 's repo. He can merge it and you can close this one here when you and him agree that his one will be used.

avatar N6REJ
N6REJ - comment - 23 Feb 2020

@C-Lodder @richard67 well, I did that but there is a conflict as he's completely changed the way it functions.
image

I guess there is no purpose in having mine at this point. Please advise.

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

@N6REJ I've just realised that npm ci is no longer required as it's doesn't cd to the com_media directory anymore. Users can manually run npm ci from their terminal iof they want to.

This PR can be closed.

avatar N6REJ N6REJ - change - 24 Feb 2020
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2020-02-24 14:26:48
Closed_By N6REJ
Labels Added: ?
avatar N6REJ N6REJ - close - 24 Feb 2020

Add a Comment

Login with GitHub to post a comment