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 9
9
} from "../bin/only-include-used-icons" ;
10
10
import * as child_process from "child_process" ;
11
11
import { oppa } from "oppa" ;
12
+ import { assert } from "tsafe/assert" ;
12
13
13
14
( async ( ) => {
14
15
const { args } = oppa ( )
@@ -107,16 +108,10 @@ import { oppa } from "oppa";
107
108
"types" : packageJsonParsed [ "types" ] . replace ( / ^ d i s t \/ / , "" ) ,
108
109
"module" : packageJsonParsed [ "module" ] . replace ( / ^ d i s t \/ / , "" ) ,
109
110
"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 \/ / , "./" ) )
120
115
] )
121
116
)
122
117
} ;
You can’t perform that action at this time.
0 commit comments