diff --git a/.gitignore b/.gitignore index 065c0438da279..efd010de30823 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,5 @@ npm-debug.log .jshintrc .eslintrc .nyc_output +/test/npm_cache* +/node_modules/.cache diff --git a/node_modules/.cache/esm/.data.blob b/node_modules/.cache/esm/.data.blob deleted file mode 100644 index 543c2293e775f..0000000000000 Binary files a/node_modules/.cache/esm/.data.blob and /dev/null differ diff --git a/node_modules/.cache/esm/.data.json b/node_modules/.cache/esm/.data.json deleted file mode 100644 index ea2f401359eed..0000000000000 --- a/node_modules/.cache/esm/.data.json +++ /dev/null @@ -1 +0,0 @@ -{"map":{"4bcc64991c6776e8.js":[0,1752],"07779371102d3fc1.js":[1752,38208],"a1dd45ce1c6776e8.js":[38208,43672],"c68f82579bbbcb4f.js":[43672,51408],"6eea19f448f2574f.js":[51408,61696],"a96a3ae99bbbcb4f.js":[61696,62944],"249b34c99bbbcb4f.js":[62944,64760],"d16752391c6776e8.js":[64760,66904],"6368250b3460ae95.js":[66904,79360],"fd9a39b63460ae95.js":[79360,86200],"827da7f13460ae95.js":[86200,87576],"e380589c3460ae95.js":[87576,105600],"5c89a8627f0b843f.js":[105600,106840],"757252ca2f95aacc.js":[106840,110144],"f1377aed2d350237.js":[110144,111840],"90c86af42d350237.js":[111840,113240],"6c86a43bf1f0a572.js":[113240,116984],"27cf29e11771f47f.js":[116984,119272],"a126fac52d350237.js":[119272,120944],"903ec97349f7d246.js":[120944,128296],"d6b1a5cc2d350237.js":[128296,129560],"652a22bd2d350237.js":[129560,130968],"e46041010def8cae.js":[130968,134472],"bf748d6e38c80f31.js":[134472,136072],"8fb3696b3460ae95.js":[136072,145672],"6e772bec2969ec97.js":[145672,146704],"3eb4319591adc060.js":[146704,148120],"46bcf78dc8a0631a.js":[148120,173024],"90d78488a62b48f9.js":[173024,183944],"7a844a99a62b48f9.js":[183944,189440],"106fca49a62b48f9.js":[189440,190584],"15be35003460ae95.js":[190584,191520],"ce123ba33460ae95.js":[191520,194520],"0901d4793460ae95.js":[194520,202960],"c4b8157a3460ae95.js":[202960,204576],"72d522f73460ae95.js":[204576,205728],"87d535e03460ae95.js":[205728,207008],"95ebed323460ae95.js":[207008,208664],"5daa52f93460ae95.js":[208664,214208],"60f2c5c03460ae95.js":[214208,218344],"032dd61a3460ae95.js":[218344,219464],"2eae96eb3460ae95.js":[219464,220912],"56220cae3460ae95.js":[220912,222168],"308ed2fc3460ae95.js":[222168,223480],"10bef34d3460ae95.js":[223480,224792],"982d93843460ae95.js":[224792,226104],"b810cce53460ae95.js":[226104,228896],"ceb824843460ae95.js":[228896,231408],"4020db4a3460ae95.js":[231408,235080],"b084cffd3460ae95.js":[235080,237496],"5ecd93133460ae95.js":[237496,239744],"9e647a303460ae95.js":[239744,240952],"14e198bc3460ae95.js":[240952,243040],"826ad8153460ae95.js":[243040,244584],"b0cb623d3460ae95.js":[244584,246032],"22094b093460ae95.js":[246032,247488],"e621b50e3460ae95.js":[247488,248944],"9a2117653460ae95.js":[248944,250656],"770b039b3460ae95.js":[250656,252352],"b445ec493460ae95.js":[252352,254408],"6050b3aedc569a8e.js":[254408,373832],"a57cc8d83460ae95.js":[373832,381472],"5bbeb335c511c9bd.js":[381472,382760],"0f5628d0f8371d23.js":[382760,384184],"fea194433460ae95.js":[384184,385632],"5a090291b1265ae5.js":[385632,387616],"3f171c9a0e13a01b.js":[387616,389504],"0b74009b3460ae95.js":[389504,390464],"3181bd913460ae95.js":[390464,393480],"6ce3e36a3460ae95.js":[393480,401936],"c41fb0f13460ae95.js":[401936,403568],"7ae873b23460ae95.js":[403568,404744],"d19c33293460ae95.js":[404744,406040],"f6a5ab073460ae95.js":[406040,407712],"7ac8e63d3460ae95.js":[407712,413272],"885439923460ae95.js":[413272,417424],"79b103f53460ae95.js":[417424,418560],"4ca9cd073460ae95.js":[418560,420024],"6368eaff3460ae95.js":[420024,421296],"6069c96e3460ae95.js":[421296,422624],"8fbe9f5d3460ae95.js":[422624,423952],"8a3e95f93460ae95.js":[423952,425280],"fe6ea95f3460ae95.js":[425280,428096],"d61181383460ae95.js":[428096,430632],"8c9da74d3460ae95.js":[430632,434320],"5fd4a5d53460ae95.js":[434320,436752],"c864808c3460ae95.js":[436752,439016],"37bde71c3460ae95.js":[439016,440240],"5522f9cb3460ae95.js":[440240,442344],"8379b1a23460ae95.js":[442344,443912],"3e818da03460ae95.js":[443912,445376],"0d4f801b3460ae95.js":[445376,446848],"38d5fbe53460ae95.js":[446848,448320],"1f248b433460ae95.js":[448320,450056],"b58e74223460ae95.js":[450056,451768],"e488e6883460ae95.js":[451768,453840],"3987a10c3460ae95.js":[453840,461496],"e79a9a501194c3a5.js":[461496,463504],"45d39669cbdc1c10.js":[463504,464632],"5ea879023460ae95.js":[464632,467536],"a31ecd733460ae95.js":[467536,469856],"72689e479e359637.js":[469856,473480],"c7d681d33f17741b.js":[473480,475016],"27b7990376a950ed.js":[475016,478672],"c2d48a565cb21162.js":[478672,486064],"bd95a1cbd474824b.js":[486064,488112],"a3a26e99ae734216.js":[488112,490800],"c308578be3273571.js":[490800,497160],"ffaea61438c80f31.js":[497160,500176],"375fe35ff2e24126.js":[500176,501304],"d1731f2011605f62.js":[501304,502512],"a5de0d2826f71cbd.js":[502512,503672],"4731d2d76e3c28bb.js":[503672,504864],"d6203195c0d1aa4c.js":[504864,509312],"f810c3c25cb21162.js":[509312,511976],"6ac702a2093aad81.js":[511976,513472],"154f862343ba6642.js":[513472,515144],"1ed6ea1c08b4b70b.js":[515144,516984],"c1140e9562c93b7f.js":[516984,522232],"8deaf0ac996a8177.js":[522232,523960],"3de39d621c6776e8.js":[523960,527320],"59f2e0071283d877.js":[527320,535656],"fb4897290bfb3d6d.js":[535656,537624],"1a6108d8bca64684.js":[537624,538592],"8a21561722a312d9.js":[538592,539760],"16421eda4e407b87.js":[539760,559368],"01261cd23ab0e665.js":[559368,571192],"38864d2359f798f7.js":[571192,574128],"37f69b8322a312d9.js":[574128,579584],"146a6fb6f6ab2d78.js":[579584,582904],"f2dcb7814e407b87.js":[582904,585432],"0801a3e559f798f7.js":[585432,589240],"91312eeef6ab2d78.js":[589240,591448],"7a207b7f4e407b87.js":[591448,595536],"3b6504b7ce30065f.js":[595536,598904],"20ca4040ce30065f.js":[598904,619144],"68dcb23f59f798f7.js":[619144,622664],"72af042ece30065f.js":[622664,624392],"240b3df26019de8d.js":[624392,626160],"e9b305996019de8d.js":[626160,628352],"ff5f8efd22a312d9.js":[628352,630824],"2fedd8d8ce30065f.js":[630824,634880],"ea698191ce30065f.js":[634880,637368],"27d4b716f6ab2d78.js":[637368,641896],"d7aa69db6019de8d.js":[641896,650544],"f77f61ac6019de8d.js":[650544,653920],"95efb346ce30065f.js":[653920,656872],"817825ca3ab0e665.js":[656872,661952],"bafeb4083ab0e665.js":[661952,664768],"56a561736019de8d.js":[664768,669088],"b79539064e407b87.js":[669088,671200],"479d2c594e407b87.js":[671200,675848],"76f7b8ff4e407b87.js":[675848,679400],"d97349c3f6ab2d78.js":[679400,681392],"b72c85c5f6ab2d78.js":[681392,685368],"7b6e32b2f6ab2d78.js":[685368,687808],"71a30454f6ab2d78.js":[687808,692816],"e7db54a959f798f7.js":[692816,694416],"aeda560a59f798f7.js":[694416,696480],"87362b4e22a312d9.js":[696480,698096],"5586a11b51b24006.js":[698096,703040],"9ac01a63935dfc39.js":[703040,712296],"5475fe4c40df4ebc.js":[712296,713440],"227c33840665057b.js":[713440,717352],"510e81c30665057b.js":[717352,718888],"d1c3f9ce0665057b.js":[718888,720808],"8e20b5f10665057b.js":[720808,722968],"36631fd8238e0b35.js":[722968,724768],"daaf293e7463c2d9.js":[724768,734312],"31081960bdce2192.js":[734312,735784],"f434313b3ee24c75.js":[735784,736856],"a17ba878238e0b35.js":[736856,737816],"3261b6e792a2169a.js":[737816,740048],"6f41350157c5e159.js":[740048,742760],"7b44115b7463c2d9.js":[742760,745496],"63450b397463c2d9.js":[745496,746952],"679e71b47463c2d9.js":[746952,755856],"d3dc197e8b779c65.js":[755856,756800],"e3d61160fe36a6b0.js":[756800,759760],"01779f587463c2d9.js":[759760,762352],"40fcb2acfe36a6b0.js":[762352,763848],"91d7a96a683ad6b7.js":[763848,766760],"25e63cfe972ddad4.js":[766760,776224],"d5a4c405ecb80881.js":[776224,779024],"d5999af52fedb1ff.js":[779024,784520],"9ebac256ecb80881.js":[784520,787368],"5c9e03cf49079e39.js":[787368,788880],"e21651cc49079e39.js":[788880,790208],"fbecb1a3cbc5d127.js":[790208,791320],"baedcd891ce2ef79.js":[791320,792568],"1c9c43b78b33cd74.js":[792568,793552],"cbe65477ba275939.js":[793552,794648],"5bb5e7836c6a128c.js":[794648,795688],"16523bc05349cf7e.js":[795688,803944],"4de5acaca25a4350.js":[803944,807312],"7daeadebaceb6ced.js":[807312,808496],"21a859f3972ddad4.js":[808496,809816],"f48ef244972ddad4.js":[809816,811080],"6c0723c1aceb6ced.js":[811080,813072],"5dfe04f9b4c20ead.js":[813072,814768],"f4680d3c972ddad4.js":[814768,816592],"a567b3efaceb6ced.js":[816592,819664],"50221e77aceb6ced.js":[819664,825584],"d7715799ccece38f.js":[825584,827104],"44a41bb6aceb6ced.js":[827104,828056],"8c33a612ecb80881.js":[828056,829536],"f7ab9487aceb6ced.js":[829536,830440],"03a60fdaecb80881.js":[830440,831328],"c2ba3110ecb80881.js":[831328,832488],"f138e94cf4133dc8.js":[832488,834344],"ceeb92101f2264ec.js":[834344,835448],"8aa784711f2264ec.js":[835448,836768],"5816381c1f2264ec.js":[836768,837808],"893410ef1f2264ec.js":[837808,839056],"78a3d8d81c6776e8.js":[839056,842648],"f19ce16328bda81e.js":[842648,848960],"f682f2e9ea9569f7.js":[848960,874792],"88a0f006b9a39d4c.js":[874792,879232],"5f4fe0a5b20f2265.js":[879232,898784],"cc0ef42a94a4f78f.js":[898784,908440],"22e182f768114fc0.js":[908440,914976],"ad517b9b26f71cbd.js":[914976,921984],"c0246a70fe23931b.js":[921984,943776],"e9fb4171ee517069.js":[943776,954128],"0e6a102302268973.js":[954128,957048],"7cd7f6520f15dd9e.js":[957048,961880],"76b3a14ee2d10c0a.js":[961880,963896],"f282b8bce0c24f5a.js":[963896,965744],"9bbd50c51b1644eb.js":[965744,969272],"5d0c035f16f5a463.js":[969272,973024],"b0e99c110479711c.js":[973024,976448],"0ca982f416f5a463.js":[976448,977616],"50eee1bc16f5a463.js":[977616,979112],"e4534bd1e6fbfd4e.js":[979112,980544],"e20bb260f1e7ba34.js":[980544,983144],"6d9c090216f5a463.js":[983144,984296],"f1a0bc0816f5a463.js":[984296,985320],"06f4ce0df1e7ba34.js":[985320,986472],"c908709241a23cb0.js":[986472,987632],"7079650549079e39.js":[987632,993136],"88bec4434a7f8286.js":[993136,995640],"fd5625a24a7f8286.js":[995640,998856],"809ab6e18efa2eda.js":[998856,1000808],"926fa5609ee9d8db.js":[1000808,1003192],"1660e80fbf239666.js":[1003192,1007752],"4f1388bc8efa2eda.js":[1007752,1008816],"536217454c428657.js":[1008816,1012936],"a0854ecd98861133.js":[1012936,1013848],"ec85d716e5ecc61f.js":[1013848,1024904],"648f78378de016e4.js":[1024904,1032768],"e9a53755e5ecc61f.js":[1032768,1038648],"25d0748197b4de85.js":[1038648,1048384],"4f9b9352e212cf36.js":[1048384,1049712],"00ec0a4ae5ecc61f.js":[1049712,1054544],"ee8a18fac0c304c9.js":[1054544,1067072],"2baf262b3e12caed.js":[1067072,1068368],"908c5de208121c23.js":[1068368,1075016],"9219df72dd5b1f5c.js":[1075016,1079224],"2eaf7e167b69f860.js":[1079224,1094176],"1708e59eda6ae899.js":[1094176,1104536],"36eb8b35d22dfb2d.js":[1104536,1113928],"cb05bdacd22dfb2d.js":[1113928,1122720],"8d1c9541d22dfb2d.js":[1122720,1125200],"d0b525a6bcc24827.js":[1125200,1126720],"88a43cb26fb0240e.js":[1126720,1129952],"d9eb53159efd0100.js":[1129952,1132264],"c81c20cf1983f1f4.js":[1132264,1134112],"f3f94c016fb0240e.js":[1134112,1137496],"f877fd8f1983f1f4.js":[1137496,1139440],"d6765749013491b8.js":[1139440,1140560],"15f983c5d22dfb2d.js":[1140560,1141656],"7d28f4db7901da12.js":[1141656,1144352],"b950ca89d22dfb2d.js":[1144352,1155656],"c0900950d22dfb2d.js":[1155656,1158512],"3e48418c7901da12.js":[1158512,1164416],"9676149793278866.js":[1164416,1167232],"12d60f9c6048dcde.js":[1167232,1168208],"c1d1074ef22a2447.js":[1168208,1169144],"d9f248e3f22a2447.js":[1169144,1172376],"457159daf22a2447.js":[1172376,1176280],"431623ce7b69f860.js":[1176280,1182224],"a9a1e611ca88c5d8.js":[1182224,1183272],"48d6546a88b9617d.js":[1183272,1185440],"303d4190e4e3518b.js":[1185440,1191528],"35d5959346b583bc.js":[1191528,1192904],"6ac22420c8bdf7fd.js":[1192904,1201656],"c01472bb9b095b5f.js":[1201656,1202720],"4efa5737e5a88421.js":[1202720,1204064],"a791679a9b095b5f.js":[1204064,1205296],"137fe4669b095b5f.js":[1205296,1207576],"171e2c90e5a88421.js":[1207576,1209400],"8fb4a2118efa2eda.js":[1209400,1211592],"858848e5ce065572.js":[1211592,1218240],"6d49cb6ce4fab372.js":[1218240,1227904],"db954cf2e4fab372.js":[1227904,1235240],"80eac2f77dc6c4fb.js":[1235240,1236936],"8b2392bfbd969993.js":[1236936,1237976],"2d75d81c3ff63b4e.js":[1237976,1239488],"45dca0b4b8f49688.js":[1239488,1240456],"dadb112f08fde66d.js":[1240456,1244824],"7faced77ac8d83ae.js":[1244824,1247232],"b3812c2d5bb88b3e.js":[1247232,1291136],"37f52a0adabe6de2.js":[1291136,1293448],"8489aa7130418538.js":[1293448,1304080],"5589f9e24d98bde9.js":[1304080,1323768],"9d69a11f7d18aa1d.js":[1323768,1328032],"33932d95be79811e.js":[1328032,1351128],"ee06b94bb6bd3548.js":[1351128,1352960],"46767505b54101c5.js":[1352960,1354128],"d067d798b54101c5.js":[1354128,1355672],"33acb45ab54101c5.js":[1355672,1356952],"af2fe88dd194923c.js":[1356952,1367920],"d1e4a4a5262e0d5a.js":[1367920,1375160],"d63fb868262e0d5a.js":[1375160,1381592],"489907f6262e0d5a.js":[1381592,1385368],"996deff8efbcbcb5.js":[1385368,1386832],"4824765aefbcbcb5.js":[1386832,1390128],"b141bd40efbcbcb5.js":[1390128,1392760],"220f42e8efbcbcb5.js":[1392760,1393848],"06c9b5852cc64610.js":[1393848,1395352],"f6398abc2cc64610.js":[1395352,1396384],"47b16f9b2cc64610.js":[1396384,1398144],"b3585cdd0d854787.js":[1398144,1399160],"dcf5cd5e0d854787.js":[1399160,1401112],"b4ff685f996a8177.js":[1401112,1402088],"8770cd9916dfa4d8.js":[1402088,1404176],"27b19b9b61d4b595.js":[1404176,1406696],"f32121ec67e70ba7.js":[1406696,1409464],"9ff8af2d9edece7c.js":[1409464,1411368],"c729e23dc34effa1.js":[1411368,1412728],"22683689eed6c37a.js":[1412728,1414720],"d3b6a9f56fb0240e.js":[1414720,1416840],"3bcbbd4b602b9bd3.js":[1416840,1425896],"98fc0f11b9ed9e37.js":[1425896,1437296],"b4b41d96ac8d83ae.js":[1437296,1439224],"242f6bb0bfe15b52.js":[1439224,1444328],"65f2ffb5346ba7fc.js":[1444328,1446344],"1c3cbfbd5eb764ae.js":[1446344,1448632],"21ef77aad69c70b8.js":[1448632,1451248],"c846e85e6b9347c2.js":[1451248,1455952],"681b83d40efe6461.js":[1455952,1464200],"34c99404072cb778.js":[1464200,1467840],"5ff5c329346ba7fc.js":[1467840,1469064],"c0c8be03048c49a2.js":[1469064,1471280],"d1e5bedfc8171be4.js":[1471280,1472520],"419932020efe6461.js":[1472520,1473728],"eea1de8cbca64684.js":[1473728,1475112],"243952fdc8171be4.js":[1475112,1477216],"07094fd56bfa969c.js":[1477216,1484488],"85b04112d449d3ca.js":[1484488,1511448],"b4b52bf8af39bc12.js":[1511448,1518312],"e082023b346ba7fc.js":[1518312,1519472],"c5fe6bab568d044d.js":[1519472,1523400],"575bc411e0c24f5a.js":[1523400,1524576],"98132f07c774e0ec.js":[1524576,1525720],"e899472ec774e0ec.js":[1525720,1526872],"ce8d1a5139ee55dd.js":[1526872,1529464],"f1c2c2d0911a58b6.js":[1529464,1530872],"908768a63460ae95.js":[1530872,1533136],"1ac10ddcd8200dae.js":[1533136,1535224],"caf3869d8e1919d4.js":[1535224,1542104],"c215058a64151c53.js":[1542104,1547624],"5f40bbf18e1919d4.js":[1547624,1549000],"e2fb2a9589fbb211.js":[1549000,1551152],"e36ee6ac89fbb211.js":[1551152,1553376],"bfadab0017703fa3.js":[1553376,1556296],"7321134a17703fa3.js":[1556296,1563496],"62afed7089fbb211.js":[1563496,1564528],"09c542399392ae30.js":[1564528,1571408],"eeb5c66205669e62.js":[1571408,1576320],"dab59a9905669e62.js":[1576320,1577696],"1b8119c12a8e3834.js":[1577696,1585992],"d6c0b1dd2a8e3834.js":[1585992,1588880],"f6ba2084e2de8ffb.js":[1588880,1590696],"d06141a4e2de8ffb.js":[1590696,1594432],"b539e5b9e2de8ffb.js":[1594432,1601312],"fb646613e2de8ffb.js":[1601312,1603608],"ea3223ec17703fa3.js":[1603608,1608136],"a0e276e917703fa3.js":[1608136,1610064],"15e5c22ce2de8ffb.js":[1610064,1611648],"cd6764d4e2de8ffb.js":[1611648,1614600],"d439381617703fa3.js":[1614600,1615584],"a3d29f7b9e1f42f7.js":[1615584,1623464],"e5eb975617703fa3.js":[1623464,1625616],"d38d908817703fa3.js":[1625616,1632840],"ad620de9e2de8ffb.js":[1632840,1635240],"31b07104e2de8ffb.js":[1635240,1636616],"5ab5f58489fbb211.js":[1636616,1638680],"45b64ad3e2de8ffb.js":[1638680,1645968],"a71f247c17703fa3.js":[1645968,1648680],"0f6cc3b59392ae30.js":[1648680,1650992],"afcda76ec4a5b71f.js":[1650992,1654456],"1034a6a59c63bdcd.js":[1654456,1656512],"55e13bf59c63bdcd.js":[1656512,1658696],"f8ea7e5117260d98.js":[1658696,1659600],"d5d075cb30aca2f8.js":[1659600,1665624],"4bb485dcc29bb449.js":[1665624,1666656],"5344cf561c0f59a7.js":[1666656,1675064],"f832ff3117260d98.js":[1675064,1676648],"cd8cb1482087c80c.js":[1676648,1678024],"6d7e572130aca2f8.js":[1678024,1679840],"0a918aaadb52089c.js":[1679840,1682656],"174beff3b8763bc8.js":[1682656,1685816],"d13d882103131a1b.js":[1685816,1687576],"07464f8f804ecadc.js":[1687576,1690800],"a4e0b771013491b8.js":[1690800,1694480],"9aeb47fb86c219eb.js":[1694480,1695760],"1a0c131ef2829210.js":[1695760,1696848],"362b7dae365825ca.js":[1696848,1699096],"126a2c4297d41d26.js":[1699096,1701496],"a413658b73a20e13.js":[1701496,1706184],"0d513191c51ef08d.js":[1706184,1707976],"734c39d98c4a759a.js":[1707976,1717512],"2cdec8c1c51ef08d.js":[1717512,1718464],"c6c0218f8c4a759a.js":[1718464,1721200],"c3e816d9c51ef08d.js":[1721200,1722648],"9430084a8c4a759a.js":[1722648,1731544],"d69ad0138c4a759a.js":[1731544,1734496],"129b135f8c4a759a.js":[1734496,1737080],"6a4fd5b98c4a759a.js":[1737080,1738576],"7243614f15a47d08.js":[1738576,1740960],"4b46b8dfa78549ee.js":[1740960,1741944],"65ac5699a78549ee.js":[1741944,1743736],"4e2ea593acf52188.js":[1743736,1753272],"2756168eb99509dd.js":[1753272,1754224],"43c074a3b99509dd.js":[1754224,1756952],"0bfeafdcb99509dd.js":[1756952,1758400],"744ea3eeb99509dd.js":[1758400,1767296],"20cd5350acf52188.js":[1767296,1770248],"69fedb0dacf52188.js":[1770248,1772832],"38a95870acf52188.js":[1772832,1774320],"ebc43ddb19ed05be.js":[1774320,1775376],"807c9aaa94a4f78f.js":[1775376,1778136],"4cf4eaae7d8dfb55.js":[1778136,1779928],"25d2b36df44ade8d.js":[1779928,1789472],"7657ea5ac8349220.js":[1789472,1790432],"b9374310c8349220.js":[1790432,1793168],"0a0afce0c8349220.js":[1793168,1794624],"26b09845c8349220.js":[1794624,1803528],"b0e510e9f44ade8d.js":[1803528,1806480],"88c9ff51c8349220.js":[1806480,1809072],"99b69639f44ade8d.js":[1809072,1810568],"5eb2f40c3ca89951.js":[1810568,1813480],"97346bdf670e396c.js":[1813480,1815264],"5e8defe15b5fc83e.js":[1815264,1824800],"5df298955b5fc83e.js":[1824800,1825752],"25fce45d5b5fc83e.js":[1825752,1828480],"076adc795b5fc83e.js":[1828480,1829928],"8fa945c25b5fc83e.js":[1829928,1838824],"8f60a52ed2c37eb3.js":[1838824,1841768],"a919158b5b5fc83e.js":[1841768,1844352],"d326aca2d2c37eb3.js":[1844352,1845840],"c4c264cb4c92633c.js":[1845840,1847984],"7b7060b9faf454f1.js":[1847984,1849784],"91d8ee8c118ef23d.js":[1849784,1859328],"caa9a902118ef23d.js":[1859328,1860288],"d4281284118ef23d.js":[1860288,1863032],"f151d072118ef23d.js":[1863032,1864488],"d9597abd118ef23d.js":[1864488,1873392],"c72b15b86718c99f.js":[1873392,1876352],"f4076e92118ef23d.js":[1876352,1878944],"16cb801e6718c99f.js":[1878944,1880448],"e73c699b34336341.js":[1880448,1882664],"358d2e2ae9e20ce4.js":[1882664,1884464],"6fdd33027f96eac5.js":[1884464,1894008],"f3a0dfc9e9e20ce4.js":[1894008,1894968],"38e244bccc0cfa3f.js":[1894968,1897712],"5d30ae55cc0cfa3f.js":[1897712,1899168],"6353a824cc0cfa3f.js":[1899168,1908072],"fd7b08177f96eac5.js":[1908072,1911032],"adb0223bcc0cfa3f.js":[1911032,1913624],"f93f53077f96eac5.js":[1913624,1915128],"287ae67cc764d0af.js":[1915128,1916672],"dcfe1069c29bb449.js":[1916672,1918632],"f46ca05e08121c23.js":[1918632,1923200],"72a18ab61c0f59a7.js":[1923200,1927112],"4a4a66ad2087c80c.js":[1927112,1930384],"525c528adb52089c.js":[1930384,1938712],"09f56bba602871de.js":[1938712,1944232],"73749ff6602871de.js":[1944232,1945608],"b4ca00e42087c80c.js":[1945608,1949168],"579dd697c29bb449.js":[1949168,1951552],"f4dd36762087c80c.js":[1951552,1954768],"56271f402087c80c.js":[1954768,1956264],"74c8bb76cb056d39.js":[1956264,1957432],"41ddba17c29bb449.js":[1957432,1959192],"f67e7b772087c80c.js":[1959192,1960560],"4cd749a6c29bb449.js":[1960560,1961472],"8c7c7e59c29bb449.js":[1961472,1965160],"5b3ec4d52087c80c.js":[1965160,1967240],"3b71d89bd8200dae.js":[1967240,1971064],"6fa6690aa15a61d7.js":[1971064,1985192],"0e38bb570f88db67.js":[1985192,1991416],"5bc08f075349cf7e.js":[1991416,1994576],"9edd688b0f88db67.js":[1994576,1995864],"e8215ce20f88db67.js":[1995864,1997928],"f0f81b9d3460ae95.js":[1997928,2001088],"be514d595a0589e4.js":[2001088,2003904],"af889eaf3460ae95.js":[2003904,2004880],"621d0d5c3460ae95.js":[2004880,2006088],"4f3fc7295a0589e4.js":[2006088,2007144],"5c4665c164151c53.js":[2007144,2008528],"23238f3264151c53.js":[2008528,2010288],"0dccc1193460ae95.js":[2010288,2012488],"f2e2bc62aae9d084.js":[2012488,2014432],"e2b9dae0aae9d084.js":[2014432,2015616],"0b8f297dd449d3ca.js":[2015616,2017600],"da1192d3d69c70b8.js":[2017600,2019560],"b9535dca4e2fa448.js":[2019560,2021416],"9cfb9ab60efe6461.js":[2021416,2024896],"98d0d17c6b7c3f33.js":[2024896,2028864],"ad269f318efa2eda.js":[2028864,2030392],"6cbfadbec8171be4.js":[2030392,2031352],"7e7113486b9347c2.js":[2031352,2032320],"be377c2c0efe6461.js":[2032320,2033584],"31b35a39ec3325dc.js":[2033584,2038520],"f1ba2406346ba7fc.js":[2038520,2039640],"adc162f3b41a6510.js":[2039640,2040704],"4a1371cea56f2057.js":[2040704,2041912],"00d95df1599d0a9e.js":[2041912,2043208],"7b5c8cd802ea3db0.js":[2043208,2044400],"a3ec0fc6ac3db30b.js":[2044400,2056152],"7e5891cdb3c2f5cd.js":[2056152,2062136],"188801a2dabe6de2.js":[2062136,2063112],"e1ecc136c8171be4.js":[2063112,2064384],"9076369d4e2fa448.js":[2064384,2068440],"8bec415f7ec45678.js":[2068440,2069904],"6a4d7058ec3325dc.js":[2069904,2071152],"ba01d9f26b9347c2.js":[2071152,2072112],"fad4a192d69c70b8.js":[2072112,2074528],"c9fa1cb54e2fa448.js":[2074528,2076072],"d0a7185810f3ab98.js":[2076072,2077048],"58264a88c8171be4.js":[2077048,2078352],"6a4b826e4dca01a8.js":[2078352,2080136],"6743457ed69c70b8.js":[2080136,2081184],"c3f2e4c0d69c70b8.js":[2081184,2083040],"cd756d2b4dca01a8.js":[2083040,2085880],"8b707fd433103b4b.js":[2085880,2105648],"759849f2ea9569f7.js":[2105648,2110472],"4ac670865c0dc994.js":[2110472,2112000],"b31ad0d25c0dc994.js":[2112000,2113336],"e8de3f345c0dc994.js":[2113336,2115480],"6e28fa2baac397ad.js":[2115480,2116688],"a5ce31d0aac397ad.js":[2116688,2118224],"669e9c645744f8e5.js":[2118224,2119136],"bf5e439b5a109354.js":[2119136,2121200],"38082ab65a109354.js":[2121200,2125344],"81ef571b87032e3b.js":[2125344,2126568],"941b56a1f92648e6.js":[2126568,2127720],"62ff661e87032e3b.js":[2127720,2128728],"5e630567f92648e6.js":[2128728,2129760],"a31a3ada5a109354.js":[2129760,2134200],"21fa45f75744f8e5.js":[2134200,2139152],"a4183fb95c0dc994.js":[2139152,2140136],"e44b80225da49483.js":[2140136,2141224],"a143b6fdbf239666.js":[2141224,2146176],"eb87d5507722d08a.js":[2146176,2151528],"3fb160fb27022853.js":[2151528,2153648],"05936d9cfc5b24f1.js":[2153648,2157608],"5e349e8ca9dd736e.js":[2157608,2158752],"dc44985926134cbb.js":[2158752,2160568],"70703a67a27558be.js":[2160568,2161672],"3637d58ce6b82368.js":[2161672,2163808],"520782f226134cbb.js":[2163808,2173224],"9b8e3b41a9dd736e.js":[2173224,2175224],"1f5caf60bca64684.js":[2175224,2176840],"83bf543116f5a463.js":[2176840,2179584],"e74710897cc78884.js":[2179584,2187288],"37b21ae37cc78884.js":[2187288,2189032],"2fdfc5673a2256b7.js":[2189032,2191808],"18de0fccc5c16481.js":[2191808,2195168],"72dffb7b00027263.js":[2195168,2197344],"19e04093c0c304c9.js":[2197344,2201608],"6bdb47168e1d8884.js":[2201608,2205296],"fa253311d18ca425.js":[2205296,2209560],"2cb783d4025f0d1f.js":[2209560,2212704],"a79a5c7470bba6e7.js":[2212704,2214504],"67c47388fea2bf14.js":[2214504,2224056],"3c89d0c570bba6e7.js":[2224056,2225024],"296582c070bba6e7.js":[2225024,2227768],"0dc7ba7870bba6e7.js":[2227768,2229232],"1bce9804fea2bf14.js":[2229232,2238144],"5a9016f7fea2bf14.js":[2238144,2241112],"260fea07fea2bf14.js":[2241112,2243712],"9ce50ca2fea2bf14.js":[2243712,2245216],"4e5d838ff87a5de7.js":[2245216,2247416],"5f542b7d8e1d8884.js":[2247416,2248400],"a3dd8cd9d49ee1f2.js":[2248400,2250080],"588790b7a6502827.js":[2250080,2254336],"a490cdfa2d402236.js":[2254336,2255512],"7d1dd094dabe6de2.js":[2255512,2256984],"3ad759078b01d52e.js":[2256984,2262512],"ab77ca87129216c3.js":[2262512,2266704],"9fda784cefa0a3bc.js":[2266704,2271096],"a33c599908fadc4f.js":[2271096,2276184],"a3e56d3f4e2fa448.js":[2276184,2277376],"58b1f9cc84b0c8cc.js":[2277376,2279432],"25205205d9d8b903.js":[2279432,2291000],"c3bec0adea9569f7.js":[2291000,2292496],"97d0f3f25bb88b3e.js":[2292496,2296392],"69a2a907811fea3a.js":[2296392,2297936],"dbd230ef0f88db67.js":[2297936,2299064],"36b3c46916c651b0.js":[2299064,2303336],"09f2dbddaae9d084.js":[2303336,2307592],"b6935e58174c519c.js":[2307592,2309592],"fb66db5e16c651b0.js":[2309592,2311776],"7abe78e20f88db67.js":[2311776,2314240],"fec8139fb20f2265.js":[2314240,2315392],"3912d55c6b9347c2.js":[2315392,2316592],"1b6c4485ac8d83ae.js":[2316592,2317944],"693fc05aad94140e.js":[2317944,2319120],"41b3481e3e348c73.js":[2319120,2320344],"ca0250783e348c73.js":[2320344,2324872],"f5ea69683e348c73.js":[2324872,2326136],"b3cf4f20e4baf114.js":[2326136,2335016],"89df9b2fe4baf114.js":[2335016,2338184],"05c82a063bcc9ae4.js":[2338184,2341640],"7e061b4710f3ab98.js":[2341640,2343008],"121de30bbe85db05.js":[2343008,2346264],"69b5fa5e09d97322.js":[2346264,2350800],"5fbaedba33083368.js":[2350800,2353824],"fbad95b7c700959c.js":[2353824,2355088],"2526b2cfd9d8b903.js":[2355088,2356752],"3f9e04c1363cde42.js":[2356752,2357960],"8bf676b0363cde42.js":[2357960,2359176],"20d5b913d9d8b903.js":[2359176,2360776],"e4e5dd52363cde42.js":[2360776,2363624],"b2d89febd9d8b903.js":[2363624,2366128],"7313efddd9d8b903.js":[2366128,2367584],"64b6a6ae7fd119bd.js":[2367584,2371568],"f2034321363cde42.js":[2371568,2374200],"3726a8d15bb88b3e.js":[2374200,2375744],"9c87c60e5bb88b3e.js":[2375744,2377056],"0fa51a00d9d8b903.js":[2377056,2379000],"09c8bc070efe6461.js":[2379000,2382632],"90c12e2f048c49a2.js":[2382632,2383984],"c5ed417ae46e42e3.js":[2383984,2389064],"aadcfa383460ae95.js":[2389064,2390008],"d991b67f79b33bb5.js":[2390008,2392304],"47859fce79b33bb5.js":[2392304,2395136],"b084fe2979b33bb5.js":[2395136,2400792],"1e10760a9c63bdcd.js":[2400792,2408376],"d48cfe656e7b8748.js":[2408376,2410016],"474ac52979b33bb5.js":[2410016,2411888],"7f0222007b69f860.js":[2411888,2419320],"91abc74128ab731f.js":[2419320,2420368],"c8e87753f1136bfa.js":[2420368,2425336],"0f158498f1136bfa.js":[2425336,2436496],"9f83d8b70ce8dac4.js":[2436496,2438136],"f3168c8100027263.js":[2438136,2439880],"f20877fef1136bfa.js":[2439880,2442000],"767ebe12ec0c50ac.js":[2442000,2447216],"35dafc0eec0c50ac.js":[2447216,2452296],"781623e628bda81e.js":[2452296,2459832],"efd4c2643460ae95.js":[2459832,2460848],"89d97ac73460ae95.js":[2460848,2463296],"76cef8d83460ae95.js":[2463296,2466272],"c9a511643460ae95.js":[2466272,2468784],"127f9faa3460ae95.js":[2468784,2476944],"0e21c04e3460ae95.js":[2476944,2486528],"4226ae833460ae95.js":[2486528,2488592],"488858353460ae95.js":[2488592,2491296],"98c864573460ae95.js":[2491296,2508048],"0925ff663460ae95.js":[2508048,2511088],"e8db9a2c3460ae95.js":[2511088,2512232],"c978f4573460ae95.js":[2512232,2513464],"86564d453460ae95.js":[2513464,2514640],"db3e21f93460ae95.js":[2514640,2516128],"b8195d3c3460ae95.js":[2516128,2520592],"13a3bada3460ae95.js":[2520592,2526616],"a00591a03460ae95.js":[2526616,2528128],"607b449b3460ae95.js":[2528128,2529824],"c14882d63460ae95.js":[2529824,2531680],"ad1e7cc73460ae95.js":[2531680,2533280],"a16357b23460ae95.js":[2533280,2534352],"6ff419533460ae95.js":[2534352,2539200],"4fbb041e3460ae95.js":[2539200,2541952],"6840c6573460ae95.js":[2541952,2543648],"956307ba3460ae95.js":[2543648,2544728],"54f955193460ae95.js":[2544728,2546376],"8372ca647f96c31f.js":[2546376,2575288],"be245bd5427b43dc.js":[2575288,2581832],"7080511d427b43dc.js":[2581832,2590352],"c88d1606bca64684.js":[2590352,2593904],"6eb6e109e0c24f5a.js":[2593904,2595376],"3c4d8db08efa2eda.js":[2595376,2597992],"b682994f79b33bb5.js":[2597992,2610776],"849fb652d55ba179.js":[2610776,2630696],"40138051d55ba179.js":[2630696,2634432],"22b5013d427b43dc.js":[2634432,2645496],"98b2676f427b43dc.js":[2645496,2656808],"47633662427b43dc.js":[2656808,2665432],"fad90017427b43dc.js":[2665432,2683944],"ff1904d3b41c49fc.js":[2683944,2693120],"1ab3008ab41c49fc.js":[2693120,2700464],"7443e4f6b41c49fc.js":[2700464,2707792],"e305797128bda81e.js":[2707792,2736672],"ee5c1c7a246d3245.js":[2736672,2740728],"1cd052de2efe7bf9.js":[2740728,2741736],"121c3df42efe7bf9.js":[2741736,2744936],"32176f51e456254b.js":[2744936,2750304],"5284bc3a0cfa3a15.js":[2750304,2752088],"fa823971474fa1b3.js":[2752088,2761616],"b722f39f199780ae.js":[2761616,2762560],"ffb37eda199780ae.js":[2762560,2765288],"1c7d4658199780ae.js":[2765288,2766728],"c6185240199780ae.js":[2766728,2775616],"094c3f90474fa1b3.js":[2775616,2778560],"d976cf1f199780ae.js":[2778560,2781136],"43d09d5d474fa1b3.js":[2781136,2782624],"5ad925a82efe7bf9.js":[2782624,2789320],"00f40964cf7e600e.js":[2789320,2791304],"66e222cab04c669a.js":[2791304,2819328],"b6f27b6b494461db.js":[2819328,2820256],"4618d6535c0d4b96.js":[2820256,2825424],"47ec67705c0d4b96.js":[2825424,2826992],"a6a949eccf7e600e.js":[2826992,2829168],"3a7392a39d11d88d.js":[2829168,2832928],"02f40d0e9d11d88d.js":[2832928,2834208],"b4cc7341d235faad.js":[2834208,2846032],"645730539d11d88d.js":[2846032,2848656],"2681d3c8d235faad.js":[2848656,2851544],"4527f91eb04c669a.js":[2851544,2852920],"af5182ed5c0d4b96.js":[2852920,2854656],"357b6f0e5c0d4b96.js":[2854656,2857000],"a3b901f1f02bcbd0.js":[2857000,2865704],"68f8d8208970fc7a.js":[2865704,2866672],"77af7b44ae8b7f4f.js":[2866672,2875304],"a47e2aa3b45c0b00.js":[2875304,2883672],"ec680920a5c6ce43.js":[2883672,2884840],"349004d3d087d7c9.js":[2884840,2886352],"3394276f19adc6b1.js":[2886352,2887848],"75f46fd102799b65.js":[2887848,2889664],"d4c94d24617e3bfc.js":[2889664,2899232],"df83f1ea02799b65.js":[2899232,2900216],"6f6227e802799b65.js":[2900216,2902968],"157f024002799b65.js":[2902968,2904448],"b0e00bb7617e3bfc.js":[2904448,2913376],"75bc618625bbfcbc.js":[2913376,2916360],"c0685e86617e3bfc.js":[2916360,2918968],"05705441617e3bfc.js":[2918968,2920488],"74cfa005d087d7c9.js":[2920488,2923344],"4cf82aa20ec99495.js":[2923344,2925080],"29a0386463181ffc.js":[2925080,2932080],"8b30eb976156d554.js":[2932080,2933176],"21dfeef10ec99495.js":[2933176,2938024],"6326554063181ffc.js":[2938024,2940496],"3938328d0ec99495.js":[2940496,2943024],"dde510de63181ffc.js":[2943024,2944552],"27d52b68ae8b7f4f.js":[2944552,2958992],"bda59902ae8b7f4f.js":[2958992,2972480],"2e878919f3709fe6.js":[2972480,2982576],"1040f9faf3709fe6.js":[2982576,2997400],"48fde363b26e82db.js":[2997400,3008032],"aafaa0e9b26e82db.js":[3008032,3051744],"016a0564b26e82db.js":[3051744,3071488],"bffbd98bb26e82db.js":[3071488,3080712],"31b2a77ab26e82db.js":[3080712,3089536],"9b838a66b26e82db.js":[3089536,3092648],"6c092b17b26e82db.js":[3092648,3099560],"2acd579a3460ae95.js":[3099560,3103936],"7c4a091812e6bcd5.js":[3103936,3105976],"3f9305f9beecc9b3.js":[3105976,3112792],"211cf6d6beecc9b3.js":[3112792,3119840],"9b9978a0beecc9b3.js":[3119840,3126768],"b4cbae70beecc9b3.js":[3126768,3139472],"3b4503bcbeecc9b3.js":[3139472,3146120],"37494076beecc9b3.js":[3146120,3155808],"df709e92beecc9b3.js":[3155808,3162872],"fc8b68ddbeecc9b3.js":[3162872,3170568],"dac6ae0a41576648.js":[3170568,3174672],"3f96921341576648.js":[3174672,3181088],"4cc95a5ff3709fe6.js":[3181088,3184984],"58bbc95541576648.js":[3184984,3193088],"8a7730d041576648.js":[3193088,3199104],"90bace7c41576648.js":[3199104,3205208],"9c7546aa41576648.js":[3205208,3211216],"9e98839a41576648.js":[3211216,3217232],"eb5776c441576648.js":[3217232,3224568],"b16e767bda2f9975.js":[3224568,3234016],"1402b44def61cfb7.js":[3234016,3268400],"787d1d07da2f9975.js":[3268400,3275536],"540ffc45ef61cfb7.js":[3275536,3281928],"0dda87a1da2f9975.js":[3281928,3286048],"1ec71cb5da2f9975.js":[3286048,3288760],"bee7caaada2f9975.js":[3288760,3309520],"29205979da2f9975.js":[3309520,3315152],"52c3b1e92308a7bc.js":[3315152,3319672],"452a749f2308a7bc.js":[3319672,3325160],"62bfb32a2308a7bc.js":[3325160,3327264],"f9a061a4f3709fe6.js":[3327264,3337456],"4799e8192308a7bc.js":[3337456,3342640],"b4f355d32308a7bc.js":[3342640,3348496],"6622e4482308a7bc.js":[3348496,3352880],"bbc26c412308a7bc.js":[3352880,3358216],"747348fc2308a7bc.js":[3358216,3366392],"42a1f8aa47d884f2.js":[3366392,3370800],"0666bfa547d884f2.js":[3370800,3378968],"e6c6e2afee97ba64.js":[3378968,3387216],"4277d63d47d884f2.js":[3387216,3394704],"2a26b58c47d884f2.js":[3394704,3402232],"6785f48d47d884f2.js":[3402232,3412424],"cda3908fd9dd2b5f.js":[3412424,3426416],"9859139f47d884f2.js":[3426416,3434840],"f72e208f47d884f2.js":[3434840,3444480],"598f7ab1113055eb.js":[3444480,3453704],"08ef1d59346ba7fc.js":[3453704,3454664],"d42ce9180f8ec224.js":[3454664,3458472],"7f384b527ff20ab2.js":[3458472,3460592],"679bccc130f020d8.js":[3460592,3462432],"43d2b09f113055eb.js":[3462432,3468408],"3c080774346ba7fc.js":[3468408,3471344],"27518be4af39bc12.js":[3471344,3473568],"4aae34487722d08a.js":[3473568,3477600],"6076b72eabad6a9e.js":[3477600,3479536],"b2fe5255abad6a9e.js":[3479536,3482536],"a7bac1fe72caa2dd.js":[3482536,3487144],"4e325868c9c88460.js":[3487144,3490384],"882db2adef814fcf.js":[3490384,3492904],"9a0144262d840e68.js":[3492904,3507056],"f73ae395bfb64985.js":[3507056,3508096],"1821f1bfef170ce2.js":[3508096,3511832],"5ab31df9bfb64985.js":[3511832,3514192],"b381bf0c2d840e68.js":[3514192,3517776],"5878489cbfb64985.js":[3517776,3518856],"13f0fec5bfb64985.js":[3518856,3519840],"820f3de361d3fd95.js":[3519840,3522600],"7d583c239a906a19.js":[3522600,3523832],"5565fe34e1cc5936.js":[3523832,3566144],"1914dbb28945147b.js":[3566144,3568792],"32a2beeeddc7791c.js":[3568792,3573920],"56c93cbaddc7791c.js":[3573920,3577160],"8686ec72c7eec3d0.js":[3577160,3578960],"95fc48d3c7eec3d0.js":[3578960,3581680],"c8f49194891b72c4.js":[3581680,3589808],"0e09b4d2f31dd192.js":[3589808,3592088],"6d9fd6de60586e4f.js":[3592088,3594864],"9a261ed260586e4f.js":[3594864,3599648],"d858e0573d45a332.js":[3599648,3608048],"0d47ec065a016eef.js":[3608048,3611176],"9bb6f5b75a016eef.js":[3611176,3613232],"f9bec9143d45a332.js":[3613232,3618168],"8b117f5660586e4f.js":[3618168,3621304],"92564acaef1a086a.js":[3621304,3625608],"dfb8d7e360586e4f.js":[3625608,3630840],"c2190d345a016eef.js":[3630840,3635448],"f59576355a016eef.js":[3635448,3638056],"e03b47b15a016eef.js":[3638056,3640408],"18951e3581b08899.js":[3640408,3642656],"7fb916c71ed7e89f.js":[3642656,3643792],"6810652103bffde7.js":[3643792,3645272],"b1170bf403bffde7.js":[3645272,3646360],"1a873dd11ed7e89f.js":[3646360,3648496],"307a74a71ed7e89f.js":[3648496,3652504],"64ee59341ed7e89f.js":[3652504,3656968],"b5e0bef681b08899.js":[3656968,3661112],"594f795881b08899.js":[3661112,3665752],"121fd3488c56e3fb.js":[3665752,3668296],"2cd796438c56e3fb.js":[3668296,3670528],"c9e834aaef1a086a.js":[3670528,3675120],"e54fa1128c56e3fb.js":[3675120,3677152],"d761ab0d81b08899.js":[3677152,3680696],"9fa7320760586e4f.js":[3680696,3686128],"429e27ef81b08899.js":[3686128,3690224],"129c144660586e4f.js":[3690224,3698704],"31d6f4e08c56e3fb.js":[3698704,3700888],"76210590f31dd192.js":[3700888,3704536],"509ddac2823f5388.js":[3704536,3711648],"a09369d6d24459ef.js":[3711648,3713352],"359f538f26134cbb.js":[3713352,3717480],"3ff7bd71b0c93e99.js":[3717480,3720368],"a8e220cff31dd192.js":[3720368,3722048],"11ca723666ff3613.js":[3722048,3725544],"c1a7b4f3ec63b908.js":[3725544,3726448],"1cc48b7bcbdc1c10.js":[3726448,3732536],"238a04449cbde427.js":[3732536,3735080],"abb4dc6615408351.js":[3735080,3740312],"cd3a04aea9dd736e.js":[3740312,3744568],"fc898c23a4b974c8.js":[3744568,3747504],"09c39ac10acf1b9e.js":[3747504,3748480],"1b738f7613bf5deb.js":[3748480,3749632],"fe4e93beec34c288.js":[3749632,3750960],"04db58277eb212bb.js":[3750960,3752256],"d15897787eb212bb.js":[3752256,3753432],"5c160e6d7eb212bb.js":[3753432,3754400],"986fa5dd7eb212bb.js":[3754400,3755480],"ecc102ee95709bbb.js":[3755480,3756512],"435dc93395709bbb.js":[3756512,3757664],"32047b2eec34c288.js":[3757664,3758736],"95c6f803ec34c288.js":[3758736,3760344],"664fe41415408351.js":[3760344,3761400],"1e407f0fef7cb4ef.js":[3761400,3762840],"f68771f13ca353d1.js":[3762840,3764664],"57a62156ef814fcf.js":[3764664,3766968],"1ed7397f61d3fd95.js":[3766968,3769656],"6d62016c9b000b5f.js":[3769656,3770808],"d8eedb629b000b5f.js":[3770808,3773056],"d5d7cd039b000b5f.js":[3773056,3775832],"e0f22c519b000b5f.js":[3775832,3777448],"174b1bcb9b000b5f.js":[3777448,3779528],"1df92752ef814fcf.js":[3779528,3781480],"3bb5524de8ec1e90.js":[3781480,3785528],"5a6e545d09acc7ea.js":[3785528,3792064],"33c08443308c1aac.js":[3792064,3794968],"edb535fd538219ee.js":[3794968,3798800],"86c0758cd24459ef.js":[3798800,3799992],"cb7dcc6e538219ee.js":[3799992,3806056],"4b488187538219ee.js":[3806056,3807032],"f1680f01538219ee.js":[3807032,3808096],"3bdd926c7191c76c.js":[3808096,3810648],"f43d86c6308c1aac.js":[3810648,3812488],"c7d7a038f641091d.js":[3812488,3813624],"b27007d8b3392499.js":[3813624,3814720],"baa9408c8b33cd74.js":[3814720,3817368],"13bbf03009acc7ea.js":[3817368,3818896],"b3a666c5308c1aac.js":[3818896,3829080],"e3eada9e538219ee.js":[3829080,3830424],"40f01e15308c1aac.js":[3830424,3833544],"616b07a47e41d5bc.js":[3833544,3834512],"eab82725a27ab3e6.js":[3834512,3835480],"a99ad340a27ab3e6.js":[3835480,3836520],"c0a4f42fa27ab3e6.js":[3836520,3837488],"de906c75a27ab3e6.js":[3837488,3838472],"3884a16ea3a72f6f.js":[3838472,3839456],"fcf0144ca3a72f6f.js":[3839456,3840424],"11da8370a3a72f6f.js":[3840424,3841392],"a394beefa3a72f6f.js":[3841392,3842360],"e16289a09f986c71.js":[3842360,3843328],"306171609f986c71.js":[3843328,3844312],"cd9588499f986c71.js":[3844312,3845296],"18a39f3ba27ab3e6.js":[3845296,3846296],"5b4976b2a3a72f6f.js":[3846296,3847280],"c45901b97e41d5bc.js":[3847280,3848248],"b0cc07fc7e41d5bc.js":[3848248,3849216],"ea3528f87e41d5bc.js":[3849216,3850184],"40610bc87e41d5bc.js":[3850184,3851168],"357216347e41d5bc.js":[3851168,3852152],"77a39632b3392499.js":[3852152,3853136],"68c2b1c9b3392499.js":[3853136,3854120],"683d717509acc7ea.js":[3854120,3855792],"eee9a2c5b3392499.js":[3855792,3856896],"fd31ed8e308c1aac.js":[3856896,3858400],"a7f97d83b3392499.js":[3858400,3859968],"41404bdda27ab3e6.js":[3859968,3860936],"0d5a8118e8ec1e90.js":[3860936,3861936],"cfd57231f5b82868.js":[3861936,3864384],"4aca19d8ef814fcf.js":[3864384,3866960],"41198c8f61d3fd95.js":[3866960,3869464],"e7f18520a25a4350.js":[3869464,3871776],"607d3ee6ef814fcf.js":[3871776,3873272],"805c7a5a61d3fd95.js":[3873272,3875840],"c6ec15a961d3fd95.js":[3875840,3881864],"cd71944f61d3fd95.js":[3881864,3885752],"f0cfaa57f2b3aec3.js":[3885752,3889456],"ac0ab1f8a4926f77.js":[3889456,3892152],"4e677cd8abad6a9e.js":[3892152,3894304],"3fd23989abad6a9e.js":[3894304,3897536],"21a2ce663460ae95.js":[3897536,3898480],"6262d37d47d884f2.js":[3898480,3903768],"ed5c3aa74c00ce32.js":[3903768,3909656],"2af6a0574c00ce32.js":[3909656,3915120],"fa255d114c00ce32.js":[3915120,3924384],"97a983a74c00ce32.js":[3924384,3935720],"48b98b3e4c00ce32.js":[3935720,3943904],"cd2565864c00ce32.js":[3943904,3949848],"ca970e544c00ce32.js":[3949848,3958088],"7ecbbb393676734d.js":[3958088,3964592],"6f15317a3676734d.js":[3964592,3971032],"307ad0bc3676734d.js":[3971032,3977520],"fd0592bf3676734d.js":[3977520,3983920],"62d64ab73676734d.js":[3983920,3996256],"839806c83676734d.js":[3996256,4009344],"161b85d4811fea3a.js":[4009344,4011000],"1069c208bca64684.js":[4011000,4012048],"f885375cbca64684.js":[4012048,4013296],"eb363ae53676734d.js":[4013296,4024936],"60b6b8f43676734d.js":[4024936,4031384],"e39303e1a761e727.js":[4031384,4038640],"e5e82bf5a761e727.js":[4038640,4044944],"4552e0d2a761e727.js":[4044944,4051160],"0f2ecacfa761e727.js":[4051160,4055248],"a629d208a761e727.js":[4055248,4062864],"3185d509a761e727.js":[4062864,4065808],"9c0a694da761e727.js":[4065808,4085536],"df15b03da761e727.js":[4085536,4091592],"5c44282f559cd6c5.js":[4091592,4100840],"9cc09c1f559cd6c5.js":[4100840,4116936],"ca5ee7e1a52be3f6.js":[4116936,4122760],"03e300d0e3c492b4.js":[4122760,4125176],"01072315925a7fe5.js":[4125176,4129008],"a3b7717aee6c58ed.js":[4129008,4130288],"da37eb3143468bfb.js":[4130288,4134232],"0167ba29f92d52f3.js":[4134232,4137536],"a2656d8cdcd1a83f.js":[4137536,4138936],"d2ea6de5e38baac4.js":[4138936,4140488],"f9db893fdcd1a83f.js":[4140488,4142328],"4ac8b70c559cd6c5.js":[4142328,4148088],"ce133598ee97ba64.js":[4148088,4155104],"91d2f663559cd6c5.js":[4155104,4161216],"010590a87f96c31f.js":[4161216,4167360],"6e897b08559cd6c5.js":[4167360,4172528],"0a4c712a559cd6c5.js":[4172528,4178256],"df2525ca9ed978c7.js":[4178256,4185504],"c4c783e2559cd6c5.js":[4185504,4191536],"af988030559cd6c5.js":[4191536,4198824],"8f4d0bda9a76d20f.js":[4198824,4204552],"aafe1a379a76d20f.js":[4204552,4212408],"3ed1b92d9a76d20f.js":[4212408,4217856],"78dd1fed9a76d20f.js":[4217856,4223432],"0bfd8ac39a76d20f.js":[4223432,4229000],"9e6335f49a76d20f.js":[4229000,4233800],"d78ec56cab8f12bd.js":[4233800,4246632],"9e01492b9a76d20f.js":[4246632,4252728],"65c4bfb53460ae95.js":[4252728,4253672],"4fce26109a76d20f.js":[4253672,4259328],"e9b386249a76d20f.js":[4259328,4263784],"d5dadd390621c1ff.js":[4263784,4271944],"c7d7bfdc0621c1ff.js":[4271944,4277352],"aa16c5290621c1ff.js":[4277352,4282904],"cf2f2f500621c1ff.js":[4282904,4289912],"3c94f95f0621c1ff.js":[4289912,4293936],"586e9fe90621c1ff.js":[4293936,4299544],"e1d7a7739ed978c7.js":[4299544,4308680],"a6496765bd618c94.js":[4308680,4319752],"c21ff77a0621c1ff.js":[4319752,4323912],"9216ffbf0621c1ff.js":[4323912,4329152],"9a0686258176a1af.js":[4329152,4334472],"0fcd43068176a1af.js":[4334472,4342096],"06ab0b048176a1af.js":[4342096,4349432],"c285913c8176a1af.js":[4349432,4359904],"c40bf0e48176a1af.js":[4359904,4369760],"05022a9d8176a1af.js":[4369760,4377552],"adf4f46f8176a1af.js":[4377552,4383792],"bf75042c811fea3a.js":[4383792,4385752],"a0ff10048176a1af.js":[4385752,4391168],"403bc9c38176a1af.js":[4391168,4396312],"9cd6b3ae764e4a4c.js":[4396312,4409232],"0ed518fd764e4a4c.js":[4409232,4415312],"0c6a6937764e4a4c.js":[4415312,4421184],"32ff6abd764e4a4c.js":[4421184,4427384],"6a46519112d901fe.js":[4427384,4444056],"f1892f659b49dbd0.js":[4444056,4452768],"cb79e25cb9ed9e37.js":[4452768,4469384],"5ce6c7d7346ba7fc.js":[4469384,4470864],"1864b024279f238e.js":[4470864,4474392],"e8d57792764e4a4c.js":[4474392,4478600],"5fe1da23764e4a4c.js":[4478600,4486752],"db4e4bd2764e4a4c.js":[4486752,4491544],"cfdf33d3764e4a4c.js":[4491544,4495216],"0f3f36bd764e4a4c.js":[4495216,4502160],"24f36e3f87f92fbc.js":[4502160,4508080],"1af975ae87f92fbc.js":[4508080,4514048],"357105c487f92fbc.js":[4514048,4519784],"5e45d54b87f92fbc.js":[4519784,4524880],"3779a6e387f92fbc.js":[4524880,4529760],"4321123387f92fbc.js":[4529760,4534376],"1b704bb187f92fbc.js":[4534376,4540128],"83b72aeb43fc0afc.js":[4540128,4544616],"fa163c0243fc0afc.js":[4544616,4549848],"06b75f8543fc0afc.js":[4549848,4566072],"a7834a4743fc0afc.js":[4566072,4571232],"1f093e2e43fc0afc.js":[4571232,4579512],"e2a34c0f43fc0afc.js":[4579512,4586016],"c99bb1a543fc0afc.js":[4586016,4591752],"5ad804b943fc0afc.js":[4591752,4597400],"0bd83342ef61cfb7.js":[4597400,4610016],"cb946d68ef61cfb7.js":[4610016,4618608],"11f0665a4a9b8f91.js":[4618608,4629408],"8502e0b74a9b8f91.js":[4629408,4637520],"c04bc3b14a9b8f91.js":[4637520,4639824],"5e2268457f96c31f.js":[4639824,4649536],"9b7d37264a9b8f91.js":[4649536,4660888],"0559a2854a9b8f91.js":[4660888,4665928],"f2050d844a9b8f91.js":[4665928,4676248],"ee6e988c4706820f.js":[4676248,4679040],"bb12169f4706820f.js":[4679040,4683216],"82f6ea844706820f.js":[4683216,4689512],"8433d3ee4706820f.js":[4689512,4699944],"30dbbc327fd119bd.js":[4699944,4704064],"338ab305346ba7fc.js":[4704064,4706168],"4d0b94f94706820f.js":[4706168,4712944],"68415d244706820f.js":[4712944,4716992],"e915e8434706820f.js":[4716992,4719840],"9300f11f4706820f.js":[4719840,4723816],"78a7c4983bb72a77.js":[4723816,4728456],"2da696e03bb72a77.js":[4728456,4738336],"70e24ecfd9dd2b5f.js":[4738336,4747480],"99b9077f3bb72a77.js":[4747480,4750288],"2a33b1f0592acf9b.js":[4750288,4757640],"dda64da54fa47abc.js":[4757640,4758552],"bf2a19b04fa47abc.js":[4758552,4759488],"87be401f3bb72a77.js":[4759488,4765280],"39747a383bb72a77.js":[4765280,4771064],"19c3745f3bb72a77.js":[4771064,4776792],"60e73e013bb72a77.js":[4776792,4783768],"85ce3b2c3bb72a77.js":[4783768,4791112],"01a565fec64b13b6.js":[4791112,4798360],"d478126d9ed978c7.js":[4798360,4806200],"c71b3f7d0cab5bef.js":[4806200,4814264],"dc04213c0cab5bef.js":[4814264,4828400],"d0118ead0cab5bef.js":[4828400,4839856],"c4f7ba2505cda4cf.js":[4839856,4879576],"8bc675e20cab5bef.js":[4879576,4885840],"f33cf3790cab5bef.js":[4885840,4903296],"12ef98360cab5bef.js":[4903296,4909144],"ac1608820cab5bef.js":[4909144,4917752],"1621565e8efa2eda.js":[4917752,4919904],"107ddad1d9dd2b5f.js":[4919904,4927576],"66fb9502656f204d.js":[4927576,4934104],"7dc16ab8656f204d.js":[4934104,4942664],"1cfa8d23656f204d.js":[4942664,4950512],"0754d6e9656f204d.js":[4950512,4953784],"de7afdda656f204d.js":[4953784,4962184],"86442adc656f204d.js":[4962184,4967968],"62f7e792656f204d.js":[4967968,4974888],"9ff680d3656f204d.js":[4974888,4983184],"af2a3301da1379fc.js":[4983184,4992432],"95d81479da1379fc.js":[4992432,5002064],"e11993b9da1379fc.js":[5002064,5008752],"6929eb46da1379fc.js":[5008752,5012912],"dee59d2cda1379fc.js":[5012912,5019600],"a0623151025a1486.js":[5019600,5026232],"0297c4d4da1379fc.js":[5026232,5032552],"8f3c85bd53df48f4.js":[5032552,5038032],"ad8956834fa47abc.js":[5038032,5038976],"70525f28de776fca.js":[5038976,5040032],"62d6832ede776fca.js":[5040032,5043216],"6c8447e8f2df3dc6.js":[5043216,5044968],"cc3387e414ec898f.js":[5044968,5045920],"05b65a494c428657.js":[5045920,5047400],"cca2da75b9a39d4c.js":[5047400,5049408],"b94f7047991289a5.js":[5049408,5051616],"73cb1999f838361e.js":[5051616,5054696],"40851e2298861133.js":[5054696,5055624],"eb91786b4bb5a262.js":[5055624,5058616],"551dbdcb4bb5a262.js":[5058616,5060016],"ae19755413fd8876.js":[5060016,5061496],"91484f7834336341.js":[5061496,5062784],"fb815e5803a7dea1.js":[5062784,5064496],"f40fd37713fd8876.js":[5064496,5065664],"bcf6b45903a7dea1.js":[5065664,5066720],"0a0530424fa47abc.js":[5066720,5067760],"85624f7ff838361e.js":[5067760,5068696],"30dc9a122b9db7d1.js":[5068696,5071792],"c17708aef838361e.js":[5071792,5072728],"e0f8ef3e14ec898f.js":[5072728,5073664],"8e3596665a79078c.js":[5073664,5075032],"842368934fa47abc.js":[5075032,5075984],"6a2c169cf838361e.js":[5075984,5076920],"e9e65b304fa47abc.js":[5076920,5077856],"db7c606698861133.js":[5077856,5078792],"44c5e6a9f838361e.js":[5078792,5079720],"9a304e251a8cf90e.js":[5079720,5082416],"95d1711598861133.js":[5082416,5083344],"4b88082b2e6b5841.js":[5083344,5087640],"a56ec2a6fdefc681.js":[5087640,5091704],"06768f254fa47abc.js":[5091704,5092632],"027807fa0cd2c405.js":[5092632,5094704],"4b4829834fa47abc.js":[5094704,5095632],"264000c890a68996.js":[5095632,5098960],"abb2f21f5c276e95.js":[5098960,5103016],"2838c060f838361e.js":[5103016,5103944],"94bc3f26463e4ec3.js":[5103944,5106888],"482c7e32463e4ec3.js":[5106888,5110944],"57a7b1ebf838361e.js":[5110944,5111896],"a750b47f523310cf.js":[5111896,5116040],"5525720498861133.js":[5116040,5117000],"a0495db84fa47abc.js":[5117000,5117936],"c902f5434fa47abc.js":[5117936,5118872],"dec05045f838361e.js":[5118872,5119768],"0ceb57cdf838361e.js":[5119768,5120680],"6c849891da1379fc.js":[5120680,5128216],"d36c11bfda1379fc.js":[5128216,5141168],"5394aef2c3eb38bb.js":[5141168,5144920],"f9ea4ecac3eb38bb.js":[5144920,5148216],"2367ef97c3eb38bb.js":[5148216,5160264],"6e753185c3eb38bb.js":[5160264,5173088],"b8961a51c3eb38bb.js":[5173088,5177600],"e294db19c3eb38bb.js":[5177600,5204728],"711f49d5c3eb38bb.js":[5204728,5210992],"593de695c3eb38bb.js":[5210992,5221288],"20a518f5c3eb38bb.js":[5221288,5228400],"0497279c025a1486.js":[5228400,5239256],"fefbbe08025a1486.js":[5239256,5254288],"731795dae65b9ae3.js":[5254288,5256320],"02b72e52e65b9ae3.js":[5256320,5264168],"7d8eadede65b9ae3.js":[5264168,5273584],"6737a381e65b9ae3.js":[5273584,5279504],"a492b562e65b9ae3.js":[5279504,5286696],"c10fc2c8e65b9ae3.js":[5286696,5292600],"c3d2cdb2b9c82aee.js":[5292600,5298752],"5fe1f34db9c82aee.js":[5298752,5307192],"43b21289b9c82aee.js":[5307192,5313688],"43a3e7e6b9c82aee.js":[5313688,5318136],"0099b9b7a95dc8d2.js":[5318136,5326440],"8f61adfcb9c82aee.js":[5326440,5337088],"052615c6b9c82aee.js":[5337088,5343816],"8943de3bb9c82aee.js":[5343816,5349992],"7263a735b9c82aee.js":[5349992,5356768],"df66d5f824f33a87.js":[5356768,5364824],"10515cf424f33a87.js":[5364824,5371456],"c4d12dc024f33a87.js":[5371456,5379456],"dd97066424f33a87.js":[5379456,5386592],"7f6c08ea24f33a87.js":[5386592,5392952],"616a1aca24f33a87.js":[5392952,5401488],"bb5a2f2c24f33a87.js":[5401488,5408504],"1a5c812124f33a87.js":[5408504,5414488],"cb7314d624f33a87.js":[5414488,5421352],"4df19d9224f33a87.js":[5421352,5424976],"b1b5003487c54aad.js":[5424976,5428864],"34f5f1d6a95dc8d2.js":[5428864,5476840],"b645253e87c54aad.js":[5476840,5485224],"fd5624caf23d59b6.js":[5485224,5490432],"7889555087c54aad.js":[5490432,5496768],"eb4699fc87c54aad.js":[5496768,5501752],"1f4c349b87c54aad.js":[5501752,5508960],"c0b750d787c54aad.js":[5508960,5516128],"93c9f8c3025a1486.js":[5516128,5527800],"054b431787c54aad.js":[5527800,5532064],"df21937316387cd9.js":[5532064,5544064],"9f3a91eb16387cd9.js":[5544064,5549136],"b1cbb5b13460ae95.js":[5549136,5558824],"8847fd1116387cd9.js":[5558824,5562840],"ac56d33b16387cd9.js":[5562840,5569872],"360fa10916387cd9.js":[5569872,5575840],"046bae4116387cd9.js":[5575840,5583016],"7d8528cc16387cd9.js":[5583016,5585032],"7896528138dd44bc.js":[5585032,5590112],"1963e50816387cd9.js":[5590112,5593272],"25e8cfb97a99bc88.js":[5593272,5598728],"a11a711b7a99bc88.js":[5598728,5603272],"f0fb774a7a99bc88.js":[5603272,5606312],"528ad256a95dc8d2.js":[5606312,5610776],"2dc31956e6013b09.js":[5610776,5615768],"3e63ce12bbc09b33.js":[5615768,5617840],"167b19a0599435be.js":[5617840,5620104],"e32ad74ae3c492b4.js":[5620104,5624488],"a8e52ecae0c24f5a.js":[5624488,5626360],"a0e941ed7a99bc88.js":[5626360,5633896],"5c9c6c967a99bc88.js":[5633896,5640120],"0526816fc64b13b6.js":[5640120,5644456],"e226fbcd7a99bc88.js":[5644456,5658992],"d3a2a6ee7c8bae52.js":[5658992,5665392],"850827d97a99bc88.js":[5665392,5669584],"008deaa705cda4cf.js":[5669584,5676160],"49a57ba37a99bc88.js":[5676160,5681792],"e792d5019d61205f.js":[5681792,5690128],"10f253d69d61205f.js":[5690128,5696728],"84c0362753df48f4.js":[5696728,5700904],"ab3fd97c8efa2eda.js":[5700904,5703120],"032bf14e5a0589e4.js":[5703120,5708552],"45aabd2e9d61205f.js":[5708552,5714896],"e6006355d3c7c326.js":[5714896,5725136],"aa9e68be9d61205f.js":[5725136,5727048],"a7bd86bb9d61205f.js":[5727048,5732984],"04e8a3769d61205f.js":[5732984,5740912],"faab67fc9d61205f.js":[5740912,5758816],"6f7746699d61205f.js":[5758816,5768840],"d7b658ee26425920.js":[5768840,5782288],"d5d3d21c26425920.js":[5782288,5788752],"a8e41f5426425920.js":[5788752,5794440],"9bd2717d26425920.js":[5794440,5799064],"4573d6af26425920.js":[5799064,5806584],"ce410be326425920.js":[5806584,5812088],"aa7d3a3826425920.js":[5812088,5819384],"0dcd25c926425920.js":[5819384,5826072],"d2779cd926425920.js":[5826072,5836560],"23fe29d5c79a6849.js":[5836560,5862832],"cac75836069da25f.js":[5862832,5864368],"96314234fc487c4f.js":[5864368,5868248],"8710956efc487c4f.js":[5868248,5873056],"c419249cfc487c4f.js":[5873056,5880312],"095f6039fc487c4f.js":[5880312,5885040],"ea0551171c6776e8.js":[5885040,5887984],"862393ee1283d877.js":[5887984,5901816],"775b70b31283d877.js":[5901816,5907848],"88a0f006a35f158c.js":[5907848,5912288],"2a33b1f0683780a6.js":[5912288,5919640],"0526816f773e0857.js":[5919640,5923976]},"version":"3.2.5"} \ No newline at end of file diff --git a/node_modules/.cache/esm/01261cd23ab0e665.js b/node_modules/.cache/esm/01261cd23ab0e665.js deleted file mode 100644 index c5617ee870d50..0000000000000 --- a/node_modules/.cache/esm/01261cd23ab0e665.js +++ /dev/null @@ -1,384 +0,0 @@ -"use strict"; -var es5 = require("./es5"); -var canEvaluate = typeof navigator == "undefined"; - -var errorObj = {e: {}}; -var tryCatchTarget; -var globalObject = typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - typeof global !== "undefined" ? global : - this !== undefined ? this : null; - -function tryCatcher() { - try { - var target = tryCatchTarget; - tryCatchTarget = null; - return target.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } -} -function tryCatch(fn) { - tryCatchTarget = fn; - return tryCatcher; -} - -var inherits = function(Child, Parent) { - var hasProp = {}.hasOwnProperty; - - function T() { - this.constructor = Child; - this.constructor$ = Parent; - for (var propertyName in Parent.prototype) { - if (hasProp.call(Parent.prototype, propertyName) && - propertyName.charAt(propertyName.length-1) !== "$" - ) { - this[propertyName + "$"] = Parent.prototype[propertyName]; - } - } - } - T.prototype = Parent.prototype; - Child.prototype = new T(); - return Child.prototype; -}; - - -function isPrimitive(val) { - return val == null || val === true || val === false || - typeof val === "string" || typeof val === "number"; - -} - -function isObject(value) { - return typeof value === "function" || - typeof value === "object" && value !== null; -} - -function maybeWrapAsError(maybeError) { - if (!isPrimitive(maybeError)) return maybeError; - - return new Error(safeToString(maybeError)); -} - -function withAppended(target, appendee) { - var len = target.length; - var ret = new Array(len + 1); - var i; - for (i = 0; i < len; ++i) { - ret[i] = target[i]; - } - ret[i] = appendee; - return ret; -} - -function getDataPropertyOrDefault(obj, key, defaultValue) { - if (es5.isES5) { - var desc = Object.getOwnPropertyDescriptor(obj, key); - - if (desc != null) { - return desc.get == null && desc.set == null - ? desc.value - : defaultValue; - } - } else { - return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; - } -} - -function notEnumerableProp(obj, name, value) { - if (isPrimitive(obj)) return obj; - var descriptor = { - value: value, - configurable: true, - enumerable: false, - writable: true - }; - es5.defineProperty(obj, name, descriptor); - return obj; -} - -function thrower(r) { - throw r; -} - -var inheritedDataKeys = (function() { - var excludedPrototypes = [ - Array.prototype, - Object.prototype, - Function.prototype - ]; - - var isExcludedProto = function(val) { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (excludedPrototypes[i] === val) { - return true; - } - } - return false; - }; - - if (es5.isES5) { - var getKeys = Object.getOwnPropertyNames; - return function(obj) { - var ret = []; - var visitedKeys = Object.create(null); - while (obj != null && !isExcludedProto(obj)) { - var keys; - try { - keys = getKeys(obj); - } catch (e) { - return ret; - } - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (visitedKeys[key]) continue; - visitedKeys[key] = true; - var desc = Object.getOwnPropertyDescriptor(obj, key); - if (desc != null && desc.get == null && desc.set == null) { - ret.push(key); - } - } - obj = es5.getPrototypeOf(obj); - } - return ret; - }; - } else { - var hasProp = {}.hasOwnProperty; - return function(obj) { - if (isExcludedProto(obj)) return []; - var ret = []; - - /*jshint forin:false */ - enumeration: for (var key in obj) { - if (hasProp.call(obj, key)) { - ret.push(key); - } else { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (hasProp.call(excludedPrototypes[i], key)) { - continue enumeration; - } - } - ret.push(key); - } - } - return ret; - }; - } - -})(); - -var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; -function isClass(fn) { - try { - if (typeof fn === "function") { - var keys = es5.names(fn.prototype); - - var hasMethods = es5.isES5 && keys.length > 1; - var hasMethodsOtherThanConstructor = keys.length > 0 && - !(keys.length === 1 && keys[0] === "constructor"); - var hasThisAssignmentAndStaticMethods = - thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; - - if (hasMethods || hasMethodsOtherThanConstructor || - hasThisAssignmentAndStaticMethods) { - return true; - } - } - return false; - } catch (e) { - return false; - } -} - -function toFastProperties(obj) { - /*jshint -W027,-W055,-W031*/ - function FakeConstructor() {} - FakeConstructor.prototype = obj; - var receiver = new FakeConstructor(); - function ic() { - return typeof receiver.foo; - } - ic(); - ic(); - return obj; - eval(obj); -} - -var rident = /^[a-z$_][a-z$_0-9]*$/i; -function isIdentifier(str) { - return rident.test(str); -} - -function filledRange(count, prefix, suffix) { - var ret = new Array(count); - for(var i = 0; i < count; ++i) { - ret[i] = prefix + i + suffix; - } - return ret; -} - -function safeToString(obj) { - try { - return obj + ""; - } catch (e) { - return "[no string representation]"; - } -} - -function isError(obj) { - return obj instanceof Error || - (obj !== null && - typeof obj === "object" && - typeof obj.message === "string" && - typeof obj.name === "string"); -} - -function markAsOriginatingFromRejection(e) { - try { - notEnumerableProp(e, "isOperational", true); - } - catch(ignore) {} -} - -function originatesFromRejection(e) { - if (e == null) return false; - return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || - e["isOperational"] === true); -} - -function canAttachTrace(obj) { - return isError(obj) && es5.propertyIsWritable(obj, "stack"); -} - -var ensureErrorObject = (function() { - if (!("stack" in new Error())) { - return function(value) { - if (canAttachTrace(value)) return value; - try {throw new Error(safeToString(value));} - catch(err) {return err;} - }; - } else { - return function(value) { - if (canAttachTrace(value)) return value; - return new Error(safeToString(value)); - }; - } -})(); - -function classString(obj) { - return {}.toString.call(obj); -} - -function copyDescriptors(from, to, filter) { - var keys = es5.names(from); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (filter(key)) { - try { - es5.defineProperty(to, key, es5.getDescriptor(from, key)); - } catch (ignore) {} - } - } -} - -var asArray = function(v) { - if (es5.isArray(v)) { - return v; - } - return null; -}; - -if (typeof Symbol !== "undefined" && Symbol.iterator) { - var ArrayFrom = typeof Array.from === "function" ? function(v) { - return Array.from(v); - } : function(v) { - var ret = []; - var it = v[Symbol.iterator](); - var itResult; - while (!((itResult = it.next()).done)) { - ret.push(itResult.value); - } - return ret; - }; - - asArray = function(v) { - if (es5.isArray(v)) { - return v; - } else if (v != null && typeof v[Symbol.iterator] === "function") { - return ArrayFrom(v); - } - return null; - }; -} - -var isNode = typeof process !== "undefined" && - classString(process).toLowerCase() === "[object process]"; - -var hasEnvVariables = typeof process !== "undefined" && - typeof process.env !== "undefined"; - -function env(key) { - return hasEnvVariables ? process.env[key] : undefined; -} - -function getNativePromise() { - if (typeof Promise === "function") { - try { - var promise = new Promise(function(){}); - if ({}.toString.call(promise) === "[object Promise]") { - return Promise; - } - } catch (e) {} - } -} - -function domainBind(self, cb) { - return self.bind(cb); -} - -var ret = { - isClass: isClass, - isIdentifier: isIdentifier, - inheritedDataKeys: inheritedDataKeys, - getDataPropertyOrDefault: getDataPropertyOrDefault, - thrower: thrower, - isArray: es5.isArray, - asArray: asArray, - notEnumerableProp: notEnumerableProp, - isPrimitive: isPrimitive, - isObject: isObject, - isError: isError, - canEvaluate: canEvaluate, - errorObj: errorObj, - tryCatch: tryCatch, - inherits: inherits, - withAppended: withAppended, - maybeWrapAsError: maybeWrapAsError, - toFastProperties: toFastProperties, - filledRange: filledRange, - toString: safeToString, - canAttachTrace: canAttachTrace, - ensureErrorObject: ensureErrorObject, - originatesFromRejection: originatesFromRejection, - markAsOriginatingFromRejection: markAsOriginatingFromRejection, - classString: classString, - copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", - isNode: isNode, - hasEnvVariables: hasEnvVariables, - env: env, - global: globalObject, - getNativePromise: getNativePromise, - domainBind: domainBind -}; -ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); - return (version[0] === 0 && version[1] > 10) || (version[0] > 0); -})(); - -if (ret.isNode) ret.toFastProperties(process); - -try {throw new Error(); } catch (e) {ret.lastLineError = e;} -module.exports = ret; diff --git a/node_modules/.cache/esm/01261cd2f9362bae.js b/node_modules/.cache/esm/01261cd2f9362bae.js deleted file mode 100644 index c5617ee870d50..0000000000000 --- a/node_modules/.cache/esm/01261cd2f9362bae.js +++ /dev/null @@ -1,384 +0,0 @@ -"use strict"; -var es5 = require("./es5"); -var canEvaluate = typeof navigator == "undefined"; - -var errorObj = {e: {}}; -var tryCatchTarget; -var globalObject = typeof self !== "undefined" ? self : - typeof window !== "undefined" ? window : - typeof global !== "undefined" ? global : - this !== undefined ? this : null; - -function tryCatcher() { - try { - var target = tryCatchTarget; - tryCatchTarget = null; - return target.apply(this, arguments); - } catch (e) { - errorObj.e = e; - return errorObj; - } -} -function tryCatch(fn) { - tryCatchTarget = fn; - return tryCatcher; -} - -var inherits = function(Child, Parent) { - var hasProp = {}.hasOwnProperty; - - function T() { - this.constructor = Child; - this.constructor$ = Parent; - for (var propertyName in Parent.prototype) { - if (hasProp.call(Parent.prototype, propertyName) && - propertyName.charAt(propertyName.length-1) !== "$" - ) { - this[propertyName + "$"] = Parent.prototype[propertyName]; - } - } - } - T.prototype = Parent.prototype; - Child.prototype = new T(); - return Child.prototype; -}; - - -function isPrimitive(val) { - return val == null || val === true || val === false || - typeof val === "string" || typeof val === "number"; - -} - -function isObject(value) { - return typeof value === "function" || - typeof value === "object" && value !== null; -} - -function maybeWrapAsError(maybeError) { - if (!isPrimitive(maybeError)) return maybeError; - - return new Error(safeToString(maybeError)); -} - -function withAppended(target, appendee) { - var len = target.length; - var ret = new Array(len + 1); - var i; - for (i = 0; i < len; ++i) { - ret[i] = target[i]; - } - ret[i] = appendee; - return ret; -} - -function getDataPropertyOrDefault(obj, key, defaultValue) { - if (es5.isES5) { - var desc = Object.getOwnPropertyDescriptor(obj, key); - - if (desc != null) { - return desc.get == null && desc.set == null - ? desc.value - : defaultValue; - } - } else { - return {}.hasOwnProperty.call(obj, key) ? obj[key] : undefined; - } -} - -function notEnumerableProp(obj, name, value) { - if (isPrimitive(obj)) return obj; - var descriptor = { - value: value, - configurable: true, - enumerable: false, - writable: true - }; - es5.defineProperty(obj, name, descriptor); - return obj; -} - -function thrower(r) { - throw r; -} - -var inheritedDataKeys = (function() { - var excludedPrototypes = [ - Array.prototype, - Object.prototype, - Function.prototype - ]; - - var isExcludedProto = function(val) { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (excludedPrototypes[i] === val) { - return true; - } - } - return false; - }; - - if (es5.isES5) { - var getKeys = Object.getOwnPropertyNames; - return function(obj) { - var ret = []; - var visitedKeys = Object.create(null); - while (obj != null && !isExcludedProto(obj)) { - var keys; - try { - keys = getKeys(obj); - } catch (e) { - return ret; - } - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (visitedKeys[key]) continue; - visitedKeys[key] = true; - var desc = Object.getOwnPropertyDescriptor(obj, key); - if (desc != null && desc.get == null && desc.set == null) { - ret.push(key); - } - } - obj = es5.getPrototypeOf(obj); - } - return ret; - }; - } else { - var hasProp = {}.hasOwnProperty; - return function(obj) { - if (isExcludedProto(obj)) return []; - var ret = []; - - /*jshint forin:false */ - enumeration: for (var key in obj) { - if (hasProp.call(obj, key)) { - ret.push(key); - } else { - for (var i = 0; i < excludedPrototypes.length; ++i) { - if (hasProp.call(excludedPrototypes[i], key)) { - continue enumeration; - } - } - ret.push(key); - } - } - return ret; - }; - } - -})(); - -var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; -function isClass(fn) { - try { - if (typeof fn === "function") { - var keys = es5.names(fn.prototype); - - var hasMethods = es5.isES5 && keys.length > 1; - var hasMethodsOtherThanConstructor = keys.length > 0 && - !(keys.length === 1 && keys[0] === "constructor"); - var hasThisAssignmentAndStaticMethods = - thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; - - if (hasMethods || hasMethodsOtherThanConstructor || - hasThisAssignmentAndStaticMethods) { - return true; - } - } - return false; - } catch (e) { - return false; - } -} - -function toFastProperties(obj) { - /*jshint -W027,-W055,-W031*/ - function FakeConstructor() {} - FakeConstructor.prototype = obj; - var receiver = new FakeConstructor(); - function ic() { - return typeof receiver.foo; - } - ic(); - ic(); - return obj; - eval(obj); -} - -var rident = /^[a-z$_][a-z$_0-9]*$/i; -function isIdentifier(str) { - return rident.test(str); -} - -function filledRange(count, prefix, suffix) { - var ret = new Array(count); - for(var i = 0; i < count; ++i) { - ret[i] = prefix + i + suffix; - } - return ret; -} - -function safeToString(obj) { - try { - return obj + ""; - } catch (e) { - return "[no string representation]"; - } -} - -function isError(obj) { - return obj instanceof Error || - (obj !== null && - typeof obj === "object" && - typeof obj.message === "string" && - typeof obj.name === "string"); -} - -function markAsOriginatingFromRejection(e) { - try { - notEnumerableProp(e, "isOperational", true); - } - catch(ignore) {} -} - -function originatesFromRejection(e) { - if (e == null) return false; - return ((e instanceof Error["__BluebirdErrorTypes__"].OperationalError) || - e["isOperational"] === true); -} - -function canAttachTrace(obj) { - return isError(obj) && es5.propertyIsWritable(obj, "stack"); -} - -var ensureErrorObject = (function() { - if (!("stack" in new Error())) { - return function(value) { - if (canAttachTrace(value)) return value; - try {throw new Error(safeToString(value));} - catch(err) {return err;} - }; - } else { - return function(value) { - if (canAttachTrace(value)) return value; - return new Error(safeToString(value)); - }; - } -})(); - -function classString(obj) { - return {}.toString.call(obj); -} - -function copyDescriptors(from, to, filter) { - var keys = es5.names(from); - for (var i = 0; i < keys.length; ++i) { - var key = keys[i]; - if (filter(key)) { - try { - es5.defineProperty(to, key, es5.getDescriptor(from, key)); - } catch (ignore) {} - } - } -} - -var asArray = function(v) { - if (es5.isArray(v)) { - return v; - } - return null; -}; - -if (typeof Symbol !== "undefined" && Symbol.iterator) { - var ArrayFrom = typeof Array.from === "function" ? function(v) { - return Array.from(v); - } : function(v) { - var ret = []; - var it = v[Symbol.iterator](); - var itResult; - while (!((itResult = it.next()).done)) { - ret.push(itResult.value); - } - return ret; - }; - - asArray = function(v) { - if (es5.isArray(v)) { - return v; - } else if (v != null && typeof v[Symbol.iterator] === "function") { - return ArrayFrom(v); - } - return null; - }; -} - -var isNode = typeof process !== "undefined" && - classString(process).toLowerCase() === "[object process]"; - -var hasEnvVariables = typeof process !== "undefined" && - typeof process.env !== "undefined"; - -function env(key) { - return hasEnvVariables ? process.env[key] : undefined; -} - -function getNativePromise() { - if (typeof Promise === "function") { - try { - var promise = new Promise(function(){}); - if ({}.toString.call(promise) === "[object Promise]") { - return Promise; - } - } catch (e) {} - } -} - -function domainBind(self, cb) { - return self.bind(cb); -} - -var ret = { - isClass: isClass, - isIdentifier: isIdentifier, - inheritedDataKeys: inheritedDataKeys, - getDataPropertyOrDefault: getDataPropertyOrDefault, - thrower: thrower, - isArray: es5.isArray, - asArray: asArray, - notEnumerableProp: notEnumerableProp, - isPrimitive: isPrimitive, - isObject: isObject, - isError: isError, - canEvaluate: canEvaluate, - errorObj: errorObj, - tryCatch: tryCatch, - inherits: inherits, - withAppended: withAppended, - maybeWrapAsError: maybeWrapAsError, - toFastProperties: toFastProperties, - filledRange: filledRange, - toString: safeToString, - canAttachTrace: canAttachTrace, - ensureErrorObject: ensureErrorObject, - originatesFromRejection: originatesFromRejection, - markAsOriginatingFromRejection: markAsOriginatingFromRejection, - classString: classString, - copyDescriptors: copyDescriptors, - hasDevTools: typeof chrome !== "undefined" && chrome && - typeof chrome.loadTimes === "function", - isNode: isNode, - hasEnvVariables: hasEnvVariables, - env: env, - global: globalObject, - getNativePromise: getNativePromise, - domainBind: domainBind -}; -ret.isRecentNode = ret.isNode && (function() { - var version = process.versions.node.split(".").map(Number); - return (version[0] === 0 && version[1] > 10) || (version[0] > 0); -})(); - -if (ret.isNode) ret.toFastProperties(process); - -try {throw new Error(); } catch (e) {ret.lastLineError = e;} -module.exports = ret; diff --git a/package.json b/package.json index 80a2d9b45a311..6a4f9fe20e0eb 100644 --- a/package.json +++ b/package.json @@ -286,9 +286,11 @@ "prepare": "node bin/npm-cli.js rebuild && node bin/npm-cli.js --no-audit --no-timing prune --prefix=. --no-global && rimraf test/*/*/node_modules && make -j4 doc", "preversion": "bash scripts/update-authors.sh && git add AUTHORS && git commit -m \"update AUTHORS\" || true", "licenses": "licensee --production --errors-only", - "tap": "tap --reporter=classic --timeout 300", - "tap-cover": "tap --reporter=classic --nyc-arg='--cache' --coverage --timeout 600", - "test": "standard && npm run test-tap", + "tap": "tap -J --timeout 300", + "tap-cover": "tap -J --nyc-arg=--cache --coverage --timeout 600", + "pretest": "standard", + "test": "npm run test-tap --", + "posttest": "rimraf test/npm_cache*", "test-coverage": "npm run tap-cover -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-tap": "npm run tap -- \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-*/*.js\"", "test-node": "tap --timeout 240 \"test/tap/*.js\" \"test/network/*.js\" \"test/broken-under-nyc*/*.js\"" diff --git a/test/common-config.js b/test/common-config.js new file mode 100644 index 0000000000000..003150335483a --- /dev/null +++ b/test/common-config.js @@ -0,0 +1,90 @@ +if (module === require.main) { + console.log('1..1') + console.log('ok 1 setup done') + process.exit(0) +} + +var fs = require('graceful-fs') +var path = require('path') +var userconfigSrc = path.resolve(__dirname, 'fixtures', 'config', 'userconfig') +exports.userconfig = userconfigSrc + '-with-gc' +exports.globalconfig = path.resolve(__dirname, 'fixtures', 'config', 'globalconfig') + +// if this hasn't been written yet, then do it now. +try { + fs.statSync(exports.userconfig) +} catch (er) { + var uc = fs.readFileSync(userconfigSrc) + var gcini = 'globalconfig = ' + exports.globalconfig + '\n' + // atomic! + fs.writeFileSync(exports.userconfig + '.' + process.pid, gcini + uc) + fs.renameSync(exports.userconfig + '.' + process.pid, exports.userconfig) +} + +exports.builtin = path.resolve(__dirname, 'fixtures', 'config', 'builtin') +exports.malformed = path.resolve(__dirname, 'fixtures', 'config', 'malformed') +exports.ucData = + { globalconfig: exports.globalconfig, + email: 'i@izs.me', + 'env-thing': 'asdf', + 'init.author.name': 'Isaac Z. Schlueter', + 'init.author.email': 'i@izs.me', + 'init.author.url': 'http://blog.izs.me/', + 'init.version': '1.2.3', + 'npm:publishtest': true, + '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', + 'npm-www:nocache': '1', + nodedir: '/Users/isaacs/dev/js/node-v0.8', + 'sign-git-tag': true, + message: 'v%s', + 'strict-ssl': false, + 'tmp': path.normalize(process.env.HOME + '/.tmp'), + _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', + _token: + { AuthSession: 'yabba-dabba-doodle', + version: '1', + expires: '1345001053415', + path: '/', + httponly: true } } + +// set the userconfig in the env +// unset anything else that npm might be trying to foist on us +Object.keys(process.env).forEach(function (k) { + if (k.match(/^npm_config_/i)) { + delete process.env[k] + } +}) +process.env.npm_config_userconfig = exports.userconfig +process.env.npm_config_other_env_thing = '1000' +process.env.random_env_var = 'asdf' +process.env.npm_config__underbar_env_thing = 'underful' +process.env.NPM_CONFIG_UPPERCASE_ENV_THING = '42' + +exports.envData = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': '42', + 'other-env-thing': '1000' +} +exports.envDataFix = { + userconfig: exports.userconfig, + '_underbar-env-thing': 'underful', + 'uppercase-env-thing': 42, + 'other-env-thing': 1000 +} + +var projectConf = path.resolve(__dirname, '..', '.npmrc') +try { + fs.statSync(projectConf) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectConf, '') +} + +var projectRc = path.join(__dirname, 'fixtures', 'config', '.npmrc') +try { + fs.statSync(projectRc) +} catch (er) { + // project conf not found, probably working with packed npm + fs.writeFileSync(projectRc, 'just = testing') +} diff --git a/test/common-tap.js b/test/common-tap.js index 37d5efe9f86c8..e02e8c2b98ce8 100644 --- a/test/common-tap.js +++ b/test/common-tap.js @@ -1,6 +1,7 @@ 'use strict' /* eslint-disable camelcase */ +const configCommon = require('./common-config.js') var fs = require('graceful-fs') var readCmdShim = require('read-cmd-shim') var isWindows = require('../lib/utils/is-windows.js') @@ -17,9 +18,32 @@ if (!global.setImmediate || !require('timers').setImmediate) { var spawn = require('child_process').spawn var path = require('path') -var port = exports.port = 1337 +// provide a working dir unique to each test +const main = require.main.filename +exports.pkg = path.resolve(path.dirname(main), path.basename(main, '.js')) +const mkdirp = require('mkdirp') +const rimraf = require('rimraf') +mkdirp.sync(exports.pkg) +require('tap').teardown(() => { + try { + rimraf.sync(exports.pkg) + } catch (e) { + if (process.platform !== 'win32') { + throw e + } + } +}) + +// space these out to help prevent collisions +const testId = 3 * (+process.env.TAP_CHILD_ID || 0) + +var port = exports.port = 15443 + testId exports.registry = 'http://localhost:' + port +exports.altPort = 7331 + testId + +exports.gitPort = 4321 + testId + var fakeRegistry = require('./fake-registry.js') exports.fakeRegistry = fakeRegistry @@ -29,10 +53,10 @@ ourenv.npm_config_progress = 'false' ourenv.npm_config_metrics = 'false' ourenv.npm_config_audit = 'false' -var npm_config_cache = path.resolve(__dirname, 'npm_cache') +var npm_config_cache = path.resolve(__dirname, 'npm_cache_' + testId) ourenv.npm_config_cache = exports.npm_config_cache = npm_config_cache -ourenv.npm_config_userconfig = exports.npm_config_userconfig = path.join(__dirname, 'fixtures', 'config', 'userconfig') -ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = path.join(__dirname, 'fixtures', 'config', 'globalconfig') +ourenv.npm_config_userconfig = exports.npm_config_userconfig = configCommon.userconfig +ourenv.npm_config_globalconfig = exports.npm_config_globalconfig = configCommon.globalconfig ourenv.npm_config_global_style = 'false' ourenv.npm_config_legacy_bundling = 'false' ourenv.npm_config_fetch_retries = '0' diff --git a/test/fake-registry.js b/test/fake-registry.js index 7566443e64cf1..e09e154c76514 100644 --- a/test/fake-registry.js +++ b/test/fake-registry.js @@ -1,7 +1,14 @@ 'use strict' const common = require('./common-tap.js') const Bluebird = require('bluebird') -const log = require('npmlog') +const silentLogger = { + http: () => {}, + silly: () => {} +} + +const log = process.env.TAP_CHILD_ID + ? silentLogger + : require('npmlog') const http = require('http') const EventEmitter = require('events') diff --git a/test/need-npm5-update/ignore-shrinkwrap.js b/test/need-npm5-update/ignore-shrinkwrap.js index 9468162eeef86..4980b659fd23f 100644 --- a/test/need-npm5-update/ignore-shrinkwrap.js +++ b/test/need-npm5-update/ignore-shrinkwrap.js @@ -24,7 +24,7 @@ var json = { name: 'ignore-shrinkwrap', version: '0.0.0', dependencies: { - 'npm-test-ignore-shrinkwrap-file': 'http://localhost:1337/package.js' + 'npm-test-ignore-shrinkwrap-file': 'http://localhost:' + common.port + '/package.js' } } @@ -34,8 +34,8 @@ var shrinkwrap = { dependencies: { 'npm-test-ignore-shrinkwrap-file': { version: '1.2.3', - from: 'http://localhost:1337/shrinkwrap.js', - resolved: 'http://localhost:1337/shrinkwrap.js', + from: 'http://localhost:' + common.port + '/shrinkwrap.js', + resolved: 'http://localhost:' + common.port + '/shrinkwrap.js', dependencies: { opener: { version: '1.3.0', diff --git a/test/need-npm5-update/peer-deps-invalid.js b/test/need-npm5-update/peer-deps-invalid.js index 39ad612e5a9be..15fda253ecc48 100644 --- a/test/need-npm5-update/peer-deps-invalid.js +++ b/test/need-npm5-update/peer-deps-invalid.js @@ -18,8 +18,8 @@ var json = { name: 'peer-deps-invalid', version: '0.0.0', dependencies: { - 'npm-test-peer-deps-file': 'http://localhost:1337/ok.js', - 'npm-test-peer-deps-file-invalid': 'http://localhost:1337/invalid.js' + 'npm-test-peer-deps-file': 'http://localhost:' + common.port + '/ok.js', + 'npm-test-peer-deps-file-invalid': 'http://localhost:' + common.port + '/invalid.js' } } diff --git a/test/tap/404-parent.js b/test/tap/404-parent.js index 67835efc1df10..539ead7a45e0e 100644 --- a/test/tap/404-parent.js +++ b/test/tap/404-parent.js @@ -6,7 +6,7 @@ var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, '404-parent') +const pkg = common.pkg var mr = require('npm-registry-mock') test('404-parent: if parent exists, specify parent in error message', function (t) { @@ -42,6 +42,9 @@ function setup () { function performInstall (cb) { mr({port: common.port}, function (er, s) { // create mock registry. + if (er) { + return cb(er) + } s.get('/test-npm-404-parent-test') .many().reply(404, {'error': 'version not found'}) npm.load({ diff --git a/test/tap/404-private-registry-scoped.js b/test/tap/404-private-registry-scoped.js index f8a8c5b05a572..5565f7a404e9c 100644 --- a/test/tap/404-private-registry-scoped.js +++ b/test/tap/404-private-registry-scoped.js @@ -1,12 +1,11 @@ var test = require('tap').test -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') var mr = common.fakeRegistry.compat var server -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg function setup () { cleanup() diff --git a/test/tap/404-private-registry.js b/test/tap/404-private-registry.js index da6e446918f92..869125eba18f0 100644 --- a/test/tap/404-private-registry.js +++ b/test/tap/404-private-registry.js @@ -7,7 +7,7 @@ var mr = common.fakeRegistry.compat var server var packageName = path.basename(__filename, '.js') -var testdir = path.join(__dirname, packageName) +var testdir = common.pkg function setup () { cleanup() diff --git a/test/tap/404.js b/test/tap/404.js index 710780ad26e60..450b0c2816fba 100644 --- a/test/tap/404.js +++ b/test/tap/404.js @@ -9,7 +9,7 @@ const common = require('../common-tap.js') const e404 = /test-npm-404@latest' is not in the npm registry/ const invalidPackage = /Your package name is not valid, because[\s\S]+1\. name can only contain URL-friendly characters/ -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/access.js b/test/tap/access.js index d400b4d33b134..db03cbfc9e80b 100644 --- a/test/tap/access.js +++ b/test/tap/access.js @@ -9,7 +9,8 @@ const mr = require('npm-registry-mock') const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'access') +const pkg = common.pkg + let server const scoped = { @@ -63,7 +64,7 @@ test('npm access public on current package', function (t) { test('npm access public when no package passed and no package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-public-missing-guard') + var missing = path.join(pkg, 'access-public-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) common.npm([ @@ -83,7 +84,7 @@ test('npm access public when no package passed and no package.json', function (t test('npm access public when no package passed and invalid package.json', function (t) { // need to simulate a missing package.json - var invalid = path.join(__dirname, 'access-public-invalid-package') + var invalid = path.join(pkg, 'access-public-invalid-package') mkdirp.sync(path.join(invalid, 'node_modules')) // it's hard to force `read-package-json` to break w/o ENOENT, but this will do it fs.writeFileSync(path.join(invalid, 'package.json'), '{\n') @@ -380,7 +381,7 @@ test('npm access ls-packages on user', function (t) { test('npm access ls-packages with no package specified or package.json', function (t) { // need to simulate a missing package.json - var missing = path.join(__dirname, 'access-missing-guard') + var missing = path.join(pkg, 'access-missing-guard') mkdirp.sync(path.join(missing, 'node_modules')) var serverPackages = { diff --git a/test/tap/add-named-update-protocol-port.js b/test/tap/add-named-update-protocol-port.js index 37851e10686a1..2876b6cdbc480 100644 --- a/test/tap/add-named-update-protocol-port.js +++ b/test/tap/add-named-update-protocol-port.js @@ -15,7 +15,7 @@ var fooPkg = { name: packageName, version: '0.0.0', dist: { - tarball: 'https://localhost:1338/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', + tarball: 'https://localhost:' + common.altPort + '/registry/' + packageName + '/-/' + packageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -30,7 +30,7 @@ var fooiPkg = { name: iPackageName, version: '0.0.0', dist: { - tarball: 'http://127.0.0.1:1338/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', + tarball: 'http://127.0.0.1:' + common.altPort + '/registry/' + iPackageName + '/-/' + iPackageName + '-0.0.0.tgz', shasum: '356a192b7913b04c54574d18c28d46e6395428ab' } } @@ -39,13 +39,13 @@ var fooiPkg = { test('setup', function (t) { mr({ - port: 1337, + port: common.port, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') server1 = s mr({ - port: 1338, + port: common.altPort, throwOnUnmatched: true }, function (err, s) { t.ifError(err, 'registry mocked successfully') @@ -67,7 +67,7 @@ test('tarball paths should update port if updating protocol', function (t) { 'add', packageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { @@ -92,7 +92,7 @@ test('tarball paths should NOT update if different hostname', function (t) { 'add', iPackageName + '@0.0.0', '--registry', - 'http://localhost:1337/registry' + 'http://localhost:' + common.port + '/registry' ], {}, function (er, code, stdout, stderr) { diff --git a/test/tap/add-remote-git-file.js b/test/tap/add-remote-git-file.js index 20392af8770be..7d64609072dda 100644 --- a/test/tap/add-remote-git-file.js +++ b/test/tap/add-remote-git-file.js @@ -13,8 +13,8 @@ var npm = require('../../lib/npm.js') var fetchPackageMetadata = require('../../lib/fetch-package-metadata.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-file') -var repo = resolve(__dirname, 'add-remote-git-file-repo') +var pkg = common.pkg +var repo = common.pkg + '-repo' var git var cloneURL = 'git+file://' + resolve(pkg, 'child.git') diff --git a/test/tap/add-remote-git-shrinkwrap.js b/test/tap/add-remote-git-shrinkwrap.js index c7fb2f9b961aa..0daf2922e7645 100644 --- a/test/tap/add-remote-git-shrinkwrap.js +++ b/test/tap/add-remote-git-shrinkwrap.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-shrinkwrap') -var repo = resolve(__dirname, 'add-remote-git-shrinkwrap-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git#master' + 'child': 'git://localhost:' + common.gitPort + '/child.git#master' } }, null, 2) + '\n' @@ -73,7 +73,7 @@ test('shrinkwrap gets correct _from and _resolved (#7121)', function (t) { t.notOk(stderr, 'no error output') var treeish = stdout.trim() - t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:1234/child.git#' + treeish}}}, + t.like(shrinkwrap, {dependencies: {child: {version: 'git://localhost:' + common.gitPort + '/child.git#' + treeish}}}, 'npm shrinkwrapped resolved correctly' ) @@ -114,7 +114,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/test/tap/add-remote-git-submodule.js b/test/tap/add-remote-git-submodule.js index 6e26712c56177..43b30f7a65bcb 100644 --- a/test/tap/add-remote-git-submodule.js +++ b/test/tap/add-remote-git-submodule.js @@ -9,12 +9,12 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git-submodule') -var repos = resolve(__dirname, 'add-remote-git-submodule-repos') +var pkg = common.pkg +var repos = pkg + '-repos' var subwt = resolve(repos, 'subwt') var topwt = resolve(repos, 'topwt') -var suburl = 'git://localhost:1234/sub.git' -var topurl = 'git://localhost:1234/top.git' +var suburl = 'git://localhost:' + common.gitPort + '/sub.git' +var topurl = 'git://localhost:' + common.gitPort + '/top.git' var daemon var daemonPID @@ -97,7 +97,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repos, diff --git a/test/tap/add-remote-git.js b/test/tap/add-remote-git.js index 24abf33a773fd..44294924f15a7 100644 --- a/test/tap/add-remote-git.js +++ b/test/tap/add-remote-git.js @@ -9,8 +9,8 @@ var test = require('tap').test var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'add-remote-git') -var repo = resolve(__dirname, 'add-remote-git-repo') +var pkg = common.pkg +var repo = pkg + '-repo' var daemon var daemonPID @@ -20,7 +20,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - child: 'git://localhost:1234/child.git' + child: 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -61,6 +61,7 @@ test('clean', function (t) { }) function bootstrap () { + cleanup() mkdirp.sync(pkg) fs.writeFileSync(resolve(pkg, 'package.json'), pjParent) } @@ -81,12 +82,12 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, env: process.env, - stdio: ['pipe', 'pipe', 'pipe'] + stdio: ['pipe', 1, 'pipe'] } ) d.stderr.on('data', childFinder) diff --git a/test/tap/adduser-always-auth.js b/test/tap/adduser-always-auth.js index d327e35a9e547..26541eebbc7b6 100644 --- a/test/tap/adduser-always-auth.js +++ b/test/tap/adduser-always-auth.js @@ -6,8 +6,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = {cwd: __dirname} -var outfile = path.resolve(__dirname, '_npmrc') +var opts = { cwd: common.pkg } +var outfile = path.resolve(common.pkg, '_npmrc') var responses = { 'Username': 'u\n', 'Password': 'p\n', @@ -98,7 +98,7 @@ test('npm login --scope uses :registry as its URI', function (t) ], opts, function (err, code) { - t.notOk(code, 'exited OK') + t.equal(code, 0, 'exited OK') t.notOk(err, 'no error output') var config = fs.readFileSync(outfile, 'utf8') t.like(config, new RegExp(scope + ':registry=' + uri), 'scope:registry is set') diff --git a/test/tap/adduser-legacy-auth.js b/test/tap/adduser-legacy-auth.js index 49015878f7d8e..e46901c2b95fe 100644 --- a/test/tap/adduser-legacy-auth.js +++ b/test/tap/adduser-legacy-auth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-legacy-auth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var contents = '_auth=' + Buffer.from('u:x').toString('base64') + '\n' + @@ -42,6 +42,7 @@ function mocks (server) { } test('setup', function (t) { + rimraf.sync(pkg) mkdirp(pkg, function (er) { t.ifError(er, pkg + ' made successfully') @@ -65,8 +66,8 @@ test('npm login', function (t) { opts, function (err, code, stdout, stderr) { if (err) throw err - t.is(code, 0, 'exited OK') t.is(stderr, '', 'no error output') + t.is(code, 0, 'exited OK') var config = fs.readFileSync(outfile, 'utf8') t.like(config, /:always-auth=false/, 'always-auth is scoped and false (by default)') s.close() diff --git a/test/tap/adduser-oauth.js b/test/tap/adduser-oauth.js index 04065048c425b..241fef2a2ed7f 100644 --- a/test/tap/adduser-oauth.js +++ b/test/tap/adduser-oauth.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-oauth') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/test/tap/adduser-saml.js b/test/tap/adduser-saml.js index 530ebb52b3c0e..17a1a9f7b3de6 100644 --- a/test/tap/adduser-saml.js +++ b/test/tap/adduser-saml.js @@ -7,8 +7,8 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var pkg = path.resolve(__dirname, 'adduser-saml') +var opts = { cwd: common.pkg } +var pkg = common.pkg var fakeBrowser = path.resolve(pkg, '_script.sh') var configfile = path.resolve(pkg, '_npmrc') var outfile = path.resolve(pkg, '_outfile') diff --git a/test/tap/aliases.js b/test/tap/aliases.js index 19f0b1293e935..0a0a9dfd953b1 100644 --- a/test/tap/aliases.js +++ b/test/tap/aliases.js @@ -15,7 +15,7 @@ const { Dir, File } = Tacks const readdirAsync = BB.promisify(fs.readdir) const readFileAsync = BB.promisify(fs.readFile) -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { @@ -98,12 +98,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.3', from: 'bar@npm:foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' }, foo: { version: '1.2.3', from: 'foo@1.2.3', - resolved: 'http://localhost:1337/foo/-/foo-1.2.3.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.3.tgz' } } }, 'both dependencies listed correctly') @@ -149,12 +149,12 @@ test('installs an npm: protocol alias package', t => { bar: { version: '1.2.4', from: 'bar@npm:foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' }, foo: { version: '1.2.4', from: 'foo@1.2.4', - resolved: 'http://localhost:1337/foo/-/foo-1.2.4.tgz' + resolved: 'http://localhost:' + common.port + '/foo/-/foo-1.2.4.tgz' } } }, 'ls shows updated packages') diff --git a/test/tap/all-package-metadata-cache-stream-unit.js b/test/tap/all-package-metadata-cache-stream-unit.js index 0b4dd0e26d5ce..9c1babd59c96c 100644 --- a/test/tap/all-package-metadata-cache-stream-unit.js +++ b/test/tap/all-package-metadata-cache-stream-unit.js @@ -1,6 +1,6 @@ 'use strict' -require('../common-tap.js') +const common = require('../common-tap.js') const getStream = require('get-stream') const mkdirp = require('mkdirp') @@ -13,7 +13,7 @@ const {File} = Tacks const _createCacheEntryStream = require('../../lib/search/all-package-metadata.js')._createCacheEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-entry-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/test/tap/all-package-metadata-entry-stream-unit.js b/test/tap/all-package-metadata-entry-stream-unit.js index 4e916229cd852..e693e6b33d76e 100644 --- a/test/tap/all-package-metadata-entry-stream-unit.js +++ b/test/tap/all-package-metadata-entry-stream-unit.js @@ -14,7 +14,7 @@ const {File} = Tacks const _createEntryStream = require('../../lib/search/all-package-metadata.js')._createEntryStream -const PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') let server diff --git a/test/tap/all-package-metadata-update-stream-unit.js b/test/tap/all-package-metadata-update-stream-unit.js index 2c08ac347ed69..782bdf231c88d 100644 --- a/test/tap/all-package-metadata-update-stream-unit.js +++ b/test/tap/all-package-metadata-update-stream-unit.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') var _createEntryUpdateStream = require('../../lib/search/all-package-metadata.js')._createEntryUpdateStream -var PKG_DIR = path.resolve(__dirname, 'create-entry-update-stream') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var server diff --git a/test/tap/all-package-metadata-write-stream-unit.js b/test/tap/all-package-metadata-write-stream-unit.js index 94bb7413f1b32..b258b40dfe666 100644 --- a/test/tap/all-package-metadata-write-stream-unit.js +++ b/test/tap/all-package-metadata-write-stream-unit.js @@ -12,7 +12,7 @@ const ms = require('mississippi') const _createCacheWriteStream = require('../../lib/search/all-package-metadata.js')._createCacheWriteStream -const PKG_DIR = path.resolve(__dirname, 'create-cache-write-stream') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') function setup () { diff --git a/test/tap/all-package-metadata.js b/test/tap/all-package-metadata.js index 99d3fa26c52b8..ec605c3486bb9 100644 --- a/test/tap/all-package-metadata.js +++ b/test/tap/all-package-metadata.js @@ -15,7 +15,7 @@ const File = Tacks.File const allPackageMetadata = require('../../lib/search/all-package-metadata.js') -const PKG_DIR = path.resolve(__dirname, path.basename(__filename, '.js'), 'update-index') +const PKG_DIR = path.resolve(common.pkg, 'update-index') const CACHE_DIR = path.resolve(PKG_DIR, 'cache', '_cacache') let cacheBase let cachePath diff --git a/test/tap/anon-cli-metrics.js b/test/tap/anon-cli-metrics.js index 100ca526cf168..d021cf62bc92f 100644 --- a/test/tap/anon-cli-metrics.js +++ b/test/tap/anon-cli-metrics.js @@ -9,7 +9,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/audit-fix.js b/test/tap/audit-fix.js index 7e95568289005..a832078ae9369 100644 --- a/test/tap/audit-fix.js +++ b/test/tap/audit-fix.js @@ -13,7 +13,7 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } diff --git a/test/tap/audit.js b/test/tap/audit.js index 3384579f77ba7..69406041a45e6 100644 --- a/test/tap/audit.js +++ b/test/tap/audit.js @@ -12,21 +12,10 @@ const test = tap.test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } -tap.tearDown(function () { - process.chdir(__dirname) - try { - rimraf.sync(testDir) - } catch (e) { - if (process.platform !== 'win32') { - throw e - } - } -}) - function tmock (t) { return mr({port: common.port}).then(s => { t.tearDown(function () { diff --git a/test/tap/auto-prune.js b/test/tap/auto-prune.js index 3fa5d5d05b360..8d129c4a83b21 100644 --- a/test/tap/auto-prune.js +++ b/test/tap/auto-prune.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/bearer-token-check.js b/test/tap/bearer-token-check.js index e3af793e602e5..21c6b0beb2c2f 100644 --- a/test/tap/bearer-token-check.js +++ b/test/tap/bearer-token-check.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = resolve(__dirname, 'install-bearer-check') +var pkg = common.pkg var outfile = resolve(pkg, '_npmrc') var modules = resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/test/tap/bin.js b/test/tap/bin.js index 33320bc21f59a..bf2397777ce40 100644 --- a/test/tap/bin.js +++ b/test/tap/bin.js @@ -2,12 +2,12 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } -var binDir = '../../node_modules/.bin' -var fixture = path.resolve(__dirname, binDir) +var opts = { cwd: common.pkg } +var binDir = '../../../node_modules/.bin' +var fixture = path.resolve(common.pkg, binDir) test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/test/tap/bitbucket-https-url-with-creds-package.js b/test/tap/bitbucket-https-url-with-creds-package.js index ce65f15b28fba..4177d5f89fcb7 100644 --- a/test/tap/bitbucket-https-url-with-creds-package.js +++ b/test/tap/bitbucket-https-url-with-creds-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds-package') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds-package', diff --git a/test/tap/bitbucket-https-url-with-creds.js b/test/tap/bitbucket-https-url-with-creds.js index ae87d85848752..09f7e0e8e5488 100644 --- a/test/tap/bitbucket-https-url-with-creds.js +++ b/test/tap/bitbucket-https-url-with-creds.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-https-url-with-creds') +var pkg = common.pkg var json = { name: 'bitbucket-https-url-with-creds', diff --git a/test/tap/bitbucket-shortcut-package.js b/test/tap/bitbucket-shortcut-package.js index 8c418d37dcd0a..bf1a39068ec87 100644 --- a/test/tap/bitbucket-shortcut-package.js +++ b/test/tap/bitbucket-shortcut-package.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut-package') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut-package', diff --git a/test/tap/bitbucket-shortcut.js b/test/tap/bitbucket-shortcut.js index f8167fdd2dce2..c81554e2d9d20 100644 --- a/test/tap/bitbucket-shortcut.js +++ b/test/tap/bitbucket-shortcut.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'bitbucket-shortcut') +var pkg = common.pkg var json = { name: 'bitbucket-shortcut', diff --git a/test/tap/bugs.js b/test/tap/bugs.js index 4d2ee37e132d1..8e2685220dd93 100644 --- a/test/tap/bugs.js +++ b/test/tap/bugs.js @@ -8,15 +8,15 @@ var rimraf = require('rimraf') var fs = require('fs') var path = require('path') var join = path.join -var outFile = path.join(__dirname, '/_output') +var outFile = path.join(common.pkg, '/_output') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } test('setup', function (t) { var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' - fs.writeFileSync(join(__dirname, '/_script.sh'), s, 'ascii') - fs.chmodSync(join(__dirname, '/_script.sh'), '0755') + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' + fs.writeFileSync(join(common.pkg, '/_script.sh'), s, 'ascii') + fs.chmodSync(join(common.pkg, '/_script.sh'), '0755') t.pass('made script') t.end() }) @@ -28,7 +28,7 @@ test('npm bugs underscore', function (t) { 'bugs', 'underscore', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -52,7 +52,7 @@ test('npm bugs optimist - github (https://)', function (t) { 'bugs', 'optimist', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -76,7 +76,7 @@ test('npm bugs npm-test-peer-deps - no repo', function (t) { 'bugs', 'npm-test-peer-deps', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -100,7 +100,7 @@ test('npm bugs test-repo-url-http - non-github (http://)', function (t) { 'bugs', 'test-repo-url-http', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -124,7 +124,7 @@ test('npm bugs test-repo-url-https - gitlab (https://)', function (t) { 'bugs', 'test-repo-url-https', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -148,7 +148,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { 'bugs', 'test-repo-url-ssh', '--registry=' + common.registry, '--loglevel=silent', - '--browser=' + join(__dirname, '/_script.sh') + '--browser=' + join(common.pkg, '/_script.sh') ], opts, function (err, code, stdout, stderr) { @@ -166,7 +166,7 @@ test('npm bugs test-repo-url-ssh - gitlab (ssh://)', function (t) { }) test('cleanup', function (t) { - fs.unlinkSync(join(__dirname, '/_script.sh')) + rimraf.sync(common.pkg) t.pass('cleaned up') t.end() }) diff --git a/test/tap/build-already-built.js b/test/tap/build-already-built.js index 8a66f66e69f93..1e7359a558fa3 100644 --- a/test/tap/build-already-built.js +++ b/test/tap/build-already-built.js @@ -10,7 +10,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'build-already-built') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg var fakePkg = 'foo' test('setup', function (t) { diff --git a/test/tap/builtin-config.js b/test/tap/builtin-config.js index b960ed0383b7b..dddd40565101a 100644 --- a/test/tap/builtin-config.js +++ b/test/tap/builtin-config.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var folder = path.resolve(__dirname, 'builtin-config') +var folder = common.pkg var test = require('tap').test var npm = path.resolve(__dirname, '../..') var spawn = require('child_process').spawn diff --git a/test/tap/bundled-dependencies-nonarray.js b/test/tap/bundled-dependencies-nonarray.js index 924e1b27b60a3..fdc32c2883af1 100644 --- a/test/tap/bundled-dependencies-nonarray.js +++ b/test/tap/bundled-dependencies-nonarray.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var dir = path.resolve(__dirname, path.basename(__filename, '.js')) +var dir = common.pkg var pkg = path.resolve(dir, 'pkg-with-bundled') var dep = path.resolve(dir, 'a-bundled-dep') diff --git a/test/tap/bundled-dependencies.js b/test/tap/bundled-dependencies.js index c6d67e3c503a5..6dbfa8cb08d74 100644 --- a/test/tap/bundled-dependencies.js +++ b/test/tap/bundled-dependencies.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-bundled-deps') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/test/tap/bundled-transitive-deps.js b/test/tap/bundled-transitive-deps.js index fe59149062636..d3f296ab1612f 100644 --- a/test/tap/bundled-transitive-deps.js +++ b/test/tap/bundled-transitive-deps.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../lib/npm.js') var tar = require('tar') var mkdirp = require('mkdirp') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var packed = path.join(testdir, 'packed') var fixture = new Tacks( diff --git a/test/tap/cache-add-unpublished.js b/test/tap/cache-add-unpublished.js index 0e8a9de8bfa67..08592a50deebb 100644 --- a/test/tap/cache-add-unpublished.js +++ b/test/tap/cache-add-unpublished.js @@ -11,7 +11,7 @@ test('cache add', function (t) { 'cache', 'add', 'superfoo', - '--registry=http://localhost:1337/' + '--registry=http://localhost:' + common.port + '/' ], {}, function (er, c, so, se) { @@ -31,7 +31,7 @@ function setup (cb) { res.statusCode = 404 res.end('{"error":"not_found"}\n') }) - s.listen(1337, function () { + s.listen(common.port, function () { cb(null, s) }) } diff --git a/test/tap/cache-shasum-fork.js b/test/tap/cache-shasum-fork.js index 1e92d437560d7..3bc2a5d2a59ae 100644 --- a/test/tap/cache-shasum-fork.js +++ b/test/tap/cache-shasum-fork.js @@ -14,7 +14,7 @@ var common = require('../common-tap.js') var forkPath = path.resolve( __dirname, '..', 'fixtures', 'forked-underscore-1.5.1.tgz' ) -var pkg = path.resolve(__dirname, 'cache-shasum-fork') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/test/tap/check-cpu-reqs.js b/test/tap/check-cpu-reqs.js index 4d8c3dc6551c4..0a36492430bad 100644 --- a/test/tap/check-cpu-reqs.js +++ b/test/tap/check-cpu-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-engine-reqs.js b/test/tap/check-engine-reqs.js index 8dd9b8231fb5e..7cbbcd354f997 100644 --- a/test/tap/check-engine-reqs.js +++ b/test/tap/check-engine-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-install-self.js b/test/tap/check-install-self.js index 2cde1606a91e0..e7591b55e0939 100644 --- a/test/tap/check-install-self.js +++ b/test/tap/check-install-self.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-os-reqs.js b/test/tap/check-os-reqs.js index 5d0c1ecf78b07..6c43fa61aa637 100644 --- a/test/tap/check-os-reqs.js +++ b/test/tap/check-os-reqs.js @@ -7,7 +7,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installFrom = path.join(base, 'from') var installIn = path.join(base, 'in') diff --git a/test/tap/check-permissions.js b/test/tap/check-permissions.js index 0a5f2e038adf1..74e49fb65fb6c 100644 --- a/test/tap/check-permissions.js +++ b/test/tap/check-permissions.js @@ -8,7 +8,8 @@ var writableFallback = require('../../lib/install/writable.js').fsOpenImplementa var exists = require('../../lib/install/exists.js').fsAccessImplementation var existsFallback = require('../../lib/install/exists.js').fsStatImplementation -var testBase = path.resolve(__dirname, 'check-permissions') +const common = require('../common-tap.js') +var testBase = common.pkg var existingDir = path.resolve(testBase, 'exists') var nonExistingDir = path.resolve(testBase, 'does-not-exist') var writableDir = path.resolve(testBase, 'writable') diff --git a/test/tap/ci-header.js b/test/tap/ci-header.js index dc20cc53c305a..530da3bf3a72a 100644 --- a/test/tap/ci-header.js +++ b/test/tap/ci-header.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var chain = require('slide').chain var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/ci.js b/test/tap/ci.js index 9d69e3e5eb524..9150f26efeedc 100644 --- a/test/tap/ci.js +++ b/test/tap/ci.js @@ -12,7 +12,7 @@ const test = require('tap').test const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'ci') +const testDir = common.pkg const EXEC_OPTS = { cwd: testDir } @@ -44,25 +44,27 @@ test('setup', () => { const fixture = new Tacks(Dir({ 'package.json': File(PKG) })) - fixture.create(testDir) - return mr({port: common.port}) + return rimraf(testDir).then(() => { + fixture.create(testDir) + return mr({port: common.port}) + }) .then((server) => { SERVER = server return common.npm([ 'install', '--registry', common.registry ], EXEC_OPTS) - .then(() => fs.readFileAsync( - path.join(testDir, 'package-lock.json'), - 'utf8') - ) - .then((lock) => { - RAW_LOCKFILE = lock - }) - .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) - .then((ret) => { - TREE = scrubFrom(JSON.parse(ret[1])) - }) + }) + .then(() => fs.readFileAsync( + path.join(testDir, 'package-lock.json'), + 'utf8') + ) + .then((lock) => { + RAW_LOCKFILE = lock + }) + .then(() => common.npm(['ls', '--json'], EXEC_OPTS)) + .then((ret) => { + TREE = scrubFrom(JSON.parse(ret[1])) }) }) diff --git a/test/tap/circular-dep.js b/test/tap/circular-dep.js index d7f66eacef1ac..a08c41bf4a9af 100644 --- a/test/tap/circular-dep.js +++ b/test/tap/circular-dep.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'circular-dep') +var pkg = common.pkg var minimist = path.join(pkg, 'minimist') var EXEC_OPTS = { diff --git a/test/tap/config-basic.js b/test/tap/config-basic.js index 0483695cf5f25..a95e94db29fd6 100644 --- a/test/tap/config-basic.js +++ b/test/tap/config-basic.js @@ -1,6 +1,6 @@ var test = require('tap').test +var common = require('../common-config.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var path = require('path') var projectData = { @@ -58,15 +58,7 @@ var expectSources = { } function isDeeplyDetails (t, aa, bb, msg, seen) { - if (aa == null && bb == null) return t.pass(msg) - if (typeof bb !== 'object') return t.is(aa, bb, msg) - if (!seen) seen = [] - for (var kk in seen) if (seen[kk] === aa || seen[kk] === bb) return - seen.push(aa, bb) - t.is(Object.keys(aa).length, Object.keys(bb).length, msg + ': # of elements') - Object.keys(bb).forEach(function (key) { - isDeeplyDetails(t, aa[key], bb[key], msg + ' -> ' + key, seen) - }) + return t.same(aa, bb, msg) } test('no builtin', function (t) { diff --git a/test/tap/config-builtin.js b/test/tap/config-builtin.js index 885d099a1fc30..713522d6ccfa2 100644 --- a/test/tap/config-builtin.js +++ b/test/tap/config-builtin.js @@ -1,6 +1,6 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var path = require('path') var ucData = common.ucData diff --git a/test/tap/config-certfile.js b/test/tap/config-certfile.js index 4b960672ad79e..904a8c0147718 100644 --- a/test/tap/config-certfile.js +++ b/test/tap/config-certfile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +require('../common-config.js') var path = require('path') var fs = require('fs') diff --git a/test/tap/config-credentials.js b/test/tap/config-credentials.js index f6f00ee0e6518..d8f6770666e2d 100644 --- a/test/tap/config-credentials.js +++ b/test/tap/config-credentials.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var URI = 'https://registry.lvh.me:8661/' diff --git a/test/tap/config-edit.js b/test/tap/config-edit.js index 7d6eb2588d48b..a4f78a262c8b9 100644 --- a/test/tap/config-edit.js +++ b/test/tap/config-edit.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'npm-global-edit') +var pkg = common.pkg var editorSrc = function () { /* #!/usr/bin/env node diff --git a/test/tap/config-envReplace.js b/test/tap/config-envReplace.js index 0b4f628d67339..f65609f050f75 100644 --- a/test/tap/config-envReplace.js +++ b/test/tap/config-envReplace.js @@ -8,7 +8,8 @@ const ini = require('ini') const test = require('tap').test const npmconf = require('../../lib/config/core.js') -const packagePath = path.resolve(__dirname, 'config-envReplace') +const common = require('../common-tap.js') +const packagePath = common.pkg const packageJsonFile = JSON.stringify({ name: 'config-envReplace' diff --git a/test/tap/config-list.js b/test/tap/config-list.js index 05402d4bbe6ee..7559214a727a5 100644 --- a/test/tap/config-list.js +++ b/test/tap/config-list.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-list') +var pkg = common.pkg var opts = { cwd: pkg, env: common.emptyEnv() } var npmrc = path.resolve(pkg, '.npmrc') var npmrcContents = ` diff --git a/test/tap/config-malformed.js b/test/tap/config-malformed.js index 4f74ea5387e59..0d859e00340f3 100644 --- a/test/tap/config-malformed.js +++ b/test/tap/config-malformed.js @@ -1,7 +1,7 @@ var test = require('tap').test var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') test('with malformed', function (t) { npmconf.load({}, common.malformed, function (er, conf) { diff --git a/test/tap/config-new-cafile.js b/test/tap/config-new-cafile.js index 9cffb19008ed4..bd5792f3e3ff7 100644 --- a/test/tap/config-new-cafile.js +++ b/test/tap/config-new-cafile.js @@ -1,4 +1,4 @@ -require('./00-config-setup.js') +const common = require('../common-tap.js') var path = require('path') var fs = require('graceful-fs') @@ -8,8 +8,9 @@ var rimraf = require('rimraf') var osenv = require('osenv') var npmconf = require('../../lib/config/core.js') -var dir = path.resolve(__dirname, 'config-new-cafile') +var dir = common.pkg var beep = path.resolve(dir, 'beep.pem') +var npmrc = path.resolve(dir, 'npmrc') test('setup', function (t) { bootstrap() @@ -18,7 +19,7 @@ test('setup', function (t) { test('can set new cafile when old is gone', function (t) { t.plan(5) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { npmconf.loaded = false t.ifError(error) conf.set('cafile', beep, 'user') @@ -26,7 +27,7 @@ test('can set new cafile when old is gone', function (t) { t.ifError(error) t.equal(conf.get('cafile'), beep) rimraf.sync(beep) - npmconf.load(function (error, conf) { + npmconf.load({ userconfig: npmrc }, function (error, conf) { if (error) { throw error } @@ -47,6 +48,7 @@ test('cleanup', function (t) { function bootstrap () { mkdirp.sync(dir) + fs.writeFileSync(npmrc, '') fs.writeFileSync(beep, '') } diff --git a/test/tap/config-private.js b/test/tap/config-private.js index 91582921e6dff..e6bf9d2e83cee 100644 --- a/test/tap/config-private.js +++ b/test/tap/config-private.js @@ -5,7 +5,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'config-private') +var pkg = common.pkg var opts = { cwd: pkg } test('setup', function (t) { diff --git a/test/tap/config-project.js b/test/tap/config-project.js index b9e8b7ac04a2e..0f7be913c097f 100644 --- a/test/tap/config-project.js +++ b/test/tap/config-project.js @@ -3,7 +3,7 @@ var path = require('path') var fix = path.resolve(__dirname, '..', 'fixtures', 'config') var projectRc = path.resolve(fix, '.npmrc') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') +var common = require('../common-config.js') var projectData = { just: 'testing' } diff --git a/test/tap/config-save.js b/test/tap/config-save.js index a7f85d6015e4b..23dc7b5960785 100644 --- a/test/tap/config-save.js +++ b/test/tap/config-save.js @@ -1,13 +1,15 @@ var fs = require('fs') var ini = require('ini') -var test = require('tap').test +var t = require('tap') +const test = t.test +var common = require('../common-config.js') +var commonTap = require('../common-tap.js') var npmconf = require('../../lib/config/core.js') -var common = require('./00-config-setup.js') var expectConf = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -32,7 +34,7 @@ var expectConf = [ var expectFile = [ 'globalconfig = ' + common.globalconfig, 'email = i@izs.me', - 'env-thing = asdf', + 'env-thing = foo', 'init.author.name = Isaac Z. Schlueter', 'init.author.email = i@izs.me', 'init.author.url = http://blog.izs.me/', @@ -54,6 +56,10 @@ var expectFile = [ '' ].join('\n') +const userconfig = commonTap.pkg + '/userconfig' +fs.writeFileSync(userconfig, fs.readFileSync(common.userconfig)) +process.env.npm_config_userconfig = userconfig + test('saving configs', function (t) { npmconf.load(function (er, conf) { if (er) throw er diff --git a/test/tap/correct-mkdir.js b/test/tap/correct-mkdir.js index 2c93f943ad5c4..c69f8b00b55d5 100644 --- a/test/tap/correct-mkdir.js +++ b/test/tap/correct-mkdir.js @@ -1,9 +1,9 @@ /* eslint-disable camelcase */ var test = require('tap').test var assert = require('assert') -var path = require('path') var requireInject = require('require-inject') -var cache_dir = path.resolve(__dirname, 'correct-mkdir') +const common = require('../common-tap.js') +var cache_dir = common.pkg test('correct-mkdir: no race conditions', function (t) { var mock_fs = {} diff --git a/test/tap/cruft-test.js b/test/tap/cruft-test.js index 0cbcc6f56c61d..4f2ed6c0d0a71 100644 --- a/test/tap/cruft-test.js +++ b/test/tap/cruft-test.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cruft = path.join(base, 'node_modules', 'cruuuft') var pkg = { name: 'example', diff --git a/test/tap/debug-logs.js b/test/tap/debug-logs.js index a6997352636fe..8eb6c78049ea5 100644 --- a/test/tap/debug-logs.js +++ b/test/tap/debug-logs.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/dedupe-git-semver.js b/test/tap/dedupe-git-semver.js index 21e372e24b0d0..35bb2c87d80e7 100644 --- a/test/tap/dedupe-git-semver.js +++ b/test/tap/dedupe-git-semver.js @@ -36,7 +36,8 @@ const npm = requireInject.installGlobally('../../lib/npm.js', { } }) -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const tmpdir = path.join(basedir, 'tmp') diff --git a/test/tap/dedupe-scoped.js b/test/tap/dedupe-scoped.js index 9d5ff9ac4c003..957f67e141c40 100644 --- a/test/tap/dedupe-scoped.js +++ b/test/tap/dedupe-scoped.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = join(__dirname, 'dedupe-scoped') +var pkg = common.pkg var modules = join(pkg, 'node_modules') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/dedupe.js b/test/tap/dedupe.js index b6c601cbad37e..109f81656237b 100644 --- a/test/tap/dedupe.js +++ b/test/tap/dedupe.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'dedupe') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/dist-tag.js b/test/tap/dist-tag.js index 3631a598e9c68..0567964d35a23 100644 --- a/test/tap/dist-tag.js +++ b/test/tap/dist-tag.js @@ -7,7 +7,7 @@ var mr = require('npm-registry-mock') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'dist-tag') +var pkg = common.pkg var server var scoped = { diff --git a/test/tap/do-not-remove-other-bins.js b/test/tap/do-not-remove-other-bins.js index 6fec728d43bcc..4e6b0d27b2f53 100644 --- a/test/tap/do-not-remove-other-bins.js +++ b/test/tap/do-not-remove-other-bins.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installPath = path.resolve(base, 'install') var installBin = path.resolve(installPath, 'node_modules', '.bin') var packageApath = path.resolve(base, 'packageA') diff --git a/test/tap/doctor.js b/test/tap/doctor.js index 26c74833e2bfc..6ee05746960d6 100644 --- a/test/tap/doctor.js +++ b/test/tap/doctor.js @@ -13,7 +13,7 @@ const which = require('which') const Dir = Tacks.Dir const File = Tacks.File -const ROOT = path.join(__dirname, path.basename(__filename, '.js')) +const ROOT = common.pkg const CACHE = path.join(ROOT, 'cache') const TMP = path.join(ROOT, 'tmp') const PREFIX = path.join(ROOT, 'global-prefix') diff --git a/test/tap/extraneous-dep-cycle-ls-ok.js b/test/tap/extraneous-dep-cycle-ls-ok.js index d483b3e22ac33..11f52209ed835 100644 --- a/test/tap/extraneous-dep-cycle-ls-ok.js +++ b/test/tap/extraneous-dep-cycle-ls-ok.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/test/tap/false-name.js b/test/tap/false-name.js index 1e2a4d43ddbb9..301be4fc8ef94 100644 --- a/test/tap/false-name.js +++ b/test/tap/false-name.js @@ -18,7 +18,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'false-name') +var pkg = common.pkg var cache = path.join(pkg, 'cache') var server diff --git a/test/tap/fetch-package-metadata.js b/test/tap/fetch-package-metadata.js index 2fc501369e52f..9a45fb57a92de 100644 --- a/test/tap/fetch-package-metadata.js +++ b/test/tap/fetch-package-metadata.js @@ -11,7 +11,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg function setup (cb) { cleanup() @@ -56,7 +56,7 @@ test('fetch-package-metadata provides resolved metadata', function (t) { function thenVerifyMetadata (err, pkg) { t.ifError(err, 'fetched metadata') - t.equals(pkg._resolved, 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz', '_resolved') + t.equals(pkg._resolved, 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz', '_resolved') t.equals(pkg._integrity, 'sha1-sNMrbEXCWcV4uiADdisgUTG9+9E=', '_integrity') server.close() t.end() diff --git a/test/tap/full-warning-messages.js b/test/tap/full-warning-messages.js index c986695d67e99..945cf66a629dd 100644 --- a/test/tap/full-warning-messages.js +++ b/test/tap/full-warning-messages.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') diff --git a/test/tap/gently-rm-cmdshims.js b/test/tap/gently-rm-cmdshims.js index 304c6956bdfd6..6726fe76d8dba 100644 --- a/test/tap/gently-rm-cmdshims.js +++ b/test/tap/gently-rm-cmdshims.js @@ -7,7 +7,8 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var npm = require('../../lib/npm.js') -var work = path.join(__dirname, path.basename(__filename, '.js')) +const common = require('../common-tap.js') +var work = common.pkg var doremove = path.join(work, 'doremove') var dontremove = path.join(work, 'dontremove') var example_json = { diff --git a/test/tap/gently-rm-linked-module.js b/test/tap/gently-rm-linked-module.js index 877c683c9f04e..ab595e10c740f 100644 --- a/test/tap/gently-rm-linked-module.js +++ b/test/tap/gently-rm-linked-module.js @@ -1,6 +1,5 @@ var common = require('../common-tap.js') -var basename = require('path').basename var resolve = require('path').resolve var fs = require('graceful-fs') var test = require('tap').test @@ -11,7 +10,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var isWindows = require('../../lib/utils/is-windows.js') -var base = resolve(__dirname, basename(__filename, '.js')) +var base = common.pkg var fixture = new Tacks(Dir({ 'working-dir': Dir({ 'node_modules': Dir({}) // so it doesn't try to install into npm's own node_modules diff --git a/test/tap/gently-rm-overeager.js b/test/tap/gently-rm-overeager.js index 7299b2c3f4ce1..91a3768aff705 100644 --- a/test/tap/gently-rm-overeager.js +++ b/test/tap/gently-rm-overeager.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'gently-rm-overeager') var dep = path.join(testdir, 'test-whoops') diff --git a/test/tap/gently-rm-symlinked-global-dir.js b/test/tap/gently-rm-symlinked-global-dir.js index 8ac290091ca5c..0a27dae5c5e95 100644 --- a/test/tap/gently-rm-symlinked-global-dir.js +++ b/test/tap/gently-rm-symlinked-global-dir.js @@ -7,10 +7,10 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var isWindows = require('../../lib/utils/is-windows.js') -var pkg = resolve(__dirname, 'gently-rm-linked') -var dep = resolve(__dirname, 'test-linked') -var glb = resolve(__dirname, 'test-global') -var lnk = resolve(__dirname, 'test-global-link') +var pkg = resolve(common.pkg, 'package') +var dep = resolve(common.pkg, 'test-linked') +var glb = resolve(common.pkg, 'test-global') +var lnk = resolve(common.pkg, 'test-global-link') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/gist-short-shortcut-package.js b/test/tap/gist-short-shortcut-package.js index 4074995ee5cc4..d7c70b16b029f 100644 --- a/test/tap/gist-short-shortcut-package.js +++ b/test/tap/gist-short-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-short-shortcut-package', diff --git a/test/tap/gist-short-shortcut.js b/test/tap/gist-short-shortcut.js index 875c30e036512..04bf5bd42a985 100644 --- a/test/tap/gist-short-shortcut.js +++ b/test/tap/gist-short-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-short-shortcut') +var pkg = common.pkg var json = { name: 'gist-short-shortcut', diff --git a/test/tap/gist-shortcut-package.js b/test/tap/gist-shortcut-package.js index dd6f41359e9ed..9851e80b0e07a 100644 --- a/test/tap/gist-shortcut-package.js +++ b/test/tap/gist-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut-package') +var pkg = common.pkg var json = { name: 'gist-shortcut-package', diff --git a/test/tap/gist-shortcut.js b/test/tap/gist-shortcut.js index 8ad5ef001ce23..9958a996e076c 100644 --- a/test/tap/gist-shortcut.js +++ b/test/tap/gist-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gist-shortcut') +var pkg = common.pkg var json = { name: 'gist-shortcut', diff --git a/test/tap/git-dependency-install-link.js b/test/tap/git-dependency-install-link.js index 1bf839f302891..462df8973fead 100644 --- a/test/tap/git-dependency-install-link.js +++ b/test/tap/git-dependency-install-link.js @@ -11,9 +11,9 @@ var mr = require('npm-registry-mock') var npm = require('../../lib/npm.js') var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'git-dependency-install-link') -var repo = resolve(__dirname, 'git-dependency-install-link-repo') -var prefix = resolve(__dirname, 'git-dependency-install-link-prefix') +var pkg = common.pkg +var repo = pkg + '-repo' +var prefix = pkg + '-prefix' var cache = resolve(pkg, 'cache') var daemon @@ -32,7 +32,7 @@ var pjParent = JSON.stringify({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }, null, 2) + '\n' @@ -139,7 +139,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: pkg, diff --git a/test/tap/git-npmignore.js b/test/tap/git-npmignore.js index 19d014c3d9a92..42c1637b18013 100644 --- a/test/tap/git-npmignore.js +++ b/test/tap/git-npmignore.js @@ -1,7 +1,6 @@ /* eslint-disable camelcase */ var child_process = require('child_process') var readdir = require('graceful-fs').readdirSync -var path = require('path') var resolve = require('path').resolve var rimraf = require('rimraf') @@ -42,7 +41,7 @@ var fixture = new Tacks(Dir({ }) })) -var testdir = resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = resolve(testdir, 'cache') var dep = resolve(testdir, 'deps', 'gitch') var packname = 'gitch-1.0.0.tgz' diff --git a/test/tap/git-prepare.js b/test/tap/git-prepare.js index 1a61056b4beda..9112828ce40cd 100644 --- a/test/tap/git-prepare.js +++ b/test/tap/git-prepare.js @@ -11,7 +11,7 @@ const mr = require('npm-registry-mock') const npm = require('../../lib/npm.js') const common = require('../common-tap.js') -const testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const repo = path.join(testdir, 'repo') const prefix = path.join(testdir, 'prefix') const cache = path.join(testdir, 'cache') @@ -37,7 +37,7 @@ const fixture = new Tacks(Dir({ name: 'parent', version: '1.2.3', dependencies: { - 'child': 'git://localhost:1234/child.git' + 'child': 'git://localhost:' + common.gitPort + '/child.git' } }) }), @@ -144,7 +144,7 @@ function setup (cb) { '--export-all', '--base-path=.', '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: repo, diff --git a/test/tap/github-shortcut-package.js b/test/tap/github-shortcut-package.js index 73385436b7893..a084479e1791e 100644 --- a/test/tap/github-shortcut-package.js +++ b/test/tap/github-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'github-shortcut-package') +var pkg = common.pkg var json = { name: 'github-shortcut-package', diff --git a/test/tap/github-shortcut.js b/test/tap/github-shortcut.js index 641d64f3b92fe..90f4655149bb9 100644 --- a/test/tap/github-shortcut.js +++ b/test/tap/github-shortcut.js @@ -13,7 +13,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.resolve(__dirname, 'github-shortcut') +const pkg = common.pkg const json = { name: 'github-shortcut', diff --git a/test/tap/gitlab-shortcut-package.js b/test/tap/gitlab-shortcut-package.js index 1dd1ba99fbd29..54632f8370403 100644 --- a/test/tap/gitlab-shortcut-package.js +++ b/test/tap/gitlab-shortcut-package.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut-package') +var pkg = common.pkg var json = { name: 'gitlab-shortcut-package', diff --git a/test/tap/gitlab-shortcut.js b/test/tap/gitlab-shortcut.js index 6b2bfbc3edd86..724178867aede 100644 --- a/test/tap/gitlab-shortcut.js +++ b/test/tap/gitlab-shortcut.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'gitlab-shortcut') +var pkg = common.pkg var json = { name: 'gitlab-shortcut', diff --git a/test/tap/graceful-restart.js b/test/tap/graceful-restart.js index 56513fbf7ebbb..740561bd79efa 100644 --- a/test/tap/graceful-restart.js +++ b/test/tap/graceful-restart.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'graceful-restart') +var pkg = common.pkg var outGraceless = [ 'prerestart', diff --git a/test/tap/ignore-install-link.js b/test/tap/ignore-install-link.js index 684c6a05b24c0..129df3c2717ca 100644 --- a/test/tap/ignore-install-link.js +++ b/test/tap/ignore-install-link.js @@ -9,7 +9,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var root = path.resolve(__dirname, 'ignore-install-link') +var root = common.pkg var pkg = path.resolve(root, 'pkg') var dep = path.resolve(root, 'dep') var target = path.resolve(pkg, 'node_modules', 'dep') diff --git a/test/tap/ignore-scripts.js b/test/tap/ignore-scripts.js index 785921d7eb2d6..f5af4553c26c0 100644 --- a/test/tap/ignore-scripts.js +++ b/test/tap/ignore-scripts.js @@ -9,7 +9,7 @@ var common = require('../common-tap') // ignore-scripts/package.json has scripts that always exit with non-zero error // codes. -var pkg = path.resolve(__dirname, 'ignore-scripts') +var pkg = common.pkg var gypfile = 'bad_binding_file\n' var json = { diff --git a/test/tap/init-interrupt.js b/test/tap/init-interrupt.js index b0c7643ddf044..114bb2bacba27 100644 --- a/test/tap/init-interrupt.js +++ b/test/tap/init-interrupt.js @@ -2,7 +2,6 @@ // if 'npm init' is interrupted with ^C, don't report // 'init written successfully' var test = require('tap').test -var path = require('path') var osenv = require('osenv') var rimraf = require('rimraf') var npmlog = require('npmlog') @@ -10,7 +9,8 @@ var requireInject = require('require-inject') var npm = require('../../lib/npm.js') -var PKG_DIR = path.resolve(__dirname, 'init-interrupt') +const common = require('../common-tap.js') +var PKG_DIR = common.pkg test('setup', function (t) { cleanup() diff --git a/test/tap/install-at-locally.js b/test/tap/install-at-locally.js index fa0190ceb3ee2..705c2df119642 100644 --- a/test/tap/install-at-locally.js +++ b/test/tap/install-at-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-at-sub-path-locally.js b/test/tap/install-at-sub-path-locally.js index e16b75179ebaf..08b64746af678 100644 --- a/test/tap/install-at-sub-path-locally.js +++ b/test/tap/install-at-sub-path-locally.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-at-sub-path-locally') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-bad-dep-format.js b/test/tap/install-bad-dep-format.js index 94c7d175fde45..d01996f155212 100644 --- a/test/tap/install-bad-dep-format.js +++ b/test/tap/install-bad-dep-format.js @@ -21,7 +21,7 @@ test('invalid url format returns appropriate error', function (t) { setup(json) common.npm(['install'], {}, function (err, code, stdout, stderr) { t.ifError(err, 'install ran without error') - t.equals(code, 1, 'inall exited with code 1') + t.equals(code, 1, 'install exited with code 1') t.match(stderr, /ERR.*Unsupported URL Type/, 'Error should report that invalid url-style formats are used') @@ -43,12 +43,12 @@ function cleanup () { process.chdir(osenv.tmpdir()) var pkgs = [json] pkgs.forEach(function (json) { - rimraf.sync(path.resolve(__dirname, json.name)) + rimraf.sync(path.resolve(common.pkg, json.name)) }) } function mkPkg (json) { - var pkgPath = path.resolve(__dirname, json.name) + var pkgPath = path.resolve(common.pkg, json.name) mkdirp.sync(pkgPath) fs.writeFileSync( path.join(pkgPath, 'package.json'), diff --git a/test/tap/install-bad-man.js b/test/tap/install-bad-man.js index 226d0b24fc06d..98c8e9a7e0453 100644 --- a/test/tap/install-bad-man.js +++ b/test/tap/install-bad-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-bad-man') -var target = resolve(__dirname, 'install-bad-man-target') +var pkg = common.pkg +var target = pkg + '-target' var EXEC_OPTS = { cwd: target diff --git a/test/tap/install-before.js b/test/tap/install-before.js index c99b996c43029..05a254a1ef1ce 100644 --- a/test/tap/install-before.js +++ b/test/tap/install-before.js @@ -12,7 +12,7 @@ const { test } = require('tap') const { Dir, File } = Tacks -const testDir = path.join(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg let server test('setup', t => { diff --git a/test/tap/install-bin-null.js b/test/tap/install-bin-null.js index f45528a75acf4..7a87a2e0bbc27 100644 --- a/test/tap/install-bin-null.js +++ b/test/tap/install-bin-null.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-bin-null') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-development.js b/test/tap/install-cli-only-development.js index ff9d05f547f26..a68c0f8aac0a2 100644 --- a/test/tap/install-cli-only-development.js +++ b/test/tap/install-cli-only-development.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-development') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-production.js b/test/tap/install-cli-only-production.js index 40328d773539f..e43692d3d7c9c 100644 --- a/test/tap/install-cli-only-production.js +++ b/test/tap/install-cli-only-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-only-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-only-shrinkwrap.js b/test/tap/install-cli-only-shrinkwrap.js index aa731909d3539..e3a4685d9c459 100644 --- a/test/tap/install-cli-only-shrinkwrap.js +++ b/test/tap/install-cli-only-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-production-nosave.js b/test/tap/install-cli-production-nosave.js index cf69ad3fae05d..46b3460b7232c 100644 --- a/test/tap/install-cli-production-nosave.js +++ b/test/tap/install-cli-production-nosave.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-cli-production-nosave') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-production.js b/test/tap/install-cli-production.js index a1fdac6e880d5..4c88add92fffc 100644 --- a/test/tap/install-cli-production.js +++ b/test/tap/install-cli-production.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-cli-production') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-cli-unicode.js b/test/tap/install-cli-unicode.js index 01a5f4a471dc0..2691db96d0677 100644 --- a/test/tap/install-cli-unicode.js +++ b/test/tap/install-cli-unicode.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'install-cli-unicode') +var pkg = common.pkg function hasOnlyAscii (s) { return /^[\000-\177]*$/.test(s) diff --git a/test/tap/install-contributors-count.js b/test/tap/install-contributors-count.js index 52fba0fd24999..ead925081330b 100644 --- a/test/tap/install-contributors-count.js +++ b/test/tap/install-contributors-count.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/test/tap/install-dep-classification.js b/test/tap/install-dep-classification.js index 153a7f3927ec1..3c65459d345fb 100644 --- a/test/tap/install-dep-classification.js +++ b/test/tap/install-dep-classification.js @@ -7,7 +7,7 @@ const Dir = Tacks.Dir const common = require('../common-tap.js') const fs = require('fs') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-duplicate-deps-warning.js b/test/tap/install-duplicate-deps-warning.js index 017a5cdfe117c..2b10d8aa31964 100644 --- a/test/tap/install-duplicate-deps-warning.js +++ b/test/tap/install-duplicate-deps-warning.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { dependencies: { diff --git a/test/tap/install-from-local.js b/test/tap/install-from-local.js index 3cac382a70d38..a3e63b359dbea 100644 --- a/test/tap/install-from-local.js +++ b/test/tap/install-from-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-from-local') +var root = common.pkg var pkg = path.join(root, 'package-with-local-paths') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-into-likenamed-folder.js b/test/tap/install-into-likenamed-folder.js index 187d5fbf11bca..c7bc86f3baaf4 100644 --- a/test/tap/install-into-likenamed-folder.js +++ b/test/tap/install-into-likenamed-folder.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var moduleDir = path.join(base, 'example-src') var destDir = path.join(base, 'example') var moduleJson = { diff --git a/test/tap/install-link-scripts.js b/test/tap/install-link-scripts.js index acc88b4b2ccdc..bff4dd5ef0106 100644 --- a/test/tap/install-link-scripts.js +++ b/test/tap/install-link-scripts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-link-scripts') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var dep = path.join(pkg, 'dep') diff --git a/test/tap/install-local-dep-cycle.js b/test/tap/install-local-dep-cycle.js index 1f76ad9598a2d..a66f04bce4715 100644 --- a/test/tap/install-local-dep-cycle.js +++ b/test/tap/install-local-dep-cycle.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/test/tap/install-man.js b/test/tap/install-man.js index d24819ca7887d..720b4c217b375 100644 --- a/test/tap/install-man.js +++ b/test/tap/install-man.js @@ -8,8 +8,8 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-man') -var target = resolve(__dirname, 'install-man-target') +var pkg = common.pkg +var target = pkg + '-target' common.pendIfWindows('man pages do not get installed on Windows') diff --git a/test/tap/install-noargs-dev.js b/test/tap/install-noargs-dev.js index ec9c7e3687eef..4716dc2243b53 100644 --- a/test/tap/install-noargs-dev.js +++ b/test/tap/install-noargs-dev.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-noargs-dev') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-package-json-order.js b/test/tap/install-package-json-order.js index 93977c6c3dc44..ae000ff6738df 100644 --- a/test/tap/install-package-json-order.js +++ b/test/tap/install-package-json-order.js @@ -5,7 +5,8 @@ var mkdirp = require('mkdirp') var spawn = require('child_process').spawn var npm = require.resolve('../../bin/npm-cli.js') var node = process.execPath -var pkg = path.resolve(__dirname, 'install-package-json-order') +const common = require('../common-tap.js') +var pkg = common.pkg var workdir = path.join(pkg, 'workdir') var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') diff --git a/test/tap/install-package-lock-only.js b/test/tap/install-package-lock-only.js index 1610988851c12..6e98f27b30021 100644 --- a/test/tap/install-package-lock-only.js +++ b/test/tap/install-package-lock-only.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-parse-error.js b/test/tap/install-parse-error.js index 1330195ead9f0..1a72c336de071 100644 --- a/test/tap/install-parse-error.js +++ b/test/tap/install-parse-error.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ 'package.json': File( diff --git a/test/tap/install-property-conflicts.js b/test/tap/install-property-conflicts.js index 8f293885abf40..c8f58e139fbcc 100644 --- a/test/tap/install-property-conflicts.js +++ b/test/tap/install-property-conflicts.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'install-property-conflicts') +var pkg = common.pkg var target = resolve(pkg, '_target') var EXEC_OPTS = { diff --git a/test/tap/install-report-just-installed.js b/test/tap/install-report-just-installed.js index 0a2cde2562ac7..23b373b269405 100644 --- a/test/tap/install-report-just-installed.js +++ b/test/tap/install-report-just-installed.js @@ -1,12 +1,11 @@ 'use strict' -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks(Dir({ node_modules: Dir({ a: Dir({ diff --git a/test/tap/install-save-consistent-newlines.js b/test/tap/install-save-consistent-newlines.js index 6250377445a79..acea57c987bfb 100644 --- a/test/tap/install-save-consistent-newlines.js +++ b/test/tap/install-save-consistent-newlines.js @@ -11,7 +11,7 @@ const test = require('tap').test const common = require('../common-tap.js') -const pkg = path.join(__dirname, 'install-save-consistent-newlines') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-exact.js b/test/tap/install-save-exact.js index 14e32f0f84b62..3d57ead361be8 100644 --- a/test/tap/install-save-exact.js +++ b/test/tap/install-save-exact.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-exact') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-local.js b/test/tap/install-save-local.js index 5965281bf2967..8f4f5ecb0023e 100644 --- a/test/tap/install-save-local.js +++ b/test/tap/install-save-local.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var root = path.join(__dirname, 'install-save-local') +var root = common.pkg var pkg = path.join(root, 'package') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-save-prefix.js b/test/tap/install-save-prefix.js index b669c5fb7ef70..001e24d873558 100644 --- a/test/tap/install-save-prefix.js +++ b/test/tap/install-save-prefix.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, 'install-save-prefix') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-scoped-already-installed.js b/test/tap/install-scoped-already-installed.js index 58966b047c430..707d82a44353e 100644 --- a/test/tap/install-scoped-already-installed.js +++ b/test/tap/install-scoped-already-installed.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var root = path.join(__dirname, 'install-scoped-already-installed') +var root = common.pkg var pkg = path.join(root, 'package-with-scoped-paths') var modules = path.join(pkg, 'node_modules') diff --git a/test/tap/install-scoped-link.js b/test/tap/install-scoped-link.js index 9171b8f46f439..920e7e3d4531a 100644 --- a/test/tap/install-scoped-link.js +++ b/test/tap/install-scoped-link.js @@ -12,8 +12,8 @@ var escapeExecPath = require('../../lib/utils/escape-exec-path') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-link') -var work = path.join(__dirname, 'install-scoped-link-TEST') +var pkg = common.pkg +var work = pkg + '-TEST' var modules = path.join(work, 'node_modules') var EXEC_OPTS = { cwd: work } diff --git a/test/tap/install-scoped-with-bundled-dependency.js b/test/tap/install-scoped-with-bundled-dependency.js index bd197ae036591..76f440dc6c158 100644 --- a/test/tap/install-scoped-with-bundled-dependency.js +++ b/test/tap/install-scoped-with-bundled-dependency.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/install-scoped-with-peer-dependency.js b/test/tap/install-scoped-with-peer-dependency.js index 7f60c73221092..477a04a1055dd 100644 --- a/test/tap/install-scoped-with-peer-dependency.js +++ b/test/tap/install-scoped-with-peer-dependency.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-scoped-with-peer-dependency') +var pkg = common.pkg var local = path.join(pkg, 'package') var EXEC_OPTS = { } diff --git a/test/tap/install-shrinkwrapped-git.js b/test/tap/install-shrinkwrapped-git.js index 7bbb4f6e5fb75..7e50aa713d570 100644 --- a/test/tap/install-shrinkwrapped-git.js +++ b/test/tap/install-shrinkwrapped-git.js @@ -11,7 +11,7 @@ var npm = require('../../lib/npm') var common = require('../common-tap') var chain = require('slide').chain -var mockPath = resolve(__dirname, 'install-shrinkwrapped') +var mockPath = common.pkg var parentPath = resolve(mockPath, 'parent') var parentNodeModulesPath = path.join(parentPath, 'node_modules') var outdatedNodeModulesPath = resolve(mockPath, 'node-modules-backup') @@ -53,11 +53,11 @@ test('shrinkwrapped git dependency got updated', function (t) { if (err) { throw err } chain([ // Install & shrinkwrap child package's first commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[0]]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[0]]], // Backup node_modules with the first commit [fs.rename, parentNodeModulesPath, outdatedNodeModulesPath], // Install & shrinkwrap child package's latest commit - [npm.commands.install, ['git://localhost:1234/child.git#' + refs[1].substr(0, 8)]], + [npm.commands.install, ['git://localhost:' + common.gitPort + '/child.git#' + refs[1].substr(0, 8)]], // Restore node_modules with the first commit [rimraf, parentNodeModulesPath], [fs.rename, outdatedNodeModulesPath, parentNodeModulesPath], @@ -68,15 +68,15 @@ test('shrinkwrapped git dependency got updated', function (t) { t.similar(pkglock, { dependencies: { child: { - version: `git://localhost:1234/child.git#${refs[1]}`, - from: `git://localhost:1234/child.git#${refs[1].substr(0, 8)}` + version: `git://localhost:${common.gitPort}/child.git#${refs[1]}`, + from: `git://localhost:${common.gitPort}/child.git#${refs[1].substr(0, 8)}` } } }, 'version and from fields are correct in git-based pkglock dep') var childPackageJSON = require(path.join(parentNodeModulesPath, 'child', 'package.json')) t.equal( childPackageJSON._resolved, - 'git://localhost:1234/child.git#' + refs[1], + 'git://localhost:' + common.gitPort + '/child.git#' + refs[1], "Child package wasn't updated" ) t.end() @@ -153,7 +153,7 @@ function startGitDaemon (cb) { '--export-all', '--base-path=' + mockPath, // Path to the dir that contains child.git '--reuseaddr', - '--port=1234' + '--port=' + common.gitPort ], { cwd: parentPath, diff --git a/test/tap/install-test-cli-without-package-lock.js b/test/tap/install-test-cli-without-package-lock.js index ea3d75feb6af8..468277d74d209 100644 --- a/test/tap/install-test-cli-without-package-lock.js +++ b/test/tap/install-test-cli-without-package-lock.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/install-windows-newlines.js b/test/tap/install-windows-newlines.js index 1c69b204ad02b..b56c7645ebf42 100644 --- a/test/tap/install-windows-newlines.js +++ b/test/tap/install-windows-newlines.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'install-windows-newlines') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 1, 2] } diff --git a/test/tap/install-with-dev-dep-duplicate.js b/test/tap/install-with-dev-dep-duplicate.js index 2d31b8fad7abd..b3a58987631b4 100644 --- a/test/tap/install-with-dev-dep-duplicate.js +++ b/test/tap/install-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'dev-dep-duplicate') +var pkg = common.pkg var json = { author: 'Anders Janmyr', diff --git a/test/tap/invalid-dep-version-filtering.js b/test/tap/invalid-dep-version-filtering.js index 19ab5d209dd5c..502610f231ce4 100644 --- a/test/tap/invalid-dep-version-filtering.js +++ b/test/tap/invalid-dep-version-filtering.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.join(testdir, 'cache') var fixture = new Tacks(Dir({ diff --git a/test/tap/it.js b/test/tap/it.js index b0dddb8f919de..9b716139a3814 100644 --- a/test/tap/it.js +++ b/test/tap/it.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = join(__dirname, 'run-script') +var pkg = common.pkg var installed = join(pkg, 'node_modules', 'underscore', 'package.json') var json = { diff --git a/test/tap/legacy-ignore-nested-nm.js b/test/tap/legacy-ignore-nested-nm.js index 095c41efa146b..6a57b72b60488 100644 --- a/test/tap/legacy-ignore-nested-nm.js +++ b/test/tap/legacy-ignore-nested-nm.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-ignore-nested-nm') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-ignore-nested-nm') diff --git a/test/tap/legacy-missing-bindir.js b/test/tap/legacy-missing-bindir.js index 2285f8d2a7556..398ef0e7acc51 100644 --- a/test/tap/legacy-missing-bindir.js +++ b/test/tap/legacy-missing-bindir.js @@ -5,7 +5,7 @@ var test = require('tap').test var common = require('../common-tap.js') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-missing-bindir') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-missing-bindir') diff --git a/test/tap/legacy-no-auth-leak.js b/test/tap/legacy-no-auth-leak.js index f837239250222..ce1adaeca756a 100644 --- a/test/tap/legacy-no-auth-leak.js +++ b/test/tap/legacy-no-auth-leak.js @@ -1,8 +1,7 @@ 'use strict' var test = require('tap').test var common = require('../common-tap.js') -var path = require('path') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir diff --git a/test/tap/legacy-platform-all.js b/test/tap/legacy-platform-all.js index 2bfb19a45782b..4c25eb4083d97 100644 --- a/test/tap/legacy-platform-all.js +++ b/test/tap/legacy-platform-all.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform-all') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-platform.js b/test/tap/legacy-platform.js index 4e94148b21309..619d2e4330c59 100644 --- a/test/tap/legacy-platform.js +++ b/test/tap/legacy-platform.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-platform') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-private.js b/test/tap/legacy-private.js index 5e7817bf6a13a..44a1094cd0cc6 100644 --- a/test/tap/legacy-private.js +++ b/test/tap/legacy-private.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-private') var modulepath = path.resolve(basepath, 'node_modules') var Tacks = require('tacks') diff --git a/test/tap/legacy-test-package.js b/test/tap/legacy-test-package.js index d94666b43e2e4..3c807e50491c7 100644 --- a/test/tap/legacy-test-package.js +++ b/test/tap/legacy-test-package.js @@ -4,7 +4,7 @@ var common = require('../common-tap.js') var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-test-package') var modulepath = path.resolve(basepath, 'node_modules') var installedpath = path.resolve(modulepath, 'npm-test-test-package') diff --git a/test/tap/lifecycle-INIT_CWD.js b/test/tap/lifecycle-INIT_CWD.js index eec5c266eec98..e035cf86d4033 100644 --- a/test/tap/lifecycle-INIT_CWD.js +++ b/test/tap/lifecycle-INIT_CWD.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'lifecycle-initcwd') +var pkg = common.pkg var subdir = path.resolve(pkg, 'subdir') var json = { diff --git a/test/tap/lifecycle-order.js b/test/tap/lifecycle-order.js index 903e1945d1e91..8f2b2ba4a70b8 100644 --- a/test/tap/lifecycle-order.js +++ b/test/tap/lifecycle-order.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var json = { name: 'lifecycle-order', diff --git a/test/tap/link.js b/test/tap/link.js index 88f3caed791fc..f0339194a2626 100644 --- a/test/tap/link.js +++ b/test/tap/link.js @@ -8,11 +8,11 @@ var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var link = path.join(__dirname, 'link') -var linkScoped = path.join(__dirname, 'link-scoped') -var linkInstall = path.join(__dirname, 'link-install') +var link = path.join(common.pkg, 'link') +var linkScoped = path.join(common.pkg, 'link-scoped') +var linkInstall = path.join(common.pkg, 'link-install') var linkInside = path.join(linkInstall, 'node_modules', 'inside') -var linkRoot = path.join(__dirname, 'link-root') +var linkRoot = path.join(common.pkg, 'link-root') var config = 'prefix = ' + linkRoot var configPath = path.join(link, '_npmrc') diff --git a/test/tap/local-args-relative-to-cwd.js b/test/tap/local-args-relative-to-cwd.js index 6c424bf67f123..de95516e2893e 100644 --- a/test/tap/local-args-relative-to-cwd.js +++ b/test/tap/local-args-relative-to-cwd.js @@ -6,7 +6,7 @@ var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/locker.js b/test/tap/locker.js index 8c548095f7f54..5ee64196fe980 100644 --- a/test/tap/locker.js +++ b/test/tap/locker.js @@ -10,7 +10,8 @@ var locker = require('../../lib/utils/locker.js') var lock = locker.lock var unlock = locker.unlock -var pkg = path.join(__dirname, '/locker') +const common = require('../common-tap.js') +var pkg = common.pkg var cache = path.join(pkg, '/cache') var tmp = path.join(pkg, '/tmp') var nm = path.join(pkg, '/node_modules') diff --git a/test/tap/lockfile-http-deps.js b/test/tap/lockfile-http-deps.js index a614daf139d22..aaa47f5de6d3e 100644 --- a/test/tap/lockfile-http-deps.js +++ b/test/tap/lockfile-http-deps.js @@ -8,7 +8,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/logout-scoped.js b/test/tap/logout-scoped.js index db993204789f3..114cc09da7382 100644 --- a/test/tap/logout-scoped.js +++ b/test/tap/logout-scoped.js @@ -8,15 +8,14 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -@bar:registry=http://localhost:1337 -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +@bar:registry=http://localhost:${common.port} +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/test/tap/logout.js b/test/tap/logout.js index d62cb4fffc28b..9218b4bf6f1ca 100644 --- a/test/tap/logout.js +++ b/test/tap/logout.js @@ -8,14 +8,13 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'logout') +var pkg = common.pkg var outfile = path.join(pkg, '_npmrc') var opts = { cwd: pkg } -var contents = function () { /* -foo=boo -//localhost:1337/:_authToken=glarb -*/ }.toString().split('\n').slice(1, -1).join('\n') +var contents = `foo=boo +//localhost:${common.port}/:_authToken=glarb +` function mocks (server) { server.delete('/-/user/token/glarb') diff --git a/test/tap/ls-depth-cli.js b/test/tap/ls-depth-cli.js index 7fd4a467d612f..6bb2f3cd124f7 100644 --- a/test/tap/ls-depth-cli.js +++ b/test/tap/ls-depth-cli.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-cli') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, @@ -117,7 +117,7 @@ test('npm ls --depth=0 --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz' } } }) @@ -141,11 +141,11 @@ test('npm ls --depth=Infinity --json', function (t) { 'dependencies': { 'test-package-with-one-dep': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', + 'resolved': 'http://localhost:' + common.port + '/test-package-with-one-dep/-/test-package-with-one-dep-0.0.0.tgz', 'dependencies': { 'test-package': { 'version': '0.0.0', - 'resolved': 'http://localhost:1337/test-package/-/test-package-0.0.0.tgz' + 'resolved': 'http://localhost:' + common.port + '/test-package/-/test-package-0.0.0.tgz' } } } diff --git a/test/tap/ls-depth-unmet.js b/test/tap/ls-depth-unmet.js index 4fd6740d6a58c..7a2ed4dacc2a2 100644 --- a/test/tap/ls-depth-unmet.js +++ b/test/tap/ls-depth-unmet.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth-unmet') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-env.js b/test/tap/ls-env.js index 29058d9245836..e3fbece3b04a1 100644 --- a/test/tap/ls-env.js +++ b/test/tap/ls-env.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-l-depth-0.js b/test/tap/ls-l-depth-0.js index e9c2374aad1d7..8459bd52032cb 100644 --- a/test/tap/ls-l-depth-0.js +++ b/test/tap/ls-l-depth-0.js @@ -10,7 +10,7 @@ var tmpdir = require('osenv').tmpdir var common = require('../common-tap.js') -var pkg = resolve(__dirname, 'ls-l-depth-0') +var pkg = common.pkg var dep = resolve(pkg, 'deps', 'glock') var modules = resolve(pkg, 'node_modules') diff --git a/test/tap/ls-peer.js b/test/tap/ls-peer.js index 826380932a147..fd53d37be62ec 100644 --- a/test/tap/ls-peer.js +++ b/test/tap/ls-peer.js @@ -6,7 +6,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/ls-production-and-dev.js b/test/tap/ls-production-and-dev.js index 5fc0b776e3337..a39e643786f09 100644 --- a/test/tap/ls-production-and-dev.js +++ b/test/tap/ls-production-and-dev.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'ls-depth') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/ls-top-errors.js b/test/tap/ls-top-errors.js index 69b8b299c8171..79a466fb127a4 100644 --- a/test/tap/ls-top-errors.js +++ b/test/tap/ls-top-errors.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var pathModA = path.join(pkg, 'node_modules', 'moduleA') var pathModB = path.join(pkg, 'node_modules', 'moduleB') diff --git a/test/tap/ls.js b/test/tap/ls.js index acec723afbae0..b3bdbc613cbc8 100644 --- a/test/tap/ls.js +++ b/test/tap/ls.js @@ -3,7 +3,7 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var pkgpath = path.resolve(fixturepath, 'npm-test-ls') var Tacks = require('tacks') diff --git a/test/tap/nested-extraneous.js b/test/tap/nested-extraneous.js index 99d4bea5b9b1c..1764a41c75279 100644 --- a/test/tap/nested-extraneous.js +++ b/test/tap/nested-extraneous.js @@ -5,7 +5,7 @@ var fs = require('fs') var rimraf = require('rimraf') var path = require('path') -var pkg = path.resolve(__dirname, 'nested-extraneous') +var pkg = common.pkg var pj = { name: 'nested-extraneous', version: '1.2.3' diff --git a/test/tap/no-global-warns.js b/test/tap/no-global-warns.js index 304cf5bf54388..538ab8b359daf 100644 --- a/test/tap/no-global-warns.js +++ b/test/tap/no-global-warns.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var mockGlobal = path.join(base, 'global') var toInstall = path.join(base, 'to-install') diff --git a/test/tap/no-scan-full-global-dir.js b/test/tap/no-scan-full-global-dir.js index 6a9349d54d962..4ec403ddcaa44 100644 --- a/test/tap/no-scan-full-global-dir.js +++ b/test/tap/no-scan-full-global-dir.js @@ -6,12 +6,14 @@ var requireInject = require('require-inject') var osenv = require('osenv') var npm = require('../../lib/npm.js') +const common = require('../common-tap.js') +const pkg = common.pkg var packages = { - test: {package: {name: 'test'}, path: __dirname, children: ['abc', 'def', 'ghi', 'jkl']}, - abc: {package: {name: 'abc'}, path: path.join(__dirname, 'node_modules', 'abc')}, - def: {package: {name: 'def'}, path: path.join(__dirname, 'node_modules', 'def')}, - ghi: {package: {name: 'ghi'}, path: path.join(__dirname, 'node_modules', 'ghi')}, - jkl: {package: {name: 'jkl'}, path: path.join(__dirname, 'node_modules', 'jkl')} + test: {package: {name: 'test'}, path: pkg, children: ['abc', 'def', 'ghi', 'jkl']}, + abc: {package: {name: 'abc'}, path: path.join(pkg, 'node_modules', 'abc')}, + def: {package: {name: 'def'}, path: path.join(pkg, 'node_modules', 'def')}, + ghi: {package: {name: 'ghi'}, path: path.join(pkg, 'node_modules', 'ghi')}, + jkl: {package: {name: 'jkl'}, path: path.join(pkg, 'node_modules', 'jkl')} } var dirs = {} var files = {} @@ -67,7 +69,7 @@ test('installer', function (t) { } } - var inst = new TestInstaller(__dirname, false, ['def', 'abc']) + var inst = new TestInstaller(pkg, false, ['def', 'abc']) inst.loadCurrentTree(function () { var kids = inst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['abc', 'def']) @@ -92,7 +94,7 @@ test('uninstaller', function (t) { } } - var uninst = new TestUninstaller(__dirname, false, ['ghi', 'jkl']) + var uninst = new TestUninstaller(pkg, false, ['ghi', 'jkl']) uninst.loadCurrentTree(function () { var kids = uninst.currentTree.children.map(function (child) { return child.package.name }) t.isDeeply(kids, ['ghi', 'jkl']) diff --git a/test/tap/noargs-install-config-save.js b/test/tap/noargs-install-config-save.js index 12ccf86804b37..cb1af408abb5c 100644 --- a/test/tap/noargs-install-config-save.js +++ b/test/tap/noargs-install-config-save.js @@ -1,14 +1,12 @@ var common = require('../common-tap.js') var test = require('tap').test -var path = require('path') var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var mr = require('npm-registry-mock') -var pkg = path.resolve(process.env.npm_config_tmp || '/tmp', - 'noargs-install-config-save') +var pkg = common.pkg function writePackageJson () { rimraf.sync(pkg) @@ -73,6 +71,6 @@ test('updates the package.json (adds dependencies) with an argument', function ( }) test('cleanup', function (t) { - rimraf.sync(pkg + '/cache') + rimraf.sync(pkg) t.end() }) diff --git a/test/tap/node-modules-path-munge.js b/test/tap/node-modules-path-munge.js index fdca0393cc1d1..fb116806c8cbc 100644 --- a/test/tap/node-modules-path-munge.js +++ b/test/tap/node-modules-path-munge.js @@ -4,7 +4,7 @@ var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var path = require('path') -var dir = path.join(__dirname, 'my_node_modules') +var dir = path.join(common.pkg, 'my_node_modules') var script = process.platform === 'win32' ? 'echo %PATH%' : 'echo $PATH' t.test('setup', function (t) { diff --git a/test/tap/npm-api-not-loaded-error.js b/test/tap/npm-api-not-loaded-error.js index 48b71e5213a7c..8bf263503874e 100644 --- a/test/tap/npm-api-not-loaded-error.js +++ b/test/tap/npm-api-not-loaded-error.js @@ -1,8 +1,9 @@ var test = require('tap').test +const common = require('../common-tap.js') var npm = require('../..') var path = require('path') var rimraf = require('rimraf') -var npmrc = path.join(__dirname, 'npmrc') +var npmrc = path.join(common.pkg, 'npmrc') var fs = require('fs') test('setup', function (t) { diff --git a/test/tap/onload.js b/test/tap/onload.js index 8d2b6c743bab8..4750fa6f88c2a 100644 --- a/test/tap/onload.js +++ b/test/tap/onload.js @@ -2,13 +2,13 @@ var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var common = require('../common-tap.js') -var opts = { cwd: __dirname } +var opts = { cwd: common.pkg } var binDir = '../../node_modules/.bin' var fixture = path.resolve(__dirname, binDir) var onload = path.resolve(__dirname, '../fixtures/onload.js') test('setup', function (t) { - rimraf.sync(path.join(__dirname, 'node_modules')) + rimraf.sync(path.join(common.pkg, 'node_modules')) t.end() }) diff --git a/test/tap/optional-metadep-rollback-collision.js b/test/tap/optional-metadep-rollback-collision.js index 1c05d1ba5860e..51cc6367dded7 100644 --- a/test/tap/optional-metadep-rollback-collision.js +++ b/test/tap/optional-metadep-rollback-collision.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'optional-metadep-rollback-collision') +var pkg = common.pkg var deps = path.resolve(pkg, 'deps') var opdep = path.resolve(pkg, 'node_modules', 'opdep') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/outdated-color.js b/test/tap/outdated-color.js index 3a81d05a821b4..11c967650f3b0 100644 --- a/test/tap/outdated-color.js +++ b/test/tap/outdated-color.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'outdated-color') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/outdated-depth.js b/test/tap/outdated-depth.js index 91523405e89ad..5cf7c7edac9c4 100644 --- a/test/tap/outdated-depth.js +++ b/test/tap/outdated-depth.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'outdated-depth') +var pkg = common.pkg var json = { name: 'outdated-depth', diff --git a/test/tap/outdated-git.js b/test/tap/outdated-git.js index 2a595e5288934..3932330c99f34 100644 --- a/test/tap/outdated-git.js +++ b/test/tap/outdated-git.js @@ -9,7 +9,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { name: 'outdated-git', diff --git a/test/tap/outdated-json.js b/test/tap/outdated-json.js index 39d54fb196c5b..e0040d0285f2f 100644 --- a/test/tap/outdated-json.js +++ b/test/tap/outdated-json.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.resolve(__dirname, 'outdated-json') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/outdated-latest.js b/test/tap/outdated-latest.js index d72fd87176f16..e0b432a2105cd 100644 --- a/test/tap/outdated-latest.js +++ b/test/tap/outdated-latest.js @@ -7,7 +7,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/outdated-long.js b/test/tap/outdated-long.js index 976d416a13bb5..474df8031a50a 100644 --- a/test/tap/outdated-long.js +++ b/test/tap/outdated-long.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var npm = require('../../') // config -var pkg = path.resolve(__dirname, 'outdated-long') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/outdated-symlink.js b/test/tap/outdated-symlink.js index 96d6f660e2100..86128338a7be7 100644 --- a/test/tap/outdated-symlink.js +++ b/test/tap/outdated-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/outdated.js b/test/tap/outdated.js index 8b1907d95f942..1acb0ed687b5a 100644 --- a/test/tap/outdated.js +++ b/test/tap/outdated.js @@ -10,7 +10,7 @@ var npm = require('../../') var common = require('../common-tap.js') // config -var pkg = path.resolve(__dirname, 'outdated') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var originalLog diff --git a/test/tap/override-bundled.js b/test/tap/override-bundled.js index 493ebf4a5d7e5..7f87c0999fe06 100644 --- a/test/tap/override-bundled.js +++ b/test/tap/override-bundled.js @@ -8,7 +8,7 @@ var path = require('path') var common = require('../common-tap.js') var testname = path.basename(__filename, '.js') -var testdir = path.resolve(__dirname, testname) +var testdir = common.pkg var testmod = path.resolve(testdir, 'top-test') var testtgz = testmod + '-1.0.0.tgz' diff --git a/test/tap/owner.js b/test/tap/owner.js index 0be88284d9750..b4da383ee1023 100644 --- a/test/tap/owner.js +++ b/test/tap/owner.js @@ -5,7 +5,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var cachedir = path.join(basedir, 'cache') var server diff --git a/test/tap/pack-files-and-ignores.js b/test/tap/pack-files-and-ignores.js index 3bcb22c7fcbc9..4ef41cea64ce8 100644 --- a/test/tap/pack-files-and-ignores.js +++ b/test/tap/pack-files-and-ignores.js @@ -6,7 +6,7 @@ var rimraf = require('rimraf') var mkdirp = require('mkdirp') var fs = require('graceful-fs') var tar = require('tar') -var basepath = path.resolve(__dirname, path.basename(__filename, '.js')) +var basepath = common.pkg var fixturepath = path.resolve(basepath, 'npm-test-files') var targetpath = path.resolve(basepath, 'target') var Tacks = require('tacks') diff --git a/test/tap/pack-scoped.js b/test/tap/pack-scoped.js index 05b9d12a83319..29d9aab478b8f 100644 --- a/test/tap/pack-scoped.js +++ b/test/tap/pack-scoped.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'scoped_package') +var pkg = common.pkg var manifest = join(pkg, 'package.json') var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/pack.js b/test/tap/pack.js index 1813f47bf46a5..7aa42d48370a9 100644 --- a/test/tap/pack.js +++ b/test/tap/pack.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const Dir = Tacks.Dir const File = Tacks.File -const testDir = path.join(__dirname, 'pkg') +const testDir = common.pkg const tmp = path.join(testDir, 'tmp') const cache = path.join(testDir, 'cache') diff --git a/test/tap/peer-deps.js b/test/tap/peer-deps.js index b516818da1f39..20cbf5d1ded04 100644 --- a/test/tap/peer-deps.js +++ b/test/tap/peer-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'peer-deps') +var pkg = common.pkg var expected = [ 'peer dep missing: request@0.9.x, required by npm-test-peer-deps@0.0.0' ] diff --git a/test/tap/ping.js b/test/tap/ping.js index 3562f25a3be97..3687b05bd4518 100644 --- a/test/tap/ping.js +++ b/test/tap/ping.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'ping') +var pkg = common.pkg var opts = { cwd: pkg } var outfile = path.join(pkg, '_npmrc') diff --git a/test/tap/prepare.js b/test/tap/prepare.js index f179c5267275a..54edf7cb19bc8 100644 --- a/test/tap/prepare.js +++ b/test/tap/prepare.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepare_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/prepublish-only.js b/test/tap/prepublish-only.js index 0d2d31589d7b5..9996479da442a 100644 --- a/test/tap/prepublish-only.js +++ b/test/tap/prepublish-only.js @@ -10,7 +10,7 @@ var path = require('path') var common = require('../common-tap') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var cachedir = join(pkg, 'cache') var tmpdir = join(pkg, 'tmp') diff --git a/test/tap/prepublish.js b/test/tap/prepublish.js index c71455a2480cc..5628f94db3884 100644 --- a/test/tap/prepublish.js +++ b/test/tap/prepublish.js @@ -6,7 +6,7 @@ var join = require('path').join var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = join(__dirname, 'prepublish_package') +var pkg = common.pkg var tmp = join(pkg, 'tmp') var cache = join(pkg, 'cache') diff --git a/test/tap/progress-config.js b/test/tap/progress-config.js index 94d9b15f1b389..1f1e1a0c225ed 100644 --- a/test/tap/progress-config.js +++ b/test/tap/progress-config.js @@ -1,9 +1,9 @@ 'use strict' -var path = require('path') var test = require('tap').test var log = require('npmlog') var fs = require('graceful-fs') -var configName = path.join(__dirname, path.basename(__filename, '.js')) + '-npmrc' +const common = require('../common-tap.js') +var configName = common.pkg + '-npmrc' // We use requireInject to get a fresh copy of // the npm singleton each time we require it. diff --git a/test/tap/prune-dev-dep-cycle.js b/test/tap/prune-dev-dep-cycle.js index 5ccabdc1c95f0..e226ac6d32f68 100644 --- a/test/tap/prune-dev-dep-cycle.js +++ b/test/tap/prune-dev-dep-cycle.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/prune-dev-dep-with-bins.js b/test/tap/prune-dev-dep-with-bins.js index 686b5d8d6da4c..a75652f9a177c 100644 --- a/test/tap/prune-dev-dep-with-bins.js +++ b/test/tap/prune-dev-dep-with-bins.js @@ -1,12 +1,11 @@ 'use strict' var fs = require('fs') -var path = require('path') var test = require('tap').test var Tacks = require('tacks') var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var fixture = new Tacks( Dir({ diff --git a/test/tap/prune-with-dev-dep-duplicate.js b/test/tap/prune-with-dev-dep-duplicate.js index bfe902b1d3c5b..7efea5c01e619 100644 --- a/test/tap/prune-with-dev-dep-duplicate.js +++ b/test/tap/prune-with-dev-dep-duplicate.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/prune-with-only-dev-deps.js b/test/tap/prune-with-only-dev-deps.js index dce9497e517ff..c8e87a53569a9 100644 --- a/test/tap/prune-with-only-dev-deps.js +++ b/test/tap/prune-with-only-dev-deps.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'prune') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/prune.js b/test/tap/prune.js index 4fe586359e054..6e033ceae00f2 100644 --- a/test/tap/prune.js +++ b/test/tap/prune.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var json = { diff --git a/test/tap/publish-access-scoped.js b/test/tap/publish-access-scoped.js index 17339cedfda33..31b1bed26c830 100644 --- a/test/tap/publish-access-scoped.js +++ b/test/tap/publish-access-scoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/test/tap/publish-access-unscoped-restricted-fails.js b/test/tap/publish-access-unscoped-restricted-fails.js index 660d0f48d7d5a..f615fa60f2450 100644 --- a/test/tap/publish-access-unscoped-restricted-fails.js +++ b/test/tap/publish-access-unscoped-restricted-fails.js @@ -6,7 +6,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mkdirp.sync(pkg) diff --git a/test/tap/publish-access-unscoped.js b/test/tap/publish-access-unscoped.js index 1766f61f4f93d..a2489e2bcaf4b 100644 --- a/test/tap/publish-access-unscoped.js +++ b/test/tap/publish-access-unscoped.js @@ -8,7 +8,7 @@ var mr = require('npm-registry-mock') var common = require('../common-tap') var server -var pkg = path.join(__dirname, 'publish-access-unscoped') +var pkg = common.pkg test('setup', function (t) { mr({port: common.port, throwOnUnmatched: true}, function (err, s) { diff --git a/test/tap/publish-config.js b/test/tap/publish-config.js index 14fd40311a7c0..705ef7ae7a2ca 100644 --- a/test/tap/publish-config.js +++ b/test/tap/publish-config.js @@ -17,9 +17,9 @@ fs.writeFileSync(pkg + '/package.json', JSON.stringify({ }), 'utf8') fs.writeFileSync(pkg + '/fixture_npmrc', - '//localhost:1337/:email = fancy@feast.net\n' + - '//localhost:1337/:username = fancy\n' + - '//localhost:1337/:_password = ' + Buffer.from('feast').toString('base64')) + '//localhost:' + common.port + '/:email = fancy@feast.net\n' + + '//localhost:' + common.port + '/:username = fancy\n' + + '//localhost:' + common.port + '/:_password = ' + Buffer.from('feast').toString('base64')) test(function (t) { let child diff --git a/test/tap/publish-invalid-semver-tag.js b/test/tap/publish-invalid-semver-tag.js index 21543869a5ca6..400030908b21c 100644 --- a/test/tap/publish-invalid-semver-tag.js +++ b/test/tap/publish-invalid-semver-tag.js @@ -9,7 +9,7 @@ var mr = require('npm-registry-mock') var osenv = require('osenv') -var PKG_DIR = path.resolve(__dirname, 'publish-invalid-semver-tag') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') var DEFAULT_PKG = { diff --git a/test/tap/publish-scoped.js b/test/tap/publish-scoped.js index b8fe0ae2f6902..efa86c85391d0 100644 --- a/test/tap/publish-scoped.js +++ b/test/tap/publish-scoped.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') var mr = require('npm-registry-mock') -var pkg = path.join(__dirname, 'prepublish_package') +var pkg = common.pkg var server @@ -42,9 +42,9 @@ test('npm publish should honor scoping', function (t) { 'progress=false', 'cache=' + path.join(pkg, 'cache'), 'registry=http://nonexistent.lvh.me', - '//localhost:1337/:username=username', - '//localhost:1337/:_password=' + Buffer.from('password').toString('base64'), - '//localhost:1337/:email=' + 'ogd@aoaioxxysz.net', + '//localhost:' + common.port + '/:username=username', + '//localhost:' + common.port + '/:_password=' + Buffer.from('password').toString('base64'), + '//localhost:' + common.port + '/:email=' + 'ogd@aoaioxxysz.net', '@bigco:registry=' + common.registry ] var configFile = path.join(pkg, '.npmrc') diff --git a/test/tap/publish.js b/test/tap/publish.js index 765cfb07c6c82..39000faeac591 100644 --- a/test/tap/publish.js +++ b/test/tap/publish.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testDir = path.join(__dirname, 'publish_test_package') +const testDir = common.pkg function setup () { cleanup() diff --git a/test/tap/repo.js b/test/tap/repo.js index 54907f620c77e..0ee50af192cb1 100644 --- a/test/tap/repo.js +++ b/test/tap/repo.js @@ -5,16 +5,17 @@ var test = require('tap').test var rimraf = require('rimraf') var fs = require('fs') var path = require('path') -var fakeBrowser = path.join(__dirname, '_script.sh') -var outFile = path.join(__dirname, '/_output') - -var opts = { cwd: __dirname } +var fakeBrowser = path.join(common.pkg, '_script.sh') +var outFile = path.join(common.pkg, '_output') +var opts = { cwd: common.pkg } +var mkdirp = require('mkdirp') common.pendIfWindows('This is trickier to convert without opening new shells') test('setup', function (t) { + mkdirp.sync(common.pkg) var s = '#!/usr/bin/env bash\n' + - 'echo "$@" > ' + JSON.stringify(__dirname) + '/_output\n' + 'echo "$@" > ' + JSON.stringify(common.pkg) + '/_output\n' fs.writeFileSync(fakeBrowser, s, 'ascii') fs.chmodSync(fakeBrowser, '0755') t.pass('made script') diff --git a/test/tap/retry-on-stale-cache.js b/test/tap/retry-on-stale-cache.js index 8aec35ed4f44d..129c52c160d0e 100644 --- a/test/tap/retry-on-stale-cache.js +++ b/test/tap/retry-on-stale-cache.js @@ -7,7 +7,7 @@ var Tacks = require('tacks') var Dir = Tacks.Dir var File = Tacks.File -var workdir = path.join(__dirname, path.basename(__filename, '.js')) +var workdir = common.pkg var cachedir = path.join(workdir, 'cache') var modulesdir = path.join(workdir, 'modules') var oldModule = path.join(modulesdir, 'good-night-0.1.0.tgz') diff --git a/test/tap/run-script-filter-private.js b/test/tap/run-script-filter-private.js index 631759c13a733..31f1912fd103a 100644 --- a/test/tap/run-script-filter-private.js +++ b/test/tap/run-script-filter-private.js @@ -7,7 +7,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script-filter-private') +var pkg = common.pkg var opts = { cwd: pkg } diff --git a/test/tap/run-script.js b/test/tap/run-script.js index f50a9632851a0..a937abadf2c1a 100644 --- a/test/tap/run-script.js +++ b/test/tap/run-script.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'run-script') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var tmp = path.resolve(pkg, 'tmp') diff --git a/test/tap/save-optional.js b/test/tap/save-optional.js index 66e430dc78b71..c293401f527cb 100644 --- a/test/tap/save-optional.js +++ b/test/tap/save-optional.js @@ -8,7 +8,7 @@ const File = Tacks.File const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/scope-header.js b/test/tap/scope-header.js index 3eb70f132e669..f291b3a500964 100644 --- a/test/tap/scope-header.js +++ b/test/tap/scope-header.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var withScope = path.join(testdir, 'with-scope') var withoutScope = path.join(testdir, 'without-scope') diff --git a/test/tap/scripts-whitespace-windows.js b/test/tap/scripts-whitespace-windows.js index 4d1e53a8f5a5d..9378564bb52bc 100644 --- a/test/tap/scripts-whitespace-windows.js +++ b/test/tap/scripts-whitespace-windows.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'scripts-whitespace-windows') +var pkg = common.pkg var tmp = path.resolve(pkg, 'tmp') var cache = path.resolve(pkg, 'cache') var dep = path.resolve(pkg, 'dep') diff --git a/test/tap/search.all-package-search.js b/test/tap/search.all-package-search.js index 51c1ffcf90157..419e4fdeed691 100644 --- a/test/tap/search.all-package-search.js +++ b/test/tap/search.all-package-search.js @@ -14,7 +14,7 @@ const {File} = Tacks const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/test/tap/search.js b/test/tap/search.js index bbd293c3a1a3f..70d17e5469d47 100644 --- a/test/tap/search.js +++ b/test/tap/search.js @@ -14,7 +14,7 @@ const File = Tacks.File const common = require('../common-tap.js') -const PKG_DIR = path.resolve(__dirname, 'search') +const PKG_DIR = common.pkg const CACHE_DIR = path.resolve(PKG_DIR, 'cache') const cacheBase = cacheFile(CACHE_DIR)(common.registry + '/-/all') const cachePath = path.join(cacheBase, '.cache.json') diff --git a/test/tap/shared-linked.js b/test/tap/shared-linked.js index 3ee00e063d4c8..bb2d9bd459aa3 100644 --- a/test/tap/shared-linked.js +++ b/test/tap/shared-linked.js @@ -8,7 +8,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var mr = require('npm-registry-mock') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var bugdir = path.join(testdir, 'modules', 'bug') // This is an absolutely minimal version of the optimist included with diff --git a/test/tap/shrinkwrap-_auth.js b/test/tap/shrinkwrap-_auth.js index 5aff86fb08f80..156bd9667cb83 100644 --- a/test/tap/shrinkwrap-_auth.js +++ b/test/tap/shrinkwrap-_auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/test/tap/shrinkwrap-default-dev.js b/test/tap/shrinkwrap-default-dev.js index 48f9f2a90af90..9ff998fa4846f 100644 --- a/test/tap/shrinkwrap-default-dev.js +++ b/test/tap/shrinkwrap-default-dev.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-dev-dependency.js b/test/tap/shrinkwrap-dev-dependency.js index 79d3b7cd0fe46..8006aa9ea8a81 100644 --- a/test/tap/shrinkwrap-dev-dependency.js +++ b/test/tap/shrinkwrap-dev-dependency.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-dev-dependency') +var pkg = common.pkg var opts = [ '--cache', path.resolve(pkg, 'cache'), diff --git a/test/tap/shrinkwrap-empty-deps.js b/test/tap/shrinkwrap-empty-deps.js index eeb5e656ef20c..af9b4810afaf6 100644 --- a/test/tap/shrinkwrap-empty-deps.js +++ b/test/tap/shrinkwrap-empty-deps.js @@ -9,7 +9,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.resolve(__dirname, 'shrinkwrap-empty-deps') +const pkg = common.pkg const EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/shrinkwrap-extra-metadata.js b/test/tap/shrinkwrap-extra-metadata.js index dd7f85ee827ed..a5ff721a7a816 100644 --- a/test/tap/shrinkwrap-extra-metadata.js +++ b/test/tap/shrinkwrap-extra-metadata.js @@ -10,7 +10,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const pkg = path.join(__dirname, path.basename(__filename, '.js')) +const pkg = common.pkg const json = { author: 'Rockbert', diff --git a/test/tap/shrinkwrap-global-auth.js b/test/tap/shrinkwrap-global-auth.js index 76fa0a4662bf5..e860abd2fe1a8 100644 --- a/test/tap/shrinkwrap-global-auth.js +++ b/test/tap/shrinkwrap-global-auth.js @@ -13,7 +13,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') diff --git a/test/tap/shrinkwrap-lifecycle-cwd.js b/test/tap/shrinkwrap-lifecycle-cwd.js index bc9ab9cf11d5b..203c2165ebe60 100644 --- a/test/tap/shrinkwrap-lifecycle-cwd.js +++ b/test/tap/shrinkwrap-lifecycle-cwd.js @@ -7,7 +7,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-lifecycle.js b/test/tap/shrinkwrap-lifecycle.js index 8c0f36e3bb84f..5ed35e186843b 100644 --- a/test/tap/shrinkwrap-lifecycle.js +++ b/test/tap/shrinkwrap-lifecycle.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-lifecycle') +var pkg = common.pkg test('npm shrinkwrap execution order', function (t) { setup() diff --git a/test/tap/shrinkwrap-local-dependency.js b/test/tap/shrinkwrap-local-dependency.js index d1c33b99a5a0b..d737b10bb6b97 100644 --- a/test/tap/shrinkwrap-local-dependency.js +++ b/test/tap/shrinkwrap-local-dependency.js @@ -8,7 +8,7 @@ var unixFormatPath = require('../../lib/utils/unix-format-path.js') var File = Tacks.File var Dir = Tacks.Dir -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var cachedir = path.resolve(testdir, 'cache') var config = ['--cache=' + cachedir, '--loglevel=error'] diff --git a/test/tap/shrinkwrap-nested.js b/test/tap/shrinkwrap-nested.js index 44d0cb0b2fb34..bace44d01aa42 100644 --- a/test/tap/shrinkwrap-nested.js +++ b/test/tap/shrinkwrap-nested.js @@ -8,7 +8,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAtgz = path.resolve(testdir, 'modA') + '-1.0.0.tgz' var modB1tgz = path.resolve(testdir, 'modB') + '-1.0.0.tgz' var modB2tgz = path.resolve(testdir, 'modB') + '-2.0.0.tgz' diff --git a/test/tap/shrinkwrap-optional-dependency.js b/test/tap/shrinkwrap-optional-dependency.js index 5085dd0cbb49c..f2c853ac4b9a7 100644 --- a/test/tap/shrinkwrap-optional-dependency.js +++ b/test/tap/shrinkwrap-optional-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap does not fail on missing optional dependency', function (t) { t.plan(1) diff --git a/test/tap/shrinkwrap-optional-platform.js b/test/tap/shrinkwrap-optional-platform.js index b109d89578150..d6a3c41b516f1 100644 --- a/test/tap/shrinkwrap-optional-platform.js +++ b/test/tap/shrinkwrap-optional-platform.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/shrinkwrap-optional-property.js b/test/tap/shrinkwrap-optional-property.js index ccff5a93e2e38..84bc5cb258281 100644 --- a/test/tap/shrinkwrap-optional-property.js +++ b/test/tap/shrinkwrap-optional-property.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'shrinkwrap-optional-dependency') +var pkg = common.pkg test('shrinkwrap adds optional property when optional dependency', function (t) { t.plan(1) @@ -58,7 +58,7 @@ var desired = { }, 'underscore': { version: '1.3.3', - resolved: 'http://localhost:1337/underscore/-/underscore-1.3.3.tgz', + resolved: 'http://localhost:' + common.port + '/underscore/-/underscore-1.3.3.tgz', optional: true, integrity: 'sha1-R6xTaD2vgyv6lS4XdEF9pHgXrkI=' } diff --git a/test/tap/shrinkwrap-prod-dependency-also.js b/test/tap/shrinkwrap-prod-dependency-also.js index 6cc388946e406..94f3c4ac9012a 100644 --- a/test/tap/shrinkwrap-prod-dependency-also.js +++ b/test/tap/shrinkwrap-prod-dependency-also.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = [ '--cache=' + path.resolve(pkg, 'cache'), '--registry=' + common.registry diff --git a/test/tap/shrinkwrap-prod-dependency.js b/test/tap/shrinkwrap-prod-dependency.js index 34e30d7c7a987..eb04db9ca138c 100644 --- a/test/tap/shrinkwrap-prod-dependency.js +++ b/test/tap/shrinkwrap-prod-dependency.js @@ -10,7 +10,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'shrinkwrap-prod-dependency') +var pkg = common.pkg test("shrinkwrap --dev doesn't strip out prod dependencies", function (t) { t.plan(1) diff --git a/test/tap/shrinkwrap-resolve-conflict.js b/test/tap/shrinkwrap-resolve-conflict.js index 146d1191bf5ae..d1f63f7e62661 100644 --- a/test/tap/shrinkwrap-resolve-conflict.js +++ b/test/tap/shrinkwrap-resolve-conflict.js @@ -12,7 +12,7 @@ const Tacks = require('tacks') const File = Tacks.File const Dir = Tacks.Dir -const testDir = path.resolve(__dirname, path.basename(__filename, '.js')) +const testDir = common.pkg const modAdir = path.resolve(testDir, 'modA') const modBdir = path.resolve(testDir, 'modB') const modCdir = path.resolve(testDir, 'modC') diff --git a/test/tap/shrinkwrap-save-dev-with-existing-deps.js b/test/tap/shrinkwrap-save-dev-with-existing-deps.js index 5934a758da27a..a71408e54f5ab 100644 --- a/test/tap/shrinkwrap-save-dev-with-existing-deps.js +++ b/test/tap/shrinkwrap-save-dev-with-existing-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/test/tap/shrinkwrap-save-with-existing-dev-deps.js b/test/tap/shrinkwrap-save-with-existing-dev-deps.js index 5f0eb07962276..fcbbeeffddf4d 100644 --- a/test/tap/shrinkwrap-save-with-existing-dev-deps.js +++ b/test/tap/shrinkwrap-save-with-existing-dev-deps.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var installme = path.join(base, 'installme') var installme_pkg = path.join(installme, 'package.json') var example = path.join(base, 'example') diff --git a/test/tap/shrinkwrap-scoped-auth.js b/test/tap/shrinkwrap-scoped-auth.js index 72c3b5119853a..3098b8aa12e93 100644 --- a/test/tap/shrinkwrap-scoped-auth.js +++ b/test/tap/shrinkwrap-scoped-auth.js @@ -14,7 +14,7 @@ var test = require('tap').test var common = require('../common-tap.js') var toNerfDart = require('../../lib/config/nerf-dart.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var outfile = path.resolve(pkg, '_npmrc') var modules = path.resolve(pkg, 'node_modules') var tarballPath = '/scoped-underscore/-/scoped-underscore-1.3.1.tgz' diff --git a/test/tap/shrinkwrap-shared-dev-dependency.js b/test/tap/shrinkwrap-shared-dev-dependency.js index 8960c0926154c..6a4ceb1970ece 100644 --- a/test/tap/shrinkwrap-shared-dev-dependency.js +++ b/test/tap/shrinkwrap-shared-dev-dependency.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var opts = { env: common.newEnv().extend({ diff --git a/test/tap/shrinkwrap-version-match.js b/test/tap/shrinkwrap-version-match.js index 57906528f7be7..e579f84d4b3bd 100644 --- a/test/tap/shrinkwrap-version-match.js +++ b/test/tap/shrinkwrap-version-match.js @@ -7,7 +7,7 @@ var fs = require('fs') var path = require('path') var common = require('../common-tap.js') -var testdir = path.resolve(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var modAdir = path.resolve(testdir, 'modA') var modB1dir = path.resolve(testdir, 'modB@1') var modB2dir = path.resolve(testdir, 'modB@2') diff --git a/test/tap/sorted-package-json.js b/test/tap/sorted-package-json.js index 557f3dc53d272..d67b729f683e9 100644 --- a/test/tap/sorted-package-json.js +++ b/test/tap/sorted-package-json.js @@ -2,11 +2,11 @@ var test = require('tap').test var path = require('path') var rimraf = require('rimraf') var mkdirp = require('mkdirp') -var pkg = path.resolve(__dirname, 'sorted-package-json') +var common = require('../common-tap.js') +var pkg = common.pkg var tmp = path.join(pkg, 'tmp') var cache = path.join(pkg, 'cache') var fs = require('fs') -var common = require('../common-tap.js') var mr = require('npm-registry-mock') var osenv = require('osenv') var packageJson = path.resolve(pkg, 'package.json') diff --git a/test/tap/spawn-enoent-help.js b/test/tap/spawn-enoent-help.js index d4a6fcdd832ad..cb7c942be8e7b 100644 --- a/test/tap/spawn-enoent-help.js +++ b/test/tap/spawn-enoent-help.js @@ -1,10 +1,9 @@ -var path = require('path') var test = require('tap').test var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent-help') +var pkg = common.pkg common.pendIfWindows('man pages are not built on Windows') diff --git a/test/tap/spawn-enoent.js b/test/tap/spawn-enoent.js index c81460fdcff82..78153572eeb70 100644 --- a/test/tap/spawn-enoent.js +++ b/test/tap/spawn-enoent.js @@ -1,11 +1,10 @@ -var path = require('path') var test = require('tap').test var fs = require('fs') var rimraf = require('rimraf') var mkdirp = require('mkdirp') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'spawn-enoent') +var pkg = common.pkg var pj = JSON.stringify({ name: 'x', version: '1.2.3', diff --git a/test/tap/spec-local-specifiers.js b/test/tap/spec-local-specifiers.js index 3601eee5f3c5f..7b6cacf12cb69 100644 --- a/test/tap/spec-local-specifiers.js +++ b/test/tap/spec-local-specifiers.js @@ -11,7 +11,7 @@ var Dir = Tacks.Dir var common = require('../common-tap.js') var isWindows = require('../../lib/utils/is-windows.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/splat-with-only-prerelease-to-latest.js b/test/tap/splat-with-only-prerelease-to-latest.js index cf5aac110bd94..5720a2cdcedf4 100644 --- a/test/tap/splat-with-only-prerelease-to-latest.js +++ b/test/tap/splat-with-only-prerelease-to-latest.js @@ -8,7 +8,7 @@ const path = require('path') const rimraf = require('rimraf') const test = require('tap').test -const testdir = path.join(__dirname, path.basename(__filename, '.js')) +const testdir = common.pkg const moduleName = 'xyzzy-wibble' const testModule = { diff --git a/test/tap/startstop.js b/test/tap/startstop.js index 0e9d2d94020b2..3491441821d92 100644 --- a/test/tap/startstop.js +++ b/test/tap/startstop.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap') -var pkg = path.resolve(__dirname, 'startstop') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/symlink-cycle.js b/test/tap/symlink-cycle.js index 5bee2c5569ab6..d59a2763bd19c 100644 --- a/test/tap/symlink-cycle.js +++ b/test/tap/symlink-cycle.js @@ -8,7 +8,7 @@ var rimraf = require('rimraf') var writeFileSync = require('fs').writeFileSync var common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var cycle = path.join(base, 'cycle') var cycleJSON = { diff --git a/test/tap/tag-version-prefix.js b/test/tap/tag-version-prefix.js index 555de1af16518..b72255a226152 100644 --- a/test/tap/tag-version-prefix.js +++ b/test/tap/tag-version-prefix.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/test/tap/tagged-version-matching.js b/test/tap/tagged-version-matching.js index 55dfb7b7c4b1c..64522745c80e2 100644 --- a/test/tap/tagged-version-matching.js +++ b/test/tap/tagged-version-matching.js @@ -7,7 +7,7 @@ var Dir = Tacks.Dir var Symlink = Tacks.Symlink var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/tree-style.js b/test/tap/tree-style.js index 12fdb0bbd9ac4..5d8abef3698b2 100644 --- a/test/tap/tree-style.js +++ b/test/tap/tree-style.js @@ -7,7 +7,7 @@ var rimraf = require('rimraf') var fs = require('graceful-fs') var common = require('../common-tap') -var base = path.resolve(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var modA = path.resolve(base, 'modA') var modB = path.resolve(base, 'modB') var modC = path.resolve(base, 'modC') diff --git a/test/tap/umask-lifecycle.js b/test/tap/umask-lifecycle.js index c4c323363775e..8b365d62335d7 100644 --- a/test/tap/umask-lifecycle.js +++ b/test/tap/umask-lifecycle.js @@ -1,5 +1,4 @@ var fs = require('fs') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') @@ -9,7 +8,7 @@ var sprintf = require('sprintf-js').sprintf var escapeExecPath = require('../../lib/utils/escape-exec-path.js') var escapeArg = require('../../lib/utils/escape-arg.js') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'umask-lifecycle') +var pkg = common.pkg var nodeCmd = escapeExecPath(common.nodeBin) var npmCmd = nodeCmd + ' ' + escapeArg(common.bin) @@ -24,7 +23,7 @@ var pj = JSON.stringify({ var umask = process.umask() var expected = [ '', - '> x@1.2.3 umask ' + path.join(__dirname, 'umask-lifecycle'), + '> x@1.2.3 umask ' + pkg, '> ' + umaskScript, '', sprintf('%04o', umask), diff --git a/test/tap/uninstall-link-clean.js b/test/tap/uninstall-link-clean.js index 2b1d244d00fde..e21c370f603b7 100644 --- a/test/tap/uninstall-link-clean.js +++ b/test/tap/uninstall-link-clean.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var testdir = path.join(__dirname, path.basename(__filename, '.js')) +var testdir = common.pkg var pkg = path.join(testdir, 'pkg') var dep = path.join(testdir, 'dep') var work = path.join(testdir, 'uninstall-link-clean-TEST') diff --git a/test/tap/uninstall-package.js b/test/tap/uninstall-package.js index 7cc7b1da1f8a8..56df2e17e41cb 100644 --- a/test/tap/uninstall-package.js +++ b/test/tap/uninstall-package.js @@ -9,7 +9,7 @@ var test = require('tap').test var common = require('../common-tap.js') -var pkg = path.join(__dirname, 'uninstall-package') +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'pipe', 2] } diff --git a/test/tap/uninstall-save.js b/test/tap/uninstall-save.js index 9bf342d7cf955..0605616e07f03 100644 --- a/test/tap/uninstall-save.js +++ b/test/tap/uninstall-save.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap.js') var server -var pkg = path.join(__dirname, path.basename(__filename, '.js')) +var pkg = common.pkg var EXEC_OPTS = { cwd: pkg, stdio: [0, 'ignore', 2] } diff --git a/test/tap/unpack-foreign-tarball.js b/test/tap/unpack-foreign-tarball.js index d128e94d8c37d..a1649c24bd23f 100644 --- a/test/tap/unpack-foreign-tarball.js +++ b/test/tap/unpack-foreign-tarball.js @@ -10,7 +10,7 @@ var common = require('../common-tap.js') var fixtures = path.resolve(__dirname, '..', 'fixtures') -var pkg = path.resolve(__dirname, 'unpack-foreign-tarball') +var pkg = common.pkg var nm = path.resolve(pkg, 'node_modules') var target = path.resolve(nm, 'npm-test-gitignore') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/unpublish-config.js b/test/tap/unpublish-config.js index f5d391d8c29b8..f358835561eee 100644 --- a/test/tap/unpublish-config.js +++ b/test/tap/unpublish-config.js @@ -7,10 +7,9 @@ var osenv = require('osenv') var rimraf = require('rimraf') var test = require('tap').test -var pkg = path.join(__dirname, 'npm-test-unpublish-config') -var fixturePath = path.join(pkg, 'fixture_npmrc') - var common = require('../common-tap.js') +var pkg = common.pkg +var fixturePath = path.join(pkg, 'fixture_npmrc') var json = { name: 'npm-test-unpublish-config', @@ -27,7 +26,7 @@ test('setup', function (t) { ) fs.writeFileSync( fixturePath, - '//localhost:1337/:_authToken = beeeeeeeeeeeeef\n' + + '//localhost:' + common.port + '/:_authToken = beeeeeeeeeeeeef\n' + 'registry = http://lvh.me:4321/registry/path\n' ) diff --git a/test/tap/update-examples.js b/test/tap/update-examples.js index 8369d002fab29..f0a7a6271dae9 100644 --- a/test/tap/update-examples.js +++ b/test/tap/update-examples.js @@ -9,7 +9,7 @@ var osenv = require('osenv') var requireInject = require('require-inject') -var PKG_DIR = path.resolve(__dirname, 'update-examples') +var PKG_DIR = common.pkg var CACHE_DIR = path.resolve(PKG_DIR, 'cache') // ** constant templates for mocks ** diff --git a/test/tap/update-symlink.js b/test/tap/update-symlink.js index 79139d306f5fd..a21a68267b542 100644 --- a/test/tap/update-symlink.js +++ b/test/tap/update-symlink.js @@ -8,7 +8,7 @@ const Symlink = Tacks.Symlink const Dir = Tacks.Dir const common = require('../common-tap.js') -const basedir = path.join(__dirname, path.basename(__filename, '.js')) +const basedir = common.pkg const testdir = path.join(basedir, 'testdir') const cachedir = path.join(basedir, 'cache') const globaldir = path.join(basedir, 'global') diff --git a/test/tap/upgrade-lifecycles.js b/test/tap/upgrade-lifecycles.js index 0d0b8da616f67..3adea06d71375 100644 --- a/test/tap/upgrade-lifecycles.js +++ b/test/tap/upgrade-lifecycles.js @@ -6,7 +6,7 @@ var File = Tacks.File var Dir = Tacks.Dir var common = require('../common-tap.js') -var basedir = path.join(__dirname, path.basename(__filename, '.js')) +var basedir = common.pkg var testdir = path.join(basedir, 'testdir') var cachedir = path.join(basedir, 'cache') var globaldir = path.join(basedir, 'global') diff --git a/test/tap/url-dependencies.js b/test/tap/url-dependencies.js index 66b3e1a63b47c..2017151568e09 100644 --- a/test/tap/url-dependencies.js +++ b/test/tap/url-dependencies.js @@ -10,7 +10,7 @@ var test = require('tap').test var common = require('../common-tap') var server -var pkg = path.resolve(__dirname, 'url-dependencies') +var pkg = common.pkg var json = { author: 'Steve Mason', diff --git a/test/tap/verify-no-lifecycle-on-repo.js b/test/tap/verify-no-lifecycle-on-repo.js index babdfb7dace23..c9232715a7079 100644 --- a/test/tap/verify-no-lifecycle-on-repo.js +++ b/test/tap/verify-no-lifecycle-on-repo.js @@ -5,9 +5,9 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var test = require('tap').test var requireInject = require('require-inject') -require('../common-tap.js') +const common = require('../common-tap.js') -var base = path.join(__dirname, path.basename(__filename, '.js')) +var base = common.pkg var baseJSON = { name: 'base', diff --git a/test/tap/version-allow-same-version.js b/test/tap/version-allow-same-version.js index 66f568dec9721..fdd68032bc6b9 100644 --- a/test/tap/version-allow-same-version.js +++ b/test/tap/version-allow-same-version.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-allow-same-version') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-tag=false\n' diff --git a/test/tap/version-commit-hooks.js b/test/tap/version-commit-hooks.js index 4791fc3f3c4d2..568c82b46b039 100644 --- a/test/tap/version-commit-hooks.js +++ b/test/tap/version-commit-hooks.js @@ -3,7 +3,8 @@ var path = require('path') var osenv = require('osenv') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-commit-hooks') +const common = require('../common-tap.js') +var pkg = common.pkg var test = require('tap').test var npm = require('../../') diff --git a/test/tap/version-consistent-newlines.js b/test/tap/version-consistent-newlines.js index 11020b2a7004e..56b16afcf4b48 100644 --- a/test/tap/version-consistent-newlines.js +++ b/test/tap/version-consistent-newlines.js @@ -10,7 +10,7 @@ const mkdirp = require('mkdirp') const rimraf = require('rimraf') const requireInject = require('require-inject') -const pkg = path.resolve(__dirname, 'version-no-git') +const pkg = common.pkg const cache = path.resolve(pkg, 'cache') const gitDir = path.resolve(pkg, '.git') diff --git a/test/tap/version-from-git.js b/test/tap/version-from-git.js index 1dc649beb4212..759396a782191 100644 --- a/test/tap/version-from-git.js +++ b/test/tap/version-from-git.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-from-git') +var pkg = common.pkg var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/version-git-not-clean.js b/test/tap/version-git-not-clean.js index 43e2549ceb280..b387c00e64de3 100644 --- a/test/tap/version-git-not-clean.js +++ b/test/tap/version-git-not-clean.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-git-not-clean') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version with working directory not clean', function (t) { diff --git a/test/tap/version-lifecycle.js b/test/tap/version-lifecycle.js index e7a7793b44507..98c96b6826d4d 100644 --- a/test/tap/version-lifecycle.js +++ b/test/tap/version-lifecycle.js @@ -8,7 +8,7 @@ var test = require('tap').test var common = require('../common-tap.js') var npm = require('../../') -var pkg = path.resolve(__dirname, 'version-lifecycle') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, './.npmrc') var configContents = 'sign-git-commit=false\nsign-git-tag=false\n' diff --git a/test/tap/version-message-config.js b/test/tap/version-message-config.js index 12cb6eb59912d..db45809879733 100644 --- a/test/tap/version-message-config.js +++ b/test/tap/version-message-config.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-message-config') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var npmrc = path.resolve(pkg, '.npmrc') var packagePath = path.resolve(pkg, 'package.json') diff --git a/test/tap/version-no-git.js b/test/tap/version-no-git.js index 0a859c7af2170..dc1ee05662ff6 100644 --- a/test/tap/version-no-git.js +++ b/test/tap/version-no-git.js @@ -8,7 +8,7 @@ var mkdirp = require('mkdirp') var rimraf = require('rimraf') var requireInject = require('require-inject') -var pkg = path.resolve(__dirname, 'version-no-git') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var gitDir = path.resolve(pkg, '.git') diff --git a/test/tap/version-no-package.js b/test/tap/version-no-package.js index e4eeda0eebda0..1b16c9f758c8d 100644 --- a/test/tap/version-no-package.js +++ b/test/tap/version-no-package.js @@ -1,11 +1,10 @@ var common = require('../common-tap.js') var test = require('tap').test var osenv = require('osenv') -var path = require('path') var mkdirp = require('mkdirp') var rimraf = require('rimraf') -var pkg = path.resolve(__dirname, 'version-no-package') +var pkg = common.pkg test('setup', function (t) { setup() diff --git a/test/tap/version-no-tags.js b/test/tap/version-no-tags.js index 755e640c0b31e..9e7b08c61fa12 100644 --- a/test/tap/version-no-tags.js +++ b/test/tap/version-no-tags.js @@ -9,7 +9,7 @@ var mkdirp = require('mkdirp') var which = require('which') var spawn = require('child_process').spawn -var pkg = path.resolve(__dirname, 'version-no-tags') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version without git tag', function (t) { diff --git a/test/tap/version-prerelease-id.js b/test/tap/version-prerelease-id.js index 1a206aa116649..5e342667cdba2 100644 --- a/test/tap/version-prerelease-id.js +++ b/test/tap/version-prerelease-id.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') var EXEC_OPTS = { cwd: pkg } diff --git a/test/tap/version-sub-directory-shrinkwrap.js b/test/tap/version-sub-directory-shrinkwrap.js index 0455b62ab7536..c6e607d7c5767 100644 --- a/test/tap/version-sub-directory-shrinkwrap.js +++ b/test/tap/version-sub-directory-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var shrinkwrapPath = path.resolve(pkg, 'npm-shrinkwrap.json') diff --git a/test/tap/version-sub-directory.js b/test/tap/version-sub-directory.js index 71c96121ca7d7..a7eb8f1042089 100644 --- a/test/tap/version-sub-directory.js +++ b/test/tap/version-sub-directory.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../lib/npm.js') -var pkg = path.resolve(__dirname, 'version-sub-directory') +var pkg = common.pkg var subDirectory = path.resolve(pkg, 'sub-directory') var packagePath = path.resolve(pkg, 'package.json') var cache = path.resolve(pkg, 'cache') diff --git a/test/tap/version-update-shrinkwrap.js b/test/tap/version-update-shrinkwrap.js index 58264e9926c03..47822f646ec7f 100644 --- a/test/tap/version-update-shrinkwrap.js +++ b/test/tap/version-update-shrinkwrap.js @@ -9,7 +9,7 @@ var test = require('tap').test var npm = require('../../') var common = require('../common-tap.js') -var pkg = path.resolve(__dirname, 'version-shrinkwrap') +var pkg = common.pkg var cache = path.resolve(pkg, 'cache') test('npm version updates shrinkwrap - no git', function (t) {