Skip to content

Commit 48c9cf7

Browse files
#1506: added migration (#1507)
Co-authored-by: jan-vcapgemini <59438728+jan-vcapgemini@users.noreply.github.com>
1 parent 1508618 commit 48c9cf7

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Release with new features and bugfixes:
99
* https://github.com/devonfw/IDEasy/issues/907[#907]: Implement ToolCommandlet for Yarn
1010
* https://github.com/devonfw/IDEasy/issues/908[#908]: Get rid of Git error messages when retrieving settings status
1111
* https://github.com/devonfw/IDEasy/issues/1362[#1362]: ide create fails when creating mvn settings-security file
12+
* https://github.com/devonfw/IDEasy/issues/1506[#1506]: Create migration for 2025.10.001 to remove software/npm
1213

1314
The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/35?closed=1[milestone 2025.10.001].
1415

cli/src/main/java/com/devonfw/tools/ide/migration/IdeMigrator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import com.devonfw.tools.ide.context.IdeContext;
66
import com.devonfw.tools.ide.migration.v2025.Mig202502001;
7+
import com.devonfw.tools.ide.migration.v2025.Mig202510001;
78
import com.devonfw.tools.ide.step.Step;
89
import com.devonfw.tools.ide.version.IdeVersion;
910
import com.devonfw.tools.ide.version.VersionIdentifier;
@@ -24,7 +25,7 @@ public class IdeMigrator implements IdeMigration {
2425
public IdeMigrator() {
2526

2627
// migrations must be strictly in ascending order (from oldest to newest version)
27-
this(List.of(new Mig202502001()));
28+
this(List.of(new Mig202502001(), new Mig202510001()));
2829
}
2930

3031
/**
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package com.devonfw.tools.ide.migration.v2025;
2+
3+
import java.nio.file.Path;
4+
5+
import com.devonfw.tools.ide.context.IdeContext;
6+
import com.devonfw.tools.ide.migration.IdeVersionMigration;
7+
8+
/**
9+
* Migration to 2025.10.001. Removes "npm" folder from software path as the {@link com.devonfw.tools.ide.tool.npm.Npm} commandlet has changed entirely so the
10+
* installation of node based tools will now always happen in the "node" software folder.
11+
*/
12+
public class Mig202510001 extends IdeVersionMigration {
13+
14+
/**
15+
* The constructor.
16+
*/
17+
public Mig202510001() {
18+
19+
super("2025.10.001");
20+
}
21+
22+
@Override
23+
public void run(IdeContext context) {
24+
25+
Path softwarePath = context.getSoftwarePath();
26+
if (softwarePath != null) {
27+
Path npm = softwarePath.resolve("npm");
28+
context.getFileAccess().backup(npm);
29+
}
30+
}
31+
32+
}

0 commit comments

Comments
 (0)