41 Commits

Author SHA1 Message Date
Filipe Silva
733efe71e3 fix(@angular-devkit/build-optimizer): prefix renamed extended classes (#13613)
Fix #11796
2019-02-07 08:28:19 -08:00
Alan Agius
e12adf4dcb refactor: create helper functions for pure comments 2019-01-23 10:09:47 -08:00
Alan
7d868947e2 feat(@angular-devkit/build-optimizer): add support for es2015 enums emitted by tsickle
tsickle emits es2015 enums with an object literal followed by an export declaration

Example:
```
      const RendererStyleFlags3 = {
          Important: 1,
          DashCase: 2,
      };
      export { RendererStyleFlags3 };
      RendererStyleFlags3[RendererStyleFlags3.Important] = 'Important';
      RendererStyleFlags3[RendererStyleFlags3.DashCase] = 'DashCase';
```

This PR adds support for the enums to be optimized by wrapping them in an iife and marks them as pure.

Fixes #13488
2019-01-22 09:39:07 -08:00
Filipe Silva
35b0594f91 feat(@angular-devkit/build-optimizer): also fold ES2015 classes
Although ES5 classes had their static properties folded in, ES2015 ones did not.

This PR adds that new functionality.

It should also make this particular transform a bit faster since it will stop early.

Fix https://github.com/angular/angular-cli/issues/13487
2019-01-22 09:38:48 -08:00
Filipe Silva
6f8c336346 fix(@angular-devkit/build-optimizer): identify relative imports in angular core
Build optimizer was broken for non-FESM files inside @angular/core because it couldn't identify relative imports were still inside core.

This change adds a known list of angular core files as a default, and also allows passing in a override.
2019-01-18 12:01:37 -08:00
Filipe Silva
07ceb05985 fix(@angular-devkit/build-optimizer): prefix renamed classes
Module concatenation may rename classes with the same name. The renaming logic is specific to the bundler so we can't really foresee it.

But the fact remains that the inner function declaration doesn't need to have the same name as the outer one.
2019-01-18 12:01:37 -08:00
Alan Agius
a6102b2d50 build: pin typescript and webpack
Pin these two dependencies so that Renovate can succesfully update all these within the monorepo at once without the need of any manual interventation
2019-01-18 11:56:33 -08:00
Filipe Silva
f7c6719f73 fix(@angular-devkit/build-optimizer): support windows paths in rollup plugin 2019-01-11 14:08:21 -08:00
Renovate Bot
881966bbc8 build: update loader-utils to version 1.2.3 2019-01-08 13:41:41 -08:00
Renovate Bot
3e8c461670 build: update loader-utils to version 1.2.1 2018-12-26 11:33:24 -08:00
Alan Agius
b071d1cd1d build: update several dependencies
This is so that renovate won't trigger for these dependencies
2018-12-21 09:31:20 -08:00
Alan Agius
5111d15ff2 build: update to TypeScript 3.2 and Angular 7.2 RC 2018-12-19 10:55:05 -08:00
Alan Agius
717b02f533 ci: add ts api guardian (#12010)
* refactor: fix `import` and `export` paths to work with classic resolution

`ts-api-guardian` only support classic module resolution which means that we need to specify `index` so that the resolution works.

* build: add `npm_package` to packages

* build: add ts-api-guardian to repo

* test: add api golden files

* refactor: use proper namespace instead of alias export

* refactor: use proper namspace einstead of alias export

* build: add `_golden_api` files

At the moment ts api guardian doesn't support aliased symbols as namespaces, this is a workaround to still have namespaced symbols in the final golden file.

* build: update angular archive for workspace

* test: fix reference to `TestHost` to use namespace

* refactor: create `fs` namespace instead of aliased export

* test: update api golden file for `@angular-devkit/core/node`
2018-11-30 11:53:54 -08:00
Alan Agius
53118c6224 build: update typescript to 3.1.6 (#12849)
* fix(@angular-devkit/build-optimizer): update typescript to 3.1.6

* build: update typescript to 3.1.6
2018-11-06 22:46:37 -08:00
Keen Yee Liau
db78228fc4 build: add external block for tsconfig in test targets (#12879) 2018-11-06 11:12:21 -08:00
Filipe Silva
db784ec1f4 fix(@angular-devkit/build-optimizer): update typescript to 3.1.5
Fix #12773
2018-11-01 07:49:11 -07:00
cexbrayat
8bc8eca027 docs: remove UglifyJS mention
Now that https://github.com/angular/angular-cli/pull/11996 landed, the CLI uses Terser instead of UglifyJS.
2018-10-31 21:06:25 -07:00
Keen Yee Liau
a3b05a0283 build: Use fine-grained node_module deps
This commit updates the BUILD files to specify fine-grained node_module deps
by replacing "@typings" comments with actual @npm node module.

Moved tools/bazel.rc -> .bazelrc

Removed "jasmine" typings from base tsconfig.json

Added @bazel/karma to devDependencies, needed for `ts_web_test`
2018-10-31 20:56:27 -07:00
Alan Agius
abf99b5b5e fix(@angular-devkit/build-optimizer): add tslib replacement at top of file
Fixes #12568
2018-10-23 11:52:34 -07:00
Alan Agius
915994da69 fix(@angular-devkit/build-optimizer): update to typescript 3.1.3
This fixes issues related to Microsoft/TypeScript#27341
2018-10-16 11:29:19 -07:00
Alan Agius
91e5fc0bfa build: update to TypeScript 3.1 2018-10-01 07:39:59 -07:00
Charles Lyding
5890759a9f fix(@angular-devkit/build-optimizer): deprecate transform test functions
These were not intended to be part of the public API and will eventually be removed completely.
2018-09-19 11:34:02 -07:00
Charles Lyding
a8a60a7faf refactor(@angular-devkit/build-optimizer): minor type cleanup 2018-09-19 11:34:02 -07:00
Charles Lyding
95f29fbb82 refactor(@angular-devkit/build-optimizer): remove unused import purifier 2018-09-19 11:34:02 -07:00
Charles Lyding
f5314531f5 refactor(@angular-devkit/build-optimizer): correct implicit returns 2018-09-19 11:32:39 -07:00
Alan Agius
b8b36ba339 refactor: pin down all direct dependencies
This is so that CLI users get the same direct dependency versions that were tested on the CI.
2018-09-07 11:01:50 -07:00
Charles Lyding
87db956cab refactor(@angular-devkit/build-optimizer): remove unused helper function 2018-09-07 10:45:46 -07:00
Charles Lyding
74bc8e886b fix(@angular-devkit/build-optimizer): remove deprecated wrap enums check 2018-09-07 10:45:46 -07:00
Charles Lyding
a1ea3a05d4 fix(@angular-devkit/build-optimizer): remove deprecated purify plugin 2018-09-07 10:45:46 -07:00
Alan Agius
a723310e94 feat(@angular-devkit/build-optimizer): update typescript dependency to 3.0.x 2018-09-06 08:28:16 -07:00
Filipe Silva
7c5178c698 feat(@angular-devkit/build-optimizer): correctly identify renamed enums 2018-09-06 08:18:41 -07:00
Filipe Silva
6076e16ebc feat(@angular-devkit/build-optimizer): remove constructor __param 2018-09-06 08:18:41 -07:00
Filipe Silva
2962ede3e3 test(@angular-devkit/build-optimizer): also check method metadata 2018-09-06 08:18:41 -07:00
Filipe Silva
2393ab9aba build: simplify bazel dependencies 2018-08-22 16:36:10 -07:00
Filipe Silva
c03516a81e test(@angular-devkit/build-optimizer): add bazel tests 2018-08-22 16:36:10 -07:00
Filipe Silva
b1ad957a15 build: update bazel workspace 2018-08-22 16:36:10 -07:00
Charles Lyding
c729b0e7d9 build: use yarn workspaces 2018-08-10 18:25:32 -07:00
Alan Agius
1a255e6e4e build: bump TypeScript to 2.9 2018-08-04 16:23:37 +01:00
Hans Larsen
483cbe2665 refactor: add tslint-sonarts and a lot of tslint rules
This should clean up the code a bit.

Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.
2018-07-10 15:07:36 -07:00
Charles Lyding
c0bc9bbef4 fix(@angular-devkit/build-optimizer): support object literal methods
Fixes: #11399
2018-07-02 21:30:26 -04:00
Hans Larsen
44086c60ff build: move devkit repo back to angular-cli 2018-06-05 18:50:06 -07:00