-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add comment support #137
Add comment support #137
Conversation
I think the I'm not so sure about the file/ZipObject. It still seems like it should be directly on the object, because it's not an option like Perhaps promote What do you think? |
I added
The first type is not really useful (for the user) and we could even remove them from the public API. If we don't deprecate and move half of the attributes, I prefer a consistent What do you think ? |
That's a great analysis of the different types we have. I would prefer the later option of deprecating/moving the properties around. |
Now `date`, `dir` and `comment` are attributes of `ZipObject`. See Stuk#137 for more details.
This commit add the ability to read and generate comments on the zip file and/or on each zip entry. Fix Stuk#134.
The old version of the saucelabs plugin may explain why I couldn't run the saucelabs tests. I'm also upgrading the other build dependencies.
Now `date`, `dir` and `comment` are attributes of `ZipObject`. See Stuk#137 for more details.
Done : now the only attribute that's not deprecated in |
Awesome! Thanks @dduponchel :) |
👍 |
@Stuk I think we can merge this one if you are ok with my last commit. |
+1 |
The changes look good. I'm slightly concerned by back-compat issues. How likely is it that people are setting |
The Nice catch, I'm updating the pull request. |
If the user changes the metadata after the creation of the ZipObject AND uses `JSZip#file` to access directly to the ZipObject, he will get a bug. With this patch, we now store the initial values of dir and date (changing dir afterward is a bit dangerous but you can't guess what a user would do). If the date (or dir) has been updated via the new path, we use the new value. Otherwise, we use the value stored at the old path. That way, we don't need to check the old path against the initial value.
Great, thanks! |
@Stuk can you release a new version of it? |
@dduponchel is there anything you want to get in before another release? I'm thinking #141 could wait until the release after. |
Yes, #141 can wait. We already have a fix for #142 (dduponchel/jszip@7364428 and dduponchel/jszip@629b96e from #141), I will create a pull request to include them quickly. After that, a release seems OK. 2.3 ? |
Cool, 2.3 sounds good. |
This commit adds the ability to read and generate comments on the zip file and/or on each zip entry, see #134.
The entry comment is set on
ZipObject#comment
and the zip file main comment is set onJSZip#comment
. For example :I also had issues with saucelabs tests and I resolved them with an upgrade of the grunt plugin (I also upgraded other dev dependencies).