Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,11 @@ private void validatePackageMetadata(
throw new ErrorResultException("Extension version in extension.vsixmanifest and package.json does not match.");
}

if (!Strings.CI.equals(extVersion.getDisplayName(), packageMetadata.displayName())) {
throw new ErrorResultException("Display name in extension.vsixmanifest and package.json does not match.");
}
// Do not check if the displayName property is equal as it is not fully understood yet how VS Code / vsce processes
// that property. There are some projects, where the value is `%displayName%` and publication will fail.
// if (!Strings.CI.equals(extVersion.getDisplayName(), packageMetadata.displayName())) {
// throw new ErrorResultException("Display name in extension.vsixmanifest and package.json does not match.");
// }
}

private void validateLicense(ExtensionProcessor processor, ExtensionVersion extVersion) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,19 +275,6 @@ void shouldFailWhenPackageJsonDoesNotMatchManifest() throws IOException {
assertThatThrownBy(() -> handler.createExtensionVersion(processor, token, LocalDateTime.now(), false))
.isInstanceOf(ErrorResultException.class)
.hasMessageContaining("Extension version in extension.vsixmanifest");

when(processor.getPackageMetadata()).thenReturn(
new ExtensionProcessor.PackageMetadata(
"publisher",
"demo",
"2.0.0",
"Demo Not OK"
)
);

assertThatThrownBy(() -> handler.createExtensionVersion(processor, token, LocalDateTime.now(), false))
.isInstanceOf(ErrorResultException.class)
.hasMessageContaining("Display name in extension.vsixmanifest");
}
}

Expand Down
Loading