array-pull-all-with-glob 6.0.1 → 6.0.5

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,12 +3,6 @@
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
- ## 6.0.1 (2021-09-13)
7
-
8
- ### Bug Fixes
9
-
10
- - bump TS and separate ESLint plugins away from this monorepo ([2e07d42](https://github.com/codsen/codsen/commit/2e07d424222b6ffedf5fb45c83ad453627ec2904))
11
-
12
6
  ## 6.0.0 (2021-09-09)
13
7
 
14
8
  ### Features
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2010-%YEAR% Roy Revelt and other contributors
3
+ Copyright (c) 2010-2021 Roy Revelt and other contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -32,7 +32,7 @@ This package is ESM only: Node 12+ is needed to use it and it must be imported i
32
32
  npm i array-pull-all-with-glob
33
33
  ```
34
34
 
35
- If you need a legacy version which works with require, use version 5.1.0
35
+ If you need a legacy version which works with `require`, use version 5.1.0
36
36
 
37
37
  ## Quick Take
38
38
 
@@ -1,15 +1,15 @@
1
1
  /**
2
2
  * @name array-pull-all-with-glob
3
3
  * @fileoverview Like _.pullAll but with globs (wildcards)
4
- * @version 6.0.1
4
+ * @version 6.0.5
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/array-pull-all-with-glob/}
8
8
  */
9
9
 
10
- import matcher from 'matcher';
10
+ import { isMatch } from 'matcher';
11
11
 
12
- var version$1 = "6.0.1";
12
+ var version$1 = "6.0.5";
13
13
 
14
14
  const version = version$1;
15
15
  function pull(originalInput, originalToBeRemoved, originalOpts) {
@@ -26,7 +26,7 @@ function pull(originalInput, originalToBeRemoved, originalOpts) {
26
26
  const opts = { ...defaults,
27
27
  ...originalOpts
28
28
  };
29
- const res = Array.from(originalInput).filter(originalVal => !toBeRemoved.some(remVal => matcher.isMatch(originalVal, remVal, {
29
+ const res = Array.from(originalInput).filter(originalVal => !toBeRemoved.some(remVal => isMatch(originalVal, remVal, {
30
30
  caseSensitive: opts.caseSensitive
31
31
  })));
32
32
  return res;
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @name array-pull-all-with-glob
3
3
  * @fileoverview Like _.pullAll but with globs (wildcards)
4
- * @version 6.0.1
4
+ * @version 6.0.5
5
5
  * @author Roy Revelt, Codsen Ltd
6
6
  * @license MIT
7
7
  * {@link https://codsen.com/os/array-pull-all-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).arrayPullAllWithGlob={})}(this,(function(e){"use strict";var t={exports:{}};const r=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},n=new Map;function o(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 s(e,t){t={caseSensitive:!1,...t};const o=e+JSON.stringify(t);if(n.has(o))return n.get(o);const s="!"===e[0];s&&(e=e.slice(1)),e=r(e).replace(/\\\*/g,"[\\s\\S]*");const i=new RegExp(`^${e}$`,t.caseSensitive?"":"i");return i.negated=s,n.set(o,i),i}t.exports=(e,t,r)=>{if(e=o(e,"inputs"),0===(t=o(t,"patterns")).length)return[];const n="!"===t[0][0];t=t.map((e=>s(e,r)));const i=[];for(const r of e){let e=n;for(const n of t)n.test(r)&&(e=!n.negated);e&&i.push(r)}return i},t.exports.isMatch=(e,t,r)=>(e=o(e,"inputs"),0!==(t=o(t,"patterns")).length&&e.some((e=>t.every((t=>{const n=s(t,r),o=n.test(e);return n.negated?!o:o})))));var i=t.exports;e.pull=function(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);const n="string"==typeof t?[t]:Array.from(t),o={caseSensitive:!0,...r};return Array.from(e).filter((e=>!n.some((t=>i.isMatch(e,t,{caseSensitive:o.caseSensitive})))))},e.version="6.0.1",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).arrayPullAllWithGlob={})}(this,(function(e){"use strict";const t=new Map,r=(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}))},n=(e,r)=>{r={caseSensitive:!1,...r};const n=e+JSON.stringify(r);if(t.has(n))return t.get(n);const o="!"===e[0];o&&(e=e.slice(1)),e=function(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}$`,r.caseSensitive?"":"i");return i.negated=o,t.set(n,i),i};function o(e,t,o){return((e,t,o,i)=>{if(e=r(e,"inputs"),0===(t=r(t,"patterns")).length)return[];t=t.map((e=>n(e,o)));const{allPatterns:s}=o||{},f=[];for(const r of e){let e;const n=[...t].fill(!1);for(const[o,i]of t.entries())if(i.test(r)&&(n[o]=!0,e=!i.negated,!e))break;if(!(!1===e||void 0===e&&t.some((e=>!e.negated))||s&&n.some(((e,r)=>!e&&!t[r].negated)))&&(f.push(r),i))break}return f})(e,t,o,!0).length>0}e.pull=function(e,t,r){if(!e.length)return[];if(!e.length||!t.length)return Array.from(e);const n="string"==typeof t?[t]:Array.from(t),i={caseSensitive:!0,...r};return Array.from(e).filter((e=>!n.some((t=>o(e,t,{caseSensitive:i.caseSensitive})))))},e.version="6.0.5",Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "array-pull-all-with-glob",
