Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version of jquery in dependencies is malformed? #2204

Closed
SpecialK118 opened this issue Dec 13, 2023 · 2 comments
Closed

Version of jquery in dependencies is malformed? #2204

SpecialK118 opened this issue Dec 13, 2023 · 2 comments

Comments

@SpecialK118
Copy link

SpecialK118 commented Dec 13, 2023

It looks like the dependent version of jquery is malformed in the jquery-ui/package.json file

"dependencies": {
	"jquery": ">=1.8.0 <4.0.0"
},

the python package semantic_version (last version - 2.10.0) is unable to parse it and throws the following error:

File ".../semantic_version-2.10.0-py3.8.egg/semantic_version/base.py", line 1225, in __init__
  super(LegacySpec, self).__init__(expression)
File ".../semantic_version-2.10.0-py3.8.egg/semantic_version/base.py", line 647, in __init__
  self.clause = self._parse_to_clause(expression)
File ".../semantic_version-2.10.0-py3.8.egg/semantic_version/base.py", line 1043, in _parse_to_clause
  return cls.Parser.parse(expression)
File ".../semantic_version-2.10.0-py3.8.egg/semantic_version/base.py", line 1063, in parse
  raise ValueError("Invalid simple block %r" % block)
 ValueError: Invalid simple block '>=1.8.0<4.0.0'

There are multiple tickets for this in semantic_version package, in which the maintainer claims this is not a valid NPM notation:
rbarrois/python-semanticversion#99
rbarrois/python-semanticversion#127

Could it possibly need to be ">=1.8.0, <4.0.0"?

@dmethvin
Copy link
Member

dmethvin commented Dec 13, 2023

It seems okay based on the description at https://github.com/npm/node-semver?tab=readme-ov-file#ranges

Comparators can be joined by whitespace to form a comparator set, which is satisfied by the intersection of all of the comparators it includes.

If there is a less ambiguous or more authoritative BNF grammar for this, I wasn't able to find it in 30 seconds of searching.

@mgol
Copy link
Member

mgol commented Dec 18, 2023

The form used in our package.json is actually a normalized form that packages like semver use as a base, converting all the other forms to this one internally.

If you parse this field, make sure to use a tool that understands the semver standard.

@mgol mgol closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants