array-includes-with-glob 3.0.12 → 3.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 3.0.15 (2021-04-11)
7
+
8
+ ### Reverts
9
+
10
+ - Revert "chore: setup refresh" ([23cf206](https://github.com/codsen/codsen/commit/23cf206970a087ff0fa04e61f94d919f59ab3881))
11
+
6
12
  ## 3.0.1 (2021-01-28)
7
13
 
8
14
  ### Bug Fixes
@@ -1,10 +1,10 @@
1
1
  /**
2
- * array-includes-with-glob
3
- * Like _.includes but with wildcards
4
- * Version: 3.0.12
5
- * Author: Roy Revelt, Codsen Ltd
6
- * License: MIT
7
- * Homepage: https://codsen.com/os/array-includes-with-glob/
2
+ * @name array-includes-with-glob
3
+ * @fileoverview Like _.includes but with wildcards
4
+ * @version 3.0.16
5
+ * @author Roy Revelt, Codsen Ltd
6
+ * @license MIT
7
+ * {@link https://codsen.com/os/array-includes-with-glob/}
8
8
  */
9
9
 
10
10
  'use strict';
@@ -19,7 +19,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
19
19
  var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
20
20
  var matcher__default = /*#__PURE__*/_interopDefaultLegacy(matcher);
21
21
 
22
- var version$1 = "3.0.12";
22
+ var version$1 = "3.0.16";
23
23
 
24
24
  var version = version$1;
25
25
  var defaults = {
@@ -1,10 +1,10 @@
1
1
  /**
2
- * array-includes-with-glob
3
- * Like _.includes but with wildcards
4
- * Version: 3.0.12
5
- * Author: Roy Revelt, Codsen Ltd
6
- * License: MIT
7
- * Homepage: https://codsen.com/os/array-includes-with-glob/
2
+ * @name array-includes-with-glob
3
+ * @fileoverview Like _.includes but with wildcards
4
+ * @version 3.0.16
5
+ * @author Roy Revelt, Codsen Ltd
6
+ * @license MIT
7
+ * {@link https://codsen.com/os/array-includes-with-glob/}
8
8
  */
9
9
 
10
10
  (function (global, factory) {
@@ -131,7 +131,7 @@ var isMatch = (inputs, patterns, options) => {
131
131
  };
132
132
  matcher.isMatch = isMatch;
133
133
 
134
- var version$1 = "3.0.12";
134
+ var version$1 = "3.0.16";
135
135
 
136
136
  const version = version$1;
137
137
  const defaults = {
@@ -1,15 +1,15 @@
1
1
  /**
2
- * array-includes-with-glob
3
- * Like _.includes but with wildcards
4
- * Version: 3.0.12
5
- * Author: Roy Revelt, Codsen Ltd
6
- * License: MIT
7
- * Homepage: https://codsen.com/os/array-includes-with-glob/
2
+ * @name array-includes-with-glob
3
+ * @fileoverview Like _.includes but with wildcards
4
+ * @version 3.0.16
5
+ * @author Roy Revelt, Codsen Ltd
6
+ * @license MIT
7
+ * {@link https://codsen.com/os/array-includes-with-glob/}
8
8
  */
9
9
 
10
10
  import matcher from 'matcher';
11
11
 
12
- var version$1 = "3.0.12";
12
+ var version$1 = "3.0.16";
13
13
 
14
14
  const version = version$1;
15
15
  const defaults = {
@@ -1,10 +1,10 @@
1
1
  /**
2
- * array-includes-with-glob
3
- * Like _.includes but with wildcards
4
- * Version: 3.0.12
5
- * Author: Roy Revelt, Codsen Ltd
6
- * License: MIT
7
- * Homepage: https://codsen.com/os/array-includes-with-glob/
2
+ * @name array-includes-with-glob
3
+ * @fileoverview Like _.includes but with wildcards
4
+ * @version 3.0.16
5
+ * @author Roy Revelt, Codsen Ltd
6
+ * @license MIT
7
+ * {@link https://codsen.com/os/array-includes-with-glob/}
8
8
  */
9
9
 
10
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arrayIncludesWithGlob={})}(this,(function(e){"use strict";const t=new Map;function n(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter((e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0}))}function r(e,n){n={caseSensitive:!1,...n};const r=e+JSON.stringify(n);if(t.has(r))return t.get(r);const s="!"===e[0];s&&(e=e.slice(1)),e=(e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")})(e).replace(/\\\*/g,"[\\s\\S]*");const i=new RegExp(`^${e}$`,n.caseSensitive?"":"i");return i.negated=s,t.set(r,i),i}var s=(e,t,s)=>{if(e=n(e,"inputs"),0===(t=n(t,"patterns")).length)return[];const i="!"===t[0][0];t=t.map((e=>r(e,s)));const o=[];for(const n of e){let e=i;for(const r of t)r.test(n)&&(e=!r.negated);e&&o.push(n)}return o};s.isMatch=(e,t,s)=>(e=n(e,"inputs"),0!==(t=n(t,"patterns")).length&&e.some((e=>t.every((t=>{const n=r(t,s),i=n.test(e);return n.negated?!i:i})))));const i={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};e.defaults=i,e.includesWithGlob=function(e,t,n){if(!e.length||!t.length)return!1;const r={...i,...n},o="string"==typeof e?[e]:Array.from(e);return"string"==typeof t?o.some((e=>s.isMatch(e,t,{caseSensitive:r.caseSensitive}))):"any"===r.arrayVsArrayAllMustBeFound?t.some((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive}))))):t.every((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive})))))},e.version="3.0.12",Object.defineProperty(e,"__esModule",{value:!0})}));
10
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).arrayIncludesWithGlob={})}(this,(function(e){"use strict";const t=new Map;function n(e,t){if(!Array.isArray(e))switch(typeof e){case"string":e=[e];break;case"undefined":e=[];break;default:throw new TypeError(`Expected '${t}' to be a string or an array, but got a type of '${typeof e}'`)}return e.filter((e=>{if("string"!=typeof e){if(void 0===e)return!1;throw new TypeError(`Expected '${t}' to be an array of strings, but found a type of '${typeof e}' in the array`)}return!0}))}function r(e,n){n={caseSensitive:!1,...n};const r=e+JSON.stringify(n);if(t.has(r))return t.get(r);const s="!"===e[0];s&&(e=e.slice(1)),e=(e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")})(e).replace(/\\\*/g,"[\\s\\S]*");const i=new RegExp(`^${e}$`,n.caseSensitive?"":"i");return i.negated=s,t.set(r,i),i}var s=(e,t,s)=>{if(e=n(e,"inputs"),0===(t=n(t,"patterns")).length)return[];const i="!"===t[0][0];t=t.map((e=>r(e,s)));const o=[];for(const n of e){let e=i;for(const r of t)r.test(n)&&(e=!r.negated);e&&o.push(n)}return o};s.isMatch=(e,t,s)=>(e=n(e,"inputs"),0!==(t=n(t,"patterns")).length&&e.some((e=>t.every((t=>{const n=r(t,s),i=n.test(e);return n.negated?!i:i})))));const i={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};e.defaults=i,e.includesWithGlob=function(e,t,n){if(!e.length||!t.length)return!1;const r={...i,...n},o="string"==typeof e?[e]:Array.from(e);return"string"==typeof t?o.some((e=>s.isMatch(e,t,{caseSensitive:r.caseSensitive}))):"any"===r.arrayVsArrayAllMustBeFound?t.some((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive}))))):t.every((e=>o.some((t=>s.isMatch(t,e,{caseSensitive:r.caseSensitive})))))},e.version="3.0.16",Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-includes-with-glob",
3
- "version": "3.0.12",
3
+ "version": "3.0.16",
4
4
  "description": "Like _.includes but with wildcards",
5
5
  "keywords": [
6
6
  "array",
@@ -36,9 +36,11 @@
36
36
  "types": "types/index.d.ts",
37
37
  "scripts": {
38
38
  "build": "rollup -c",
39
+ "esbuild": "node '../../scripts/esbuild.js'",
40
+ "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
39
41
  "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
40
42
  "dev": "rollup -c --dev",
41
- "devunittest": "npm run dev && ./node_modules/.bin/tap --only -R 'base' && npm run tsd && npm run clean_cov",
43
+ "devunittest": "npm run dev && tap --only -R 'base'",
42
44
  "format": "npm run lect && npm run prettier && npm run lint",
43
45
  "lect": "lect",
44
46
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -47,11 +49,10 @@
47
49
  "republish": "npm publish || :",
48
50
  "tap": "tap",
49
51
  "tsc": "tsc",
50
- "tsd": "test ! -f index.d.ts || tsd",
51
52
  "pretest": "npm run build",
52
53
  "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
53
54
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
54
- "unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run tsd && npm run clean_cov && npm run perf",
55
+ "unittest": "./node_modules/.bin/tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
55
56
  "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
56
57
  "clean_types": "../../scripts/cleanTypes.js"
57
58
  },
@@ -105,8 +106,10 @@
105
106
  "@types/tap": "^14.10.3",
106
107
  "@typescript-eslint/eslint-plugin": "^4.20.0",
107
108
  "@typescript-eslint/parser": "^4.20.0",
109
+ "core-js": "^3.10.0",
110
+ "cross-env": "^7.0.3",
108
111
  "eslint": "^7.23.0",
109
- "lect": "^0.16.12",
112
+ "lect": "^0.16.16",
110
113
  "rollup": "^2.44.0",
111
114
  "rollup-plugin-ascii": "^0.0.3",
112
115
  "rollup-plugin-banner": "^0.2.1",
@@ -114,7 +117,6 @@
114
117
  "rollup-plugin-dts": "^3.0.1",
115
118
  "rollup-plugin-terser": "^7.0.2",
116
119
  "tap": "^14.11.0",
117
- "tsd": "^0.14.0",
118
120
  "tslib": "^2.1.0",
119
121
  "typescript": "^4.2.3"
120
122
  }
@@ -1,10 +0,0 @@
1
- /**
2
- * array-includes-with-glob
3
- * Like _.includes but with wildcards
4
- * Version: 3.0.12
5
- * Author: Roy Revelt, Codsen Ltd
6
- * License: MIT
7
- * Homepage: https://codsen.com/os/array-includes-with-glob/
8
- */
9
-
10
- import e from"matcher";const s="3.0.12",t={arrayVsArrayAllMustBeFound:"any",caseSensitive:!0};function i(s,i,r){if(!s.length||!i.length)return!1;const n={...t,...r},a="string"==typeof s?[s]:Array.from(s);return"string"==typeof i?a.some((s=>e.isMatch(s,i,{caseSensitive:n.caseSensitive}))):"any"===n.arrayVsArrayAllMustBeFound?i.some((s=>a.some((t=>e.isMatch(t,s,{caseSensitive:n.caseSensitive}))))):i.every((s=>a.some((t=>e.isMatch(t,s,{caseSensitive:n.caseSensitive})))))}export{t as defaults,i as includesWithGlob,s as version};