Skip to content

feat: add affected pkg fn from dag-rs#5

Merged
Anxhul10 merged 13 commits intomainfrom
feat/affected-pkg
Feb 7, 2026
Merged

feat: add affected pkg fn from dag-rs#5
Anxhul10 merged 13 commits intomainfrom
feat/affected-pkg

Conversation

@Anxhul10
Copy link
Owner

@Anxhul10 Anxhul10 commented Feb 4, 2026

resolve #4

Summary by CodeRabbit

  • New Features

    • Added a function to identify affected packages including direct, transitive, and circular dependents; exposed for both CommonJS and ESM consumers.
  • Documentation

    • Changelog reorganized with a 0.3.0 section; README expanded with CommonJS/ESM usage, examples, and example outputs.
  • Chores

    • Package version bumped to v0.3.0 and module entry points updated for both require and import.

@Anxhul10 Anxhul10 added the enhancement New feature or request label Feb 4, 2026
gemini-code-assist[bot]

This comment was marked as resolved.

Anxhul10 and others added 2 commits February 5, 2026 00:51
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Anxhul10
Copy link
Owner Author

Anxhul10 commented Feb 7, 2026

@coderabbitai help

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

CodeRabbit commands

These commands are invoked using PR/Issue 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 evaluate custom pre-merge check --instructions <custom-checks-instructions> --name <custom-checks-title> [--mode <error|warning>] to validate the custom pre-merge checks instructions. Defaults to error when --mode is omitted.
    • @coderabbitai ignore pre-merge checks to override pre-merge checks and get an approval on PR.
    • @coderabbitai run pre-merge checks to run pre-merge checks on the pull request.
  • @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 to resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai generate configuration to create a PR that adds the current resolved configuration as .coderabbit.yaml (or show it if already present).
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit 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.

CodeRabbit configuration file (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, support, documentation and community

  • Visit our status page to check the current availability of CodeRabbit.
  • Create a ticket on our support page for assistance with any issues or questions.
  • Visit our documentation site for detailed information on how to use CodeRabbit.
  • Join our Discord community to connect with other users and get help from the community.
  • Follow us on X/Twitter for updates and announcements.

@Anxhul10
Copy link
Owner Author

Anxhul10 commented Feb 7, 2026

@coderabbitai resume

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

Exports a new Neon-backed getAffectedPkg function from Rust and exposes it alongside the existing dag export via updated CommonJS and ESM entrypoints. Bumps package version to 0.3.0 and updates CHANGELOG and README with usage and examples.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Removed top-level "dag" header and adjacent blank; added 0.3.0 section with "### Minor Changes" documenting getAffectedPkg; retained existing patch notes.
Node API / Bundles
lib/index.js, lib/index.cjs, lib/index.mjs, package.json
Changed module export shape from a single dag to an object { dag, getAffectedPkg }; added CJS/ESM entrypoints (lib/index.cjs, lib/index.mjs); added exports field and bumped version to 0.3.0.
Rust Backend
src/lib.rs
Added get_dependents_recursively helper and a Neon-exported get_affected_pkg(pkg_name) that scans package.json files (skipping .yarn/node_modules), builds package map, computes direct dependents and transitive/circular dependents, and returns a deduplicated JS array.
Docs / README
README.md
Added CommonJS and ESM usage examples for dag and getAffectedPkg; expanded example outputs; reordered sections and added a Contribution section.

Sequence Diagram

sequenceDiagram
    participant Client
    participant NodeAPI as Node.js (CJS/ESM)
    participant Native as Native Addon (index.node)
    participant Rust as Rust/Neon

    Client->>NodeAPI: request getAffectedPkg(packageName)
    NodeAPI->>Native: call getAffectedPkg
    Native->>Rust: invoke get_affected_pkg(pkgName)
    Rust->>Rust: discover package.json files (skip .yarn/node_modules)
    Rust->>Rust: build package name map and direct dependents
    Rust->>Rust: recurse to collect transitive/circular dependents
    Rust-->>Native: return JS array of affected package names
    Native-->>NodeAPI: forward result
    NodeAPI-->>Client: return affected packages array
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through package trees both near and far,
Found dependents in circles and on every bar,
I gathered names, direct and transitive too,
Brought them back bundled, just for you —
A little rabbit’s map to follow through 🌿

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add affected pkg fn from dag-rs' accurately describes the main change in the PR: adding a new getAffectedPkg function derived from the Rust implementation.
Linked Issues check ✅ Passed The PR implements the requirements from issue #4: adds a getAffectedPkg function that takes a package name and returns affected packages including direct, transitive, and circular dependencies.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the getAffectedPkg function requirement, including Rust implementation, JavaScript exports, documentation updates, and version bumping.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/affected-pkg

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Repository owner deleted a comment from gemini-code-assist bot Feb 7, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

✅ Actions performed

Reviews resumed.

@Anxhul10
Copy link
Owner Author

Anxhul10 commented Feb 7, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 2

🤖 Fix all issues with AI agents
In `@lib/index.js`:
- Around line 3-6: The change removed the previous function-style default export
and broke callers that required the package and invoked it directly; restore
backward compatibility by exporting native.dag as the module itself and also
attach the other exports as properties: set module.exports to native.dag and
then assign native.dag.dag = native.dag (optional) and native.dag.getAffectedPkg
= native.getAffectedPkg (or at minimum module.exports.getAffectedPkg =
native.getAffectedPkg) so consumers can both require('dag-rs')() and access
getAffectedPkg; update any references to native.dag and getAffectedPkg in the
file accordingly.

In `@src/lib.rs`:
- Around line 51-73: The get_affected_pkg function currently returns unit and
only prints matches; change get_affected_pkg to a Neon JS-returning signature
(e.g., fn get_affected_pkg<'a>(cx: FunctionContext<'a>) -> JsResult<'a,
JsObject>), parse the pkg_name argument from the context, collect dependent
names by iterating res (built via get_dependents and get_pkg_name) into a
Vec<String>, then construct a JsArray of those names and a JsObject mapping
pkg_name -> that JsArray (similar to how dag builds and returns its
JsArray/JsObject) and return it via cx.null() or Ok(object) accordingly using
Neon APIs. Ensure you remove println! usage and return the created JsObject so
JS receives { packageName: [affected packages] }.
🧹 Nitpick comments (2)
src/lib.rs (2)

