@sitecore-jss/sitecore-jss-rendering-host 22.9.0-canary.2 → 22.9.0-canary.21

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.
@@ -5,9 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.startDevServer = startDevServer;
7
7
  const del_1 = require("del");
8
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9
- // @ts-ignore
10
- const opn_1 = __importDefault(require("opn"));
8
+ const open_1 = __importDefault(require("open"));
11
9
  const path_1 = __importDefault(require("path"));
12
10
  const webpack_1 = __importDefault(require("webpack"));
13
11
  const webpack_dev_server_1 = __importDefault(require("webpack-dev-server"));
@@ -60,12 +58,12 @@ function startDevServer({ port = 0, tunnelUrl, configFactory, buildArtifactsPath
60
58
  // timeout while the WDS server is busy compiling.
61
59
  // Therefore, attach a custom plugin to the `done` hook of the last compiler that is defined. Webpack
62
60
  // executes compilers serially, and we only want the plugin to run after everything is done.
63
- if (urlToOpenOnStart) {
61
+ if (urlToOpenOnStart && compiler) {
64
62
  let browserOpened = false;
65
63
  compiler.compilers[compiler.compilers.length - 1].hooks.done.tap('OpenBrowserAfterCompilationPlugin', (stats) => {
66
64
  if (!browserOpened) {
67
65
  console.log('opening browser', stats.compilation.compiler.name);
68
- (0, opn_1.default)(urlToOpenOnStart).then(() => {
66
+ (0, open_1.default)(urlToOpenOnStart).then(() => {
69
67
  browserOpened = true;
70
68
  });
71
69
  }
@@ -129,7 +127,7 @@ function startDevServer({ port = 0, tunnelUrl, configFactory, buildArtifactsPath
129
127
  if (clean) {
130
128
  const cleanPaths = [`${path_1.default.join(buildArtifactsPath, '**')}`, `!${buildArtifactsPath}`];
131
129
  console.log('cleaning paths', cleanPaths);
132
- const cleanedPaths = (0, del_1.sync)(cleanPaths);
130
+ const cleanedPaths = (0, del_1.deleteSync)(cleanPaths);
133
131
  console.log('cleaned paths', cleanedPaths);
134
132
  }
135
133
  // Give devs a chance to modify serverOptions and/or the compiler before creating the WDS instance.
@@ -1,7 +1,5 @@
1
- import { sync as delSync } from 'del';
2
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3
- // @ts-ignore
4
- import openBrowser from 'opn';
1
+ import { deleteSync as delSync } from 'del';
2
+ import open from 'open';
5
3
  import path from 'path';
6
4
  import webpack from 'webpack';
7
5
  import WebpackDevServer from 'webpack-dev-server';
@@ -54,12 +52,12 @@ export function startDevServer({ port = 0, tunnelUrl, configFactory, buildArtifa
54
52
  // timeout while the WDS server is busy compiling.
55
53
  // Therefore, attach a custom plugin to the `done` hook of the last compiler that is defined. Webpack
56
54
  // executes compilers serially, and we only want the plugin to run after everything is done.
57
- if (urlToOpenOnStart) {
55
+ if (urlToOpenOnStart && compiler) {
58
56
  let browserOpened = false;
59
57
  compiler.compilers[compiler.compilers.length - 1].hooks.done.tap('OpenBrowserAfterCompilationPlugin', (stats) => {
60
58
  if (!browserOpened) {
61
59
  console.log('opening browser', stats.compilation.compiler.name);
62
- openBrowser(urlToOpenOnStart).then(() => {
60
+ open(urlToOpenOnStart).then(() => {
63
61
  browserOpened = true;
64
62
  });
65
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-jss/sitecore-jss-rendering-host",
3
- "version": "22.9.0-canary.2",
3
+ "version": "22.9.0-canary.21",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "sideEffects": false,
@@ -26,20 +26,20 @@
26
26
  "url": "https://github.com/sitecore/jss/issues"
27
27
  },
28
28
  "dependencies": {
29
- "compression": "^1.7.4",
30
- "del": "^6.1.1",
31
- "express": "^4.18.2",
32
- "import-fresh": "^3.3.0",
29
+ "compression": "^1.8.1",
30
+ "del": "^8.0.0",
31
+ "express": "^5.1.0",
32
+ "import-fresh": "^3.3.1",
33
33
  "ngrok": "^4.3.3",
34
- "opn": "^6.0.0",
35
- "webpack": "5.76.2"
34
+ "open": "^8.4.2",
35
+ "webpack": "5.101.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/chai": "^4.2.3",
39
- "@types/compression": "^1.7.2",
40
- "@types/express-serve-static-core": "^4.17.33",
39
+ "@types/compression": "^1.8.1",
40
+ "@types/express-serve-static-core": "^5.0.7",
41
41
  "@types/glob": "^8.0.1",
42
- "@types/mocha": "^10.0.1",
42
+ "@types/mocha": "^10.0.10",
43
43
  "@types/node": "^22.9.0",
44
44
  "@types/webpack": "5.28.5",
45
45
  "@types/webpack-dev-middleware": "2.0.5",
@@ -48,10 +48,10 @@
48
48
  "del-cli": "^5.0.0",
49
49
  "eslint": "^8.56.0",
50
50
  "eslint-plugin-jsdoc": "48.7.0",
51
- "mocha": "^10.2.0",
52
- "nyc": "^15.1.0",
51
+ "mocha": "^11.7.0",
52
+ "nyc": "^17.1.0",
53
53
  "ts-node": "^10.9.1",
54
- "typescript": "~5.6.3"
54
+ "typescript": "~5.9.2"
55
55
  },
56
56
  "description": "",
57
57
  "types": "types/index.d.ts",
@@ -67,5 +67,5 @@
67
67
  "types",
68
68
  "/global.d.ts"
69
69
  ],
70
- "gitHead": "a6bb7442ce39fe6b3be987e0d53ff03bfd21d19f"
70
+ "gitHead": "8db16970de59979c85d3c5af647ef99700b2c5ff"
71
71
  }