Skip to content

Conversation

@kingston
Copy link
Collaborator

@kingston kingston commented Jul 29, 2025

Summary by CodeRabbit

  • New Features

    • Added granular snapshot diff application during project file generation, enabling per-file patching and improved control over file overwrites.
    • Introduced advanced overwrite options, allowing for custom diff application and file skipping during output generation.
  • Bug Fixes

    • Improved error messages for missing or invalid snapshot diffs to clarify required user actions.
  • Refactor

    • Replaced force-overwrite logic with a flexible overwrite options system across file generation and output processes.
    • Updated internal logic to use non-mutating array reversal methods for safer and clearer code.
    • Simplified generator directory resolution by removing unnecessary file type checks.
  • Style

    • Simplified code by removing redundant reversal operations and streamlining reversal logic.
  • Tests

    • Updated unit tests to align with new overwrite and snapshot diff handling.
    • Adjusted test cases to reflect changes in array reversal logic.
  • Chores

    • Updated various dependencies and package versions, including ESLint, Prettier, TypeScript ESLint, and related plugins, to their latest releases.
    • Upgraded Storybook-related packages to the latest versions.

@changeset-bot
Copy link

changeset-bot bot commented Jul 29, 2025

🦋 Changeset detected

Latest commit: 1c5ddfe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 17 packages
Name Type
@baseplate-dev/core-generators Patch
@baseplate-dev/react-generators Patch
@baseplate-dev/fastify-generators Patch
@baseplate-dev/project-builder-server Patch
@baseplate-dev/plugin-auth Patch
@baseplate-dev/plugin-storage Patch
@baseplate-dev/project-builder-cli Patch
@baseplate-dev/project-builder-common Patch
@baseplate-dev/project-builder-test Patch
@baseplate-dev/project-builder-web Patch
@baseplate-dev/code-morph Patch
@baseplate-dev/create-project Patch
@baseplate-dev/project-builder-lib Patch
@baseplate-dev/sync Patch
@baseplate-dev/tools Patch
@baseplate-dev/ui-components Patch
@baseplate-dev/utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link

coderabbitai bot commented Jul 29, 2025

Walkthrough

This change updates dependency versions for various linting, formatting, and related packages across multiple package manifests and constants. It introduces a granular overwrite and diff application mechanism during file generation, replacing the previous force-overwrite approach. Several utility and test files are refactored to use non-mutating array reversal. The snapshot diff application is now integrated per-file during output writing.

Changes

Cohort / File(s) Change Summary
Changelog & Workspace Metadata
.changeset/update-package-versions.md, pnpm-workspace.yaml
Added changelog entry for package version updates; updated versions for @eslint/js, eslint, and prettier in workspace catalog.
Core/React Generator Package Version Constants
packages/core-generators/src/constants/core-packages.ts, packages/react-generators/src/constants/react-packages.ts
Updated version strings for ESLint, Prettier, TypeScript ESLint, and related plugins.
Project Builder CLI Option
packages/project-builder-cli/src/commands/sync.ts
Removed default value for the --snapshot option, now requiring explicit user input.
Snapshot Diff Application (Server)
packages/project-builder-server/src/diff/snapshot/apply-diff-to-file-contents.ts, packages/project-builder-server/src/diff/snapshot/apply-diff-to-generator-output.ts, packages/project-builder-server/src/diff/snapshot/index.ts
Added per-file snapshot diff application logic, updated error messages, and exported new diff application utility.
Project Generation Overwrite Refactor
packages/project-builder-server/src/sync/generate-for-directory.ts
Refactored overwrite and snapshot logic: snapshot diff application and file skipping are now handled per-file via new overwrite options.
Overwrite Options Refactor (Sync Output)
packages/sync/src/output/prepare-generator-files/prepare-generator-file.ts, packages/sync/src/output/prepare-generator-files/prepare-generator-files.ts, packages/sync/src/output/prepare-generator-files/types.ts, packages/sync/src/output/write-generator-output.ts
Replaced forceOverwrite and ignore patterns with new OverwriteOptions interface, supporting granular diff application and file skipping; refactored related function signatures and logic.
Sync Output Test Update
packages/sync/src/output/prepare-generator-files/prepare-generator-files.unit.test.ts
Removed default forceOverwrite from test context helper.
Sync Output Prepare File Tests
packages/sync/src/output/prepare-generator-files/prepare-generator-file.unit.test.ts
Updated tests to use overwriteOptions replacing forceOverwrite; added tests for new diff application and skip file behaviors.
React Generator Utility
packages/react-generators/src/generators/admin/_utils/graphql.ts
Simplified reversal logic in convertExpressionToField using .toReversed().
Toposort Utility and Tests
packages/utils/src/toposort/toposort-local.ts, packages/utils/src/toposort/toposort-local.unit.test.ts, packages/utils/src/toposort/toposort.unit.test.ts
Replaced in-place .reverse() with non-mutating .toReversed() in utility and tests; updated test invocation style for cycle detection.
Tooling and UI Components Package Manifests
packages/tools/package.json, packages/ui-components/package.json
Bumped versions of ESLint, Prettier, Storybook, and related dependencies.

Sequence Diagram(s)

sequenceDiagram
    participant Generator as Generator
    participant Snapshot as SnapshotManifest
    participant Writer as writeGeneratorOutput
    participant DiffUtil as applySnapshotToFileContents

    Generator->>Writer: generateForDirectory(..., overwriteOptions)
    loop For each file
        Writer->>DiffUtil: applyDiff(relativePath, generatedContents)
        alt File is deleted in snapshot
            DiffUtil-->>Writer: undefined (skip file)
        else File is binary
            DiffUtil-->>Writer: original contents
        else File is modified
            DiffUtil->>Snapshot: read diff file
            DiffUtil->>DiffUtil: applyPatch(generatedContents, diff)
            DiffUtil-->>Writer: patched contents
        else
            DiffUtil-->>Writer: original contents
        end
        Writer->>Writer: skipFile?(relativePath)
        alt skipFile returns true
            Writer-->>Generator: skip writing file
        else
            Writer->>Generator: write file with (possibly patched) contents
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch kingston/eng-827-upgrade-eslint-import-x-to-resolve-vscode-context-issues

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@socket-security
Copy link

socket-security bot commented Jul 29, 2025

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert (click for details)
Warn High
[email protected] has a License Policy Violation.

License: CC-BY-4.0 (npm metadata)

License: CC-BY-4.0 (package/LICENSE)

License: CC-BY-4.0 (package/package.json)

From: pnpm-lock.yamlnpm/[email protected]npm/@vitejs/[email protected]npm/@tanstack/[email protected]npm/[email protected]npm/@storybook/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@vercel
Copy link

vercel bot commented Jul 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
baseplate-project-builder-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 3:25pm

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/project-builder-server/src/sync/generate-for-directory.ts (1)

104-128: Well-designed callback-based overwrite options architecture.

The new overwriteOptions structure with applyDiff and skipFile callbacks provides excellent separation of concerns:

  • applyDiff: Handles per-file snapshot application with proper error logging
  • skipFile: Uses ignore patterns for file filtering
  • Proper async handling and error reporting

The warning message for invalid patches is helpful for user feedback.

Consider extracting the applyDiff callback to a separate function to improve readability:

+const createApplyDiffCallback = (
+  snapshot: any,
+  diffsPath: string,
+  logger: Logger,
+) =>
+  async (relativePath: string, generatedContents: Buffer | string) => {
+    const result = await applySnapshotToFileContents(
+      relativePath,
+      generatedContents,
+      snapshot,
+      diffsPath,
+    );
+    if (result === false) {
+      logger.warn(
+        `Snapshot for ${relativePath} was not applied because the patch was invalid. Please verify the new output and run snapshot add once the changes have been verified.`,
+      );
+    }
+    return result;
+  };

 const overwriteOptions: OverwriteOptions = {
   enabled: !!overwrite,
-  applyDiff:
-    snapshot &&
-    (async (relativePath, generatedContents) => {
-      const result = await applySnapshotToFileContents(
-        relativePath,
-        generatedContents,
-        snapshot,
-        resolvedSnapshotDirectory.diffsPath,
-      );
-      if (result === false) {
-        logger.warn(
-          `Snapshot for ${relativePath} was not applied because the patch was invalid. Please verify the new output and run snapshot add once the changes have been verified.`,
-        );
-      }
-      return result;
-    }),
+  applyDiff: snapshot && createApplyDiffCallback(
+    snapshot,
+    resolvedSnapshotDirectory.diffsPath,
+    logger,
+  ),
   skipFile: (relativePath) => {
     if (!ignorePatterns) {
       return false;
     }
     return ignorePatterns.ignores(relativePath);
   },
 };

Comment on lines +355 to 390
const { applyDiff } = context.overwriteOptions;
const generatedContentsWithDiff = applyDiff
? await applyDiff(relativePath, formattedContents)
: normalizeBufferString(formattedContents);
if (generatedContentsWithDiff) {
const previousWorkingBuffer = await previousWorkingCodebase?.readFile(
previousRelativePath ?? relativePath,
);
if (
previousWorkingBuffer?.equals(
normalizeBufferString(generatedContentsWithDiff),
)
) {
return {
relativePath,
mergedContents: undefined,
generatedContents: normalizeBufferString(formattedContents),
previousRelativePath,
};
}
return {
relativePath,
mergedContents: normalizeBufferString(generatedContentsWithDiff),
generatedContents: normalizeBufferString(formattedContents),
previousRelativePath,
};
} else if (generatedContentsWithDiff === undefined) {
// If the file was purposely deleted, we skip the generation
return {
relativePath,
mergedContents: undefined,
generatedContents: normalizeBufferString(formattedContents),
previousRelativePath,
};
}
return {
relativePath,
mergedContents: normalizeBufferString(formattedContents),
generatedContents: normalizeBufferString(formattedContents),
previousRelativePath,
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Verify the applyDiff callback error handling and return value semantics.

The implementation correctly handles the applyDiff callback with proper conditional logic:

  • Applies diff when callback is provided
  • Handles undefined return value as intentional file deletion/skipping
  • Compares buffer contents to avoid unnecessary writes

However, ensure that the applyDiff callback implementations properly handle edge cases and return the expected types (Buffer | string | undefined).

Let me verify how applyDiff is implemented and used across the codebase:


🏁 Script executed:

#!/bin/bash
# Description: Verify applyDiff callback implementations and usage patterns

# Search for applyDiff implementations
echo "=== applyDiff implementations ==="
ast-grep --pattern 'applyDiff: $$$'

echo -e "\n=== applyDiff callback usage ==="
rg -A 10 "applyDiff.*=>" --type ts

echo -e "\n=== OverwriteOptions interface definition ==="
ast-grep --pattern 'interface OverwriteOptions {
  $$$
}'

Length of output: 2500


I dug into how applyDiff’s false return is handled and found that the current snippet only distinguishes “truthy” diffs vs. undefined (deletion), and there is no explicit branch for false. To properly fall back to a standard 3-way merge when applyDiff errors out (i.e. returns false), we need to add an else branch that treats false as a signal to skip the overwrite and perform the default merge.

Please update packages/sync/src/output/prepare-generator-files/prepare-generator-file.ts accordingly:

  • After the else if (generatedContentsWithDiff === undefined) block, add:
    } else if (generatedContentsWithDiff === false) {
      // Diff application failed—fallback to standard merge
      return {
        relativePath,
        mergedContents: normalizeBufferString(formattedContents),
        generatedContents: normalizeBufferString(formattedContents),
        previousRelativePath,
      };
    }
  • Ensure this sits just before the closing } of the applyDiff handling.

This patch makes the applyDiff: false case explicit and aligns with the documented semantics of OverwriteOptions.

🤖 Prompt for AI Agents
In packages/sync/src/output/prepare-generator-files/prepare-generator-file.ts
between lines 355 and 390, the code currently handles truthy diffs and undefined
(deletion) from applyDiff but lacks explicit handling for a false return value.
Add an else-if branch after the existing else-if for undefined to check if
generatedContentsWithDiff is false, and in that case return an object with
mergedContents and generatedContents both set to
normalizeBufferString(formattedContents), along with relativePath and
previousRelativePath. This will explicitly handle the false case by falling back
to the standard merge as intended.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/sync/src/utils/create-generator.ts (1)

102-102: LGTM! Simplification improves code clarity.

The removal of the statSync check simplifies the logic appropriately. Since generatorFileUrl is documented as "The file URL of the generator", using path.dirname() directly is the correct approach.

Consider removing the unused statSync import if it's no longer needed elsewhere in the file:

-import { statSync } from 'node:fs';
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 249a0ec and 1c5ddfe.

📒 Files selected for processing (1)
  • packages/sync/src/utils/create-generator.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit Inference Engine (CLAUDE.md)

**/*.{ts,tsx}: Import UI components from the @baseplate-dev/ui-components package as shown in the provided examples.
Use both standalone and React Hook Form controller variants for form components from @baseplate-dev/ui-components as appropriate.
If a particular interface or type is not exported, change the file so it is exported.

**/*.{ts,tsx}: TypeScript with strict type checking
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/ is the alias for src/)
If a particular interface or type is not exported, change the file so it is exported

Files:

  • packages/sync/src/utils/create-generator.ts
**/*.{js,ts,tsx}

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Node 16 module resolution - include file extensions in imports (.js)

Files:

  • packages/sync/src/utils/create-generator.ts
**/*.{ts,tsx,js}

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

**/*.{ts,tsx,js}: Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
We use the prefer using nullish coalescing operator (??) ESLint rule instead of a logical or (||), as it is a safer operator
Use console.info/warn/error instead of console.log

Files:

  • packages/sync/src/utils/create-generator.ts
**/*

📄 CodeRabbit Inference Engine (.cursor/rules/code-style.mdc)

Use kebab-case for file names

Files:

  • packages/sync/src/utils/create-generator.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Run `pnpm lint:affected` and `pnpm typecheck` before committing changes.
Learnt from: kingston
PR: halfdomelabs/baseplate#539
File: scripts/check-changesets.ts:70-79
Timestamp: 2025-05-08T12:56:11.723Z
Learning: In the check-changesets.ts script for monorepo validation, `npm pack ${pkg.name}@latest` is intentionally used to pack the most recently published version (not local changes) for comparison purposes to determine if changes require new changesets.
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/dev-commands.mdc:0-0
Timestamp: 2025-07-22T09:11:00.767Z
Learning: Lint affected files with auto-fixing from the repository root using `pnpm lint:only:affected -- --fix`
Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/dev-commands.mdc:0-0
Timestamp: 2025-07-22T09:11:00.767Z
Learning: Lint a package with auto-fixing using `pnpm lint --fix` from within the package directory
packages/sync/src/utils/create-generator.ts (16)

Learnt from: kingston
PR: #521
File: packages/react-generators/src/generators/admin/admin-components/admin-components.generator.ts:55-61
Timestamp: 2025-05-05T06:35:13.300Z
Learning: In generators, paths should be merged with forward slashes (/) only since JavaScript generated files use POSIX style separators. The system handles conversion to Windows style separators at later stages when writing out files.

Learnt from: kingston
PR: #539
File: scripts/check-changesets.ts:10-13
Timestamp: 2025-05-08T12:56:59.222Z
Learning: Node.js 20.12.0 and above include globSync in the core node:fs module, so import { promises as fs, globSync } from 'node:fs'; is valid syntax in projects using these Node.js versions.

Learnt from: kingston
PR: #539
File: scripts/check-changesets.ts:10-13
Timestamp: 2025-05-08T12:56:59.222Z
Learning: Node.js 22.0.0 and later versions include both glob and globSync functionality in the core node:fs module, making import { promises as fs, globSync } from 'node:fs'; valid syntax.

