# Change Log All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## [3.0.0-pre.9] - 2018-04-05 * Fix bug with node module resolution where specifiers in dynamic import() were rewritten. * Fix bug with dynamic import rewriting where imported require function could not be called. ## [3.0.0-pre.8] - 2018-04-04 * Fix bug where not all percent-encoded characters in URIs would be decoded (in particular, `%40` -> `@` which is important for scoped NPM packages). ## [3.0.0-pre.7] - 2018-04-03 * [breaking] Rename `jsTransform` and `getOptimizeStreams` option from `transformEsModuleToAmd` to `transformModuleToAmd`. * [breaking] The `transformModulesToAmd` option in `jsTransform` now automatically implies `transformImportMeta`, and throws if `transformImportMeta` is set to false. * [breaking] The `JsTransform` class now takes a full `OptimizeOptions` instead of just a `JsOptimizeOptions`. ## [3.0.0-pre.6] - 2018-04-02 * Add an `import.meta` transform to `jsTransform` with the `transformImportMeta` option. * Add a dynamic import() transform to AMD require() ## [3.0.0-pre.5] - 2018-03-28 * AMD loader will now only be injected into an HTML document if it contains at least one `type=module` script. * Added `softSyntaxError` option to `jsTransform`. If set, Babel parse errors will no longer throw. Instead, a console error will be logged, and the original JS returned. * Expose `htmlTransform` from main package index. ## [3.0.0-pre.4] - 2018-03-28 * ES to AMD module transformation is now supported by `getOptimizeStreams` and `htmlTransform`. Additionally: * Will now inject an inline minified RequireJS AMD loader, and the Babel helpers. * Phantom ``, `
`, and `` tags injected by parse5 are now removed. ## [3.0.0-pre.3] - 2018-03-28 * Upgraded to `polymer-bundler@4.0.0-pre.3` which brings ES6 module bundling to the build pipeline! Upgraded to `polymer-analyzer@3.0.0-pre.18`. ## [3.0.0-pre.2] - 2018-03-26 * Add `htmlTransform` function, factored out of the Polyserve `compile-middleware` module. * Add ordered execution to the ES to AMD module transformation in `htmlTransform`. * Node module specifier rewriter will now resolve paths according to the node module resolution algorithm, not just bare specifiers (e.g. "./foo" resolves to "./foo.js"). ## [3.0.0-pre.1] - 2018-03-21 * Upgraded to `polymer-analyzer@3.0.0-pre.17` and `polymer-bundler@4.0.0-pre.2`. * Converted from `PackageUrlResolver` to `FsUrlResolver` as more appropriate to application build context. * Ignore `not-loadable` warnings, as polymer-build should not load remote resources. ## [2.5.0] - 2018-03-21 * Add `packageName` option to `jsTransform()` function. Option is required when `isComponentRequest` option is true. ## [2.4.1] - 2018-03-20 * Fix import specifier rewriting when importing a dependency from a top-level module. ## [2.4.0] - 2018-03-19 * Fix dependency specification for `babel-core` * Add `jsTransform` function, factored out of `optimize-streams` module (so that it can be shared with Polyserve). * Renamed `jsTransform` option from `compile` to `compileToEs5` to clarify its behavior. * Added `transformEsModulesToAmd` option to `jsTransform` and JS stream transformer. * Add exponentiation, async/await, and async generator syntax/transform support to `jsTransform`. ## [2.3.3] - 2018-03-14 * Don't run Babel at all if there are no meaningful changes to make. ## [2.3.2] - 2018-03-13 * Fix bug where JS compilation/minification would ignore the "excludes" field. ## [2.3.1] - 2018-03-12 * Restore ES5 template literal uniquifying feature from https://github.com/Polymer/polymer-cli/pull/962 that was missed in earlier code migration. * Allow "none" moduleResolution option in JS compile transform. ## [2.3.0] - 2018-03-12 * JS compile and other "optimize streams" build transformers have been moved from polyer-cli into this package. * JS compile build transformer wil now rewrite bare module specifiers to paths. * Module bare specifier rewriting Babel plugin has been moved from polyserve into this package. * Module bare specifier rewriting Babel plugin now works on Windows, does not rewrite fully qualified URLs, and will follow the "module" or "jsnext:main" fields when a package.json uses them instead of "main". ## [2.2.0] - 2018-02-23 * Fixed issue where the build silently fails when several source dependencies are missing * If the ProjectConfig given to BuildAnalyzer has a `componentDir`, pass a PackageUrlResolver using that `componentDir` to the underlying Analyzer. * Warnings indicated in the `lint.warningsToIgnore` ProjectConfig option are now ignored. ## [2.1.1] - 2017-10-23 * Updated `polymer-bundler` to 3.1.1, to fix an issue with deprecated CSS imports being inlined into the wrong templates. ## [2.1.0] - 2017-10-02 * Updated `polymer-bundler` to 3.1.0, which inlines external stylesheet links in templates. ## [2.0.0] - 2017-07-18 * [Breaking] Upgraded `polymer-bundler` to 3.x, which includes new default behavior around the `rewriteUrlsInTemplates` option in support of Polymer 2.x defaults. Polymer 1.x project developers should set the option `rewriteUrlsInTemplates: true`. See [using polymer-bundler programmatically](https://github.com/polymer/polymer-bundler#using-polymer-bundler-programmatically) for more information. ## [1.6.0] - 2017-06-29 * Automatically recognize any lazy-imports encountered as fragments when generating push-manifest. * The `addPushManifest` feature now honors the laziness of html-imports and excludes them from the set of their importers' pushed assets. * Upgraded Polymer Bundler to 2.2.0, which updated the shell strategy so that the shell is no longer linked to from other bundles. See [Bundler issue #471](https://github.com/Polymer/polymer-bundler/issues/471) for more details. ## [1.5.1] - 2017-06-02 * Prefetch links are now only added for transitive dependencies. ## [1.5.0] - 2017-05-23 * Service Worker generator now generates relative URLs for pre-cached assets instead of absolute. This makes it possible to cache assets when the app is served from a non-root path without re-mapping all URLs. Since server workers fetch relative to their own URL, there is no effective change for service workers served from the root path. * Service Worker generator now better caches the entrypoint by setting navigateFallback and related options. ## [1.4.2] - 2017-05-19 * Updated the AddPrefetchLinks transform to not insert html root element tags like ``, `` or ``. ## [1.4.1] - 2017-05-18 * Updated dependency on `polymer-bundler` to use official 2.0.0 release and enable unmediated semver upgrades. * Fixed issue with push manifest URLs being a mix of relative and absolute URLs (now always relative), and a double-delimiter issue when using basePath. ## [1.4.0] - 2017-05-18 * Added `PolymerProject.addPrefetchLinks()` transform. * Added `PolymerProject.addBabelHelpersInEntrypoint()` transform. ## [1.3.1] - 2017-05-16 * Updated polymer-project-config dependency. ## [1.3.0] - 2017-05-15 * A prefix can now be passed to `addPushManifest()`, which will be prepended to all push manifest resource paths. * A basePath can now be passed to the service worker generator, where it will be used as the sw-precache replacePrefix. * Upgrade to Polymer Analyzer that changes many errors to warnings for more robust builds. ## [1.2.5] - 2017-05-15 * Updated `polymer-analyzer` dependency to `^2.0.0` now that it is out of alpha. ## [1.2.4] - 2017-05-11 * Simplify addCustomElementsEs5Adapter() adapter injection method. * Bundler stream no longer emits any CSS or Javascript files which have been inlined into bundles. ## [1.2.3] - 2017-05-10 * Dependency updates. Fixes issue with `polymer-bundler`'s handling of `lazy-import` links in `dom-modules`. ## [1.2.2] - 2017-05-09 * Dependency updates. Update to `sw-precache@5` to prevent "corrupted data" errors on Firefox 52 and Chrome 59 when using `addServiceWorker()`. Upgraded `polymer-bundler` and `polymer-analyzer` to address `lazy-import` bugs. ## [1.2.1] - 2017-05-03 * Dependency updates. Upgraded to new `polymer-bundler`. Most important update is a fix to bug whereby `lazy-import` links were being moved out of their `### [0.6.0-alpha.3] - 2016-12-19 * Actually update the version of polymer-analyzer we use, fixing a number of errors. (alpha.2 was accidentally a noop release). ### [0.6.0-alpha.2] - 2016-12-19 * Update the version of polymer-analyzer we use, fixing a number of errors. ### [0.6.0-alpha.1] - 2016-12-13 * **Interface Update!** `PolymerProject.analyzer` is no longer a required step in your build pipeline. Instead, analysis happens automatically while it fills the `project.sources()` and `project.dependencies()` streams with your project files. See [the README](/README.md) for updated examples of what build streams look like without the analyzer. * **[`merge-stream`](https://www.npmjs.com/package/merge-stream) users:** Update to v1.0.1 or later if you are using `merge-stream` with `polymer-build`. Stream errors do not propagate properly in previous versions of the library, and your build task may silently fail as a result. * `StreamAnalyzer` is now `BuildAnalyzer` (since it is no longer a stream). This change only affects uses who are importing and/or using `StreamAnalyzer` directly from the `polymer-build` module. * Fix issue where behaviors were not being analyzed properly.