Add support for minor versions when removing the version suffix from a
package name. E.g. @foo/bar@v27.1 should be @foo/bar, but currently the
regexp does not match the dot character.
* definition-parser: Use scoped names when testing mappings for relative
imports.
* miscellany/utils: When removing version number, keeps wildcard at the
end of mapping.
* miscellany/utils: When checking the existence of a version number,
catch those packages that include a wildcard path mapping.
Co-authored-by: Federico Panico <federicopanico@gmail.com>
* fix: parser fails with older scoped packages.
Given a path mapping as
```
"paths": {
"@ckeditor/ckeditor5-utils": [
"ckeditor__ckeditor5-utils/v10"
]
}
```
definitions-parser failed to understand that `/v10` is not part of the
package name, and that the key of the mapping must be a scoped name.
* Resolve PR comments
- add test coverage
- simplify implementation
* Add test in definition-parser
* Use scopedPackageName in Error for missing mapping
Co-authored-by: Piotr Błażejewicz <peterblazejewicz@users.noreply.github.com>
typescript-installer.install accepts "next" so that it can install
`typescript@next`, but should install it to `typescript-installs/4.0/`
(to use the current `next` as an example).
perf (currently) and dtslint (soon) rely on
typescript-installer.typeScriptPath to do this translation as well, so
that's where I added the test.