Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-universal-import

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-universal-import - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

2

coverage/coverage-final.json

@@ -1,2 +0,2 @@

{"/home/travis/build/faceyspacey/babel-plugin-universal-import/index.js": {"path":"/home/travis/build/faceyspacey/babel-plugin-universal-import/index.js","statementMap":{"0":{"start":{"line":3,"column":23},"end":{"line":3,"column":62}},"1":{"start":{"line":5,"column":16},"end":{"line":5,"column":33}},"2":{"start":{"line":7,"column":33},"end":{"line":11,"column":1}},"3":{"start":{"line":13,"column":27},"end":{"line":17,"column":1}},"4":{"start":{"line":19,"column":28},"end":{"line":23,"column":1}},"5":{"start":{"line":26,"column":2},"end":{"line":26,"column":41}},"6":{"start":{"line":30,"column":2},"end":{"line":30,"column":47}},"7":{"start":{"line":34,"column":2},"end":{"line":34,"column":33}},"8":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"9":{"start":{"line":39,"column":4},"end":{"line":39,"column":56}},"10":{"start":{"line":42,"column":2},"end":{"line":42,"column":23}},"11":{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},"12":{"start":{"line":47,"column":17},"end":{"line":47,"column":46}},"13":{"start":{"line":48,"column":20},"end":{"line":48,"column":64}},"14":{"start":{"line":49,"column":4},"end":{"line":51,"column":6}},"15":{"start":{"line":53,"column":4},"end":{"line":53,"column":76}},"16":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"17":{"start":{"line":55,"column":4},"end":{"line":57,"column":6}},"18":{"start":{"line":60,"column":21},"end":{"line":60,"column":62}},"19":{"start":{"line":61,"column":2},"end":{"line":61,"column":36}},"20":{"start":{"line":65,"column":18},"end":{"line":65,"column":58}},"21":{"start":{"line":67,"column":2},"end":{"line":69,"column":4}},"22":{"start":{"line":73,"column":34},"end":{"line":73,"column":47}},"23":{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},"24":{"start":{"line":74,"column":15},"end":{"line":74,"column":63}},"25":{"start":{"line":76,"column":18},"end":{"line":76,"column":40}},"26":{"start":{"line":77,"column":25},"end":{"line":77,"column":47}},"27":{"start":{"line":78,"column":20},"end":{"line":78,"column":65}},"28":{"start":{"line":79,"column":2},"end":{"line":79,"column":40}},"29":{"start":{"line":83,"column":34},"end":{"line":83,"column":47}},"30":{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},"31":{"start":{"line":84,"column":15},"end":{"line":84,"column":41}},"32":{"start":{"line":86,"column":2},"end":{"line":91,"column":8}},"33":{"start":{"line":87,"column":14},"end":{"line":87,"column":32}},"34":{"start":{"line":88,"column":15},"end":{"line":88,"column":52}},"35":{"start":{"line":89,"column":4},"end":{"line":89,"column":35}},"36":{"start":{"line":90,"column":4},"end":{"line":90,"column":14}},"37":{"start":{"line":95,"column":13},"end":{"line":95,"column":45}},"38":{"start":{"line":96,"column":2},"end":{"line":96,"column":66}},"39":{"start":{"line":100,"column":2},"end":{"line":103,"column":3}},"40":{"start":{"line":107,"column":15},"end":{"line":121,"column":8}},"41":{"start":{"line":108,"column":22},"end":{"line":108,"column":40}},"42":{"start":{"line":109,"column":23},"end":{"line":109,"column":39}},"43":{"start":{"line":111,"column":4},"end":{"line":118,"column":5}},"44":{"start":{"line":112,"column":29},"end":{"line":115,"column":7}},"45":{"start":{"line":117,"column":6},"end":{"line":117,"column":34}},"46":{"start":{"line":120,"column":4},"end":{"line":120,"column":18}},"47":{"start":{"line":123,"column":2},"end":{"line":123,"column":33}},"48":{"start":{"line":127,"column":18},"end":{"line":127,"column":37}},"49":{"start":{"line":128,"column":20},"end":{"line":128,"column":59}},"50":{"start":{"line":130,"column":2},"end":{"line":130,"column":37}},"51":{"start":{"line":131,"column":2},"end":{"line":131,"column":69}},"52":{"start":{"line":133,"column":18},"end":{"line":133,"column":55}},"53":{"start":{"line":134,"column":15},"end":{"line":139,"column":15}},"54":{"start":{"line":141,"column":2},"end":{"line":141,"column":53}},"55":{"start":{"line":145,"column":15},"end":{"line":148,"column":15}},"56":{"start":{"line":150,"column":2},"end":{"line":150,"column":53}},"57":{"start":{"line":154,"column":18},"end":{"line":156,"column":15}},"58":{"start":{"line":158,"column":2},"end":{"line":158,"column":59}},"59":{"start":{"line":162,"column":20},"end":{"line":164,"column":15}},"60":{"start":{"line":166,"column":2},"end":{"line":166,"column":63}},"61":{"start":{"line":169,"column":0},"end":{"line":228,"column":1}},"62":{"start":{"line":170,"column":28},"end":{"line":170,"column":52}},"63":{"start":{"line":171,"column":23},"end":{"line":171,"column":69}},"64":{"start":{"line":172,"column":26},"end":{"line":172,"column":71}},"65":{"start":{"line":173,"column":23},"end":{"line":175,"column":3}},"66":{"start":{"line":177,"column":2},"end":{"line":227,"column":3}},"67":{"start":{"line":181,"column":8},"end":{"line":181,"column":30}},"68":{"start":{"line":181,"column":24},"end":{"line":181,"column":30}},"69":{"start":{"line":182,"column":8},"end":{"line":182,"column":25}},"70":{"start":{"line":184,"column":30},"end":{"line":184,"column":54}},"71":{"start":{"line":185,"column":32},"end":{"line":185,"column":70}},"72":{"start":{"line":186,"column":27},"end":{"line":188,"column":9}},"73":{"start":{"line":191,"column":8},"end":{"line":202,"column":9}},"74":{"start":{"line":195,"column":23},"end":{"line":198,"column":12}},"75":{"start":{"line":200,"column":10},"end":{"line":200,"column":40}},"76":{"start":{"line":201,"column":10},"end":{"line":201,"column":16}},"77":{"start":{"line":204,"column":21},"end":{"line":219,"column":11}},"78":{"start":{"line":221,"column":24},"end":{"line":221,"column":48}},"79":{"start":{"line":223,"column":21},"end":{"line":223,"column":65}},"80":{"start":{"line":224,"column":8},"end":{"line":224,"column":38}}},"fnMap":{"0":{"name":"getImportArgPath","decl":{"start":{"line":25,"column":9},"end":{"line":25,"column":25}},"loc":{"start":{"line":25,"column":29},"end":{"line":27,"column":1}},"line":25},"1":{"name":"trimChunkNameBaseDir","decl":{"start":{"line":29,"column":9},"end":{"line":29,"column":29}},"loc":{"start":{"line":29,"column":39},"end":{"line":31,"column":1}},"line":29},"2":{"name":"prepareChunkNamePath","decl":{"start":{"line":33,"column":9},"end":{"line":33,"column":29}},"loc":{"start":{"line":33,"column":36},"end":{"line":35,"column":1}},"line":33},"3":{"name":"getImport","decl":{"start":{"line":37,"column":9},"end":{"line":37,"column":18}},"loc":{"start":{"line":37,"column":48},"end":{"line":43,"column":1}},"line":37},"4":{"name":"createTrimmedChunkName","decl":{"start":{"line":45,"column":9},"end":{"line":45,"column":31}},"loc":{"start":{"line":45,"column":50},"end":{"line":62,"column":1}},"line":45},"5":{"name":"(anonymous_5)","decl":{"start":{"line":53,"column":24},"end":{"line":53,"column":25}},"loc":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"line":53},"6":{"name":"prepareQuasi","decl":{"start":{"line":64,"column":9},"end":{"line":64,"column":21}},"loc":{"start":{"line":64,"column":29},"end":{"line":70,"column":1}},"line":64},"7":{"name":"getMagicCommentChunkName","decl":{"start":{"line":72,"column":9},"end":{"line":72,"column":33}},"loc":{"start":{"line":72,"column":49},"end":{"line":80,"column":1}},"line":72},"8":{"name":"getComponentId","decl":{"start":{"line":82,"column":9},"end":{"line":82,"column":23}},"loc":{"start":{"line":82,"column":42},"end":{"line":92,"column":1}},"line":82},"9":{"name":"(anonymous_9)","decl":{"start":{"line":86,"column":23},"end":{"line":86,"column":24}},"loc":{"start":{"line":86,"column":42},"end":{"line":91,"column":3}},"line":86},"10":{"name":"idOption","decl":{"start":{"line":94,"column":9},"end":{"line":94,"column":17}},"loc":{"start":{"line":94,"column":36},"end":{"line":97,"column":1}},"line":94},"11":{"name":"fileOption","decl":{"start":{"line":99,"column":9},"end":{"line":99,"column":19}},"loc":{"start":{"line":99,"column":26},"end":{"line":104,"column":1}},"line":99},"12":{"name":"getCssOptionExpression","decl":{"start":{"line":106,"column":9},"end":{"line":106,"column":31}},"loc":{"start":{"line":106,"column":47},"end":{"line":124,"column":1}},"line":106},"13":{"name":"(anonymous_13)","decl":{"start":{"line":107,"column":46},"end":{"line":107,"column":47}},"loc":{"start":{"line":107,"column":67},"end":{"line":121,"column":3}},"line":107},"14":{"name":"loadOption","decl":{"start":{"line":126,"column":9},"end":{"line":126,"column":19}},"loc":{"start":{"line":126,"column":67},"end":{"line":142,"column":1}},"line":126},"15":{"name":"pathOption","decl":{"start":{"line":144,"column":9},"end":{"line":144,"column":19}},"loc":{"start":{"line":144,"column":55},"end":{"line":151,"column":1}},"line":144},"16":{"name":"resolveOption","decl":{"start":{"line":153,"column":9},"end":{"line":153,"column":22}},"loc":{"start":{"line":153,"column":58},"end":{"line":159,"column":1}},"line":153},"17":{"name":"chunkNameOption","decl":{"start":{"line":161,"column":9},"end":{"line":161,"column":24}},"loc":{"start":{"line":161,"column":62},"end":{"line":167,"column":1}},"line":161},"18":{"name":"universalImportPlugin","decl":{"start":{"line":169,"column":26},"end":{"line":169,"column":47}},"loc":{"start":{"line":169,"column":72},"end":{"line":228,"column":1}},"line":169}},"branchMap":{"0":{"loc":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},{"start":{"line":38,"column":2},"end":{"line":40,"column":3}}],"line":38},"1":{"loc":{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},{"start":{"line":46,"column":2},"end":{"line":58,"column":3}}],"line":46},"2":{"loc":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"type":"cond-expr","locations":[{"start":{"line":53,"column":47},"end":{"line":53,"column":66}},{"start":{"line":53,"column":69},"end":{"line":53,"column":74}}],"line":53},"3":{"loc":{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},"type":"if","locations":[{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},{"start":{"line":74,"column":2},"end":{"line":74,"column":63}}],"line":74},"4":{"loc":{"start":{"line":78,"column":31},"end":{"line":78,"column":64}},"type":"cond-expr","locations":[{"start":{"line":78,"column":48},"end":{"line":78,"column":59}},{"start":{"line":78,"column":62},"end":{"line":78,"column":64}}],"line":78},"5":{"loc":{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},"type":"if","locations":[{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},{"start":{"line":84,"column":2},"end":{"line":84,"column":41}}],"line":84},"6":{"loc":{"start":{"line":88,"column":15},"end":{"line":88,"column":52}},"type":"binary-expr","locations":[{"start":{"line":88,"column":15},"end":{"line":88,"column":29}},{"start":{"line":88,"column":33},"end":{"line":88,"column":52}}],"line":88},"7":{"loc":{"start":{"line":89,"column":11},"end":{"line":89,"column":35}},"type":"cond-expr","locations":[{"start":{"line":89,"column":16},"end":{"line":89,"column":31}},{"start":{"line":89,"column":34},"end":{"line":89,"column":35}}],"line":89},"8":{"loc":{"start":{"line":111,"column":4},"end":{"line":118,"column":5}},"type":"if","locations":[{"start":{"line":111,"column":4},"end":{"line":118,"column":5}},{"start":{"line":111,"column":4},"end":{"line":118,"column":5}}],"line":111},"9":{"loc":{"start":{"line":181,"column":8},"end":{"line":181,"column":30}},"type":"if","locations":[{"start":{"line":181,"column":8},"end":{"line":181,"column":30}},{"start":{"line":181,"column":8},"end":{"line":181,"column":30}}],"line":181},"10":{"loc":{"start":{"line":191,"column":8},"end":{"line":202,"column":9}},"type":"if","locations":[{"start":{"line":191,"column":8},"end":{"line":202,"column":9}},{"start":{"line":191,"column":8},"end":{"line":202,"column":9}}],"line":191},"11":{"loc":{"start":{"line":192,"column":10},"end":{"line":193,"column":59}},"type":"binary-expr","locations":[{"start":{"line":192,"column":10},"end":{"line":192,"column":53}},{"start":{"line":193,"column":10},"end":{"line":193,"column":59}}],"line":192},"12":{"loc":{"start":{"line":204,"column":21},"end":{"line":219,"column":11}},"type":"cond-expr","locations":[{"start":{"line":205,"column":12},"end":{"line":211,"column":11}},{"start":{"line":212,"column":12},"end":{"line":219,"column":11}}],"line":204}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":25,"6":36,"7":11,"8":37,"9":37,"10":37,"11":24,"12":15,"13":15,"14":15,"15":15,"16":26,"17":15,"18":9,"19":9,"20":11,"21":11,"22":12,"23":12,"24":4,"25":8,"26":8,"27":8,"28":8,"29":12,"30":12,"31":5,"32":7,"33":12,"34":12,"35":12,"36":12,"37":12,"38":12,"39":12,"40":12,"41":12,"42":12,"43":12,"44":1,"45":1,"46":12,"47":12,"48":12,"49":12,"50":12,"51":12,"52":12,"53":12,"54":12,"55":12,"56":12,"57":12,"58":12,"59":12,"60":12,"61":1,"62":14,"63":14,"64":14,"65":14,"66":14,"67":25,"68":12,"69":13,"70":13,"71":13,"72":13,"73":13,"74":1,"75":1,"76":1,"77":12,"78":12,"79":12,"80":12},"f":{"0":25,"1":36,"2":11,"3":37,"4":24,"5":26,"6":11,"7":12,"8":12,"9":12,"10":12,"11":12,"12":12,"13":12,"14":12,"15":12,"16":12,"17":12,"18":14},"b":{"0":[37,0],"1":[15,9],"2":[11,15],"3":[4,8],"4":[6,2],"5":[5,7],"6":[12,5],"7":[5,7],"8":[1,11],"9":[12,13],"10":[1,12],"11":[13,13],"12":[1,11]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"86173a3924c4e2158da437651720faefd2646991"}
{"/home/travis/build/faceyspacey/babel-plugin-universal-import/index.js": {"path":"/home/travis/build/faceyspacey/babel-plugin-universal-import/index.js","statementMap":{"0":{"start":{"line":3,"column":23},"end":{"line":3,"column":62}},"1":{"start":{"line":5,"column":16},"end":{"line":5,"column":33}},"2":{"start":{"line":7,"column":33},"end":{"line":11,"column":1}},"3":{"start":{"line":13,"column":27},"end":{"line":17,"column":1}},"4":{"start":{"line":19,"column":28},"end":{"line":23,"column":1}},"5":{"start":{"line":26,"column":2},"end":{"line":26,"column":41}},"6":{"start":{"line":30,"column":2},"end":{"line":30,"column":47}},"7":{"start":{"line":34,"column":2},"end":{"line":34,"column":33}},"8":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"9":{"start":{"line":39,"column":4},"end":{"line":39,"column":56}},"10":{"start":{"line":42,"column":2},"end":{"line":42,"column":23}},"11":{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},"12":{"start":{"line":47,"column":17},"end":{"line":47,"column":46}},"13":{"start":{"line":48,"column":20},"end":{"line":48,"column":64}},"14":{"start":{"line":49,"column":4},"end":{"line":51,"column":6}},"15":{"start":{"line":53,"column":4},"end":{"line":53,"column":76}},"16":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"17":{"start":{"line":55,"column":4},"end":{"line":57,"column":6}},"18":{"start":{"line":60,"column":21},"end":{"line":60,"column":62}},"19":{"start":{"line":61,"column":2},"end":{"line":61,"column":36}},"20":{"start":{"line":65,"column":18},"end":{"line":65,"column":58}},"21":{"start":{"line":67,"column":2},"end":{"line":69,"column":4}},"22":{"start":{"line":73,"column":34},"end":{"line":73,"column":47}},"23":{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},"24":{"start":{"line":74,"column":15},"end":{"line":74,"column":63}},"25":{"start":{"line":76,"column":18},"end":{"line":76,"column":40}},"26":{"start":{"line":77,"column":25},"end":{"line":77,"column":47}},"27":{"start":{"line":78,"column":20},"end":{"line":78,"column":65}},"28":{"start":{"line":79,"column":2},"end":{"line":79,"column":40}},"29":{"start":{"line":83,"column":34},"end":{"line":83,"column":47}},"30":{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},"31":{"start":{"line":84,"column":15},"end":{"line":84,"column":41}},"32":{"start":{"line":86,"column":2},"end":{"line":91,"column":8}},"33":{"start":{"line":87,"column":14},"end":{"line":87,"column":32}},"34":{"start":{"line":88,"column":15},"end":{"line":88,"column":52}},"35":{"start":{"line":89,"column":4},"end":{"line":89,"column":35}},"36":{"start":{"line":90,"column":4},"end":{"line":90,"column":14}},"37":{"start":{"line":95,"column":30},"end":{"line":95,"column":43}},"38":{"start":{"line":96,"column":2},"end":{"line":110,"column":3}},"39":{"start":{"line":101,"column":4},"end":{"line":109,"column":5}},"40":{"start":{"line":102,"column":6},"end":{"line":105,"column":15}},"41":{"start":{"line":108,"column":6},"end":{"line":108,"column":17}},"42":{"start":{"line":111,"column":2},"end":{"line":111,"column":13}},"43":{"start":{"line":115,"column":13},"end":{"line":115,"column":45}},"44":{"start":{"line":116,"column":2},"end":{"line":116,"column":66}},"45":{"start":{"line":120,"column":2},"end":{"line":123,"column":3}},"46":{"start":{"line":127,"column":15},"end":{"line":141,"column":8}},"47":{"start":{"line":128,"column":22},"end":{"line":128,"column":40}},"48":{"start":{"line":129,"column":23},"end":{"line":129,"column":39}},"49":{"start":{"line":131,"column":4},"end":{"line":138,"column":5}},"50":{"start":{"line":132,"column":29},"end":{"line":135,"column":7}},"51":{"start":{"line":137,"column":6},"end":{"line":137,"column":34}},"52":{"start":{"line":140,"column":4},"end":{"line":140,"column":18}},"53":{"start":{"line":143,"column":2},"end":{"line":143,"column":33}},"54":{"start":{"line":147,"column":18},"end":{"line":147,"column":37}},"55":{"start":{"line":148,"column":29},"end":{"line":148,"column":68}},"56":{"start":{"line":149,"column":28},"end":{"line":149,"column":47}},"57":{"start":{"line":150,"column":20},"end":{"line":150,"column":59}},"58":{"start":{"line":151,"column":27},"end":{"line":153,"column":46}},"59":{"start":{"line":155,"column":2},"end":{"line":155,"column":37}},"60":{"start":{"line":156,"column":2},"end":{"line":156,"column":69}},"61":{"start":{"line":158,"column":18},"end":{"line":158,"column":55}},"62":{"start":{"line":159,"column":15},"end":{"line":164,"column":15}},"63":{"start":{"line":166,"column":2},"end":{"line":166,"column":53}},"64":{"start":{"line":170,"column":15},"end":{"line":173,"column":15}},"65":{"start":{"line":175,"column":2},"end":{"line":175,"column":53}},"66":{"start":{"line":179,"column":18},"end":{"line":181,"column":15}},"67":{"start":{"line":183,"column":2},"end":{"line":183,"column":59}},"68":{"start":{"line":187,"column":28},"end":{"line":187,"column":47}},"69":{"start":{"line":188,"column":25},"end":{"line":188,"column":65}},"70":{"start":{"line":189,"column":27},"end":{"line":191,"column":20}},"71":{"start":{"line":193,"column":20},"end":{"line":195,"column":15}},"72":{"start":{"line":197,"column":2},"end":{"line":197,"column":63}},"73":{"start":{"line":200,"column":0},"end":{"line":262,"column":1}},"74":{"start":{"line":201,"column":28},"end":{"line":201,"column":52}},"75":{"start":{"line":202,"column":23},"end":{"line":202,"column":69}},"76":{"start":{"line":203,"column":26},"end":{"line":203,"column":71}},"77":{"start":{"line":204,"column":23},"end":{"line":206,"column":3}},"78":{"start":{"line":208,"column":2},"end":{"line":261,"column":3}},"79":{"start":{"line":212,"column":8},"end":{"line":212,"column":30}},"80":{"start":{"line":212,"column":24},"end":{"line":212,"column":30}},"81":{"start":{"line":213,"column":8},"end":{"line":213,"column":25}},"82":{"start":{"line":215,"column":30},"end":{"line":215,"column":54}},"83":{"start":{"line":216,"column":8},"end":{"line":216,"column":74}},"84":{"start":{"line":217,"column":32},"end":{"line":217,"column":70}},"85":{"start":{"line":219,"column":27},"end":{"line":221,"column":9}},"86":{"start":{"line":224,"column":8},"end":{"line":235,"column":9}},"87":{"start":{"line":228,"column":23},"end":{"line":231,"column":12}},"88":{"start":{"line":233,"column":10},"end":{"line":233,"column":40}},"89":{"start":{"line":234,"column":10},"end":{"line":234,"column":16}},"90":{"start":{"line":237,"column":21},"end":{"line":252,"column":11}},"91":{"start":{"line":254,"column":24},"end":{"line":254,"column":48}},"92":{"start":{"line":256,"column":21},"end":{"line":256,"column":65}},"93":{"start":{"line":257,"column":8},"end":{"line":257,"column":34}},"94":{"start":{"line":258,"column":8},"end":{"line":258,"column":38}}},"fnMap":{"0":{"name":"getImportArgPath","decl":{"start":{"line":25,"column":9},"end":{"line":25,"column":25}},"loc":{"start":{"line":25,"column":29},"end":{"line":27,"column":1}},"line":25},"1":{"name":"trimChunkNameBaseDir","decl":{"start":{"line":29,"column":9},"end":{"line":29,"column":29}},"loc":{"start":{"line":29,"column":39},"end":{"line":31,"column":1}},"line":29},"2":{"name":"prepareChunkNamePath","decl":{"start":{"line":33,"column":9},"end":{"line":33,"column":29}},"loc":{"start":{"line":33,"column":36},"end":{"line":35,"column":1}},"line":33},"3":{"name":"getImport","decl":{"start":{"line":37,"column":9},"end":{"line":37,"column":18}},"loc":{"start":{"line":37,"column":48},"end":{"line":43,"column":1}},"line":37},"4":{"name":"createTrimmedChunkName","decl":{"start":{"line":45,"column":9},"end":{"line":45,"column":31}},"loc":{"start":{"line":45,"column":50},"end":{"line":62,"column":1}},"line":45},"5":{"name":"(anonymous_5)","decl":{"start":{"line":53,"column":24},"end":{"line":53,"column":25}},"loc":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"line":53},"6":{"name":"prepareQuasi","decl":{"start":{"line":64,"column":9},"end":{"line":64,"column":21}},"loc":{"start":{"line":64,"column":29},"end":{"line":70,"column":1}},"line":64},"7":{"name":"getMagicCommentChunkName","decl":{"start":{"line":72,"column":9},"end":{"line":72,"column":33}},"loc":{"start":{"line":72,"column":49},"end":{"line":80,"column":1}},"line":72},"8":{"name":"getComponentId","decl":{"start":{"line":82,"column":9},"end":{"line":82,"column":23}},"loc":{"start":{"line":82,"column":42},"end":{"line":92,"column":1}},"line":82},"9":{"name":"(anonymous_9)","decl":{"start":{"line":86,"column":23},"end":{"line":86,"column":24}},"loc":{"start":{"line":86,"column":42},"end":{"line":91,"column":3}},"line":86},"10":{"name":"existingMagicCommentChunkName","decl":{"start":{"line":94,"column":9},"end":{"line":94,"column":38}},"loc":{"start":{"line":94,"column":54},"end":{"line":112,"column":1}},"line":94},"11":{"name":"idOption","decl":{"start":{"line":114,"column":9},"end":{"line":114,"column":17}},"loc":{"start":{"line":114,"column":36},"end":{"line":117,"column":1}},"line":114},"12":{"name":"fileOption","decl":{"start":{"line":119,"column":9},"end":{"line":119,"column":19}},"loc":{"start":{"line":119,"column":26},"end":{"line":124,"column":1}},"line":119},"13":{"name":"getCssOptionExpression","decl":{"start":{"line":126,"column":9},"end":{"line":126,"column":31}},"loc":{"start":{"line":126,"column":47},"end":{"line":144,"column":1}},"line":126},"14":{"name":"(anonymous_14)","decl":{"start":{"line":127,"column":46},"end":{"line":127,"column":47}},"loc":{"start":{"line":127,"column":67},"end":{"line":141,"column":3}},"line":127},"15":{"name":"loadOption","decl":{"start":{"line":146,"column":9},"end":{"line":146,"column":19}},"loc":{"start":{"line":146,"column":67},"end":{"line":167,"column":1}},"line":146},"16":{"name":"pathOption","decl":{"start":{"line":169,"column":9},"end":{"line":169,"column":19}},"loc":{"start":{"line":169,"column":55},"end":{"line":176,"column":1}},"line":169},"17":{"name":"resolveOption","decl":{"start":{"line":178,"column":9},"end":{"line":178,"column":22}},"loc":{"start":{"line":178,"column":58},"end":{"line":184,"column":1}},"line":178},"18":{"name":"chunkNameOption","decl":{"start":{"line":186,"column":9},"end":{"line":186,"column":24}},"loc":{"start":{"line":186,"column":62},"end":{"line":198,"column":1}},"line":186},"19":{"name":"universalImportPlugin","decl":{"start":{"line":200,"column":26},"end":{"line":200,"column":47}},"loc":{"start":{"line":200,"column":72},"end":{"line":262,"column":1}},"line":200}},"branchMap":{"0":{"loc":{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},"type":"if","locations":[{"start":{"line":38,"column":2},"end":{"line":40,"column":3}},{"start":{"line":38,"column":2},"end":{"line":40,"column":3}}],"line":38},"1":{"loc":{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},"type":"if","locations":[{"start":{"line":46,"column":2},"end":{"line":58,"column":3}},{"start":{"line":46,"column":2},"end":{"line":58,"column":3}}],"line":46},"2":{"loc":{"start":{"line":53,"column":39},"end":{"line":53,"column":74}},"type":"cond-expr","locations":[{"start":{"line":53,"column":47},"end":{"line":53,"column":66}},{"start":{"line":53,"column":69},"end":{"line":53,"column":74}}],"line":53},"3":{"loc":{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},"type":"if","locations":[{"start":{"line":74,"column":2},"end":{"line":74,"column":63}},{"start":{"line":74,"column":2},"end":{"line":74,"column":63}}],"line":74},"4":{"loc":{"start":{"line":78,"column":31},"end":{"line":78,"column":64}},"type":"cond-expr","locations":[{"start":{"line":78,"column":48},"end":{"line":78,"column":59}},{"start":{"line":78,"column":62},"end":{"line":78,"column":64}}],"line":78},"5":{"loc":{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},"type":"if","locations":[{"start":{"line":84,"column":2},"end":{"line":84,"column":41}},{"start":{"line":84,"column":2},"end":{"line":84,"column":41}}],"line":84},"6":{"loc":{"start":{"line":88,"column":15},"end":{"line":88,"column":52}},"type":"binary-expr","locations":[{"start":{"line":88,"column":15},"end":{"line":88,"column":29}},{"start":{"line":88,"column":33},"end":{"line":88,"column":52}}],"line":88},"7":{"loc":{"start":{"line":89,"column":11},"end":{"line":89,"column":35}},"type":"cond-expr","locations":[{"start":{"line":89,"column":16},"end":{"line":89,"column":31}},{"start":{"line":89,"column":34},"end":{"line":89,"column":35}}],"line":89},"8":{"loc":{"start":{"line":96,"column":2},"end":{"line":110,"column":3}},"type":"if","locations":[{"start":{"line":96,"column":2},"end":{"line":110,"column":3}},{"start":{"line":96,"column":2},"end":{"line":110,"column":3}}],"line":96},"9":{"loc":{"start":{"line":97,"column":4},"end":{"line":99,"column":63}},"type":"binary-expr","locations":[{"start":{"line":97,"column":4},"end":{"line":97,"column":19}},{"start":{"line":98,"column":4},"end":{"line":98,"column":26}},{"start":{"line":99,"column":4},"end":{"line":99,"column":63}}],"line":97},"10":{"loc":{"start":{"line":131,"column":4},"end":{"line":138,"column":5}},"type":"if","locations":[{"start":{"line":131,"column":4},"end":{"line":138,"column":5}},{"start":{"line":131,"column":4},"end":{"line":138,"column":5}}],"line":131},"11":{"loc":{"start":{"line":150,"column":20},"end":{"line":150,"column":59}},"type":"binary-expr","locations":[{"start":{"line":150,"column":20},"end":{"line":150,"column":37}},{"start":{"line":150,"column":41},"end":{"line":150,"column":59}}],"line":150},"12":{"loc":{"start":{"line":151,"column":27},"end":{"line":153,"column":46}},"type":"cond-expr","locations":[{"start":{"line":152,"column":6},"end":{"line":152,"column":40}},{"start":{"line":153,"column":6},"end":{"line":153,"column":46}}],"line":151},"13":{"loc":{"start":{"line":189,"column":27},"end":{"line":191,"column":20}},"type":"cond-expr","locations":[{"start":{"line":190,"column":6},"end":{"line":190,"column":40}},{"start":{"line":191,"column":6},"end":{"line":191,"column":20}}],"line":189},"14":{"loc":{"start":{"line":212,"column":8},"end":{"line":212,"column":30}},"type":"if","locations":[{"start":{"line":212,"column":8},"end":{"line":212,"column":30}},{"start":{"line":212,"column":8},"end":{"line":212,"column":30}}],"line":212},"15":{"loc":{"start":{"line":224,"column":8},"end":{"line":235,"column":9}},"type":"if","locations":[{"start":{"line":224,"column":8},"end":{"line":235,"column":9}},{"start":{"line":224,"column":8},"end":{"line":235,"column":9}}],"line":224},"16":{"loc":{"start":{"line":225,"column":10},"end":{"line":226,"column":59}},"type":"binary-expr","locations":[{"start":{"line":225,"column":10},"end":{"line":225,"column":53}},{"start":{"line":226,"column":10},"end":{"line":226,"column":59}}],"line":225},"17":{"loc":{"start":{"line":237,"column":21},"end":{"line":252,"column":11}},"type":"cond-expr","locations":[{"start":{"line":238,"column":12},"end":{"line":244,"column":11}},{"start":{"line":245,"column":12},"end":{"line":252,"column":11}}],"line":237}},"s":{"0":1,"1":1,"2":1,"3":1,"4":1,"5":27,"6":38,"7":11,"8":40,"9":40,"10":40,"11":25,"12":15,"13":15,"14":15,"15":15,"16":26,"17":15,"18":10,"19":10,"20":11,"21":11,"22":13,"23":13,"24":5,"25":8,"26":8,"27":8,"28":8,"29":13,"30":13,"31":6,"32":7,"33":12,"34":12,"35":12,"36":12,"37":14,"38":14,"39":1,"40":1,"41":0,"42":13,"43":13,"44":13,"45":13,"46":13,"47":13,"48":13,"49":13,"50":1,"51":1,"52":13,"53":13,"54":13,"55":13,"56":13,"57":13,"58":13,"59":13,"60":13,"61":13,"62":13,"63":13,"64":13,"65":13,"66":13,"67":13,"68":13,"69":13,"70":13,"71":13,"72":13,"73":1,"74":15,"75":15,"76":15,"77":15,"78":15,"79":27,"80":13,"81":14,"82":14,"83":14,"84":14,"85":14,"86":14,"87":1,"88":1,"89":1,"90":13,"91":13,"92":13,"93":13,"94":13},"f":{"0":27,"1":38,"2":11,"3":40,"4":25,"5":26,"6":11,"7":13,"8":13,"9":12,"10":14,"11":13,"12":13,"13":13,"14":13,"15":13,"16":13,"17":13,"18":13,"19":15},"b":{"0":[40,0],"1":[15,10],"2":[11,15],"3":[5,8],"4":[6,2],"5":[6,7],"6":[12,5],"7":[5,7],"8":[1,13],"9":[14,1,1],"10":[1,12],"11":[13,12],"12":[1,12],"13":[1,12],"14":[13,14],"15":[1,13],"16":[14,14],"17":[1,12]},"_coverageSchema":"332fd63041d2c1bcb487cc26dd0d5f7d97098a6c","hash":"6698c357ffa08af77e6037ce63a8b348a2479e8a"}
}

