@eik/common 5.1.22 → 5.1.24
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
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## [5.1.24](https://github.com/eik-lib/common/compare/v5.1.23...v5.1.24) (2026-04-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency tinyglobby to v0.2.16 ([#442](https://github.com/eik-lib/common/issues/442)) ([e222215](https://github.com/eik-lib/common/commit/e22221547afe15938fab13fc15cdbc23d2b3192e))
|
|
7
|
+
|
|
8
|
+
## [5.1.23](https://github.com/eik-lib/common/compare/v5.1.22...v5.1.23) (2026-03-27)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* performance-related refactor (reduced regex compilation) ([761f602](https://github.com/eik-lib/common/commit/761f6023de751fae7da15cee285eeb571b8fb684))
|
|
14
|
+
* regression after --fix ([9a8bc89](https://github.com/eik-lib/common/commit/9a8bc894c2b1a5bacd91258782ceb373ee46c9b2))
|
|
15
|
+
* remove is-glob ([c98a99b](https://github.com/eik-lib/common/commit/c98a99ba6d5374bd1433d29152f842f207a38d02))
|
|
16
|
+
* replace glob with tinyglobby ([9c6fe05](https://github.com/eik-lib/common/commit/9c6fe051e948b285f79d45abcf1f829c7950055f))
|
|
17
|
+
|
|
1
18
|
## [5.1.22](https://github.com/eik-lib/common/compare/v5.1.21...v5.1.22) (2026-02-19)
|
|
2
19
|
|
|
3
20
|
|
|
@@ -49,6 +49,7 @@ export default class EikConfig {
|
|
|
49
49
|
this.cwd = removeTrailingSlash(configRootDir);
|
|
50
50
|
/** @type {string[]} */
|
|
51
51
|
// @ts-ignore
|
|
52
|
+
// eslint-disable-next-line e18e/prefer-spread-syntax
|
|
52
53
|
this.map = [].concat(this[_config]["import-map"] || []);
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -137,7 +138,7 @@ export default class EikConfig {
|
|
|
137
138
|
// @ts-ignore
|
|
138
139
|
const { destination, source } = files;
|
|
139
140
|
// @ts-ignore
|
|
140
|
-
const filesArray =
|
|
141
|
+
const filesArray = [...files];
|
|
141
142
|
if (filesArray.length === 0) {
|
|
142
143
|
throw new NoFilesMatchedError(source);
|
|
143
144
|
}
|
|
@@ -64,11 +64,7 @@ export default {
|
|
|
64
64
|
findInDirectory(configRootDir, loadJSONFromDisk = readJSONFromDisk) {
|
|
65
65
|
const pkgJSON = loadJSONFromDisk(join(configRootDir, "package.json"));
|
|
66
66
|
const eikJSON = loadJSONFromDisk(join(configRootDir, "eik.json"));
|
|
67
|
-
if (
|
|
68
|
-
pkgJSON != null &&
|
|
69
|
-
Object.prototype.hasOwnProperty.call(pkgJSON, "eik") &&
|
|
70
|
-
eikJSON != null
|
|
71
|
-
) {
|
|
67
|
+
if (pkgJSON != null && Object.hasOwn(pkgJSON, "eik") && eikJSON != null) {
|
|
72
68
|
throw new MultipleConfigSourcesError();
|
|
73
69
|
}
|
|
74
70
|
let assets;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { extname, join, isAbsolute, basename, sep, normalize } from "node:path";
|
|
2
|
-
import
|
|
3
|
-
import { glob } from "glob";
|
|
2
|
+
import { glob, isDynamicPattern } from "tinyglobby";
|
|
4
3
|
import {
|
|
5
4
|
removeTrailingSlash,
|
|
6
5
|
addLeadingSlash,
|
|
@@ -22,7 +21,7 @@ const pathUntilGlob = (path) => {
|
|
|
22
21
|
for (const segment of segments) {
|
|
23
22
|
if (segment === ".") continue;
|
|
24
23
|
if (segment === "") continue;
|
|
25
|
-
if (
|
|
24
|
+
if (isDynamicPattern(segment)) break;
|
|
26
25
|
segmentsToKeep.push(segment);
|
|
27
26
|
}
|
|
28
27
|
|
|
@@ -53,7 +52,10 @@ const resolveFiles = async (files, cwd) =>
|
|
|
53
52
|
let pattern = isAbsolute(source) ? source : join(cwd, source);
|
|
54
53
|
|
|
55
54
|
// append glob if folder
|
|
56
|
-
if (
|
|
55
|
+
if (
|
|
56
|
+
extname(pattern) === "" &&
|
|
57
|
+
isDynamicPattern(ensurePosix(pattern)) === false
|
|
58
|
+
) {
|
|
57
59
|
pattern = `${pattern}${sep}**${sep}*`;
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -73,7 +75,7 @@ const resolveFiles = async (files, cwd) =>
|
|
|
73
75
|
// process glob pattern into a list of existing files
|
|
74
76
|
const resolvedFiles = await glob(pattern, {
|
|
75
77
|
cwd: basePath,
|
|
76
|
-
|
|
78
|
+
onlyFiles: true,
|
|
77
79
|
});
|
|
78
80
|
|
|
79
81
|
// trim off the basePath to create a relative pathed pattern
|
package/lib/validators/alias.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const aliasRe = /^[0-9]+$/;
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Checks that a value is a valid alias value.
|
|
3
5
|
* @param {string} value
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
* @throws {Error} if the value is not a valid alias value
|
|
6
8
|
*/
|
|
7
9
|
export const alias = (value) => {
|
|
8
|
-
if (
|
|
10
|
+
if (aliasRe.test(value)) {
|
|
9
11
|
return value;
|
|
10
12
|
}
|
|
11
13
|
throw new Error(`Parameter "alias" is not valid - Value: ${value}`);
|
package/lib/validators/org.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const orgRe = /^[a-zA-Z0-9_-]+$/;
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Checks that a value is a valid organisation name.
|
|
3
5
|
* @param {string} value
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
* @throws {Error} if the value is not a valid organisation name
|
|
6
8
|
*/
|
|
7
9
|
export const org = (value) => {
|
|
8
|
-
if (
|
|
10
|
+
if (orgRe.test(value)) {
|
|
9
11
|
return value.toLowerCase();
|
|
10
12
|
}
|
|
11
13
|
throw new Error(`Parameter "org" is not valid - Value: ${value}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eik/common",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.24",
|
|
4
4
|
"description": "Common utilities for Eik modules",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -37,26 +37,25 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"ajv": "8.18.0",
|
|
39
39
|
"ajv-formats": "3.0.1",
|
|
40
|
-
"glob": "13.0.6",
|
|
41
|
-
"is-glob": "4.0.3",
|
|
42
40
|
"mime-types": "3.0.2",
|
|
43
41
|
"semver": "7.7.4",
|
|
42
|
+
"tinyglobby": "0.2.16",
|
|
44
43
|
"validate-npm-package-name": "7.0.2"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
46
|
"@babel/plugin-syntax-import-assertions": "7.28.6",
|
|
48
|
-
"@eik/eslint-config": "
|
|
47
|
+
"@eik/eslint-config": "2.0.0",
|
|
49
48
|
"@eik/prettier-config": "1.0.1",
|
|
50
|
-
"@eik/semantic-release-config": "1.0.
|
|
51
|
-
"@eik/typescript-config": "1.0.
|
|
49
|
+
"@eik/semantic-release-config": "1.0.15",
|
|
50
|
+
"@eik/typescript-config": "1.0.1",
|
|
52
51
|
"@semantic-release/changelog": "6.0.3",
|
|
53
52
|
"@semantic-release/git": "10.0.1",
|
|
54
53
|
"@types/is-glob": "4.0.4",
|
|
55
54
|
"@types/semver": "7.7.1",
|
|
56
55
|
"@types/validate-npm-package-name": "4.0.2",
|
|
57
|
-
"eslint": "9.39.
|
|
56
|
+
"eslint": "9.39.4",
|
|
58
57
|
"express": "5.2.1",
|
|
59
|
-
"fastify": "5.
|
|
58
|
+
"fastify": "5.8.3",
|
|
60
59
|
"json-schema-to-typescript": "15.0.4",
|
|
61
60
|
"npm-run-all2": "8.0.4",
|
|
62
61
|
"prettier": "3.8.1",
|