Some doubts about validation

I am happy for having validated my first add on. I tested first with enabled the “no distribution on Mozilla.org” option (the beta test on https://addons.mozilla.org/en-US/developers/addon/submit/2).

But I have some big doubts: The first time the validation failed for some reason for which I get support here (the errors were clarified); the problem is at the second try: here I installed the most recent (at least this is what I think…) version of jpm, the 1.0.6 (the first one was 1.0.3). So I changed the name and title, and I have to point out that the jpm installation was made --global. The doubts are:

  • Why the new XPI file had 14MB size, while the preceding one had only some kB?
  • Why in testing the add-on I get 2 errors, 24 warnings, 6 notices? Specifically, warnings were referring to something similar to this:

but I am sure of not having used any of the problematic elements indicated by each warnig. About the two errors, I get this:

The reason of the first error is obscure, and about the second one, I cannot explain the absence of manifest, because I think it was created by jpm xpi command.

Finally, I have added to package.json in myaddon directory the “id” field (*)… and magically the add on gets validation – the xpi file name now has changed into the id label I have given, and its size is returned normal, i.e. some kB… , Any idea?

(*) I red in jpm documentation this:
if the package.json does not include an id field [this was the case in the preceding attempts], then the ID written into the install.rdf is the value of the name field prepended with “@”.

It seems you have JPM installed in your local extension directory. (node_modules/jpm etc.), which means it will package up all of jpm (plus dependecies) into your extension. You can see what gets packaged if you use -v when running jpm xpi. If you have the validated XPI inside your add-on directory, that will get packaged too, I think (unless that’s been fixed now, I haven’t been able to keep track).

You can use a .jpmignore file to specify rules what should be excluded from the extension in .gitignore style. If you don’t use any third party modules, you’d most likely want it to look something like

node_moduels/
test/
.*
*.xpi
*.zip

If you have the validated XPI inside your add-on directory, that will get packaged too

I am not sure to understand well this assertion.
I think I have forgotten to delete the preceding XPI in the test I have made. Do you mean this may justify the exorbitant 14MB size of the new XPI and the errors I have reported?

Partially. I think the bigger part is because you had unrelated node_modules installed in the same directory and they got packaged, too.

Why in the successive tests the size returned to normal?