121 Commits

Author SHA1 Message Date
Charles Lyding
fa9a648cae fix(@angular-devkit/build-optimizer): handle undefined factoryMeta in Webpack plugin
A Webpack module's `factoryMeta` property is not guaranteed to be defined.  This change ensures that the build optimizer skip property is added even in the case of no `factoryMeta` currently defined.
2020-08-12 19:27:00 +01:00
Charles Lyding
76b1b53a4b refactor(@angular-devkit/build-optimizer): verify Program for type-checking passes 2020-08-12 19:26:53 +01:00
Renovate Bot
282dd66cfb build: update tslib to version 2.0.1 2020-08-10 09:44:20 +01:00
Keen Yee Liau
fa9136a971 build: minor fixes for google3 sync
This commit makes a few minor changes to enable syncing the CLI repository
into google3.

1. mark pkg_tar and pkg_npm as external
2. remove dependencies (marked as comment) which are stale in google3
3. remove TS files generated from JSON schema in BUILD files since these
   files are compiled and added to the g3 codebase at sync time
4. Some minor typing changes
5. Remove duplicate licenses
6. mark dependencies which are not available in g3 as external
7. Immediately type the result of JSON.parse() as required by g3 linter.
   Otherwise, the type defaults to `any`.
2020-07-24 22:52:22 +02:00
Renovate Bot
f59fba5ebb build: update tslib to version 2.0.0 2020-05-19 10:56:01 +01:00
Renovate Bot
63455d2e86 build: update tslib to version 1.12.0 2020-05-13 10:12:02 -04:00
Alan Agius
56ffa1c7b2 build: vendor typescript 3.6 in build optimizer
With this change we "vendor" TypeScript 3.6 in build optimizer instead of using directly the npm package.

Reasons:
- We cannot update to a more recent version of TypeScript due to https://github.com/microsoft/TypeScript/issues/38412
- Yarn workspace are not supported under Bazel. This means currently we are running unit testswhich uses a different TypeScript version at runtime.
- In TypeScript 3.9, the shape of ES2015 classes changed https://github.com/microsoft/TypeScript/pull/32011, this requires some changes in the UT expects, but this again will not be correct to change now.
2020-05-11 07:45:58 -04:00
Renovate Bot
b8f4edaabb build: update tslib to version 1.11.2 2020-05-08 13:06:32 -07:00
Charles Lyding
164094829d refactor(@angular-devkit/build-optimizer): removed deprecated/unused passes
BREAKING CHANGE
Deprecated and outdated optimization passes class fold and import tslib have been removed.

Note: This change only effects direct @angular-devkit/schematics users and not the application developers.
2020-05-04 10:54:48 -07:00
Charles Lyding
432aade7ad refactor(@angular-devkit/build-optimizer): remove errant deprecations
These functions are not public and are also used internally.
2020-05-04 10:54:48 -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
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
Keen Yee Liau
e5db6a8ccd build: BUILD files formatted to have load statements at the top 2020-04-23 10:31:56 -07:00
Filipe Silva
60e92d54fb style: reformat bazel files 2020-04-07 09:07:19 -07:00
Filipe Silva
55cd9bbb06 build: include json files in @angular-devkit/build-optimizer Bazel build 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
456bbffee5 build: add module_name to @angular-devkit/build-optimizer Bazel rule 2020-04-07 09:07:19 -07:00
Charles Lyding
6e33f447a6 refactor(@angular-devkit/build-optimizer): remove casts from tslib helper check 2020-04-06 09:55:58 -07:00
Charles Lyding
4509d3c112 fix(@angular-devkit/build-optimizer): use TypeScript 3.6
Fixes: #17320
2020-04-06 09:55:58 -07:00
Renovate Bot
de68dab2c6 build: update loader-utils to version 2.0.0 2020-03-19 09:47:50 -07:00
Renovate Bot
b5a475d3d4 build: update typescript to version 3.8.3 2020-03-03 13:37:35 -08:00
Charles Lyding
0db3a699d4 refactor(@angular-devkit/build-optimizer): update to use TypeScript 3.8 2020-03-02 14:05:31 -08:00
Renovate Bot
d54ad29023 build: update tslib to version 1.11.1 2020-02-28 12:27:36 -08:00
Renovate Bot
816b37a14c build: update tslib to version 1.11.0 2020-02-25 10:11:11 -08:00
Renovate Bot
78cf0c7c32 build: update loader-utils to version 1.4.0 2020-02-24 12:37:15 -08:00
Alan Agius
f635479cef build: update nodejs rules to 1.0+ 2020-01-27 11:03:51 -08:00
Alan Agius
049fc792a5 revert: "fix(@angular-devkit/build-optimizer): wrap classes which contain empty statements (#16538)"
This reverts commit 4cde9228df5118a6c743467c668b6b7c5fe73013.
2020-01-17 08:13:16 -08:00
Filipe Silva
8716adff38 fix(@angular-devkit/build-optimizer): revert to using TS 3.6
Workaround for https://github.com/microsoft/TypeScript/issues/36098.

Should go back to 3.7 once it is fixed.
2020-01-09 13:43:49 -08:00
Filipe Silva
86d4385440 build: use TypeScript 3.7 2020-01-09 13:43:49 -08:00
Charles Lyding
a1dede16ee fix(@angular-devkit/build-optimizer): improve quality of sourcemaps 2020-01-09 12:02:32 -08:00
Alan Agius
4cde9228df fix(@angular-devkit/build-optimizer): wrap classes which contain empty statements (#16538)
NGCC currently produces empty statments which breaks class wrapping.

Closes #16509
2020-01-04 11:15:39 -08:00
Filipe Silva
c3a4c454be fix(@angular-devkit/build-optimizer): update ɵsetClassMetadata call format
It's in a IIFE after https://github.com/angular/angular/pull/33337 lands.
2019-11-20 17:31:19 -08:00
Filipe Silva
7502b73b3c fix(@angular-devkit/build-optimizer): don't remove ɵɵsetNgModuleScope calls
These will be automatically removed after https://github.com/angular/angular/pull/33671 lands because they are in a side-effect free IIFE.
2019-11-20 17:31:19 -08:00
Alan Agius
e31d5d89b7 build: update bazel packages 2019-10-24 12:05:25 -07:00
Filipe Silva
7612d3e200 build: use TS 3.6.4 2019-10-16 10:00:49 -07:00
Alan Agius
f943d3a8dc refactor(@angular-devkit/build-angular): rename ngModuleDef to ɵmod 2019-10-16 05:56:23 -07:00
Filipe Silva
07bfd1eeb3 fix(@angular-devkit/build-optimizer): remove deprecated testImportTslib 2019-10-03 14:42:04 -07:00
Filipe Silva
c2b13a7683 feat(@angular-devkit/build-optimizer): don't use getImportTslibTransformer
This transformer can cause size regressions when it introduces `tslib` imports across independent chunks.

It should be deprecated because tslib adoption has become more ubiquitous.

Should also speed up Build Optimizer processing time because there's one less thing to do.

Closes https://github.com/angular/angular-cli/issues/15401 without adding the warning, because some libraries like zone.js should inline the helpers.
2019-10-03 14:42:04 -07:00
Alan Agius
ae36fbcd8e fix(@angular-devkit/build-optimizer): fix error when __decorate has no __metadata
When a `__decorator` expression has no `__metadata` call, example:

```js
__decorate([
    ContentChild('heading', { read: ElementRef, static: true })
], FooBarComponent.prototype, "buttons", void 0);
```

A `Cannot read property 'kind' of undefined` error will be thrown.

Closes: #15703
2019-10-01 11:23:54 -07:00
Filipe Silva
5564ce6ea1 feat(@angular-devkit/build-optimizer): scrub ɵsetClassMetadata and ɵɵsetNgModuleScope calls 2019-09-25 09:43:21 -07:00
Filipe Silva
b1f7537342 refactor(@angular-devkit/build-optimizer): refactor assignment expression identification 2019-09-25 09:43:21 -07:00
Filipe Silva
016977c9ff fix(@angular-devkit/build-optimizer): remove unecessary scrub file checks 2019-09-25 09:43:21 -07:00
Alan Agius
4df025f5f1 fix(@angular-devkit/build-optimizer): don't mark tslib helpers which are suffixed with $ and a number as pure (#15451)
Closes #15392
2019-08-27 10:26:03 -07:00
Alan Agius
59d80f52be fix(@angular-devkit/build-optimizer): replace multiple tslib helpers (#15400)
Inlined tslib helpers can be suffixed with `$` and a number when having multiple helpers in the same file.

With this change we will replace all tslib inline helpers to imports from `tslib`
2019-08-23 11:35:42 -07:00
Alan Agius
e2bb482b44 fix(@angular-devkit/build-optimizer): don't add pure comments to tslib helpers (#15303)
Closes #15301
2019-08-12 11:07:24 -07:00
Filipe Silva
4826378706 fix(@angular-devkit/build-angular): consider local decl in angular core files to be metadata too
Followup to https://github.com/angular/angular-cli/pull/15239, fixes a 6kb size regression in new apps, potentially more in larger apps.

Local declarations inside `@angular/core` files should also be considered metadata and scrubbed.
2019-08-08 08:28:20 -07:00
Renovate Bot
44f9141a56 build: update webpack-sources to version 1.4.3 2019-08-08 08:26:45 -07:00