@akanjs/language 3.2.0-rc.25 → 3.2.0-rc.26
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/index.cjs +9 -9
- package/index.js +9 -9
- package/package.json +1 -1
- package/server.js +9 -9
package/index.cjs
CHANGED
|
@@ -1533,12 +1533,16 @@ ${field}`))
|
|
|
1533
1533
|
const own = this.#adaptorIn(name, declared, holder, path, file.fileName);
|
|
1534
1534
|
if (own && "from" in own)
|
|
1535
1535
|
return this.#packageAdaptorOf(own.name, own.from);
|
|
1536
|
-
const
|
|
1536
|
+
const shims = own === undefined && from && from !== frameworkOwner && path ? this.#exportedAt(name, path).filter(isPackageExport) : [];
|
|
1537
|
+
const [shim] = shims;
|
|
1538
|
+
if (shim && shims.length === 1)
|
|
1539
|
+
return this.#packageAdaptorOf(shim.name, shim.from);
|
|
1540
|
+
const found = own === undefined && !shim && from !== frameworkOwner ? declared.find((adaptor) => this.#resolver.visible(adaptor.owner, holder)) : own;
|
|
1537
1541
|
if (found)
|
|
1538
1542
|
return found.id;
|
|
1539
|
-
const
|
|
1540
|
-
if (
|
|
1541
|
-
return this.#packageAdaptorOf(
|
|
1543
|
+
const starred = own === undefined && !shim && from && from !== frameworkOwner ? this.#starredPackageOf(from, name, path) : null;
|
|
1544
|
+
if (starred)
|
|
1545
|
+
return this.#packageAdaptorOf(starred.name, starred.from);
|
|
1542
1546
|
const owner = from === frameworkOwner ? null : imported ? from ?? null : file.owner;
|
|
1543
1547
|
const detail = from === frameworkOwner ? [frameworkOwner] : [];
|
|
1544
1548
|
return this.#sink.addNode(this.#sink.key("adaptor", owner, name), "adaptor", owner, name, null, detail).id;
|
|
@@ -1619,13 +1623,9 @@ ${wanted}`);
|
|
|
1619
1623
|
const pkg = packageOf(specifier);
|
|
1620
1624
|
return this.#sink.addNode(this.#sink.key("adaptor", pkg, name), "adaptor", null, name, null, [pkg]).id;
|
|
1621
1625
|
}
|
|
1622
|
-
#
|
|
1626
|
+
#starredPackageOf(owner, name, near) {
|
|
1623
1627
|
if (!near)
|
|
1624
1628
|
return null;
|
|
1625
|
-
const shims = this.#exportedAt(name, near).filter(isPackageExport);
|
|
1626
|
-
const [shim] = shims;
|
|
1627
|
-
if (shim)
|
|
1628
|
-
return shims.length === 1 ? shim : null;
|
|
1629
1629
|
const { packages, paths } = this.#resolver.starExportsOf(owner, near);
|
|
1630
1630
|
const [only] = packages;
|
|
1631
1631
|
if (!only || new Set(packages.map(packageOf)).size !== 1)
|
package/index.js
CHANGED
|
@@ -1481,12 +1481,16 @@ ${field}`))
|
|
|
1481
1481
|
const own = this.#adaptorIn(name, declared, holder, path, file.fileName);
|
|
1482
1482
|
if (own && "from" in own)
|
|
1483
1483
|
return this.#packageAdaptorOf(own.name, own.from);
|
|
1484
|
-
const
|
|
1484
|
+
const shims = own === undefined && from && from !== frameworkOwner && path ? this.#exportedAt(name, path).filter(isPackageExport) : [];
|
|
1485
|
+
const [shim] = shims;
|
|
1486
|
+
if (shim && shims.length === 1)
|
|
1487
|
+
return this.#packageAdaptorOf(shim.name, shim.from);
|
|
1488
|
+
const found = own === undefined && !shim && from !== frameworkOwner ? declared.find((adaptor) => this.#resolver.visible(adaptor.owner, holder)) : own;
|
|
1485
1489
|
if (found)
|
|
1486
1490
|
return found.id;
|
|
1487
|
-
const
|
|
1488
|
-
if (
|
|
1489
|
-
return this.#packageAdaptorOf(
|
|
1491
|
+
const starred = own === undefined && !shim && from && from !== frameworkOwner ? this.#starredPackageOf(from, name, path) : null;
|
|
1492
|
+
if (starred)
|
|
1493
|
+
return this.#packageAdaptorOf(starred.name, starred.from);
|
|
1490
1494
|
const owner = from === frameworkOwner ? null : imported ? from ?? null : file.owner;
|
|
1491
1495
|
const detail = from === frameworkOwner ? [frameworkOwner] : [];
|
|
1492
1496
|
return this.#sink.addNode(this.#sink.key("adaptor", owner, name), "adaptor", owner, name, null, detail).id;
|
|
@@ -1567,13 +1571,9 @@ ${wanted}`);
|
|
|
1567
1571
|
const pkg = packageOf(specifier);
|
|
1568
1572
|
return this.#sink.addNode(this.#sink.key("adaptor", pkg, name), "adaptor", null, name, null, [pkg]).id;
|
|
1569
1573
|
}
|
|
1570
|
-
#
|
|
1574
|
+
#starredPackageOf(owner, name, near) {
|
|
1571
1575
|
if (!near)
|
|
1572
1576
|
return null;
|
|
1573
|
-
const shims = this.#exportedAt(name, near).filter(isPackageExport);
|
|
1574
|
-
const [shim] = shims;
|
|
1575
|
-
if (shim)
|
|
1576
|
-
return shims.length === 1 ? shim : null;
|
|
1577
1577
|
const { packages, paths } = this.#resolver.starExportsOf(owner, near);
|
|
1578
1578
|
const [only] = packages;
|
|
1579
1579
|
if (!only || new Set(packages.map(packageOf)).size !== 1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/language",
|
|
3
|
-
"version": "3.2.0-rc.
|
|
3
|
+
"version": "3.2.0-rc.26",
|
|
4
4
|
"description": "Editor-independent Akan.js language core: resolves derived names (slices, queries, CRUD, form setters) back to the source key that produced them.",
|
|
5
5
|
"sourceType": "module",
|
|
6
6
|
"type": "module",
|
package/server.js
CHANGED
|
@@ -1377,12 +1377,16 @@ ${field}`))
|
|
|
1377
1377
|
const own = this.#adaptorIn(name, declared, holder, path, file.fileName);
|
|
1378
1378
|
if (own && "from" in own)
|
|
1379
1379
|
return this.#packageAdaptorOf(own.name, own.from);
|
|
1380
|
-
const
|
|
1380
|
+
const shims = own === undefined && from && from !== frameworkOwner && path ? this.#exportedAt(name, path).filter(isPackageExport) : [];
|
|
1381
|
+
const [shim] = shims;
|
|
1382
|
+
if (shim && shims.length === 1)
|
|
1383
|
+
return this.#packageAdaptorOf(shim.name, shim.from);
|
|
1384
|
+
const found = own === undefined && !shim && from !== frameworkOwner ? declared.find((adaptor) => this.#resolver.visible(adaptor.owner, holder)) : own;
|
|
1381
1385
|
if (found)
|
|
1382
1386
|
return found.id;
|
|
1383
|
-
const
|
|
1384
|
-
if (
|
|
1385
|
-
return this.#packageAdaptorOf(
|
|
1387
|
+
const starred = own === undefined && !shim && from && from !== frameworkOwner ? this.#starredPackageOf(from, name, path) : null;
|
|
1388
|
+
if (starred)
|
|
1389
|
+
return this.#packageAdaptorOf(starred.name, starred.from);
|
|
1386
1390
|
const owner = from === frameworkOwner ? null : imported ? from ?? null : file.owner;
|
|
1387
1391
|
const detail = from === frameworkOwner ? [frameworkOwner] : [];
|
|
1388
1392
|
return this.#sink.addNode(this.#sink.key("adaptor", owner, name), "adaptor", owner, name, null, detail).id;
|
|
@@ -1463,13 +1467,9 @@ ${wanted}`);
|
|
|
1463
1467
|
const pkg = packageOf(specifier);
|
|
1464
1468
|
return this.#sink.addNode(this.#sink.key("adaptor", pkg, name), "adaptor", null, name, null, [pkg]).id;
|
|
1465
1469
|
}
|
|
1466
|
-
#
|
|
1470
|
+
#starredPackageOf(owner, name, near) {
|
|
1467
1471
|
if (!near)
|
|
1468
1472
|
return null;
|
|
1469
|
-
const shims = this.#exportedAt(name, near).filter(isPackageExport);
|
|
1470
|
-
const [shim] = shims;
|
|
1471
|
-
if (shim)
|
|
1472
|
-
return shims.length === 1 ? shim : null;
|
|
1473
1473
|
const { packages, paths } = this.#resolver.starExportsOf(owner, near);
|
|
1474
1474
|
const [only] = packages;
|
|
1475
1475
|
if (!only || new Set(packages.map(packageOf)).size !== 1)
|