mapbox / shp-write

create and write to shapefiles in pure javascript
BSD 3-Clause "New" or "Revised" License
290 stars 186 forks source link

Combinations of options are not guaranteed to output valid #97

Closed charlieforward9 closed 10 months ago

charlieforward9 commented 10 months ago

We have iterated on the package and updated it, but there are still some flaws:

Ex. options = { outputType: base64, compression: STORE } output a corrupt file.

Ref: Everything discussed so far is from here to the end of the PR

sheindel commented 10 months ago

Actually, tag v0.4.0 which I marked this morning should now be totally compliant in this way. Let me know if you are able to test this out.

charlieforward9 commented 10 months ago

I will check this out, is there anything preventing v0.4.0 from being uploaded to npm right now?

sheindel commented 10 months ago

Mapbox was gracious enough to allow me right over the repository but they decided to retain all permissions for NPM so I have to reach out to someone at mapbox to actually publish. Based on my conversation with them I'm hoping it will be published later today or tomorrow

sheindel commented 10 months ago

Good news: v0.4.2 is now available.

Less good news: Mapbox changed their deployment organization so this package is now hosted under a different package

@mapbox/shp-write https://unpkg.com/@mapbox/shp-write@latest/shpwrite.js

charlieforward9 commented 10 months ago
compression: "STORE",
outputType: "base64",
//and
compression: "DEFLATE",
outputType: "string",
//and
compression: "STORE",
outputType: "blob",

all worked ✅

It also looks like @mapbox/shp-write has over 280 downloads in 3 days, so I am going to close this.

It was great to contribute to this library over the past week. It was my first open source contribution. Props to @sheindel for facilitating that and connecting with @MapBox to get this updated with the package managers in a timely manner. It feels super fulfilling to do

npm i <Something_I_Worked_On>

😃