lighthouse 11.0.0-dev.20230904 → 11.0.0-dev.20230905

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/cli/bin.js CHANGED
@@ -28,7 +28,7 @@ import * as Printer from './printer.js';
28
28
  import {getFlags} from './cli-flags.js';
29
29
  import {runLighthouse} from './run.js';
30
30
  import {askPermission} from './sentry-prompt.js';
31
- import {LH_ROOT} from '../root.js';
31
+ import {LH_ROOT} from '../shared/root.js';
32
32
  import {Sentry} from '../core/lib/sentry.js';
33
33
 
34
34
  const pkg = JSON.parse(fs.readFileSync(LH_ROOT + '/package.json', 'utf-8'));
package/cli/cli-flags.js CHANGED
@@ -12,7 +12,7 @@ import path from 'path';
12
12
  import yargs from 'yargs';
13
13
  import * as yargsHelpers from 'yargs/helpers';
14
14
 
15
- import {LH_ROOT} from '../root.js';
15
+ import {LH_ROOT} from '../shared/root.js';
16
16
  import {isObjectOfUnknownValues} from '../shared/type-verifiers.js';
17
17
 
18
18
  /**
@@ -23,7 +23,7 @@ import log from 'lighthouse-logger';
23
23
 
24
24
  import {runSmokehouse, getShardedDefinitions} from '../smokehouse.js';
25
25
  import {updateTestDefnFormat} from './back-compat-util.js';
26
- import {LH_ROOT} from '../../../../root.js';
26
+ import {LH_ROOT} from '../../../../shared/root.js';
27
27
  import exclusions from '../config/exclusions.js';
28
28
  import {saveArtifacts} from '../../../../core/lib/asset-saver.js';
29
29
  import {saveLhr} from '../../../../core/lib/asset-saver.js';
@@ -19,7 +19,7 @@ import {once} from 'events';
19
19
  import puppeteer from 'puppeteer-core';
20
20
  import * as ChromeLauncher from 'chrome-launcher';
21
21
 
22
- import {LH_ROOT} from '../../../../root.js';
22
+ import {LH_ROOT} from '../../../../shared/root.js';
23
23
  import {loadArtifacts, saveArtifacts} from '../../../../core/lib/asset-saver.js';
24
24
 
25
25
  // This runs only in the worker. The rest runs on the main thread.
@@ -20,7 +20,7 @@ import log from 'lighthouse-logger';
20
20
  import * as assetSaver from '../../../../core/lib/asset-saver.js';
21
21
  import {LocalConsole} from '../lib/local-console.js';
22
22
  import {ChildProcessError} from '../lib/child-process-error.js';
23
- import {LH_ROOT} from '../../../../root.js';
23
+ import {LH_ROOT} from '../../../../shared/root.js';
24
24
 
25
25
  const execFileAsync = promisify(execFile);
26
26
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  import {execFileSync} from 'child_process';
12
12
 
13
- import {LH_ROOT} from '../../../../root.js';
13
+ import {LH_ROOT} from '../../../../shared/root.js';
14
14
  import {testUrlFromDevtools} from '../../../../core/scripts/pptr-run-devtools.js';
15
15
 
16
16
  const devtoolsDir =
@@ -25,7 +25,7 @@ import {EntityClassification} from '../../computed/entity-classification.js';
25
25
  import {JSBundles} from '../../computed/js-bundles.js';
26
26
  import * as i18n from '../../lib/i18n/i18n.js';
27
27
  import {getRequestForScript} from '../../lib/script-helpers.js';
28
- import {LH_ROOT} from '../../../root.js';
28
+ import {LH_ROOT} from '../../../shared/root.js';
29
29
 
30
30
  const graphJson = fs.readFileSync(
31
31
  `${LH_ROOT}/core/audits/byte-efficiency/polyfill-graph-data.json`, 'utf-8');
@@ -17,7 +17,7 @@ import {MetricTraceEvents} from './traces/metric-trace-events.js';
17
17
  import {NetworkAnalysis} from '../computed/network-analysis.js';
18
18
  import {LoadSimulator} from '../computed/load-simulator.js';
19
19
  import {LighthouseError} from '../lib/lh-error.js';
20
- import {LH_ROOT} from '../../root.js';
20
+ import {LH_ROOT} from '../../shared/root.js';
21
21
 
22
22
  const optionsFilename = 'options.json';
23
23
  const artifactsFilename = 'artifacts.json';
@@ -4,7 +4,7 @@
4
4
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
5
5
  */
