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

NPM automation #36

Merged
merged 5 commits into from
Dec 16, 2022
Merged

NPM automation #36

merged 5 commits into from
Dec 16, 2022

Conversation

anartify
Copy link
Contributor

@anartify anartify commented Dec 6, 2022

Python script npm.py to fetch release details of a given package.

@anartify anartify mentioned this pull request Dec 6, 2022
src/npm.py Outdated Show resolved Hide resolved
src/npm.py Outdated Show resolved Hide resolved
src/npm.py Outdated Show resolved Hide resolved
src/npm.py Outdated Show resolved Hide resolved
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
@captn3m0
Copy link
Member

captn3m0 commented Dec 7, 2022

@anartify Could you also file the corresponding PR to endoflife repository, with the change to vue.md please? https://github.com/endoflife-date/endoflife.date

Link it here, so we can merge both together.

@marcwrobel
Copy link
Member

@captn3m0, endoflife-date/endoflife.date#1984 came with the following configuration:

auto:
-   npm: https://www.npmjs.com/package/generator-jhipster

Is it enough to merge this PR if everything is OK ? Or should be wait for vue.md too ?

@marcwrobel
Copy link
Member

marcwrobel commented Dec 15, 2022

Just tried with jhipster, got :

$ python3 src/npm.py 
::group::jhipster
Traceback (most recent call last):
  File "/home/mwrobel/projects/release-data/src/npm.py", line 73, in <module>
    update_releases()
  File "/home/mwrobel/projects/release-data/src/npm.py", line 56, in update_releases
    update_product(product_name, config)
  File "/home/mwrobel/projects/release-data/src/npm.py", line 63, in update_product
    r = fetch_releases(config["npm"], config["regex"])
  File "/home/mwrobel/projects/release-data/src/npm.py", line 25, in fetch_releases
    with urllib.request.urlopen(url, data=None, timeout=5) as response:
  File "/usr/lib/python3.9/urllib/request.py", line 214, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Configuration should be :

auto:
-   npm: generator-jhipster

@marcwrobel
Copy link
Member

marcwrobel commented Dec 15, 2022

With proper configuration for jhipster I got no error but output does not look good :

$ python3 src/npm.py 
::group::jhipster
{version}: {d}
{version}: {d}
{version}: {d}
{version}: {d}
{version}: {d}
{version}: {d}
{version}: {d}
...
::endgroup::

fstring are missing the f ;).

src/npm.py Outdated Show resolved Hide resolved
…i.py

If product config is first, default config overrides product config.
@marcwrobel
Copy link
Member

PR for vue and jhipster on endoflife.date ready : endoflife-date/endoflife.date#2063

src/npm.py Outdated Show resolved Hide resolved
src/npm.py Outdated Show resolved Hide resolved
Copy link
Member

@marcwrobel marcwrobel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@captn3m0
Copy link
Member

captn3m0 commented Dec 15, 2022 via email

Copy link
Member

@captn3m0 captn3m0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @anartify @hugovk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants