684 Commits

Author SHA1 Message Date
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
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
Filipe Silva
6304221166 fix(@ngtools/webpack): remove internal markers
With these in, we can't access the properties from other Bazel targets.
2020-04-30 15:12:46 -07:00
Filipe Silva
775617f80c fix(@ngtools/webpack): export VirtualFileSystemDecorator type
We shouldn't need to export this, but webpack-rollup-loader uses it.
2020-04-30 15:12:46 -07:00
Alan Agius
9914125564 build: fix typescript 3.9 compilation 2020-04-27 11:06:24 -07:00
Keen Yee Liau
e5db6a8ccd build: BUILD files formatted to have load statements at the top 2020-04-23 10:31:56 -07:00
Renovate Bot
e894c2faa4 build: update angular packages 2020-04-16 13:27:04 -07:00
Charles Lyding
98b3eb5b9e build: update rxjs to version 6.5.5 2020-04-15 13:17:31 -07:00
George Kalpakas
c7c574affb fix(@ngtools/webpack): give higher priority to ivy-specific entry-points
When Ivy is enabled in an app, the app's dependencies are processed by
ngcc (the Angular compatibility compiler), which will generate new
Ivy-compatible entry-points in each package. To allow webpack find those
entry-points, it will add references to them in `package.json`, named
after the original property with the `_ivy_ngcc` suffix. So, for
example, `es2015` and `module` will become `es2015_ivy_ngcc` and
`module_ivy_ngcc`.

Previously, the `mainFields` passed to webpack would give higher
priority to an Ivy entry-point compared to the corresponding non-ivy
entry-point but not compared to other entry-points. For example,
`es2015, module` would becode
`es2015_ivy_ngcc, es2015, module_ivy_ngcc, module`. This could mean that
`es2015` would be preferred over `module_ivy_ngcc`, even though the
former is probably not Ivy-ready. Generally, if `es2015` exists and has
a higher priority than `module`, then `es2015_ivy_ngcc` would be
generated before (or instead of) `module_ivy_ngcc`, but this can be
changed using an ngcc configuration file (`ngcc.config.js`).

This commit fixes this by ensuring that any `_ivy_ngcc` entry-point is
considered before any of the original entry-points in the `mainFields`
list.

NOTE:
While it is possible that a format is Ivy-compatible without bhaving an
`_ivy_ngcc` suffix (e.g. if the user does a manual ngcc pass without
`--create-ivy-entry-points`), it is quite unlikely to happen and even if
it does, choosing a different format should be OK.
2020-04-10 09:59:49 -07:00
Renovate Bot
f48a66df8a build: update angular packages 2020-04-08 10:56:36 -07:00
Filipe Silva
60e92d54fb style: reformat bazel files 2020-04-07 09:07:19 -07:00
Filipe Silva
5f3f736936 build: move BUILD.bazel files for secondary entry points into own folder
Without this change, module names will be computed with incorrect paths containing duplicate path fragments (e.g. `@angular-devkit/architect/testing/testing/test-logger`).
2020-04-07 09:07:19 -07:00
Filipe Silva
f2d2cd12c4 build: also produce tar.gz for bazel npm_package rules 2020-04-07 09:07:19 -07:00
Filipe Silva
b668cacd45 refactor: use BUILD.bazel instead of BUILD
Using an extension gives editors a chance to figure out the correct language syntax to use.
2020-04-07 09:07:19 -07:00
Filipe Silva
b3e09e5724 build: build and test @ngtools/webpack with Bazel 2020-04-07 09:07:19 -07:00
Alan Agius
1756f58bbf refactor(@ngtools/webpack): deprecate i18n options 2020-03-30 16:15:02 -07:00
Renovate Bot
451dffa7c9 build: update angular packages 2020-03-25 12:03:57 -07:00
Alan Agius
00bf306505 fix(@ngtools/webpack): provide tsconfig path to ngcc 2020-03-25 10:15:57 -07:00
Alan Agius
23ce89db4a build: update angular packages 2020-03-25 10:15:57 -07:00
renovate[bot]
b913c68dec
Merge pull request #17292 from angular/renovate/non-major-devdependencies
build: update webpack to version 4.42.1
2020-03-24 10:59:20 -07:00
Renovate Bot
0cdb84da54 build: update angular packages 2020-03-23 17:28:08 -07:00
Alan Agius
47555e21eb fix(@ngtools/webpack): disable ngcc async under Bazel
Under Bazel some dependencies might be readonly we shouldn't run NGCC async version because we are unable to verify which modules are read-only and which not.
2020-03-13 13:16:15 -07:00
Alan Agius
1a1ceb609b build: update angular packages to 9.1.0-next.4 and TypeScript 3.8 2020-03-11 10:33:38 -07:00
Alan Agius
86a257aa28 feat(@ngtools/webpack): integrate ngcc async
With this change we call NGCC async version prior to every build which will process the entire node modules tree.
2020-03-11 10:33:38 -07:00
Renovate Bot
1d9e9d6b81 build: update angular packages 2020-03-05 10:54:10 -08:00
Renovate Bot
b5a475d3d4 build: update typescript to version 3.8.3 2020-03-03 13:37:35 -08:00
Charles Lyding
d4c3881284 feat(@ngtools/webpack): support TypeScript 3.8 2020-03-02 14:05:31 -08:00
Renovate Bot
c173f3db87 build: update webpack to version 4.42.0 2020-03-02 12:13:20 -08:00
Renovate Bot
2998e5e060 build: update angular packages 2020-02-28 12:28:15 -08:00
Alan Agius
678180e476 fix(@ngtools/webpack): don't elide decorated method parameter type reference
Fixes #17080
2020-02-26 12:01:58 -08:00
Charles Lyding
e7dbb31662 fix(@ngtools/webpack): always use VE for deprecated string route discovery
When in JIT mode during lazy route discovery, the Ivy compiler willl attempt to parse templates which may fail when this plugin is used with webpack loaders that support custom template formats.  The string lazy routes must be discovered before the webpack build starts but the template loading/processing does not occur until the webpack build commences.

