Skip to content

Conversation

@yamcodes
Copy link
Owner

@yamcodes yamcodes commented Sep 9, 2025

Summary by CodeRabbit

  • Bug Fixes

    • Ensured port values are parsed as decimal to prevent misinterpretation.
  • Documentation

    • Overhauled arkenv package README with badges, installation guides, quickstart, and usage sections.
    • Added a reference in the root README to the arkenv package documentation.
  • Chores

    • Updated documentation plugin configuration for the website.
    • Simplified the release script.
    • Adjusted linter settings and added an inline lint ignore comment in styles to reduce noise.

- Moved README.md to packages/arkenv
- Updated documentation structure
- Improved documentation content
- Updated example configurations
- Updated plugins section
- Disabled `noUnknownAtRules` in Biome.
- Added radix to `parseInt` in `arkenv`.
- Added `!important` to octicon styles.
@changeset-bot
Copy link

changeset-bot bot commented Sep 9, 2025

⚠️ No Changeset found

Latest commit: 43ca8e5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link

vercel bot commented Sep 9, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
arkenv Ready Ready Preview Comment Sep 9, 2025 5:03pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 9, 2025

Walkthrough

Updates documentation across README files, adjusts release script, tweaks linter configuration and a CSS lint ignore, switches a remark plugin in docs source config, and makes Number.parseInt use an explicit base-10 radix in a port parser. No public APIs changed; no runtime control flow added.

Changes

Cohort / File(s) Summary
Docs updates
README.md, packages/arkenv/README.md
Root README references package README. Package README rewritten with badges, install instructions, quickstart, features, and links.
Release script
package.json
Simplifies release script by removing the step that moves README.md into packages/arkenv.
Linting & styling
biome.jsonc, apps/www/app/styles/components/github-alerts.css
Disables suspicious.noUnknownAtRules (off) and keeps noConsole at warn. Adds a biome-ignore comment for important styles in .octicon rule; no CSS behavior changes.
Docs site config
apps/www/source.config.ts
Replaces remarkInstall import and usage with remarkNpm from fumadocs-core/mdx-plugins.
Type parsing
packages/arkenv/src/types.ts
Changes Number.parseInt(data) to Number.parseInt(data, 10) in port type parsing; validation logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Rename from ark.env to ArkEnv #102 — Also modifies packages/arkenv/README.md and touches the release script related to moving the README, overlapping this PR’s docs and scripting changes.

Suggested labels

docs, arkenv

Pre-merge checks (2 passed, 1 inconclusive)

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description Check ❓ Inconclusive There is no pull request description provided to assess, so it is unclear whether it relates to these changes or adequately summarizes the proposed modifications. Please include or update the pull request description to briefly summarize the README relocation and other related changes to ensure clarity for reviewers.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title “Move readme” succinctly and accurately describes the primary change in this pull request, which is relocating and updating the README file and its references; it is concise, specific, and directly related to the main modifications without extraneous detail.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I thump my paws, a tidy hop—
README blooms, the badges pop.
Lints made calm, the consoles warn,
Ports parse true, in decimal born.
Plugins swapped, the pages sing—
Ship it swift on springy spring! 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch move-readme

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.

@github-actions github-actions bot added docs Improvements or additions to documentation arkenv Changes to the `arkenv` npm package. www Improvements or additions to arkenv.js.org labels Sep 9, 2025
Copy link
Contributor

@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

🧹 Nitpick comments (5)
biome.jsonc (1)

42-44: Don’t disable noUnknownAtRules globally; scope it to CSS.

Turning this off at the top-level can hide real at‑rule typos. Prefer an override for CSS only (or for folders using custom at‑rules).

Apply:

   "suspicious": {
-    "noConsole": "warn",
-    "noUnknownAtRules": "off"
+    "noConsole": "warn"
   },
@@
   "overrides": [
     {
       "includes": ["**/examples/**/*", "**/playground/**/*"],
       "linter": {
         "rules": {
           "suspicious": {
             "noConsole": "off"
           }
         }
       }
     },
+    {
+      "includes": ["**/*.css"],
+      "linter": {
+        "rules": {
+          "suspicious": {
+            "noUnknownAtRules": "off"
+          }
+        }
+      }
+    }
   ]
README.md (1)

1-1: Make the pointer a clickable link.

Improves UX on GitHub.

-packages/arkenv/README.md
+See the [ArkEnv README](packages/arkenv/README.md).

Note: Per repo guidelines, ensure environment requirements are documented in packages/arkenv/README.md.

packages/arkenv/src/types.ts (1)

6-14: Good: explicit radix. Consider rejecting mixed strings (e.g., "123abc").

parseInt accepts trailing junk; tighten to digits-only.

 export const port = type("string", "=>", (data, ctx) => {
-	const asNumber = Number.parseInt(data, 10);
+	const raw = data.trim();
+	if (!/^\d+$/.test(raw)) {
+		ctx.mustBe("a string containing only decimal digits");
+	}
+	const asNumber = Number.parseInt(raw, 10);
 	const isInteger = Number.isInteger(asNumber);
 	const isBetween = 0 <= asNumber && asNumber <= 65535;
 	if (!isInteger || !isBetween) {
 		ctx.mustBe("an integer between 0 and 65535");
 	}
 	return asNumber;
 });

Add a test to lock behavior:

it("rejects non-digit content", () => {
  expect(() => port.assert("123abc")).toThrow();
});
apps/www/app/styles/components/github-alerts.css (1)

96-99: Local ignore is OK; consider avoiding !important.

If possible, raise specificity (e.g., .markdown-alert-title .octicon) to drop !important.

packages/arkenv/README.md (1)

73-74: Clarify README’s “Lightweight” claim and note ArkType peer dependency

At packages/arkenv/README.md lines 73–74, replace the snippet with:

- 🪶 **Lightweight**: Only a single dependency ([5.6 kB](https://bundlephobia.com/package/[email protected]))
+ 🪶 **Lightweight**: Small install size (see the bundle size badge).
+ Note: ArkType is required alongside ArkEnv.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0a7fdbe and 43ca8e5.

📒 Files selected for processing (8)
  • README.md (0 hunks)
  • README.md (1 hunks)
  • apps/www/app/styles/components/github-alerts.css (1 hunks)
  • apps/www/source.config.ts (2 hunks)
  • biome.jsonc (1 hunks)
  • package.json (1 hunks)
  • packages/arkenv/README.md (1 hunks)
  • packages/arkenv/src/types.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/README.md

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Document environment requirements in README files

Files:

  • packages/arkenv/README.md
  • README.md
🧬 Code graph analysis (1)
packages/arkenv/src/types.ts (2)
packages/arkenv/src/scope.test.ts (2)
  • portType (28-31)
  • portType (22-26)
packages/arkenv/src/types.test.ts (2)
  • port (19-19)
  • it (4-21)
🔇 Additional comments (1)
apps/www/source.config.ts (1)

1-1: Confirm plugin availability in fumadocs-core
Ensure that version 15.7.10 of fumadocs-core actually exports remarkNpm from its mdx-plugins entry point and that no extra configuration options are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arkenv Changes to the `arkenv` npm package. docs Improvements or additions to documentation www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants