All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- 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.
- Fix bug where not all percent-encoded characters in URIs would be decoded (in particular,
%40
->@
which is important for scoped NPM packages).
- [breaking] Rename
jsTransform
andgetOptimizeStreams
option fromtransformEsModuleToAmd
totransformModuleToAmd
. - [breaking] The
transformModulesToAmd
option injsTransform
now automatically impliestransformImportMeta
, and throws iftransformImportMeta
is set to false. - [breaking] The
JsTransform
class now takes a fullOptimizeOptions
instead of just aJsOptimizeOptions
.
- Add an
import.meta
transform tojsTransform
with thetransformImportMeta
option. - Add a dynamic import() transform to AMD require()
- AMD loader will now only be injected into an HTML document if it contains at least one
type=module
script. - Added
softSyntaxError
option tojsTransform
. 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.
- ES to AMD module transformation is now supported by
getOptimizeStreams
andhtmlTransform
. 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.
- Upgraded to
[email protected]
which brings ES6 module bundling to the build pipeline! Upgraded to[email protected]
.
- Add
htmlTransform
function, factored out of the Polyservecompile-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").
- Upgraded to
[email protected]
and[email protected]
. - Converted from
PackageUrlResolver
toFsUrlResolver
as more appropriate to application build context. - Ignore
not-loadable
warnings, as polymer-build should not load remote resources.
- Add
packageName
option tojsTransform()
function. Option is required whenisComponentRequest
option is true.
- Fix import specifier rewriting when importing a dependency from a top-level module.
- Fix dependency specification for
babel-core
- Add
jsTransform
function, factored out ofoptimize-streams
module (so that it can be shared with Polyserve). - Renamed
jsTransform
option fromcompile
tocompileToEs5
to clarify its behavior. - Added
transformEsModulesToAmd
option tojsTransform
and JS stream transformer. - Add exponentiation, async/await, and async generator syntax/transform support to
jsTransform
.
- Don't run Babel at all if there are no meaningful changes to make.
- Fix bug where JS compilation/minification would ignore the "excludes" field.
- Restore ES5 template literal uniquifying feature from Polymer/polymer-cli#962 that was missed in earlier code migration.
- Allow "none" moduleResolution option in JS compile transform.
- 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".
- 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 thatcomponentDir
to the underlying Analyzer. - Warnings indicated in the
lint.warningsToIgnore
ProjectConfig option are now ignored.
- Updated
polymer-bundler
to 3.1.1, to fix an issue with deprecated CSS imports being inlined into the wrong templates.
- Updated
polymer-bundler
to 3.1.0, which inlines external stylesheet links in templates.
- [Breaking] Upgraded
polymer-bundler
to 3.x, which includes new default behavior around therewriteUrlsInTemplates
option in support of Polymer 2.x defaults. Polymer 1.x project developers should set the optionrewriteUrlsInTemplates: true
. See using polymer-bundler programmatically for more information.
- 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.
- Prefetch links are now only added for transitive dependencies.
- 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.
- Updated the AddPrefetchLinks transform to not insert html root element tags like
<html>
,<head>
or<body>
.
- 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.
- Added
PolymerProject.addPrefetchLinks()
transform. - Added
PolymerProject.addBabelHelpersInEntrypoint()
transform.
- Updated polymer-project-config dependency.
- 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.
- Updated
polymer-analyzer
dependency to^2.0.0
now that it is out of alpha.
- Simplify addCustomElementsEs5Adapter() adapter injection method.
- Bundler stream no longer emits any CSS or Javascript files which have been inlined into bundles.
- Dependency updates. Fixes issue with
polymer-bundler
's handling oflazy-import
links indom-modules
.
- Dependency updates. Update to
sw-precache@5
to prevent "corrupted data" errors on Firefox 52 and Chrome 59 when usingaddServiceWorker()
. Upgradedpolymer-bundler
andpolymer-analyzer
to addresslazy-import
bugs.
- Dependency updates. Upgraded to new
polymer-bundler
. Most important update is a fix to bug wherebylazy-import
links were being moved out of their<dom-module>
containers.
- Dependency updates. Upgraded to new
polymer-bundler
,polymer-analyzer
anddom5
versions. - Fixed bug where
<html>
,<head>
and<body>
were added to documents mutated byHtmlSplitter
and theCustomElementsES5AdapterInjector
. - 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 allBundler#constructor
options,analyzer
,excludes
,inlineCss
,inlineScripts
,rewriteUrlsInTemplates
,sourcemaps
,stripComments
, as well asstrategy
andurlMapper
which are used on call toBundler#generateManifest
.
- Add
addCustomElementsEs5Adapter()
method to PolymerProject. Provides an adapter needed when serving ES5 to browsers that support the native Custom Elements API.
- [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.
- 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.
- [breaking] PolymerProject's
bundler
property is now abundler()
method, returning a new BuildBundler stream on each call. This is to support parallel pipelines using bundler.
- 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.
- Dependency updates.
- Dependency updates
- 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.
project.splitHtml()
&project.rejoinHtml()
methods have been pulled off ofPolymerProject
so that multiple streams can split/rejoin in parallel. See the new README section onHTMLSplitter
for updated instructions on how to split/rejoin inline scripts and styles in your build stream.- Completed the migration away from
hydrolysis
topolymer-analyzer
andvulcanize
topolymer-bundler
. - Do a better job of only listing warnings for code in the package being built.
- Fix issue where larger projects would cause the sources stream to hang.
BuildAnalyzer.sources
&BuildAnalyzer.dependencies
are nowBuildAnalyzer.sources()
&BuildAnalyzer.dependencies()
, respectively. This change only affects uses who are importing and/or using theBuildAnalyzer
class directly.- Fix issue where files were being loaded immediately, before the build stream was started.
- 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 theproject.sources()
andproject.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 usingmerge-stream
withpolymer-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 nowBuildAnalyzer
(since it is no longer a stream). This change only affects uses who are importing and/or usingStreamAnalyzer
directly from thepolymer-build
module.- Fix issue where behaviors were not being analyzed properly.
- Update the version of polymer-analyzer we use, fixing a number of errors.
v0.6.0 Pre-Release Changelog
- Actually update the version of polymer-analyzer we use, fixing a number of errors. (alpha.2 was accidentally a noop release).
- Update the version of polymer-analyzer we use, fixing a number of errors.
- Interface Update!
PolymerProject.analyzer
is no longer a required step in your build pipeline. Instead, analysis happens automatically while it fills theproject.sources()
andproject.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 usingmerge-stream
withpolymer-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 nowBuildAnalyzer
(since it is no longer a stream). This change only affects uses who are importing and/or usingStreamAnalyzer
directly from thepolymer-build
module.- Fix issue where behaviors were not being analyzed properly.
- Updated polymer-analyzer to
2.0.0-alpha.18
- 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 topath
.swConfig
was renamed toswPrecacheConfig
.- 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:
[email protected]
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.
- No longer modifies the object passed to
generateServiceWorker()
– #27
- Don't halt building when encountering imports of absolute URLs (i.e. https://example.com/font.css).
- Generate
.d.ts
files for typescript users.