644 Commits

Author SHA1 Message Date
Alan Agius
00c8644aa5 fix(@schematics/angular): don't visit dot folders when running migrations 2020-06-03 15:11:14 -04:00
Alan Agius
a61ef8bbf5 fix(@schematics/angular): update several testing dev dependencies 2020-06-02 12:56:11 -04:00
Keen Yee Liau
4d741de8a9 Revert "release: v10.0.0-rc.1"
v10.0.0-rc.1 release should not be cut from master branch, it should be
cut from the 10.0.x branch.

This reverts commit e02925863bee819b03105b6fadd241b75fe5d8db.
2020-06-01 12:50:32 -07:00
Keen Yee Liau
e02925863b release: v10.0.0-rc.1 2020-06-01 12:21:19 -07:00
Alan Agius
9ebca6b8d6 build: update karma-jasmine-html-reporter to 1.5.0 2020-06-01 15:02:15 -04:00
Alan Agius
617f46fb57 build: update to karma-jasmine to 3.3.0 2020-06-01 15:02:15 -04:00
Alan Agius
d50a2fef2f fix(@schematics/angular): use ES2016 as syntax target for server bundles
The supported versions of Node.js support up to ES2018, the only reason why we don't use ES2017+ is because native `async` and `await` don't work with zone.js

See: https://github.com/angular/angular/issues/31730

With this change, we also ensure that we don't downlevel the server bundle to ES5 which is unnecessary.

Closes: #17794
2020-06-01 14:53:37 -04:00
Alan Agius
f9da2d8eb2 style: format tslint.json.template 2020-06-01 14:52:54 -04:00
Cyrille Tuzi
2039527201 feat(@schematics/angular): add tslint no-any and typedef rules when in strict mode 2020-06-01 14:52:54 -04:00
Alan Agius
ade3f491fe fix(@schematics/angular): remove node typings from tsconfig.spec.json 2020-05-27 14:17:05 +02:00
mgechev
8dc379449c release: v10.0.0-rc.0 2020-05-21 13:05:55 -07:00
Alan Agius
bede23226a feat(@schematics/angular): add solutions style tsconfig structure
In version 3.9, TypeScript introduced the concept of "Solutions Style" tsconfig to improve developer experience.

More info: https://devblogs.microsoft.com/typescript/announcing-typescript-3-9-rc/#solution-style-tsconfig

Closes #17493 and closes #8138
2020-05-20 12:12:33 -07:00
Alan Agius
93e253bc93 refactor: rename tsconfig.json to tsconfig.base.json 2020-05-20 12:12:33 -07:00
Alan Agius
a042290726 fix(@schematics/angular): update to tslib 2.0.0
TypeScript 3.9 requires tslib 2.0.0, with this change we;
- Update tslib existing and new workspaces to use tslib 2.0.0
- Update new and existing libraries to use tslib 2.0.0 as a direct depedency.

Tslib version is bound to the TypeScript version used to compile the library. Thus, we shouldn't list `tslib` as a `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed.

Closes: #17753

Reference: TOOL-1374
2020-05-20 11:25:31 +01:00
Charles Lyding
8cc566dbec fix(@schematics/angular): add migration to ensure tslint deprecation rule
This ensures that projects will be warned when deprecated APIs are used when linted.
2020-05-20 09:59:08 +01:00
Alan Agius
4ea0efd9db refactor(@schematics/angular): update vendored TypeScript to 3.9.3 2020-05-20 09:57:50 +01:00
mgechev
5e115c5e7a release: v10.0.0-next.6 2020-05-18 11:47:55 -07:00
Alan Agius
ad471a9cd3 build: update to TypeScript 3.9 2020-05-18 11:35:00 -07:00
Alan Agius
31bd1e5103 feat(@schematics/angular): generate new projects using TypeScript 3.9 2020-05-18 11:35:00 -07:00
Walter Werner SCHNEIDER
e8fa77e69e refactor(@schematics/angular): use ProjectType string enum 2020-05-18 19:25:52 +01:00
Walter Werner SCHNEIDER
5154997728 refactor(@schematics/angular): remove unused code 2020-05-18 19:25:52 +01:00
Alan Agius
5395cecf59 refactor: remove deprecate protractor elementExplorer
Protractor `elementExplorer` debugger and element explorer cannot be used for Node.js 8+ since it relied on `_debugger` module.