Fixes: #17002
2020-02-26 12:01:45 -08:00
Alan Agius
826803d073 fix(@ngtools/webpack): handle union type with a nullable argument
Currently constructor parameters with union types that contains nullable argument are not being converted properly and result in broken behaviour.

With this change we align the ctor-parameters downlevel transformer to be closer to the NGTSC reflector: https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ngtsc/reflection/src/typescript.ts#L65-L66

This change should also be synced to ng-packagr.

Closes: #17063
Reference: FW-1883
2020-02-25 10:27:13 -08:00
Renovate Bot
306ccfa063 build: update angular packages 2020-02-25 10:11:59 -08:00
Alan Agius
d0cbc822f0 build: update tslib to 1.11.0
Spec helper change is related to https://github.com/microsoft/tslib/pull/90
2020-02-24 12:36:39 -08:00
Alan Agius
1deca8ae39 fix(@ngtools/webpack): elide imports for implements keywords
Running the `remove-ivy-jit-support-calls` and `remove_decorators` transformers causes the following TS bug https://github.com/microsoft/TypeScript/issues/17552 which is why the `elide-imports` transformer exists in the first place.

However, when having a syntax like the below;
```ts
import { AccountComponentChild } from '../@types';
export class SignUpComponent implements AccountComponentChild{}
```

The `implements` parts of the class is called a `HeritageClause` with child statements of `ExpressionWithTypeArguments` also the same is for `abstract`. With this change we check the token of the `HeritageClause` and if it's an `ImplementsKeyword` we elide the import.

Closes #16907
2020-02-19 10:12:44 -08:00
Alan Agius
9b7b2f0047 fix(@ngtools/webpack): add local dts file as dependencies
We now add non node_modules `.d.ts` as a dependency of the main chunk. This is important under Ivy, because NG metadata is now part of the declarations files ex:

```ts
export declare class FooComponent implements OnInit {
    constructor();
    ngOnInit(): void;
    static ɵfac: i0.ɵɵFactoryDef<FooComponent>;
    static ɵcmp: i0.ɵɵComponentDefWithMeta<FooComponent, "lib-foo", never, {}, {}, never>;
}
```

Previously such files were not being added as dependency and such files didn't get invalidated when changed.

Closes #16920 and closes #16921
2020-02-18 12:44:31 -08:00
renovate[bot]
3030b839c4
Merge pull request #16863 from angular/renovate/angular
build: update angular packages
2020-02-13 15:49:03 -08:00
Filipe Silva
815a025e93 build: update to 9.0.0 final 2020-02-11 09:01:58 -08:00
Renovate Bot
967b963a9e build: update webpack to version 4.41.6 2020-02-11 08:43:46 -08:00
Filipe Silva
08ec8318c1 fix(@ngtools/webpack): only load test helpers on tests
Fix #16858
2020-02-07 08:27:28 -08:00
Alan Agius
5376a8b139 fix(@ngtools/webpack): don't elide imports for type references that are needed for decorator metadata
When `emitDecoratorMetadata` is set to true we don't elide type references imports that are used for decorated nodes.

Fixes #16808
2020-02-04 15:59:11 -08:00
Renovate Bot
dc642df2bb build: update @angular/animations to version 9.0.0-rc.14 2020-02-04 07:18:35 -08:00
Charles Lyding
48d142c701 fix(@ngtools/webpack): control the presence of Ivy class metadata and module scope
This change allows the import eliding capabilities of the plugin to more completely remove the effects of the `setClassMetadata` and `setNgModuleScope` functions.  This provides equivalent behavior to the Decorator removal functionality for ViewEngine.
2020-01-28 10:47:54 -08:00
Filipe Silva
d463166461 fix(@ngtools/webpack): correctly determine resource dependencies
Fix #16569
2020-01-23 18:01:03 -08:00
Renovate Bot
0ef45f39fc build: update typescript to version 3.7.5 2020-01-17 08:11:44 -08:00
Filipe Silva
3e89d2eac3 build: update latest versions 2020-01-16 10:03:39 -08:00
Filipe Silva
86d4385440 build: use TypeScript 3.7 2020-01-09 13:43:49 -08:00
Renovate Bot
14777e481b build: update @angular/animations to version 9.0.0-rc.8 2020-01-09 11:59:55 -08:00
Renovate Bot
3ba89181bc build: update rxjs to version 6.5.4 2020-01-07 10:26:56 -08:00