Skip to content

Commit

Permalink
chore: Only use cvdlName for license check (#14017)
Browse files Browse the repository at this point in the history
The fallback check is no longer needed as all components have been updated.

Related-to vaadin/web-components#3773

(cherry picked from commit f8030d5)
  • Loading branch information
Artur- authored and mshabarov committed Oct 10, 2022
1 parent 0a18e7f commit 957ab6c
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@ public static Product getProductIfCvdl(File nodeModules, String npmModule) {
if (packageJson.hasKey(CVDL_PACKAGE_KEY)) {
return new Product(packageJson.getString(CVDL_PACKAGE_KEY),
packageJson.getString("version"));
} else if (packageJson.hasKey("license")) {
String packageName = packageJson.getString("name");
String license = packageJson.getString("license");
if (packageName.startsWith("@vaadin/") && license
.startsWith("https://raw.githubusercontent.com")) {
// Free components have "Apache-2.0"
String cvdlName = packageName;
cvdlName = cvdlName.replace("@", "");
cvdlName = cvdlName.replace("/", "-");
cvdlName = cvdlName.replace("charts", "chart");
return new Product(cvdlName,
packageJson.getString("version"));
}
}
return null;
} catch (IOException e) {
Expand Down

0 comments on commit 957ab6c

Please sign in to comment.