Finish changes for Npm loading changes

This commit is contained in:
Grahame Grieve 2023-06-24 09:05:14 +10:00
parent 2f253f3457
commit 3570bcb07f
2 changed files with 5 additions and 8 deletions

View File

@ -496,17 +496,17 @@ public class CorePackageVersionConvertor {
try {
cnt = conv.convert(cnt);
} catch (Exception e) {
throw new Exception("Error processing "+folder.getName()+"/"+s+": "+e.getMessage(), e);
throw new Exception("Error processing "+folder.getFolderName()+"/"+s+": "+e.getMessage(), e);
}
} else {
// nothing
}
}
if (cnt != null) {
dst.addFile(folder.getName(), s, cnt, null);
dst.addFile(folder.getFolderName(), s, cnt, null);
}
} else {
dst.addFile(folder.getName(), s, cnt, null);
dst.addFile(folder.getFolderName(), s, cnt, null);
}
}
}

View File

@ -81,10 +81,7 @@ public class PackageCacheTests {
Assertions.assertEquals(uscore.list("package").size(), uscoreMin.list("package").size());
byte[] b1 = TextFile.streamToBytes(uscore.load(uscore.list("package").get(1)));
byte[] b2 = TextFile.streamToBytes(uscoreMin.load(uscore.list("package").get(1)));
// TextFile.bytesToFile(b1, "/Users/grahamegrieve/temp/b1.json");
// TextFile.bytesToFile(b2, "/Users/grahamegrieve/temp/b2.json");
Assertions.assertArrayEquals(b1, b2);
}
}