browser-ava 2.1.10 → 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 CHANGED
@@ -4,6 +4,9 @@
4
4
  [![downloads](http://img.shields.io/npm/dm/browser-ava.svg?style=flat-square)](https://npmjs.org/package/browser-ava)
5
5
  [![GitHub Issues](https://img.shields.io/github/issues/arlac77/browser-ava.svg?style=flat-square)](https://github.com/arlac77/browser-ava/issues)
6
6
  [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Farlac77%2Fbrowser-ava%2Fbadge\&style=flat)](https://actions-badge.atrox.dev/arlac77/browser-ava/goto)
7
+ [![Styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
8
+ [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
9
+ [![Known Vulnerabilities](https://snyk.io/test/github/arlac77/browser-ava/badge.svg)](https://snyk.io/test/github/arlac77/browser-ava)
7
10
  [![Coverage Status](https://coveralls.io/repos/arlac77/browser-ava/badge.svg)](https://coveralls.io/github/arlac77/browser-ava)
8
11
  # browser-ava
9
12
  Run ava tests in the browser
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "browser-ava",
3
- "version": "2.1.10",
3
+ "version": "2.1.12",
4
4
  "publishConfig": {
5
- "access": "public"
5
+ "access": "public",
6
+ "provenance": true
6
7
  },
7
8
  "description": "Run ava tests in the browser",
8
9
  "keywords": [
@@ -28,24 +29,28 @@
28
29
  "prepare": "npx playwright install",
29
30
  "test": "npm run test:ava",
30
31
  "test:ava": "ava --timeout 4m tests/*-ava.mjs tests/*-ava-node.mjs",
31
- "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"
32
36
  },
33
37
  "dependencies": {
34
38
  "@koa/cors": "^5.0.0",
35
39
  "chalk": "^5.3.0",
36
- "commander": "^11.1.0",
40
+ "commander": "^12.0.0",
37
41
  "es-module-lexer": "^1.4.1",
38
42
  "globby": "^14.0.0",
39
43
  "koa": "^2.15.0",
40
44
  "koa-static": "^5.0.0",
41
- "playwright": "^1.41.1",
45
+ "playwright": "^1.41.2",
42
46
  "ws": "^8.16.0"
43
47
  },
44
48
  "devDependencies": {
45
49
  "ava": "^6.1.1",
46
50
  "c8": "^9.1.0",
51
+ "documentation": "^14.0.3",
47
52
  "execa": "^8.0.1",
48
- "semantic-release": "^23.0.0"
53
+ "semantic-release": "^23.0.2"
49
54
  },
50
55
  "engines": {
51
56
  "node": ">=20.11.0",
@@ -53,7 +58,7 @@
53
58
  },
54
59
  "repository": {
55
60
  "type": "git",
56
- "url": "https://github.com/arlac77/browser-ava"
61
+ "url": "git+https://github.com/arlac77/browser-ava.git"
57
62
  },
58
63
  "bugs": {
59
64
  "url": "https://github.com/arlac77/browser-ava/issues"
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];