browser-ava 2.2.6 → 2.2.8
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/package.json +5 -5
- package/src/resolver.mjs +13 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-ava",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
"globby": "^14.0.1",
|
|
43
43
|
"koa": "^2.15.2",
|
|
44
44
|
"koa-static": "^5.0.0",
|
|
45
|
-
"playwright": "^1.
|
|
45
|
+
"playwright": "^1.43.0",
|
|
46
46
|
"ws": "^8.16.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/node": "^20.
|
|
49
|
+
"@types/node": "^20.12.4",
|
|
50
50
|
"ava": "^6.1.2",
|
|
51
51
|
"c8": "^9.1.0",
|
|
52
52
|
"documentation": "^14.0.3",
|
|
53
53
|
"execa": "^8.0.1",
|
|
54
|
-
"semantic-release": "^23.0.
|
|
54
|
+
"semantic-release": "^23.0.7"
|
|
55
55
|
},
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=20.12.
|
|
57
|
+
"node": ">=20.12.1",
|
|
58
58
|
"bun": ">=1.0"
|
|
59
59
|
},
|
|
60
60
|
"repository": {
|
package/src/resolver.mjs
CHANGED
|
@@ -31,8 +31,8 @@ export function resolveExports(parts, pkg) {
|
|
|
31
31
|
case "string":
|
|
32
32
|
return value;
|
|
33
33
|
case "object":
|
|
34
|
-
if(value[
|
|
35
|
-
return matchingCondition(value[
|
|
34
|
+
if (value["."]) {
|
|
35
|
+
return matchingCondition(value["."]);
|
|
36
36
|
}
|
|
37
37
|
for (const condition of exportsConditionOrder) {
|
|
38
38
|
if (value[condition]) {
|
|
@@ -50,6 +50,10 @@ export function resolveExports(parts, pkg) {
|
|
|
50
50
|
return matchingCondition(pkg.exports["./" + parts.slice(1).join("/")]);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
/*if(parts.join('/') === pkg.name) {
|
|
55
|
+
return matchingCondition(pkg.exports) || pkg.main || "index.js";
|
|
56
|
+
}*/
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
export function resolveImports(name, pkg) {
|
|
@@ -100,14 +104,20 @@ export async function resolveImport(name, base) {
|
|
|
100
104
|
if (name.match(/^[\/\.]/)) {
|
|
101
105
|
return resolve(dirname(base), name);
|
|
102
106
|
}
|
|
103
|
-
let { pkg, path } = await findPackage(base);
|
|
104
107
|
|
|
105
108
|
let parts = name.split(/\//);
|
|
106
109
|
|
|
107
110
|
if (parts[0][0] === "@") {
|
|
111
|
+
const i = base.indexOf(parts[0]);
|
|
112
|
+
if (i > 0) {
|
|
113
|
+
base = base.substring(0, i);
|
|
114
|
+
}
|
|
115
|
+
|
|
108
116
|
parts = [parts[0] + "/" + parts[1], ...parts.slice(2)];
|
|
109
117
|
}
|
|
110
118
|
|
|
119
|
+
let { pkg, path } = await findPackage(base);
|
|
120
|
+
|
|
111
121
|
const e = resolveExports(parts, pkg) || resolveImports(name, pkg);
|
|
112
122
|
|
|
113
123
|
if (e) {
|