Skip to content

feat: remove CLI package.json "arkenv" schema pointer - #1909

Merged
yamcodes merged 4 commits into
v1from
cursor/remove-pkg-json-arkenv-pointer-9b8e
Sep 21, 2026
Merged

yamcodes merged 4 commits into
v1from
cursor/remove-pkg-json-arkenv-pointer-9b8e

Conversation

@yamcodes

@yamcodes yamcodes commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Fixes #1906

Summary

Removes the CLI package.json "arkenv" schema pointer (Option B, locked on the issue). Schema discovery is now --schema / -s → convention paths only. Leftover "arkenv" keys are ignored.

Changes

  • CLI: Stop writing the pointer on init; stop reading it in resolveSchemaPath; drop readArkenvConfig and unused findPackageJson from the project scanner port/adapter
  • Docs: Update check reference and migrating-to-v1; add ADR 0033; glossary + ArkEnv skill alignment
  • Tests: Convention / --schema / ignored leftover field / no write-on-init (npm plan so pnpm whitelisting does not rewrite package.json)
  • Changeset: major for arkenv with migration to --schema

Migration

{
  "scripts": {
    "check": "arkenv check --schema config/env.ts"
  }
}

Review follow-ups

  • Executor test uses an npm install plan so the no-pointer assertion is exact
  • resolveSchemaPath unit test asserts convention preference instead of a vacuous mock check
  • Removed dead findPackageJson after readArkenvConfig removal
Open in Web Open in Cursor 

