NPM Resource Changed PR-6.0-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
10 Aug 2025

Pull Request for Issue # .

Summary of Changes

This pull request (PR) moves the NPM dependency dotenv from the non-development dependencies to the development dependencies and updates it from version 16.6.1 to version 17.2.1.

Their change log doesn't show any b/c breaks except of the change of the quiet configuration parameter's default value from true to false.

This can be mitigated by using config({ quiet: true }), see here: https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md#1661-2025-06-27

The core uses dotenv in the build/build-modules-js/javascript/build-com_media-js.mjs script. The code is changed there as described above.

Besides that, dotenv is not used anywhere else in the core, and it is not shipped with installation or update packages.

Therefore it can be moved to the development dependencies. It was a mistake that it was in the non-development dependencies.

Testing Instructions

Pre-conditions: It needs a development environment, i.e. a git clone, composer and npm.

  1. On a clean, current 6.0-dev branch without this PR applied, run composer install if you haven't done this before.
  2. Run npm ci.
  3. Save files media/com_media/js/media-manager.js and media/com_media/js/media-manager.min.js at a safe place outside of the media folder for later comparison, e.g. in folder tmp/media-js-without-pr-no-dev.
  4. Run npm run build:com_media:dev.
  5. Save files media/com_media/js/media-manager.js and media/com_media/js/media-manager.min.js at a safe place outside of the media folder for later comparison, e.g. in folder tmp/media-js-without-pr-dev.
  6. Apply the changes from this PR.
  7. Repeat steps 2 to 5, but use different folder names to save the js files, e.g. tmp/media-js-with-pr-no-dev in step 3 and tmp/media-js-with-pr-dev in step 5.
  8. Compare the content of the saved unminified js files and the size of the saved minified js files.

Actual result BEFORE applying this Pull Request

The media manager js files can be built for production environment (= default) or for development environment.

The files for development environment contain additional debug functionality, and the .min.js file is not minified in development environment.

Expected result AFTER applying this Pull Request

Same as without the PR.

The unminified and minified js files created with this PR applied are the same as without this PR.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: To be done.

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 10 Aug 2025
Category JavaScript Repository NPM Change
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
Labels Added: NPM Resource Changed PR-6.0-dev
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67 richard67 - change - 10 Aug 2025
Title
[6.0] [WiP] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
[6.0] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
avatar richard67 richard67 - edited - 10 Aug 2025
avatar richard67
richard67 - comment - 10 Aug 2025

@dgrammatiko I would be happy if you could find the time to test this PR.

avatar dgrammatiko
dgrammatiko - comment - 10 Aug 2025

I can’t right now (in the middle of the sea) but worth mentioning that the package might not be required anymore https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs

avatar richard67
richard67 - comment - 10 Aug 2025

I can’t right now (in the middle of the sea) but worth mentioning that the package might not be required anymore https://nodejs.org/en/learn/command-line/how-to-read-environment-variables-from-nodejs

@dgrammatiko Not sure if we can do that in J6 or if it would be something for 7 as the dependency is not a dev dependency only, and so it might theoretically be used by extension devs. I have no idea if our b/c policy covers that. To play safe we could use this PR here for the upcoming beta 1 and see what else can be done with another PR.

avatar dgrammatiko
dgrammatiko - comment - 10 Aug 2025

It’s a dev dependency!

avatar richard67
richard67 - comment - 10 Aug 2025

It’s a dev dependency!

@dgrammatiko Not according to our package.json:
2025-08-10_pr-45879

avatar dgrammatiko
dgrammatiko - comment - 10 Aug 2025

It’s wrong that it’s in the dependencies, we don’t ship any of it’s code…

avatar richard67 richard67 - change - 11 Aug 2025
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2025-08-11 19:24:01
Closed_By richard67
Labels Added: Documentation Required
avatar richard67 richard67 - close - 11 Aug 2025
avatar richard67
richard67 - comment - 11 Aug 2025

I see. Will close this one and maybe find the time to make a PR to move or remove it if nobody is faster.

avatar brianteeman
brianteeman - comment - 11 Aug 2025

no need to close it you can just move the line to the dev section

avatar richard67
richard67 - comment - 11 Aug 2025

no need to close it you can just move the line to the dev section

@brianteeman Well, I might reopen it. I just don't have the time now to make that change and test it myself if it works, so I thought I close so people not waste time with testing. Changing to draft would have been an alternative.

avatar richard67
richard67 - comment - 11 Aug 2025

Re-opening but will change to draft.

avatar richard67 richard67 - change - 11 Aug 2025
Status Closed New
Closed_Date 2025-08-11 19:24:01
Closed_By richard67
avatar richard67 richard67 - change - 11 Aug 2025
Status New Pending
avatar richard67 richard67 - reopen - 11 Aug 2025
avatar richard67 richard67 - change - 11 Aug 2025
Title
[6.0] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
[6.0] [WiP] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
avatar richard67 richard67 - edited - 11 Aug 2025
avatar richard67 richard67 - change - 11 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 11 Aug 2025
avatar richard67 richard67 - change - 11 Aug 2025
The description was changed
avatar richard67 richard67 - edited - 11 Aug 2025
avatar richard67 richard67 - change - 11 Aug 2025
Labels Removed: Documentation Required
avatar richard67 richard67 - change - 11 Aug 2025
Title
[6.0] [WiP] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
[6.0] Update NPM dependency "dotenv" from 16.6.1 to 17.2.1.
avatar richard67 richard67 - edited - 11 Aug 2025
avatar richard67
richard67 - comment - 11 Aug 2025

Ok, I've made the change, PR description is updated, testing instructions don't change. Ready for testing.

avatar brianteeman brianteeman - test_item - 13 Aug 2025 - Tested successfully
avatar brianteeman
brianteeman - comment - 13 Aug 2025

I have tested this item ✅ successfully on b745962


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

Add a Comment

Login with GitHub to post a comment