"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java" between
vaadin-flow-4.0.7.tar.gz and vaadin-flow-4.0.8.tar.gz

About: Vaadin flow is a Java framework binding Vaadin 17 web components to Java.

TaskRunNpmInstall.java  (vaadin-flow-4.0.7):TaskRunNpmInstall.java  (vaadin-flow-4.0.8)
skipping to change at line 232 skipping to change at line 232
Json.parse(IOUtils.toString(platformVersions, Json.parse(IOUtils.toString(platformVersions,
StandardCharsets.UTF_8))); StandardCharsets.UTF_8)));
versionsJson = convert.getConvertedJson(); versionsJson = convert.getConvertedJson();
versionsJson = new VersionsJsonFilter( versionsJson = new VersionsJsonFilter(
packageUpdater.getPackageJson(), NodeUpdater.DEPENDENCIES) packageUpdater.getPackageJson(), NodeUpdater.DEPENDENCIES)
.getFilteredVersions(versionsJson); .getFilteredVersions(versionsJson);
} }
String genDevDependenciesPath = getDevDependenciesFilePath(); String genDevDependenciesPath = getDevDependenciesFilePath();
if (genDevDependenciesPath == null) { if (genDevDependenciesPath == null) {
packageUpdater.log().error( // #9345 - locking dev dependencies doesn't work for now
packageUpdater.log().debug(
"Couldn't find dev dependencies file path from proeprties fi le. " "Couldn't find dev dependencies file path from proeprties fi le. "
+ "Dev dependencies won't be locked"); + "Dev dependencies won't be locked");
return versionsJson; return versionsJson;
} }
JsonObject devDeps = readGeneratedDevDependencies( JsonObject devDeps = readGeneratedDevDependencies(
genDevDependenciesPath); genDevDependenciesPath);
if (devDeps == null) { if (devDeps == null) {
return versionsJson; return versionsJson;
} }
devDeps = new VersionsJsonFilter(packageUpdater.getPackageJson(), devDeps = new VersionsJsonFilter(packageUpdater.getPackageJson(),
skipping to change at line 257 skipping to change at line 258
for (String key : versionsJson.keys()) { for (String key : versionsJson.keys()) {
devDeps.put(key, versionsJson.getString(key)); devDeps.put(key, versionsJson.getString(key));
} }
return devDeps; return devDeps;
} }
private JsonObject readGeneratedDevDependencies(String path) private JsonObject readGeneratedDevDependencies(String path)
throws IOException { throws IOException {
URL resource = classFinder.getResource(path); URL resource = classFinder.getResource(path);
if (resource == null) { if (resource == null) {
packageUpdater.log().warn("Couldn't find dev dependencies file. " // #9345 - locking dev dependencies doesn't work for now
packageUpdater.log().debug("Couldn't find dev dependencies file. "
+ "Dev dependencies won't be locked"); + "Dev dependencies won't be locked");
return null; return null;
} }
try (InputStream content = resource.openStream()) { try (InputStream content = resource.openStream()) {
return Json return Json
.parse(IOUtils.toString(content, StandardCharsets.UTF_8)); .parse(IOUtils.toString(content, StandardCharsets.UTF_8));
} }
} }
private boolean shouldRunNpmInstall() { private boolean shouldRunNpmInstall() {
 End of changes. 2 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)