Skip to content

Commit

Permalink
refactor(ngcc): fix typos in comments
Browse files Browse the repository at this point in the history
This is a follow-up to angular#36944, because I didn't manage to finish my
review before the PR got merged.
  • Loading branch information
gkalpak committed Jun 5, 2020
1 parent 3569fdf commit 4601e51
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
15 changes: 8 additions & 7 deletions packages/compiler-cli/ngcc/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ ts_library(
],
)

# As of version 10, the release packages do not contain esm2015 output anymore. The ngcc
# integration tests intend to test ES5 features though, so we downlevel the flat esm2015
# file to ES5 using Babel. We can then link that into the mock file system as if the Angular
# core package is still built with previous APF versions where esm5 output was shipped. This
# allows us to ensure that ngcc properly processes libraries with esm5 output. **Note**: We are
# using Babel instead of `tsc` as TypeScript does not allow us to downlevel the file without
# setting the module resolution to either `amd` or `system`. We want to preserve ES modules.
# As of version 10, the release packages do not contain esm5 output anymore. The ngcc integration
# tests intend to test ES5 features though, so we downlevel the flat esm2015 file to ES5 using
# Babel. We can then link that into the mock file system as if the Angular core package is still
# built with previous APF versions where esm5 output was shipped. This allows us to ensure that ngcc
# properly processes libraries with esm5 output.
# **Note**: We are using Babel instead of `tsc` as TypeScript does not allow us to downlevel the
# file without setting the module resolution to either `amd` or `system`. We want to preserve ES
# modules.
babel(
name = "fesm5_angular_core",
outs = ["fesm5_angular_core.js"],
Expand Down
10 changes: 5 additions & 5 deletions packages/compiler-cli/ngcc/test/integration/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export type PackageSources = {
/**
* Instead of writing packaged code by hand, and manually describing the layout of the package, this
* function transpiles the TypeScript sources into a flat file structure using the ES5 format. In
* this package layout, all compiled sources are at the root of the package, with .d.ts files next
* to the .js files. Each .js also has a corresponding .metadata.js file alongside with it.
* this package layout, all compiled sources are at the root of the package, with `.d.ts` files next
* to the `.js` files. Each `.js` also has a corresponding `.metadata.json` file alongside with it.
*
* All generated code is written into the `node_modules` in the top-level filesystem, ready for use
* in testing ngcc.
Expand All @@ -41,7 +41,7 @@ export function compileIntoFlatEs5Package(pkgName: string, sources: PackageSourc
* Instead of writing packaged code by hand, and manually describing the layout of the package,
* this function transpiles the TypeScript sources into a flat file structure using the ES2015
* format. In this package layout, all compiled sources are at the root of the package, with
* `.d.ts` files next to the `.js` files. Each `.js` also has a corresponding `.metadata.js`
* `.d.ts` files next to the `.js` files. Each `.js` also has a corresponding `.metadata.json`
* file alongside with it.
*
* All generated code is written into the `node_modules` in the top-level filesystem, ready for use
Expand Down Expand Up @@ -78,8 +78,8 @@ export interface FlatLayoutOptions {
/**
* Instead of writing packaged code by hand, and manually describing the layout of the package, this
* function transpiles the TypeScript sources into a flat file structure using a single format. In
* this package layout, all compiled sources are at the root of the package, with .d.ts files next
* to the .js files. Each .js also has a corresponding .metadata.js file alongside with it.
* this package layout, all compiled sources are at the root of the package, with `.d.ts` files next
* to the `.js` files. Each `.js` also has a corresponding `.metadata.json` file alongside with it.
*
* All generated code is written into the `node_modules` in the top-level filesystem, ready for use
* in testing ngcc.
Expand Down

0 comments on commit 4601e51

Please sign in to comment.