diff --git a/package.json b/package.json index 5c8ab1c..5aa0200 100644 --- a/package.json +++ b/package.json @@ -4,5 +4,8 @@ "packageManager": "pnpm@9.5.0", "devDependencies": { "@biomejs/biome": "^1.8.3" + }, + "scripts": { + "startRun": "pnpm -C patch startRun" } } diff --git a/patch/.gitignore b/patch/.gitignore new file mode 100644 index 0000000..76add87 --- /dev/null +++ b/patch/.gitignore @@ -0,0 +1,2 @@ +node_modules +dist \ No newline at end of file diff --git a/patch/LICENSE b/patch/LICENSE new file mode 100644 index 0000000..ff84a5b --- /dev/null +++ b/patch/LICENSE @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/patch/README.md b/patch/README.md new file mode 100644 index 0000000..e576860 --- /dev/null +++ b/patch/README.md @@ -0,0 +1,6 @@ +This codemod helps migrate patch files generated by `patch-package` to a format that complies with pnpm. + + +```shell +pnpx codemod pnpm/patch-convert +``` \ No newline at end of file diff --git a/patch/codemod.yaml b/patch/codemod.yaml new file mode 100644 index 0000000..e742d1d --- /dev/null +++ b/patch/codemod.yaml @@ -0,0 +1,22 @@ +schema_version: "1.0" + +name: "patch-package-to-pnpm" +version: "0.1.0" +description: "Converts patch-package patches to pnpm format by removing node_modules/ prefixes from patch file content and updating package.json/pnpm-workspace.yaml configuration." +author: "Alex Bit , btea" +license: "MIT" +workflow: "workflow.yaml" + + +targets: + languages: ["json", "yaml"] + +keywords: ["pnpm", "migration"] + +registry: + access: "public" + visibility: "public" + +capabilities: + - fs + - path diff --git a/patch/package.json b/patch/package.json new file mode 100644 index 0000000..71f3104 --- /dev/null +++ b/patch/package.json @@ -0,0 +1,17 @@ +{ + "name": "patch-package-to-pnpm", + "version": "0.1.0", + "description": "Transform legacy code patterns", + "type": "module", + "devDependencies": { + "@codemod.com/jssg-types": "^1.0.9", + "@types/node": "20.9.0", + "typescript": "^5.8.3" + }, + "scripts": { + "validate": "pnpx codemod workflow validate -w workflow.yaml", + "startRun": "pnpx codemod workflow run -w workflow.yaml --dry-run", + "test": "pnpx codemod@latest jssg test -l typescript ./src/codemod.ts", + "check-types": "tsc --noEmit" + } +} diff --git a/patch/src/codemod.ts b/patch/src/codemod.ts new file mode 100644 index 0000000..14a363a --- /dev/null +++ b/patch/src/codemod.ts @@ -0,0 +1,49 @@ +import type { Transform, SgRoot, SgNode } from "codemod:ast-grep"; +import type JSON from "codemod:ast-grep/langs/json"; +import type YAML from "codemod:ast-grep/langs/yaml"; +import { access } from "fs/promises"; +import { dirname, join } from "path"; +import { + PATCH_EXTENSION, + PACKAGE_JSON_FILE, + WORKSPACE_YAML_FILE, +} from "./constants.ts"; +import { normalizePath, findWorkspaceRoot } from "./utils/path.ts"; +import { transformPatchFile } from "./transforms/patch-file.ts"; +import { transformPackageJson } from "./transforms/package-json.ts"; +import { transformWorkspaceYaml } from "./transforms/workspace-yaml.ts"; + +const transform: Transform = async (root: SgRoot): Promise => { + const fileName = normalizePath(root.filename()); + + if (fileName.endsWith(PATCH_EXTENSION)) { + return await transformPatchFile(root as SgRoot); + } + + if (fileName.endsWith(PACKAGE_JSON_FILE)) { + const workspaceRoot = await findWorkspaceRoot(fileName); + + try { + const workspaceYamlPath = normalizePath(join(workspaceRoot, WORKSPACE_YAML_FILE)); + await access(workspaceYamlPath); + return null; + } catch { + } + + const packageJsonDir = normalizePath(dirname(fileName)); + const isRoot = packageJsonDir === workspaceRoot; + if (!isRoot) { + return null; + } + + return await transformPackageJson(root.root() as SgNode, root as SgRoot); + } + + if (fileName.endsWith(WORKSPACE_YAML_FILE)) { + return await transformWorkspaceYaml(root as SgRoot); + } + + return null; +}; + +export default transform; diff --git a/patch/src/constants.ts b/patch/src/constants.ts new file mode 100644 index 0000000..f11ee84 --- /dev/null +++ b/patch/src/constants.ts @@ -0,0 +1,28 @@ +export const PATCH_EXTENSION = '.patch'; +export const PACKAGE_JSON_FILE = 'package.json'; +export const WORKSPACE_YAML_FILE = 'pnpm-workspace.yaml'; +export const PATCHES_DIR_NAME = 'patches'; +export const PATCH_PACKAGE_SEPARATOR = '+'; +export const PNPM_NAME_SEPARATOR = '__'; +export const PNPM_VERSION_SEPARATOR = '@'; + +// YAML parsing patterns +export const YAML_PATTERNS = { + PATCHED_DEPS_SECTION: /patchedDependencies:\s*\n((?:\s+['"][^'"]+['"]:\s*['"][^'"]+['"]\n?)*)/, + + PATCHED_DEPS_ENTRY: /['"]([^'"]+)['"]:\s*['"]([^'"]+)['"]/g, +} as const; + +// Patch filename validation +export const PATCH_FILENAME_PATTERNS = { + isPnpmFormat: (filename: string): boolean => { + return filename.includes(PNPM_VERSION_SEPARATOR) && !filename.includes(PATCH_PACKAGE_SEPARATOR); + }, + + isPatchPackageFormat: (filename: string): boolean => { + return filename.includes(PATCH_PACKAGE_SEPARATOR); + }, +} as const; + +export const ERROR_CODE_ENOENT = 'ENOENT'; +export const ERROR_MESSAGE_NOT_FOUND = 'No such file or directory'; \ No newline at end of file diff --git a/patch/src/scanners/patch-scanner.ts b/patch/src/scanners/patch-scanner.ts new file mode 100644 index 0000000..7455178 --- /dev/null +++ b/patch/src/scanners/patch-scanner.ts @@ -0,0 +1,100 @@ +import { readdir, stat } from "fs/promises"; +import { dirname, join } from "path"; +import { PATCH_EXTENSION, PATCHES_DIR_NAME, PATCH_FILENAME_PATTERNS } from "../constants.ts"; +import type { PatchesMap } from "../types.ts"; +import { normalizePath } from "../utils/path.ts"; +import { findWorkspaceRoot } from "../utils/path.ts"; +import { convertPatchFilename, getPatchedDependencyKey } from "../utils/patch-filename.ts"; +import { isNotFoundError } from "../utils/errors.ts"; + +export async function scanForConvertedPatches(patchesDir: string): Promise { + const patches = new Map(); + + try { + const stats = await stat(patchesDir); + if (!stats.isDirectory()) { + return patches; + } + + const files = await readdir(patchesDir); + const dirName = normalizePath(patchesDir.split(/[/\\]/).pop() || PATCHES_DIR_NAME); + + for (const file of files) { + const normalizedFile = normalizePath(file); + + if (!normalizedFile.endsWith(PATCH_EXTENSION)) { + continue; + } + + let pnpmFormatFileName: string; + let key: string; + + // Check if it's already in pnpm format (contains '@' and doesn't contain '+') + if (PATCH_FILENAME_PATTERNS.isPnpmFormat(normalizedFile)) { + // Already converted to pnpm format + pnpmFormatFileName = normalizedFile; + key = getPatchedDependencyKey(normalizedFile); + } + // Check if it's in patch-package format (contains '+') + else if (PATCH_FILENAME_PATTERNS.isPatchPackageFormat(normalizedFile)) { + // Convert patch-package format to pnpm format on-the-fly + try { + pnpmFormatFileName = convertPatchFilename(normalizedFile); + key = getPatchedDependencyKey(pnpmFormatFileName); + } catch (error) { + // Skip invalid patch filenames + console.warn(`Skipping invalid patch filename: ${normalizedFile}`, error); + continue; + } + } else { + // Skip files that don't match either format + continue; + } + + // Get relative path: directory name + filename (e.g., "patches/@scope__pkg@1.2.3.patch") + const relativePath = normalizePath(join(dirName, pnpmFormatFileName)); + patches.set(key, relativePath); + } + } catch (error: unknown) { + // If directory doesn't exist or can't be read, return empty map + // This is expected when packages don't have patches, so we don't log warnings + // Silently return empty map for "not found" errors - this is expected + if (!isNotFoundError(error)) { + console.warn(`Could not scan patches directory ${patchesDir}:`, error); + } + } + + return patches; +} + +export async function findPatchesDirectory(configFilePath: string): Promise { + const configDir = normalizePath(dirname(configFilePath)); + + // First, try to find workspace root (in case this is a workspace setup) + const workspaceRoot = await findWorkspaceRoot(configFilePath); + + // Common locations: ./patches relative to config, ../patches, and workspace root/patches + const candidates = [ + normalizePath(join(configDir, PATCHES_DIR_NAME)), + normalizePath(join(configDir, '..', PATCHES_DIR_NAME)), + normalizePath(join(workspaceRoot, PATCHES_DIR_NAME)), + ]; + + // Remove duplicates + const uniqueCandidates = Array.from(new Set(candidates)); + + for (const candidate of uniqueCandidates) { + try { + const stats = await stat(candidate); + if (stats.isDirectory()) { + return candidate; + } + } catch { + // Directory doesn't exist, try next candidate + } + } + + // Default to ./patches relative to config file if not found + return normalizePath(join(configDir, PATCHES_DIR_NAME)); +} + diff --git a/patch/src/transforms/package-json.ts b/patch/src/transforms/package-json.ts new file mode 100644 index 0000000..18189f1 --- /dev/null +++ b/patch/src/transforms/package-json.ts @@ -0,0 +1,51 @@ +import type { SgNode, SgRoot } from "codemod:ast-grep"; +import type JSON from "codemod:ast-grep/langs/json"; +import { normalizePath } from "../utils/path.ts"; +import { findPatchesDirectory, scanForConvertedPatches } from "../scanners/patch-scanner.ts"; +import type { PackageJson } from "../types.ts"; + + +export async function transformPackageJson( + rootNode: SgNode, + root: SgRoot +): Promise { + const fileName = root.filename(); + const content = root.root().text(); + + const patchesDir = await findPatchesDirectory(fileName); + const convertedPatches = await scanForConvertedPatches(patchesDir); + + if (convertedPatches.size === 0) { + return null; + } + + let packageJson: PackageJson; + try { + packageJson = JSON.parse(content) as PackageJson; + } catch (error) { + console.error(`Failed to parse package.json:`, error); + return null; + } + + if (!packageJson.pnpm) { + return null; + } + if (!packageJson.pnpm.patchedDependencies) { + packageJson.pnpm.patchedDependencies = {}; + } + + const existingDeps = packageJson.pnpm.patchedDependencies; + for (const [key, patchPath] of convertedPatches.entries()) { + const relativePatchPath = normalizePath(patchPath); + existingDeps[key] = relativePatchPath; + } + + const updatedContent = JSON.stringify(packageJson, null, 2) + '\n'; + + if (updatedContent === content) { + return null; + } + + return updatedContent; +} + diff --git a/patch/src/transforms/patch-file.ts b/patch/src/transforms/patch-file.ts new file mode 100644 index 0000000..b6161f0 --- /dev/null +++ b/patch/src/transforms/patch-file.ts @@ -0,0 +1,53 @@ + +import type { SgRoot } from "codemod:ast-grep"; +import type JSON from "codemod:ast-grep/langs/json"; +import { writeFile, rm } from "fs/promises"; +import { basename, join, dirname } from "path"; + +function generateReplacePattern (patchFilePath: string): string { + const baseName = basename(patchFilePath) + const packageInfo = baseName.split('+').slice(0, -1).join('/') + return `/node_modules/${packageInfo}`.replace(/\\/g, '/') +} + +function convertPatchNameToPnpmFormat (patchFileName: string): string { + const parts = patchFileName.split('+') + const version = parts.pop() + if (!version) { + throw new Error(`Invalid patch file name: "${patchFileName}". Expected a "+" separator and a version.`); + } + return `${parts.join('__')}@${version}` +} + +const NODE_MODULES_PATTERNS = [ + 'diff --git a/node_modules/', + '--- a/node_modules/', + '+++ b/node_modules/', +] as const +function needsConversion (content: string): boolean { + return NODE_MODULES_PATTERNS.some(pattern => content.includes(pattern)) +} + +export async function transformPatchFile(root: SgRoot): Promise { + const fileName = root.filename(); + const content = root.root().text(); + + if (!needsConversion(content)) { + return null; // Skip if no conversion needed + } + + const replacePattern = generateReplacePattern(fileName) + const convertedContent = content.replace(new RegExp(replacePattern, 'g'), '') + const outputPath = convertPatchNameToPnpmFormat(basename(fileName)) + + try { + await writeFile(join(dirname(fileName), outputPath), convertedContent, 'utf-8'); + await rm(fileName); + } catch (err) { + console.error("Error during patch file transformation:", err); + return null; + } + + return convertedContent +} + diff --git a/patch/src/transforms/workspace-yaml.ts b/patch/src/transforms/workspace-yaml.ts new file mode 100644 index 0000000..1ef2ec3 --- /dev/null +++ b/patch/src/transforms/workspace-yaml.ts @@ -0,0 +1,59 @@ +import type { SgRoot } from "codemod:ast-grep"; +import type YAML from "codemod:ast-grep/langs/yaml"; +import { YAML_PATTERNS } from "../constants.ts"; +import { normalizePath } from "../utils/path.ts"; +import { findPatchesDirectory, scanForConvertedPatches } from "../scanners/patch-scanner.ts"; + +export async function transformWorkspaceYaml(root: SgRoot): Promise { + const fileName = root.filename(); + const content = root.root().text(); + + const patchesDir = await findPatchesDirectory(fileName); + const convertedPatches = await scanForConvertedPatches(patchesDir); + + if (convertedPatches.size === 0) { + return null; + } + + const existingMatch = content.match(YAML_PATTERNS.PATCHED_DEPS_SECTION); + const existingEntries = new Map(); + + if (existingMatch && existingMatch[1]) { + const entriesText = existingMatch[1]; + YAML_PATTERNS.PATCHED_DEPS_ENTRY.lastIndex = 0; + let match; + while ((match = YAML_PATTERNS.PATCHED_DEPS_ENTRY.exec(entriesText)) !== null) { + if (match[1] && match[2]) { + existingEntries.set(match[1], match[2]); + } + } + } + + for (const [key, patchPath] of convertedPatches.entries()) { + const relativePatchPath = normalizePath(patchPath); + existingEntries.set(key, relativePatchPath); + } + + let newPatchedDepsSection = 'patchedDependencies:\n'; + if (existingEntries.size > 0) { + const entries: string[] = []; + for (const [key, path] of existingEntries.entries()) { + entries.push(` '${key}': '${path}'`); + } + newPatchedDepsSection += entries.join('\n') + '\n'; + } + + if (existingMatch) { + const updatedContent = content.replace(YAML_PATTERNS.PATCHED_DEPS_SECTION, newPatchedDepsSection); + return updatedContent === content ? null : updatedContent; + } + + if (content.trim().length === 0) { + return newPatchedDepsSection; + } + + const trimmed = content.trimEnd(); + const needsNewline = !trimmed.endsWith('\n'); + return trimmed + (needsNewline ? '\n' : '') + newPatchedDepsSection; +} + diff --git a/patch/src/types.ts b/patch/src/types.ts new file mode 100644 index 0000000..01f98fc --- /dev/null +++ b/patch/src/types.ts @@ -0,0 +1,42 @@ +export interface PatchedDependencies { + [key: string]: string; +} + +export interface PnpmConfig { + patchedDependencies?: PatchedDependencies; + [key: string]: unknown; +} + +export interface PackageJson { + name?: string; + version?: string; + pnpm?: PnpmConfig; + [key: string]: unknown; +} + +export interface PatchMetadata { + originalFilename: string; + convertedFilename: string; + dependencyKey: string; + relativePath: string; +} + +export type PatchesMap = Map; + +export interface FileSystemError extends Error { + code?: string; + message: string; +} + +export interface PatchValidationResult { + isValid: boolean; + warnings: string[]; + errors: string[]; +} + +export interface PatchTransformResult { + content: string; + changed: boolean; + validation: PatchValidationResult; +} + diff --git a/patch/src/utils/errors.ts b/patch/src/utils/errors.ts new file mode 100644 index 0000000..a2045ef --- /dev/null +++ b/patch/src/utils/errors.ts @@ -0,0 +1,15 @@ +import type { FileSystemError } from "../types.ts"; +import { ERROR_CODE_ENOENT, ERROR_MESSAGE_NOT_FOUND } from "../constants.ts"; + +export function isNotFoundError(error: unknown): boolean { + const fsError = error as FileSystemError; + const errorString = String(error); + const errorMessage = fsError?.message || errorString; + + return ( + fsError?.code === ERROR_CODE_ENOENT || + errorMessage.includes(ERROR_MESSAGE_NOT_FOUND) || + errorMessage.includes(ERROR_CODE_ENOENT) || + errorString.includes(ERROR_MESSAGE_NOT_FOUND) + ) +} \ No newline at end of file diff --git a/patch/src/utils/patch-filename.ts b/patch/src/utils/patch-filename.ts new file mode 100644 index 0000000..9f1b9e4 --- /dev/null +++ b/patch/src/utils/patch-filename.ts @@ -0,0 +1,39 @@ +import { normalizePath } from "./path.ts"; +import { + PATCH_EXTENSION, + PATCH_PACKAGE_SEPARATOR, + PNPM_NAME_SEPARATOR, + PNPM_VERSION_SEPARATOR, +} from "../constants.ts"; + +export function convertPatchFilename(oldName: string): string { + const normalized = normalizePath(oldName); + const pathParts = normalized.split('/'); + const filename = pathParts[pathParts.length - 1] || normalized; + const nameWithoutExt = filename.endsWith(PATCH_EXTENSION) + ? filename.slice(0, -PATCH_EXTENSION.length) + : filename; + const parts = nameWithoutExt.split(PATCH_PACKAGE_SEPARATOR); + + if (parts.length < 2) { + throw new Error(`Invalid patch filename format: ${oldName}. Need at least name and version parts separated by '${PATCH_PACKAGE_SEPARATOR}'`); + } + + const version = parts.pop(); + if (!version) { + throw new Error(`Invalid patch filename format: ${oldName}. Missing version part`); + } + const name = parts.join(PNPM_NAME_SEPARATOR); + return `${name}${PNPM_VERSION_SEPARATOR}${version}${PATCH_EXTENSION}`; +} + +export function getPatchedDependencyKey(convertedFileName: string): string { + const normalized = normalizePath(convertedFileName); + const pathParts = normalized.split('/'); + const filename = pathParts[pathParts.length - 1] || normalized; + const nameWithoutExt = filename.endsWith(PATCH_EXTENSION) + ? filename.slice(0, -PATCH_EXTENSION.length) + : filename; + return nameWithoutExt.replace(new RegExp(PNPM_NAME_SEPARATOR, 'g'), '/'); +} + diff --git a/patch/src/utils/path.ts b/patch/src/utils/path.ts new file mode 100644 index 0000000..6dee285 --- /dev/null +++ b/patch/src/utils/path.ts @@ -0,0 +1,61 @@ +import { dirname, join, normalize } from "path"; +import { access, readFile } from "fs/promises"; +import { WORKSPACE_YAML_FILE, PACKAGE_JSON_FILE } from "../constants.ts"; +import type { PackageJson } from "../types.ts"; + +export function normalizePath(path: string): string { + return normalize(path).replace(/\\/g, '/'); +} + +export async function findWorkspaceRoot(filePath: string): Promise { + let currentDir = normalizePath(dirname(filePath)); + const root = normalizePath('/'); + let lastPackageJsonDir = currentDir; + + while (currentDir !== root && currentDir !== '') { + try { + const workspaceYamlPath = normalizePath(join(currentDir, WORKSPACE_YAML_FILE)); + await access(workspaceYamlPath); + return currentDir; + } catch {} + + try { + const packageJsonPath = normalizePath(join(currentDir, PACKAGE_JSON_FILE)); + await access(packageJsonPath); + lastPackageJsonDir = currentDir; + } catch {} + + // Move up one directory + const parentDir = normalizePath(dirname(currentDir)); + if (parentDir === currentDir) { + // Reached filesystem root + break; + } + currentDir = parentDir; + } + + return lastPackageJsonDir; +} + +export async function findPatchesDirectory(root: string): Promise { + const packageJsonPath = normalizePath(join(root, PACKAGE_JSON_FILE)); + const content = await readFile(packageJsonPath, "utf-8"); + const packageJson = JSON.parse(content) as PackageJson; + let patchesDir = 'patches'; + if (packageJson.pnpm?.patchesDir) { + patchesDir = packageJson.pnpm.patchesDir as string; + } else { + const workspaceYamlPath = normalizePath(join(root, WORKSPACE_YAML_FILE)); + try { + const workspaceContent = await readFile(workspaceYamlPath, "utf-8"); + const match = workspaceContent.match(/patchesDir:\s*(\S+)/); + if (match?.[1]) { + patchesDir = match[1]; + } + } catch { + // If the workspace YAML file does not exist or is unreadable, ignore and use default patchesDir + } + } + return patchesDir; +} + diff --git a/patch/tsconfig.json b/patch/tsconfig.json new file mode 100644 index 0000000..4f32deb --- /dev/null +++ b/patch/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "types": ["@codemod.com/jssg-types", "node"], + "allowImportingTsExtensions": true, + "noEmit": true, + "verbatimModuleSyntax": true, + "erasableSyntaxOnly": true, + "strict": true, + "strictNullChecks": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedIndexedAccess": true, + "skipLibCheck": true + }, + "exclude": ["tests"] +} diff --git a/patch/workflow.yaml b/patch/workflow.yaml new file mode 100644 index 0000000..57dfb93 --- /dev/null +++ b/patch/workflow.yaml @@ -0,0 +1,31 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/codemod/codemod/refs/heads/main/schemas/workflow.json + +version: "1" + +nodes: + - id: apply-transforms + name: Apply Patch-Package to PNPM Transformations + type: automatic + steps: + - name: "Convert patch files and update configuration" + js-ast-grep: + js_file: src/codemod.ts + base_path: "." + language: "json" + include: + - "**/*.patch" + - "**/package.json" + - "**/pnpm-workspace.yaml" + exclude: + - "**/node_modules/**" + - "**/.git/**" + # - name: "Clean up old patch-package format files" + # run: | + # find . -name "*.patch" -type f -not -path "*/node_modules/*" -not -path "*/.git/*" | grep -E '\+' | xargs rm -f || true + # - name: "Run pnpm install to apply patches" + # run: | + # if [ -f "pnpm-lock.yaml" ] || [ -f "pnpm-workspace.yaml" ] || grep -q '"packageManager".*"pnpm"' package.json 2>/dev/null; then + # pnpm install + # else + # echo "Skipping pnpm install: Project does not use pnpm (no pnpm-lock.yaml, pnpm-workspace.yaml, or pnpm packageManager found)" + # fi diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32190c3..0474af0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,6 +30,18 @@ importers: specifier: ^5.2.2 version: 5.5.3 + patch: + devDependencies: + '@codemod.com/jssg-types': + specifier: ^1.0.9 + version: 1.0.9 + '@types/node': + specifier: 20.9.0 + version: 20.9.0 + typescript: + specifier: ^5.8.3 + version: 5.9.3 + packages: '@ampproject/remapping@2.3.0': @@ -395,6 +407,9 @@ packages: cpu: [x64] os: [win32] + '@codemod.com/jssg-types@1.0.9': + resolution: {integrity: sha512-j+O2nvYnBcmBy0mG5bSmBD7Cn7q3fgp4tI6aqIuF7pVu7j8Dgs45Ohgkpzx9mwqcmAE7vC9CEc8zQZOfwfICyw==} + '@codemod.com/workflow@0.0.19': resolution: {integrity: sha512-7Xkr4S9emtWjM+GpsF1DJqhr8Hq9W3XxxnOJlVjv45lJHwAAE/r+ymHV6e5zbfJ68y1VWU2SRDSuFFqZrVlUow==} @@ -908,6 +923,7 @@ packages: node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} + deprecated: Use your platform's native DOMException instead node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} @@ -1140,6 +1156,11 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@5.9.3: + resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} + engines: {node: '>=14.17'} + hasBin: true + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -1603,6 +1624,8 @@ snapshots: '@biomejs/cli-win32-x64@1.8.3': optional: true + '@codemod.com/jssg-types@1.0.9': {} + '@codemod.com/workflow@0.0.19': dependencies: '@ast-grep/cli': 0.24.1 @@ -2333,6 +2356,8 @@ snapshots: typescript@5.5.3: {} + typescript@5.9.3: {} + undici-types@5.26.5: {} update-browserslist-db@1.1.0(browserslist@4.23.1): diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 236cc74..113ee40 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,3 @@ packages: - catalog + - patch