changelogs.md


polymer/polymer-build

Repository  -  API  -  Source

3.0.0-pre.9

April 5, 2018
  • 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

April 4, 2018
  • 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

April 3, 2018
  • [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

April 2, 2018
  • Add an import.meta transform to jsTransform with the transformImportMeta option.
  • Add a dynamic import() transform to AMD require()

3.0.0-pre.5

March 28, 2018
  • 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

March 28, 2018
  • 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 <html>, <head>, and <body> tags injected by parse5 are now removed.

3.0.0-pre.3

March 28, 2018
  • 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

March 26, 2018
  • 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

March 21, 2018
  • 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

March 21, 2018
  • Add packageName option to jsTransform() function. Option is required when isComponentRequest option is true.

2.4.1

March 20, 2018
  • Fix import specifier rewriting when importing a dependency from a top-level module.

2.4.0

March 19, 2018
  • 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

March 14, 2018
  • Don't run Babel at all if there are no meaningful changes to make.

2.3.2

March 13, 2018
  • Fix bug where JS compilation/minification would ignore the "excludes" field.

2.3.1

March 12, 2018

2.3.0

March 12, 2018
  • 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

February 23, 2018
  • 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

October 23, 2017
  • Updated polymer-bundler to 3.1.1, to fix an issue with deprecated CSS imports being inlined into the wrong templates.

2.1.0

October 2, 2017
  • Updated polymer-bundler to 3.1.0, which inlines external stylesheet links in templates.

2.0.0

July 18, 2017
  • [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 for more information.

1.6.0

June 29, 2017
  • 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 for more details.

1.5.1

June 2, 2017
  • Prefetch links are now only added for transitive dependencies.

1.5.0

May 23, 2017
  • 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

May 19, 2017
  • Updated the AddPrefetchLinks transform to not insert html root element tags like <html>, <head> or <body>.

1.4.1

May 18, 2017
  • 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

May 18, 2017
  • Added PolymerProject.addPrefetchLinks() transform.
  • Added PolymerProject.addBabelHelpersInEntrypoint() transform.

1.3.1

May 16, 2017
  • Updated polymer-project-config dependency.

1.3.0

May 15, 2017
  • 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

May 15, 2017
  • Updated polymer-analyzer dependency to ^2.0.0 now that it is out of alpha.

1.2.4

May 11, 2017
  • Simplify addCustomElementsEs5Adapter() adapter injection method.
  • Bundler stream no longer emits any CSS or Javascript files which have been inlined into bundles.

1.2.3

May 10, 2017
  • Dependency updates. Fixes issue with polymer-bundler's handling of lazy-import links in dom-modules.

1.2.2

May 9, 2017
  • 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

May 3, 2017
  • 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 <dom-module> containers.

1.2.0

May 2, 2017
  • Dependency updates. Upgraded to new polymer-bundler, polymer-analyzer and dom5 versions.
  • Fixed bug where <html>, <head> and <body> were added to documents mutated by HtmlSplitter and the CustomElementsES5AdapterInjector.
  • Print build-time warnings and errors with full location information, and precise underlines of the place where the problem was identified.
  • Fixed issue where two copies of entrypoint files with same name are emitted by bundler stream: an un-bundled one, followed by bundled one.
  • Fixed issue where html imports were emitted by bundler as individual files even though they were bundled.
  • Added an options argument to PolymerProject#bundler() to support users configuring the bundler. Options include all Bundler#constructor options, analyzer, excludes, inlineCss, inlineScripts, rewriteUrlsInTemplates, sourcemaps, stripComments, as well as strategy and urlMapper which are used on call to Bundler#generateManifest.

1.1.0

April 14, 2017
  • Add addCustomElementsEs5Adapter() method to PolymerProject. Provides an adapter needed when serving ES5 to browsers that support the native Custom Elements API.

1.0.0

April 11, 2017
  • [Breaking] Remove Node v4 support: Node v4 is no longer in Active LTS, so as per the Polymer Tools Node.js Support Policy polymer-build will not support Node v4. Please update to Node v6 or later to continue using the latest verisons of Polymer tooling.
  • New Feature: add automatic HTTP/2 push manifest generation for HTTP/2 Push-enabled servers.

0.9.1

March 20, 2017
  • Fixed issue with Service Worker generation in Windows environment where full paths were put into its precacheConfig instead of relative paths.
  • Bundled files always use canonical platform separators in their paths now. Previously, files might have either back-slashes or forward-slashes on Windows, depending on how they arrived at the Bundler and this caused the Analyzer to treat files as missing when mapping them by path.

0.9.0

March 15, 2017
  • [breaking] PolymerProject's bundler property is now a bundler() method, returning a new BuildBundler stream on each call. This is to support parallel pipelines using bundler.

0.8.4

March 4, 2017
  • Build now delegates authority to the Analyzer for what urls are package external instead of local heuristics.
  • Bundling now processes files coming in from streams, to support things like js-minification before bundling.

0.8.3

March 3, 2017
  • Dependency updates.

0.8.2

February 24, 2017
  • Dependency updates

0.8.1

February 17, 2017
  • Update the version of polymer-bundler to fix several bugs:
    • Fix regressions in url attribute updating (src, href, assetpath).
    • Added support for <base> href and target attribute emulation on bundled output.
    • Whitespace-agnostic license comment deduplication.
    • Server-side includes no longer stripped as comments.

0.8.0

February 14, 2017
  • project.splitHtml() & project.rejoinHtml() methods have been pulled off of PolymerProject so that multiple streams can split/rejoin in parallel. See the new README section on HTMLSplitter for updated instructions on how to split/rejoin inline scripts and styles in your build stream.
  • Completed the migration away from hydrolysis to polymer-analyzer and vulcanize to polymer-bundler.
  • Do a better job of only listing warnings for code in the package being built.

0.7.1

February 3, 2017
  • Fix issue where larger projects would cause the sources stream to hang.

0.7.0

January 31, 2017
  • BuildAnalyzer.sources & BuildAnalyzer.dependencies are now BuildAnalyzer.sources() & BuildAnalyzer.dependencies(), respectively. This change only affects uses who are importing and/or using the BuildAnalyzer class directly.
  • Fix issue where files were being loaded immediately, before the build stream was started.

0.6.0

January 4, 2017
  • Fix issue where missing source files were causing silent stream failures.
  • 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 for updated examples of what build streams look like without the analyzer.
  • 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.
  • Update the version of polymer-analyzer we use, fixing a number of errors.

0.6.0-alpha.3

December 19, 2016
  • 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

December 19, 2016
  • Update the version of polymer-analyzer we use, fixing a number of errors.

0.6.0-alpha.1

December 13, 2016
  • 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 for updated examples of what build streams look like without the analyzer.
  • 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.

0.5.1

December 2, 2016
  • Updated polymer-analyzer to 2.0.0-alpha.18

0.5.0

November 1, 2016
  • New Analyzer! Should fix most reported bugs that were caused by bad analysis, but may introduce new ones. Be sure to test your build after upgrading to confirm that your build is still functioning. See polymer-analyzer for more information.
    • Fixed silent failures during build analysis.
    • Added warning printing during build analysis (#54).
  • Added support for relative root paths.
  • Renamed two AddServiceWorkerOptions properties:
    • serviceWorkerPath was renamed to path.
    • swConfig was renamed to swPrecacheConfig.
    • Old names are deprecated, and support for them will be removed in future versions.
  • polymer.json configuration now managed by polymer-project-config
  • Upgrade outdated dependencies:
    • sw-precache@4.2.0 generates a new kind of service-worker that will require all users to repopulate their cache. Otherwise it continues to behave the same as before.

0.4.1

August 24, 2016

Fixed

0.4.0

August 5, 2016

Fixed

Added

  • Generate .d.ts files for typescript users.