Learnt from: kingston
PR: #606
File: plugins/plugin-auth/src/auth/core/generators/auth-apollo/auth-apollo.generator.ts:24-32
Timestamp: 2025-07-12T19:56:08.559Z
Learning: For generator functions and configuration object methods like those in createGeneratorTask, inferred return types are acceptable when the structure is clear from the implementation. ESLint rules handle enforcement of explicit return types where truly needed, so manual review for this is not necessary.

Learnt from: kingston
PR: #613
File: packages/react-generators/src/generators/core/react-components/templates/components/ui/circular-progress/circular-progress.tsx:0-0
Timestamp: 2025-07-16T17:15:56.714Z
Learning: For imports starting with $ (template aliases), do not require .js extensions as these are resolved differently during the generation process, unlike regular file imports which require explicit .js extensions under Node 16 module resolution.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: kingston
PR: #428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.

Learnt from: kingston
PR: #505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping when using explicit relative paths (with "./"). Removing baseUrl from tsconfig.json while updating paths to use relative paths (e.g., changing "@src/": ["src/"] to "@src/": ["./src/"]) prevents bare path imports from node_modules while maintaining path alias functionality.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-07-22T09:10:31.413Z
Learning: Applies to **/*.{js,ts,tsx} : Node 16 module resolution - include file extensions in imports (.js)

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: CLAUDE.md:0-0
Timestamp: 2025-07-22T09:09:23.016Z
Learning: Applies to **/*.{ts,tsx} : If a particular interface or type is not exported, change the file so it is exported.

Learnt from: kingston
PR: #539
File: scripts/check-changesets.ts:111-124
Timestamp: 2025-05-08T12:56:23.394Z
Learning: Node.js 22.0.0 and later versions provide native glob functionality via fs.glob and fs.globSync methods in the node:fs module, allowing pattern matching without external dependencies.

Learnt from: kingston
PR: #510
File: packages/project-builder-server/src/sync/conflict-file-monitor.test.ts:19-24
Timestamp: 2025-04-23T06:44:30.952Z
Learning: When testing file operations in this codebase, the pattern is to use Vitest automocks for 'node:fs' and 'node:fs/promises' (without explicit implementation replacement) while populating a virtual filesystem with vol.fromJSON() from memfs. File operations in tests are performed directly via vol.promises methods.

Learnt from: kingston
PR: #510
File: packages/project-builder-server/src/sync/conflict-file-monitor.test.ts:19-24
Timestamp: 2025-04-23T06:44:30.952Z
Learning: In this codebase, when testing file operations, Vitest's automocks for 'node:fs' and 'node:fs/promises' are used in conjunction with memfs, but without replacing the mock implementation explicitly in each test file. The virtual filesystem is populated using vol.fromJSON or similar methods, which works seamlessly with the automocks.

Learnt from: kingston
PR: #539
File: scripts/check-changesets.ts:111-124
Timestamp: 2025-05-08T12:56:23.394Z
Learning: Node.js 22.0.0 and later versions provide native glob functionality via fs.glob method in the node:fs/promises module, allowing pattern matching without requiring external dependencies.

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-07-22T09:11:16.930Z
Learning: Applies to **/*.test.{ts,tsx} : For file system operations in tests, use memfs and mock 'node:fs' and 'node:fs/promises'

Learnt from: CR
PR: halfdomelabs/baseplate#0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-06-30T11:52:28.745Z
Learning: Applies to **/*.test.{ts,tsx} : For file system operations in tests, use memfs and mock 'node:fs' and 'node:fs/promises' with vi.mock

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: test
  • GitHub Check: Lint
  • GitHub Check: Test E2E

@kingston kingston merged commit fbde70f into main Jul 29, 2025
10 checks passed
@kingston kingston deleted the kingston/eng-827-upgrade-eslint-import-x-to-resolve-vscode-context-issues branch July 29, 2025 15:28
@github-actions github-actions bot mentioned this pull request Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants