@code-pushup/typescript-plugin 0.90.0 → 0.91.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.
package/README.md CHANGED
@@ -39,19 +39,19 @@ TypeScript compiler diagnostics are mapped to Code PushUp audits in the followin
39
39
 
40
40
  3. Add this plugin to the `plugins` array in your Code PushUp CLI config file (e.g. `code-pushup.config.ts`).
41
41
 
42
- By default, a root `tsconfig.json` is used to compile your codebase. Based on those compiler options, the plugin will generate audits.
43
-
44
- ```ts
45
- import typescriptPlugin from '@code-pushup/typescript-plugin';
46
-
47
- export default {
48
- // ...
49
- plugins: [
50
- // ...
51
- await typescriptPlugin(),
52
- ],
53
- };
54
- ```
42
+ By default, a root `tsconfig.json` is used to compile your codebase. Based on those compiler options, the plugin will generate audits.
43
+
44
+ ```ts
45
+ import typescriptPlugin from '@code-pushup/typescript-plugin';
46
+
47
+ export default {
48
+ // ...
49
+ plugins: [
50
+ // ...
51
+ typescriptPlugin(),
52
+ ],
53
+ };
54
+ ```
55
55
 
56
56
  4. Run the CLI with `npx code-pushup collect` and view or upload the report (refer to [CLI docs](../cli/README.md)).
57
57
 
@@ -94,7 +94,7 @@ The plugin accepts the following parameters:
94
94
  Optional parameter. The `tsconfig` option accepts a string that defines the path to your config file and defaults to `tsconfig.json`.
95
95
 
96
96
  ```js
97
- await typescriptPlugin({
97
+ typescriptPlugin({
98
98
  tsconfig: './tsconfig.json',
99
99
  });
100
100
  ```
@@ -104,7 +104,7 @@ await typescriptPlugin({
104
104
  The `onlyAudits` option allows you to specify which documentation types you want to measure. Only the specified audits will be included in the results. All audits are included by default. Example:
105
105
 
106
106
  ```js
107
- await typescriptPlugin({
107
+ typescriptPlugin({
108
108
  onlyAudits: ['no-implicit-any'],
109
109
  });
110
110
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/typescript-plugin",
3
- "version": "0.90.0",
3
+ "version": "0.91.0",
4
4
  "license": "MIT",
5
5
  "description": "Code PushUp plugin for incrementally adopting strict compilation flags in TypeScript projects",
6
6
  "homepage": "https://github.com/code-pushup/cli/tree/main/packages/plugin-typescript#readme",
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "type": "module",
25
25
  "dependencies": {
26
- "@code-pushup/models": "0.90.0",
27
- "@code-pushup/utils": "0.90.0",
26
+ "@code-pushup/models": "0.91.0",
27
+ "@code-pushup/utils": "0.91.0",
28
28
  "zod": "^4.0.5"
29
29
  },
30
30
  "peerDependencies": {
@@ -1,3 +1,3 @@
1
1
  import { type PluginConfig } from '@code-pushup/models';
2
2
  import { type TypescriptPluginOptions } from './schema.js';
3
- export declare function typescriptPlugin(options?: TypescriptPluginOptions): Promise<PluginConfig>;
3
+ export declare function typescriptPlugin(options?: TypescriptPluginOptions): PluginConfig;
@@ -6,7 +6,7 @@ import { createRunnerFunction } from './runner/runner.js';
6
6
  import { typescriptPluginConfigSchema, } from './schema.js';
7
7
  import { getAudits, getGroups, logSkippedAudits } from './utils.js';
8
8
  const packageJson = createRequire(import.meta.url)('../../package.json');
9
- export async function typescriptPlugin(options) {
9
+ export function typescriptPlugin(options) {
10
10
  const { tsconfig = DEFAULT_TS_CONFIG, onlyAudits, scoreTargets, } = parseOptions(options ?? {});
11
11
  const filteredAudits = getAudits({ onlyAudits });
12
12
  const filteredGroups = getGroups({ onlyAudits });
@@ -1 +1 @@
1
- {"version":3,"file":"typescript-plugin.js","sourceRoot":"","sources":["../../../src/lib/typescript-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAqB,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC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