@cara/porter
Advanced tools
Comparing version 4.0.0-alpha.10 to 4.0.0-alpha.11
{ | ||
"name": "@cara/porter", | ||
"description": "A middleware for web modules", | ||
"version": "4.0.0-alpha.10", | ||
"version": "4.0.0-alpha.11", | ||
"main": "src/porter.js", | ||
@@ -44,3 +44,3 @@ "repository": { | ||
"license": "BSD-3-Clause", | ||
"gitHead": "b493c06a32741a46fbd753cd2bae906199e58637" | ||
"gitHead": "fb4dfa1dd8ffdd40ea2f365c2c00167cdb090491" | ||
} |
@@ -86,3 +86,3 @@ 'use strict'; | ||
const result = await Promise.all(deps.map(this.parseDep, this)); | ||
this.children = result.filter(mod => mod != null); | ||
this.children = result.filter(mod => !!mod); | ||
this.status = MODULE_LOADED; | ||
@@ -89,0 +89,0 @@ } |
@@ -117,3 +117,3 @@ 'use strict'; | ||
// Allow root/a => packet/b => root/c | ||
if (!mod) { | ||
if (mod == null) { | ||
const { rootPacket } = packet; | ||
@@ -152,2 +152,4 @@ const specifier = name == rootPacket.name ? (entry || rootPacket.main) : dep; | ||
if (mod === false) return mod; | ||
if (!mod) { | ||
@@ -154,0 +156,0 @@ console.error(new Error(`unmet dependency ${dep} (${this.fpath})`).stack); |
@@ -206,2 +206,3 @@ 'use strict'; | ||
'.ts', '.tsx', '/index.ts', '/index.tsx', | ||
'.d.ts', | ||
]; | ||
@@ -313,2 +314,5 @@ | ||
// ignore d.ts | ||
if (fpath.endsWith('.d.ts')) return false; | ||
if ([ '.ts', '.tsx' ].includes(suffix)) { | ||
@@ -335,2 +339,3 @@ file = file.replace(/\.\w+$/, suffix); | ||
if (mod === false) return mod; | ||
if (!mod && entry.endsWith('.css')) return; | ||
@@ -353,4 +358,4 @@ if (!mod) throw new Error(`unknown entry ${entry} (${dir})`); | ||
await mod.parse(); | ||
return mod; | ||
} | ||
return mod; | ||
} | ||
@@ -357,0 +362,0 @@ |
99505
2579