67-67: Unnecessary .enumerate() — index is unused.

_i is discarded; just iterate directly.

Proposed fix
-    for (_i, (_dependent, dependency)) in res.into_iter().enumerate() {
+    for (_dependent, dependency) in res.into_iter() {

58-60: paths.clone() can be avoided on the first loop.

The first loop only needs shared references; iterating &paths avoids cloning. Same pattern exists in dag (line 84), so this is a broader cleanup opportunity.

Proposed fix
-    for path in paths.clone() {
-        pkg_names.push(get_pkg_name(path.clone()));
+    for path in &paths {
+        pkg_names.push(get_pkg_name(path.clone()));
     }

Note: get_pkg_name takes an owned String, so the inner .clone() remains, but you avoid cloning the entire Vec. A further improvement would be to change get_pkg_name to accept &str.

Comment on lines 3 to 6
dag: native.dag,
getAffectedPkg: native.getAffectedPkg
};
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Breaking change: existing consumers calling the module as a function will break.

Previously the module exported native.dag directly, so consumers could write:

const dag = require('dag-rs');
dag(); // worked

Now they must destructure or access the property:

const { dag } = require('dag-rs');

If this library has downstream users, this is a semver-major change. Ensure the version bump reflects this (or consider a backward-compatible approach such as also attaching getAffectedPkg as a property on the exported dag function).

🤖 Prompt for AI Agents
In `@lib/index.js` around lines 3 - 6, The change removed the previous
function-style default export and broke callers that required the package and
invoked it directly; restore backward compatibility by exporting native.dag as
the module itself and also attach the other exports as properties: set
module.exports to native.dag and then assign native.dag.dag = native.dag
(optional) and native.dag.getAffectedPkg = native.getAffectedPkg (or at minimum
module.exports.getAffectedPkg = native.getAffectedPkg) so consumers can both
require('dag-rs')() and access getAffectedPkg; update any references to
native.dag and getAffectedPkg in the file accordingly.

Comment on lines 51 to 73
#[neon::export]
fn get_affected_pkg(pkg_name: String) {
let filter = vec![".yarn", "node_modules"];
let paths = find_pkg_json::find_pkg_json(filter);
let mut res: Vec<(String, String)> = Vec::new();
let mut pkg_names = Vec::new();

for path in paths.clone() {
pkg_names.push(get_pkg_name(path.clone()));
}

for path in paths.clone() {
let mut r = get_dependents(&path, &pkg_names);
res.append(&mut r);
}
// res stores the dependents and dependency
for (_i, (_dependent, dependency)) in res.into_iter().enumerate() {
if dependency == pkg_name {
println!("pkg found");
}
}
println!("{}", pkg_name);
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Function does not return any value — the JS caller receives undefined.

The function signature returns () (unit), so calling getAffectedPkg(name) from JavaScript will always yield undefined. Per issue #4, it should return a mapping in the shape { packageName: [affected packages] }.

Currently the function only println!s matches instead of collecting and returning them. Compare with the dag function (lines 74–101), which builds and returns a JsArray.

You need to:

  1. Change the return type to produce a JS-compatible value (e.g., JsResult<'a, JsObject>).
  2. Collect the matching dependent names into a list.
  3. Build and return a JS object with the pkg_name key mapped to that list.
🐛 Sketch of a possible fix
-#[neon::export]
-fn get_affected_pkg(pkg_name: String) {
+#[neon::export]
+fn get_affected_pkg<'a>(cx: &mut FunctionContext<'a>, pkg_name: String) -> JsResult<'a, JsObject> {
     let filter = vec![".yarn", "node_modules"];
     let paths = find_pkg_json::find_pkg_json(filter);
     let mut res: Vec<(String, String)> = Vec::new();
     let mut pkg_names = Vec::new();
 
     for path in paths.clone() {
         pkg_names.push(get_pkg_name(path.clone()));
     }
 
     for path in paths.clone() {
         let mut r = get_dependents(&path, &pkg_names);
         res.append(&mut r);
     }
-    // res stores the dependents and dependency
-    for (_i, (_dependent, dependency)) in res.into_iter().enumerate() {
-        if dependency == pkg_name {
-            println!("pkg found");
-        }
-    }
-    println!("{}", pkg_name);
+
+    let affected: Vec<String> = res
+        .into_iter()
+        .filter(|(_dependent, dependency)| dependency == &pkg_name)
+        .map(|(dependent, _)| dependent)
+        .collect();
+
+    let result = cx.empty_object();
+    let js_array = JsArray::new(cx, affected.len() as u32);
+    for (i, name) in affected.iter().enumerate() {
+        let js_str = cx.string(name);
+        js_array.set(cx, i as u32, js_str)?;
+    }
+    result.set(cx, pkg_name.as_str(), js_array)?;
+    Ok(result)
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#[neon::export]
fn get_affected_pkg(pkg_name: String) {
let filter = vec![".yarn", "node_modules"];
let paths = find_pkg_json::find_pkg_json(filter);
let mut res: Vec<(String, String)> = Vec::new();
let mut pkg_names = Vec::new();
for path in paths.clone() {
pkg_names.push(get_pkg_name(path.clone()));
}
for path in paths.clone() {
let mut r = get_dependents(&path, &pkg_names);
res.append(&mut r);
}
// res stores the dependents and dependency
for (_i, (_dependent, dependency)) in res.into_iter().enumerate() {
if dependency == pkg_name {
println!("pkg found");
}
}
println!("{}", pkg_name);
}
#[neon::export]
fn get_affected_pkg<'a>(cx: &mut FunctionContext<'a>, pkg_name: String) -> JsResult<'a, JsObject> {
let filter = vec![".yarn", "node_modules"];
let paths = find_pkg_json::find_pkg_json(filter);
let mut res: Vec<(String, String)> = Vec::new();
let mut pkg_names = Vec::new();
for path in paths.clone() {
pkg_names.push(get_pkg_name(path.clone()));
}
for path in paths.clone() {
let mut r = get_dependents(&path, &pkg_names);
res.append(&mut r);
}
let affected: Vec<String> = res
.into_iter()
.filter(|(_dependent, dependency)| dependency == &pkg_name)
.map(|(dependent, _)| dependent)
.collect();
let result = cx.empty_object();
let js_array = JsArray::new(cx, affected.len() as u32);
for (i, name) in affected.iter().enumerate() {
let js_str = cx.string(name);
js_array.set(cx, i as u32, js_str)?;
}
result.set(cx, pkg_name.as_str(), js_array)?;
Ok(result)
}
🤖 Prompt for AI Agents
In `@src/lib.rs` around lines 51 - 73, The get_affected_pkg function currently
returns unit and only prints matches; change get_affected_pkg to a Neon
JS-returning signature (e.g., fn get_affected_pkg<'a>(cx: FunctionContext<'a>)
-> JsResult<'a, JsObject>), parse the pkg_name argument from the context,
collect dependent names by iterating res (built via get_dependents and
get_pkg_name) into a Vec<String>, then construct a JsArray of those names and a
JsObject mapping pkg_name -> that JsArray (similar to how dag builds and returns
its JsArray/JsObject) and return it via cx.null() or Ok(object) accordingly
using Neon APIs. Ensure you remove println! usage and return the created
JsObject so JS receives { packageName: [affected packages] }.

@Anxhul10
Copy link
Owner Author

Anxhul10 commented Feb 7, 2026

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Feb 7, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
package.json (1)

5-18: ⚠️ Potential issue | 🔴 Critical

"main" points to lib/index.js, which does not exist — update to lib/index.cjs.

The "main" field is currently broken. Older Node versions or tools that don't support the "exports" field will fail to resolve the module. Only lib/index.cjs and lib/index.mjs exist. Change "main" to "lib/index.cjs" to ensure consistent behavior across all Node versions.

🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Around line 1-7: Swap the two release sections so the newest release heading
"## 0.3.0" appears above "## 0.2.1", and update the bullet under 0.3.0 to fix
the grammar by changing "add getAffectedPkg function which return the dependents
including direct, transitive and circular dependency" to use "returns" (e.g.,
"add getAffectedPkg function which returns the dependents including direct,
transitive and circular dependency").

In `@src/lib.rs`:
- Around line 51-59: The function get_dependents_recursively currently takes
ownership of pkg_name and res and re-clones res on each call and lacks a visited
guard, causing infinite recursion for circular dependency graphs; change its
signature to take &str or &String for pkg_name, take res by reference
(&Vec<(String,String)> or a slice) and add a visited HashSet<&str> (or
HashSet<String>) parameter plus a mutable dependents Vec parameter, check/infer
visited before recursing (mark pkg_name visited, skip if already present) and
remove all res.clone() uses—update all call sites to create and pass a mutable
visited set and the mutable dependents vector when invoking
get_dependents_recursively.
🧹 Nitpick comments (1)
src/lib.rs (1)

86-88: Dead code: dependents Vec is populated but never used.

Lines 86–88 push values from unique_dependents into dependents, but dependents is never read afterward. The iteration on line 90 uses unique_dependents directly. Remove the unused variable and loop.

Proposed cleanup
     for pkg in duplicate_dependents {
         unique_dependents.insert(pkg);
     }
-    for pkg in unique_dependents.clone() {
-        dependents.push(pkg);
-    }

Comment on lines 1 to +7
## 0.2.1

## 0.3.0

### Minor Changes

- add getAffectedPkg function which return the dependents including direct, transitive and circular dependency
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Changelog is in wrong order — newest version should appear first.

Version 0.3.0 (lines 3–7) is placed below 0.2.1 (line 1). Changelogs conventionally list the most recent release at the top. Also, minor grammar nit: "return" → "returns".

Proposed fix
-## 0.2.1
-
 ## 0.3.0
 
 ### Minor Changes
 
-- add getAffectedPkg function which return the dependents including direct, transitive and circular dependency
+- add getAffectedPkg function which returns the dependents including direct, transitive and circular dependency
+
+## 0.2.1
 
 ### Patch Changes
🤖 Prompt for AI Agents
In `@CHANGELOG.md` around lines 1 - 7, Swap the two release sections so the newest
release heading "## 0.3.0" appears above "## 0.2.1", and update the bullet under
0.3.0 to fix the grammar by changing "add getAffectedPkg function which return
the dependents including direct, transitive and circular dependency" to use
"returns" (e.g., "add getAffectedPkg function which returns the dependents
including direct, transitive and circular dependency").

Comment on lines +51 to +59
fn get_dependents_recursively(pkg_name: String, res: Vec<(String, String)>, duplicate_dependents:&mut Vec<String>) {
for (_i, (dependent, dependency)) in res.clone().into_iter().enumerate() {
if dependency == pkg_name {
duplicate_dependents.push(dependent.clone());
get_dependents_recursively(dependent.clone(), res.clone(),duplicate_dependents);
}
}
return;
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Critical: infinite recursion on circular dependencies — will stack overflow.

The changelog explicitly mentions "circular dependency" support, yet there is no visited-set guard. If package A depends on B and B depends on A, this function recurses infinitely until the stack overflows.

Additionally, res.clone() on every recursive call copies the entire graph each time, which is unnecessarily expensive. Pass res by reference instead.

Proposed fix using a visited set
-fn get_dependents_recursively(pkg_name: String, res: Vec<(String, String)>, duplicate_dependents:&mut Vec<String>) {
-    for (_i, (dependent, dependency)) in res.clone().into_iter().enumerate() {
-        if dependency == pkg_name {
-            duplicate_dependents.push(dependent.clone());
-            get_dependents_recursively(dependent.clone(), res.clone(),duplicate_dependents);
-        }
-    }
-    return;
-}
+fn get_dependents_recursively(
+    pkg_name: &str,
+    res: &[(String, String)],
+    visited: &mut HashSet<String>,
+    result: &mut Vec<String>,
+) {
+    for (dependent, dependency) in res.iter() {
+        if dependency == pkg_name && !visited.contains(dependent) {
+            visited.insert(dependent.clone());
+            result.push(dependent.clone());
+            get_dependents_recursively(dependent, res, visited, result);
+        }
+    }
+}

Update the call site accordingly:

let mut visited = HashSet::new();
let mut dependents = Vec::new();
get_dependents_recursively(&pkg_name, &res, &mut visited, &mut dependents);
🤖 Prompt for AI Agents
In `@src/lib.rs` around lines 51 - 59, The function get_dependents_recursively
currently takes ownership of pkg_name and res and re-clones res on each call and
lacks a visited guard, causing infinite recursion for circular dependency
graphs; change its signature to take &str or &String for pkg_name, take res by
reference (&Vec<(String,String)> or a slice) and add a visited HashSet<&str> (or
HashSet<String>) parameter plus a mutable dependents Vec parameter, check/infer
visited before recursing (mark pkg_name visited, skip if already present) and
remove all res.clone() uses—update all call sites to create and pass a mutable
visited set and the mutable dependents vector when invoking
get_dependents_recursively.

Updated usage examples and added contribution section.
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: 2

🤖 Fix all issues with AI agents
In `@README.md`:
- Line 16: The README header "### CommonJs" uses nonstandard casing; update the
header text (the line containing "### CommonJs") to use the standard "CommonJS"
spelling so it reads "### CommonJS" for consistency with Node.js docs and
project style.
- Around line 16-17: Add language identifiers to the fenced code blocks in
README.md so they satisfy MD040 and improve syntax highlighting: change the
CommonJs and ESM blocks containing "const { dag, getAffectedPkg } =
require('dag-rs');" and "import { dag, getAffectedPkg } from 'dag-rs';" to use
```js, and change the comment/example blocks containing "// dependents of
`@rocket.chat/fuselage` package" and "// dependent : dependency" to use ```text;
apply the same conversions to the other affected blocks referenced (lines around
the other snippets).

@Anxhul10 Anxhul10 merged commit 94addb4 into main Feb 7, 2026
9 checks passed
@Anxhul10 Anxhul10 deleted the feat/affected-pkg branch February 7, 2026 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add affected packages function

1 participant