@smapiot/pilet-template-angular 1.0.13 → 1.0.14

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
@@ -31,7 +31,7 @@ For this template we have:
31
31
 
32
32
  - **src**: Sets the directory of the source files. By default it's `<root>/src`.
33
33
  - **standalone**: Sets if the pilet should be considered standalone, i.e., with Angular provided by the pilet. By default, this is derived from inspecting the used Piral instance (if it contains `piral-ng` then `standalone` would be set to `false`)
34
- - **ngVersion**: Sets the (major) version of Angular to be used in case of a standalone pilet. Otherwise, would be discarded.
34
+ - **ngVersion**: Sets the (major) version of Angular to be used in case of a standalone pilet. Otherwise, would be discarded. By default, Angular 18 is used.
35
35
  - **ngStandalone**: Sets if the Angular components should be configured as standalone in the `@Component` directive. By default, for Angular 19+ this is set to `true`. Otherwise, it will be set to `false`.
36
36
 
37
37
  ## License
package/lib/index.js CHANGED
@@ -1551,14 +1551,14 @@ function detectNgVersion(piralInstance) {
1551
1551
  const dependencies = ((_a = piralInstance == null ? void 0 : piralInstance.details) == null ? void 0 : _a.dependencies) || {};
1552
1552
  const devDependencies = ((_b = piralInstance == null ? void 0 : piralInstance.details) == null ? void 0 : _b.devDependencies) || {};
1553
1553
  const allDependencies = __spreadValues(__spreadValues({}, devDependencies), dependencies);
1554
- const version = allDependencies["@angular/core"] || "17.0.0";
1554
+ const version = allDependencies["@angular/core"] || "18.0.0";
1555
1555
  if (typeof version === "string") {
1556
1556
  const result = /\d+/.exec(version);
1557
1557
  if (result) {
1558
1558
  return +result[0];
1559
1559
  }
1560
1560
  }
1561
- return 17;
1561
+ return 18;
1562
1562
  }
1563
1563
  function isKnownVersion(majorNgVersion) {
1564
1564
  return typeof zoneVersions[majorNgVersion] !== "undefined";
@@ -1585,9 +1585,9 @@ function getStandalonePackageJson(cliVersion, ngVersion, majorNgVersion) {
1585
1585
  "@angular/router": ngVersion,
1586
1586
  "piral-ng": cliVersion,
1587
1587
  "piral-ng-common": ngVersion,
1588
- "core-js": "^3.19.0",
1588
+ "core-js": "^3",
1589
1589
  rxjs: rxjsVersions[majorNgVersion] || "^7.4",
1590
- "zone.js": zoneVersions[majorNgVersion] || "^0.13"
1590
+ "zone.js": zoneVersions[majorNgVersion] || "^0.14"
1591
1591
  },
1592
1592
  devDependencies: {
1593
1593
  "@angular/compiler-cli": ngVersion,
@@ -1637,7 +1637,7 @@ var src_default = (0, import_template_utils.createPiletTemplateFactory)(root, (p
1637
1637
  args.ngStandalone = false;
1638
1638
  }
1639
1639
  if (typeof args.ngStandalone === "undefined") {
1640
- args.standalone = args.ngVersion > 18;
1640
+ args.ngStandalone = args.ngVersion > 18;
1641
1641
  }
1642
1642
  const ngVersion = `^${args.ngVersion}`;
1643
1643
  const packageJson = args.standalone ? getStandalonePackageJson(details.cliVersion, ngVersion, args.ngVersion) : getStandardPackageJson(details.cliVersion, ngVersion, args.ngVersion);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/pilet-template-angular",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "Official scaffolding template for pilets: 'angular'.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "ngVersion": {
31
31
  "description": "Defines the (major) version of Angular to use in case of a standalone pilet.",
32
- "default": 17,
32
+ "default": 18,
33
33
  "type": "number"
34
34
  }
35
35
  },
@@ -59,7 +59,7 @@
59
59
  "test": "echo \"Error: run tests from root\" && exit 1"
60
60
  },
61
61
  "devDependencies": {
62
- "@smapiot/template-utils": "^1.0.13"
62
+ "@smapiot/template-utils": "^1.0.14"
63
63
  },
64
- "gitHead": "efbd945e96f5858ade623f674630ea2ab464b39e"
64
+ "gitHead": "538acc0e1ddec56fffadc1d441964295eec7a0dd"
65
65
  }
package/src/helpers.ts CHANGED
@@ -11,7 +11,7 @@ export function detectNgVersion(piralInstance: { details: any }) {
11
11
  const dependencies = piralInstance?.details?.dependencies || {};
12
12
  const devDependencies = piralInstance?.details?.devDependencies || {};
13
13
  const allDependencies = { ...devDependencies, ...dependencies };
14
- const version = allDependencies['@angular/core'] || '17.0.0';
14
+ const version = allDependencies['@angular/core'] || '18.0.0';
15
15
 
16
16
  if (typeof version === 'string') {
17
17
  const result = /\d+/.exec(version);
@@ -22,7 +22,7 @@ export function detectNgVersion(piralInstance: { details: any }) {
22
22
  }
23
23
  }
24
24
 
25
- return 17;
25
+ return 18;
26
26
  }
27
27
 
28
28
  export function isKnownVersion(majorNgVersion: number) {
@@ -51,9 +51,9 @@ export function getStandalonePackageJson(cliVersion: string, ngVersion: string,
51
51
  '@angular/router': ngVersion,
52
52
  'piral-ng': cliVersion,
53
53
  'piral-ng-common': ngVersion,
54
- 'core-js': '^3.19.0',
54
+ 'core-js': '^3',
55
55
  rxjs: rxjsVersions[majorNgVersion] || '^7.4',
56
- 'zone.js': zoneVersions[majorNgVersion] || '^0.13',
56
+ 'zone.js': zoneVersions[majorNgVersion] || '^0.14',
57
57
  },
58
58
  devDependencies: {
59
59
  '@angular/compiler-cli': ngVersion,
package/src/index.ts CHANGED
@@ -44,7 +44,7 @@ export default createPiletTemplateFactory<AngularPiletArgs>(root, (projectRoot,
44
44
  }
45
45
 
46
46
  if (typeof args.ngStandalone === 'undefined') {
47
- args.standalone = args.ngVersion > 18;
47
+ args.ngStandalone = args.ngVersion > 18;
48
48
  }
49
49
 
50
50
  const ngVersion = `^${args.ngVersion}`;
@@ -1,7 +1,8 @@
1
1
  import 'core-js/proposals/reflect-metadata';
2
+ import 'zone.js';
2
3
  import { createConverter } from 'piral-ng/standalone';
3
4
  import { provideRouter } from '@angular/router';
4
- import { provideExperimentalZonelessChangeDetection, type ApplicationConfig } from '@angular/core';
5
+ import type { ApplicationConfig } from '@angular/core';
5
6
  import type { PiletApi } from '<%- sourceName %>';
6
7
  <% if (plugins.menu) { -%>
7
8
  import { MenuComponent } from './app/menu.component';
@@ -10,10 +11,9 @@ import { PageComponent } from './app/page.component';
10
11
 
11
12
  const appConfig: ApplicationConfig = {
12
13
  providers: [
13
- provideExperimentalZonelessChangeDetection(),
14
14
  provideRouter([
15
15
  {
16
- path: "sample",
16
+ path: 'sample',
17
17
  component: PageComponent,
18
18
  },
19
19
  ]),