@smapiot/pilet-template-angular 1.0.3 → 1.0.4

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
@@ -24,7 +24,7 @@ npm init pilet -- --source <app-shell> --template angular <other-options>
24
24
  The following variables are available when scaffolding. They can be applied via the CLI flags, e.g.,
25
25
 
26
26
  ```sh
27
- pilet new <app-shell> --template angular --vars.standalone true --vars.ngVersion 14
27
+ pilet new <app-shell> --template angular --vars.standalone true --vars.ngVersion 16
28
28
  ```
29
29
 
30
30
  For this template we have:
package/lib/index.js CHANGED
@@ -1426,14 +1426,14 @@ function detectNgVersion(piralInstance) {
1426
1426
  const dependencies = ((_a = piralInstance == null ? void 0 : piralInstance.details) == null ? void 0 : _a.dependencies) || {};
1427
1427
  const devDependencies = ((_b = piralInstance == null ? void 0 : piralInstance.details) == null ? void 0 : _b.devDependencies) || {};
1428
1428
  const allDependencies = __spreadValues(__spreadValues({}, devDependencies), dependencies);
1429
- const version = allDependencies["@angular/core"] || "14.0.0";
1429
+ const version = allDependencies["@angular/core"] || "16.0.0";
1430
1430
  if (typeof version === "string") {
1431
1431
  const result = /\d+/.exec(version);
1432
1432
  if (result) {
1433
1433
  return +result[0];
1434
1434
  }
1435
1435
  }
1436
- return 14;
1436
+ return 16;
1437
1437
  }
1438
1438
  function isKnownVersion(majorNgVersion) {
1439
1439
  return typeof zoneVersions[majorNgVersion] !== "undefined";
@@ -1504,7 +1504,7 @@ var src_default = (0, import_template_utils.createPiletTemplateFactory)(root, (p
1504
1504
  }
1505
1505
  if (args.ngVersion < 9) {
1506
1506
  (0, import_template_utils.log)("warn", `Angular version ${args.ngVersion} is not officially supported. It might not work.`);
1507
- } else if (isKnownVersion(args.ngVersion)) {
1507
+ } else if (!isKnownVersion(args.ngVersion)) {
1508
1508
  (0, import_template_utils.log)("warn", `Angular version ${args.ngVersion} is not known and therefore not yet officially supported. It might not work.`);
1509
1509
  }
1510
1510
  const ngVersion = `^${args.ngVersion}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smapiot/pilet-template-angular",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Official scaffolding template for pilets: 'angular'.",
5
5
  "keywords": [
6
6
  "piral-cli",
@@ -54,7 +54,7 @@
54
54
  "test": "echo \"Error: run tests from root\" && exit 1"
55
55
  },
56
56
  "devDependencies": {
57
- "@smapiot/template-utils": "^1.0.3"
57
+ "@smapiot/template-utils": "^1.0.4"
58
58
  },
59
- "gitHead": "6fd3837caf7f3a9192fe768827ba673170bb6c6e"
59
+ "gitHead": "766d11d13233d2e7adf584a2c9ba85a11f5691fb"
60
60
  }
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'] || '14.0.0';
14
+ const version = allDependencies['@angular/core'] || '16.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 14;
25
+ return 16;
26
26
  }
27
27
 
28
28
  export function isKnownVersion(majorNgVersion: number) {
package/src/index.ts CHANGED
@@ -25,7 +25,7 @@ export default createPiletTemplateFactory<AngularPiletArgs>(root, (projectRoot,
25
25
 
26
26
  if (args.ngVersion < 9) {
27
27
  log('warn', `Angular version ${args.ngVersion} is not officially supported. It might not work.`);
28
- } else if (isKnownVersion(args.ngVersion)) {
28
+ } else if (!isKnownVersion(args.ngVersion)) {
29
29
  log('warn', `Angular version ${args.ngVersion} is not known and therefore not yet officially supported. It might not work.`);
30
30
  }
31
31