"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = update;
const devkit_1 = require("@nx/devkit");
async function update(tree) {
    devkit_1.logger.info('🔄 Removing ts-jest from devDependencies...');
    const packageJsonPath = 'package.json';
    if (!tree.exists(packageJsonPath)) {
        devkit_1.logger.warn('⚠️ No package.json found, skipping');
        return;
    }
    let removed = false;
    (0, devkit_1.updateJson)(tree, packageJsonPath, (packageJson) => {
        if (packageJson.devDependencies?.['ts-jest']) {
            delete packageJson.devDependencies['ts-jest'];
            removed = true;
        }
        return packageJson;
    });
    if (removed) {
        devkit_1.logger.info('✅ Removed ts-jest from devDependencies');
    }
    else {
        devkit_1.logger.info('ℹ️ ts-jest not found in devDependencies, skipping');
    }
}
