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

jQuery.deparam: coerce standalone keys to null values #60

Closed
wants to merge 10 commits into from
Closed

jQuery.deparam: coerce standalone keys to null values #60

wants to merge 10 commits into from

Conversation

jayaddison
Copy link

@jayaddison jayaddison commented May 6, 2020

This pull request adds support for a standaloneKeys parameter to the jQuery.deparam function, allowing clients to decode standalone query-string keys (e.g. the key b in the string ?a=1&b&c=3) as null.

Standalone keys are deserialized to nulls only when the coerce parameter is also enabled. Backwards-compatibility is maintained with prior versions of the jquery-bbq library, and test coverage to illustrate this is provided.

This proposed change corresponds to jquery/jquery#4708 in which the ability to serialize JavaScript objects containing null values to query strings is proposed.

@jayaddison

This comment has been minimized.

@jayaddison
Copy link
Author

* [x]  Minify `jquery.ba-bbq.js` -> `jquery.ba-bbq.min.js`

Minified by using yui-compressor v2.4.8, and confirmed that unit tests continue to pass against the minified file (ref).

@jayaddison
Copy link
Author

@cowboy This might be a bit like ancient archeology, but I wondered if you'd entertain the idea of releasing an updated version of jquery-bbq? (currently just north of a decade since the previous release :))

Change #48 looks innocuous, and now that I've read #62 I'd be keen to deploy a version with that resolved. This pull request is less important. If maintenance is a pain then perhaps a fork is an alternative; figured I'd ask first though.

@cowboy
Copy link
Owner

cowboy commented Dec 10, 2020

@jayaddison unfortunately, I don't have any of the tools set up to actually generate the requisite files for this project (and this was way before I had anything like Grunt, in fact, it's the reason I created Grunt in the first place). Are you interested in doing the work to make this happen? If so, I can give you access to manage the repo and merge in those changes.

@jayaddison
Copy link
Author

@cowboy It's been a little while since looking at this, but from what I remember, I was able to rebuild and minify distributable JS code although it was a slightly manual process at the time (ref previous comment).

I'd be glad to do a bit of maintenance here, and perhaps modernize the build process after understanding it a bit more fully.

@cowboy
Copy link
Owner

cowboy commented Dec 10, 2020

@jayaddison invite sent!

@jayaddison
Copy link
Author

@cowboy A heads-up that although I made a tiny amount of progress on adding an updated build process, this hasn't been something I've been able to progress a lot yet.

It'd be nice to merge some pending security-related improvements, but in the absence of progress on those or other features, it might be worth dropping my access privileges on the repo. Maybe an idea worth revisiting in another week or two.

@jayaddison
Copy link
Author

@cowboy Just a heads-up that I'm going to bow out of that effort to update the build process here, and drop my privileges on the repository; other time commitments are taking priority. It seemed worth a try, but I didn't make much progress unfortunately!

@jayaddison
Copy link
Author

I think this issue can probably be closed - perhaps at some point I'd like to revive a debate about standalone keys in query-strings, but until then this can be closed (with commits still retrievable via the github pr ref).

@jayaddison jayaddison closed this Mar 5, 2021
@jayaddison jayaddison deleted the deparam-deserialize-standalone-keys branch March 5, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants