aleman 1.4.5 → 1.4.6

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 CHANGED
@@ -1,3 +1,8 @@
1
+ 2025.09.09, v1.4.6
2
+
3
+ feature:
4
+ - 14b0011 aleman: menu: jsx-operator: getAttributeNode
5
+
1
6
  2025.09.09, v1.4.5
2
7
 
3
8
  feature:
package/menu/importmap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export const importmap = {
2
2
  imports: {
3
- 'putout': 'https://esm.sh/@putout/bundle@4.6.2',
3
+ 'putout': 'https://esm.sh/@putout/bundle@4.6.3',
4
4
  '@putout/processor-html': 'https://esm.sh/@putout/processor-html',
5
5
  'fullstore': 'https://esm.sh/fullstore',
6
6
  'jessy': 'https://esm.sh/jessy',
@@ -1,7 +1,9 @@
1
- import {operator, types} from 'putout';
1
+ import {operator} from 'putout';
2
2
 
3
- const {isJSXElement} = types;
4
- const {setLiteralValue} = operator;
3
+ const {
4
+ setLiteralValue,
5
+ getAttributeNode,
6
+ } = operator;
5
7
 
6
8
  export function getAttributeValue(path, attributeName) {
7
9
  const attribute = getAttributeNode(path, attributeName);
@@ -12,22 +14,6 @@ export function getAttributeValue(path, attributeName) {
12
14
  return attribute.value.value;
13
15
  }
14
16
 
15
- export function getAttributeNode(path, name) {
16
- let result = null;
17
-
18
- const node = path.node || path;
19
- const {attributes} = node.openingElement;
20
-
21
- for (const attr of attributes) {
22
- if (attr.name.name === name) {
23
- result = attr;
24
- break;
25
- }
26
- }
27
-
28
- return result;
29
- }
30
-
31
17
  export function addAttributeValue(path, name, value) {
32
18
  const node = path.node || path;
33
19
  const attributeNode = getAttributeNode(node, name);
@@ -74,4 +74,3 @@ function parsePosition(str) {
74
74
  Number(y),
75
75
  ];
76
76
  }
77
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aleman",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "🐊Putout-based framework for web",