UNPKG

12.9 kBMarkdownView Raw
1# Changelog
2
3## 1.9.7
4
5- **Fix:** Fix Node 10 compatibility by updating `cpy` dependency.
6- **Fix:** Update dependencies.
7
8## 1.9.6
9
10- **Deprecate:** Add a deprecation warning when using the `spa` mode.
11
12## 1.9.5
13
14- **Fix:** Remove `^` from `assets-webpack-plugin` dependency to avoid regression.
15
16## 1.9.4
17
18- **Fix:** Use `webpackPlugins` in static HTML build as well as client-side bundle build, as plugins like `DefinePlugin` 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.*
19
20## 1.9.3
21
22- **Fix:** Add `electron` to list of libraries that Webpack should *not* try to bundle during the HTML build.
23
24## 1.9.2
25
26- **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.
27
28## 1.9.1
29
30- **Fix:** Fix custom 404 pages on sites with a `siteBasePath`.
31
32## 1.9.0
33
34- **Feature:** Added a helpful message if the provided port is not available.
35- **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.
36- **Feature:** Expose Batfish's version of Webpack on `require('@mapbox/batfish').webpack`, so it can be used for custom plugin configuration.
37- **Fix:** Prevent batfish from entering an unpredictable state if provided port is unavailable.
38
39## 1.8.2
40
41- **Fix** Change the CLI parameter `-p/--port` to accept number data type.
42
43## 1.8.1
44
45- Update jsxtreme-markdown packages, which use a new processing pipeline.
46
47## 1.8.0
48
49- **Add:** Automatically add data about headings to front matter of Markdown pages and `id` attributes to the heading elements.
50 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.
51 (This feature was added to jsxtreme-markdown.)
52- Chore: Unobtrusive dependency updates.
53
54## 1.7.5
55
56- **Fix:** Prevent new default 404 page from breaking SPA mode.
57
58## 1.7.4
59
60- **Fix:** Add `babel-core` to `dependencies`, since it's a peer dependency of `babel-loader`.
61
62## 1.7.3
63
64- **Fix:** Replace code that caused Webpack warning about `Chunk.modules` being deprecated.
65
66## 1.7.2
67
68- **Add:** Improve logging by adding approximate times for build phases.
69- **Add:** Helpful default 404 page (in development mode only).
70- **Fix:** If you provide an `applicationWrapper` in `spa` mode, it will be included in the static HTML build.
71- **Fix:** Update postcss-html-filter for CSS-inlining bug fix.
72
73## 1.6.2
74
75- **Fix:** Add several packages to `dependencies` which were mistakingly added to `devDependencies`.
76
77## 1.6.1
78
79- 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.
80
81## 1.6.0
82
83- **Add:** Add `sitemap` option, allowing user to turn off sitemap generation.
84- **Fix:** Improve error messages when front matter parsing fails.
85
86## 1.5.1
87
88- Remove webpack-chunk-hash dependency. Recent versions of Webpack do not require this module for deterministic filename hashing.
89
90## 1.5.0
91
92- **Add:** Add `staticHtmlInlineDeferCss` option.
93
94## 1.4.0
95
96- **Add:** Add `webpackStaticStubReactComponent` option.
97- **Add:** Use Webpack's `node` option in the client config to stub core Node libraries, resulting in fewer errors buried in users' dependencies.
98
99## 1.3.0
100
101- **Add:** Add `devBrowserslist` option. **This will change the browser support of your development (not production) build.**
102- **Add:** Add `-b, --browsers` option for `batfish start`.
103- **Add:** `browserslist` and `devBrowserslist` affect babel-preset-env, not just Autoprefixer.
104
105## 1.2.0
106
107- **Add:** Include `babel-plugin-transform-object-rest-spread` by default.
108- **Add:** Add `manageScrollRestoration` option.
109- **Add:** Add **experimental** `spa` option.
110 This option might suffer breaking changes on any release until it's no longer "experimental".
111
112## 1.1.0
113
114- **Add:** `-i, --include` option to `batfish start` command, and corresponding `includePages` configuration option, which allows you to speed up your development build by only building the specified pages.
115- **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.
116- **Add:** Add `babelInclude` option.
117- **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.
118- **Fix:** Actually exclude `node_modules` from Babel compilation, as intended and documented.
119 **Warning:** this fix makes the functionality fit the documented public API, but if you were accidentally relying on a `node_module` being accidentally compiled, this could break your build.
120 You'll want to use the new `babelInclude` option to indicate those `node_modules` that need to be compiled.
121- **Fix:** Tweak default `babelExclude` value to ensure it excludes nested `node_modules` directories.
122- **Chore:** Remove json-loader, which Webpack no longer needs to import JSON.
123- **Chore:** Allow babel-loader to use its default cache location (`node_modules/.cache/babel-loader`).
124
125## 1.0.4
126
127- **Fix:** Fix bug causing build to fail if you used `npm link` (or `yarn link`), with a message about failing to find Babel plugins.
128
129## 1.0.3
130
131- Upgrade dependencies. There should not be any user-faces changes, just behind-the-scenes improvements.
132
133## 1.0.2
134
135- **Fix:** Fix bug where changes to recent versions of BrowserSync broke server initialization logging.
136
137## 1.0.1
138
139- **Fix:** Upgrade `@mapbox/jsxtreme-markdown-loader` to get bug fix related to determining Markdown wrappers with a `getWrapper` function.
140
141## 1.0.0
142
143- No changes. Releasing 1.0 because the library has been stable enough that 1.0 will be good for semver.
144
145## 0.13.4
146
147- **Fix:** Use `NamedChunksPlugin` to improve long-term caching.
148
149## 0.13.3
150
151- **Fix:** Do not copy files specified by `unprocessedPageFiles` option if they are also ignored by `ignoreWithinPagesDirectory`.
152- **Fix:** Fix bug that caused the static build's Webpack config to look for certain dependencies, like `uglify-js`, in the wrong place.
153- **Fix:** Better errors for obscure parse errors from compiled `static-render-pages.js`.
154
155## 0.13.2
156
157- **Fix:** `outputDirectory` and `temporaryDirectory` do not have to exist as part of config validation.
158
159## 0.13.1
160
161- **Fix:** Add Prettier to `dependencies`, not just `devDependencies`.
162- **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`.
163- **Fix:** Fix buggy validation of `inlineJs` configuration property.
164
165## 0.13.0
166
167- **Add:** Add `ignoreWithinPagesDirectory` option.
168
169## 0.12.1
170
171- **Fix:** Update jsxtreme-markdown dependencies to get bug fix.
172
173## 0.12.0
174
175- **Add:** Add `publicAssetsPath` option.
176- **Fix:** Slight improvement to filename hashing for long-term caching.
177- **Fix:** Remove `strip-color` from `vendorModules`, as it's no longer being used.
178- **Chore:** Allow for React 16 as peer dependency.
179- **Chore:** Update all other dependencies.
180
181## 0.11.4
182
183- **Fix:** Fragments in the URL take precedence over scrolling to the top of pages on dynamic route changes.
184
185## 0.11.3
186
187- **Fix:** Fragments in the URL take precedence over saved scroll positions in the history.
188
189## 0.11.2
190
191- **Fix:** Development server does not quit the process when there are Webpack compilation errors.
192 Instead, you can just fix them and rebuild.
193
194## 0.11.1
195
196- **Fix:** Remove imports of `batfish-internal/context` from public modules.
197 These break unit tests, or any other reference to the file outside of Batfish's builds.
198
199## 0.11.0
200
201- **Add:** Add `babelPresetEnvOptions` option.
202- **Add:** Enable page-specific CSS.
203 See ["Page-specific CSS" documentation](docs/advanced-usage.md#page-specific-css).
204- **Fix:** Prevent two simultaneous Webpack compilations from messing with each other when a page file changes.
205
206## 0.10.4
207
208- **Fix:** Restructure directories to be more friendly for Flow-using consumers.
209
210## 0.10.3
211
212- **Fix:** Don't hijack links that aren't to Batfish routes.
213 Refactoring in 0.10.0 introduced this bug.
214
215## 0.10.2
216
217- **Fix:** Include more files in npm package ...
218
219## 0.10.1
220
221- **Fix:** Include `dist/` in npm package. Oops.
222
223## 0.10.0
224
225- 🚨 **Breaking change:** Require Node 6. (Drop support for Node 4.)
226- 🚨 **Breaking change:** Remove `staticDirectory` option.
227 The same effect can be accomplished by putting static files in the pages directory.
228- 🚨 **Breaking change:** `with-location` now provides the original component at WrappedComponent instead of WrapperComponent.
229- 🚨 **Breaking change:** change `data-no-hijack` attribute name to `data-batfish-no-hijack`.
230 Also, this attribute now blocks link hijacking on the element itself *and all its children*.
231- 🚨 **Breaking change:** (maybe, maybe not) Links with fragment URLs (e.g. `href="#foo"`) are not hijacked, just left to their default behavior.
232- **Add:** Much improved logging!
233- **Add:** Much improved configuration validation!
234- **Add:** Much improved error handling!
235- **Add:** `hijackLinks` configuration option, defaulting to `true`.
236- **Add:** Improve `prefixUrl` to work with already-prefixed URLs and absolute URLs.
237- **Add:** Add `unprocessedPageFiles` option.
238- **Add:** Include `babel-plugin-transform-class-properties` by default.
239- **Add:** `start` now rebuilds when you change a page's front matter, create a new page, or delete a page.
240- **Fix:** Update postcss-html-filter to fix bugs inlining CSS with certain pseudo selectors.
241
242## 0.9.4
243
244- **Fix:** Do not rebase URLs in CSS that have protocols.
245
246## 0.9.2
247
248- **Fix:** Fix the url-referenced assets in CSS are copied and rebased for the static build.
249- **Fix:** Ensure that the user's versions of react, react-dom, and react-helmet are used.
250
251## 0.9.1
252
253- **Fix:** Assets referenced by `url()` in CSS you include with the `stylesheets` option are copied into the `outputDirectory`.
254
255## 0.9.0
256
257- 🚨 **Breaking change:** Revised `dataSelectors` system.
258 Values returned by `dataSelectors` can now be used by `import`ing modules from `@mapbox/batfish/data/[data-selector-name]`, instead of using the special `injectedData` front matter property.
259 For example, the return value from the `dataSelectors.watchOutForBees` is available with `import beeData from '@mapbox/batfish/data/watch-out-for-bees';`.
260
261## 0.8.0
262
263- **Addition:** `includePromisePolyfill` configuration option.
264- **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 at `node_modules/es6-promise`.
265
266## 0.7.0
267
268- 🚨 **Breaking change:** Renamed `externalStylesheets` option to `stylesheets`.
269- 🚨 **Breaking change:** CSS is no longer `import`ed or `require`d via Webpack.
270 All stylesheets should be listed in the `stylesheets` configuration array.
271- 🚨 **Breaking change:** Renamed `wrapperPath` option to `applicationWrapperPath`.
272- 🚨 **Breaking change:** Removed `notFoundPath` option.
273 Instead, 404 pages always live as `404.(js|md)` in the `pagesDirectory`.
274- 🚨 **Breaking change:** 404 pages are no longer `index.html` files inside directories, e.g. `404/index.html`.
275 They are just HTML pages, e.g. `404.html`.
276- 🚨 **Breaking change:** Changed default `outputDirectory` from `_site` to `_batfish_site`.
277- 🚨 **Breaking change:** Changed default `temporaryDirectory` from `_tmp` to `_batfish_tmp`.
278- 🚨 **Breaking change:** Upgrade jsxtreme-markdown, which changed `modules` front matter property in Markdown pages to `prependJs`.
279
280## 0.6.0
281
282- **Addition:** `webpackStaticIgnore` configuration option.
283- **Fix:** Links with fragment identifiers.
284 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.
285- **Fix:** Use ES2015 named imports for default `modules` values in `jsxtreme-markdown` documents.
286
287## 0.5.0
288
289- Changed `batfish/md` path, for Babel-compiled Markdown in JS pages, to `@mapbox/batfish/modules/md`.
290- Switched ES2015 module compilation from Webpack's system to Babel's ES2015 preset.
291- Use [worker-farm](https://github.com/rvagg/node-worker-farm) for inlining CSS in static HTML files.
292- Upgrade Webpack to v3.
293- Use external [@mapbox/link-to-location](https://github.com/mapbox/link-to-location) package, delete local version.
294- Put BrowserSync in `offline` mode.
295- Upgrade jsxtreme-markdown to get some bug fixes.
296
297## 0.4.0
298
299- It begins.