Stop writing and reading package.json "arkenv" for schema discovery.
CLI location is --schema then convention paths only (fixes #1906).

Co-authored-by: Yam Borodetsky <hi@yam.codes>
@changeset-bot

changeset-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f230bdc

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

This PR includes changesets to release 1 package
Name Type
arkenv Major

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

@yamcodes yamcodes added @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI arkenv Changes to the `arkenv` npm package. docs Adds or changes documentation, or acts as documentation in and of itself enhancement New feature or improvement labels Sep 21, 2026 — with Cursor
@github-actions github-actions Bot added www Improvements or additions to arkenv.js.org tests This issue or PR is about adding, removing or changing tests and removed @arkenv/cli Issues or Pull Requests involving the ArkEnv CLI labels Sep 21, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 21, 2026

Copy link
Copy Markdown

Open in StackBlitz

@arkenv/agent-plugin

npm i https://pkg.pr.new/@arkenv/agent-plugin@1909

arkenv

npm i https://pkg.pr.new/arkenv@1909

@arkenv/build

npm i https://pkg.pr.new/@arkenv/build@1909

@arkenv/bun-plugin

npm i https://pkg.pr.new/@arkenv/bun-plugin@1909

@arkenv/core

npm i https://pkg.pr.new/@arkenv/core@1909

@arkenv/fumadocs-ui

npm i https://pkg.pr.new/@arkenv/fumadocs-ui@1909

@arkenv/nextjs

npm i https://pkg.pr.new/@arkenv/nextjs@1909

@arkenv/nuxt

npm i https://pkg.pr.new/@arkenv/nuxt@1909

@arkenv/rsbuild-plugin

npm i https://pkg.pr.new/@arkenv/rsbuild-plugin@1909

@arkenv/standard

npm i https://pkg.pr.new/@arkenv/standard@1909

@arkenv/tanstack-addon

npm i https://pkg.pr.new/@arkenv/tanstack-addon@1909

@arkenv/vite-plugin

npm i https://pkg.pr.new/@arkenv/vite-plugin@1909

commit: f230bdc

autofix-ci Bot and others added 2 commits September 21, 2026 05:55
Tighten the scaffold assertion so pnpm-only package.json writes still
pass, and apply biome formatting from validation.

Co-authored-by: Yam Borodetsky <hi@yam.codes>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

The new executor.test.ts case fails on this branch (expected [ [ 'package.json', … ] ] to have a length of +0 but got 1), so the unit-test check will be red until it is fixed.

Reviewed changes

  • CLI schema discovery: resolveSchemaPath now resolves only --schema/-s → convention candidates; the package.json "arkenv" read and the ProjectScannerPort.readArkenvConfig port/adapter method are removed.
  • Scaffold cleanup: Executor.configurePackageJsonArkenv and its call site are gone, so arkenv init no longer writes the pointer (configurePnpmBuilds still rewrites package.json for pnpm whitelisting).
  • Docs & glossary: check reference, migrating-to-v1, new ADR 0033, docs/CONTEXT.md "Schema location", the ADR index row, and skills/arkenv/SKILL.md all describe --schema + convention only.
  • Tests: new coverage for convention discovery, --schema, ignored leftover pointer, and no pointer write on init — but one case cannot pass as written (inline).
  • Changeset: major for arkenv with a --schema migration snippet.

ℹ️ Nitpicks

  • ProjectScannerPort.findPackageJson (packages/arkenv/src/shared/ports/project-scanner.port.ts:109) and its NodeProjectScannerAdapter implementation lost their only caller with readArkenvConfig; they are now unused and could be removed in the same cleanup.
  • The new row in docs/adr/README.md:39 is padded to the old column width, so the "CLI / scaffold IR" row no longer aligns with the rest of the table.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread packages/arkenv/src/features/scaffold/executor.test.ts Outdated
Comment thread packages/arkenv/src/features/schema-loader/resolve-schema-path.test.ts Outdated
Use an npm scaffold plan so the no-pointer assertion is exact, drop the
vacuous scanner mock check, and remove unused findPackageJson.

Co-authored-by: Yam Borodetsky <hi@yam.codes>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues from the follow-up commits. The prior blocking test failure is fixed and verified; one minor prior test-quality note remains open.

Reviewed changes (since a01634a)

  • Prior blocking finding fixed: executor.test.ts now parses each package.json write and asserts the parsed object has no arkenv property, instead of requiring zero writes — so the legitimate pnpm whitelisting rewrite no longer trips the test. executor.test.ts and resolve-schema-path.test.ts pass locally (21 tests).
  • ADR index alignment: the "CLI / scaffold IR" row in docs/adr/README.md is re-padded to the table width.
  • Formatting: Biome autofix on help.ts and resolve-schema-path.test.ts (line wrapping only).

The unaddressed thread at packages/arkenv/src/features/schema-loader/resolve-schema-path.test.ts:54-57 (tautological assertion) remains open and is non-blocking.

Pullfrog  | Fix it ➔View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found. All prior feedback is addressed.

Reviewed changes (since 8f4a79c)

  • Executor no-write test: now runs an npm install plan so configurePnpmBuilds cannot rewrite package.json, and asserts zero package.json writes — restoring the exact assertion. Verified passing.
  • resolveSchemaPath test: the vacuous "readArkenvConfig" in scanner check is replaced by a real convention-preference assertion (env.ts over an off-convention sibling). Verified passing.
  • Dead code removed: ProjectScannerPort.findPackageJson and its NodeProjectScannerAdapter implementation are deleted (the port now ends at checkGitStatus); a repo-wide grep for readArkenvConfig|findPackageJson returns nothing, and tsc --noEmit for packages/arkenv is clean.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@yamcodes
yamcodes merged commit a98f6c0 into v1 Sep 21, 2026
18 checks passed
@yamcodes
yamcodes deleted the cursor/remove-pkg-json-arkenv-pointer-9b8e branch September 21, 2026 06:51
@arkenv-bot arkenv-bot Bot mentioned this pull request Sep 21, 2026
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 Adds or changes documentation, or acts as documentation in and of itself enhancement New feature or improvement tests This issue or PR is about adding, removing or changing tests www Improvements or additions to arkenv.js.org

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove CLI package.json "arkenv" schema pointer

2 participants