Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Convered all Object based key-value stores to Maps #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mfrederiksen
Copy link

I have updated all key-value Objects (specifically, packages and exportNames in dependency-report.js and filepathsForExports in package.js) to use Map.
This is to resolve problems when names or packages conflict with keys from Object.prototype.

Examples of this problem are lines like:
import toString from ‘lodash/toString’

This would result in the key-value stores not getting initialized because:
if (!this.filepathsForExports['toString']) {
will never evaluate false.

Methods on DependencyReport and Package were updated to ensure consistency with the existing API

This avoids name conflicts with default keys
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.

1 participant