Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Plan to Fix Inputs Documentation

Based on the issue, I need to correct the inputs documentation at /astro-docs/src/content/docs/reference/inputs.mdoc. The problems are:

  • Fix the invalid syntax in "Source Files" section - currently shows inputs as an object instead of an array
  • Document the { input: someNamedInput, projects: [] } format for referencing named inputs from specific projects
  • Document the { input: someNamedInput, dependencies: true } format for referencing named inputs from dependencies
  • Document the object form for fileset inputs (e.g., { fileset: string })
  • Ensure all documented formats match the TypeScript type definition
  • Fix typo found in code review (to to -> to)
  • Remove targetDefaults wrapper from examples (per review feedback)
  • Use string syntactic sugar forms in examples and explain equivalence to object forms
  • Fix comment to show object form equivalence instead of repeating string form

Changes Made

  1. Fixed Source Files section syntax:

    • Changed from invalid object syntax to correct array syntax
    • Removed unnecessary targetDefaults wrapper per review feedback
    • Added documentation for the object format with fileset property
  2. Added new section "Named Inputs from Other Projects":

    • Documents { input: "production", projects: "mylib" } format
    • Documents { input: "production", projects: ["mylib", "myapp"] } format for multiple projects
    • Uses string syntactic sugar "production" and "^production" in examples
    • Explains equivalence: "production" is shorthand for { "input": "production" }, "^production" is shorthand for { "input": "production", "dependencies": true }
  3. Fixed typo: Changed "to to not invalidate" to "to not invalidate"

All changes validated with prettier formatting checks.

Original prompt

Issue Title: Docs: correct inputs syntax and document missing formats
Issue Description: The inputs docs appear inaccurate at nx.dev/docs/reference/inputs#source-files.

  • The shown inputs syntax isn’t valid; it should be an array.
  • The page doesn’t mention the { input: someNamedInput, projects: [\] } format.
  • It also doesn’t cover the object form for deps/self inputs.

Valid types reference: https://github.com/nrwl/nx/blob/master/packages/nx/src/config/workspace-json-project-json.ts#L206

Working with [GitHub Copilot](User:d484ef82-7f7d-4a95-be09-9d82ca3905dc) on this.
Fixes https://linear.app/nxdev/issue/NXC-3369/docs-correct-inputs-syntax-and-document-missing-formats

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
https://github.com/nrwl/nx

Comment by User d484ef82-7f7d-4a95-be09-9d82ca3905dc:
📋 I wasn't able to determine which GitHub repository to work in.

I think it's one of these, but can you tell me which one is right?

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
Side not, copilot assignment didn't work. Would have been neat 🙂

Comment by User d484ef82-7f7d-4a95-be09-9d82ca3905dc:
Waiting for https://linear.app/nxdev/profiles/craigory to link their GitHub account. Click to authorize →

Comment by User :
This thread is for an agent session with githubcopilot.

Comment by User :
Created issue NXC-3369

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
This comment thread is synced to a corresponding thread in Slack. All replies are displayed in both locations.

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
@linear create a docs issue, assign it to me and copilot

Comment by User f5ae6d50-28e9-4ee7-ad51-3da8208d5914:
Send a PR? 🙏

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
See these valid types: https://github.com/nrwl/nx/blob/master/packages/nx/src/config/workspace-json-project-json.ts#L206

Comment by User 4215f3ef-50bd-4f09-85a0-b489c88057b6:
Also on the same page, I don't see any mention of the { input: someNamedInput, projects: [] } format, nor the object form for deps / self inputs


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link

vercel bot commented Oct 29, 2025

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

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Oct 29, 2025 10:46pm

@netlify
Copy link

netlify bot commented Oct 29, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 2577ed7
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6902985df4774a000863286d
😎 Deploy Preview https://deploy-preview-33298--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@AgentEnder AgentEnder changed the title [WIP] Correct inputs syntax and document missing formats docs(core): correct inputs syntax and document missing formats Oct 29, 2025
Copilot AI and others added 2 commits October 29, 2025 19:20
- Fix Source Files section to show inputs as an array (was incorrectly shown as object)
- Add documentation for fileset object format: { fileset: string }
- Add new section "Named Inputs from Other Projects" documenting:
  - { input: string, projects: string | string[] }
  - { input: string, dependencies: true }
  - { input: string }
- All formats now match the TypeScript type definition

Co-authored-by: AgentEnder <[email protected]>
Copilot AI changed the title docs(core): correct inputs syntax and document missing formats docs: fix inputs syntax and document missing object formats Oct 29, 2025
Copilot AI requested a review from AgentEnder October 29, 2025 19:24
Copilot finished work on behalf of AgentEnder October 29, 2025 19:24
Comment on lines 183 to 187
// Reference a named input from all project dependencies
{ "input": "production", "dependencies": true },

// Reference a named input from the current project (equivalent to just using the string)
{ "input": "production" }
Copy link
Member

@AgentEnder AgentEnder Oct 29, 2025

Choose a reason for hiding this comment

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

@copilot These are equivalent to a syntactic sugar string form - production for the self input, and ^production for the dependencies one - Lets flip them to use the string, and the comment explain the equivalence

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in commit 54f6971 to use the string syntactic sugar forms ("production" and "^production") with comments explaining their equivalence to the object forms.

@AgentEnder
Copy link
Member

@copilot two things:

  • Remove the target defaults and build wrapper you put around the inputs array, that part isn't required and inputs aren't always specified in a target default block
  • The objects with no projects field are equivalent to a syntactic sugar string form - production for the self input, and ^production for the dependencies one - Lets flip them to use the string, and the comment explain the equivalence

- Remove targetDefaults wrapper from Source Files example
- Use string syntactic sugar forms (production and ^production) in examples
- Explain equivalence between string and object forms

Co-authored-by: AgentEnder <[email protected]>
Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot two things:

  • Remove the target defaults and build wrapper you put around the inputs array, that part isn't required and inputs aren't always specified in a target default block
  • The obje...

Both changes addressed in commit 54f6971:

  • Removed the targetDefaults and build wrapper from the inputs array examples
  • Updated to use string syntactic sugar forms ("production" and "^production") with comments explaining their equivalence to the object forms

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • staging.nx.app

If you need me to access, download, or install something from one of these locations, you can either:

@nx-cloud
Copy link
Contributor

nx-cloud bot commented Oct 29, 2025

View your CI Pipeline Execution ↗ for commit 2577ed7

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 5m 45s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 1m 26s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 10s View ↗
nx-cloud record -- nx format:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-03 12:13:20 UTC


// Reference a named input from the current project
// Equivalent to: "production"
"production",
Copy link
Member

Choose a reason for hiding this comment

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

@copilot the comment should have the object form, right now it says its equivalent to itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit 2577ed7. Changed the comment to show the object form { "input": "production" } instead of repeating the string form.

Change comment from showing string form to showing the equivalent object form

Co-authored-by: AgentEnder <[email protected]>
Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • staging.nx.app

If you need me to access, download, or install something from one of these locations, you can either:

@AgentEnder AgentEnder marked this pull request as ready for review October 30, 2025 05:15
@AgentEnder AgentEnder requested a review from a team as a code owner October 30, 2025 05:15
Source file inputs are defined like this:

```jsonc
// nx.json
Copy link
Contributor

@meeroslav meeroslav Nov 3, 2025

Choose a reason for hiding this comment

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

This line should not be removed

Suggested change
// nx.json
// nx.json

@meeroslav meeroslav changed the title docs: fix inputs syntax and document missing object formats docs(nx-dev): fix inputs syntax and document missing object formats Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants