7795 Commits

Author SHA1 Message Date
Charles Lyding
cb78ebca9e refactor(@ngtools/webpack): directly use TypeScript transformation helpers
This change replaces the remaining usage of `makeTransform` with the usage of TypeScript AST helpers directly instead. This allows for the reduction in the number of AST walks necessary to transform the application's files.
2021-04-20 09:27:41 -05:00
Charles Lyding
98f0ba2ea9 test(@ngtools/webpack): directly test elideImports function
The `elideImports` function's unit tests now directly test the function instead of relying on the `makeTransform` abstraction.
This change more closely reflects the current usage of `elideImports`.
2021-04-20 09:27:41 -05:00
Alan Agius
04f5dfe5e2 fix(@angular-devkit/build-angular): use new Webpack watch API in karma webpack plugin
In Webpack 5, the Webpack callback must be used when Webpack is running in watch mode.

Related warning
```
.(node:6565) [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.
```
2021-04-20 09:27:05 -05:00
Alan Agius
cb9e51f687 refactor(@angular-devkit/build-angular): remove custom Webpack Stats types
Webpack 5 contains improved types that we can leverage.
2021-04-20 09:27:05 -05:00
Alan Agius
4a455871b1 ci: format angular-robot configuration
Previously, running `yarn ng-dev caretaker check` would fail with `Multi-line double-quoted string needs to be sufficiently indented`.
2021-04-19 20:34:51 +02: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
Renovate Bot
1c6ba1f9f6 build: update open to version 8.0.6 2021-04-19 20:33:19 +02:00
Renovate Bot
072f3a7009 build: update webpack to version 5.34.0 2021-04-19 20:33:01 +02:00
Renovate Bot
6d0207d4a2 build: update less-loader to version 8.1.1 2021-04-19 20:32:40 +02:00
Renovate Bot
fd655d463f build: update sass to version 1.32.10 2021-04-19 20:32:27 +02:00
Charles Lyding
5804fec902 refactor(@angular-devkit/build-angular): remove Webpack 4 specific type casting
Webpack 5 contains improved types and exports that reduce the need to perform additional type casting throughout the internal Webpack plugins.
2021-04-19 20:32:13 +02:00
Charles Lyding
e0cb8222ea fix(@angular-devkit/build-angular): replace Webpack 4 hashForChunk hook usage
Webpack 5 now uses a `chunkHash` hook that is accessible from `JavascriptModulesPlugin.getCompilationHooks()`. The `hashForChunk` hooks have been deprecated in Webpack 5.
2021-04-19 20:31:59 +02:00
Renovate Bot
626d67fa2c build: update symbol-observable to version 4.0.0 2021-04-19 20:30:48 +02:00
Charles Lyding
18c8adf0dc fix(@schematics/angular): set inlineStyleLanguage for universal if present in build options
The `inlineStyleLanguage` option should be set for an application's server target if also present in the application's build target. The setting is needed to ensure the server target properly builds the applica
tion's styles.
2021-04-19 20:30:35 +02:00
Charles Lyding
fdf41b24dc fix(@schematics/angular): set inlineStyleLanguage when application style option is used
The `style` option for the application schematic specifies the language/preprocessor to use for the application's external style files and should also setup the default for inline styles as well via the `inlineStyleLanguage` build option. The value can be adjusted after application generation if needed.
2021-04-19 20:30:35 +02:00
Charles Lyding
e55923656c fix(@angular-devkit/build-angular): avoid double build optimizer processing
TypeScript files had the potential to be processed twice by the build optimizer. This did not affect the output code but could lead to longer production build times. The build optimizer is now configured in one centralized location for both TypeScript and JavaScript files. The Webpack configuration partial for TypeScript support is also reduced to one common function for both AOT and JIT as a result.
2021-04-19 20:30:21 +02:00
Renovate Bot
71717cf406 build: update mini-css-extract-plugin to version 1.5.0 2021-04-19 20:30:05 +02:00
Alan Agius
c3ee7540f4 build: pin quicktype-core
This is needed as currently this breaks lock file maintenance Renovate  PR https://github.com/angular/angular-cli/pull/20107 due to quicktype-core has an unspecified dependency on lodash.

