Since editors and IDEs do typechecking and show errors in place,
often there is no benefit to running type checking in our test pipeline.
This PR allows you to disable type checking:
gulp test.unit.js --noTypeChecks
This commit also makes es6 generation optional.
fix(build): removes unnecessary circular dependencies
Closes#5299
This will send bundle sizes (before and after gzip) to Google Analytics so that we can
track bundle size over time for every bundle we produce.
Closes#5294
we can now filter build graph via --project flag to speed up build performance
usage:
gulp test.unit.js --project=angular2,angular2_material
Closes#5272
This measures how long does it take for gulp to start the first task up after being invoked from command line.
I'm suspecting that we can optimize this significantly, but let's start tracking it first.
BREAKING CHANGE
All private exports from 'angular2/src/core/{directives,pipes,forms}' should be replaced with 'angular2/src/common/{directives,pipes,formis}'
Closes#5153
Since the very first npm install is called while node_modules is empty, we need to ignore it, but we can track
the start timestamp and record the install even once the installation is completed.
We've had issues such as the one I documented: https://github.com/Microsoft/TypeScript/issues/5187
This tslint check prevents this happening again.
This change also updates to the newest tslint which gets typings from npm.
Closes#4970
This is just a maintenance upgrade to keep us close to the latest release.
No known bugs are being fixed by this upgrade.
I also removed the npm override in .travis.yaml since node 4 ships with a recent version of npm
and usually this version is preferred (it might contain custom patches).
Closes#4939
Before this change we would exit while there were cleanup micro tasks scheduled for executions,
this caused tmp files to be left over and consume a lot of space.
Fixes#4441
The directory contains code authored in a style that makes it transpilable to dart. As such, these are not idiomatic examples of Angular 2 usage.
The main purpose of this directory is to enable experimentation with Angular within the angular/angular repository.
Closes#4342Closes#4639
This is pretty experimental, but the goal is to track the performance
of our build over time so that we can more easily track perf regressions.
Currently it's integrated only with gulp tasks, but I'd like to expand it
to tracking travis jobs, protractor/benchpress test runs, npm installs, etc.
No PII is being collected. And the data is collected via a Google Analytics
property owned by the Angular team account.
Closes#4672
Http sfx bundle was not regenerated when bundles.js task was called.
The new bundles are a bit bigger (angular2.min.js 519604 -> 590056 bytes).
Part of it is because TS inlines class shims vs defering to
TraceurRuntime.
BREAKING CHANGE:
TraceurRuntime is no longer need when consuming the angular 2 bundles.
Shims or native support for ES6 Map, Set and Symbol are still needed (can be
provided by es6-shim.js or core.js).
Closes#4141
BREAKING CHANGE
Stop supporting http module in Dart. This is because Dart has a
well developed http package which should be used by Dart
customers instead.
Empty ES6 files are detected as "global" module format by
default which means that we end up with 2 module formats in
a bundle (es6 and global). This makes module loading more
complex and make break with certain SystemJS builder / loader
combinations.
Fixes#3528Closes#3561
This change also makes us compliant with 1.6.0-dev compiler,
so we can do some experiments with apps that use 1.6 features
and compile against Angular.
We should probably add a travis build for 1.6 so we stay compatible
with both versions.
Originally we ran gulp enforce-format at the beginning of the build.
This was annoying because you came back from lunch to find that no tests
ran so you have to start your PR over.
Then we changed it to run the linters at the end. This is annoying because
you might be ready to merge to master, and could have fixed the lint
issues immediately, but now much wait for another PR.
The solution is to run the lint checks in another build. This marks
your PR red very early, but you still get the feedback of whether the
tests are passing.
Don't precompile Dart2JS for pull requests, instead serve the dart
sources with pub serve. We were already testing with Dartium so
all we lose is some test coverage of defects exposed only by the
Dart2JS transpiler.
This still runs the dart transformer.
Fixes#3030
Relying on ASI (automatic semicolon insertion)
is allowed in TypeScript because JavaScript allows
it. However, when we run clang-format it doesn’t
understand that these statements are terminated
with a newline and changes the indentation, in bad
cases even breaking the code.
Fixes#817
This means that we can now run just the d.ts file generation by running:
```bash
gulp docs/typings
```
In addition the type definition generation was messing with the other docs tasks
so separating it also fixes problems there.
this is no longer necessary and if anyone runs two gulp processes in parallel can actually cause
issues because once one of the processes ends, it delets the tmp dir which can affect the remaining
process
This is an alternative to #2778. All of the symlinks to packages directory within the test directory
are not needed for running tests, so we can safely remove them. This removes 80k files from the test directory
which significantly speeds up Karma.
Closes#2437
This change causes the build system to write a log file into the tmp folder after each build.
This file contains command line arguments that tell karma about all the added/changed/removed files
from the last build. Karma can then use this list instead of doing internal globbing which can be
very expensive especially for hte dart builds that contain thousands of files.
Closes#2437
Don’t need to bundle them as they are already
present in G3. I.e. the benchpress bundle
only includes benchpress and Angular2 bits.
Also removes adding license headers for now,
as we only have one license.
This makes sure just running clang-format will use whatever version is
used in the project, by loading it from the closest node_modules folder.
It also moves the clang-format dependency to the top and explicitly
passes it to gulp-clang-format, giving us more control over the version
used.
add test in gulpfile which will compile a basic TS file with generated
angular2.d.ts to ensure generated d.ts is valid syntactic TS
Adds support for enums in .d.ts generation pipeline.
Removes renaming reexports in http module.
In order to speedup the startup time of test.unit.js task, we are moving the circular dependency check into
a pre-test check that executes only on travis. Similarly we are moving the style check to a post-test check
that executes on travis.
This way if a circular dependency issue occurs, we find it before running tests on CI and if the code
is not formatted we fail the build only if all the tests pass.
Related to #2536
Related to #2094
You can now run `gulp serve.e2e.prod` to instantiate a task that watches
and compiles example and module files into the prod directory in dist
and then allows the code to be run via protractor.
Closes#2369
Uglify files related to angular2.min.js bundle in one task.
Include reflect.js in the bundle, which was previously missing. Minify reflect.js, zone.js, and angular2.min.js using uglify.
This implementation only works in JavaScript, while the Observable transpilation
story gets worked out. Right now, the service just makes a simple request,
and returns an Observable of Response.
Additional functionality will be captured in separate issues.
Fixes#2028
clang-format 1.0.17 substantially improves formatting for fat arrow functions
and array literal detection. It also fixes a number of minor formatting issues.
It was confusing because the test.unit.dart task does ignore the initial, and
the logger was hardcoded to always ignore the first task, leading to the appearance
that a run was happening twice for no reason.
Also, fixed the "fake ignoreInitial" handling to not rely on a fake event, which
is not necessary.
Closes#2101
Use the `ProtoViewDto` created by the render `Compiler` to create a
`ChangeDetectorDefinition`.
From there, generate a subclass of `AbstractChangeDetector` for each
`ChangeDetectorDefinition`.
Run some basic unit tests for the dynamic and JIT change detectors on
pre-generated change detectors.
- wait for the cleanup to finish (it's async) before exiting on ctrl+c
- wait for the cleanup to finish (it's async) onBeforeExit
- remove tmp directory during onBeforeExit to cleanup past leaks
Closes#1919
if any tasks executed by gulp results in an error, gulp will try hard to show errors. these are usually irelevant in the
watch mode. this is why it's ok to supress them except when running in the ci test mode, in which case failing tasks and logging
exceptions is helpful.
Closes#1881
We ran across fatal issues with npm shrinkwrap on node 0.10.x which don't go away even with npm 2.9.x.
Upgrading node to 0.12 fixed the shrinkwrap issues. Since now we run node 0.12 on ci as well, there
is no reason for anyone to use node 0.10 during development.
gulp-watch uses chokidar which uses fsevents which is much better than fs polling or relying on fs.watch.
fsevents use only one FD per watch invocation as opposed to one FD per watched directory and any subdirectory.
this should improve the situation with EMFILE errors (caused by lack of available file descriptors)
----
I also tried the following:
gulp-sane: requires watchman installation via brew so I didn't want to request that everyone goes throught that yet
gulp-chokidar: didn't work, seems to be obsolete
By default, gulp-typescript currently depends on typescript 1.4, which doesn't work for us.
For example, it doesn't allow `let` when emitting ES5, along with lots of other errors.
It so happens that npm sometimes makes this work, as seen by the warning
```npm WARN unmet dependency /Users/alexeagle/Projects/angular/node_modules/gulp-typescript requires typescript@'1.4.1' but will load
npm WARN unmet dependency /Users/alexeagle/Projects/angular/node_modules/typescript,
npm WARN unmet dependency which is version 1.5.0```
but when we update our node_modules in a certain way, we lose this setup and it breaks.
We should be explicit about using a different version of typescript than gulp-typescript depends on.
previously there was a chance of race conditions that could sporadically fail the build.
additionally runing a task via gulp.start or runSequence always reruns its dependencies, which meant that we were blowing away
the build.tools build and rebuilding everything from scratch even during the interactive/watch mode. This meant that the build
pipeline cache was destroyed on every change and we never got the benefit of incremental compilation
Previously, karma used a custom preprocessor. Instead, have karma
run built dart from the `dist` folder and use gulp and broccoli
to watch for changes.
Due to limitation of system build, the router cannot have its own sfx
bundle.
Fixes an issue with RouteConfig decorator by moving it into its own
file.
This removes .es6 files which are pure duplicates of a
.ts file in the same folder.
Next we need to remove .js files as well, and remove karma preprocessors for dart.
This is a prerequisite for switching to TypeScript. We need to remove the Traceur preprocessor
from Karma, so we have the build specified in a single place (broccoli tree def'n).
You can generate docs for comsumption by the angular.io website by running:
```bash
gulp docs/angular.io
```
The generated docs can be found in `dist/angular.io`
on our CI server we currently split each build into the building phase and testing phase, this change aligns test.unit.tools/ci
with the rest of ci test taskswq
components:
- gulp test.unit.broccoli task
- mock-fs for mocking our FS in unit tests
- jasmine d.ts file for type checking
jasmine lib is provided by minijasmine2 so we don't need to include it explicitly
This change solves several problems:
- the broccoli pipeline is used to compile the node/cjs tree upon any change to the modules/ directory
- jasmine tests run in a new process removing the need to clean up environment after each test
- since we transpile only those test files that are actually needed for node/cjs build, we transpile less and don't need to filter out tests
We have Dart code in `angular2` module that ought to be in its own
package. Examples include Dart analysis plugins, and potentially the
transformers (although transformers cannot be moved out just yet).
However, this code is Dart-only and it doesn’t make sense to use JS
directory layout for it. This commit introduces a sub-directory called
`modules_dart`. All modules in this directory are pure Dart packages
using standard pub directory layout. The code in these packages never
gets transpiled. It is directly copied to `dist` unmodified, except an
adjustment in relative paths in `pubspec.yaml` files.
index_static.js & index_static.html are unnecessary in Js and are now
essentially generated via the Dart transformer. The angular
transformer is specified in examples/pubspec.yaml; use pub build to
create a transformed application that does not use dart:mirrors.
Create index_dynamic.js & index_dynamic.html, which are used to test
that the app runs equally well with mirrors and without.
Closes#495