3
- "version": "6.0.1",
3
+ "version": "6.0.5",
4
4
  "description": "Like _.pullAll but with globs (wildcards)",
5
5
  "keywords": [
6
6
  "array",
@@ -39,11 +39,13 @@
39
39
  "types": "types/index.d.ts",
40
40
  "scripts": {
41
41
  "build": "rollup -c",
42
- "esbuild": "node '../../scripts/esbuild.js'",
43
- "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
44
42
  "ci_test": "npm run build && npm run format && tap --no-only --reporter=silent --output-file=testStats.md && npm run clean_cov",
43
+ "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
44
+ "clean_types": "../../scripts/cleanTypes.js",
45
45
  "dev": "rollup -c --dev",
46
46
  "devunittest": "npm run dev && tap --only -R 'base'",
47
+ "esbuild": "node '../../scripts/esbuild.js'",
48
+ "esbuild_dev": "cross-env MODE=dev node '../../scripts/esbuild.js'",
47
49
  "format": "npm run lect && npm run prettier && npm run lint",
48
50
  "lect": "lect",
49
51
  "lint": "../../node_modules/eslint/bin/eslint.js . --ext .js --ext .ts --fix --config \"../../.eslintrc.json\" --quiet",
@@ -51,13 +53,11 @@
51
53
  "prettier": "../../node_modules/prettier/bin-prettier.js '*.{js,css,scss,vue,md,ts}' --write --loglevel silent",
52
54
  "republish": "npm publish || :",
53
55
  "tap": "tap",
54
- "tsc": "tsc",
55
56
  "pretest": "npm run build",
56
57
  "test": "npm run lint && npm run unittest && npm run test:examples && npm run clean_cov && npm run format",
57
58
  "test:examples": "../../scripts/test-examples.js && npm run lect && npm run prettier",
58
- "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf",
59
- "clean_cov": "../../scripts/leaveCoverageTotalOnly.js",
60
- "clean_types": "../../scripts/cleanTypes.js"
59
+ "tsc": "tsc",
60
+ "unittest": "tap --no-only --output-file=testStats.md --reporter=terse && tsc -p tsconfig.json --noEmit && npm run clean_cov && npm run perf"
61
61
  },
62
62
  "tap": {
63
63
  "check-coverage": false,
@@ -84,46 +84,46 @@
84
84
  }
85
85
  },
