mozilla :: #mdndev

26 May 2017
00:14shobsonG'night all.
00:15rjohnsongood night shobson!
00:28rjohnsongood night mdndev
12:52jwhitlockgood morning #mdndev
13:54jwhitlockI'm looking at all the places we install node packages
13:54jwhitlockfront-end dev, travisci, scl3 deployments, and Docker
13:54jwhitlockI want to replace all with "npm install" and "npm install --production"
13:55jwhitlockif you have more node experience then me, I'd appreciate a "hell yes" or "it's a trap!"
13:59anthonyIf the separation between dependencies and devdependencies is done right, I would say hell yes. I don't know if it's the case (I guess it is)
14:04jwhitlockright now, package.json is all devdependencies, so maybe starting from a good place?
14:05jwhitlockI'll also have to check my notes to recall if we manually installed SCL3 deps back in January
14:06anthonyFor frontend devs it's expected that everything is devdependencies since it's all linter, sass compiler stuff, so for kuma it doesn't seem necessary to run npm at all on production
15:06rjohnsonjwhitlock: one caveat to keep in mind for kumascript: npm shrinkwrap (with our current version of npm, not the latest) does not shrinkwrap the devDependencies, so i moved (temporarily) all of the devDependencies into dependencies so that they would be shrinkwrapped as well
15:07rjohnsonmaybe we should not worry about shrinkwrapping the devDependencies, and i should just separate them out again
15:09jwhitlockyeah, we also have a fuzzy line between dev and prod dependencies, since our prod needs dev dependencies to build output assets
15:11agibsonfwiw, we use npm-lockdow on bedrock, which I believe does handle devDependencies (IIRC)
15:17rjohnsonagibson: interesting, thanks! it looks like a nice solution until shrinkwrap gets its act together
15:17jwhitlockI'm -1 on moz maintained solutions
15:17agibsonnp, it's worked ok for our needs so far
15:18agibsonshrinkwrap is way more popular and maintained,yeah
15:18jwhitlockI'd have to see if it is 2 years old because it just works, or because no one is updating ut
15:18jwhitlockyarn seems to be the new hotness, wish I could ask 2020 if it is still around
15:18agibsonthere was one update to lockdown recently to add yarn support, but it looks like that's it
15:19jwhitlockwell to document that yarn exists, not add support
15:19agibsonoh, yeah - just adding to the readme
15:20jwhitlocklast code change was march 2015
15:22agibsonhave you considered yarn?
15:24rjohnsoni have not, but maybe others have
15:27rjohnsonyeah, yarn looks really nice
15:30andrewtruongrjohnson: good morning - continuing from yesterday. Here's the log:
15:38rjohnsonandrewtruong: good morning! thanks for the logs. oh, yes, we updated the wiki_documentzone table just recently but i don't think that change is yet reflected in the sample db. i think "docker-compose exec web ./ migrate" should take care of that.
15:43andrewtruongamazing. it worked, thanks!
15:44rjohnsonandrewtruong: glad to hear it! :)
15:53andrewtruonghmm. So I'm trying to get to the Javascript APIs under WebExtensions but those are all empty.
15:56jwhitlockandrewtruong: sorry, those aren't in the sample DB
15:56jwhitlockyou can log in and copy content from production
15:57jwhitlockfor example, to get
15:57jwhitlockyou need the pages leading up to it (,
15:57jwhitlockthe raw version is useful:
15:58jwhitlockyou can "view source", copy, and paste into the Source view of CKeditor
15:58jwhitlockyou can checkout my branch sample_database_wip_something_something, and try to use the scraping tools
15:59jwhitlockI'm in the process of getting those merged to master
16:07sheppyA lot of work will be easier then.
16:08andrewtruongIf I copy the source and paste it, where should I save it to be able to open it up?
16:12sheppyandrewtruong: Open the corresponding page on your local wiki and click the source button in the editor there, then paste it.
16:12sheppyThen save.
16:16agibsonrjohnson: I was just browsing the release notes for npm 5.0, and it looks like package-lock.json is now a thing
16:45rjohnsonagibson: thanks! i'm happy to see that.
16:49shobsonandrewtruong: you might have to turn debug off to get the prompt to add new content when visiting a URL that doesn't exist yet.
16:50shobsonAlternatively you can go to http://localhost:8000/en-US/docs/new and copy the page slug from production too.
17:32wbamberghi mdndev
17:34wbambergandrewtruong is trying to test changes to a sidebar macro. the macro uses pages.subpagesExpand to get the list of pages to show:
17:35wbambergbut it seems as if the list isnt updated when new subpages are added. This looks like the same thing Florian mentioned here:
17:36wbambergshall I file a bug?
18:08rjohnsonwbamberg: thanks for the links! i wasn't aware of this issue until now. it looks like something i can look into when i next have time. i would say yes to filing a bug so i can track my work when i get to it.
18:20wbambergthanks rjohnson! ->
18:20firebotBug 1368134 NEW, pages.subpagesExpand does not update in local Kuma instances
18:21rjohnsonwbamberg: thank you for filing the bug!
18:22wbambergyoure welcome rjohnson
18:23wbambergwhile Im here, I had another question
18:23wbambergif a macro has an error, it prints an error message in the page.
18:24wbambergbut if a macro calls another macro, and that other macro has an error, it looks to me as if the error is just swallowed and nothing is displayed
18:24wbambergis that a known issue?
18:27rjohnsonwbamberg: i don't know of that issue, but as part of the other ks work i've been doing lately, i took a brief look at the error handling code when executing macros, and it struck me as inconsistent, so your report doesn't surprise me
18:27rjohnsonwould you mind filing another bug? i'd like to look into that one as well
18:28wbambergsure thing
26 May 2017
Last message: 13 minutes and 55 seconds ago