Skip to content
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
masterfrom
renovate/react-static-7.x
Open

Update dependency react-static to v7#20
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/react-static-7.x

Conversation

@renovate

@renovate renovate Bot commented Apr 3, 2019

Copy link
Copy Markdown

This PR contains the following updates:

Package Type Update Change
react-static dependencies major ^5.9.1 -> ^7.0.0

Release Notes

react-static/react-static

v7.2.3

Compare Source

v7.2.2

Compare Source

Improved
  • Force line endings to be LF (38ef613)
  • Fix addPrefetchExcludes type definition (#​1300)

v7.2.0

Compare Source

New
  • Add plugins to plugin hook so plugins can have plugins (#​1264)
  • Add Node 12 support (#​1219)
Improved

v7.1.0

Compare Source

New
  • afterBundle hook added
  • react-static-plugin-evergreen: A plugin for using evergreen-ui
  • react-static-plugin-stylus A plugin for using stylus
  • Add a styled-components guide
  • Add react-static-plugin-google-tag-manager to the list of 3rd party plugins
Improved
  • CSS HMR support is now much more reliable.
  • react-static-plugin-mdx: Allow passing MDX options to webpack loader (e.g. remarkPlugins and rehypePlugins)
  • Failed builds will finally exit with a non-zero status code!
  • Update Typescript Defs
  • The latest version of React Static will now be installed with new projects
  • Add postcss and autoprefixer to sass plugin
  • Less plugin should now build properly
  • React-Helmet version was bumped to fix a few upstream issues
  • Fix react/react-dom aliases to allow submodules
  • Prefetch now uses a proper data- prefix

v7.0.10

Compare Source

Improved
  • react-static-plugin-mdx: Bump webpack loader version to v1
  • react-static: HMR dev server client is only required once, and HMR emitter now resolves to a single instance
  • react-static: Hot reloading stability has been improved to better support hooks like React.useState and React.useEffect
  • react-static: Update eslint rules and code to pass those rules.

v7.0.9

Compare Source

Improved
  • react-static: Alternative dev server port is now accurate
  • react-static: Dev server location is now logged in blue for more visibility

v7.0.8

Compare Source

Improved
  • Fixed issues with custom config specified using -c or -config is not loaded
  • react-static-plugin-source-filesystem: Fixed resolution on Windows
  • react-static: Fixed building chunks on Windows
  • react-static: Fixed production build on Windows
  • react-static-plugin-sitemap: Removed invalid closing </xml> tag
  • react-static-plugin-sitemap: Improved minification of generated sitemap XML in production

v7.0.7

Compare Source

Improved
  • Fixed issues with siteData being fetched twice during dev mode
  • Updated typescript template to use latest depenencies

v7.0.6

Compare Source

Improved
  • Typescript template now uses JS for static.config.js. It will use typescript in the future, but for now is not fully or reliably supported.
  • Config and plugin resolution is now more accurate.
  • App entry resolution is now more reliable.
  • config.paths are now more reliably detected and parsed
  • Typscript template is now more stable

v7.0.5

Compare Source

Improved
  • Fix bug where default config.devServer is not an object.

v7.0.4

Compare Source

Improved
  • You can now override the default host and port of the webpack dev server via config.devServer.

v7.0.3

Compare Source

Improved
  • siteData is now properly invalidated and refetched when reloadClientData is called and/or the static.config.js is updated.

v7.0.2

Compare Source

Improved
  • blank template now properly imports app.css
  • Updated pull request template to include CHANGELOG checkbox

v7.0.1

Compare Source

Improved
  • react-static-plugin-mdx: Bump webpack loader version to v1
  • react-static: HMR dev server client is only required once, and HMR emitter now resolves to a single instance
  • react-static: Hot reloading stability has been improved to better support hooks like React.useState and React.useEffect
  • react-static: Update eslint rules and code to pass those rules.

v7.0.0

Compare Source

New
  • React-Static is now powered by hooks!
  • Suspense is now used internally for routes that are not loaded yet during runtime only. This means, you can handle the loading state at any level of your app by using React's Suspense component eg. <React.Suspense fallback={<span>Loading...</span>}>. NOTE: SUSPENDING DURING SSR IS STILL NOT SUPPORTED. When `document === 'undefined', you MUST render a loading placeholder instead.
  • The Root component now has a browser-side plugin interface called Root.
  • The Routes component now has a browser-side plugin interface.
  • You can now use useRouteData and useSiteData hooks to fetch site and route data (related deprecations below)
  • You can now use the usePrefetch hook to prefetch routes (related deprecations below)
  • useLocation, useBasepath useRoutePath and useStaticInfo have been added as utility hooks for both users and plugins.
  • You can now use a --analyze CLI options to quickly profile your production webpack bundle (related deprecations below)
  • The new react-static-plugin-sitemap plugin allows you to build and customize a sitemap for your site from your routes.
  • The new react-static-plugin-source-filesystem plugin allows you to recursively import and create routes from any webpack compatible files in a directory!
  • New plugin APIs!
    • afterGetConfig
    • beforePrepareBrowserPlugins
    • afterPrepareBrowserPlugins
    • beforePrepareRoutes
    • getRoutes
    • normalizeRoute
    • afterPrepareRoutes
    • webpack
    • afterDevServerStart
    • beforeRenderToElement
    • beforeRenderToHtml
    • htmlProps
    • headElements
    • beforeHtmlToDocument
    • beforeDocumentToFile
    • afterExport
  • Use the new addPrefetchExcludes method to exclude paths (like dynamic ones that would produce 404s) from every being prefetched! Yay!
  • You can now customize terser options via the config.terser object. This object is passed directly to the Webpack Terser plugin.
  • You can use the getWebpackConfig(configPath, stage) function from react-static/node to 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
  • Hot reloading is now MUCH more reliable
  • Hot data reloading is now MUCH more reliable
  • Changes to static.config.js during development are now more reliable
  • Plugin resolution is now more reliable
  • Production webpack bundles now have a default performance.maxEntrypointSize of 300000 bytes (300kb)
  • Immutable global state is now being used internally that offers massive stability improvements. This same global state is provided and reduced through the revamped plugin API
  • The plugin API has been revamped to offer more control over the state of the CLI and build processes.
  • The ErrorBoundary UI is only shown in production now. During development, the standard react-hot-loader error reporter will show again.
  • Source maps are no longer exported by default in production. To export them in production, turn them on via config.productionSourceMaps: true
  • Logging is now cleaner and more succinct (removed => from all log lines)
Breaking Changes

Migration tips are listed as sub-items if applicable.

  • Upgraded to React 16.8.x
    • You will need to upgrade react and react-dom to this version. You will also want to make sure all of your other react-related libraries are compatible with this upgrade.
  • Route objects returned in getRoutes now use the property template instead of component
    • Replace all instances of component with template when defining a route both in static.config.js or plugins.
  • The Prefetch component has been deprecated in favor of the usePrefetch hook.
    • You will need to refactor your usage of Prefetch to use this new hook or create your own Prefect component that utilizes the hook. Most applications don't use manual prefetching, so we don't foresee this being an big deal for most, if not all projects.
  • All scroller props previously supported on the Root component 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 supported html { scroll-behavior: smooth; } css property for decent support.
    • Remove any and all props from the Root component that are related to scrolling.
  • Plugin loading order has been changed to:
    • Absolute Require.resolve (will use package.json's main entry to resolve)
    • Absolute Path
    • plugins/ relative path
    • Require.resolve (from Plugins directory)
    • CWD relative path
    • Require.resolve (from Root directory)
  • config.bundleAnalyzer is now deprecated in favor of the build --analyze/-a and export --analyze/-a option.
  • sitemap functionality has now been extracte into the react-static-plugin-sitemap plugin.
    • route properties like noindex, lastModified, and priority are now meant to be set under a route.sitemap object and map directly to xml attributes now. eg. route: { sitemap: { lastmod: '10/10/2010', priority: '0.5' } }
    • noindex is still an inherited attribute
  • Functionality to include the pages directory has been moved to a plugin called react-static-plugin-source-filesystem. It ships by default with every template to use the src/pages directory within the template.
  • config.disableDuplicateRoutesWarning has 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 the replace: true flag on the route creation.
  • Internally, all state is now being tracked and stored in a single global state variable. This global state is passed around everywhere, including getRoutes, most plugin hooks, and just about anywhere React Static calls into your own user code.
  • options and options.dev in several locations has been deprecated (getRoutes, getData, etc.) and has been replaced with the internal state of React Static. You can still access options.dev by using state.stage === 'dev'.
  • The getConfig hook has been renamed to afterGetConfig and is now a reducer that accepts and returns the global state
  • The reloadRoutes function exported from react-static/node has been renamed to reloadClientData
  • The Head plugin hook in node.api.js has now been aptly renamed to headElements and is now a reducer, not a mapper.
  • The entire internal state of React Static is now available via the state prop in the Document component
  • The renderMeta prop available on the Document component hass been renamed to meta and is now only available on the state prop of the document component
  • The environment variable process.env.REACT_STATIC_SLAVE has been renamed to process.env.REACT_STATIC_THREAD.
  • Plugin methods like webpack must now explicityly return undefined if they wish to opt-out (previously you could return anything falsey)
  • Source maps are no longer exported by default in production. This may break logging or reporting tools if you rely on production source maps. If you wish to still export them in production, turn them on via config.productionSourceMaps: true
  • Though still available, the start, bundle and export commands are being deprecated and have been removed from the documentation.
  • The child renderer and corresponding getComponentForPath utility previously provided via the Routes component has been deprecated.

v6.3.9

Compare Source

v6.3.8

Compare Source

v6.3.7

Compare Source

v6.3.6

Compare Source

Fixes & Optimizations
  • Fix prefetching issues for 404 templates and other edge cases.
  • Fix registration of 404 template on client boot
  • Fix remounting of Route components when no history changes have occurred
  • Use outputPath when inlineCss option is used
  • Move build artifacts out of the dist directory and into a new artifacts directory

v6.3.5

Compare Source

New Features
  • MDX plugin
  • Typscript Template
  • Non-js extensions
  • Use Terser instead of uglifyJS
  • Fix Shared-Data loading
  • Uprade to React 16.8

v6.3.4

Compare Source

v6.3.3

Compare Source

v6.3.2

Compare Source

v6.3.0

Compare Source

v6.2.1

Compare Source

v6.2.0

Compare Source

New Features
  • Added support for incremental builds
Fixes & Optimizations
  • Fixed a security issue where process.env variables could be exported and distributed by accident.
  • Remove update-notifier. It was never that reliable and was presenting problems with multi-threading.

v6.1.5

Compare Source

v6.1.4

Compare Source

v6.1.3

Compare Source

v6.1.2

Compare Source

v6.1.1

Compare Source

v6.0.20

Compare Source

Deprecations
  • Silently deprecated both config.renderToHtml and config.renderToElement in favor of using the plugin API. Hope this doesn't annoy anyone too much. Better to do it now that later!

v6.0.19

Compare Source

v6.0.18

Compare Source

v6.0.17

Compare Source

v6.0.16

Compare Source

v6.0.15

Compare Source

v6.0.14

Compare Source

v6.0.13

Compare Source

v6.0.12

Compare Source

v6.0.11

Compare Source

v6.0.10

Compare Source

Fixes & Optimizations
  • Reduced the size of npm installation by removing the archives directory from the npm tarball

v6.0.9

Compare Source

Fixes & Optimizations
  • Fixed an issue where helpers were not included in external node_modules imported through babel

v6.0.8

Compare Source

Fixes & Optimizations
  • Added Guides to documentation. All example except for the three main templates (located in packages/react-static/templates will be converted over to guides eventually.
  • Examples have been deprecated and are no longer available as templates for react-static create. They have been moved to archives/old-examples.

v6.0.6

Compare Source

Fixes & Optimizations
  • Removed old website code
  • Fixed examples to import Link from external router modules

v6.0.5

Compare Source

v6.0.4

Compare Source

v6.0.2

Compare Source

Deprecations
  • Silently deprecated both config.renderToHtml and config.renderToElement in favor of using the plugin API. Hope this doesn't annoy anyone too much. Better to do it now that later!

v6.0.1

Compare Source

Fixes & Optimizations
  • Reduced the size of npm installation by removing the archives directory from the npm tarball

v6.0.0

Compare Source

New Features
  • A pages directory is now available. Any files in this directory will automatically become unique routes with no configuration necessary.
  • react, react-dom, react-router and react-hot-loader dependencies are now optional as project dependencies and will resolve using react-static's versions if needed.
  • Plugin system. Hook and the like capable of altering and adding features to a project non-invasively.
  • Created react-static-plugin-emotion
  • Created react-static-plugin-styled-components
  • Updated eslint and prettier and configured both to run on the pre-commit git hook
  • config.maxThreads now lets you specify how many maximum threads to use to export your html files.
  • config.disablePreload lets you disabled automatic preloading for debugging worst case scenarios.
Breaking Changes
  • Upgraded to Webpack 4 - Make sure your webpack modifications are compliant with its new API
  • The config.webpack option 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.
  • Upgraded to Babel 7 - Make sure your babel plugins are compliant with this version.
  • react-hot-loader's hot(module)(Component) syntax has been changed to now use the <AppContainer> approach. This is much easier than using the hot(module)(Component) in every module you create.
  • Removed the is404 property from the 404 route. To designate a 404 route, you can now place a 404.js file in your pages directory or create a route where the path === '404'
  • static.config.js will now be imported and run multiple times depending on how many threads your build environment supports. If this is a problem, you can use the process.env.REACT_STATIC_THREAD === 'true' condition to detect if the instance is a threaded export slave or not.
  • config.renderToHtml has been deprecated in favor of using the beforeRenderToElement hook.
  • config.usePreact is no longer an option in the static.config.js file. Use the react-static-plugin-preact plugin.
  • A new loader for external JS files is now used after the normal jsLoader called jsLoaderExternal. It is responsible for handling all javascript files that are not located in your projects source.
  • The Routes (and react-static-routes) import has been replaced by simply doing import { Routes } from 'react-static'. Under the hood, this uses a webpack alias to point to the generated dist/react-static-routes.js file, and thus won't confuse linters or IDEs like codesandbox :).
  • Passing an object as the config to react-static is no longer supported. You must pass a location of the root of the project.
  • All render and component props are now deprecated in favor of using child-as-a-function rendering. Anywhere you are using these props must be migrated to use a child as a function.
  • The Loading component has been removed. If you wish to show loading states in your app, you can use the Loading props for any components that support them. This is in preparation for React...Suspense!
  • React-Static no longer ships with any routing-related functionality. It functions independently of your routing paradigm. Thus, it no longer exports anything from react-router.
  • The PrefetchWhenSeen component has been deprecated in favor of only using the Prefetch component
  • The Prefetch component is now smart like PrefetchWhenSeen was.
  • The client-side Redirect component has been deprecated. Redirects should be done in the static.config.js. If the user needs to do any redirects for dynamic/runtime routes, they can use their favorite router's redirect solution.
  • Router has been deprecated and replaced by the Root component. The Root component implements the HashScroller component, an ErrorBoundary and 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.
  • The Root component renders a div under the hood (from reach/router). This may affect layouts during migration.
  • config.disableRouteInfoWarning has been depracated. Do not use RouteInfo on non-static pages!
  • Shared route data is no longer calculated automatically for performance reasons. This was previously done on every key of every prop sent to a route, which was very expensive for little benefit.
  • Shared route data is still supported via the createSharedData utility and the sharedData property on a route. See the docs for information on usage.
Fixes & Optimizations
  • React-Hot-Loader should now work out of the box for all projects. If it doesn't, please report it immediately!
  • Much better performance when building routes for large sites via general performance improvements and also multi-threading HTML exporting
  • Fixed an issue where XML sitemaps contained invalid characters
  • Refactored many files to be more easily testable

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.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by WhiteSource Renovate. View repository job log here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant