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

v8.0.0 #453

Merged
merged 7 commits into from
Sep 28, 2024
Merged

v8.0.0 #453

merged 7 commits into from
Sep 28, 2024

Conversation

EvanHahn
Copy link
Member

No description provided.

njmulsqb and others added 7 commits September 28, 2024 22:31
See [#444][0] and [#450][1].

[0]: #444
[1]: #450

Signed-off-by: Najam Ul Saqib <[email protected]>
Co-authored-by: Evan Hahn <[email protected]>
We can use this now that we require Node 18+.
I wrote a simple benchmarking script:

    import * as helmet from "./index.ts";

    console.time("getting");
    for (let i = 0; i < 1_000_000; i++) {
      helmet.contentSecurityPolicy.getDefaultDirectives();
    }
    console.timeEnd("getting");

On my machine, this took about 4.5 seconds before the change. Now, it
averages about 32 milliseconds.
@EvanHahn EvanHahn marked this pull request as ready for review September 28, 2024 22:32
@EvanHahn EvanHahn merged commit 6562cd7 into main Sep 28, 2024
5 checks passed
@EvanHahn EvanHahn deleted the v8.0.0 branch September 28, 2024 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants