angular_compiler 0.4.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 85

Pub Package

Tooling for compiling AngularDart.

0.4.0

New Features

  • Added TypedElement to represent a statically parsed Typed.

  • TypedReader.parse() now returns a TypedElement.

  • Added $Typed, a TypeChecker for Typed.

  • Added TypedReader for parsing generic directive types.

  • Added support for void and Null types to appear in tokens.

  • Added DirectiveVisitor, and removed $HostBinding and $HostListener.

  • Added ModuleReader.extractProviderObjects to use in the view compiler.

  • Added logFine as a new top-level API.

  • Added an internal cli.dart library. See lib/cli.dart for details.

  • Added SplitDartEmitter for internal use.

  • Added $QueryList as a TypeChecker.

  • Expose the $Provider TypeChecker.

  • Added typeArgumentOf helper method.

  • Added support for recognizing the MultiToken type.

  • CompilerFlags now supports as a fast_boot argument; default is true.

  • ReflectorEmitter now takes an optional deferredModules{Source}.

  • Started adding experimental support for a new Module syntax.

Breaking Changes

  • CompilerFlags no longer parses and supports the 'debug' option and genDebugInfo is always false, and is deprecated pending removal in a future version.

  • Removes unused APIs of ComponentReader.

  • TokenReader no longer supports arbitrary const objects or literals.

  • Removed use_new_template_parser flag. The old parser was removed.

  • Removed $QueryList.

  • Added canRead to NgAssetReader.

  • Moved CompilerFlags and Profile to cli.dart.

  • linkToReference now requires a second parameter, a LibraryReader, and treats private types (i.e. prefixed with _) as dynamic as the compiler cannot point to them.

  • ReflectableEmitter has been completely replaced with a new implementation.

  • Removed all references and use of determining a "prefix" of a type. This was no longer used once ReflectableEmitter was re-written.

  • Removed a number of internal flags that were no longer strictly required.

  • ModuleReader.deduplicateProviders now returns a List not a Set, and providers that are multi are not removed, as it is a feature of the DI system to have multiple of them with the same token.

  • Add the TypeLink class, and replace uses of Uri.

  • @Component and @Directive annotated classes are no longer @Injectable. In practice this means they can no loger be provided as an implicit const Provider(FooComponent) without either manually adding @Injectable or refactoring your code. We found this didn't really affect users, and most uses of components and directives in these lists were accidental.

Bug Fixes

  • Fixed a bug where the compiler crashed after resolving a bound type failed.

  • Misspelled or otherwise erroneous annotations on classes now produce a more understandable error message, including the element that was annotated and the annotation that was not resolved.

  • Fix a bug where throwFailure hit an NPE without a stack trace.

  • linkTypeOf correctly resolves bound types (i.e. <T>) in most cases, and can fallback to dynamic otherwise.

  • Removed all remaining (invalid) references to package:barback.

  • Prevented a RangeError that occurred when an invalid import lacked an extension.

  • ReflectorEmitter now supports MultiToken and generic-typed tokens, with some known limitations. See https://github.com/dart-lang/angular/issues/782.

  • Fix a bug in the outliner that did not the correct output extension.

0.3.0

  • Always link to export "...template.dart" files in initReflector().
  • Catch missing field-formal (this.) fields and warn in the compiler.
  • Does not emit a registerDependencies function call for empty constructors.
  • initReflector() no longer treats @Pipe as an @Injectable service.

0.2.2

  • Fixed the outliner to instruct the analyzer to ignore unused imports.
  • Add NgAssetReader.

0.2.1

  • Various changes internal to the compiler.

0.2.0

  • Added various classes and helpers to form the new compile infrastructure:
    • ComponentReader
    • DependencyReader, DependencyInvocation, DependencyElement
    • ProviderReader, ProviderElement
    • TokenReader, TypeTokenElement, OpaqueTokenElement
    • getInheritanceHierarchy, urlOf
    • ReflectableReader, ReflectableOutput, ReflectableClass

0.1.1

  • Fixed a bug where flag entry_points was only allowed to be a list.

0.1.0

  • Initial commit of angular_compiler.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  angular_compiler: ^0.4.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:angular_compiler/angular_compiler.dart';
  
Version Uploaded Documentation Archive
0.4.0 Aug 7, 2018 Go to the documentation of angular_compiler 0.4.0 Download angular_compiler 0.4.0 archive
0.3.0+1 Jan 9, 2018 Go to the documentation of angular_compiler 0.3.0+1 Download angular_compiler 0.3.0+1 archive
0.3.0 Aug 24, 2017 Go to the documentation of angular_compiler 0.3.0 Download angular_compiler 0.3.0 archive
0.2.1 Aug 15, 2017 Go to the documentation of angular_compiler 0.2.1 Download angular_compiler 0.2.1 archive
0.2.0 Aug 7, 2017 Go to the documentation of angular_compiler 0.2.0 Download angular_compiler 0.2.0 archive
0.1.1 Jul 12, 2017 Go to the documentation of angular_compiler 0.1.1 Download angular_compiler 0.1.1 archive
0.1.0 Jul 11, 2017 Go to the documentation of angular_compiler 0.1.0 Download angular_compiler 0.1.0 archive
0.4.0-alpha+19 Aug 2, 2018 Go to the documentation of angular_compiler 0.4.0-alpha+19 Download angular_compiler 0.4.0-alpha+19 archive
0.4.0-alpha+18 Jul 19, 2018 Go to the documentation of angular_compiler 0.4.0-alpha+18 Download angular_compiler 0.4.0-alpha+18 archive
0.4.0-alpha+17 Jul 16, 2018 Go to the documentation of angular_compiler 0.4.0-alpha+17 Download angular_compiler 0.4.0-alpha+17 archive

All 27 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
71
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
85
Learn more about scoring.

We analyzed this package on Aug 10, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.11.8

Platforms

Detected platforms: other

Primary library: package:angular_compiler/angular_compiler.dart with components: io, isolate, build, mirrors.

Suggestions

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Package is pre-v1 release.

While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction of the API.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use angular_compiler.dart.

Fix lib/src/analyzer/di/dependencies.dart.

Analysis of lib/src/analyzer/di/dependencies.dart reported 2 hints:

line 97 col 35: 'parameterKind' is deprecated and shouldn't be used.

line 99 col 21: 'parameterKind' is deprecated and shouldn't be used.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.69.5 <3.0.0
analyzer >=0.32.4 <0.33.0 0.32.4
args ^1.3.0 1.5.0
build ^0.12.7 0.12.7+3
code_builder ^3.0.1 3.1.2
collection ^1.14.5 1.14.11
dart_style ^1.0.9 1.1.3
logging >=0.9.0 <0.12.0 0.11.3+2
meta ^1.1.4 1.1.6
path ^1.6.1 1.6.2
source_gen >=0.8.0 <0.10.0 0.9.0+1
source_span ^1.4.0 1.4.1
stack_trace ^1.9.1 1.9.3
Transitive dependencies
async 2.0.8
built_collection 3.1.3
built_value 5.5.5 6.0.0
charcode 1.1.2
convert 2.0.2
crypto 2.0.6
csslib 0.14.4+1
fixnum 0.10.8
front_end 0.1.4
glob 1.1.7
html 0.13.3+2
kernel 0.3.4
matcher 0.12.4
package_config 1.0.5
plugin 0.2.0+3
quiver 2.0.0+1
string_scanner 1.0.3
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^0.10.0
build_test ^0.10.2+5
test ^1.3.0