[TIMOB-27899] Common: path.parse with a file extension but no directory results in an invalid dir value
| GitHub Issue | n/a |
| Type | Bug |
| Priority | None |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 9.0.1, Release 9.0.2 |
| Fix Version/s | n/a |
| Components | Android, iOS |
| Labels | n/a |
| Reporter | Ewan Harris |
| Assignee | Ewan Harris |
| Created | 2020-05-18T12:36:43.000+0000 |
| Updated | 2021-02-22T20:01:43.000+0000 |
Description
Description
When calling path.parse('a.js' the dir value in the returned object is dir: 'a.j' which is incorrect, the value should be dir: ''
Steps to reproduce
1. Add console.log(path.parse('a.js')); to your app.js and build
Actual
[INFO] { root: '', dir: 'a.j', base: 'a.js', ext: '.js', name: 'a' }
Expected
[INFO] { root: '', dir: ''. base: '', ext: '.js', name: 'a' }
Comments
JSON Source
No comments