File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 99} from "../bin/only-include-used-icons" ;
1010import * as child_process from "child_process" ;
1111import { oppa } from "oppa" ;
12+ import { assert } from "tsafe/assert" ;
1213
1314( async ( ) => {
1415 const { args } = oppa ( )
@@ -107,16 +108,10 @@ import { oppa } from "oppa";
107108 "types" : packageJsonParsed [ "types" ] . replace ( / ^ d i s t \/ / , "" ) ,
108109 "module" : packageJsonParsed [ "module" ] . replace ( / ^ d i s t \/ / , "" ) ,
109110 "exports" : Object . fromEntries (
110- Object . entries ( packageJsonParsed [ "exports" ] ) . map ( ( [ path , obj ] ) => [
111- path ,
112- Object . fromEntries (
113- Object . entries ( obj as Record < string , string > ) . map (
114- ( [ type , path ] ) => [
115- type ,
116- path . replace ( / ^ \. \/ d i s t \/ / , "./" )
117- ]
118- )
119- )
111+ Object . entries ( packageJsonParsed [ "exports" ] ) . map ( ( [ key , value ] ) => [
112+ key ,
113+ ( assert ( typeof value === "string" ) ,
114+ value . replace ( / ^ \. \/ d i s t \/ / , "./" ) )
120115 ] )
121116 )
122117 } ;
You can’t perform that action at this time.
0 commit comments