Skip to content
This repository was archived by the owner on Jun 11, 2020. It is now read-only.

Allow path mapping for scoped packages - #356

Merged
2 commits merged into
masterfrom
scoped-path-mapping
Jun 28, 2017
Merged

2 commits merged into
masterfrom
scoped-path-mapping

Conversation

@ghost

Copy link
Copy Markdown

The problem is that in DefinitelyTyped we don't use node module resolution, we use a baseUrl and classic resolution. So scoped package names are not resolved. This allows us to use path mapping for those.

@joscha Joscha Feth (joscha) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment thread src/lib/definition-parser.ts Outdated
const pathMapping = pathMappingList[0];

// Path mapping may be for "@foo/bar" -> "foo__bar". Based on `getPackageNameFromAtTypesDirectory` in TypeScript.
const mangledScopeedPackageSeparator = "__";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a typo here, mangledScopeedPackageSeparator -> ee.

@joscha

Joscha Feth (joscha) commented Jun 23, 2017 •

Copy link
Copy Markdown
Contributor

@ghost
ghost merged commit 3a3659b into master Jun 28, 2017
@ghost
ghost deleted the scoped-path-mapping branch June 28, 2017 15:38
This pull request was closed.
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