bare-module-traverse 2.5.8 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -897,9 +897,7 @@ function moduleType(url, attributes, info, opts = {}) {
897
897
 
898
898
  const match = url.pathname.match(/\.[a-z]+$/)
899
899
 
900
- if (match === null) return defaultType
901
-
902
- let [extension] = match
900
+ let extension = match === null ? '.js' : match[0]
903
901
 
904
902
  if (aliases !== null && extension in aliases) extension = aliases[extension]
905
903
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-module-traverse",
3
- "version": "2.5.8",
3
+ "version": "2.5.9",
4
4
  "description": "Low-level module graph traversal for Bare",
5
5
  "exports": {
6
6
  ".": {