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

fix(js): generate ts standalone project with better import path #18197

Merged
merged 1 commit into from
Jul 25, 2023

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jul 19, 2023

This PR fixes an issue with standalone TS projects (npx create-nx-workspace --preset=ts-standalone) where the name in package.json is invalid.

Current Behavior

The name is something like @acme/.

Expected Behavior

The name should be the name of the folder (e.g. acme).

Related Issue(s)

Fixes #

@jaysoo jaysoo requested review from a team as code owners July 19, 2023 19:06
@vercel
Copy link

vercel bot commented Jul 19, 2023

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

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 24, 2023 1:05pm

@jaysoo jaysoo force-pushed the fix/ts-standalone-import-path branch 3 times, most recently from d712335 to 326f5d4 Compare July 21, 2023 17:25
@jaysoo jaysoo force-pushed the fix/ts-standalone-import-path branch from 326f5d4 to 7489074 Compare July 24, 2023 13:02
@jaysoo jaysoo requested a review from a team as a code owner July 24, 2023 13:02
@jaysoo jaysoo requested a review from Coly010 July 24, 2023 13:02
@@ -79,7 +79,7 @@ describe('Storybook generators and executors for standalone workspaces - using R
writeFileSync(
tmpProjPath(`src/app/test-button.tsx`),
`
import { MyLib } from '@${appName}/my-lib';
import { MyLib } from 'my-lib';
Copy link
Member Author

Choose a reason for hiding this comment

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

Since the standalone app isn't scoped by default now (just the app's name in package.json), the library does not default to a scope either.

@jaysoo jaysoo requested a review from mandarini July 24, 2023 18:38
@FrozenPandaz FrozenPandaz merged commit 810b584 into nrwl:master Jul 25, 2023
@jaysoo jaysoo deleted the fix/ts-standalone-import-path branch July 26, 2023 13:28
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

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 Aug 1, 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.

4 participants