159 Commits

Author SHA1 Message Date
Julien Marcou
7cbbf2f2ba fix(@schematics/angular): remove vscode testing configurations for minimal workspaces
Remove the `ng test` VS Code task and `npm test` VS Code launch configuration from the workspace
when building minimal workspaces.

Fixes #23360
2022-06-15 09:51:36 +02:00
Charles Lyding
291bbffcc9 refactor(@schematics/angular): use string helper re-export from @angular-devkit/schematics
By using the `strings` re-export from `@angular-devkit/schematics` instead of from `@angular-devkit/core`,
the number of imports from `@angular-devkit/core` has been reduced and lowers the direct dependency count
for many of the individual schematics.
2022-04-22 11:31:53 -04:00
Charles Lyding
c927c038ba fix(@schematics/angular): remove @types/node from new projects
The `@types/node` package is now only added if E2E tests (`ng generate e2e`) or universal are added to a project.
2022-03-16 10:09:51 -04:00
Alan Agius
9ddb220c3d docs: replace app with application 2022-03-14 10:03:06 -04:00
Alan Agius
69ecddaa7d feat(@schematics/angular): update new and existing projects compilation target to ES2020
With this change we update the TypeScript compilation target to `ES2020` for both new and existing projects. This is because all browsers that Angular supports (https://angular.io/guide/browser-support) support `ES2020` features without the need for polyfills.
2022-01-28 11:01:09 -08:00
Kasper Christensen
08152f78b2 refactor(@schematics/angular): changed casings and small reorganizing
Removed profiling files

Removed chrome-profiler-events*.json as it's no longer generated.
2022-01-12 10:04:47 -08:00
Alan Agius
d5d9f042f2 feat(@schematics/angular): add VS Code configurations when generating a new workspace
When generating a new workspace we now generate several VS Code configurations.

- extensions: we added config to recommand to use official VS Code extensions.
- launch: added run and debug launch scripts for `ng test` and `ng serve`
- tasks: configured `npm start` and `npm test` to better support the launch scripts

More information about each files can be found
- extensions: https://go.microsoft.com/fwlink/?linkid=827846
- launch: https://go.microsoft.com/fwlink/?linkid=830387
- tasks: https://go.microsoft.com/fwlink/?LinkId=733558

Closes #2672
2021-11-18 06:44:24 +01:00
Alan Agius
21809e14cd feat(@schematics/angular): loosen project name validation
With this change we update the validation of the libraries and application projects names to fully allow characters that make a valid NPM package name. http://json.schemastore.org/package has been used as reference.

We also remove validators that are no longer needed.

Closes #11051
2021-11-16 10:51:10 +00:00
Alan Agius
6cb033e1c7 fix(@angular-devkit/build-angular): update workspace tsconfig lib es2020 2021-10-08 14:40:54 +02:00
Alan Agius
7ff8c5350e feat(@schematics/angular): add /.angular/cache to .gitignore
With this change we add `/.angular/cache` to `.gitignore`. This folder will primary be used to store the build disk cache artifacts.
2021-10-06 08:02:22 -05:00
Alan Agius
3ba13f467c feat(@schematics/angular): add noImplicitOverride and noPropertyAccessFromIndexSignature to workspace tsconfig
With this change, when the workspace is created in strict mode (the default) we add the following  additional tsconfig options;
- [noImplicitOverride](https://www.typescriptlang.org/tsconfig#noImplicitOverride)
- [noPropertyAccessFromIndexSignature](https://www.typescriptlang.org/tsconfig#noPropertyAccessFromIndexSignature)

Closes #21279
2021-08-09 20:02:19 +02:00
Alan Agius
14df2aaef9 refactor(@schematics/angular): sync schematics dependencies using Renovate
With this change we sync workspace and library schematic dependencies using Renovate. We do this to avoid having to keep these in sync by hand.

We could have used TypeScripts' `resolveJsonModule` to make the `latestVersion` object typesafe. But `ts_library` doesn't support JSON inputs.
2021-07-20 18:58:29 +02:00
Alan Agius
0907b69417 fix(@schematics/angular): use stricter semver for karma-jasmine-html-reporter
This is not the first time, that this package caused a breaking change in a minor version, were it drops support for older `jasmine-core` versions.

Related to #21326
2021-07-12 16:40:12 +01:00
Alan Agius
52034151b2 build: update @types/jasmine and jasmine for new projects 2021-07-09 17:02:52 +01:00
Keen Yee Liau
74be7280ce docs(@schematics/angular): clarify that users need to install ng e2e builder
This commit adds a sentence to clarify that users need to install a `ng e2e`
builder when invoking the command for the first time.
2021-05-14 08:30:04 +02:00
Alan Cohen
ff752951b0 fix(@schematics/angular): remove --prod option from README template
Angular 12 defaults `ng build` to use `--production configuration` (formerly `--prod`)
2021-05-14 07:36:34 +02:00
Charles Lyding
c1512e4274 build: update files to be eslint compliant
All TypeScript files have been updated to pass the new eslint-based linting checks. eslint compatible disabling comments have also been added in place of the previous tslint comments.
2021-05-03 07:31:02 -04:00
Charles Lyding
37a06a7c37 build: format all files
All files are now formatted using the ng-dev tools via prettier.
2021-04-28 16:05:49 -07:00
Joey Perrott
003854257c build: migrate all file header to use Google LLC rather than Google Inc 2021-04-27 08:35:22 +02:00
Santosh Yadav
27bab2a66f fix(@schematics/angular): remove lint command from package.json
Angular 12 does not provide the default linter but CLI adds the ng lint
this PR removes the ng lint from new app created

Fixes #20618
2021-04-25 10:21:16 +02:00
cexbrayat
29cf8125ca fix(@schematics/angular): remove jasmine-spec-reporter and ts-node from default workspace
The dependencies are only needed for protractor tests, so they should only be added by the e2e schematics.
2021-04-22 10:56:36 +02:00
Keen Yee Liau
49ba5e20aa refactor(@schematics/angular): Do not include Protractor test in new project
Do not include Protractor for new projects since we do not have a concrete
plan for Protractor yet.
2021-04-21 12:38:46 -07:00
Keen Yee Liau
5a57fea36b docs(@schematics/angular): add README and update description in schema
Create README for the package, and add missing description in some schema.
2021-04-19 20:34:35 +02:00
Alan Agius
076ab0f11f refactor: add correct schema keys
With this change
- We replace `id` with `$id`,  this no longer valid in draft-07.
- Replace all `$schemas` to `http://json-schema.org/draft-07/schema`, this is needed to "pin" the schema to `draft-07`.

More information about `draft-07` can be found https://json-schema.org/draft-07/json-schema-release-notes.html
2021-04-13 10:51:12 -04:00
Alan Agius
84e0231208 feat(@schematics/angular): update jasmine-spec-reporter to version 7 2021-04-12 05:51:39 -04:00
Alan Agius
f22f7e7371 feat(@schematics/angular): update new workspaces to use Karma 6.3 2021-03-24 13:35:25 -04:00
Alan Agius
09daf7a7e0 fix(@schematics/angular): remove leftover workspace tslint config 2021-03-22 09:16:05 -04:00
Alan Agius
617e038a0a build: update jasmine-core to version 3.7.0 2021-03-18 10:43:39 +01:00
Alan Agius
226a8d274d feat(@schematics/angular): remove tslint and codelyzer from new projects
Both of these projects and the tslint builder are deprecated.

Closes #20105 and closes #18465
2021-03-16 15:49:46 +01:00
Alan Agius
81129e12d0 feat(@schematics/angular): update several TypeScript compilation target (Syntax)
With this change we update the TypeScript target of server compilation unit for new projects.

- E2E target has been update from `es2018` to `es2019`
- Browser target has been update from `es2015` to `es2017`
- Server target has been update from `es2016` to `es2019`
2021-03-15 20:31:25 +01:00
Alan Agius
7711e12b8e build: update karma to version 6.2.0 2021-03-11 08:37:42 +01:00
Charles Lyding
d0c3cb1fdc refactor(@schematics/angular): remove unneeded speed-measure-plugin output from gitignore
With the removal of the `speed-measure-plugin` from the build system, the file no longer needs to be ignored by git in new projects.
2021-03-10 08:19:56 -06:00
Alan Agius
ba6f546a02 fix(@schematics/angular): add additionalProperties to all schemas 2021-03-10 08:17:50 -06:00
Alan Agius
1de6d71edd feat(@schematics/angular): production builds by default
With this change we do several changes to the `angular.json` configuration for `build` , `server` and `app-shell` targets so that these are `production` by default.

- build, server and app-shell targets are configured to run production by default.
- We add a new configuration named `development` to run the mentioned builder targets in development. Ex: `ng build --configuration development`.
- When adding `universal` or `app-shell`, we generate the full set of configurations as per the `buiid` target. Previously, we only generated the `production` configuration.
- We added a helper script in `package.json` to run build in watch mode. `npm run watch` which is a shortcut for `ng build --watch --configuration development`
2021-03-10 08:16:38 -06:00
Alan Agius
d19d2ccae5 feat(@schematics/angular): update new project dependencies version
Closes #20106
2021-02-22 15:55:49 +01:00
Alan Agius
b105ed63c7 feat(@schematics/angular): strict mode by default
With this change we workspaces are generated strict by default. To create non-strict workspace the `--no-strict` command line option.
2021-02-11 12:27:50 -05:00
Alan Agius
d3a36355fb build: update karma to version ~6.1.0 2021-02-03 09:57:21 +01:00
Charles Lyding
eba0973e10 feat(@schematics/angular): create new projects with karma 6.0
Newly generated projects will now use karma 6.0 by default.
2021-01-13 23:12:55 +01:00
Oleksii Potiekhin
99756614aa fix(@schematics/angular): remove unnecessary scripts and dependencies
When new application is generated with --minimal flag it will be
created without any testing frameworks, linters, etc. But package.json
still contains broken scripts and dependencies.

So "test": "ng test", "lint": "ng lint" and "tslint": "~6.1.0",
"ts-node": "~8.3.0" should be removed. By analogy with "e2e": "ng e2e".
2020-12-18 08:31:34 +01:00
Alan Agius
c99cef7ed6 docs: remove when true, when false from argument descriptions
It's confusing and redundant to use `When true` and `when false` in descriptions for a CLI arguments because specifying false/true is redundant in a command line argument flag and in most cases users will not do it.

Example:
`--foo=true` is the same as `--foo`
`--foo=false` is the same as `--no-foo`
2020-12-08 14:39:23 -05:00
Alan Agius
0bc15970ad refactor(@schematics/angular): use jsonc-parser instead of devkit parser 2020-11-05 08:31:02 +01:00
Pete Bacon Darwin
0491717704 feat(@schematics/angular): add enableI18nLegacyMessageIdFormat default to new projects
The ViewEngine message extraction generates a variety of legacy formats
for extracted message ids. These formats have a number of issues related
to whitespace handling and reliance upon information inside the original
HTML of a template. The new message format is more resilient to things
like whitespace changes, and can be generated directly from calls to
`$localize`, which allows messages in application code to have the same
id as identical messages in templates.

As a first step in migrating projects away from the legacy id format
for i18n messages, this commit updates newly generated projects to turn
off the legacy ids.

In the future the default will be flipped and this can be removed.
Eventually the legacy message id support will be removed altogether,
probably in sync with removal of ViewEngine.
2020-10-27 15:58:09 -04:00
Alan Agius
b8bc02d14a fix(@schematics/angular): update @types/jasmine to ~3.6.0 2020-10-26 13:29:18 -04:00
Alan Agius
9768230b4d docs: update further help section in readme 2020-10-21 14:15:24 +02:00
Alan Agius
32e24ff76a fix(@schematics/angular): use strict guide short url 2020-10-09 13:12:41 -04:00
Alan Agius
811966a2e2 docs: improve strict option description 2020-10-07 13:18:30 -04:00
Alan Agius
2fb0198de2 feat(@schematics/angular): add user-analytics to strict mode option 2020-10-07 13:18:30 -04:00
Charles Lyding
0bdea8ddea feat(@schematics/angular): generate E2E tests with native promise support
This change adjusts the E2E schematic to generate a protractor configuration with the selenium promise manager disabled.  It also adjusts the generated test files to use native promises and async/await to control test execution.
2020-10-05 19:06:14 -04:00
Alan Agius
ae73e44b2a feat(@schematics/angular): don't generate special package.json and no-any when using --strict
Following feedback from the community, which showed a high number of users found it hard to work with the `no-any` lint rule and also the `sideEffects` package.json file. With DevRel we decided to remove both features when generating a strict workspace and/or application.
2020-09-30 20:56:04 +02:00
Aristeidis Bampakos
a98c71dbf2 refactor(@schematics/angular): Formatting in angular.json
Apply consistent formatting in closing brackets at the end of the `angular.json` file
2020-09-06 16:08:35 +02:00