Skip to content

Commit c22b054

Browse files
committed
progress
1 parent d15bec2 commit c22b054

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

sdk/src/scripts/debug-sync.mts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,13 @@ const cleanupViteEntries = async (targetDir: string) => {
7272
};
7373

7474
const performFullSync = async (sdkDir: string, targetDir: string) => {
75-
const sdkPackageJsonPath = path.join(sdkDir, "package.json");
76-
let originalSdkPackageJson: string | null = null;
7775
let tarballPath = "";
7876
let tarballName = "";
7977

8078
// Clean up vite cache
8179
await cleanupViteEntries(targetDir);
8280

8381
try {
84-
try {
85-
originalSdkPackageJson = await fs.readFile(sdkPackageJsonPath, "utf-8");
86-
const packageJson = JSON.parse(originalSdkPackageJson);
87-
const originalVersion = packageJson.version;
88-
const timestamp = new Date()
89-
.toISOString()
90-
.replace(/[-:T.]/g, "")
91-
.slice(0, 14);
92-
const newVersion = `${originalVersion}+build.${timestamp}`;
93-
console.log(`Temporarily setting version to ${newVersion}`);
94-
packageJson.version = newVersion;
95-
await fs.writeFile(
96-
sdkPackageJsonPath,
97-
JSON.stringify(packageJson, null, 2),
98-
);
99-
} catch (e) {
100-
console.warn(
101-
"Could not modify package.json version, proceeding without it.",
102-
);
103-
originalSdkPackageJson = null; // don't restore if we failed to modify
104-
}
10582
console.log("📦 Packing SDK...");
10683
const packResult = await $({ cwd: sdkDir })`npm pack --json`;
10784
const json = JSON.parse(packResult.stdout || "[]");
@@ -180,10 +157,6 @@ const performFullSync = async (sdkDir: string, targetDir: string) => {
180157
}
181158
}
182159
} finally {
183-
if (originalSdkPackageJson) {
184-
console.log("Restoring package.json...");
185-
await fs.writeFile(sdkPackageJsonPath, originalSdkPackageJson);
186-
}
187160
if (tarballPath) {
188161
console.log("Removing tarball...");
189162
await fs.unlink(tarballPath).catch(() => {

0 commit comments

Comments
 (0)