v8r 4.0.0 → 4.0.1
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 +4 -0
- package/package.json +1 -1
- package/src/cli.js +4 -0
- package/src/glob.js +1 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 📦 [4.0.1](https://www.npmjs.com/package/v8r/v/4.0.1) - 2024-08-19
|
|
4
|
+
|
|
5
|
+
* De-duplicate and sort files before validating
|
|
6
|
+
|
|
3
7
|
## 📦 [4.0.0](https://www.npmjs.com/package/v8r/v/4.0.0) - 2024-08-19
|
|
4
8
|
|
|
5
9
|
* **Breaking:** Change to the JSON output format. The `results` key is now an array instead of an object.
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -113,6 +113,10 @@ function Validator() {
|
|
|
113
113
|
filenames = filenames.concat(matches);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
+
// de-dupe and sort
|
|
117
|
+
filenames = [...new Set(filenames)];
|
|
118
|
+
filenames.sort((a, b) => a.localeCompare(b));
|
|
119
|
+
|
|
116
120
|
const ttl = secondsToMilliseconds(config.cacheTtl || 0);
|
|
117
121
|
const cache = new Cache(getFlatCache(), ttl);
|
|
118
122
|
|
package/src/glob.js
CHANGED
|
@@ -3,9 +3,7 @@ import logger from "./logger.js";
|
|
|
3
3
|
|
|
4
4
|
async function getFiles(pattern) {
|
|
5
5
|
try {
|
|
6
|
-
|
|
7
|
-
matches.sort((a, b) => a.localeCompare(b));
|
|
8
|
-
return matches;
|
|
6
|
+
return await glob(pattern, { dot: true, dotRelative: true });
|
|
9
7
|
} catch (e) {
|
|
10
8
|
logger.error(e.message);
|
|
11
9
|
return [];
|