{"_id":"@bestest/compiler","_rev":"3-2eb73e21a59c2183e3b60f84b15e401f","name":"@bestest/compiler","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@bestest/compiler","version":"1.0.0","description":"Compiler part of Bestest benchmarking tool - compile your code in memory to run on different environments.","publishConfig":{"access":"public"},"main":"./index","types":"./index.d.ts","scripts":{"clean":"rimraf lib/**/*.{js,d.ts} index.{js,d.ts}","build":"npm run clean && tsc -p ./tsconfig.json","lint":"tslint -p ./tsconfig.json -c tslint.json","ts-check":"tsc -p ./tsconfig.json --noEmit","test":"npm run ts-check && npm run lint","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/rangoo94/bestest.git"},"bugs":{"url":"https://github.com/rangoo94/bestest/issues"},"keywords":["bestest","compile","compiler","code","benchmark","benchmarking","performance","time","measure","microtime","measurement","fast","speed"],"author":{"name":"Dawid Rusnak","email":"dawid@drcode.pl"},"license":"MIT","devDependencies":{"@types/node":"^12.7.0","rimraf":"^2.6.3","ts-node":"^8.3.0","tslint":"^5.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"dependencies":{"@bestest/detect-environment":"^1.0.0","@bestest/execution":"^1.0.1","@bestest/fs":"^1.0.3","@bestest/math":"^1.0.1","@bestest/task-schedulement":"^1.0.0","@bestest/time-measurement":"^1.0.1","@bestest/utils":"^1.0.0"},"homepage":"https://github.com/rangoo94/bestest#readme","_id":"@bestest/compiler@1.0.0","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-ZNw1mEHKIcrYgoFWh8FpqN8Rtk/fsPG0Z/+HhsAWTceJbLNG+IQw7XRw0smY9YmErGRFyG95M/qg/rhX7bYRFg==","shasum":"f2d18da7824d85e80018208bfb0c62ee275278bf","tarball":"https://registry.npmjs.org/@bestest/compiler/-/compiler-1.0.0.tgz","fileCount":34,"unpackedSize":35852,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTawsCRA9TVsSAnZWagAAE8EP/19NdIU1e4SALNqigDlw\nRtpWeCLNwaXk89rrAUnlw9OiG3vIGKwRibHzukchgQu8zeiCRt98rWGsrFQx\nKq4jsjWZG48Lw+3xPi3l4cms0ymO/qbcZHmli816ucDyOL+dnV43Fxwn1iSm\nGfDlBBQdhgY6cpjtF/uCJLYiG0RH3b0+E/zlsIKBwMDViza4PbYxZycmlVSz\nFQ0vjQ4fgIrz3JhHERUssEyMRqbdqr1OY47MjQcfb+A1paZfM2epe1xqC03u\nqnXWxlRhUkljZHcAMv4y2HXk4ou83Vac7fC5AP1HkJD7+FY51w53aeCTB/RT\nDYZMe8uT+rcRMmYhQru2Jo7iTgnuFDjH9ILayEfHYAgc15AQtvff/tA/QhPy\n0/A45VQAwuQe72yBdkk0hmwNMDG5sMkSoxKyAo+G1gns6ctvVkHm1MchypgR\nycZisVWwho9Ltowr+iKFk8CADK6fv2L5mxR4N1C6erzN7tAbaxkU2t2ly3l6\nqDovCYcyZ87+u1NIit1Wv9tQYEMC8CbV5ifc6YHqaK0ro84gUNWfWz53/Qlc\n0stli0IJh6iujTKaqB32jEFrFQf9ySSBDCP/T30IiMS/tWK/Xv1oiVZZXFyf\nDAM1AHpEXEi82wXOXL8fwKFx55+IAPe7vrnMHqM6fgB5MZlql0Nk1mPMKWRj\nL7tE\r\n=Fq/Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvnJsIV/dPwQfduXFR3IX1u12H+oxrfrZph53SBtwS5AiAqdHGqa5kMFypz/P7/GqHfXQhh2DcIlZ2dtg1gCQldPg=="}]},"maintainers":[{"name":"rangoo","email":"dawid@drcode.pl"}],"_npmUser":{"name":"rangoo","email":"dawid@drcode.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compiler_1.0.0_1565371435877_0.1345995098157451"},"_hasShrinkwrap":false},"1.0.1":{"name":"@bestest/compiler","version":"1.0.1","description":"Compiler part of Bestest benchmarking tool - compile your code in memory to run on different environments.","publishConfig":{"access":"public"},"main":"./index","types":"./index.d.ts","scripts":{"clean":"rimraf lib/**/*.{js,d.ts} index.{js,d.ts}","build":"npm run clean && tsc -p ./tsconfig.json","lint":"tslint -p ./tsconfig.json -c tslint.json","ts-check":"tsc -p ./tsconfig.json --noEmit","test":"npm run ts-check && npm run lint","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/rangoo94/bestest.git"},"bugs":{"url":"https://github.com/rangoo94/bestest/issues"},"keywords":["bestest","compile","compiler","code","benchmark","benchmarking","performance","time","measure","microtime","measurement","fast","speed"],"author":{"name":"Dawid Rusnak","email":"dawid@drcode.pl"},"license":"MIT","devDependencies":{"@types/node":"^12.7.0","rimraf":"^2.6.3","ts-node":"^8.3.0","tslint":"^5.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"dependencies":{"@bestest/detect-environment":"^1.0.0","@bestest/execution":"^1.0.1","@bestest/fs":"^1.0.3","@bestest/math":"^1.0.1","@bestest/task-schedulement":"^1.0.0","@bestest/time-measurement":"^1.0.1","@bestest/utils":"^1.0.0"},"homepage":"https://github.com/rangoo94/bestest#readme","_id":"@bestest/compiler@1.0.1","_nodeVersion":"12.7.0","_npmVersion":"6.10.0","dist":{"integrity":"sha512-n1oQ31xJOr2aK1QKYyYXPVNM2NkyUE34CIrEGkWs+/dYoCDWzNz/HO/G6dvsFmnWajMC4FIJM4DXB1YZVJIB0Q==","shasum":"182cfd5eba2496ef0da0622c14c33ce942a64126","tarball":"https://registry.npmjs.org/@bestest/compiler/-/compiler-1.0.1.tgz","fileCount":34,"unpackedSize":35929,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdTayGCRA9TVsSAnZWagAAukMP+QAaJvFnbPupSS0KAz6Y\nrfc9TyoIdRII9VjpvMMRftckfeG0T8BHgWrc7gqKKd8bk6KJ2kLfs2r6/d7t\nuUPXrjVyHAVH4kFw2aFObeu4DFS1hrJr6ljp0towb63EStnJLmoIQdVaXpOa\ngelCQHK/1UaYVQmPCN3DrLD9jMaaX5gSRRpwv6iQ8EYli8sLafEHIP7O17j7\nyiNcQ777ncVmTG3w2OiZ1I3FL9zwjXABObaxti52yODHg0sOFMFE/wIard6A\ny7PV29njoPq5nQPNGeKLUQUS7Rtjl/AIjkSph3ACuhSUiDZn0++l7LBWpb7k\nV/CdLFeD6f2OrZbUf5+A4Dzit7TxYfz3lSEGWfb4lGWDm5Hzlbb1dOxrTq23\nXZVLJ5ATP0pGxPY1a1ToP/UukCo+epWkQb4gMwtcDy3AOMyHEDPmlUnYUTbb\n1fjYbQOnEw1JZ789nhps2K8b1mKbACTe+0pgjgBtJqDgMVKNrBGzeuGks95Z\nzPOzWQYS2TIxecrk1YvILfLJ/uK2NOLCI2itWuZhCOxYb3d/V7hNzNE160V0\nbE6O+SSjWAJ/YrXuyNuq9oOb8F8S6iJRsHXDOj6jQ11LhZaHkIsavH8tl85c\n/k/h9Y5ITrV2I/RzpzPq9ehcPpXooVvlhX+eMt68Mv54O3btb4r1w/kkEgv6\n51WT\r\n=ITtS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8g3x913zdDAI/NUWKt7tDwiBFexTe3KgVK2gIURCn3wIhALK1K/ygTc9U279gvyeE4KFGuRP0dfaJwvVHRq0FCjET"}]},"maintainers":[{"name":"rangoo","email":"dawid@drcode.pl"}],"_npmUser":{"name":"rangoo","email":"dawid@drcode.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compiler_1.0.1_1565371526240_0.8559912268768799"},"_hasShrinkwrap":false},"1.0.2":{"name":"@bestest/compiler","version":"1.0.2","description":"Compiler part of Bestest benchmarking tool - compile your code in memory to run on different environments.","publishConfig":{"access":"public"},"main":"./index","types":"./index.d.ts","scripts":{"clean":"rimraf lib/**/*.{js,d.ts} index.{js,d.ts}","build":"npm run clean && tsc -p ./tsconfig.json","lint":"tslint -p ./tsconfig.json -c ../../tslint.json","ts-check":"tsc -p ./tsconfig.json --noEmit","test":"npm run ts-check && npm run lint","prepublishOnly":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/rangoo94/bestest.git"},"bugs":{"url":"https://github.com/rangoo94/bestest/issues"},"keywords":["bestest","compile","compiler","code","benchmark","benchmarking","performance","time","measure","microtime","measurement","fast","speed"],"author":{"name":"Dawid Rusnak","email":"dawid@drcode.pl"},"license":"MIT","devDependencies":{"@types/node":"^12.7.0","rimraf":"^2.6.3","ts-node":"^8.3.0","tslint":"^5.18.0","tslint-config-standard":"^8.0.1","typescript":"^3.5.3"},"dependencies":{"@bestest/detect-environment":"^1.0.0","@bestest/execution":"^1.0.1","@bestest/fs":"^1.0.3","@bestest/math":"^1.0.1","@bestest/task-schedulement":"^1.0.0","@bestest/time-measurement":"^1.0.1","@bestest/utils":"^1.1.1"},"homepage":"https://github.com/rangoo94/bestest#readme","_id":"@bestest/compiler@1.0.2","_nodeVersion":"12.7.0","_npmVersion":"6.10.3","dist":{"integrity":"sha512-gx8IyiuT3ko3GM9MmcsFiPQ10yCJDCcY7U+1AE2js4O+Dvzd3Mk4NvS33I6EXONnbVdNRnEI+QgC8hOkqNLaoQ==","shasum":"87f449ef76cc125f6539793b5c93318c7bc3200c","tarball":"https://registry.npmjs.org/@bestest/compiler/-/compiler-1.0.2.tgz","fileCount":33,"unpackedSize":35975,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdU9r5CRA9TVsSAnZWagAAXV8P/2fb4tFS2FNuR7n4rKyK\n3g/kc8dhy1YUpW1/DE+pcx9jp8DMApMXXSKxRtO8sSZoPHLVW4IE1l0WSPVE\n8m5m9IOTGagmxTLbqG74t/21u19z4YGPz/ACsyFsiZcBII4SG6wy96+9Cy0s\n43t3zVz37v7jsAjRFOHxPMN72UQXXrV7I5Xulkrx4PuBYIw8U+DIEcxb//bE\npQK5McIvAVOTcLebiHKvxF3RrG1BIEU+fI9CsjH90uA/M8+AFTBF8Cv1YDUH\n7tBVmgmXoslYDWA+S2egOsfnRPApxPF8zHIh/mIO1c4SMLA7Nt3KOiAAEvyo\nATM+zAVb07qKyA8AEUN3G2o95Arh8GTCfipYYnGK8J8Rzcg3ORLEQs4Gxjiw\nXZFigKeUQ1uZ/QzEHwKcXJ4L72MVpA0Yi+CrQvo2PL6fMTzqkjLRMxsF6T1S\nKL/A24/9uvCfjdDIKjvv7H5abgZdbahZbwdem/VBnmRc/XO5Pt/14OQUsB68\nPZ3/mKeAt2ZYE9b/JXZydQNAcE0u199+2GEra3zg9gXIiwRDnAZyqVYtIb93\n5SxpeeuZXXF7ui0u1gSSQEozAgOySnuWe8x4eRthlxwLFTm0zPWQaNht0N9k\n99l5zFS383jro2ATY8e+atDxjWtwvjdEjjr9KSXuaxYqab/KrLjo76/glfRL\nuDdV\r\n=HAQ8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGusbspoWrOzWbUFu9my+e6ZI4g7BmE+AdB99nXu24TnAiEA3ntzFpGugFOhzijoOCXGby7CQU79P7ayJHNtR7dQTB8="}]},"maintainers":[{"name":"rangoo","email":"dawid@drcode.pl"}],"_npmUser":{"name":"rangoo","email":"dawid@drcode.pl"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/compiler_1.0.2_1565776632612_0.061437599117880826"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-09T17:23:55.662Z","1.0.0":"2019-08-09T17:23:55.989Z","modified":"2022-04-04T18:33:36.772Z","1.0.1":"2019-08-09T17:25:26.340Z","1.0.2":"2019-08-14T09:57:12.774Z"},"maintainers":[{"name":"rangoo","email":"dawid@drcode.pl"}],"description":"Compiler part of Bestest benchmarking tool - compile your code in memory to run on different environments.","homepage":"https://github.com/rangoo94/bestest#readme","keywords":["bestest","compile","compiler","code","benchmark","benchmarking","performance","time","measure","microtime","measurement","fast","speed"],"repository":{"type":"git","url":"git+https://github.com/rangoo94/bestest.git"},"author":{"name":"Dawid Rusnak","email":"dawid@drcode.pl"},"bugs":{"url":"https://github.com/rangoo94/bestest/issues"},"license":"MIT","readme":"# @bestest/compiler\n\nCompiler part of Bestest benchmarking tool.\nUse it to compile your code in memory, to run it on different environments.\n\n## Example\n\nThis example is using [Webpack adapter](https://www.npmjs.com/package/@bestest/compiler-webpack), and in-memory files only (although these are not required, you may have them locally).\n\n```js\nimport { Compiler } from '@bestest/compiler'\nimport WebpackCompilerAdapter from '@bestest/compiler-webpack'\n\n// Set-up in-memory files\nconst files = [\n  {\n    filePath: './index.js',\n    publicPath: '/app.js',\n    contents: `\n      import file from \"./abc\"\n      console.log(\"test-\" + file)\n    `\n  },\n  {\n    filePath: './abc.js',\n    publicPath: './abc.js',\n    contents: `\n      export default \"value\"\n    `\n  }\n]\n\n// Set-up compiler adapter\nconst adapter = new WebpackCompilerAdapter({\n  webpackConfig: {}\n})\n\n// Set-up compiler\nconst compiler = new Compiler('webpack-example', adapter)\n\n// Listen for events\ncompiler.events.on('initialize:start', () => console.log('Initialization started'))\n\n// compiler.events.on('initialize:end', () => console.log('Initialization end'))\ncompiler.events.on('initialize:success', () => console.log('Initialization succeed'))\ncompiler.events.on('initialize:error', () => console.log('Initialization failed'))\n\ncompiler.events.on('compile:start', () => console.log('Compilation started'))\n\n// compiler.events.on('compile:end', () => console.log('Compilation end'))\ncompiler.events.on('compile:success', () => console.log('Compilation succeed'))\ncompiler.events.on('compile:error', () => console.log('Compilation failed'))\n\n\n// Set-up compilation configuration\nconst config = {\n  entries: [ './index' ],\n  memoryFiles: files\n}\n\n// Compile files\ncompiler.initialize(error => {\n  if (error) {\n    throw new Error('There was a problem while initializing the compiler adapter.')\n  }\n\n  compiler.compile(config, (error, fs, entries) => {\n    console.log('Error  ', error)\n    console.log('Entries', entries)\n\n    if (fs) {\n      console.log('Files  ', fs.getLocalFilesWithContents())\n    }\n  })\n})\n```\n\n## Changelog\n\n* **1.0.2** (on 2019-08-14): delay events & callbacks, to ensure that flow will work even despite errors\n* **1.0.1** (on 2019-08-09): fix Webpack adapter link in README file\n* **1.0.0** (on 2019-08-09): initial version\n","readmeFilename":"README.md"}