@archoleat/reglib 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  ![NPM Version](https://img.shields.io/npm/v/%40archoleat%2Freglib)
4
4
  ![NPM Downloads](https://img.shields.io/npm/dm/%40archoleat%2Freglib)
5
- ![ESM](https://img.shields.io/badge/ESM-fe0)
6
- ![Provenance](https://img.shields.io/badge/Provenance-fo0)
7
5
  ![Specs](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/spec.yaml?label=Specs)
8
6
  ![Commitlint](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/commitlint.yaml?label=Commitlint)
9
7
  ![Editorconfig](https://img.shields.io/github/actions/workflow/status/archoleat/reglib/editorconfig.yaml?label=Editorconfig)
package/index.d.ts CHANGED
@@ -7,14 +7,15 @@ declare const selectors: {
7
7
  MODIFIER_REGEX: string;
8
8
  };
9
9
  child: {
10
- ATTRIBUTE_REGEX: string;
11
- CLASS_REGEX: string;
10
+ CLASS_CHILD_REGEX: string;
11
+ ATTRIBUTE_CHILD_REGEX: string;
12
12
  };
13
13
  nested: {
14
14
  ATTRIBUTE_REGEX: string;
15
15
  CLASS_REGEX: string;
16
16
  ELEMENT_REGEX: string;
17
17
  MODIFIER_REGEX: string;
18
+ NESTED_REGEX: string;
18
19
  };
19
20
  };
20
21
 
package/index.js CHANGED
@@ -1 +1 @@
1
- const c="(Italic)",G="(Variable)",t="[A-Z][a-z]",X=`^${t}+(${t}+)?`,T=["Thin","Hairline","ExtraLight","UltraLight","Light","Regular","Medium","SemiBold","DemiBold","Bold","ExtraBold","UltraBold","Black","Heavy","ExtraBlack","UltraBlack"].join("|"),$=["otf","ttf","woff","woff2"].join("|"),a=`(${X})`,s=`(${T})`,L=`(${$})$`,i=[`${a}-${s}`,`(${c}?)(${G}?)`,`\\.${L}`].join(""),l=new RegExp(i),E="[a-z0-9]",o=String.raw`?\[(.*)\]`,_=String.raw`?\.(.*)`,R="--",n="__",I={bem:{BLOCK_REGEX:`[a-z]${E}*(-${E}+)`,ELEMENT_REGEX:`(${n}${E}+(-${E}+)*)`,MODIFIER_REGEX:`(${R}${E}+(-${E}+)*)`},child:{ATTRIBUTE_REGEX:`${o} &`,CLASS_REGEX:`${_} &`},nested:{ATTRIBUTE_REGEX:o,CLASS_REGEX:_,ELEMENT_REGEX:n,MODIFIER_REGEX:R}};export{l as FONT_FILE_NAME_REGEX,I as selectors};
1
+ const _="(Italic)",R="(Variable)",t="[A-Z][a-z]",c=`^${t}+(${t}+)?`,s=["Thin","Hairline","ExtraLight","UltraLight","Light","Regular","Medium","SemiBold","DemiBold","Bold","ExtraBold","UltraBold","Black","Heavy","ExtraBlack","UltraBlack"].join("|"),G=["otf","ttf","woff","woff2"].join("|"),X=`(${c})`,a=`(${s})`,T=`(${G})$`,L=[`${X}-${a}`,`(${_}?)(${R}?)`,`\\.${T}`].join(""),S=new RegExp(L),E="[a-z0-9]",r=String.raw`\[(.*?)\]`,i=String.raw`\.(.*?)`,$="__",I="--",l=`[a-z]${E}*(-${E}+)*`,o=`(${$}${E}+(-${E}+)*)`,n=`(${I}${E}+(-${E}+)*)`,e=String.raw`&[ >+][^ ,{}]+`,A=String.raw`\.${E}+[ >+][^ ,{}]+`,B=String.raw`\[.*?\][ >+][^ ,{}]+`,N={bem:{BLOCK_REGEX:l,ELEMENT_REGEX:o,MODIFIER_REGEX:n},child:{CLASS_CHILD_REGEX:A,ATTRIBUTE_CHILD_REGEX:B},nested:{ATTRIBUTE_REGEX:r,CLASS_REGEX:i,ELEMENT_REGEX:o,MODIFIER_REGEX:n,NESTED_REGEX:e}};export{S as FONT_FILE_NAME_REGEX,N as selectors};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@archoleat/reglib",
3
3
  "description": "Library with ready-to-use regex",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "email": "archoleat@gmail.com",
@@ -27,15 +27,13 @@
27
27
  "regular-expression",
28
28
  "regular-expressions"
29
29
  ],
30
- "packageManager": "pnpm@9.7.0",
31
30
  "engines": {
32
- "node": ">=20.0.0",
33
- "pnpm": ">=9.0.0"
31
+ "bun": ">=1.0.0"
34
32
  },
35
33
  "type": "module",
36
34
  "imports": {
37
- "#index": "./src/index.ts",
38
- "#validators": "./src/validators/index.ts"
35
+ "#src/*": "./src/*",
36
+ "#validators/*": "./src/validators/*"
39
37
  },
40
38
  "exports": {
41
39
  ".": "./index.js",
@@ -46,26 +44,26 @@
46
44
  "index.js"
47
45
  ],
48
46
  "scripts": {
49
- "init": "pnpm i && husky"
47
+ "init": "bun i && husky"
50
48
  },
51
49
  "devDependencies": {
52
50
  "@archoleat/commitlint-define-config": "^1.1.0",
53
51
  "@archoleat/eslint-flat-compatibility": "^1.2.1",
54
52
  "@archoleat/prettier-define-config": "^1.1.0",
55
53
  "@archoleat/semantic-release-define-config": "^1.2.0",
56
- "@commitlint/cli": "^19.5.0",
57
- "@commitlint/config-conventional": "^19.5.0",
54
+ "@commitlint/cli": "^19.6.1",
55
+ "@commitlint/config-conventional": "^19.6.0",
58
56
  "@commitlint/types": "^19.5.0",
59
57
  "@rollup/plugin-alias": "^5.1.1",
60
- "@rollup/plugin-typescript": "^12.1.1",
58
+ "@rollup/plugin-typescript": "^12.1.2",
61
59
  "@semantic-release/changelog": "^6.0.3",
62
60
  "@semantic-release/git": "^10.0.1",
63
- "@types/node": "^22.9.0",
61
+ "@types/bun": "^1.1.14",
62
+ "@types/node": "^22.10.5",
64
63
  "@typescript-eslint/eslint-plugin": "^7.18.0",
65
64
  "@typescript-eslint/parser": "^7.18.0",
66
- "@vitest/coverage-v8": "^2.1.4",
67
65
  "conventional-changelog-conventionalcommits": "^8.0.0",
68
- "editorconfig-checker": "^6.0.0",
66
+ "editorconfig-checker": "^5.1.9",
69
67
  "eslint": "^8.57.1",
70
68
  "eslint-config-airbnb": "^19.0.4",
71
69
  "eslint-config-airbnb-typescript": "^18.0.0",
@@ -74,22 +72,20 @@
74
72
  "eslint-import-resolver-typescript": "^3.6.3",
75
73
  "eslint-plugin-import": "^2.31.0",
76
74
  "eslint-plugin-simple-import-sort": "^12.1.1",
77
- "eslint-plugin-unicorn": "^56.0.0",
75
+ "eslint-plugin-unicorn": "^56.0.1",
78
76
  "git-pull-run": "^1.4.0",
79
- "globals": "^15.12.0",
80
- "husky": "^9.1.6",
77
+ "globals": "^15.13.0",
78
+ "husky": "^9.1.7",
81
79
  "lint-staged": "^15.2.10",
82
- "prettier": "^3.3.3",
80
+ "prettier": "^3.4.2",
83
81
  "remark": "15.0.1",
84
82
  "remark-cli": "^12.0.1",
85
83
  "remark-preset-lint-consistent": "^6.0.0",
86
84
  "remark-preset-lint-markdown-style-guide": "^6.0.0",
87
85
  "remark-preset-lint-recommended": "^7.0.0",
88
- "rollup": "^4.25.0",
86
+ "rollup": "^4.28.0",
89
87
  "rollup-plugin-dts": "^6.1.1",
90
88
  "rollup-plugin-esbuild": "^6.1.1",
91
- "semantic-release": "^24.2.0",
92
- "typescript": "^5.6.3",
93
- "vitest": "^2.1.4"
89
+ "semantic-release": "^24.2.0"
94
90
  }
95
91
  }