cypress-rollup-preprocessor
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -0,1 +1,11 @@ | ||
## [0.4.2](https://github.com/lmarqs/cypress-rollup-preprocessor/compare/v0.4.1...v0.4.2) (2020-08-21) | ||
### Bug Fixes | ||
* imports ([d0a660f](https://github.com/lmarqs/cypress-rollup-preprocessor/commit/d0a660ff7e618dfd8ec6baf79c12e930231ba5a9)) | ||
* remove cache for output with error ([75f9eb7](https://github.com/lmarqs/cypress-rollup-preprocessor/commit/75f9eb7c04028e367ddfa05adb033b06510919f5)) | ||
* rollupOptions type ([acd16a4](https://github.com/lmarqs/cypress-rollup-preprocessor/commit/acd16a4dbb9b94fd80e2cd331d95dc20640b8689)) | ||
* tests ([76c64c5](https://github.com/lmarqs/cypress-rollup-preprocessor/commit/76c64c534440707134e5a377a0a354dd43da26af)) | ||
## [0.4.1](https://github.com/lmarqs/cypress-rollup-preprocessor/compare/v0.4.0...v0.4.1) (2020-08-21) | ||
@@ -2,0 +12,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";var t=require("rollup"),n=function(){return(n=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)}; | ||
"use strict";var t=require("rollup"),e=function(){return(e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)}; | ||
/*! ***************************************************************************** | ||
@@ -15,3 +15,3 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function e(t,n,e,r){return new(e||(e=Promise))((function(o,u){function i(t){try{c(r.next(t))}catch(t){u(t)}}function a(t){try{c(r.throw(t))}catch(t){u(t)}}function c(t){var n;t.done?o(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(i,a)}c((r=r.apply(t,n||[])).next())}))}function r(t,n){var e,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;i;)try{if(e=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=n.call(t,i)}catch(t){u=[6,t],r=0}finally{e=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var o={};module.exports=function(u){return void 0===u&&(u={}),function(i){return function(u,i){return e(this,void 0,void 0,(function(){var e,a,c;return r(this,(function(r){switch(r.label){case 0:return o[i.filePath]?[2,o[i.filePath]]:(e=Object.assign({},u.rollupOptions,{input:i.filePath}),a={file:i.outputPath,format:"umd"},[4,t.rollup(e)]);case 1:return[4,r.sent().write(a)];case 2:return r.sent(),i.shouldWatch&&(c=t.watch(n(n({},e),{output:a})),i.on("close",(function(){c.close(),delete o[i.filePath]})),c.on("event",(function(t){"BUNDLE_END"===t.code&&(o[t.input.toString()]=t.output[0]),["END","ERROR"].includes(t.code)&&i.emit("rerun")}))),[2,i.outputPath]}}))}))}(u,i)}}; | ||
***************************************************************************** */function n(t,e,n,r){return new(n||(n=Promise))((function(o,u){function i(t){try{c(r.next(t))}catch(t){u(t)}}function a(t){try{c(r.throw(t))}catch(t){u(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,a)}c((r=r.apply(t,e||[])).next())}))}function r(t,e){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(u){return function(a){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,a])}}}var o={};function u(e,o){return n(this,void 0,void 0,(function(){return r(this,(function(n){switch(n.label){case 0:return[4,t.rollup(e)];case 1:return[4,n.sent().write(o)];case 2:return n.sent(),[2]}}))}))}function i(i,a){return n(this,void 0,void 0,(function(){var n,c;return r(this,(function(r){switch(r.label){case 0:return o[a.filePath]?[2,o[a.filePath]]:(n=Object.assign({},i.rollupOptions,{input:a.filePath}),c={file:a.outputPath,format:"umd"},[4,u(n,c)]);case 1:return r.sent(),a.shouldWatch&&function(n,r,u){var i=t.watch(e(e({},n),{output:r}));u.on("close",(function(){i.close(),delete o[u.filePath]})),i.on("event",(function(t){switch(t.code){case"BUNDLE_END":o[u.filePath]=t.output[0];break;case"ERROR":delete o[u.filePath],u.emit("rerun");break;case"END":u.emit("rerun")}}))}(n,c,a),[2,a.outputPath]}}))}))}module.exports=function(t){return void 0===t&&(t={}),function(e){return i(t,e)}}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,13 +0,7 @@ | ||
/// <reference types="node" /> | ||
import { RollupOptions } from 'rollup'; | ||
import { EventEmitter } from 'events'; | ||
import rollup from 'rollup'; | ||
import { FileObject } from './types'; | ||
interface ProcessingOptions { | ||
rollupOptions?: RollupOptions; | ||
rollupOptions?: Partial<rollup.RollupOptions>; | ||
} | ||
export declare type FileObject = EventEmitter & { | ||
filePath: string; | ||
outputPath: string; | ||
shouldWatch: boolean; | ||
}; | ||
export declare function createPreprocessor(options?: ProcessingOptions): (fileObject: FileObject) => Promise<string>; | ||
export {}; |
{ | ||
"name": "cypress-rollup-preprocessor", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"description": "Cypress preprocessor for bundling JavaScript via rollup", | ||
@@ -16,3 +16,4 @@ "main": "dist/index.js", | ||
"pretest": "shx rm -rf test/_test-output", | ||
"test": "nyc mocha --report lcov test/**/*.spec.*" | ||
"test": "nyc --reporter=html --reporter=text mocha test/**/*.spec.*", | ||
"posttest": "nyc report --reporter=text-lcov > coverage.lcov" | ||
}, | ||
@@ -19,0 +20,0 @@ "dependencies": {}, |
# cypress-rollup-preprocessor | ||
![Build](https://github.com/lmarqs/cypress-rollup-preprocessor/workflows/Build/badge.svg?branch=master) | ||
[![codecov](https://codecov.io/gh/lmarqs/cypress-rollup-preprocessor/branch/master/graph/badge.svg)](https://codecov.io/gh/lmarqs/cypress-rollup-preprocessor) | ||
![David](https://img.shields.io/david/peer/lmarqs/cypress-rollup-preprocessor) | ||
@@ -5,0 +7,0 @@ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
19227
12
43
90