Open Bug 1881508 Opened 9 months ago Updated 8 months ago

Add a yamscripts check to try-runner.js

Categories

(Firefox :: Messaging System, task, P3)

task
Points:
1

Tracking

()

People

(Reporter: aminomancer, Unassigned)

References

(Blocks 1 open bug)

Details

We use Kate Hudson's yamscripts package to deal with JSON's unsuitedness for storing npm scripts. For each of our 3 subprojects (newtab, aboutwelcome, asrouter), npm scripts need to be written in yamscripts.yml, followed by npm run yamscripts. But this is a very easy thing to forget, because everything else is in package.json, leading yamscripts.yml to be pretty obscure.

Since this makes package.json essentially a built file, we should check the before/after in our node(newtab) test (try-runner.js), like we do with other built files. That will prevent the files from getting out of sync, since when you modify scripts in package.json directly, the test will fail, ideally with some useful output telling you that scripts in package.json are generated from yamscripts.yml, so you should copy your modifications into yamscripts.yml.

If we don't want to do this, then I think we should stop using yamscripts. IIRC they've fallen out of sync 3 times just in the last year or so, so it's clearly a common pitfall. Let's fill it in.

Here's how we added a check for aboutwelcome.css.

Iteration: --- → 125.1 - Feb 19 - Mar 1
Points: --- → 1
Priority: -- → P3
Iteration: 125.1 - Feb 19 - Mar 1 → 125.2 - Mar 4 - Mar 15
Iteration: 125.2 - Mar 4 - Mar 15 → 126.1 - Mar 18 - Mar 29
Iteration: 126.1 - Mar 18 - Mar 29 → 126.2 - Apr 1 - Apr 12
Iteration: 126.2 - Apr 1 - Apr 12 → ---
You need to log in before you can comment on or make changes to this bug.