angular-cn/packages
Pete Bacon Darwin 7186f9c016 refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921)
To improve cross platform support, all file access (and path manipulation)
is now done through a well known interface (`FileSystem`).

For testing a number of `MockFileSystem` implementations are provided.
These provide an in-memory file-system which emulates operating systems
like OS/X, Unix and Windows.

The current file system is always available via the static method,
`FileSystem.getFileSystem()`. This is also used by a number of static
methods on `AbsoluteFsPath` and `PathSegment`, to avoid having to pass
`FileSystem` objects around all the time. The result of this is that one
must be careful to ensure that the file-system has been initialized before
using any of these static methods. To prevent this happening accidentally
the current file system always starts out as an instance of `InvalidFileSystem`,
which will throw an error if any of its methods are called.

You can set the current file-system by calling `FileSystem.setFileSystem()`.
During testing you can call the helper function `initMockFileSystem(os)`
which takes a string name of the OS to emulate, and will also monkey-patch
aspects of the TypeScript library to ensure that TS is also using the
current file-system.

Finally there is the `NgtscCompilerHost` to be used for any TypeScript
compilation, which uses a given file-system.

All tests that interact with the file-system should be tested against each
of the mock file-systems. A series of helpers have been provided to support
such tests:

* `runInEachFileSystem()` - wrap your tests in this helper to run all the
wrapped tests in each of the mock file-systems.
* `addTestFilesToFileSystem()` - use this to add files and their contents
to the mock file system for testing.
* `loadTestFilesFromDisk()` - use this to load a mirror image of files on
disk into the in-memory mock file-system.
* `loadFakeCore()` - use this to load a fake version of `@angular/core`
into the mock file-system.

All ngcc and ngtsc source and tests now use this virtual file-system setup.

PR Close #30921
2019-06-25 16:25:24 -07:00
..
animations build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
bazel Revert "build(bazel): update to bazel 0.27.0 and fix compat in @angular/bazel package (#31019)" (#31267) 2019-06-25 14:36:01 -07:00
benchpress build: remove unreferenced tsconfig-build.json files (#30858) 2019-06-05 09:03:36 -07:00
common docs: remove inappropriate link (#31091) 2019-06-19 15:31:56 -07:00
compiler perf(ivy): chain multiple `i18nExp` calls (#31258) 2019-06-25 11:26:29 -07:00
compiler-cli refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
core docs(core): update code sample for "outputs" attribute (#31199) 2019-06-25 14:44:08 -07:00
docs
elements Revert "build: update to rules_nodejs 0.32.2 (#31019)" (#31267) 2019-06-25 14:36:00 -07:00
examples Revert "build: update to rules_nodejs 0.32.2 (#31019)" (#31267) 2019-06-25 14:36:00 -07:00
forms build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
http build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
language-service refactor(language-service): Remove NgLSHost -> NgLS dependency (#31122) 2019-06-19 15:19:56 -07:00
platform-browser docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
platform-browser-dynamic build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
platform-server docs: add platform to glossary (#30731) 2019-06-12 11:46:25 -07:00
platform-webworker build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
platform-webworker-dynamic build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
private/testing test(ivy): add onlyInIvy perf counter expectations (#30339) 2019-05-09 11:22:00 -07:00
router build: convert entry_point to label (#30627) 2019-06-11 00:03:11 +00:00
service-worker Revert "build: update to rules_nodejs 0.32.2 (#31019)" (#31267) 2019-06-25 14:36:00 -07:00
upgrade feat(upgrade): provide unit test helpers for wiring up injectors (#16848) 2019-06-20 17:04:01 -07:00
zone.js Revert "build: fix build failures with worker mode cache and @types/events (#31019)" (#31267) 2019-06-25 14:36:00 -07:00
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
README.md
empty.ts
goog.d.ts test(ivy): add bundling test `todo_i18n` (#27420) 2018-12-04 19:59:12 -08:00
license-banner.txt build: bump year (#27880) 2019-01-11 11:15:59 -08:00
system.d.ts
tsconfig-build.json build: update to rules_typescript 0.25.1 (#28625) 2019-02-21 07:46:21 -08:00
tsconfig-test.json Revert "build: disable must-use-promises check in ts_library tsetse for tests as... (#31019)" (#31267) 2019-06-25 14:36:00 -07:00
tsconfig.json build: move zone.js to angular repo (#30962) 2019-06-20 11:27:39 -07:00
types.d.ts build: switch to typescript's es2015 typings (#28570) 2019-02-06 14:17:55 -05:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT