This repository was archived by the owner on Jun 9, 2020. It is now read-only.
Update dependency react-static to v7#20
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^5.9.1->^7.0.0Release Notes
react-static/react-static
v7.2.3Compare Source
v7.2.2Compare Source
Improved
38ef613)addPrefetchExcludestype definition (#1300)v7.2.0Compare Source
New
pluginstopluginhook so plugins can have plugins (#1264)Improved
renderPropofRoutes(#1181)v7.1.0Compare Source
New
afterBundlehook addedreact-static-plugin-evergreen: A plugin for using evergreen-uireact-static-plugin-stylusA plugin for using stylusreact-static-plugin-google-tag-managerto the list of 3rd party pluginsImproved
react-static-plugin-mdx: Allow passing MDX options to webpack loader (e.g.remarkPluginsandrehypePlugins)data-prefixv7.0.10Compare Source
Improved
react-static-plugin-mdx: Bump webpack loader version to v1react-static: HMR dev server client is only required once, and HMR emitter now resolves to a single instancereact-static: Hot reloading stability has been improved to better support hooks like React.useState and React.useEffectreact-static: Update eslint rules and code to pass those rules.v7.0.9Compare Source
Improved
react-static: Alternative dev server port is now accuratereact-static: Dev server location is now logged in blue for more visibilityv7.0.8Compare Source
Improved
-cor-configis not loadedreact-static-plugin-source-filesystem: Fixed resolution on Windowsreact-static: Fixed building chunks on Windowsreact-static: Fixed production build on Windowsreact-static-plugin-sitemap: Removed invalid closing</xml>tagreact-static-plugin-sitemap: Improved minification of generated sitemap XML in productionv7.0.7Compare Source
Improved
v7.0.6Compare Source
Improved
v7.0.5Compare Source
Improved
config.devServeris not an object.v7.0.4Compare Source
Improved
hostandportof the webpack dev server viaconfig.devServer.v7.0.3Compare Source
Improved
siteDatais now properly invalidated and refetched whenreloadClientDatais called and/or thestatic.config.jsis updated.v7.0.2Compare Source
Improved
blanktemplate now properly importsapp.cssv7.0.1Compare Source
Improved
react-static-plugin-mdx: Bump webpack loader version to v1react-static: HMR dev server client is only required once, and HMR emitter now resolves to a single instancereact-static: Hot reloading stability has been improved to better support hooks like React.useState and React.useEffectreact-static: Update eslint rules and code to pass those rules.v7.0.0Compare Source
New
<React.Suspense fallback={<span>Loading...</span>}>. NOTE: SUSPENDING DURING SSR IS STILL NOT SUPPORTED. When `document === 'undefined', you MUST render a loading placeholder instead.Rootcomponent now has a browser-side plugin interface calledRoot.Routescomponent now has a browser-side plugin interface.useRouteDataanduseSiteDatahooks to fetch site and route data (related deprecations below)usePrefetchhook to prefetch routes (related deprecations below)useLocation,useBasepathuseRoutePathanduseStaticInfohave been added as utility hooks for both users and plugins.--analyzeCLI options to quickly profile your production webpack bundle (related deprecations below)react-static-plugin-sitemapplugin allows you to build and customize a sitemap for your site from your routes.react-static-plugin-source-filesystemplugin allows you to recursively import and create routes from any webpack compatible files in a directory!addPrefetchExcludesmethod to exclude paths (like dynamic ones that would produce 404s) from every being prefetched! Yay!config.terserobject. This object is passed directly to the Webpack Terser plugin.getWebpackConfig(configPath, stage)function fromreact-static/nodeto synchronously generate the webpack configuration for any static.config.js + state combination. This is especially useful for eslint plugins and other developer tools that rely on a webpack configuration during dev time.Improved
static.config.jsduring development are now more reliableperformance.maxEntrypointSizeof300000bytes (300kb)config.productionSourceMaps: true=>from all log lines)Breaking Changes
Migration tips are listed as sub-items if applicable.
reactandreact-domto this version. You will also want to make sure all of your other react-related libraries are compatible with this upgrade.getRoutesnow use the propertytemplateinstead ofcomponentcomponentwithtemplatewhen defining a route both in static.config.js or plugins.Prefetchcomponent has been deprecated in favor of theusePrefetchhook.Rootcomponent are now deprecated. Since you can bring your own router to React Static now, there is no reliable built-in way to ship auto hash scrolling without severly bloating the core of React Static. Please use a smooth scrolling library that supports the router you choose, or better yet, we recommend going with the mostly supportedhtml { scroll-behavior: smooth; }css property for decent support.Rootcomponent that are related to scrolling.mainentry to resolve)plugins/relative pathconfig.bundleAnalyzeris now deprecated in favor of thebuild --analyze/-aandexport --analyze/-aoption.react-static-plugin-sitemapplugin.noindex,lastModified, andpriorityare now meant to be set under aroute.sitemapobject and map directly to xml attributes now. eg.route: { sitemap: { lastmod: '10/10/2010', priority: '0.5' } }noindexis still an inherited attributepagesdirectory has been moved to a plugin calledreact-static-plugin-source-filesystem. It ships by default with every template to use thesrc/pagesdirectory within the template.config.disableDuplicateRoutesWarninghas been depreacted. This is mainly because multiple hooks can now create routes for the same route and by default, they are merged together unless specified with thereplace: trueflag on the route creation.getRoutes, most plugin hooks, and just about anywhere React Static calls into your own user code.options and options.devin several locations has been deprecated (getRoutes, getData, etc.) and has been replaced with the internal state of React Static. You can still accessoptions.devby usingstate.stage === 'dev'.getConfighook has been renamed toafterGetConfigand is now a reducer that accepts and returns the global statereloadRoutesfunction exported fromreact-static/nodehas been renamed toreloadClientDataHeadplugin hook innode.api.jshas now been aptly renamed toheadElementsand is now a reducer, not a mapper.stateprop in theDocumentcomponentrenderMetaprop available on theDocumentcomponent hass been renamed tometaand is now only available on thestateprop of the document componentprocess.env.REACT_STATIC_SLAVEhas been renamed toprocess.env.REACT_STATIC_THREAD.webpackmust now explicityly returnundefinedif they wish to opt-out (previously you could return anything falsey)config.productionSourceMaps: truestart,bundleandexportcommands are being deprecated and have been removed from the documentation.getComponentForPathutility previously provided via theRoutescomponent has been deprecated.v6.3.9Compare Source
v6.3.8Compare Source
v6.3.7Compare Source
v6.3.6Compare Source
Fixes & Optimizations
distdirectory and into a newartifactsdirectoryv6.3.5Compare Source
New Features
v6.3.4Compare Source
v6.3.3Compare Source
v6.3.2Compare Source
v6.3.0Compare Source
v6.2.1Compare Source
v6.2.0Compare Source
New Features
Fixes & Optimizations
process.envvariables could be exported and distributed by accident.v6.1.5Compare Source
v6.1.4Compare Source
v6.1.3Compare Source
v6.1.2Compare Source
v6.1.1Compare Source
v6.0.20Compare Source
Deprecations
config.renderToHtmlandconfig.renderToElementin favor of using the plugin API. Hope this doesn't annoy anyone too much. Better to do it now that later!v6.0.19Compare Source
v6.0.18Compare Source
v6.0.17Compare Source
v6.0.16Compare Source
v6.0.15Compare Source
v6.0.14Compare Source
v6.0.13Compare Source
v6.0.12Compare Source
v6.0.11Compare Source
v6.0.10Compare Source
Fixes & Optimizations
archivesdirectory from the npm tarballv6.0.9Compare Source
Fixes & Optimizations
v6.0.8Compare Source
Fixes & Optimizations
packages/react-static/templateswill be converted over to guides eventually.react-static create. They have been moved toarchives/old-examples.v6.0.6Compare Source
Fixes & Optimizations
v6.0.5Compare Source
v6.0.4Compare Source
v6.0.2Compare Source
Deprecations
config.renderToHtmlandconfig.renderToElementin favor of using the plugin API. Hope this doesn't annoy anyone too much. Better to do it now that later!v6.0.1Compare Source
Fixes & Optimizations
archivesdirectory from the npm tarballv6.0.0Compare Source
New Features
pagesdirectory is now available. Any files in this directory will automatically become unique routes with no configuration necessary.react,react-dom,react-routerandreact-hot-loaderdependencies are now optional as project dependencies and will resolve using react-static's versions if needed.react-static-plugin-emotionreact-static-plugin-styled-componentsconfig.maxThreadsnow lets you specify how many maximum threads to use to export your html files.config.disablePreloadlets you disabled automatic preloading for debugging worst case scenarios.Breaking Changes
config.webpackoption has been removed in favor of using the new plugin system. This should encourage the creation of plugins and also provide a single way of doing things with webpack.react-hot-loader'shot(module)(Component)syntax has been changed to now use the<AppContainer>approach. This is much easier than using thehot(module)(Component)in every module you create.is404property from the 404 route. To designate a 404 route, you can now place a404.jsfile in your pages directory or create a route where thepath === '404'static.config.jswill now be imported and run multiple times depending on how many threads your build environment supports. If this is a problem, you can use theprocess.env.REACT_STATIC_THREAD === 'true'condition to detect if the instance is a threaded export slave or not.config.renderToHtmlhas been deprecated in favor of using thebeforeRenderToElementhook.config.usePreactis no longer an option in thestatic.config.jsfile. Use thereact-static-plugin-preactplugin.jsLoadercalledjsLoaderExternal. It is responsible for handling all javascript files that are not located in your projects source.react-static-routes) import has been replaced by simply doingimport { Routes } from 'react-static'. Under the hood, this uses a webpack alias to point to the generateddist/react-static-routes.jsfile, and thus won't confuse linters or IDEs like codesandbox :).renderandcomponentprops are now deprecated in favor of usingchild-as-a-functionrendering. Anywhere you are using these props must be migrated to use a child as a function.Loadingcomponent has been removed. If you wish to show loading states in your app, you can use theLoadingprops for any components that support them. This is in preparation for React...Suspense!react-router.PrefetchWhenSeencomponent has been deprecated in favor of only using thePrefetchcomponentPrefetchcomponent is now smart likePrefetchWhenSeenwas.Redirectcomponent has been deprecated. Redirects should be done in thestatic.config.js. If the user needs to do any redirects for dynamic/runtime routes, they can use their favorite router's redirect solution.Routerhas been deprecated and replaced by theRootcomponent. TheRootcomponent implements theHashScrollercomponent, anErrorBoundaryand a very simple and non-invasive route context using@reach/router(the recommended router). The base router is customizable or replaceable if the user wishes to use a different router.Rootcomponent renders adivunder the hood (from reach/router). This may affect layouts during migration.config.disableRouteInfoWarninghas been depracated. Do not useRouteInfoon non-static pages!createSharedDatautility and thesharedDataproperty on a route. See the docs for information on usage.Fixes & Optimizations
Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.