These changes include
- Remove the usage of `enableProdMode`
- Remove `test.ts`, `polyfills.ts`, `karma.conf.js` and environment files which are no longer generated by default
PR Close#47904
With this change we replace AIO examples to use stable Angular packages.
The main reasons for this is that prereleases might contain bugs that
are not in the stable version especially in the Angular CLI were it's
not validated in G3.
PR Close#47092
All docs examples share the same `node_modules/` (symlinked into each
example from `aio/tools/examples/shared/node_modules/`). However, each
example type has a different `package.json`, which comes from
`aio/tools/examples/shared/boilerplate/*`). In order to ensure that the
dependencies in each example's `package.json` are the same as the ones
in the symlinked `node_modules/` (i.e. the ones that CI tests are run
with), we have a script (`yarn run sync-deps`) that can sync
dependencies from `shared/package.json` into the boilerplate
`package.json` files.
Previously, this script had to be run manually, which was easy to
forget/not know about and resulted in the boilerplate dependencies
often being out-of-sync with the ones in `shared/package.json` (and by
extension, the ones that were actually installed in `node_modules/`).
This commit helps keep the boilerplate dependencies up-to-date in the
following ways:
- Adds the `sync-deps` script to the `postinstall` scripts.
This ensures that dependencies remain in sync whenever someone
manually updates dependencies in `shared/package.json`.
- Runs the `sync-deps` script as a Renovate post-upgrade task.
This ensures that the depenencies remain in sync whenever Renovate
updates dependencies in `shared/package.json`.
For more info on configuring post-upgrade tasks in Renovate, see:
- [postUpgradeTasks][1]
- [allowedPostUpgradeCommands][2]
- [allowPostUpgradeCommandTemplating][3]
NOTE:
For the Renovate change to take effect, the [global config][4] in
`angular/dev-infra` also needs to be updated. This will be done in a
separate PR.
[1]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
[2]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[3]: https://docs.renovatebot.com/self-hosted-configuration/#allowpostupgradecommandtemplating
[4]: 22d3067021/.github/ng-renovate/runner-config.js
PR Close#47009
With the recent lock file maintenance, the `@types/angular` dependency
ended up being duplicated. This seems to happen because we locked our
type dependency, but other Angular deps like `angular-route` had a
looser dependency, resulting in e.g. `1.7` types and `1.8` types to be
loaded.
This ultimately ended up breaking TypeScript's auto-discovering
of types and broke some example compilations e.g.
```
app/app.animations.ts(3,3): error TS2339: Property 'animation' does not exist on type 'IModule'.
app/app.config.ts(5,45): error TS2694: Namespace 'angular' has no exported member 'route'.
app/phone-detail/phone-detail.component.ajs.ts(10,37): error TS2694: Namespace 'angular' has no exported member 'route'.
```
We fix this by loosening the type dependency ranges, updating all of
these. Also we update AngularJS itself to the final version.
PR Close#46819
Update the docs examples to the latest prerelease versions of Angular
CLI and framework (v14.0.0-rc.0).
Also update the example apps to more closely align with new CLI apps.
See also the [diff][1] between a basic v13.0.0-rc.3 CLI app and a
v14.0.0-rc.0 one.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/13.0.0-rc.3...14.0.0-rc.0
PR Close#45997
The SystemJS examples were using an outdated version of rollup that did
not support export fields. Now with the recent changes where we removed
secondary package.json files, the rather old/somewhat outdated SystemJS
examples failed bundling since exports were not considered.
PR Close#45405
This is needed because Angular CLI 13.3 contains fixes that are needed for Stackblitz Node 16 to compile Sass. We also added `copyfiles` in `aio/tools/examples/shared/package.json` as `yarn sync-deps` was failing due to the missing dependency.
PR Close#45502
Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.
BREAKING CHANGE:
Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.
PR Close#45286
Updates AIO and the live examples to 13.1.0 in order to resolve a build error when opened on Stackblitz. They were using TS 4.5 with Angular ~13.0.0 which doesn't support 4.5.
Fixes#44480.
PR Close#44487
Adds support for TypeScript 4.5. Includes the following changes:
* Bumping the package versions.
* Fixing a few calls to `createExportSpecifier` and `createImportSpecifier` that require an extra parameter.
* Adding some missing methods to the TS compiler hosts.
* Fixing an issue in the TS mocks for the ngcc tests where a regex was too agressive and was trying to match a path like `/node_modules/@typescript/lib-es5`.
* Accounting for type-only import specifiers when reporting DI errors (see #43620).
Fixes#43620.
PR Close#44164
In PR #43975, the `Angular Elements` guide was updated to remove
mentions of the Custom Elements-related polyfills, since they are no
longer necessary in v13+ (due to all CLI projects being ES2015+ and all
supported browsers natively supporting Custom Elements).
This commit updates the related docs example boilerplate to not include
the unneeded `@webcomponents/custom-elements` polyfill.
PR Close#44214
Previously, the SystemJS-based docs examples (typically `ngUpgrade`
examples) were not compatible with Angular v13 (due to the removal of
UMD bundles from the published packages).
This commit makes the examples compatible with Angular v13 and
re-enables the tests for all SystemJS-based examples on CI.
PR Close#43868
Due to an oversight, the `systemjs` package was previously not included
as a dependency in the boilerplate `package.json` file for
SystemJS-based docs examples, despite it being required by the app.
PR Close#43868
This commit updates the docs examples to the latest prerelease versions
of Angular CLI, framework and CDK/Material.
It also updates the apps to more closely align with new apps CLI apps.
See also the [diff][1] between a basic v13.0.0-rc.0 CLI app and a
v13.0.0-rc.2 one.
[1]: cexbrayat/angular-cli-diff@13.0.0-rc.0...13.0.0-rc.2
PR Close#43583
This commit updates the docs examples to Angular v13.0.0-rc.0. In
addition to updating the dependency versions, it also updates the
projects' structure and configs to more closely match what a new v13 CLI
app would look like. See, also, the [diff][1] between a basic v12.1.3
CLI app and a v13.0.0-rc.0 one.
(NOTE: v12.1.3 was the last version for which we aligned the projects
with how a new CLI app would look like.)
Additionlly:
- Since we now use RxJS v7 in docs examples, this commit removes the
extra CI steps to explicitly test the docs examples against RxJS v7.
- Since Angular v13 no longer supports IE, this commit removes an
IE-specific section from `upgrade-setup.md`.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/12.1.3..13.0.0-rc.0
PR Close#43880
remove the deprecated tslint from the examples of type systemjs
note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting
PR Close#43746
Bumps the minimum required TypeScript version to 4.4.2 and removes the integration tests for 4.1, 4.2 and 4.3.
BREAKING CHANGE:
TypeScript versions older than 4.4.2 are no longer supported.
PR Close#43642
The CLI has been updated with various changes to support for ESM package
output of the framework. This commit updates to a next version of the
CLI v13 that contains these necessary changes, allowing us to test/validate
our package changes through integration tests or AIO examples.
This update also contains a fix for the adjust enum babel optimization
that broke with the latest rollup version.
PR Close#43431
This commit updates the docs examples to Angular v12.1.3. In addition to
updating the dependencies versions, it also updates the projects'
structure and configs to more closely match what a new v12 CLI app would
look like. See, also, the [diff][1] between a basic v11.2.11 CLI app and
a v12.1.3 one.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.11..12.1.3
PR Close#42949
This commit changes the `engines` rules in the root `package.json` as
well as the `package.json` used when working on docs example to also
accept Node.js versions greater than v14. This aligns them with
`aio/package.json` and allows using Node.js v15 and v16 (current) for
local development in the `angular/angular` repo.
Related to #42367.
PR Close#42387
When aio yarn docs-only command runs on v12.14.1 it fails details given on issue #41979. Upgrading node version to v12.17.0 solves this but creates a new warning (node:467072) ExperimentalWarning: The ESM module loader is experimental.
This warning gets removed in v12.20.0. Upgrading node version to 12.20.0
PR Close#42009
This commit updates the docs examples to Angular v11.2.10. See the [diff between 11.0.1 and 11.2.10 (FW) and 11.2.9 (CLI)][1].
The changes are fairly trivial including:
- Removal of `emitDecoratorMetadata` from tsconfig.json files, where no JIT compilation is required.
- Setting `enableI18nLegacyMessageIdFormat` to `false` for CLI based applications - the i18n example was already migrated away from legacy message IDs.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.9..11.0.1
PR Close#41689
```
$ lite-server -c bs-config.aot.json
$ ngc -p tsconfig-aot.json && rollup -c rollup-config.js
/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:26
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:26:11)
at setFSEventsListener (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:80:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:244:16)
at FSWatcher.<anonymous> (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:378:25)
at LOOP (fs.js:1752:14)
at processTicksAndRejections (internal/process/task_queues.js:79:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
completed: yarn serve:aot
```
PR Close#41638