nuxt-dev-ready 2.0.0 → 3.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.
Files changed (2) hide show
  1. package/dist/index.js +2 -3
  2. package/package.json +6 -5
package/dist/index.js CHANGED
@@ -5,11 +5,10 @@ export default (async (port = 3000) => {
5
5
  await portReady(port);
6
6
  await pWaitFor(async () => {
7
7
  try {
8
- await axios.get(`http://localhost:${port}`);
8
+ return !(await axios.get(`http://localhost:${port}`)).data.includes('id="nuxt_loading_screen"');
9
9
  } catch (error) {
10
- return error.code !== 'ECONNREFUSED' && error.response.status !== 503;
10
+ return error.response !== undefined && error.response.status !== 503;
11
11
  }
12
- return true;
13
12
  }, {
14
13
  interval: 100
15
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-dev-ready",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "Waits until the Nuxt dev server is loaded. Mainly useful for testing.",
5
5
  "keywords": [
6
6
  "wait"
@@ -31,17 +31,18 @@
31
31
  "port-ready": "^0.1.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@dword-design/base": "^10.0.1",
34
+ "@dword-design/base": "^11.0.2",
35
35
  "@dword-design/functions": "^5.0.14",
36
- "execa": "^7.1.1",
36
+ "execa": "^8.0.1",
37
37
  "fs-extra": "^11.1.1",
38
- "jsdom": "^22.0.0",
38
+ "jsdom": "^24.0.0",
39
39
  "nuxt": "^3.4.2",
40
+ "ora": "^8.0.1",
40
41
  "tree-kill-promise": "^3.0.14",
41
42
  "with-local-tmp-dir": "^5.0.1"
42
43
  },
43
44
  "engines": {
44
- "node": ">=16"
45
+ "node": ">=18"
45
46
  },
46
47
  "publishConfig": {
47
48
  "access": "public"