This repository was archived by the owner on Dec 18, 2024. It is now read-only.
Commit 76dc577
committed
fix: update normalize-path to use ECMAScript compliant default import
The `normalize-path` package was previously imported via a namespace import.
However, the ECMAScript specification returns an exotic namespace object from
namespace imports which can never be a function. As a result a namespace import
can not be called. Since the import is directly called it must be imported As
a default import to be ECMAScript compliant. TypeScript by default allows the
non-compliant form even though it can result in runtime errors. The TypeScript
`esModuleInterop` option (recommended by TypeScript) causes TypeScript to error
on non-compliant usage and ensures the correct code is emitted so that the code
can be executed and/or bundled in an ESM environment.1 parent 79625c3 commit 76dc577
2 files changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
0 commit comments