-
Notifications
You must be signed in to change notification settings - Fork 322
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
Update node packages and remove unneeded ones #1258
Conversation
- update CopyPlugin syntax - bump webpack-cli
Considering this is JS heavy - @gabalafou could you spare a few mins and help us with reviewing this? |
that would be awesome. Also we could add |
In my humble opinion, it's better for future contributors if the |
Fair enough.
I mean, we can change the title of this PR 🙂 but I think your earlier point stands. Which I guess means this is still ready for review. |
So this might seem extreme, but I might go a step further and remove all unused dependencies. The reason why is that if you don't remove these unused dependencies then you're stuck having to continually update them whenever you do an automated audit of the list of dependencies for ones that are outdated or have security vulnerabilities (unfortunately, there's no automated audit for unused dependencies). What led me to this conclusion was that while reviewing this PR, I could not find anywhere that The only thing is, I'm not sure exactly how to test for hidden dependencies because I'm not entirely sure how stb (Sphinx Theme Builder) works under the hood. But I was able to run all of the manual dev environment commands (install, build, compile, serve, test) without any problems (except the infinite rebuild loop with |
I'm fine with that. I honestly don't know why most of those are in here, other than a vague "probably because webpack which I haven't taken the time to really understand".
me neither 🙂 But I'm reasonably sure that if you removed something and |
remove stale deps
@drammock nice! Could you update the PR title and description? |
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.
My review: looks good to me. I also tested with nox -s compile
and didn't get any issues.
I hesitate to click the "Approve" button simply because a change this big should probably get a green light from someone with more experience working in this codebase.
OK @gabalafou I could use your input again. I've updated the CSS minimizer and updated the webpack config accordingly, fixed a "cannot load sass" error, and fixed a couple of SASS compiler errors, but I'm still getting failures in
AFAICT these are errors coming from the minimizer when trying to minimize the already-compiled-from-SCSS CSS files, and in the 2 files it complains about the EDIT here's the full traceback:
|
Give my following changes a try? To be perfectly honest, I don't really know what I'm doing with Webpack half the time. I always find myself shuffling lines of code until the configuration file magically seems to work and everything just builds. But that's not really how you want to go about setting up your build system. You want to know what each part is doing and why—what each step takes in as input and what each step creates as output. All I can say is that my proposed change allows the The problem is that I would need to have an intimate understanding of the entire build process for what this repo is trying to output, and I just haven't connected all of those dots yet. If there's someone in this community who has the full picture of the build process and wants to go through it with me, then I can weigh in with more confidence. Otherwise, I would have to spend hours reverse engineering all of this, which is not something I have the time for right now. All I can say right is that the doc site looks alright. There are a number of errors in the console logs, including 404s on font files, but I find many of the same errors on the Read The Docs site, so 🤷 |
those have been bugging me for a long time but I haven't had the bandwidth to fix them 😞 |
well, we broke something: https://pydata-sphinx-theme--1258.org.readthedocs.build/en/1258/# |
Yay! 😁 Let's see what happens if we sub |
Co-authored-by: gabalafou <gabriel@fouasnon.com>
The |
Locally, using the old spec of
plus the main site for |
Yeah my original hypothesis for the failing build was because I read that |
@12rambau @choldgraf this one is ready for merge IMO. Thanks 💯 ** 3 @gabalafou for your help here! |
@@ -50,14 +50,14 @@ $sd-semantic-color-names: ( | |||
* already define for our own needs. | |||
*/ | |||
$extra-semantic-colors: ( | |||
"dark": map-get($pst-semantic-colors, "text-base"), |
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.
Note: not blocking - that this will change with the changes in #1174 as I encountered issues with using *
while working on this
My best guess on who these people are would be @choldgraf or @pradyunsg Also yay for now using dart |
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.
You should definitely not treat me as an expert on webpack or javascript, I am fumbling in the dark just as much as y'all are. But this seems reasonable to me and I'm +1
As everyone here, I don't have a very sharp eye on webpack changes. My guess is as long as tests and rendering are happy, I'm happy as well. |
closes #1257
This PR bumps our JS requirements as follows:
The first two were done by
npm audit fix --force
. The latter two I did manually to resolve dependency resolution issues. A slight change to our webpack config file was also needed.Locally at least, I can get
nox -s docs
to work, andnox -s docs-live
works (modulo the problem in #1256, which sadly this doesn't fix). Let's see if the CIs still succeed.Would appreciate a review from someone who is not fumbling blindly when it comes to JS/node/webpack... the fact that this seems to have worked (?) is a testament to the fact that reading tracebacks is apparently a (python -> JS) transferrable skill. @choldgraf are you that person, or can you tag someone who is?
EDIT this PR also removes several modules that were determined to be no longer necessary for our build chain (if they ever were).