Navigation Menu

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): add option importPath to workspace remove library #9486

Merged
merged 3 commits into from Mar 28, 2022

Conversation

swuendri
Copy link
Contributor

If importPath was specified on library creation time you should importPath also specify on deletion.

Current Behavior

Create a workspace which npmScope is workspace-7148

npx create-nx-workspace workspace-7148

Create a library with --importPath but with different scope

npx nx g lib --name=foo --buildable --publishable --importPath=@workspace/components

Remove library

npx nx g @nrwl/workspace:remove --projectName=foo

Wrong content in tsconfig.base.json

The file still contains

"paths": {
      "@workspace/components": ["libs/foo/src/index.ts"]
 }

Expected Behavior

Right content in tsconfig.base.json

With option --importPath at @nrwl/workspace:remove it's possible to remove paths entry.

So running npx nx g @nrwl/workspace:remove --projectName=foo --importPath=@workspace/components should result in

"paths": {}

Related Issue(s)

(#7148)

If importPath was specified on library creation time you should importPath also specify on deletion.
@nx-cloud
Copy link

nx-cloud bot commented Mar 23, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 08e4bbc. 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 7 targets

Sent with 💌 from NxCloud.

@vercel
Copy link

vercel bot commented Mar 23, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/8byEXSgfmyXunD8kFny69EMAXdqV
✅ Preview: https://nx-dev-git-fork-swuendri-addimportpathtoworkspaceremove-nrwl.vercel.app

@bcabanes bcabanes merged commit 0ad3eb3 into nrwl:master Mar 28, 2022
@swuendri swuendri deleted the add_import_path_to_workspace_remove branch April 1, 2022 20:01
sidmonta pushed a commit to sidmonta/nx that referenced this pull request Apr 2, 2022
)

Co-authored-by: Sven Wuendrich <sven.wuendrich@ottogroup.com>
@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 18, 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.

None yet

2 participants