-
Notifications
You must be signed in to change notification settings - Fork 125
Refactor the node generator into a proper Python package & add tests #289
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
Conversation
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
YAPF isn't used very often anymore in favor of Black...but I'm *very* tied to my single quotes... Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Not all the errors are fixed yet, but some of the code is going to be removed shortly anyway. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
| build-commands: | ||
| # Have Yarn use the offline mirror. | ||
| - 'HOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror' | ||
| - HOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is rather hackish, I'd rather suggest adding a separate .yarnrc source instead:
sources:
...
- type: inline
contents: |
yarn-offline-mirror /run/build/electron-webpack-quick-start/flatpak-node/yarn-mirror
dest-filename: .yarnrc
gasinvein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't really look into the newly-added tests, but overall this looks cool!
Re-committed by refi64 w/ some minor fixes, notes: Original commit at #287, I made some changes to match npm's behavior a bit more closely. Context: > Hahaha, so after hitting this locally, I've come to believe this > actually changed in the npm registry, and dists that formerly returned > the sha1 they were uploaded with now return a newly computed sha512. I > think the previous behavior I followed was also changed in npm/pacote > at some point too.
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Also adds another useful tool shell script to be able to generate the lockfiles & examine the npm/yarn caches. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Also adds tests on Git repositories specifically. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Fixes #278. Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
Signed-off-by: Ryan Gonzalez <ryan.gonzalez@collabora.com>
...and also fix some bugs (includes slightly-tweaked #287). But bugs don't matter anyway, because THE CODE IS PRETTY!
Rationale:
pipx install flatpak-node-generator, and we can actually safely add dependencies without breaking everything or requiring manual venv management.The main still-outstanding things are:
But for now, this is a good start!
(If I sound slightly hyper after spending several hours fighting with npm, it is because I am indeed hyper after spending several hours fighting with npm.)