@code-pushup/core 0.21.1 → 0.22.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/README.md CHANGED
@@ -1,4 +1,8 @@
1
- # @code-pushup/core [![npm](https://img.shields.io/npm/v/%40code-pushup%2Fcore.svg)](https://www.npmjs.com/package/%40code-pushup%2Fcore)
1
+ # @code-pushup/core
2
+
3
+ [![npm](https://img.shields.io/npm/v/%40code-pushup%2Fcore.svg)](https://www.npmjs.com/package/@code-pushup/core)
4
+ [![downloads](https://img.shields.io/npm/dm/%40code-pushup%2Fcore)](https://npmtrends.com/@code-pushup/core)
5
+ [![dependencies](https://img.shields.io/librariesio/release/npm/%40code-pushup/core)](https://www.npmjs.com/package/@code-pushup/core?activeTab=dependencies)
2
6
 
3
7
  🔎🔬 **Quality metrics for your software project.** 📉🔍
4
8
 
package/index.js CHANGED
@@ -1541,7 +1541,7 @@ var verboseUtils = (verbose = false) => ({
1541
1541
 
1542
1542
  // packages/core/package.json
1543
1543
  var name = "@code-pushup/core";
1544
- var version = "0.21.1";
1544
+ var version = "0.22.3";
1545
1545
 
1546
1546
  // packages/core/src/lib/implementation/execute-plugin.ts
1547
1547
  import chalk5 from "chalk";
@@ -1786,17 +1786,17 @@ var ConfigPathError = class extends Error {
1786
1786
  super(`Provided path '${configPath}' is not valid.`);
1787
1787
  }
1788
1788
  };
1789
- async function readRcByPath(filepath) {
1789
+ async function readRcByPath(filepath, tsconfig) {
1790
1790
  if (filepath.length === 0) {
1791
1791
  throw new Error("The path to the configuration file is empty.");
1792
1792
  }
1793
1793
  if (!await fileExists(filepath)) {
1794
1794
  throw new ConfigPathError(filepath);
1795
1795
  }
1796
- const cfg = await importEsmModule({ filepath });
1796
+ const cfg = await importEsmModule({ filepath, tsconfig });
1797
1797
  return coreConfigSchema.parse(cfg);
1798
1798
  }
1799
- async function autoloadRc() {
1799
+ async function autoloadRc(tsconfig) {
1800
1800
  let ext = "";
1801
1801
  for (const extension of SUPPORTED_CONFIG_FILE_FORMATS) {
1802
1802
  const path = `${CONFIG_FILE_NAME}.${extension}`;
@@ -1813,7 +1813,10 @@ async function autoloadRc() {
1813
1813
  )}) present in ${process.cwd()}`
1814
1814
  );
1815
1815
  }
1816
- return readRcByPath(join5(process.cwd(), `${CONFIG_FILE_NAME}.${ext}`));
1816
+ return readRcByPath(
1817
+ join5(process.cwd(), `${CONFIG_FILE_NAME}.${ext}`),
1818
+ tsconfig
1819
+ );
1817
1820
  }
1818
1821
 
1819
1822
  // packages/core/src/lib/upload.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/core",
3
- "version": "0.21.1",
3
+ "version": "0.22.3",
4
4
  "license": "MIT",
5
5
  "dependencies": {
6
6
  "@code-pushup/models": "*",
@@ -2,5 +2,5 @@ import { CoreConfig } from '@code-pushup/models';
2
2
  export declare class ConfigPathError extends Error {
3
3
  constructor(configPath: string);
4
4
  }
5
- export declare function readRcByPath(filepath: string): Promise<CoreConfig>;
6
- export declare function autoloadRc(): Promise<CoreConfig>;
5
+ export declare function readRcByPath(filepath: string, tsconfig?: string): Promise<CoreConfig>;
6
+ export declare function autoloadRc(tsconfig?: string): Promise<CoreConfig>;