bindu 1.12.0 → 2.0.0

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,12 @@
1
+ 2026.10.15, v2.0.0
2
+
3
+ feature:
4
+ - 07413ca bindu: drop support of node < 22
5
+ - a6c4ab2 apply-guna: ri
6
+ - ef0e84a bindu: supertape v13.2.0
7
+ - ddcf818 bindu: montag v2.0.1
8
+ - 9fa29c3 bindu: superc8 v12.7.0
9
+
1
10
  2026.02.18, v1.12.0
2
11
 
3
12
  feature:
package/README.md CHANGED
@@ -27,6 +27,7 @@ npm i bindu -g
27
27
  import {bindu} from 'bindu';
28
28
 
29
29
  bindu('प्रतिएक');
30
+
30
31
  // returns {code: 'प्रत्येक'}
31
32
  bindu('द्रौपदी अश्वम्', {
32
33
  type: 'iast',
@@ -85,6 +86,18 @@ au + a → au'
85
86
  bhoati → bhavati
86
87
  ```
87
88
 
89
+ #### apply-guna
90
+
91
+ ```
92
+ भूत्वा + इह → भूत्वेह
93
+ bhUtvA + iha → bhUtveha
94
+ bhūtvā + iha → bhūtveha
95
+
96
+ देव + ऋषि → देवर्षि
97
+ deva + fzi → devarzi
98
+ deva + ṛṣi → devarṣi
99
+ ```
100
+
88
101
  #### apply-ayadaya
89
102
 
90
103
  ##### ए
@@ -2,6 +2,7 @@ export const particles = {
2
2
  iti: 'thus, so',
3
3
  iha: 'here',
4
4
  api: 'also, even',
5
+ atra: 'here, in this place',
5
6
  ca: 'and',
6
7
  eva: 'indeed, certainly',
7
8
  hi: 'surely, indeed',
@@ -4,8 +4,11 @@ const {remove} = operator;
4
4
  const SANDHI = {
5
5
  i: 'e',
6
6
  u: 'o',
7
+ f: 'ar',
7
8
  };
8
9
 
10
+ const isSandhiVowel = (c) => Object.hasOwn(SANDHI, c);
11
+
9
12
  export const report = () => `ād‑guṇaḥ`;
10
13
 
11
14
  export const fix = ({path, next, name, nextName, guna}) => {
@@ -31,7 +34,7 @@ export const traverse = ({push}) => ({
31
34
  .at(0)
32
35
  .toLowerCase();
33
36
 
34
- if (last !== 'a' || !/[iu]/.test(first))
37
+ if (last !== 'a' || !isSandhiVowel(first))
35
38
  return;
36
39
 
37
40
  const guna = SANDHI[first];
@@ -1,19 +1,19 @@
1
- import {operator} from 'putout';
2
1
  import {avyayamAsti} from '#avyaya';
3
2
 
4
- const {remove} = operator;
5
-
6
3
  export const report = () => `ekaḥ pūrvaparayoḥ`;
7
4
 
8
- export const fix = ({path, next, name, nextName}) => {
5
+ export const fix = ({path, name, nextName}) => {
9
6
  path.node.name = `${name}${nextName.slice(1)}`;
10
- remove(next);
7
+ path.parentPath.node.expressions.pop();
11
8
  };
12
9
 
13
10
  export const traverse = ({push}) => ({
14
11
  Identifier(path) {
15
12
  const next = path.getNextSibling();
16
13
 
14
+ if (!path.parentPath.isSequenceExpression())
15
+ return;
16
+
17
17
  if (!next.node)
18
18
  return;
19
19
 
@@ -15,6 +15,9 @@ export const traverse = ({push}) => ({
15
15
  Identifier(path) {
16
16
  const next = path.getNextSibling();
17
17
 
18
+ if (!path.parentPath.isSequenceExpression())
19
+ return;
20
+
18
21
  if (!next.node)
19
22
  return;
20
23
 
@@ -26,6 +26,7 @@ export const report = () => `iko yaṇaci`;
26
26
 
27
27
  export const fix = ({path, next, name, nextName, yan}) => {
28
28
  path.node.name = `${name.slice(0, -1)}${yan}${nextName}`;
29
+
29
30
  remove(next);
30
31
  };
31
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bindu",
3
- "version": "1.12.0",
3
+ "version": "2.0.0",
4
4
  "description": "Pāṇini Aṣṭādhyāyī",
5
5
  "main": "lib/bindu.js",
6
6
  "bin": {
@@ -36,7 +36,7 @@
36
36
  "homepage": "https://github.com/putoutjs/bindu",
37
37
  "license": "MIT",
38
38
  "engines": {
39
- "node": ">=20"
39
+ "node": ">=22"
40
40
  },
41
41
  "imports": {
42
42
  "#avyaya": "./lib/avyaya/index.js"
@@ -47,16 +47,16 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@putout/test": "^15.1.1",
50
- "c8": "^10.1.2",
51
50
  "eslint": "^10.0.0",
52
51
  "eslint-plugin-putout": "^31.0.0",
53
52
  "fast-xml-parser": "^5.3.3",
54
53
  "ipull": "^4.0.3",
55
54
  "madrun": "^13.0.0",
56
- "montag": "^1.2.1",
55
+ "montag": "^2.0.1",
57
56
  "nodemon": "^3.0.1",
58
57
  "redlint": "^6.0.0",
59
- "supertape": "^12.5.0",
58
+ "superc8": "^12.7.0",
59
+ "supertape": "^13.2.0",
60
60
  "try-to-catch": "^4.0.5"
61
61
  },
62
62
  "publishConfig": {