86
86
  "dependencies": {
87
- "@babel/runtime": "^7.15.4",
88
- "matcher": "^4.0.0"
87
+ "@babel/runtime": "^7.16.0",
88
+ "matcher": "^5.0.0"
89
89
  },
90
90
  "devDependencies": {
91
- "@babel/cli": "^7.15.4",
92
- "@babel/core": "^7.15.5",
93
- "@babel/node": "^7.15.4",
94
- "@babel/plugin-external-helpers": "^7.14.5",
95
- "@babel/plugin-proposal-class-properties": "^7.14.5",
96
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
97
- "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
98
- "@babel/plugin-proposal-optional-chaining": "^7.14.5",
99
- "@babel/plugin-transform-runtime": "^7.15.0",
100
- "@babel/preset-env": "^7.15.6",
101
- "@babel/preset-typescript": "^7.15.0",
102
- "@babel/register": "^7.15.3",
91
+ "@babel/cli": "^7.16.0",
92
+ "@babel/core": "^7.16.0",
93
+ "@babel/node": "^7.16.0",
94
+ "@babel/plugin-external-helpers": "^7.16.0",
95
+ "@babel/plugin-proposal-class-properties": "^7.16.0",
96
+ "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
97
+ "@babel/plugin-proposal-object-rest-spread": "^7.16.0",
98
+ "@babel/plugin-proposal-optional-chaining": "^7.16.0",
99
+ "@babel/plugin-transform-runtime": "^7.16.0",
100
+ "@babel/preset-env": "^7.16.0",
101
+ "@babel/preset-typescript": "^7.16.0",
102
+ "@babel/register": "^7.16.0",
103
103
  "@istanbuljs/esm-loader-hook": "^0.1.2",
104
104
  "@rollup/plugin-babel": "^5.3.0",
105
- "@rollup/plugin-commonjs": "^20.0.0",
105
+ "@rollup/plugin-commonjs": "^21.0.1",
106
106
  "@rollup/plugin-json": "^4.1.0",
107
- "@rollup/plugin-node-resolve": "^13.0.4",
107
+ "@rollup/plugin-node-resolve": "^13.0.6",
108
108
  "@rollup/plugin-strip": "^2.1.0",
109
- "@rollup/plugin-typescript": "^8.2.5",
110
- "@types/node": "^16.9.1",
109
+ "@rollup/plugin-typescript": "^8.3.0",
110
+ "@types/node": "^16.11.6",
111
111
  "@types/tap": "^15.0.5",
112
- "@typescript-eslint/eslint-plugin": "^4.31.0",
113
- "@typescript-eslint/parser": "^4.31.0",
114
- "core-js": "^3.17.3",
112
+ "@typescript-eslint/eslint-plugin": "^5.3.0",
113
+ "@typescript-eslint/parser": "^5.3.0",
114
+ "core-js": "^3.19.1",
115
115
  "cross-env": "^7.0.3",
116
- "eslint": "^7.32.0",
117
- "lect": "^0.18.1",
118
- "rollup": "^2.56.3",
116
+ "eslint": "^8.2.0",
117
+ "lect": "^0.18.5",
118
+ "rollup": "^2.59.0",
119
119
  "rollup-plugin-ascii": "^0.0.3",
120
120
  "rollup-plugin-banner": "^0.2.1",
121
121
  "rollup-plugin-cleanup": "^3.2.1",
122
- "rollup-plugin-dts": "^4.0.0",
122
+ "rollup-plugin-dts": "^4.0.1",
123
123
  "rollup-plugin-terser": "^7.0.2",
124
- "tap": "^15.0.9",
124
+ "tap": "^15.0.10",
125
125
  "tslib": "^2.3.1",
126
- "typescript": "^4.4.3"
126
+ "typescript": "^4.4.4"
127
127
  },
128
128
  "engines": {
129
129
  "node": ">=12"