Skip to content

Bug fixes #378

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

Merged
merged 2 commits into from
Oct 15, 2024
Merged

Bug fixes #378

merged 2 commits into from
Oct 15, 2024

Conversation

chris-pardy
Copy link
Collaborator

@chris-pardy chris-pardy commented Oct 11, 2024

Replaces #368 and #363 Fixes #362

For prioritize and run the method can be significantly paired down as there's currently a lot of code that isn't actually doing anything. This doesn't move it to use the reduce function on arrays (see comment on IE 8 compatibility). I'd like to punt on that change for a tools modernization and type-script port.

For the JSON Stringifying, changing the call to debug to have a number of improvements. Firstly what is exported is either a no-op function or just a bound console.debug method. This avoids repeating the environment variable or localstorage checks on every call to the function. In particular local storage being a synchronous API to access a persisted store that is also global to the browser makes it much slower. This has the downside that you'll need to reload the page / restart node when enabling debug.
Additionally the debug messages no longer in-line values and instead present them as an object collection in the second argument. This allows the built-in debug formatter to handle them which correctly formats BigInts and other complex objects.

Significantly simplify the method by leveraging the short-circuiting of the
|| and && operators.

Replaces CacheControl#368

Co-Author Mahi <dev.babumhndr@gmail.com>
Change the call signature, leverage built-in formatting on console. Move debug enablement checks to file load.
Replaces CacheControl#363
Resolves CacheControl#362

Co-Author Nirmal Patel <nirmal259907@gmail.com>
@chris-pardy chris-pardy merged commit 9c9edd7 into CacheControl:master Oct 15, 2024
3 checks passed
@chris-pardy chris-pardy deleted the bug-fixes branch October 15, 2024 14:06
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.

BigInt value is not working
2 participants