@@ -94,2 +94,22 @@ 'use-strict'

function existingMagicCommentChunkName(importArgNode) {
const { leadingComments } = importArgNode
if (
leadingComments &&
leadingComments.length &&
leadingComments[0].value.indexOf('webpackChunkName') !== -1
) {
try {
return leadingComments[0].value
.split('webpackChunkName:')[1]
.replace(/["']/g, '')
.trim()
}
catch (e) {
return null
}
}
return null
}
function idOption(t, importArgNode) {

@@ -129,3 +149,8 @@ const id = getComponentId(t, importArgNode)

const argPath = getImportArgPath(p)
const chunkName = getMagicCommentChunkName(importArgNode)
const generatedChunkName = getMagicCommentChunkName(importArgNode)
const existingChunkName = t.existingChunkName
const chunkName = existingChunkName || generatedChunkName
const trimmedChunkName = existingChunkName
? t.stringLiteral(existingChunkName)
: createTrimmedChunkName(t, importArgNode)

@@ -139,3 +164,3 @@ delete argPath.node.leadingComments

IMPORT_CSS: getImport(p, IMPORT_CSS_DEFAULT),
MODULE: createTrimmedChunkName(t, importArgNode),
MODULE: trimmedChunkName,
CSS_OPTIONS: cssOpts

@@ -165,4 +190,10 @@ }).expression

function chunkNameOption(t, chunkNameTemplate, importArgNode) {
const existingChunkName = t.existingChunkName
const generatedChunk = createTrimmedChunkName(t, importArgNode)
const trimmedChunkName = existingChunkName
? t.stringLiteral(existingChunkName)
: generatedChunk
const chunkName = chunkNameTemplate({
MODULE: createTrimmedChunkName(t, importArgNode)
MODULE: trimmedChunkName
}).expression

@@ -189,3 +220,5 @@

const importArgNode = getImportArgPath(p).node
t.existingChunkName = existingMagicCommentChunkName(importArgNode)
const universalImport = getImport(p, IMPORT_UNIVERSAL_DEFAULT)
const cssOptions = {

@@ -229,2 +262,3 @@ disableWarnings: this.opts.disableWarnings

const func = t.callExpression(universalImport, [options])
delete t.existingChunkName
p.parentPath.replaceWith(func)

@@ -231,0 +265,0 @@ }

{
"name": "babel-plugin-universal-import",
"version": "1.4.0",
"version": "1.5.0",
"description": "Babel plugin to transform import() into its Universal counterpart",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc