nx
nx copied to clipboard
feat(js): add `srcRootForCompilationRoot` option to tsc executor
Current Behavior
Not support srcRootForCompilationRoot
option in @nrwl/js:tsc
executor.
This option have been existed on before package(@nrwl/node:package
).
Now, we can build directory structure like not dist/libs/<:libName>/<:moduleName>
but only dist/libs/<:libName>/src/<:moduleName>
by using @nwrl/js:tsc
.
Expected Behavior
We should be able to build directory structure like dist/libs/<:libName>/<:moduleName>
by srcRootForCompilationRoot
option(srcRootForCompilationRoot: libs/<:libName>/src
).
Related Issue(s)
Fixes https://github.com/nrwl/nx/issues/9410
☁️ Nx Cloud Report
CI is running/has finished running commands for commit 453b4d749bd78bf065e043a058ed68bb7012f589. 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
-
nx affected --target=build --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589 --parallel=3
-
nx affected --target=e2e --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589 --exclude=e2e-detox,e2e-js,e2e-next,e2e-workspace-create,e2e-workspace-integrations,e2e-workspace-core,e2e-react,e2e-web,e2e-angular-extensions,e2e-angular-core,e2e-cli,e2e-nx-plugin,e2e-cypress,e2e-node,e2e-linter,e2e-jest,e2e-a...
-
nx affected --target=e2e --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589 --exclude=e2e-storybook,e2e-react-native,e2e-detox --parallel=1
-
nx affected --target=lint --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589 --parallel=3
-
nx affected --target=test --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589 --parallel=1
-
nx build typedoc-theme
-
nx-cloud record -- yarn check-commit
-
nx-cloud record -- yarn check-imports
-
nx-cloud record -- yarn depcheck
-
nx-cloud record -- yarn documentation
-
nx-cloud record -- yarn nx format:check --base=9721844b053b2f0d12ede2bc9578e49b8c0fce1f --head=453b4d749bd78bf065e043a058ed68bb7012f589
-
nx-cloud record -- yarn nx workspace-lint
Sent with 💌 from NxCloud.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated |
---|---|---|---|
nx-dev | ✅ Ready (Inspect) | Visit Preview | Jun 11, 2022 at 2:44PM (UTC) |
Hi @nontangent , thank you for the contribution. Can you add some tests to verify the behavior of whether the srcRootForCompilationRoot
is provided or not?
@nartc Hi, I'd like to contribute but I don't know where should I put the test.
I took a look into the js package (library.spec.ts) but I don't know how I should proceed since the srcRootForCompilationRoot
is only used in the compileTypeScriptFiles
& there is no tests on it (at least inside the library.spec.ts).
Maybe you could give me a hint, where or how could I test this behaviour?
Thank you for reading! :)
@geofmigliacci thank you for the offer. Since it is a schema change to the tsc
executor, we'd have an e2e test for it.
You can look into: e2e/js/src/js.test.ts
to see how the current e2e are setup.
What we'd like to test is to verify the behavior when srcRootForCompilationRoot
is provided versus when it's not provided.
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.