Skip to content

Detect platforms in packages without a name - #151

Merged
marcospassos merged 1 commit into
masterfrom
fix/unnamed-package-manifest
Sep 9, 2026
Merged

marcospassos merged 1 commit into
masterfrom
fix/unnamed-package-manifest

Conversation

@marcospassos

Copy link
Copy Markdown
Member

The npm manifest schema required name, so a package.json without one (common in private apps) failed validation and readManifest returned null. Every dependency check then reported false, and detection fell through to the JAVASCRIPT candidate, whose predicate only checks that package.json exists.

A Nuxt app was reported as a plain JS project. The same applied to Next.js, React, Vue and Hydrogen, as well as to getScripts and server command detection.

name is now optional, matching the Composer manifest schema, and getDependency falls back to the requested name.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

👋 @marcospassos
Thanks for your contribution!
The approval and merge process is almost fully automated 🧙
Here's how it works:

  1. You open a new pull request
  2. Automated tests check the code
  3. Maintainers review the code
  4. Once approved, the PR is ready to merge.

👉 Omit the extended description
Please remove the commit body before merging the pull request.
Instead, include the pull request number in the title to provide the full context
about the change.

☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in 50 characters or less using the imperative mood.
Happy coding! 🎉

@marcospassos marcospassos added the bug Something isn't working label Sep 9, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/croct@151

commit: 05db713

@marcospassos
marcospassos merged commit 4eddcd6 into master Sep 9, 2026
7 of 9 checks passed
@marcospassos
marcospassos deleted the fix/unnamed-package-manifest branch September 9, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant