Skip to content

Commit

Permalink
Sanitize version number for npm compatibility
Browse files Browse the repository at this point in the history
Ensure that plus signs in version numbers are replaced with dashes to prevent npm from altering the version format. This change is necessary to maintain consistency and avoid unexpected behavior when publishing packages to npm.

Contribute to NP-637
  • Loading branch information
jellespijker committed Dec 9, 2024
1 parent 659d18c commit 9d1d9be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def package_info(self):
if self.settings.os == "Emscripten":
package_json = {
"name": f"@ultimaker/{self.name.lower()}js",
"version": f"{self.version}",
"version": f"{str(self.version).replace('+', '-')}", # npm will otherwise 'sanitize' the version number
"description": f"JavaScript / TypeScript bindings for {self.name}, a {self.description}",
"main": "bin/CuraEngine.js",
"repository": {
Expand Down

0 comments on commit 9d1d9be

Please sign in to comment.