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

Prevent __proto__ pollution in util.deepExtend #4001

Merged
merged 5 commits into from
Oct 27, 2020
Merged

Conversation

Feiyang1
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Oct 27, 2020

🦋 Changeset detected

Latest commit: 0df9205

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 28 packages
Name Type
@firebase/util Patch
@firebase/analytics Patch
@firebase/app Patch
@firebase/component Patch
@firebase/database Patch
firebase Patch
@firebase/firestore Patch
@firebase/installations Patch
@firebase/messaging Patch
@firebase/performance Patch
@firebase/remote-config Patch
@firebase/rules-unit-testing Patch
@firebase/storage Patch
@firebase/functions Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 27, 2020

Binary Size Report

Affected SDKs

  • @firebase/util

    Type Base (a9ba7ba) Head (a7e6c0a) Diff
    browser 20.1 kB 20.2 kB +69 B (+0.3%)
    esm2017 18.9 kB 19.0 kB +69 B (+0.4%)
    main 21.3 kB 21.3 kB +69 B (+0.3%)
    module 20.1 kB 20.2 kB +69 B (+0.3%)
  • firebase

    Type Base (a9ba7ba) Head (a7e6c0a) Diff
    firebase-app.js 20.0 kB 20.0 kB +17 B (+0.1%)
    firebase-database.js 190 kB 190 kB +17 B (+0.0%)
    firebase-performance-standalone.es2017.js 71.7 kB 71.7 kB +18 B (+0.0%)
    firebase-performance-standalone.js 48.1 kB 48.1 kB +17 B (+0.0%)
    firebase.js 820 kB 820 kB +17 B (+0.0%)

Test Logs

Copy link
Contributor

@schmidt-sebastian schmidt-sebastian left a comment

Choose a reason for hiding this comment

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

2 nits but LGTM.

(target as { [key: string]: unknown })[prop] = deepExtend(
(target as { [key: string]: unknown })[prop],
(source as { [key: string]: unknown })[prop]
(target as Record<string, unknown>)[prop] = deepExtend(
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe a little cleaner if you create a type alias for Record<string, unknown> to reduce the repetitive cast.

packages/util/test/deepCopy.test.ts Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants