fix: bump npm infrastructure dependencies and make sure changing serve.js content is applied #2542
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
In #2462 we introduced the support for using the same
node-modules
-dir for multiple spotless steps requiring the same dependencies. To achieve this, the serve.js files were updated to accept a UUID when starting a npm-based server so that the java side knows which server-process (which port) it may use.This created a problem we did not foresee: If a user has a running spotless installation before this change, then updates to the version containing this change, it leads to a problematic situation: the existing
node-modules
-dir (created by the previous spotless version and thus containing the old serve.js files without the UUID-change) would prevent the new spotless version from using the newserve.js
files (containing the UUID-change) because the md5 hash used in thenode-modules
-dir's name did only respect the package.json content, not theserve.js
content.This PR changes this, so that the content of the
package.json
as well as the content of theserve.js
files is respected in order to calculate a md5 hash for naming thenode-modules
-dir. So if any of these files change, a newnode-modules
-dir is used.This PR also bumps the dependencies used behind the scenes for creating and managing the npm server process.