Skip to content

discoverTypings should look at typingSafelist.json values#16277

Merged
minestarks merged 2 commits into
microsoft:masterfrom
minestarks:safelistpackagenames
Jun 6, 2017
Merged

discoverTypings should look at typingSafelist.json values#16277
minestarks merged 2 commits into
microsoft:masterfrom
minestarks:safelistpackagenames

Conversation

@minestarks
Copy link
Copy Markdown
Member

The npm package names in typingSafeList.json were getting ignored, breaking type acquisition for packages where file name != package name

@minestarks minestarks requested review from a user and billti June 5, 2017 22:58
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy left a comment

Choose a reason for hiding this comment

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

Can you add a unit test to harness\unittests\typingsInstaller.ts

Comment thread src/services/jsTyping.ts Outdated

if (safeList !== EmptySafeList) {
mergeTypings(filter(cleanedTypingNames, f => safeList.has(f)));
mergeTypings(map(filter(cleanedTypingNames, f => safeList.has(f)), (f => safeList.get(f))));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks like a good candidate to use ts.mapDefined(cleanedTypingNames, f => safeList.get(f)).

@minestarks minestarks merged commit 52e867c into microsoft:master Jun 6, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
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.

3 participants