- Update dependencies
postcss-html-filter
,scroll-restorer
,postcss
,postcss-csso
andpostcss-url
- Update snapshot
create-webpack-config-base.test.js
to reflect new deps
- update
jsxtreme-markdown
dependencies to 3.0.2
- fix static-sitemap vendored package (#377)
- update
jsxtreme-markdown
dependencies to 3.0.1
- use node 18/npm 9 (#376)
- various dependency updates
- Fix: Update postcss plugins to skip hashes when adding a relative path.
- Revert: Skip urls that begin with
%23clip
in postcss-absolute-urls plugin.
- Skip urls that begin with
%23clip
in postcss-absolute-urls plugin.
- Update dependencies.
- Update caniuse-lite.
- Update
devBrowserslist
default list:['Edge >= 88', 'Firefox >= 85', 'Chrome >= 88', 'Safari >= 14', 'iOS >= 14.4']
. - Add
ignoreFile
option tositemap
Batfish configuration object. The value ofignoreFile
is the pathname to a JavaScript file that exports an array of file paths or directories that you do not want Batfish to include in the sitemap. - Update some devDependencies: react-helmet, husky, lint-staged, prettier, react, react-dom, react-test-renderer.
- Update dependencies with security updates.
- Fix crash when watching files with
batfish start
.
- Upgrade all dependencies. This can affect you in a few ways:
- You will need to upgrade your
react-helmet
peer dependency to^6.0.0
. - Batfish now uses Babel v7. If you are adding your own Babel plugins, you need to check whether they are compatible with Babel v7, and upgrade them if not.
- Babel's
preset-env
has changed significantly, so when upgrading you should double-check that your website continues to work in all the browsers you support.
- You will need to upgrade your
- Upgrade to Node 10 and npm 6.
- Update dependencies with security updates.
- Fix: Revert increase
maxAsyncRequests
andmaxInitialRequests
insplitChunks
to prevent JavaScript from running out of memory. - Fix: Fix issue where
.md
and.js
files were not being compiled onstart
. - Fix: Prevent
.md
and.js
files from being copied onbuild
since they will be compiled.
- Fix: Increase
maxAsyncRequests
andmaxInitialRequests
insplitChunks
to prevent JavaScript from running out of memory.
- Fix: Prevent temporary build files from being written to the output directory.
- Feature: Batfish no longer generates a stats.json at build time. Pass the
--stats
flag with thebuild
command to generate stats.json.
- Fix: Use core-js@2 and fix core-js modules so that they are required.
- Fix: Fix undefined Promise in IE 11 by adding core-js (es.promise and es.array.iterator) to the Webpack config
entry
.
- Upgrade Webpack to v4.
- Fix: Fix bug that caused
.json
files in thepagesDirectory
not to be copied to theoutputDirectory
. - Fix: Fix bug that caused some
unprocessedPageFiles
to sometimes be processed as pages.
- Fix: Fix Node 10 compatibility by updating
cpy
dependency. - Fix: Update dependencies.
- Deprecate: Add a deprecation warning when using the
spa
mode.
- Fix: Remove
^
fromassets-webpack-plugin
dependency to avoid regression.
- Fix: Use
webpackPlugins
in static HTML build as well as client-side bundle build, as plugins likeDefinePlugin
can provide information that is depended on for building the HTML. If this breaks a build for you, please open an issue about your use case.
- Fix: Add
electron
to list of libraries that Webpack should not try to bundle during the HTML build.
- Fix: Remove production usage of Prettier. Generated files will not be as pretty, but it's worth removing the large dependency and complications it can introduce.
- Fix: Fix custom 404 pages on sites with a
siteBasePath
.
- Feature: Added a helpful message if the provided port is not available.
- Feature: Files reference as URLs in CSS then copied into the output directory (via postcss-url) now include the file's original basename as well as the hash.
- Feature: Expose Batfish's version of Webpack on
require('@mapbox/batfish').webpack
, so it can be used for custom plugin configuration. - Fix: Prevent batfish from entering an unpredictable state if provided port is unavailable.
- Fix Change the CLI parameter
-p/--port
to accept number data type.
- Update jsxtreme-markdown packages, which use a new processing pipeline.
- Add: Automatically add data about headings to front matter of Markdown pages and
id
attributes to the heading elements. The headings data can be used to generate a table of contents in the Markdown page wrapper component, as illustrated in the table-of-contents example. (This feature was added to jsxtreme-markdown.) - Chore: Unobtrusive dependency updates.
- Fix: Prevent new default 404 page from breaking SPA mode.
- Fix: Add
babel-core
todependencies
, since it's a peer dependency ofbabel-loader
.
- Fix: Replace code that caused Webpack warning about
Chunk.modules
being deprecated.
- Add: Improve logging by adding approximate times for build phases.
- Add: Helpful default 404 page (in development mode only).
- Fix: If you provide an
applicationWrapper
inspa
mode, it will be included in the static HTML build. - Fix: Update postcss-html-filter for CSS-inlining bug fix.
- Fix: Add several packages to
dependencies
which were mistakingly added todevDependencies
.
- Chore: Swap out development servers. This should reduce dependency weight and complexity and fix an infrequent bug where
start
crashed when it tried to print the local URL.
- Add: Add
sitemap
option, allowing user to turn off sitemap generation. - Fix: Improve error messages when front matter parsing fails.
- Remove webpack-chunk-hash dependency. Recent versions of Webpack do not require this module for deterministic filename hashing.
- Add: Add
staticHtmlInlineDeferCss
option.
- Add: Add
webpackStaticStubReactComponent
option. - Add: Use Webpack's
node
option in the client config to stub core Node libraries, resulting in fewer errors buried in users' dependencies.
- Add: Add
devBrowserslist
option. This will change the browser support of your development (not production) build. - Add: Add
-b, --browsers
option forbatfish start
. - Add:
browserslist
anddevBrowserslist
affect babel-preset-env, not just Autoprefixer.
- Add: Include
babel-plugin-transform-object-rest-spread
by default. - Add: Add
manageScrollRestoration
option. - Add: Add experimental
spa
option. This option might suffer breaking changes on any release until it's no longer "experimental".
- Add:
-i, --include
option tobatfish start
command, and correspondingincludePages
configuration option, which allows you to speed up your development build by only building the specified pages. - Add:
batfish write-bablerc
command (batfish.writeBabelrc
in Node API), which writes a.babelrc
file that you can use to tell other process, like a test runner, how to interpret your source files. - Add: Add
babelInclude
option. - Fix: Fix bug that could cause builds with unnamed dynamic imports to fail with a cryptic error about a hash-based filename that is too long.
- Fix: Actually exclude
node_modules
from Babel compilation, as intended and documented. Warning: this fix makes the functionality fit the documented public API, but if you were accidentally relying on anode_module
being accidentally compiled, this could break your build. You'll want to use the newbabelInclude
option to indicate thosenode_modules
that need to be compiled. - Fix: Tweak default
babelExclude
value to ensure it excludes nestednode_modules
directories. - Chore: Remove json-loader, which Webpack no longer needs to import JSON.
- Chore: Allow babel-loader to use its default cache location (
node_modules/.cache/babel-loader
).
- Fix: Fix bug causing build to fail if you used
npm link
(oryarn link
), with a message about failing to find Babel plugins.
- Upgrade dependencies. There should not be any user-faces changes, just behind-the-scenes improvements.
- Fix: Fix bug where changes to recent versions of BrowserSync broke server initialization logging.
- Fix: Upgrade
@mapbox/jsxtreme-markdown-loader
to get bug fix related to determining Markdown wrappers with agetWrapper
function.
- No changes. Releasing 1.0 because the library has been stable enough that 1.0 will be good for semver.
- Fix: Use
NamedChunksPlugin
to improve long-term caching.
- Fix: Do not copy files specified by
unprocessedPageFiles
option if they are also ignored byignoreWithinPagesDirectory
. - Fix: Fix bug that caused the static build's Webpack config to look for certain dependencies, like
uglify-js
, in the wrong place. - Fix: Better errors for obscure parse errors from compiled
static-render-pages.js
.
- Fix:
outputDirectory
andtemporaryDirectory
do not have to exist as part of config validation.
- Fix: Add Prettier to
dependencies
, not justdevDependencies
. - Fix: Provide more clear error messages by checking for the existing of files or directories while validating configuration for the following options:
applicationWrapperPath
,pagesDirectory
,outputDirectory
,temporaryDirectory
,inlineJs
. - Fix: Fix buggy validation of
inlineJs
configuration property.
- Add: Add
ignoreWithinPagesDirectory
option.
- Fix: Update jsxtreme-markdown dependencies to get bug fix.
- Add: Add
publicAssetsPath
option. - Fix: Slight improvement to filename hashing for long-term caching.
- Fix: Remove
strip-color
fromvendorModules
, as it's no longer being used. - Chore: Allow for React 16 as peer dependency.
- Chore: Update all other dependencies.
- Fix: Fragments in the URL take precedence over scrolling to the top of pages on dynamic route changes.
- Fix: Fragments in the URL take precedence over saved scroll positions in the history.
- Fix: Development server does not quit the process when there are Webpack compilation errors. Instead, you can just fix them and rebuild.
- Fix: Remove imports of
batfish-internal/context
from public modules. These break unit tests, or any other reference to the file outside of Batfish's builds.
- Add: Add
babelPresetEnvOptions
option. - Add: Enable page-specific CSS. See "Page-specific CSS" documentation.
- Fix: Prevent two simultaneous Webpack compilations from messing with each other when a page file changes.
- Fix: Restructure directories to be more friendly for Flow-using consumers.
- Fix: Don't hijack links that aren't to Batfish routes. Refactoring in 0.10.0 introduced this bug.
- Fix: Include more files in npm package ...
- Fix: Include
dist/
in npm package. Oops.
- π¨ Breaking change: Require Node 6. (Drop support for Node 4.)
- π¨ Breaking change: Remove
staticDirectory
option. The same effect can be accomplished by putting static files in the pages directory. - π¨ Breaking change:
with-location
now provides the original component at WrappedComponent instead of WrapperComponent. - π¨ Breaking change: change
data-no-hijack
attribute name todata-batfish-no-hijack
. Also, this attribute now blocks link hijacking on the element itself and all its children. - π¨ Breaking change: (maybe, maybe not) Links with fragment URLs (e.g.
href="#foo"
) are not hijacked, just left to their default behavior. - Add: Much improved logging!
- Add: Much improved configuration validation!
- Add: Much improved error handling!
- Add:
hijackLinks
configuration option, defaulting totrue
. - Add: Improve
prefixUrl
to work with already-prefixed URLs and absolute URLs. - Add: Add
unprocessedPageFiles
option. - Add: Include
babel-plugin-transform-class-properties
by default. - Add:
start
now rebuilds when you change a page's front matter, create a new page, or delete a page. - Fix: Update postcss-html-filter to fix bugs inlining CSS with certain pseudo selectors.
- Fix: Do not rebase URLs in CSS that have protocols.
- Fix: Fix the url-referenced assets in CSS are copied and rebased for the static build.
- Fix: Ensure that the user's versions of react, react-dom, and react-helmet are used.
- Fix: Assets referenced by
url()
in CSS you include with thestylesheets
option are copied into theoutputDirectory
.
- π¨ Breaking change: Revised
dataSelectors
system. Values returned bydataSelectors
can now be used byimport
ing modules from@mapbox/batfish/data/[data-selector-name]
, instead of using the specialinjectedData
front matter property. For example, the return value from thedataSelectors.watchOutForBees
is available withimport beeData from '@mapbox/batfish/data/watch-out-for-bees';
.
- Addition:
includePromisePolyfill
configuration option. - Fix: Batfish will inject its specified version of
es6-promise
even if something about your dependency resolution ends up putting an older version of that polyfill atnode_modules/es6-promise
.
- π¨ Breaking change: Renamed
externalStylesheets
option tostylesheets
. - π¨ Breaking change: CSS is no longer
import
ed orrequire
d via Webpack. All stylesheets should be listed in thestylesheets
configuration array. - π¨ Breaking change: Renamed
wrapperPath
option toapplicationWrapperPath
. - π¨ Breaking change: Removed
notFoundPath
option. Instead, 404 pages always live as404.(js|md)
in thepagesDirectory
. - π¨ Breaking change: 404 pages are no longer
index.html
files inside directories, e.g.404/index.html
. They are just HTML pages, e.g.404.html
. - π¨ Breaking change: Changed default
outputDirectory
from_site
to_batfish_site
. - π¨ Breaking change: Changed default
temporaryDirectory
from_tmp
to_batfish_tmp
. - π¨ Breaking change: Upgrade jsxtreme-markdown, which changed
modules
front matter property in Markdown pages toprependJs
.
- Addition:
webpackStaticIgnore
configuration option. - Fix: Links with fragment identifiers. Only scroll to the top of the page after the URL changes if the location's pathname changes and if there is no fragment identifier in the URL.
- Fix: Use ES2015 named imports for default
modules
values injsxtreme-markdown
documents.
- Changed
batfish/md
path, for Babel-compiled Markdown in JS pages, to@mapbox/batfish/modules/md
. - Switched ES2015 module compilation from Webpack's system to Babel's ES2015 preset.
- Use worker-farm for inlining CSS in static HTML files.
- Upgrade Webpack to v3.
- Use external @mapbox/link-to-location package, delete local version.
- Put BrowserSync in
offline
mode. - Upgrade jsxtreme-markdown to get some bug fixes.
- It begins.