sitespeed.io 37.0.1 → 37.0.3

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/CHANGELOG.md CHANGED
@@ -1,11 +1,18 @@
1
1
 
2
2
  # CHANGELOG - sitespeed.io (we use [semantic versioning](https://semver.org))
3
3
 
4
+ ## 37.0.3 - 2025-03-06
5
+ ### Fixed
6
+ * Hopefully the last fix for getting --help to work with global plugins [#4466](https://github.com/sitespeedio/sitespeed.io/pull/4466).
7
+
8
+ ## 37.0.2 - 2025-03-05
9
+ ### Fixed
10
+ * Another fix for using --help and load plugins correctly [#4465](https://github.com/sitespeedio/sitespeed.io/pull/4465).
11
+
4
12
  ## 37.0.1 - 2025-03-05
5
13
  ### Fixed
6
14
  * There was a bug in the InfluxDB plugin and loading the cli parameters failed [#4463](https://github.com/sitespeedio/sitespeed.io/pull/4463).
7
15
 
8
-
9
16
  ## 37.0.0 - 2025-03-05
10
17
  ### Breaking change
11
18
  * If you are a InfluxDB user the InfluxDB functionality been moved to a standalone plugin [plugin-influxdb](https://github.com/sitespeedio/plugin-influxdb). This means if that sitespeed.io using NodeJS and the default Docker container will not include the InfluxDB plugin. The +1 container will still include the plugin but you need to add it with `--plugins.add @sitespeed.io/plugin-influxdb` for it to be able to run.
@@ -11,16 +11,24 @@ export async function registerPluginOptions(yargsInstance, plugins) {
11
11
  for (const pluginName of plugins) {
12
12
  try {
13
13
  // Dynamically import the plugin
14
- let { default: plugin } = await importGlobalSilent(pluginName);
14
+ let plugin = await importGlobalSilent(pluginName);
15
15
  // If the plugin exports a function to get CLI options, merge them
16
- if (plugin && typeof plugin.getCliOptions === 'function') {
17
- const options = plugin.getCliOptions();
16
+ if (
17
+ plugin &&
18
+ plugin.default &&
19
+ typeof plugin.default.getCliOptions === 'function'
20
+ ) {
21
+ const options = plugin.default.getCliOptions();
18
22
  yargsInstance.options(options);
19
23
  } else {
20
24
  try {
21
- const { default: plugin } = await import(pluginName);
22
- if (plugin && typeof plugin.getCliOptions === 'function') {
23
- const options = plugin.getCliOptions();
25
+ const plugin = await import(pluginName);
26
+ if (
27
+ plugin &&
28
+ plugin.default &&
29
+ typeof plugin.default.getCliOptions === 'function'
30
+ ) {
31
+ const options = plugin.default.getCliOptions();
24
32
  yargsInstance.options(options);
25
33
  }
26
34
  } catch {
@@ -82,9 +82,9 @@ export async function loadPlugins(pluginNames, options, context, queue) {
82
82
  } catch (error) {
83
83
  // try global
84
84
  try {
85
- let { default: plugin } = await importGlobalSilent(name);
85
+ const plugin = await importGlobalSilent(name);
86
86
  if (plugin) {
87
- let p = new plugin(options, context, queue);
87
+ let p = new plugin.default(options, context, queue);
88
88
  plugins.push(p);
89
89
  } else {
90
90
  console.error("Couldn't load plugin %s: %s", name, error_);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sitespeed.io",
3
- "version": "37.0.1",
3
+ "version": "37.0.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sitespeed.io",
9
- "version": "37.0.1",
9
+ "version": "37.0.3",
10
10
  "hasInstallScript": true,
11
11
  "license": "MIT",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "sitespeed.io": "./bin/sitespeed.js",
6
6
  "sitespeed.io-wpr": "./bin/browsertimeWebPageReplay.js"
7
7
  },
8
- "version": "37.0.1",
8
+ "version": "37.0.3",
9
9
  "description": "sitespeed.io is an open-source tool for comprehensive web performance analysis, enabling you to test, monitor, and optimize your website’s speed using real browsers in various environments.",
10
10
  "keywords": [
11
11
  "performance",