Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cmf-cli/Commands/new/HTMLCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,15 @@ public void ExecuteV10(IDirectoryInfo workingDir, string version)
rootPkgJson.devDependencies["cross-env"] = "^10.1.0";
}

rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --disable-host-check --port 7000";

if (mesVersion.Major < 12)
{
rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --disable-host-check --port 7000";
}
else
{
rootPkgJson.scripts["serve"] = "cross-env NODE_OPTIONS=--max-old-space-size=8192 npm run start -- --host 0.0.0.0 --port 7000";
Comment thread
pedroapap marked this conversation as resolved.
}

if (ExecutionContext.Instance.ProjectConfig.RepositoryType == RepositoryType.App)
{
Expand Down
41 changes: 33 additions & 8 deletions cmf-cli/services/DependencyVersionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,54 @@ public class DependencyVersionService : IDependencyVersionService
{
public const string NET6TARGETFRAMEWORK = "net6.0";
public const string NET8TARGETFRAMEWORK = "net8.0";
public const string NET10TARGETFRAMEWORK = "net10.0";
public const string NET6SDK = "6.0.201"; // avoid >2xx as it requires HTTPS for nuget pulls
public const string NET8SDK = "8.0.301";
public const string NET10SDK = "10.0.301";
public const string NODE24 = "24";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to change this to node 26 probably.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the UI already in node 26? The migration on IoT was put on hold, if I'm not mistaken.

public const string NODE20 = "20";
public const string NODE18 = "18";
public const string NG15 = "15.2.1";
public const string NG17 = "17.2.1";
public const string NG21 = "21.1.0";
Comment thread
pedroapap marked this conversation as resolved.
public const string NG22 = "22.1.2";
public const string NG15_ZONE = "0.12.0";
public const string NG17_ZONE = "0.14.3";
public const string NG21_ZONE = "0.16.0";
public const string NG22_ZONE = "0.16.2";
public const string NG15_TSESLINT = "5.44.0";
public const string NG17_TSESLINT = "6.10.0";
public const string NG21_TSESLINT = "8.52.0";
public const string NG22_TSESLINT = "8.67.0";
public const string NG15_ESLINT = "8.28.0";
public const string NG17_ESLINT = "8.53.0";
public const string NG21_ESLINT = "9.39.2";
public const string NG22_ESLINT = "10.8.1";
public const string NG15_TS = "4.8.4";
public const string NG17_TS = "5.3.3";
public const string NG21_TS = "5.9.3";
public const string NG22_TS = "6.0.3";

public string DotNetSdk(NuGetVersion productVersion) => productVersion.Major >= 11 ? NET8SDK : NET6SDK;
public string DotNetTargetFramework(NuGetVersion productVersion) => productVersion.Major >= 11 ? NET8TARGETFRAMEWORK : NET6TARGETFRAMEWORK;
public string Node(SemanticVersion productVersion) => productVersion.Major >= 11 ? NODE20 : NODE18;
public string DotNetSdk(NuGetVersion productVersion) =>
productVersion.Major >= 12
? NET10SDK
: productVersion.Major >= 11
? NET8SDK
: NET6SDK;

public string DotNetTargetFramework(NuGetVersion productVersion) =>
productVersion.Major >= 12
? NET10TARGETFRAMEWORK
: productVersion.Major >= 11
? NET8TARGETFRAMEWORK
: NET6TARGETFRAMEWORK;

public string Node(SemanticVersion productVersion) =>
productVersion.Major >= 12
? NODE24
: productVersion.Major >= 11
? NODE20
: NODE18;

public AngularDeps Angular(SemanticVersion productVersion) =>
productVersion.Major switch
Expand All @@ -105,11 +130,11 @@ public AngularDeps Angular(SemanticVersion productVersion) =>
},
12 => new AngularDeps()
{
CLI = Version.Parse(NG21),
Comment thread
pedroapap marked this conversation as resolved.
Zone = NG21_ZONE,
Typescript = NG21_TS,
ESLint = NG21_ESLINT,
TSESLint = NG21_TSESLINT
CLI = Version.Parse(NG22),
Zone = NG22_ZONE,
Typescript = NG22_TS,
ESLint = NG22_ESLINT,
TSESLint = NG22_TSESLINT
},
_ => throw new NotSupportedException($"No Angular dependencies defined for MES version {productVersion}")
};
Expand Down
Loading