```
  bazel-out/host/bin/tools/quicktype_runner.sh packages/angular_devkit/build_angular/src/app-shell/schema.json bazel-out/k8-fastbuild/bin/packages/angular_devkit/build_angular/src/app-shell/schema.ts)
Execution platform: //tools:rbe_ubuntu1604-angular
Error: Cannot find module 'lodash'. Please verify that the package.json has a valid "main" entry
    at Function.module.constructor._resolveFilename (/b/f/w/bazel-out/host/bin/tools/quicktype_runner.sh.runfiles/angular_cli/tools/quicktype_runner_require_patch.js:480:17)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/b/f/w/bazel-out/host/bin/tools/quicktype_runner.sh.runfiles/npm/node_modules/quicktype-core/dist/language/Dart.js:14:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
INFO: Elapsed time: 81.607s, Critical Path: 8.94s
```
2021-04-19 20:29:32 +02:00
Alan Agius
131379f49f fix(@angular/cli): run all migrations when updating from or between prereleases
With this change we consider the update schematics are idempotent. When updating from or between prereleases we will execute all migrations for the version.
2021-04-19 20:28:53 +02:00
Alan Agius
db1719b8c1 refactor(@angular/cli): clean up left over @schematics/update code. 2021-04-19 20:28:53 +02:00
Alan Agius
266c0ce5e5 fix(@angular/cli): ignore tsickle during updates
`tsickle` doesn't be a dependency in users projects, if it is most certain it will cause updates to fail due to mismatching peer dependency on TypeScript.
2021-04-19 20:28:53 +02:00
Alan Agius
c196df9bad build: update build_bazel_rules_nodejs to 3.4.0 2021-04-19 20:28:24 +02:00
Alan Agius
6a6aef6a68 build: rely on engines to prevent using npm for dependency install
See c385e74454 for more context
2021-04-19 20:28:24 +02:00
Alan Agius
10d4a54510 build: update to Node 14.16.1
Update Bazel to use 14.16.1
2021-04-19 20:28:24 +02:00
Alan Agius
0396d0839e build: update angular packages
With this change we also remove the workaround to fix stale reuse program. Which was fixed in https://github.com/angular/angular/pull/41289
2021-04-19 20:27:28 +02:00
Alan Agius
e1bb8c4f9a build: update master version to 12.1.0-next.0 2021-04-19 20:25:36 +02:00
Keen Yee Liau
1a8ed40db8 build: bump version to v12.0.0-rc.0 2021-04-19 19:39:13 +02:00
Charles Lyding
1dc9754bb2 docs(@angular-devkit/architect-cli): add a README file for the package
A `README.md` file is now included in the package with an overview of the utility and the help output of the command.
2021-04-19 09:43:25 -05:00
Alan Agius
b8875397ce docs(@angular-devkit/build-angular): add readme file 2021-04-19 09:39:59 -05:00
Keen Yee Liau
c7a7a7591b release: v12.0.0-next.9 v12.0.0-next.9 2021-04-14 16:47:18 -07:00
Charles Lyding
e33a3061f0 feat(@schematics/angular): migrate web workers to support Webpack 5
Webpack 5 now includes web worker support. However, the structure of the URL within the `Worker` constructor must be in a specific format.
A migration has been added for Angular v12 that will convert web workers from the old structure to the new structure.
Before: `new Worker('./app.worker', ...)`
After: `new Worker(new URL('./app.worker', import.meta.url), ...)`
2021-04-14 19:34:21 -04:00
Alan Agius
d68cb92dc2 fix(@angular/cli): add message update updating from non LTS versions of the CLI 2021-04-14 17:20:33 -04:00
Alan Agius
36a8882ab3 refactor(@schematics/angular): remove migration of non LTS versions
With this change we remove migrations for non LTS version of Angular CLI.
2021-04-14 17:20:33 -04:00
Alan Agius
3705483782 test(@angular-devkit/build-angular): remove karma v5.2 E2E
Karma v5.2 is no longer supported in v12.
2021-04-14 16:25:56 -04:00
Renovate Bot
21a5eed825 build: update angular packages 2021-04-14 16:22:14 -04:00
Alan Agius
53289af0c2 build: upgrade nvm to node 14
Useful when running
```
nvm which
```
2021-04-14 15:50:38 -04:00
Alan Agius
d7bedb7293 build: promote @angular-devkit/build-angular to stable 2021-04-14 15:50:27 -04:00
Charles Lyding
27e63e2b33 fix(@angular-devkit/build-angular): mark programmatic builder execution functions as experimental
While the builders when executed via the Angular CLI and their associated options are considered stable, the programmatic APIs are not considered officially supported and are not subject to the breaking change guarantees of SemVer.
The programmatic APIs for the builders are now explicitly marked as experimental. This allows the package to use a stable versioning scheme while also continuing to provide access to the experimental programmatic API elements of the package.
2021-04-14 14:32:37 -04:00
Keen Yee Liau
07bf174759 docs(@angular-devkit/schematics-cli): Add README
This commit adds a README for the package.
2021-04-14 12:30:18 -04:00
Doug Parker
d09da29af7 docs: add README to @angular/pwa.
This mostly just copies the "Getting started with service workers" guide cited to explain what the schematic itself does and defering to that doc for more info on PWA's and how to actually build one.
2021-04-14 11:11:10 -04:00
Alan Agius
43b7a38b47 docs(@ngtools/webpack): remove webpack 4 reference 2021-04-14 11:10:48 -04:00
Charles Lyding
d3bc530c10 refactor(@angular-devkit/build-angular): use Node.js promise fs API in service-worker augmentation
With the minimum version of Node.js now set to v12, the promise fs API can now be leveraged within the tooling.
This change also uses `copyFile` (with copy-on-write where available) to setup the the service worker files as well a streaming APIs to generate service worker hashes. Both of which improves performance and reduces memory usage.
2021-04-14 10:17:21 -04:00
Renovate Bot
8dbc5e7ee0 build: update cssnano to version 5.0.1 2021-04-14 07:22:20 -04:00
Charles Lyding
bac563e5ee feat(@angular-devkit/build-angular): support specifying stylesheet language for inline component styles
A new build option named `inlineStyleLanguage` has been introduced that will allow a project to define the stylesheet language used in an application's inline component styles. Inline component styles are styles defined via the `styles` property within the Angular `Component` decorator. Both JIT and AOT mode are supported. However, JIT mode requires that inline styles only be string literals (compile-time partial evaluation is not supported in JIT mode). Currently supported language options are: `CSS` (default), `Sass`, `SCSS`, and `Less`. If the option is not specified, `CSS` will be used and enables existing projects to continue to function as expected.
2021-04-14 07:21:11 -04:00
Charles Lyding
330235230c refactor(@angular-devkit/build-angular): remove redundant webpack-sources dependency
The `webpack` package now exports the `Source` based classes directly.
2021-04-13 15:34:54 -04:00
Charles Lyding
36dd4cc772 refactor(@angular-devkit/build-optimizer): remove redundant loader-utils dependency
Webpack 5 now provides the `getOptions` loader utility directly on the `LoaderContext` object.
2021-04-13 15:34:54 -04:00
Charles Lyding
8b5449dbc0 refactor(@angular-devkit/build-optimizer): remove redundant webpack-sources dependency
The `webpack` package now exports the `Source` based classes directly.
2021-04-13 15:34:54 -04:00
Charles Lyding
dd0fd18a98 refactor(@ngtools/webpack): remove redundant webpack-sources dependency
The `webpack` package now exports the `Source` based classes directly.
2021-04-13 15:34:54 -04:00
Keen Yee Liau
46ffe26f65 build: promote @angular-devkit/schematics-cli to stable
This package contains just the executable for schematics and two internal
schematics, there is no public facing APIs.
2021-04-13 14:09:55 -04:00
Keen Yee Liau
3227e89588 ci: remove unused --ci option from validate script 2021-04-13 11:50:43 -04:00