X Tutup
Skip to content

fix(helmet): correct CSP creation detail#44228

Merged
elibarzilay merged 1 commit intoDefinitelyTyped:masterfrom
peterblazejewicz:fix/helmet
Apr 26, 2020
Merged

fix(helmet): correct CSP creation detail#44228
elibarzilay merged 1 commit intoDefinitelyTyped:masterfrom
peterblazejewicz:fix/helmet

Conversation

@peterblazejewicz
Copy link
Member

the options here are required in helmet-csp types, at runtime this
throws exception:

https://github.com/helmetjs/csp/blob/master/index.ts#L15
https://github.com/helmetjs/csp/blob/8bf3360019b61be93b8cf18a1bad8fe9fe43578f/lib/check-options/index.ts#L12

  • maintainer added
  • test amended

Thanks!

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Run npm run lint package-name (or tsc if no tslint.json is present).
  • Provide a URL to documentation or source code which provides context for the suggested changes

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

Comparison details 📊
master #44228 diff
Batch compilation
Memory usage (MiB) 69.0 68.9 -0.1%
Type count 11219 11219 0%
Assignability cache size 3727 3727 0%
Language service
Samples taken 342 338 -1%
Identifiers in tests 342 338 -1%
getCompletionsAtPosition
    Mean duration (ms) 295.5 284.2 -3.8%
    Mean CV 10.1% 11.1%
    Worst duration (ms) 381.7 342.9 -10.2%
    Worst identifier helmet payment
getQuickInfoAtPosition
    Mean duration (ms) 296.0 285.1 -3.7%
    Mean CV 10.4% 11.6% +10.8%
    Worst duration (ms) 354.6 343.7 -3.1%
    Worst identifier use use

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Apr 25, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 25, 2020

@peterblazejewicz Thank you for submitting this PR!

🔔 @cyrilschumacher @EvanHahn @BlueHatbRit @chdanielmueller - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

Copy link
Contributor

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

IHelmetContentSecurityPolicyConfiguration should also mark directives as required, but that could be done in a followup.

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Merge:Express and removed Awaiting reviewer feedback labels Apr 25, 2020
@typescript-bot
Copy link
Contributor

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

peterblazejewicz added a commit to peterblazejewicz/DefinitelyTyped that referenced this pull request Apr 26, 2020
The `helmet-csp` throws an error at runtime if that property is missing.
Marking this as required, see author's comment:
DefinitelyTyped#44228 (review)

Thanks!
@elibarzilay elibarzilay merged commit 5acdc8f into DefinitelyTyped:master Apr 26, 2020
@peterblazejewicz peterblazejewicz deleted the fix/helmet branch April 26, 2020 19:04
peterblazejewicz added a commit to peterblazejewicz/DefinitelyTyped that referenced this pull request Apr 29, 2020
The `helmet-csp` throws an error at runtime if that property is missing.
Marking this as required, see author's comment:
DefinitelyTyped#44228 (review)

Thanks!
typescript-bot pushed a commit that referenced this pull request May 11, 2020
…red by @peterblazejewicz

* feat(helmet): make `directives` of CSP config reuqired

The `helmet-csp` throws an error at runtime if that property is missing.
Marking this as required, see author's comment:
#44228 (review)

Thanks!

* Remove non-related Prettier pragma

Fixing PR comment
andreialecu pushed a commit to andreialecu/DefinitelyTyped that referenced this pull request May 12, 2020
…SP config required by @peterblazejewicz

* feat(helmet): make `directives` of CSP config reuqired

The `helmet-csp` throws an error at runtime if that property is missing.
Marking this as required, see author's comment:
DefinitelyTyped#44228 (review)

Thanks!

* Remove non-related Prettier pragma

Fixing PR comment
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
jjballano-qatium pushed a commit to jjballano-qatium/DefinitelyTyped that referenced this pull request Jun 16, 2020
…SP config required by @peterblazejewicz

* feat(helmet): make `directives` of CSP config reuqired

The `helmet-csp` throws an error at runtime if that property is missing.
Marking this as required, see author's comment:
DefinitelyTyped#44228 (review)

Thanks!

* Remove non-related Prettier pragma

Fixing PR comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

X Tutup