In protractor version 5, this resulted in the below error:
```
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
: Compiled successfully.
[10:25:35] I/direct - Using ChromeDriver directly...
[10:25:37] I/protractor -
[10:25:37] I/protractor - ------- Element Explorer -------
[10:25:37] I/protractor - Starting WebDriver debugger in a child process. Element Explorer is still beta, please report issues at github.com/angular/protractor
[10:25:37] I/protractor -
[10:25:37] I/protractor - Type <tab> to see a list of locator strategies.
[10:25:37] I/protractor - Use the `list` helper function to find elements by strategy:
[10:25:37] I/protractor -   e.g., list(by.binding('')) gets all bindings.
[10:25:37] I/protractor -
***********************************************************
* WARNING: _debugger module not available on Node.js 8    *
* and higher.                                             *
*                                                         *
* Use 'debugger' keyword instead:                       *
* https://goo.gl/MvWqFh                                   *
***********************************************************
/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:14
  throw e;
  ^

Error: Cannot find module '_debugger'
Require stack:
- /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js
- /Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
    at Function.Module._load (internal/modules/cjs/loader.js:862:27)
    at Module.require (internal/modules/cjs/loader.js:1042:19)
    at require (internal/modules/cjs/helpers.js:77:18)
    at Object.<anonymous> (/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:1156:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)
    at Function.Module._load (internal/modules/cjs/loader.js:899:14)
    at Module.require (internal/modules/cjs/loader.js:1042:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/debuggerCommons.js',
    '/Users/alanagius/cli-repos/demo-several/node_modules/protractor/built/debugger/clients/explorer.js'
  ]
}
```

but in protractor version 7, this logic was removed.

BREAKING CHANGE:
Protractor builder elementExplorer option has been removed. This was not compatable with the Node.Js versions that the Angular CLI supports. See: https://github.com/angular/protractor/blob/master/docs/debugging.md#enabled-control-flow for an alternative debugging methods.
2020-05-15 14:44:45 +01:00
Alan Agius
56bba34d75 fix(@schematics/angular): address vulnerability in protractor
potractor <7 contains a low severity vulnerability due to one of its dependencies (yargs-parser)

See: https://npmjs.com/advisories/1500

Fixes #17642
2020-05-15 14:44:45 +01:00
Keen Yee Liau
b2fd78e45c release: v10.0.0-next.5 2020-05-13 16:26:21 -07:00
Alan Agius
112e11cc9b build: generate project using karma-coverage-istanbul-reporter using 3.0.2 2020-05-11 16:37:10 -04:00
Alan Agius
1227a2c84f build: remove module_name and module_root
Since we are importing the vendored typescript with relative imports, module_name and module_root in the its ts_library are not needed.

See: https://github.com/angular/angular-cli/pull/17670#discussion_r422379783 for more context
2020-05-11 07:45:58 -04:00
Alan Agius
a9258338a1 test: update no_typescript_runtime_dep_spec to check javascript files 2020-05-11 07:45:58 -04:00
Doug Parker
26114054ff release: v10.0.0-next.4 2020-05-08 10:47:58 -07:00
Doug Parker
c39f82167a Revert "release: v10.0.0-next.4"
This reverts commit 692ba88c683a05cbdd09585f0c323c369a201a43.

Need to incorporate #17675 to get CI to pass.
2020-05-08 10:45:30 -07:00
Doug Parker
692ba88c68 release: v10.0.0-next.4 2020-05-07 16:41:54 -07:00
Alan Agius
7beeb5b2da build: update ng-packagr to version 10
With this change ng-packagr generates libraries compliant with APF version 10
2020-05-07 10:38:22 -07:00
Alan Agius
28f87cb312 refactor(@angular/cli): remove deprecated typescriptMismatch
BREAKING CHANGE:
Removed deprecated `typescriptMismatch` warning option. Users will be migrated off this option automatically. Users wishing to disable TypeScript version checks should use the Angular compiler option `disableTypeScriptVersionCheck`, see https://angular.io/guide/angular-compiler-options#disabletypescriptversioncheck for more information.
2020-05-07 10:37:48 -07:00
Alan Agius
ac3aff20c0 refactor(@schematics/angular): remove deprecated options from app-shell and universal schematics
BREAKING CHANGE:  The below options have been removed as they had no effect
- `test` and `testTsconfigFileName` have been removed form the universal schematic
- `universalProject`, `name`, `outDir`, `root` and `index` have been removed from the app-shell schematic
2020-05-06 11:42:49 -07:00
Alan Agius
0fd3c550b5 feat(@schematics/angular): update compiler options target and module settings
With this change we update the target and module settings of various compilation units.

- We replace ES5 target in protractor. Protractor runs on Node.Js which support ES2018
- For applications we now use `ES2020` instead of `ESNext` as a module to avoid unexpected changes in behaviour

This changes also adds a migration to update existing projects and also removes `module` from the Universal tsconfig as per #17352 to enable lazy loading on the server.
2020-05-06 11:42:35 -07:00
Alan Agius
a7cf22cabd feat(@schematics/angular): add stricter bundle budgets when using the --strict option
When using the strict option `anyComponentStyle` and `initial` budgets are more strict.
2020-05-05 11:44:19 -07:00
Alan Agius
cbf0feb005 feat(@schematics/angular): enable stricter type checking and optimization effective coding rules
With this change we enable stricter type checking and optimization effective coding rules when using the `--strict` option.

Changes in schematics
- `ng-new`: A prompt for the `--strict` option was added. This option is a proxy and will be passed to the application and workspace schematics.
- `application`: A `package.json` was added in the `app` folder, to tell the bundlers whether the application is free from side-effect code. When `strict` is `true`. the `sideEffects` will be set `false`.
- `workspace` When `strict` is true, we add stricter TypeScript and Angular type-checking options.

Note: AIO is already using these strict TypeScript compiler settings. PR to enable `strictTemplates`  https://github.com/angular/angular/pull/36391

Reference: TOOL-1366
2020-05-05 11:44:19 -07:00
Charles Lyding
2bac4a5d50 refactor(@schematics/angular): replace deprecated schematic test call 2020-05-05 10:50:57 -07:00
Alan Agius
371e44867c fix(@schematics/angular): don't add @angular/language-service in new Angular projects
This package is no longer required since the VS code extension is already shipped with it.
2020-05-05 10:50:27 -07:00
Alan Agius
25fafcc92b feat(@schematics/angular): add migration to remove deprecated server options 2020-05-05 10:50:15 -07:00
Alan Agius
a723af4271 feat(@schematics/angular): evergreen new applications
By default, we now generate new applications which support only evergreen browsers, as a result differential loading is now opt-in.

A new flag `--legacy-browsers`, was added to generate applications which support non evergreen browsers such as Internet Explorer 11.

**Note**: After an application is generated opting in and out of differential loading is still possible through the supported browsers configuration in the browserslist configuration file  defaulted to `.browserslistrc`.
2020-05-04 10:53:48 -07:00
Alan Agius
e2eed2c8f8 build: update several packages 2020-05-04 10:51:49 -07:00
Greg Magolan
be3d063422 build: exclude nested node_modules laid out by yarn workspaces from all globs 2020-04-30 15:12:46 -07:00
Filipe Silva
b51cf8d1e6 build: use ts_library macro with common defaults 2020-04-30 15:12:46 -07:00
Filipe Silva
9a28114f6b test: remove non-bazel test setup 2020-04-30 15:12:46 -07:00
Filipe Silva
898fb5e6ed build: add missing npm_package_archive targets 2020-04-30 15:12:46 -07:00
Filipe Silva
eceb5cdaa6 build: use rules_nodejs 1.6.0 features
Contains fixes related to the symlink behaviour inside of bazel. Without it, webpack needs to be configured to be aware of symlinks and preserve the paths.
2020-04-30 15:12:46 -07:00
mgechev
832ffccd46 release: v10.0.0-next.3 2020-04-29 16:11:41 -07:00
Alan Agius
5855c14e76 feat(@schematics/angular): add migration for evalSourceMap, vendorSourceMap profile and skipAppShell options. 2020-04-27 15:08:15 -07:00
Alan Agius
66c4e48c7f docs: remove reference to client-project arguments from app-shell docs
This is no longer required because of 493aa74019/packages/schematics/angular/app-shell/schema.json (L12)
2020-04-24 09:52:10 -07:00
Alan Agius
073f3034a1 docs: remove universal-project options reference from app-shell docs
`universal-project` has been deprecated and has no effect. See: 493aa74019/packages/schematics/angular/app-shell/schema.json (L19)
2020-04-24 09:52:10 -07:00