Skip to content
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

Change the package npm script used to generate the extension.zip #193

Closed
reyronald opened this issue Mar 28, 2018 · 0 comments
Closed

Change the package npm script used to generate the extension.zip #193

reyronald opened this issue Mar 28, 2018 · 0 comments
Assignees
Labels

Comments

@reyronald
Copy link
Member

The adm-zip npm package used in the package npm script that so far has been used to generate the extension.zip file is producing an invalid/weird ZIP that is being rejected by the Mozilla Add-Ons site when uploaded. So at the time of this writing, it is not possible to use that script to publish a new version of the extension.

Since the npm site shows that the latest release of the adm-zip package was 3 years ago, and that the GitHub repo shows 98 open issues, I think it would be best to find an alternative solution to automatically generating that ZIP file.

This is the code that should be changed:

const del = require('del');
const AdmZip = require('adm-zip');
// Delete source maps
del.sync(['extension/*.js.map']);
// Archive the extension folder into 'extension.zip'
const zip = new AdmZip();
zip.addLocalFolder('extension');
zip.writeZip('extension.zip');

References:

mozilla/addons#672
mozilla/addons-linter#1938

@reyronald reyronald added the bug label Mar 28, 2018
@reyronald reyronald self-assigned this Mar 28, 2018
reyronald added a commit that referenced this issue Apr 2, 2018
Fix the `package` npm script to use the `archiver` npm package instead
of `admin-zip` so that it produces a valid Zip file.

Closes #193

mozilla/addons#672
mozilla/addons-linter#1938
reyronald added a commit that referenced this issue Apr 3, 2018
Fix the `package` npm script to use the `archiver` npm package instead
of `admin-zip` so that it produces a valid Zip file.

Closes #193

mozilla/addons#672
mozilla/addons-linter#1938
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant