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): switch over to angular 10 #3056
Conversation
29449a0
to
afcbd3f
Compare
afcbd3f
to
08179d6
Compare
d6824b9
to
81b107b
Compare
13b2a0d
to
b73806f
Compare
e53dfec
to
b552ee7
Compare
91e2398
to
6061bed
Compare
cdf05e1
to
f78c91b
Compare
@@ -696,6 +696,12 @@ export default function (schema: Schema): Rule { | |||
addLintFiles(options.appProjectRoot, options.linter, { | |||
onlyGlobal: true, | |||
}), | |||
// TODO: Remove this after Angular 10.1.0 | |||
updateJsonInTree('tsconfig.json', () => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this reqiured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Angular schematics try to modify a tsconfig.json
solution in the root of the repository. In 10.1.0
they will change it to having a tsconfig.json
in the project directory.
For now, this is a hack that adds a tsconfig.json
to the tree for the schematic to modify then deletes it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FrozenPandaz currently this hack is breaking my workspace schematic that is leveraging @nrwl/angular
to generate a new application in the project, even though angular 10.2.x
is used.
The problem is tsconfig.json
in the repository root got deleted after creating a new app with the workspace schematic. But tsconfig.json
is still referenced by other existing apps.
For now, I cannot upgrade my repo to use Angular/Nx 11 due to some other libs sticking to Angular 10.
Do you think it's ok to remove this hack in Nx 10.x to support this scenario? Thanks!
const content = updateJestConfigContent(originalContent); | ||
host.overwrite(configPath, content); | ||
}; | ||
: chain([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this inlined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds files
that can't be in a solution style tsconfig.json
to the tsconfig.spec.json
.
The tsconfig.spec.json
is created by the jest-project
schematic so this updates it after it's done.
if (workspace.projects.get(context.target.project).sourceRoot) { | ||
return workspace.projects.get(context.target.project).sourceRoot; | ||
export async function getSourceRoot(context: BuilderContext): Promise<string> { | ||
const projectMeta = await context.getProjectMetadata(context.target.project); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
}; | ||
} | ||
|
||
export default function (schema: any): Rule { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
} | ||
const dirEntry = host.getDir(_dir); | ||
dirEntry.subfiles.forEach((file) => { | ||
if (ig.ignores(join(_dir, file))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the ignored above should be sufficient. The recursive call will return nothing if it's ignored, right?
1813ecd
to
2648b88
Compare
2648b88
to
2acdd7b
Compare
2acdd7b
to
11bc85f
Compare
* feat(core): switch over to devkit 10-rc.0 * feat(core): implement solution tsconfigs wip * feat(angular): add angular migrations * fix(angular): modify angularjs tests
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. |
Current Behavior (This is the behavior we have today, before the PR is merged)
We use angular-devkit 9.1
There's 1
tsconfig.json
per project which is used by editors to typecheck files which doesn't catch things likedescribe
andit
being used in application code.The version of rxjs is 6.5.4
Expected Behavior (This is the new behavior we can expect after the PR is merged)
We use angular 10 + angular-devkit 10
The
tsconfig.json
of a project is now a solution tsconfig.json which has references to othertsconfig
files which are used for builds and linting.The version of rxjs is 6.5.5
Issue