browser-ava 2.1.11 → 2.1.12
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/README.md +3 -0
- package/package.json +7 -3
- package/src/resolver.mjs +4 -1
package/README.md
CHANGED
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
[](https://npmjs.org/package/browser-ava)
|
|
5
5
|
[](https://github.com/arlac77/browser-ava/issues)
|
|
6
6
|
[](https://actions-badge.atrox.dev/arlac77/browser-ava/goto)
|
|
7
|
+
[](https://github.com/prettier/prettier)
|
|
8
|
+
[](http://commitizen.github.io/cz-cli/)
|
|
9
|
+
[](https://snyk.io/test/github/arlac77/browser-ava)
|
|
7
10
|
[](https://coveralls.io/github/arlac77/browser-ava)
|
|
8
11
|
# browser-ava
|
|
9
12
|
Run ava tests in the browser
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-ava",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -29,7 +29,10 @@
|
|
|
29
29
|
"prepare": "npx playwright install",
|
|
30
30
|
"test": "npm run test:ava",
|
|
31
31
|
"test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
|
|
32
|
-
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
|
|
32
|
+
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
|
|
33
|
+
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
34
|
+
"lint": "npm run lint:docs",
|
|
35
|
+
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
33
36
|
},
|
|
34
37
|
"dependencies": {
|
|
35
38
|
"@koa/cors": "^5.0.0",
|
|
@@ -45,8 +48,9 @@
|
|
|
45
48
|
"devDependencies": {
|
|
46
49
|
"ava": "^6.1.1",
|
|
47
50
|
"c8": "^9.1.0",
|
|
51
|
+
"documentation": "^14.0.3",
|
|
48
52
|
"execa": "^8.0.1",
|
|
49
|
-
"semantic-release": "^23.0.
|
|
53
|
+
"semantic-release": "^23.0.2"
|
|
50
54
|
},
|
|
51
55
|
"engines": {
|
|
52
56
|
"node": ">=20.11.0",
|
package/src/resolver.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const exportsConditionOrder = ["browser", "module", "import", ".", "default"];
|
|
|
22
22
|
/**
|
|
23
23
|
* Find module inside a package.
|
|
24
24
|
* @param {string[]} parts
|
|
25
|
-
* @param {Object} pkg package.json content
|
|
25
|
+
* @param {Object} pkg decoded package.json content
|
|
26
26
|
* @returns {string|undefined} module file name relative to package
|
|
27
27
|
*/
|
|
28
28
|
export function resolveExports(parts, pkg) {
|
|
@@ -31,6 +31,9 @@ export function resolveExports(parts, pkg) {
|
|
|
31
31
|
case "string":
|
|
32
32
|
return value;
|
|
33
33
|
case "object":
|
|
34
|
+
if(value['.']) {
|
|
35
|
+
return matchingCondition(value['.']);
|
|
36
|
+
}
|
|
34
37
|
for (const condition of exportsConditionOrder) {
|
|
35
38
|
if (value[condition]) {
|
|
36
39
|
return value[condition];
|