@ng-prism/plugin-perf 22.4.1 → 22.6.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.
@@ -1,4 +1,5 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import type { PerfPluginOptions } from './perf.types.js';
3
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. Nothing provides it either. */
3
4
  export declare const PERF_PLUGIN_CONFIG: InjectionToken<PerfPluginOptions>;
4
5
  //# sourceMappingURL=perf-config.token.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"perf-config.token.d.ts","sourceRoot":"","sources":["../src/perf-config.token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,eAAO,MAAM,kBAAkB,mCAA8D,CAAC"}
1
+ {"version":3,"file":"perf-config.token.d.ts","sourceRoot":"","sources":["../src/perf-config.token.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wIAAwI;AACxI,eAAO,MAAM,kBAAkB,mCAA8D,CAAC"}
@@ -1,2 +1,3 @@
1
1
  import { InjectionToken } from '@angular/core';
2
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. Nothing provides it either. */
2
3
  export const PERF_PLUGIN_CONFIG = new InjectionToken('PERF_PLUGIN_CONFIG');
@@ -1 +1 @@
1
- {"version":3,"file":"perf-plugin.browser.d.ts","sourceRoot":"","sources":["../src/perf-plugin.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,aAAa,CActE"}
1
+ {"version":3,"file":"perf-plugin.browser.d.ts","sourceRoot":"","sources":["../src/perf-plugin.browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,UAAU,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAatE"}
@@ -7,7 +7,6 @@ export function perfPlugin(_options) {
7
7
  label: 'Performance',
8
8
  icon: 'activity',
9
9
  loadComponent: () => import('./perf-panel.component.js').then((m) => m.PerfPanelComponent),
10
- position: 'bottom',
11
10
  placement: 'addon'
12
11
  }
13
12
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"perf-plugin.d.ts","sourceRoot":"","sources":["../src/perf-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CA4BrE"}
1
+ {"version":3,"file":"perf-plugin.d.ts","sourceRoot":"","sources":["../src/perf-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,wBAAgB,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,aAAa,CA6BrE"}
@@ -1,5 +1,6 @@
1
1
  import { scanBundle } from './bundle/bundle-scanner.js';
2
2
  export function perfPlugin(options) {
3
+ warnAboutDeprecatedOptions(options);
3
4
  return {
4
5
  name: '@ng-prism/plugin-perf',
5
6
  async onComponentScanned(component) {
@@ -19,9 +20,20 @@ export function perfPlugin(options) {
19
20
  {
20
21
  id: 'perf',
21
22
  label: 'Performance',
22
- loadComponent: () => import('./perf-panel.component.js').then((m) => m.PerfPanelComponent),
23
- position: 'bottom'
23
+ loadComponent: () => import('./perf-panel.component.js').then((m) => m.PerfPanelComponent)
24
24
  }
25
25
  ]
26
26
  };
27
27
  }
28
+ /** Runs in the builder only: the browser entry has its own factory. */
29
+ function warnAboutDeprecatedOptions(options) {
30
+ const deprecated = [
31
+ options?.thresholds !== undefined && 'thresholds',
32
+ options?.bundle?.excludeImports !== undefined && 'bundle.excludeImports',
33
+ options?.render !== undefined && 'render',
34
+ options?.memory !== undefined && 'memory'
35
+ ].filter((option) => option !== false);
36
+ for (const option of deprecated) {
37
+ console.warn(`⚠ ng-prism: perfPlugin() option "${option}" is deprecated and will be removed in 23.0.0. It has never had an effect; remove it.`);
38
+ }
39
+ }
@@ -14,15 +14,20 @@ export interface PerfThresholds {
14
14
  memoryLeakMb: number;
15
15
  }
16
16
  export interface PerfPluginOptions {
17
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. The panel uses the built-in thresholds. */
17
18
  thresholds?: Partial<PerfThresholds>;
18
19
  bundle?: {
20
+ /** How deep the import tree of a component is followed. Default: 5. */
19
21
  maxTreeDepth?: number;
22
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. */
20
23
  excludeImports?: string[];
21
24
  };
25
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. */
22
26
  render?: {
23
27
  bufferSize?: number;
24
28
  autoStart?: boolean;
25
29
  };
30
+ /** @deprecated Deprecated since 22.6.0, removed in 23.0.0. It has never had an effect: nothing reads it. */
26
31
  memory?: {
27
32
  gcDelayMs?: number;
28
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"perf.types.d.ts","sourceRoot":"","sources":["../src/perf.types.ts"],"names":[],"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ACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,iBAAiB;IAC9B,oJAAoJ;IACpJ,UAAU,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACrC,MAAM,CAAC,EAAE;QACL,uEAAuE;QACvE,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,4GAA4G;QAC5G,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7B,CAAC;IACF,4GAA4G;IAC5G,MAAM,CAAC,EAAE;QACL,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;KACvB,CAAC;IACF,4GAA4G;IAC5G,MAAM,CAAC,EAAE;QACL,SAAS,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACL;AAED,eAAO,MAAM,kBAAkB,EAAE,cAOhC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-prism/plugin-perf",
3
- "version": "22.4.1",
3
+ "version": "22.6.0",
4
4
  "description": "Performance profiling panel for ng-prism: bundle size, render time, memory footprint.",
5
5
  "ng-add": {
6
6
  "save": "devDependencies"
@@ -36,7 +36,7 @@
36
36
  "peerDependencies": {
37
37
  "@angular/core": ">=20.0.0",
38
38
  "typescript": ">=5.0.0",
39
- "@ng-prism/core": "^22.4.1-0",
39
+ "@ng-prism/core": "^22.6.0-0",
40
40
  "@angular-devkit/schematics": ">=20.0.0"
41
41
  },
42
42
  "devDependencies": {