Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): support targets with colons in the name without quotes #13938

Conversation

AgentEnder
Copy link
Member

See #13914

@vercel
Copy link

vercel bot commented Dec 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
nx-dev ✅ Ready (Inspect) Visit Preview Dec 28, 2022 at 7:53PM (UTC)

@nx-cloud
Copy link

nx-cloud bot commented Dec 20, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 705e62f. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 12 targets

Sent with 💌 from NxCloud.

docs/generated/devkit/index.md Outdated Show resolved Hide resolved
const parsedBrowserTarget = parseTargetString(options.browserTarget);
const parsedBrowserTarget = parseTargetString(
options.browserTarget,
readCachedProjectGraph()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
readCachedProjectGraph()
context.projectGraph

Copy link
Member Author

Choose a reason for hiding this comment

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

This doesn't exist in this one... Its an angular builder.

packages/nx/src/project-graph/project-graph-builder.ts Outdated Show resolved Hide resolved
packages/nx/src/utils/split-target.spec.ts Outdated Show resolved Hide resolved
Copy link
Member

@vsavkin vsavkin left a comment

Choose a reason for hiding this comment

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

The change is good. Two small things:

  • We should not change the interface of a core object just for tests.
  • Loops in tests is a bad idea.

@@ -28,7 +28,7 @@ export class ProjectGraphBuilder {
/**
* Adds a project node to the project graph
*/
addNode(node: ProjectGraphProjectNode): void {
addNode<T extends ProjectGraphProjectNode>(node: T) {
Copy link
Member

Choose a reason for hiding this comment

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

Why is this required ?

@@ -1,14 +1,44 @@
import { ProjectGraph, ProjectGraphProjectNode } from '../config/project-graph';
import { ProjectConfiguration } from '../config/workspace-json-project-json';
import { ProjectGraphBuilder } from '../project-graph/project-graph-builder';
import { splitTarget } from './split-target';

const cases = [
Copy link
Member

Choose a reason for hiding this comment

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

remove the loop. inline everything.

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants