diff --git a/CHANGELOG.md b/CHANGELOG.md index d38ef10..eb19fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.1.2](https://github.com/BerniWittmann/vue-unused-components-checker/compare/v1.1.1...v1.1.2) (2021-05-08) + + +### Bug Fixes + +* fix import of rx-text-search to prevent error during execution ([7fb3722](https://github.com/BerniWittmann/vue-unused-components-checker/commit/7fb3722b18ef84d2f510d4101638fc08a20e1677)) + ## [1.1.1](https://github.com/BerniWittmann/vue-unused-components-checker/compare/v1.1.0...v1.1.1) (2021-05-08) diff --git a/dist/checker.js b/dist/checker.js index 7b67e37..a32ac42 100644 --- a/dist/checker.js +++ b/dist/checker.js @@ -1,11 +1,30 @@ "use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); +}) : function(o, v) { + o["default"] = v; +}); +var __importStar = (this && this.__importStar) || function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + __setModuleDefault(result, mod); + return result; +}; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCheckExpression = void 0; const ora_1 = __importDefault(require("ora")); -const rx_text_search_1 = __importDefault(require("rx-text-search")); +const textSearch = __importStar(require("rx-text-search")); const async_1 = __importDefault(require("async")); const path_1 = __importDefault(require("path")); const glob_1 = __importDefault(require("glob")); @@ -25,7 +44,7 @@ function default_1(src, maxOpenFiles, ignore) { const results = []; async_1.default.eachOfLimit(files, maxOpenFiles || 30, function (file, index, cb) { spinner.text = 'Checking for unused Components: ' + file; - rx_text_search_1.default + textSearch .findAsPromise(new RegExp(getCheckExpression(file), 'i'), ['**/*.{js,jsx,ts,tsx}', '**/*.vue'], { cwd: src, ignore: ignore, diff --git a/dist/checker.js.map b/dist/checker.js.map index 13a8d57..85bf69b 100644 --- a/dist/checker.js.map +++ b/dist/checker.js.map @@ -1 +1 @@ -{"version":3,"file":"checker.js","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,oEAAwC;AACxC,kDAA0B;AAC1B,gDAAwB;AACxB,gDAAwB;AAExB,SAAgB,kBAAkB,CAAC,IAAI;IACrC,OAAO,sCAAsC,cAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,qCAAqC,CAAC;AAC5H,CAAC;AAFD,gDAEC;AAED,mBAAyB,GAAG,EAAE,YAAY,EAAE,MAAM;IAChD,MAAM,OAAO,GAAG,aAAG,CAAC,gCAAgC,CAAC,CAAC,KAAK,EAAE,CAAC;IAE9D,cAAI,CACF,UAAU,EACV;QACE,GAAG,EAAE,GAAG;QACR,MAAM,EAAE,MAAM;KACf,EACD,UAAU,GAAG,EAAE,KAAK;QAClB,IAAI,GAAG,EAAE;YACP,MAAM,GAAG,CAAC;SACX;QACD,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,eAAK,CAAC,WAAW,CACf,KAAK,EACL,YAAY,IAAI,EAAE,EAClB,UAAU,IAAI,EAAE,KAAK,EAAE,EAAE;YACvB,OAAO,CAAC,IAAI,GAAG,kCAAkC,GAAG,IAAI,CAAC;YACzD,wBAAU;iBACP,aAAa,CAAC,IAAI,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,sBAAsB,EAAE,UAAU,CAAC,EAAE;gBAC9F,GAAG,EAAE,GAAG;gBACR,MAAM,EAAE,MAAM;aACf,CAAC;iBACD,IAAI,CAAC,UAAU,MAAM;gBACpB,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;oBACvB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;iBACpB;gBACD,EAAE,EAAE,CAAC;YACP,CAAC,CAAC;iBACD,KAAK,CAAC,EAAE,CAAC,CAAC;QACf,CAAC,EACD,UAAU,GAAG;YACX,IAAI,GAAG,EAAE;gBACP,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,OAAO,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;gBAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,CAAC,OAAO,CAAC,UAAU,MAAM;oBAC9B,OAAO,CAAC,cAAc,CAAC;wBACrB,IAAI,EAAE,MAAM;wBACZ,MAAM,EAAE,GAAG;wBACX,KAAK,EAAE,KAAK;qBACb,CAAC,CAAC;oBACH,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;gBAClD,CAAC,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,mBAAmB,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;gBACjG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;QACH,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AA1DD,4BA0DC"} \ No newline at end of file +{"version":3,"file":"checker.js","sourceRoot":"","sources":["../src/checker.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;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AAC;gBACtB,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACnB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;YAED,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBACxB,OAAO,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC;gBAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;iBAAM;gBACL,OAAO,CAAC,OAAO,CAAC,UAAU,MAAM;oBAC9B,OAAO,CAAC,cAAc,CAAC;wBACrB,IAAI,EAAE,MAAM;wBACZ,MAAM,EAAE,GAAG;wBACX,KAAK,EAAE,KAAK;qBACb,CAAC,CAAC;oBACH,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;gBAClD,CAAC,CAAC,CAAC;gBACH,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,mBAAmB,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;gBACjG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACjB;QACH,CAAC,CACF,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AA1DD,4BA0DC"} \ No newline at end of file diff --git a/package.json b/package.json index d28c555..3abcf62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-unused-components-checker", - "version": "1.1.1", + "version": "1.1.2", "description": "Check your Vue project for unused Components", "main": "dist/index.js", "scripts": {