6
6
 
7
- import {lighthouseVersion} from '../../root.js';
7
+ import {lighthouseVersion} from '../../shared/root.js';
8
8
 
9
9
  const NO_THROTTLING_METRICS = {
10
10
  latency: 0,
@@ -13,7 +13,7 @@ import lookupClosestLocale from 'lookup-closest-locale';
13
13
  import log from 'lighthouse-logger';
14
14
 
15
15
  import {getAvailableLocales} from '../../../shared/localization/format.js';
16
- import {LH_ROOT} from '../../../root.js';
16
+ import {LH_ROOT} from '../../../shared/root.js';
17
17
  import {isIcuMessage, formatMessage, DEFAULT_LOCALE} from '../../../shared/localization/format.js';
18
18
  import {getModulePath} from '../../../shared/esm-utils.js';
19
19
 
package/core/runner.js CHANGED
@@ -19,7 +19,7 @@ import * as assetSaver from './lib/asset-saver.js';
19
19
  import {Sentry} from './lib/sentry.js';
20
20
  import {ReportGenerator} from '../report/generator/report-generator.js';
21
21
  import {LighthouseError} from './lib/lh-error.js';
22
- import {lighthouseVersion} from '../root.js';
22
+ import {lighthouseVersion} from '../shared/root.js';
23
23
  import {getModuleDirectory} from '../shared/esm-utils.js';
24
24
  import {EntityClassification} from './computed/entity-classification.js';
25
25
  import UrlUtils from './lib/url-utils.js';
@@ -20,7 +20,6 @@
20
20
  "**/*.tsx",
21
21
  "./types",
22
22
  "../types/internal/test.d.ts",
23
- "../root.js",
24
23
  "../core/test/test-env/fake-timers.js",
25
24
  ],
26
25
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lighthouse",
3
3
  "type": "module",
4
- "version": "11.0.0-dev.20230904",
4
+ "version": "11.0.0-dev.20230905",
5
5
  "description": "Automated auditing, performance metrics, and best practices for the web.",
6
6
  "main": "./core/index.js",
7
7
  "bin": {
@@ -5,10 +5,11 @@
5
5
  */
6
6
 
7
7
  import fs from 'fs';
8
+ import path from 'path';
8
9
 
9
- import {getModuleDirectory} from './shared/esm-utils.js';
10
+ import {getModuleDirectory} from './esm-utils.js';
10
11
 
11
- const LH_ROOT = getModuleDirectory(import.meta);
12
+ const LH_ROOT = path.dirname(getModuleDirectory(import.meta));
12
13
  const pkg = JSON.parse(fs.readFileSync(`${LH_ROOT}/package.json`, 'utf-8'));
13
14
  const lighthouseVersion = pkg.version;
14
15
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  import fs from 'fs';
9
9
  import fetch from 'node-fetch';
10
- import { LH_ROOT } from '../../root.js';
10
+ import { LH_ROOT } from '../../shared/root.js';
11
11
 
12
12
  const inspectorIssuesGathererPath = LH_ROOT +
13
13
  '/core/gather/gatherers/inspector-issues.js';
@@ -12,7 +12,7 @@ import fs from 'fs';
12
12
  import path from 'path';
13
13
  import { execSync as shell } from 'child_process';
14
14
  import * as utils from './utils.js';
15
- import { LH_ROOT } from '../../root.js';
15
+ import { LH_ROOT } from '../../shared/root.js';
16
16
 
17
17
  const TARGET = 'Release';
18
18
  const CONTENT_SHELL_ZIP = 'content-shell.zip';
package/tsconfig.json CHANGED
@@ -11,7 +11,6 @@
11
11
  {"path": "./treemap/"},
12
12
  ],
13
13
  "include": [
14
- "root.js",
15
14
  "cli/**/*.js",
16
15
  "core/**/*.js",
17
16
  "core/index.cjs",
File without changes