gatsby 4.4.0 → 4.5.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/cache-dir/commonjs/production-app.js +30 -1
- package/cache-dir/commonjs/static-entry.js +14 -3
- package/cache-dir/production-app.js +35 -2
- package/cache-dir/static-entry.js +12 -1
- package/cli.js +0 -0
- package/dist/bootstrap/__mocks__/resolve-module-exports.d.ts +1 -1
- package/dist/bootstrap/create-graphql-runner.d.ts +10 -10
- package/dist/bootstrap/get-config-file.d.ts +4 -4
- package/dist/bootstrap/index.d.ts +10 -10
- package/dist/bootstrap/load-config-and-plugins.d.ts +10 -10
- package/dist/bootstrap/load-plugins/index.d.ts +2 -2
- package/dist/bootstrap/load-plugins/load.d.ts +14 -14
- package/dist/bootstrap/load-plugins/types.d.ts +46 -46
- package/dist/bootstrap/load-plugins/validate.d.ts +40 -40
- package/dist/bootstrap/prefer-default.d.ts +1 -1
- package/dist/bootstrap/redirects-writer.d.ts +2 -2
- package/dist/bootstrap/remove-stale-jobs.d.ts +2 -2
- package/dist/bootstrap/requires-writer.d.ts +10 -10
- package/dist/bootstrap/resolve-module-exports.d.ts +15 -15
- package/dist/bootstrap/schema-hot-reloader.d.ts +3 -3
- package/dist/cache/cache-fs.d.ts +1 -1
- package/dist/cache/json-file-store.d.ts +8 -8
- package/dist/commands/build-html.d.ts +55 -55
- package/dist/commands/build-html.js +7 -1
- package/dist/commands/build-html.js.map +1 -1
- package/dist/commands/build-javascript.d.ts +4 -4
- package/dist/commands/build-utils.d.ts +8 -8
- package/dist/commands/build.d.ts +1 -1
- package/dist/commands/build.js +3 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/clean.d.ts +1 -1
- package/dist/commands/develop-process.d.ts +1 -1
- package/dist/commands/develop-static.d.ts +3 -3
- package/dist/commands/develop.d.ts +2 -2
- package/dist/commands/develop.js +1 -1
- package/dist/commands/develop.js.map +1 -1
- package/dist/commands/feedback.d.ts +1 -1
- package/dist/commands/repl.d.ts +1 -1
- package/dist/commands/serve.d.ts +1 -1
- package/dist/commands/types.d.ts +48 -48
- package/dist/constants.d.ts +1 -1
- package/dist/datastore/common/iterable.d.ts +48 -48
- package/dist/datastore/common/query.d.ts +69 -69
- package/dist/datastore/datastore.d.ts +4 -4
- package/dist/datastore/in-memory/in-memory-datastore.d.ts +2 -2
- package/dist/datastore/in-memory/indexing.d.ts +59 -59
- package/dist/datastore/in-memory/run-fast-filters.d.ts +28 -28
- package/dist/datastore/index.d.ts +20 -20
- package/dist/datastore/lmdb/lmdb-datastore.d.ts +4 -4
- package/dist/datastore/lmdb/query/common.d.ts +23 -23
- package/dist/datastore/lmdb/query/create-index.d.ts +25 -25
- package/dist/datastore/lmdb/query/filter-using-index.d.ts +43 -43
- package/dist/datastore/lmdb/query/run-query.d.ts +9 -9
- package/dist/datastore/lmdb/query/suggest-index.d.ts +15 -15
- package/dist/datastore/lmdb/updates/nodes-by-type.d.ts +3 -3
- package/dist/datastore/lmdb/updates/nodes.d.ts +5 -5
- package/dist/datastore/types.d.ts +47 -47
- package/dist/internal-plugins/functions/gatsby-node.d.ts +3 -3
- package/dist/internal.d.ts +5 -5
- package/dist/joi-schemas/joi.d.ts +5 -5
- package/dist/query/error-parser.d.ts +19 -19
- package/dist/query/file-parser.js +1 -1
- package/dist/query/file-parser.js.map +1 -1
- package/dist/query/graphql-errors-codeframe.d.ts +1 -1
- package/dist/query/graphql-runner.d.ts +38 -38
- package/dist/query/graphql-span-tracer.d.ts +19 -19
- package/dist/query/index.d.ts +26 -26
- package/dist/query/query-runner.d.ts +13 -13
- package/dist/query/query-watcher.d.ts +17 -17
- package/dist/query/types.d.ts +35 -35
- package/dist/query/utils.d.ts +4 -4
- package/dist/redux/actions/add-page-dependency.d.ts +5 -5
- package/dist/redux/actions/index.d.ts +14 -14
- package/dist/redux/actions/internal.d.ts +120 -120
- package/dist/redux/actions/public.js +9 -2
- package/dist/redux/actions/public.js.map +1 -1
- package/dist/redux/actions/restricted.d.ts +292 -292
- package/dist/redux/index.d.ts +20 -20
- package/dist/redux/persist.d.ts +5 -5
- package/dist/redux/plugin-runner.d.ts +1 -1
- package/dist/redux/reducers/babelrc.d.ts +9 -9
- package/dist/redux/reducers/components.d.ts +2 -2
- package/dist/redux/reducers/config.d.ts +2 -2
- package/dist/redux/reducers/definitions.d.ts +2 -2
- package/dist/redux/reducers/flattened-plugins.d.ts +17 -17
- package/dist/redux/reducers/functions.d.ts +2 -2
- package/dist/redux/reducers/html.d.ts +8 -8
- package/dist/redux/reducers/index.d.ts +36 -36
- package/dist/redux/reducers/inference-metadata.d.ts +7 -7
- package/dist/redux/reducers/jobs.d.ts +5 -5
- package/dist/redux/reducers/jobsv2.d.ts +6 -6
- package/dist/redux/reducers/last-action.d.ts +2 -2
- package/dist/redux/reducers/node-manifest.d.ts +2 -2
- package/dist/redux/reducers/nodes-by-type.d.ts +2 -2
- package/dist/redux/reducers/nodes-touched.d.ts +3 -3
- package/dist/redux/reducers/nodes.d.ts +2 -2
- package/dist/redux/reducers/page-data-stats.d.ts +2 -2
- package/dist/redux/reducers/pages.d.ts +2 -2
- package/dist/redux/reducers/pending-page-data-writes.d.ts +4 -4
- package/dist/redux/reducers/program.d.ts +2 -2
- package/dist/redux/reducers/queries.d.ts +26 -26
- package/dist/redux/reducers/redirects.d.ts +2 -2
- package/dist/redux/reducers/resolved-nodes.d.ts +2 -2
- package/dist/redux/reducers/schema-customization.d.ts +23 -23
- package/dist/redux/reducers/schema.d.ts +3 -3
- package/dist/redux/reducers/static-queries-by-template.d.ts +2 -2
- package/dist/redux/reducers/static-query-components.d.ts +2 -2
- package/dist/redux/reducers/status.d.ts +6 -6
- package/dist/redux/reducers/visited-page.d.ts +2 -2
- package/dist/redux/reducers/webpack-compilation-hash.d.ts +2 -2
- package/dist/redux/reducers/webpack.d.ts +2 -2
- package/dist/redux/types.d.ts +799 -799
- package/dist/schema/context.d.ts +14 -14
- package/dist/schema/graphql-engine/bundle-webpack.d.ts +5 -5
- package/dist/schema/graphql-engine/entry.d.ts +19 -19
- package/dist/schema/graphql-engine/print-plugins.d.ts +2 -1
- package/dist/schema/graphql-engine/print-plugins.js +3 -1
- package/dist/schema/graphql-engine/print-plugins.js.map +1 -1
- package/dist/schema/graphql-engine/webpack-remove-apis-loader.d.ts +1 -0
- package/dist/schema/graphql-engine/webpack-remove-apis-loader.js +23 -0
- package/dist/schema/graphql-engine/webpack-remove-apis-loader.js.map +1 -0
- package/dist/schema/infer/build-example-data.d.ts +5 -5
- package/dist/schema/infer/inference-metadata.d.ts +72 -72
- package/dist/schema/infer/is-file.d.ts +1 -1
- package/dist/schema/infer/type-conflict-reporter.d.ts +28 -28
- package/dist/schema/resolvers.d.ts +37 -37
- package/dist/schema/schema-composer.d.ts +3 -3
- package/dist/schema/type-definitions.d.ts +47 -47
- package/dist/schema/types/built-in-types.d.ts +3 -3
- package/dist/schema/types/date.d.ts +37 -37
- package/dist/schema/types/derived-types.d.ts +45 -45
- package/dist/schema/types/filter.d.ts +12 -12
- package/dist/schema/types/node-interface.d.ts +14 -14
- package/dist/schema/types/pagination.d.ts +16 -16
- package/dist/schema/types/sort.d.ts +18 -18
- package/dist/schema/types/type-builders.d.ts +36 -36
- package/dist/services/build-schema.d.ts +2 -2
- package/dist/services/calculate-dirty-queries.d.ts +5 -5
- package/dist/services/create-pages.d.ts +5 -5
- package/dist/services/customize-schema.d.ts +2 -2
- package/dist/services/extract-queries.d.ts +2 -2
- package/dist/services/index.d.ts +17 -17
- package/dist/services/initialize.d.ts +8 -8
- package/dist/services/listen-for-mutations.d.ts +2 -2
- package/dist/services/listen-to-webpack.d.ts +3 -3
- package/dist/services/post-bootstrap.d.ts +2 -2
- package/dist/services/recompile.d.ts +3 -3
- package/dist/services/run-mutation-batch.d.ts +2 -2
- package/dist/services/run-page-queries.d.ts +2 -2
- package/dist/services/run-static-queries.d.ts +2 -2
- package/dist/services/source-nodes.d.ts +5 -5
- package/dist/services/start-webpack-server.d.ts +9 -9
- package/dist/services/types.d.ts +47 -47
- package/dist/services/write-out-redirects.d.ts +2 -2
- package/dist/services/write-out-requires.d.ts +2 -2
- package/dist/state-machines/data-layer/actions.d.ts +8 -8
- package/dist/state-machines/data-layer/index.d.ts +24 -24
- package/dist/state-machines/data-layer/services.d.ts +3 -3
- package/dist/state-machines/data-layer/types.d.ts +23 -23
- package/dist/state-machines/develop/actions.d.ts +38 -38
- package/dist/state-machines/develop/index.d.ts +6 -6
- package/dist/state-machines/develop/services.d.ts +3 -3
- package/dist/state-machines/index.d.ts +7 -7
- package/dist/state-machines/query-running/actions.d.ts +9 -9
- package/dist/state-machines/query-running/index.d.ts +7 -7
- package/dist/state-machines/query-running/services.d.ts +3 -3
- package/dist/state-machines/query-running/types.d.ts +23 -23
- package/dist/state-machines/waiting/actions.d.ts +11 -11
- package/dist/state-machines/waiting/index.d.ts +12 -12
- package/dist/state-machines/waiting/services.d.ts +3 -3
- package/dist/state-machines/waiting/types.d.ts +12 -12
- package/dist/types.d.ts +9 -9
- package/dist/utils/api-browser-docs.d.ts +242 -242
- package/dist/utils/api-node-docs.d.ts +463 -463
- package/dist/utils/api-node-helpers-docs.js +1 -1
- package/dist/utils/api-node-helpers-docs.js.map +1 -1
- package/dist/utils/api-runner-error-parser.d.ts +5 -5
- package/dist/utils/app-data.d.ts +2 -2
- package/dist/utils/assert-store.d.ts +2 -2
- package/dist/utils/babel/babel-plugin-env-vars.d.ts +2 -2
- package/dist/utils/babel/babel-plugin-remove-api.d.ts +2 -2
- package/dist/utils/babel/babel-plugin-remove-api.js +1 -1
- package/dist/utils/babel/babel-plugin-remove-api.js.map +1 -1
- package/dist/utils/babel-parse-to-ast.d.ts +4 -4
- package/dist/utils/browserslist.d.ts +2 -2
- package/dist/utils/cache-lmdb.d.ts +19 -19
- package/dist/utils/cache.d.ts +17 -17
- package/dist/utils/call-deferred-api.d.ts +8 -8
- package/dist/utils/changed-pages.d.ts +6 -6
- package/dist/utils/clear-require-cache.d.ts +1 -1
- package/dist/utils/client-assets-for-template.d.ts +9 -9
- package/dist/utils/create-node-id.d.ts +24 -24
- package/dist/utils/create-schema-customization.d.ts +6 -6
- package/dist/utils/detect-node-mutations.d.ts +4 -4
- package/dist/utils/detect-port-in-use-and-prompt.d.ts +1 -1
- package/dist/utils/dev-ssr/render-dev-html.d.ts +23 -23
- package/dist/utils/develop-preload-headers.d.ts +7 -7
- package/dist/utils/develop-proxy.d.ts +14 -14
- package/dist/utils/did-you-mean.d.ts +3 -3
- package/dist/utils/engine-context.d.ts +5 -5
- package/dist/utils/engines-fs-provider.d.ts +9 -9
- package/dist/utils/engines-helpers.d.ts +2 -2
- package/dist/utils/eslint-config.d.ts +4 -4
- package/dist/utils/eslint-rules/limited-exports-page-templates.d.ts +1 -1
- package/dist/utils/eslint-rules/no-anonymous-exports-page-templates.d.ts +1 -1
- package/dist/utils/eslint-rules-helpers.d.ts +4 -4
- package/dist/utils/fast-refresh-module.d.ts +22 -22
- package/dist/utils/feedback.d.ts +5 -5
- package/dist/utils/find-page-by-path.d.ts +2 -2
- package/dist/utils/flags.d.ts +41 -41
- package/dist/utils/gatsby-dependents.d.ts +8 -8
- package/dist/utils/gatsby-webpack-eslint-graphql-schema-reload-plugin.d.ts +8 -8
- package/dist/utils/gatsby-webpack-stats-extractor.d.ts +6 -6
- package/dist/utils/gatsby-webpack-virtual-modules.d.ts +6 -6
- package/dist/utils/get-cache.d.ts +2 -2
- package/dist/utils/get-latest-apis.d.ts +6 -6
- package/dist/utils/get-page-data.d.ts +3 -3
- package/dist/utils/get-public-path.d.ts +5 -5
- package/dist/utils/get-server-data.d.ts +19 -19
- package/dist/utils/get-ssl-cert.d.ts +9 -9
- package/dist/utils/get-static-dir.d.ts +12 -12
- package/dist/utils/get-value-at.d.ts +1 -1
- package/dist/utils/handle-flags.d.ts +8 -8
- package/dist/utils/is-32-bit-integer.d.ts +1 -1
- package/dist/utils/jobs/manager.d.ts +34 -34
- package/dist/utils/jobs/types.d.ts +63 -63
- package/dist/utils/jobs/worker-messaging.d.ts +9 -9
- package/dist/utils/js-chunk-names.d.ts +1 -1
- package/dist/utils/loading-indicator.d.ts +3 -3
- package/dist/utils/local-eslint-config-finder.d.ts +1 -1
- package/dist/utils/merge-gatsby-config.d.ts +25 -25
- package/dist/utils/mett.d.ts +10 -10
- package/dist/utils/node-manifest.d.ts +44 -44
- package/dist/utils/nodes.d.ts +13 -13
- package/dist/utils/normalize-path.d.ts +2 -2
- package/dist/utils/page-data-helpers.d.ts +14 -14
- package/dist/utils/page-data.d.ts +19 -19
- package/dist/utils/page-mode.d.ts +18 -18
- package/dist/utils/page-ssr-module/bundle-webpack.d.ts +17 -16
- package/dist/utils/page-ssr-module/bundle-webpack.js +2 -0
- package/dist/utils/page-ssr-module/bundle-webpack.js.map +1 -1
- package/dist/utils/page-ssr-module/entry.d.ts +43 -39
- package/dist/utils/page-ssr-module/entry.js +2 -2
- package/dist/utils/page-ssr-module/entry.js.map +1 -1
- package/dist/utils/path.d.ts +5 -5
- package/dist/utils/prepare-regex.d.ts +1 -1
- package/dist/utils/prepare-urls.d.ts +7 -7
- package/dist/utils/print-deprecation-warnings.d.ts +1 -1
- package/dist/utils/print-instructions.d.ts +2 -2
- package/dist/utils/reach-router-add-basecontext-export-loader.d.ts +1 -1
- package/dist/utils/report-once.d.ts +1 -1
- package/dist/utils/require-gatsby-plugin.d.ts +8 -8
- package/dist/utils/restarting-screen.d.ts +2 -2
- package/dist/utils/sample-site-for-experiment.d.ts +2 -2
- package/dist/utils/show-experiment-notice.d.ts +6 -6
- package/dist/utils/source-nodes.d.ts +8 -8
- package/dist/utils/stack-trace-utils.d.ts +24 -24
- package/dist/utils/start-server.d.ts +22 -22
- package/dist/utils/state-machine-logging.d.ts +2 -2
- package/dist/utils/static-query-utils.d.ts +16 -16
- package/dist/utils/telemetry-server.d.ts +1 -1
- package/dist/utils/test-require-error.d.ts +1 -1
- package/dist/utils/tracer/index.d.ts +12 -12
- package/dist/utils/tracer/jaeger-local.d.ts +4 -4
- package/dist/utils/tracer/zipkin-local.d.ts +11 -11
- package/dist/utils/validate-engines/child.d.ts +1 -1
- package/dist/utils/validate-engines/index.d.ts +1 -1
- package/dist/utils/validate-page-component.d.ts +12 -12
- package/dist/utils/wait-until-jobs-complete.d.ts +2 -2
- package/dist/utils/webpack/bundle.d.ts +9 -9
- package/dist/utils/webpack/plugins/cache-folder-resolver.d.ts +9 -9
- package/dist/utils/webpack/plugins/corejs-resolver.d.ts +12 -12
- package/dist/utils/webpack/plugins/force-css-hmr-for-edge-cases.d.ts +22 -22
- package/dist/utils/webpack/plugins/static-query-mapper.d.ts +7 -7
- package/dist/utils/webpack/plugins/webpack-logging.d.ts +12 -12
- package/dist/utils/webpack-error-utils.d.ts +24 -24
- package/dist/utils/webpack-plugins.d.ts +46 -46
- package/dist/utils/webpack-status.d.ts +3 -3
- package/dist/utils/webpack-utils.d.ts +121 -121
- package/dist/utils/webpack-utils.js +26 -25
- package/dist/utils/webpack-utils.js.map +1 -1
- package/dist/utils/websocket-manager.d.ts +40 -40
- package/dist/utils/worker/child/index.d.ts +5 -5
- package/dist/utils/worker/child/load-config-and-plugins.d.ts +2 -2
- package/dist/utils/worker/child/queries.d.ts +7 -7
- package/dist/utils/worker/child/render-html.d.ts +21 -20
- package/dist/utils/worker/child/render-html.js +3 -1
- package/dist/utils/worker/child/render-html.js.map +1 -1
- package/dist/utils/worker/child/schema.d.ts +2 -2
- package/dist/utils/worker/child/schema.js +18 -0
- package/dist/utils/worker/child/schema.js.map +1 -1
- package/dist/utils/worker/child/state.d.ts +2 -2
- package/dist/utils/worker/messaging.d.ts +8 -8
- package/dist/utils/worker/pool.d.ts +10 -10
- package/dist/utils/worker/reporter.d.ts +3 -3
- package/dist/utils/worker/types.d.ts +3 -3
- package/index.d.ts +1 -1
- package/package.json +18 -18
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,33 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.4.0](https://github.com/gatsbyjs/gatsby/commits/gatsby@4.4.0/packages/gatsby) (2021-12-14)
|
|
7
|
+
|
|
8
|
+
[🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v4.4)
|
|
9
|
+
|
|
10
|
+
#### Features
|
|
11
|
+
|
|
12
|
+
- detect node mutations (enabled by flag or env var) [#34006](https://github.com/gatsbyjs/gatsby/issues/34006) ([d8aec30](https://github.com/gatsbyjs/gatsby/commit/d8aec30c74741d6df9446a2e6bbd99b0af384121))
|
|
13
|
+
- Allow external systems to setup tracing for builds [#34204](https://github.com/gatsbyjs/gatsby/issues/34204) ([d3aa933](https://github.com/gatsbyjs/gatsby/commit/d3aa933bc8d3fd73861ab2775ab9017d8c6b7562))
|
|
14
|
+
|
|
15
|
+
#### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- update dependency eslint-plugin-jsx-a11y to ^6.5.1 [#34147](https://github.com/gatsbyjs/gatsby/issues/34147) ([99c538b](https://github.com/gatsbyjs/gatsby/commit/99c538b7fbca33f4c17dab4ad265983304b44631))
|
|
18
|
+
- Update warning about long running queries [#34207](https://github.com/gatsbyjs/gatsby/issues/34207) ([6113cfc](https://github.com/gatsbyjs/gatsby/commit/6113cfc9555e0ba312e00da5a009bd1ead2b337b))
|
|
19
|
+
- update dependency eslint-plugin-react-hooks to ^4.3.0 [#34149](https://github.com/gatsbyjs/gatsby/issues/34149) ([b37682a](https://github.com/gatsbyjs/gatsby/commit/b37682ab5c1d5d37be83f6f6bdf9b5d8e0681847))
|
|
20
|
+
- update dependency eslint-plugin-import to ^2.25.3 [#34128](https://github.com/gatsbyjs/gatsby/issues/34128) ([f621cd4](https://github.com/gatsbyjs/gatsby/commit/f621cd4d8a719aedcef55467cbf0849521741c13))
|
|
21
|
+
- update dependency eslint-webpack-plugin to ^2.6.0 [#34150](https://github.com/gatsbyjs/gatsby/issues/34150) ([d461f59](https://github.com/gatsbyjs/gatsby/commit/d461f591c119bfeb7f8da9d306e1da54f1decb02))
|
|
22
|
+
- update dependency eslint-plugin-react to ^7.27.1 [#34148](https://github.com/gatsbyjs/gatsby/issues/34148) ([a21c48b](https://github.com/gatsbyjs/gatsby/commit/a21c48bbee22f50711fedf6c7b65fb57eea1ceaa))
|
|
23
|
+
- Add back an activity for jobs [#34061](https://github.com/gatsbyjs/gatsby/issues/34061) [#34095](https://github.com/gatsbyjs/gatsby/issues/34095) ([af39171](https://github.com/gatsbyjs/gatsby/commit/af39171c923a029211fd33dc3a1ef312bbcddd93))
|
|
24
|
+
|
|
25
|
+
#### Chores
|
|
26
|
+
|
|
27
|
+
- Update documentation around pathPrefix and assetPrefix combination fix [#34226](https://github.com/gatsbyjs/gatsby/issues/34226) ([97d23ae](https://github.com/gatsbyjs/gatsby/commit/97d23ae9f2608b8ba085402a1447760690b5277b))
|
|
28
|
+
- update dependency @types/eslint to v8 for gatsby [#34154](https://github.com/gatsbyjs/gatsby/issues/34154) ([81fd35a](https://github.com/gatsbyjs/gatsby/commit/81fd35a6ccb0c5b5b4514acf43e44b67fc3c1285))
|
|
29
|
+
- update dependency typescript to ^4.5.2 [#34144](https://github.com/gatsbyjs/gatsby/issues/34144) ([51bff91](https://github.com/gatsbyjs/gatsby/commit/51bff91246cbc48ba50c9650205b0488691fb82a))
|
|
30
|
+
- update createNodeManifest action updatedAt description [#34166](https://github.com/gatsbyjs/gatsby/issues/34166) ([0614fce](https://github.com/gatsbyjs/gatsby/commit/0614fced8aa4a17d7e6ce7ba95cded268ba85aa1))
|
|
31
|
+
- log pending jobs when build is stuck [#34102](https://github.com/gatsbyjs/gatsby/issues/34102) ([1dae7f5](https://github.com/gatsbyjs/gatsby/commit/1dae7f52e095e352d531d13cdc480fb0d498e1ef))
|
|
32
|
+
|
|
6
33
|
## [4.3.0](https://github.com/gatsbyjs/gatsby/commits/gatsby@4.3.0/packages/gatsby) (2021-12-01)
|
|
7
34
|
|
|
8
35
|
[🧾 Release notes](https://www.gatsbyjs.com/docs/reference/release-notes/v4.3)
|
|
@@ -40,6 +40,7 @@ window.asyncRequires = _asyncRequires.default;
|
|
|
40
40
|
window.___emitter = _emitter.default;
|
|
41
41
|
window.___loader = _loader.publicLoader;
|
|
42
42
|
(0, _navigation.init)();
|
|
43
|
+
const reloadStorageKey = `gatsby-reload-compilation-hash-match`;
|
|
43
44
|
(0, _apiRunnerBrowser.apiRunnerAsync)(`onClientEntry`).then(() => {
|
|
44
45
|
// Let plugins register a service worker. The plugin just needs
|
|
45
46
|
// to return true.
|
|
@@ -135,6 +136,35 @@ window.___loader = _loader.publicLoader;
|
|
|
135
136
|
}
|
|
136
137
|
|
|
137
138
|
_loader.publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {
|
|
139
|
+
if (page.page.webpackCompilationHash !== window.___webpackCompilationHash) {
|
|
140
|
+
// Purge plugin-offline cache
|
|
141
|
+
if (`serviceWorker` in navigator && navigator.serviceWorker.controller !== null && navigator.serviceWorker.controller.state === `activated`) {
|
|
142
|
+
navigator.serviceWorker.controller.postMessage({
|
|
143
|
+
gatsbyApi: `clearPathResources`
|
|
144
|
+
});
|
|
145
|
+
} // We have not matching html + js (inlined `window.___webpackCompilationHash`)
|
|
146
|
+
// with our data (coming from `app-data.json` file). This can cause issues such as
|
|
147
|
+
// errors trying to load static queries (as list of static queries is inside `page-data`
|
|
148
|
+
// which might not match to currently loaded `.js` scripts).
|
|
149
|
+
// We are making attempt to reload if hashes don't match, but we also have to handle case
|
|
150
|
+
// when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if (sessionStorage) {
|
|
154
|
+
const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`;
|
|
155
|
+
|
|
156
|
+
if (!isReloaded) {
|
|
157
|
+
sessionStorage.setItem(reloadStorageKey, `1`);
|
|
158
|
+
window.location.reload(true);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (sessionStorage) {
|
|
165
|
+
sessionStorage.removeItem(reloadStorageKey);
|
|
166
|
+
}
|
|
167
|
+
|
|
138
168
|
if (!page || page.status === _loader.PageResourceStatus.Error) {
|
|
139
169
|
const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`; // if the chunk throws an error we want to capture the real error
|
|
140
170
|
// This should help with https://github.com/gatsbyjs/gatsby/issues/19618
|
|
@@ -147,7 +177,6 @@ window.___loader = _loader.publicLoader;
|
|
|
147
177
|
throw new Error(message);
|
|
148
178
|
}
|
|
149
179
|
|
|
150
|
-
window.___webpackCompilationHash = page.page.webpackCompilationHash;
|
|
151
180
|
const SiteRoot = (0, _apiRunnerBrowser.apiRunner)(`wrapRootElement`, {
|
|
152
181
|
element: /*#__PURE__*/_react.default.createElement(LocationHandler, null)
|
|
153
182
|
}, /*#__PURE__*/_react.default.createElement(LocationHandler, null), ({
|
|
@@ -149,7 +149,8 @@ async function staticPage({
|
|
|
149
149
|
scripts,
|
|
150
150
|
reversedStyles,
|
|
151
151
|
reversedScripts,
|
|
152
|
-
inlinePageData = false
|
|
152
|
+
inlinePageData = false,
|
|
153
|
+
webpackCompilationHash
|
|
153
154
|
}) {
|
|
154
155
|
// for this to work we need this function to be sync or at least ensure there is single execution of it at a time
|
|
155
156
|
global.unsafeBuiltinUsage = [];
|
|
@@ -409,7 +410,7 @@ async function staticPage({
|
|
|
409
410
|
}
|
|
410
411
|
}); // Add page metadata for the current page
|
|
411
412
|
|
|
412
|
-
const windowPageData = `/*<![CDATA[*/window.pagePath="${pagePath}";${inlinePageData ? `window.pageData=${JSON.stringify(pageData)};` : ``}/*]]>*/`;
|
|
413
|
+
const windowPageData = `/*<![CDATA[*/window.pagePath="${pagePath}";window.___webpackCompilationHash="${webpackCompilationHash}";${inlinePageData ? `window.pageData=${JSON.stringify(pageData)};` : ``}/*]]>*/`;
|
|
413
414
|
postBodyComponents.push( /*#__PURE__*/React.createElement("script", {
|
|
414
415
|
key: `script-loader`,
|
|
415
416
|
id: `gatsby-script-loader`,
|
|
@@ -449,7 +450,17 @@ async function staticPage({
|
|
|
449
450
|
async: true
|
|
450
451
|
});
|
|
451
452
|
}));
|
|
452
|
-
postBodyComponents.push(...bodyScripts);
|
|
453
|
+
postBodyComponents.push(...bodyScripts); // Reorder headComponents so meta tags are always at the top and aren't missed by crawlers
|
|
454
|
+
// by being pushed down by large inline styles, etc.
|
|
455
|
+
// https://github.com/gatsbyjs/gatsby/issues/22206
|
|
456
|
+
|
|
457
|
+
headComponents.sort((a, b) => {
|
|
458
|
+
if (a.type && a.type === `meta`) {
|
|
459
|
+
return -1;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
return 0;
|
|
463
|
+
});
|
|
453
464
|
apiRunner(`onPreRenderHTML`, {
|
|
454
465
|
getHeadComponents,
|
|
455
466
|
replaceHeadComponents,
|
|
@@ -35,6 +35,8 @@ window.___loader = publicLoader
|
|
|
35
35
|
|
|
36
36
|
navigationInit()
|
|
37
37
|
|
|
38
|
+
const reloadStorageKey = `gatsby-reload-compilation-hash-match`
|
|
39
|
+
|
|
38
40
|
apiRunnerAsync(`onClientEntry`).then(() => {
|
|
39
41
|
// Let plugins register a service worker. The plugin just needs
|
|
40
42
|
// to return true.
|
|
@@ -161,6 +163,39 @@ apiRunnerAsync(`onClientEntry`).then(() => {
|
|
|
161
163
|
}
|
|
162
164
|
|
|
163
165
|
publicLoader.loadPage(browserLoc.pathname + browserLoc.search).then(page => {
|
|
166
|
+
if (page.page.webpackCompilationHash !== window.___webpackCompilationHash) {
|
|
167
|
+
// Purge plugin-offline cache
|
|
168
|
+
if (
|
|
169
|
+
`serviceWorker` in navigator &&
|
|
170
|
+
navigator.serviceWorker.controller !== null &&
|
|
171
|
+
navigator.serviceWorker.controller.state === `activated`
|
|
172
|
+
) {
|
|
173
|
+
navigator.serviceWorker.controller.postMessage({
|
|
174
|
+
gatsbyApi: `clearPathResources`,
|
|
175
|
+
})
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// We have not matching html + js (inlined `window.___webpackCompilationHash`)
|
|
179
|
+
// with our data (coming from `app-data.json` file). This can cause issues such as
|
|
180
|
+
// errors trying to load static queries (as list of static queries is inside `page-data`
|
|
181
|
+
// which might not match to currently loaded `.js` scripts).
|
|
182
|
+
// We are making attempt to reload if hashes don't match, but we also have to handle case
|
|
183
|
+
// when reload doesn't fix it (possibly broken deploy) so we don't end up in infinite reload loop
|
|
184
|
+
if (sessionStorage) {
|
|
185
|
+
const isReloaded = sessionStorage.getItem(reloadStorageKey) === `1`
|
|
186
|
+
|
|
187
|
+
if (!isReloaded) {
|
|
188
|
+
sessionStorage.setItem(reloadStorageKey, `1`)
|
|
189
|
+
window.location.reload(true)
|
|
190
|
+
return
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if (sessionStorage) {
|
|
196
|
+
sessionStorage.removeItem(reloadStorageKey)
|
|
197
|
+
}
|
|
198
|
+
|
|
164
199
|
if (!page || page.status === PageResourceStatus.Error) {
|
|
165
200
|
const message = `page resources for ${browserLoc.pathname} not found. Not rendering React`
|
|
166
201
|
|
|
@@ -174,8 +209,6 @@ apiRunnerAsync(`onClientEntry`).then(() => {
|
|
|
174
209
|
throw new Error(message)
|
|
175
210
|
}
|
|
176
211
|
|
|
177
|
-
window.___webpackCompilationHash = page.page.webpackCompilationHash
|
|
178
|
-
|
|
179
212
|
const SiteRoot = apiRunner(
|
|
180
213
|
`wrapRootElement`,
|
|
181
214
|
{ element: <LocationHandler /> },
|
|
@@ -111,6 +111,7 @@ export default async function staticPage({
|
|
|
111
111
|
reversedStyles,
|
|
112
112
|
reversedScripts,
|
|
113
113
|
inlinePageData = false,
|
|
114
|
+
webpackCompilationHash,
|
|
114
115
|
}) {
|
|
115
116
|
// for this to work we need this function to be sync or at least ensure there is single execution of it at a time
|
|
116
117
|
global.unsafeBuiltinUsage = []
|
|
@@ -388,7 +389,7 @@ export default async function staticPage({
|
|
|
388
389
|
})
|
|
389
390
|
|
|
390
391
|
// Add page metadata for the current page
|
|
391
|
-
const windowPageData = `/*<![CDATA[*/window.pagePath="${pagePath}";${
|
|
392
|
+
const windowPageData = `/*<![CDATA[*/window.pagePath="${pagePath}";window.___webpackCompilationHash="${webpackCompilationHash}";${
|
|
392
393
|
inlinePageData ? `window.pageData=${JSON.stringify(pageData)};` : ``
|
|
393
394
|
}/*]]>*/`
|
|
394
395
|
|
|
@@ -443,6 +444,16 @@ export default async function staticPage({
|
|
|
443
444
|
|
|
444
445
|
postBodyComponents.push(...bodyScripts)
|
|
445
446
|
|
|
447
|
+
// Reorder headComponents so meta tags are always at the top and aren't missed by crawlers
|
|
448
|
+
// by being pushed down by large inline styles, etc.
|
|
449
|
+
// https://github.com/gatsbyjs/gatsby/issues/22206
|
|
450
|
+
headComponents.sort((a, b) => {
|
|
451
|
+
if (a.type && a.type === `meta`) {
|
|
452
|
+
return -1
|
|
453
|
+
}
|
|
454
|
+
return 0
|
|
455
|
+
})
|
|
456
|
+
|
|
446
457
|
apiRunner(`onPreRenderHTML`, {
|
|
447
458
|
getHeadComponents,
|
|
448
459
|
replaceHeadComponents,
|
package/cli.js
CHANGED
|
File without changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const resolveModuleExports: (input: unknown) => Array<string> | undefined;
|
|
1
|
+
export declare const resolveModuleExports: (input: unknown) => Array<string> | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Span } from "opentracing";
|
|
2
|
-
import { ExecutionResult, Source } from "graphql";
|
|
3
|
-
import { Store } from "redux";
|
|
4
|
-
import { Reporter } from "../..";
|
|
5
|
-
import { IGatsbyState } from "../redux/types";
|
|
6
|
-
export declare type Runner = (query: string | Source, context: Record<string, any>) => Promise<ExecutionResult>;
|
|
7
|
-
export declare const createGraphQLRunner: (store: Store<IGatsbyState>, reporter: Reporter, { parentSpan, graphqlTracing, }?: {
|
|
8
|
-
parentSpan: Span | undefined;
|
|
9
|
-
graphqlTracing?: boolean | undefined;
|
|
10
|
-
}) => Runner;
|
|
1
|
+
import { Span } from "opentracing";
|
|
2
|
+
import { ExecutionResult, Source } from "graphql";
|
|
3
|
+
import { Store } from "redux";
|
|
4
|
+
import { Reporter } from "../..";
|
|
5
|
+
import { IGatsbyState } from "../redux/types";
|
|
6
|
+
export declare type Runner = (query: string | Source, context: Record<string, any>) => Promise<ExecutionResult>;
|
|
7
|
+
export declare const createGraphQLRunner: (store: Store<IGatsbyState>, reporter: Reporter, { parentSpan, graphqlTracing, }?: {
|
|
8
|
+
parentSpan: Span | undefined;
|
|
9
|
+
graphqlTracing?: boolean | undefined;
|
|
10
|
+
}) => Runner;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function getConfigFile(rootDir: string, configName: string, distance?: number): Promise<{
|
|
2
|
-
configModule: any;
|
|
3
|
-
configFilePath: string;
|
|
4
|
-
}>;
|
|
1
|
+
export declare function getConfigFile(rootDir: string, configName: string, distance?: number): Promise<{
|
|
2
|
+
configModule: any;
|
|
3
|
+
configFilePath: string;
|
|
4
|
+
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IBuildContext } from "../services";
|
|
2
|
-
import { Runner } from "./create-graphql-runner";
|
|
3
|
-
import type { GatsbyWorkerPool } from "../utils/worker/pool";
|
|
4
|
-
import { IProgram } from "../commands/types";
|
|
5
|
-
export declare function bootstrap(initialContext: Partial<IBuildContext> & {
|
|
6
|
-
program: IProgram;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
gatsbyNodeGraphQLFunction: Runner;
|
|
9
|
-
workerPool: GatsbyWorkerPool;
|
|
10
|
-
}>;
|
|
1
|
+
import { IBuildContext } from "../services";
|
|
2
|
+
import { Runner } from "./create-graphql-runner";
|
|
3
|
+
import type { GatsbyWorkerPool } from "../utils/worker/pool";
|
|
4
|
+
import { IProgram } from "../commands/types";
|
|
5
|
+
export declare function bootstrap(initialContext: Partial<IBuildContext> & {
|
|
6
|
+
program: IProgram;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
gatsbyNodeGraphQLFunction: Runner;
|
|
9
|
+
workerPool: GatsbyWorkerPool;
|
|
10
|
+
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IFlattenedPlugin } from "./load-plugins/types";
|
|
2
|
-
import { IProgram } from "../commands/types";
|
|
3
|
-
export declare function loadConfigAndPlugins({ siteDirectory, processFlags, }: {
|
|
4
|
-
siteDirectory: string;
|
|
5
|
-
processFlags?: boolean;
|
|
6
|
-
program?: IProgram;
|
|
7
|
-
}): Promise<{
|
|
8
|
-
config: any;
|
|
9
|
-
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
10
|
-
}>;
|
|
1
|
+
import { IFlattenedPlugin } from "./load-plugins/types";
|
|
2
|
+
import { IProgram } from "../commands/types";
|
|
3
|
+
export declare function loadConfigAndPlugins({ siteDirectory, processFlags, }: {
|
|
4
|
+
siteDirectory: string;
|
|
5
|
+
processFlags?: boolean;
|
|
6
|
+
program?: IProgram;
|
|
7
|
+
}): Promise<{
|
|
8
|
+
config: any;
|
|
9
|
+
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
10
|
+
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IFlattenedPlugin, IRawSiteConfig } from "./types";
|
|
2
|
-
export declare function loadPlugins(rawConfig: IRawSiteConfig | undefined, rootDir: string): Promise<Array<IFlattenedPlugin>>;
|
|
1
|
+
import { IFlattenedPlugin, IRawSiteConfig } from "./types";
|
|
2
|
+
export declare function loadPlugins(rawConfig: IRawSiteConfig | undefined, rootDir: string): Promise<Array<IFlattenedPlugin>>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IPluginInfo, PluginRef, ISiteConfig } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* @param plugin
|
|
4
|
-
* This should be a plugin spec object where possible but can also be the
|
|
5
|
-
* name of a plugin.
|
|
6
|
-
*
|
|
7
|
-
* When it is a name, it can be a name of a local plugin, the name of a plugin
|
|
8
|
-
* located in node_modules, or a Gatsby internal plugin. In the last case the
|
|
9
|
-
* plugin will be an absolute path.
|
|
10
|
-
* @param rootDir
|
|
11
|
-
* This is the project location, from which are found the plugins
|
|
12
|
-
*/
|
|
13
|
-
export declare function resolvePlugin(plugin: PluginRef, rootDir: string | null): IPluginInfo;
|
|
14
|
-
export declare function loadPlugins(config: ISiteConfig | undefined, rootDir: string): Array<IPluginInfo>;
|
|
1
|
+
import { IPluginInfo, PluginRef, ISiteConfig } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* @param plugin
|
|
4
|
+
* This should be a plugin spec object where possible but can also be the
|
|
5
|
+
* name of a plugin.
|
|
6
|
+
*
|
|
7
|
+
* When it is a name, it can be a name of a local plugin, the name of a plugin
|
|
8
|
+
* located in node_modules, or a Gatsby internal plugin. In the last case the
|
|
9
|
+
* plugin will be an absolute path.
|
|
10
|
+
* @param rootDir
|
|
11
|
+
* This is the project location, from which are found the plugins
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolvePlugin(plugin: PluginRef, rootDir: string | null): IPluginInfo;
|
|
14
|
+
export declare function loadPlugins(config: ISiteConfig | undefined, rootDir: string): Array<IPluginInfo>;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
export interface IRawSiteConfig {
|
|
2
|
-
plugins?: Array<PluginRef>;
|
|
3
|
-
}
|
|
4
|
-
export interface ISiteConfig extends IRawSiteConfig {
|
|
5
|
-
plugins?: Array<IPluginRefObject>;
|
|
6
|
-
}
|
|
7
|
-
export interface IPluginInfo {
|
|
8
|
-
/** Unique ID describing a plugin */
|
|
9
|
-
id: string;
|
|
10
|
-
/** The absolute path to the plugin */
|
|
11
|
-
resolve: string;
|
|
12
|
-
/** The plugin name */
|
|
13
|
-
name: string;
|
|
14
|
-
/** The plugin version (can be content hash) */
|
|
15
|
-
version: string;
|
|
16
|
-
/** Options passed to the plugin */
|
|
17
|
-
pluginOptions?: IPluginInfoOptions;
|
|
18
|
-
subPluginPaths?: Array<string>;
|
|
19
|
-
module?: any;
|
|
20
|
-
modulePath?: string;
|
|
21
|
-
}
|
|
22
|
-
export interface IPluginInfoOptions {
|
|
23
|
-
plugins?: Array<IPluginInfo>;
|
|
24
|
-
path?: string;
|
|
25
|
-
[option: string]: unknown;
|
|
26
|
-
}
|
|
27
|
-
export interface IFlattenedPlugin extends IPluginInfo {
|
|
28
|
-
skipSSR?: boolean;
|
|
29
|
-
ssrAPIs: Array<string>;
|
|
30
|
-
nodeAPIs: Array<string>;
|
|
31
|
-
browserAPIs: Array<string>;
|
|
32
|
-
}
|
|
33
|
-
export interface IPluginRefObject {
|
|
34
|
-
resolve: string;
|
|
35
|
-
options?: IPluginRefOptions;
|
|
36
|
-
parentDir?: string;
|
|
37
|
-
subPluginPaths?: Array<string>;
|
|
38
|
-
module?: any;
|
|
39
|
-
modulePath?: string;
|
|
40
|
-
}
|
|
41
|
-
export declare type PluginRef = string | IPluginRefObject;
|
|
42
|
-
export interface IPluginRefOptions {
|
|
43
|
-
plugins?: Array<PluginRef>;
|
|
44
|
-
path?: string;
|
|
45
|
-
[option: string]: unknown;
|
|
46
|
-
}
|
|
1
|
+
export interface IRawSiteConfig {
|
|
2
|
+
plugins?: Array<PluginRef>;
|
|
3
|
+
}
|
|
4
|
+
export interface ISiteConfig extends IRawSiteConfig {
|
|
5
|
+
plugins?: Array<IPluginRefObject>;
|
|
6
|
+
}
|
|
7
|
+
export interface IPluginInfo {
|
|
8
|
+
/** Unique ID describing a plugin */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The absolute path to the plugin */
|
|
11
|
+
resolve: string;
|
|
12
|
+
/** The plugin name */
|
|
13
|
+
name: string;
|
|
14
|
+
/** The plugin version (can be content hash) */
|
|
15
|
+
version: string;
|
|
16
|
+
/** Options passed to the plugin */
|
|
17
|
+
pluginOptions?: IPluginInfoOptions;
|
|
18
|
+
subPluginPaths?: Array<string>;
|
|
19
|
+
module?: any;
|
|
20
|
+
modulePath?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IPluginInfoOptions {
|
|
23
|
+
plugins?: Array<IPluginInfo>;
|
|
24
|
+
path?: string;
|
|
25
|
+
[option: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface IFlattenedPlugin extends IPluginInfo {
|
|
28
|
+
skipSSR?: boolean;
|
|
29
|
+
ssrAPIs: Array<string>;
|
|
30
|
+
nodeAPIs: Array<string>;
|
|
31
|
+
browserAPIs: Array<string>;
|
|
32
|
+
}
|
|
33
|
+
export interface IPluginRefObject {
|
|
34
|
+
resolve: string;
|
|
35
|
+
options?: IPluginRefOptions;
|
|
36
|
+
parentDir?: string;
|
|
37
|
+
subPluginPaths?: Array<string>;
|
|
38
|
+
module?: any;
|
|
39
|
+
modulePath?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare type PluginRef = string | IPluginRefObject;
|
|
42
|
+
export interface IPluginRefOptions {
|
|
43
|
+
plugins?: Array<PluginRef>;
|
|
44
|
+
path?: string;
|
|
45
|
+
[option: string]: unknown;
|
|
46
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { PackageJson } from "../../../";
|
|
2
|
-
import { IPluginInfo, IFlattenedPlugin, ISiteConfig } from "./types";
|
|
3
|
-
interface IApi {
|
|
4
|
-
version?: string;
|
|
5
|
-
}
|
|
6
|
-
export interface IEntry {
|
|
7
|
-
exportName: string;
|
|
8
|
-
pluginName: string;
|
|
9
|
-
pluginVersion: string;
|
|
10
|
-
api?: IApi;
|
|
11
|
-
}
|
|
12
|
-
export declare type ExportType = "node" | "browser" | "ssr";
|
|
13
|
-
declare type IEntryMap = {
|
|
14
|
-
[exportType in ExportType]: Array<IEntry>;
|
|
15
|
-
};
|
|
16
|
-
export declare type ICurrentAPIs = {
|
|
17
|
-
[exportType in ExportType]: Array<string>;
|
|
18
|
-
};
|
|
19
|
-
export declare function handleBadExports({ currentAPIs, badExports, }: {
|
|
20
|
-
currentAPIs: ICurrentAPIs;
|
|
21
|
-
badExports: {
|
|
22
|
-
[api in ExportType]: Array<IEntry>;
|
|
23
|
-
};
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
export declare function validateConfigPluginsOptions(config: ISiteConfig | undefined, rootDir: string | null): Promise<void>;
|
|
26
|
-
/**
|
|
27
|
-
* Identify which APIs each plugin exports
|
|
28
|
-
*/
|
|
29
|
-
export declare function collatePluginAPIs({ currentAPIs, flattenedPlugins, }: {
|
|
30
|
-
currentAPIs: ICurrentAPIs;
|
|
31
|
-
flattenedPlugins: Array<IPluginInfo & Partial<IFlattenedPlugin>>;
|
|
32
|
-
}): {
|
|
33
|
-
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
34
|
-
badExports: IEntryMap;
|
|
35
|
-
};
|
|
36
|
-
export declare const handleMultipleReplaceRenderers: ({ flattenedPlugins, }: {
|
|
37
|
-
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
38
|
-
}) => Array<IFlattenedPlugin>;
|
|
39
|
-
export declare function warnOnIncompatiblePeerDependency(name: string, packageJSON: PackageJson): void;
|
|
40
|
-
export {};
|
|
1
|
+
import { PackageJson } from "../../../";
|
|
2
|
+
import { IPluginInfo, IFlattenedPlugin, ISiteConfig } from "./types";
|
|
3
|
+
interface IApi {
|
|
4
|
+
version?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IEntry {
|
|
7
|
+
exportName: string;
|
|
8
|
+
pluginName: string;
|
|
9
|
+
pluginVersion: string;
|
|
10
|
+
api?: IApi;
|
|
11
|
+
}
|
|
12
|
+
export declare type ExportType = "node" | "browser" | "ssr";
|
|
13
|
+
declare type IEntryMap = {
|
|
14
|
+
[exportType in ExportType]: Array<IEntry>;
|
|
15
|
+
};
|
|
16
|
+
export declare type ICurrentAPIs = {
|
|
17
|
+
[exportType in ExportType]: Array<string>;
|
|
18
|
+
};
|
|
19
|
+
export declare function handleBadExports({ currentAPIs, badExports, }: {
|
|
20
|
+
currentAPIs: ICurrentAPIs;
|
|
21
|
+
badExports: {
|
|
22
|
+
[api in ExportType]: Array<IEntry>;
|
|
23
|
+
};
|
|
24
|
+
}): Promise<void>;
|
|
25
|
+
export declare function validateConfigPluginsOptions(config: ISiteConfig | undefined, rootDir: string | null): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Identify which APIs each plugin exports
|
|
28
|
+
*/
|
|
29
|
+
export declare function collatePluginAPIs({ currentAPIs, flattenedPlugins, }: {
|
|
30
|
+
currentAPIs: ICurrentAPIs;
|
|
31
|
+
flattenedPlugins: Array<IPluginInfo & Partial<IFlattenedPlugin>>;
|
|
32
|
+
}): {
|
|
33
|
+
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
34
|
+
badExports: IEntryMap;
|
|
35
|
+
};
|
|
36
|
+
export declare const handleMultipleReplaceRenderers: ({ flattenedPlugins, }: {
|
|
37
|
+
flattenedPlugins: Array<IFlattenedPlugin>;
|
|
38
|
+
}) => Array<IFlattenedPlugin>;
|
|
39
|
+
export declare function warnOnIncompatiblePeerDependency(name: string, packageJSON: PackageJson): void;
|
|
40
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const preferDefault: (m: any) => any;
|
|
1
|
+
export declare const preferDefault: (m: any) => any;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const writeRedirects: () => Promise<void>;
|
|
2
|
-
export declare const startRedirectListener: () => void;
|
|
1
|
+
export declare const writeRedirects: () => Promise<void>;
|
|
2
|
+
export declare const startRedirectListener: () => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IGatsbyState, IRemoveStaleJobV2Action, ICreateJobV2FromInternalAction } from "../redux/types";
|
|
2
|
-
export declare const removeStaleJobs: (jobs: IGatsbyState["jobsV2"]) => Array<IRemoveStaleJobV2Action | ICreateJobV2FromInternalAction>;
|
|
1
|
+
import { IGatsbyState, IRemoveStaleJobV2Action, ICreateJobV2FromInternalAction } from "../redux/types";
|
|
2
|
+
export declare const removeStaleJobs: (jobs: IGatsbyState["jobsV2"]) => Array<IRemoveStaleJobV2Action | ICreateJobV2FromInternalAction>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { IGatsbyState, IGatsbyPage } from "../redux/types";
|
|
2
|
-
interface IGatsbyPageComponent {
|
|
3
|
-
component: string;
|
|
4
|
-
componentChunkName: string;
|
|
5
|
-
}
|
|
6
|
-
export declare const resetLastHash: () => void;
|
|
7
|
-
export declare const getComponents: (pages: Array<IGatsbyPage>) => Array<IGatsbyPageComponent>;
|
|
8
|
-
export declare const writeAll: (state: IGatsbyState) => Promise<boolean>;
|
|
9
|
-
export declare const startListener: () => void;
|
|
10
|
-
export {};
|
|
1
|
+
import { IGatsbyState, IGatsbyPage } from "../redux/types";
|
|
2
|
+
interface IGatsbyPageComponent {
|
|
3
|
+
component: string;
|
|
4
|
+
componentChunkName: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const resetLastHash: () => void;
|
|
7
|
+
export declare const getComponents: (pages: Array<IGatsbyPage>) => Array<IGatsbyPageComponent>;
|
|
8
|
+
export declare const writeAll: (state: IGatsbyState) => Promise<boolean>;
|
|
9
|
+
export declare const startListener: () => void;
|
|
10
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/**
|
|
3
|
-
* Given a `require.resolve()` compatible path pointing to a JS module,
|
|
4
|
-
* return an array listing the names of the module's exports.
|
|
5
|
-
*
|
|
6
|
-
* Returns [] for invalid paths and modules without exports.
|
|
7
|
-
*
|
|
8
|
-
* @param modulePath
|
|
9
|
-
* @param mode
|
|
10
|
-
* @param resolver
|
|
11
|
-
*/
|
|
12
|
-
export declare const resolveModuleExports: (modulePath: string, { mode, resolver }?: {
|
|
13
|
-
mode?: string | undefined;
|
|
14
|
-
resolver?: RequireResolve | undefined;
|
|
15
|
-
}) => Array<string>;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/**
|
|
3
|
+
* Given a `require.resolve()` compatible path pointing to a JS module,
|
|
4
|
+
* return an array listing the names of the module's exports.
|
|
5
|
+
*
|
|
6
|
+
* Returns [] for invalid paths and modules without exports.
|
|
7
|
+
*
|
|
8
|
+
* @param modulePath
|
|
9
|
+
* @param mode
|
|
10
|
+
* @param resolver
|
|
11
|
+
*/
|
|
12
|
+
export declare const resolveModuleExports: (modulePath: string, { mode, resolver }?: {
|
|
13
|
+
mode?: string | undefined;
|
|
14
|
+
resolver?: RequireResolve | undefined;
|
|
15
|
+
}) => Array<string>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function bootstrapSchemaHotReloader(): void;
|
|
2
|
-
export declare function startSchemaHotReloader(): void;
|
|
3
|
-
export declare function stopSchemaHotReloader(): void;
|
|
1
|
+
export declare function bootstrapSchemaHotReloader(): void;
|
|
2
|
+
export declare function startSchemaHotReloader(): void;
|
|
3
|
+
export declare function stopSchemaHotReloader(): void;
|
package/dist/cache/cache-fs.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
declare const promisify: any;
|
|
3
|
-
declare const fs: any;
|
|
4
|
-
declare const zlib: any;
|
|
5
|
-
interface IExternalBuffer {
|
|
6
|
-
index: number;
|
|
7
|
-
buffer: Buffer;
|
|
8
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
declare const promisify: any;
|
|
3
|
+
declare const fs: any;
|
|
4
|
+
declare const zlib: any;
|
|
5
|
+
interface IExternalBuffer {
|
|
6
|
+
index: number;
|
|
7
|
+
buffer: Buffer;
|
|
8
|
+
}
|