gatsby-theme-q3 2.3.2 → 2.3.8

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
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
+ ## [2.3.8](https://github.com/3merge/q/compare/v2.3.7...v2.3.8) (2022-01-10)
7
+
8
+ **Note:** Version bump only for package gatsby-theme-q3
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.3.7](https://github.com/3merge/q/compare/v2.3.6...v2.3.7) (2021-12-16)
15
+
16
+ **Note:** Version bump only for package gatsby-theme-q3
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.3.6](https://github.com/3merge/q/compare/v2.3.5...v2.3.6) (2021-12-16)
23
+
24
+ **Note:** Version bump only for package gatsby-theme-q3
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.3.4](https://github.com/3merge/q/compare/v2.3.3...v2.3.4) (2021-12-10)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * notistack ([4e40fa1](https://github.com/3merge/q/commit/4e40fa10a8c05ad07978b0f9dfcdb9317f67e712))
36
+
37
+
38
+
39
+
40
+
6
41
  ## [2.3.2](https://github.com/3merge/q/compare/v2.3.1...v2.3.2) (2021-12-09)
7
42
 
8
43
  **Note:** Version bump only for package gatsby-theme-q3
package/gatsby-node.js CHANGED
@@ -3,24 +3,54 @@ exports.onCreateWebpackConfig = ({
3
3
  stage,
4
4
  plugins,
5
5
  }) => {
6
- const config = {
6
+ if (stage === 'build-javascript' || stage === 'develop')
7
+ actions.setWebpackConfig({
8
+ plugins: [
9
+ plugins.provide({
10
+ Buffer: ['buffer/', 'Buffer'],
11
+ process: 'process/browser',
12
+ }),
13
+ ],
14
+ });
15
+
16
+ actions.setWebpackConfig({
17
+ module: {
18
+ rules: [
19
+ {
20
+ test: /\.ts$/,
21
+ use: ['ts-loader'],
22
+ },
23
+ {
24
+ test: /unicode-properties[/\\]unicode-properties/,
25
+ use: ['transform-loader?brfs'],
26
+ },
27
+ {
28
+ test: /pdfkit[/\\]js[/\\]/,
29
+ use: ['transform-loader?brfs'],
30
+ },
31
+ {
32
+ test: /fontkit[/\\]index.js$/,
33
+ use: ['transform-loader?brfs'],
34
+ },
35
+ {
36
+ test: /linebreak[/\\]src[/\\]linebreaker.js/,
37
+ use: ['transform-loader?brfs'],
38
+ },
39
+ ],
40
+ },
7
41
  resolve: {
42
+ alias: {
43
+ 'unicode-properties':
44
+ 'unicode-properties/unicode-properties.cjs.js',
45
+ pdfkit: 'pdfkit/js/pdfkit.js',
46
+ },
8
47
  fallback: {
9
48
  util: false,
10
49
  fs: false,
11
50
  path: false,
12
51
  },
13
52
  },
14
- };
15
-
16
- if (stage === 'build-javascript' || stage === 'develop')
17
- config.plugins = [
18
- plugins.provide({
19
- process: 'process/browser',
20
- }),
21
- ];
22
-
23
- actions.setWebpackConfig(config);
53
+ });
24
54
  };
25
55
 
26
56
  exports.onCreateBabelConfig = function onCreateBabelConfig({
package/helpers/setup.js CHANGED
@@ -4,17 +4,25 @@ const { compact, get } = require('lodash');
4
4
  const loadContent = require('./loadContent');
5
5
  const loadTheme = require('./loadTheme');
6
6
 
7
- const getFile = (possibleFileNames = []) =>
8
- possibleFileNames.reduce((acc, curr) => {
9
- if (acc) return acc;
10
- const filename = path.resolve(process.cwd(), curr);
11
- return fs.existsSync(filename) ? filename : undefined;
12
- }, undefined);
7
+ const getFile =
8
+ (directory) =>
9
+ (possibleFileNames = []) =>
10
+ possibleFileNames.reduce((acc, curr) => {
11
+ if (acc) return acc;
12
+ const filename = path.resolve(directory, curr);
13
+ return fs.existsSync(filename) ? filename : undefined;
14
+ }, undefined);
13
15
 
14
- module.exports = (siteMetadata, plugins = []) => {
15
- const locale = loadContent(getFile(['locale', 'lang']));
16
+ module.exports = (
17
+ siteMetadata,
18
+ plugins = [],
19
+ workingDirection = process.cwd(),
20
+ ) => {
21
+ const f = getFile(workingDirection);
22
+
23
+ const locale = loadContent(f(['locale', 'lang']));
16
24
  const theme = loadTheme(
17
- getFile(['theme.js', 'gatsby-theme.js', 'mui.js']),
25
+ f(['theme.js', 'gatsby-theme.js', 'mui.js']),
18
26
  );
19
27
 
20
28
  return {
@@ -30,7 +38,7 @@ module.exports = (siteMetadata, plugins = []) => {
30
38
  {
31
39
  resolve: 'gatsby-theme-q3',
32
40
  options: {
33
- icon: getFile([
41
+ icon: f([
34
42
  'static/favicon.png',
35
43
  'static/favicon.jpg',
36
44
  ]),
@@ -11,8 +11,6 @@ var _axios = _interopRequireDefault(require("axios"));
11
11
 
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
- var _q3UiForms = _interopRequireDefault(require("q3-ui-forms"));
15
-
16
14
  var _q3UiPermissions = _interopRequireDefault(require("q3-ui-permissions"));
17
15
 
18
16
  var _LocaleBundles = _interopRequireDefault(require("./LocaleBundles"));
@@ -33,9 +31,7 @@ const Wrapper = ({
33
31
  setBaseUrlForRest(baseURL);
34
32
  return /*#__PURE__*/_react.default.createElement(_LocaleBundles.default, {
35
33
  locale: locale
36
- }, /*#__PURE__*/_react.default.createElement(_q3UiPermissions.default, null, /*#__PURE__*/_react.default.createElement(_q3UiForms.default, {
37
- preventDuplicate: true
38
- }, children)));
34
+ }, /*#__PURE__*/_react.default.createElement(_q3UiPermissions.default, null, children));
39
35
  };
40
36
 
41
37
  Wrapper.defaultProps = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-theme-q3",
3
- "version": "2.3.2",
3
+ "version": "2.3.8",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "peerDependencies": {
@@ -19,6 +19,7 @@
19
19
  "@contentful/rich-text-react-renderer": "^15.6.2",
20
20
  "@contentful/rich-text-types": "^15.7.0",
21
21
  "add": "^2.0.6",
22
+ "buffer": "^6.0.3",
22
23
  "gatsby-image": "^3.11.0",
23
24
  "gatsby-plugin-canonical-urls": "^4.2.0",
24
25
  "gatsby-plugin-force-trailing-slashes": "^1.0.5",
@@ -29,7 +30,7 @@
29
30
  "gatsby-plugin-sharp": "^4.2.0",
30
31
  "gatsby-plugin-sitemap": "^5.2.0",
31
32
  "gatsby-source-contentful": "^7.0.0",
32
- "gatsby-theme-q3-mui": "^2.3.2",
33
+ "gatsby-theme-q3-mui": "^2.3.6",
33
34
  "gatsby-transformer-sharp": "^4.2.0",
34
35
  "lodash": "^4.17.20",
35
36
  "process": "^0.11.10",
@@ -41,5 +42,5 @@
41
42
  "transform-loader": "^0.2.4",
42
43
  "yarn": "^1.22.17"
43
44
  },
44
- "gitHead": "7b5b95d9f4f347504cea3b3d1d60b8278f1ee825"
45
+ "gitHead": "10440b3c1da79868be52f4c5d7d403588476174d"
45
46
  }
@@ -2,7 +2,6 @@
2
2
  import React from 'react';
3
3
  import axios from 'axios';
4
4
  import PropTypes from 'prop-types';
5
- import FormProviders from 'q3-ui-forms';
6
5
  import AuthProvider from 'q3-ui-permissions';
7
6
  import LocaleBundles from './LocaleBundles';
8
7
 
@@ -19,11 +18,7 @@ const Wrapper = ({ baseURL, children, locale }) => {
19
18
 
20
19
  return (
21
20
  <LocaleBundles locale={locale}>
22
- <AuthProvider>
23
- <FormProviders preventDuplicate>
24
- {children}
25
- </FormProviders>
26
- </AuthProvider>
21
+ <AuthProvider>{children}</AuthProvider>
27
22
  </LocaleBundles>
28
23
  );
29
24
  };