// The `jsr:@denotest/add` dependency is rewritten to its npm-compat form
// (`npm:@jsr/denotest__add`) and installed into `node_modules` because
// `jsrDepsInNodeModules` is enabled in deno.json.
import { add } from "@denotest/add";

console.log("add:", add(1, 2));

// The package was materialized into node_modules under its npm-compat name...
console.log(
  "@jsr package in node_modules:",
  Deno.statSync("node_modules/@jsr/denotest__add").isDirectory,
);
// ...and aliased under its original `@scope/name` for external tooling.
console.log(
  "alias in node_modules:",
  Deno.statSync("node_modules/@denotest/add").isDirectory,
);

// A `.npmrc` was written so external tooling can resolve the `@jsr` scope.
console.log("--- .npmrc ---");
console.log(Deno.readTextFileSync(".npmrc").trim());
