@gooddata/util 11.69.0-alpha.0 → 11.69.0-alpha.2
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/NOTICE +3 -3
- package/esm/_/_unicode.d.ts.map +1 -1
- package/esm/_/_unicode.js +4 -0
- package/esm/_/deburr.js +2 -2
- package/esm/_/words.js +2 -2
- package/esm/stringUtils.js +2 -2
- package/package.json +4 -3
package/NOTICE
CHANGED
|
@@ -3,11 +3,11 @@ Copyright (c) 2017-2026 GoodData Corporation
|
|
|
3
3
|
This product includes a number of subcomponents with separate copyright notices and license terms below. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license. This GoodData project does not necessarily use all the open source software referred to below and may also only use portions of a given package. With respect to the open source software listed in this document, if you (i) have any questions, (ii) wish to receive source code for packages under licenses that require their source code to be made available (such as the GNU Lesser Public License), or (iii) discover any errors or omissions in the licensing information provided, please contact us at legal@gooddata.com. Please identify in source code requests: (i) the packages for which you are requesting corresponding source, (ii) the GoodData product (including any available version) with which the package was provided; and (iii) an email address (if available) or postal address at which GoodData may contact you.
|
|
4
4
|
|
|
5
5
|
--------------------------------------------------------------------------------
|
|
6
|
-
Attribution Notice for @gooddata/util (11.69.0-alpha.
|
|
6
|
+
Attribution Notice for @gooddata/util (11.69.0-alpha.2)
|
|
7
7
|
Package License: MIT
|
|
8
8
|
Own License File: LICENSE
|
|
9
|
-
Date generated: 2026-11-
|
|
10
|
-
Revision ID:
|
|
9
|
+
Date generated: 2026-11-13
|
|
10
|
+
Revision ID: f07dd3a7251c3c343762a6fda0c9b1cb88df1ed1
|
|
11
11
|
|
|
12
12
|
This notice lists the components that @gooddata/util depends on, directly or through other
|
|
13
13
|
packages, with the license and copyright information reported for each of them.
|
package/esm/_/_unicode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_unicode.d.ts","sourceRoot":"","sources":["../../src/_/_unicode.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_unicode.d.ts","sourceRoot":"","sources":["../../src/_/_unicode.ts"],"names":[],"mappings":"AAyGA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAExD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAEtD"}
|
package/esm/_/_unicode.js
CHANGED
|
@@ -71,6 +71,9 @@ const RS_SEQ = RS_OPT_VAR + RE_OPT_MOD + RS_OPT_JOIN;
|
|
|
71
71
|
const RS_EMOJI = `(?:${[RS_DINGBAT, RS_REGIONAL, RS_SURR_PAIR].join("|")})${RS_SEQ}`;
|
|
72
72
|
const RS_NON_ASTRAL_COMBO = `${RS_NON_ASTRAL}${RS_COMBO}?`;
|
|
73
73
|
const RS_SYMBOL = `(?:${[RS_NON_ASTRAL_COMBO, RS_COMBO, RS_REGIONAL, RS_SURR_PAIR, RS_ASTRAL].join("|")})`;
|
|
74
|
+
// Lodash's unicode tables are kept verbatim so the regexes stay provably equal to lodash's; their overlaps
|
|
75
|
+
// (duplicate characters, subset alternatives, combining marks in classes) are harmless.
|
|
76
|
+
/* eslint-disable no-misleading-character-class, regexp/no-dupe-disjunctions, regexp/prefer-character-class, regexp/no-dupe-characters-character-class, regexp/control-character-escape */
|
|
74
77
|
/** Used to detect strings with zero-width joiners or code points from the astral planes. */
|
|
75
78
|
const RE_HAS_UNICODE = new RegExp(`[${RS_ZWJ}${RS_ASTRAL_RANGE}${RS_COMBO_RANGE}${RS_VAR_RANGE}]`);
|
|
76
79
|
/** Used to match string symbols, that is, what a user would perceive as one character. */
|
|
@@ -86,6 +89,7 @@ const RE_UNICODE_WORD = new RegExp([
|
|
|
86
89
|
RS_DIGITS,
|
|
87
90
|
RS_EMOJI,
|
|
88
91
|
].join("|"), "g");
|
|
92
|
+
/* eslint-enable no-misleading-character-class, regexp/no-dupe-disjunctions, regexp/prefer-character-class, regexp/no-dupe-characters-character-class, regexp/control-character-escape */
|
|
89
93
|
/**
|
|
90
94
|
* Checks if `string` contains Unicode symbols: zero-width joiners, combining marks, variation selectors or
|
|
91
95
|
* code points from the astral planes.
|
package/esm/_/deburr.js
CHANGED
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { _toString } from "./toString.js";
|
|
33
33
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
34
|
-
const RE_LATIN = /[\
|
|
34
|
+
const RE_LATIN = /[\xd8-\xf6\u0100-\u017f]/gi;
|
|
35
35
|
/** Used to match combining diacritical marks and combining diacritical marks for symbols. */
|
|
36
|
-
const RE_COMBO_MARK = /[
|
|
36
|
+
const RE_COMBO_MARK = /[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]/g;
|
|
37
37
|
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
38
38
|
const DEBURRED_LETTERS = {
|
|
39
39
|
// Latin-1 Supplement block.
|
package/esm/_/words.js
CHANGED
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { _unicodeWords } from "./_unicode.js";
|
|
33
33
|
/** Used to match words composed of alphanumeric characters. */
|
|
34
|
-
//
|
|
35
|
-
const RE_ASCII_WORD = /[
|
|
34
|
+
// The complement of lodash's `[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]`, written without control characters.
|
|
35
|
+
const RE_ASCII_WORD = /[0-9A-Z\x80-\uffff]+/gi;
|
|
36
36
|
/** Used to detect strings that need a more robust regexp to match words. */
|
|
37
37
|
const RE_HAS_UNICODE_WORD = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
38
38
|
/**
|
package/esm/stringUtils.js
CHANGED
|
@@ -52,7 +52,7 @@ export function randomString(len) {
|
|
|
52
52
|
*/
|
|
53
53
|
export function simplifyText(value) {
|
|
54
54
|
const s = value?.toString?.() ?? "";
|
|
55
|
-
return s.replace(/[^a-
|
|
55
|
+
return s.replace(/[^a-z0-9]/gi, "_").toLowerCase();
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Parse string in a form of [foo, bar] to an array of objects.
|
|
@@ -68,7 +68,7 @@ export function parseStringToArray(str) {
|
|
|
68
68
|
// empty array of tags []
|
|
69
69
|
return [];
|
|
70
70
|
}
|
|
71
|
-
if (str.match(/^\[[a-
|
|
71
|
+
if (str.match(/^\[[a-z0-9 ]+(,(?=[^ ])[a-z0-9 ]+)*\]$/i)) {
|
|
72
72
|
// [foo], [foo,bar]
|
|
73
73
|
return str.slice(1, -1).split(",");
|
|
74
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/util",
|
|
3
|
-
"version": "11.69.0-alpha.
|
|
3
|
+
"version": "11.69.0-alpha.2",
|
|
4
4
|
"description": "GoodData Utility Functions",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"eslint-plugin-import-esm": "3.0.1",
|
|
39
39
|
"eslint-plugin-jsdoc": "65.4.2",
|
|
40
40
|
"eslint-plugin-no-barrel-files": "1.2.2",
|
|
41
|
+
"eslint-plugin-regexp": "3.3.3",
|
|
41
42
|
"eslint-plugin-sonarjs": "4.2.2",
|
|
42
43
|
"eslint-plugin-tsdoc": "0.5.4",
|
|
43
44
|
"npm-run-all": "4.1.5",
|
|
@@ -47,8 +48,8 @@
|
|
|
47
48
|
"oxlint-tsgolint": "7.0.2001",
|
|
48
49
|
"typescript": "7.0.2",
|
|
49
50
|
"vitest": "5.0.4",
|
|
50
|
-
"@gooddata/eslint-config": "11.69.0-alpha.
|
|
51
|
-
"@gooddata/oxlint-config": "11.69.0-alpha.
|
|
51
|
+
"@gooddata/eslint-config": "11.69.0-alpha.2",
|
|
52
|
+
"@gooddata/oxlint-config": "11.69.0-alpha.2"
|
|
52
53
|
},
|
|
53
54
|
"scripts": {
|
|
54
55
|
"_phase:build": "npm run build",
|