drawio-desktop
drawio-desktop copied to clipboard
yarn.lock problems
Preflight Checklist
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe the bug
I am trying to update flatpak build and in order to do so, I have to update the generated-sources.json
using flatpak-node-generator
.
Usually, it works just fine, but with 24.7.5 update, I am getting error:
❯ flatpak-node-generator yarn yarn.lock
Reading packages from lockfiles...
Traceback (most recent call last):
File "/home/[redacted]/.local/bin/flatpak-node-generator", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/[redacted]/.local/pipx/venvs/flatpak-node-generator/lib64/python3.12/site-packages/flatpak_node_generator/main.py", line 277, in main
asyncio.run(_async_main())
File "/usr/lib64/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/[redacted]/.local/pipx/venvs/flatpak-node-generator/lib64/python3.12/site-packages/flatpak_node_generator/main.py", line 198, in _async_main
packages.update(lockfile_provider.process_lockfile(lockfile))
File "/home/[redacted]/.local/pipx/venvs/flatpak-node-generator/lib64/python3.12/site-packages/flatpak_node_generator/providers/yarn.py", line 107, in process_lockfile
yield self.process_package(lockfile, name_line, package)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/[redacted]/.local/pipx/venvs/flatpak-node-generator/lib64/python3.12/site-packages/flatpak_node_generator/providers/yarn.py", line 92, in process_package
if self.is_git_version(entry['resolved']):
~~~~~^^^^^^^^^^^^
KeyError: 'resolved'
It seems to me (but by all means, I am not a developer, so this is only my best guess), that yarn.lock is missing some data. Few packages do not have resolved
and integrity
properties:
- @electron/get@^2.0.0
- @types/http-cache-semantics@*
- @types/responselike@^1.0.0
- @types/yauzl@^2.9.1
- define-properties@^1.1.3
- function-bind@^1.1.1
- get-intrinsic@^1.1.1
- has-property-descriptors@^1.0.0
- has@^1.0.3
- keyv@^4.0.0
- punycode@^2.1.0
- sprintf-js@^1.1.2
- universalify@^2.0.0
Also, URLs point to registry.npmjs.org
instead of previous registry.yarnpkg.com
, but I am not sure if this is related.
To Reproduce Steps to reproduce the behavior:
- Install flatpak-node-generator
- Clone drawio-desktop repo
- Run
flatpak-node-generator yarn yarn.lock
- See error
Expected behavior
flatpak-node-generator should produce generated-sources.json
without any errors.
Screenshots N/A
draw.io version (In the Help->About menu of the draw.io editor):
- draw.io version 24.7.5
Desktop (please complete the following information):
- OS: Linux Fedora 40
Additional context N/A